<?php
/**
 * YANA library
 *
 * @package yana
 * @licence http://creativecommons.org/licenses/by-nc-sa/2.5/
 */

/**
 * Simple Markup Language Files
 *
 * This class offers exactly the same semantics
 * as its super class, except for the fact that
 * keys are not case-sensitive in the sense,
 * that all keys are automatically converted to
 * upper-case.
 *
 * @access      public
 * @package     yana
 * @subpackage  io
 *
 * @see configfile
 */
class SmlFile extends ConfigFile
{

    /**
     * get
     *
     * See the description of the super class
     * for details on this function.
     *
     * @access public
     * @param string $key (optional)
     * @return mixed
     *
     * @see configfile::get()
     */
    function get($key = "*")
    {
        settype($key, "string");
        $key = strtoupper($key);
        return parent::get($key);
    }

    /**
     * insert
     *
     * See the description of the super class
     * for details on this function.
     *
     * @access public
     * @param array $REF
     * @return boolean
     *
     * @see configfile::insert()
     */
    function insert($REF)
    {
        settype($REF, "array");
        $REF = changeCaseArray($REF,CASE_UPPER);
        return parent::insert($REF);
    }

    /**
     * set
     *
     * See the description of the super class
     * for details on this function.
     *
     * @access public
     * @param array $REF
     * @return boolean
     *
     * @see configfile::set()
     */
    function set($REF)
    {
        settype($REF, "array");
        $REF = changeCaseArray($REF,CASE_UPPER);
        return parent::set($REF);
    }

    /**
     * init
     *
     * See the description of the super class
     * for details on this function.
     *
     * @access public
     * @return mixed
     *
     * @see configfile::init()
     */
    function init()
    {
    
        if ($this->isEmpty()) { 
            $this->read(); 
        }
        if (!$this->exists()) {
            return false;  
        }

        $this->value = getConfigFile($this->source);
        $this->is_ready = true;
        return $this->value;

    }

    /**
     * length
     *
     * See the description of the super class
     * for details on this function.
     *
     * @param string $key (optional)
     * @access public
     * @return int
     *
     * @see configfile::length()
     */
    function length($key = "*")
    {
        settype($key, "string");
        return parent::length(strtoupper($key));
    }

    /**
     * remove
     *
     * See the description of the super class
     * for details on this function.
     *
     * @param string $key (optional)
     * @access public
     * @return boolean
     *
     * @see configfile::remove()
     */
    function remove($key = "*")
    {
        settype($key, "string");
        return parent::remove(strtoupper($key));
    }

    /**
     * exists
     *
     * See the description of the super class
     * for details on this function.
     *
     * @param string $key (optional)
     * @access public
     * @return boolean
     *
     * @see configfile::exists()
     */
    function exists($key = "*")
    {
        settype($key, "string");
        return parent::exists(strtoupper($key));
    }

}

$lcn_note = urldecode('%3Cp+class%3D%22KOMMENTAR%22+style%3D%22text-align%3Acenter%22%3Eregistered+VIP-version%3A+%3Cspan+class%3D%22BESCHRIFTUNG%22%3E%26quot%3B%25OWNER%25%26quot%3B%3C%2Fspan%3E%3C%2Fp%3E');
?>