lib/ezutils/classes/ezini.php
function variable( $blockName, $varName )
    {
        if ( isset( $this->BlockValues[$blockName][$varName] ) )
        {
            $value = $this->BlockValues[$blockName][$varName];
        }

        if ( isset( self::$injectedSettings[$this->FileName][$blockName][$varName] ) )
        {
            $value = self::$injectedSettings[$this->FileName][$blockName][$varName];
        }

        if ( isset( $value ) && isset( self::$injectedMergeSettings[$this->FileName][$blockName][$varName] ) )
        {
            if ( !is_array( $value ) || !is_array( self::$injectedMergeSettings[$this->FileName][$blockName][$varName] ) )
            {
                throw new RuntimeException( "injected-merge-settings can only reference and contain array values" );
            }
            $value = array_merge( $value, self::$injectedMergeSettings[$this->FileName][$blockName][$varName] );
        }

        if ( isset( $value ) )
            return $value;

        if ( !isset( $this->BlockValues[$blockName] ) )
            eZDebug::writeError( "Undefined group: '$blockName' in " . $this->FileName, __METHOD__ );
        else
            eZDebug::writeError( "Undefined variable: '$varName' in group '$blockName' in " . $this->FileName, __METHOD__ );
        return false;
    }
function variable( $blockName, $varName )
    {
        if ( isset( $this->BlockValues[$blockName][$varName] ) )
        {
            $value = $this->BlockValues[$blockName][$varName];
        }

        if ( isset( self::$injectedSettings[$this->FileName][$blockName][$varName] ) )
        {
            $value = self::$injectedSettings[$this->FileName][$blockName][$varName];
        }

        if ( isset( $value ) && isset( self::$injectedMergeSettings[$this->FileName][$blockName][$varName] ) )
        {
            if ( !is_array( $value ) || !is_array( self::$injectedMergeSettings[$this->FileName][$blockName][$varName] ) )
            {
                throw new RuntimeException( "injected-merge-settings can only reference and contain array values" );
            }
            $value = array_merge( $value, self::$injectedMergeSettings[$this->FileName][$blockName][$varName] );
        }

        if ( isset( $value ) )
            return $value;

        if ( !isset( $this->BlockValues[$blockName] ) )
            eZDebug::writeError( "Undefined group: '$blockName' in " . $this->FileName, __METHOD__ );
        else
            eZDebug::writeError( "Undefined variable: '$varName' in group '$blockName' in " . $this->FileName, __METHOD__ );
        return false;
    }
function variable ( $ blockName , $ varName ) { if ( isset ( $ this -> BlockValues [ $ blockName ] [ $ varName ] ) ) { $ value = $ this -> BlockValues [ $ blockName ] [ $ varName ] ; } if ( isset ( self :: $ injectedSettings [ $ this -> FileName ] [ $ blockName ] [ $ varName ] ) ) { $ value = self :: $ injectedSettings [ $ this -> FileName ] [ $ blockName ] [ $ varName ] ; } if ( isset ( $ value ) && isset ( self :: $ injectedMergeSettings [ $ this -> FileName ] [ $ blockName ] [ $ varName ] ) ) { if ( ! is_array ( $ value ) || ! is_array ( self :: $ injectedMergeSettings [ $ this -> FileName ] [ $ blockName ] [ $ varName ] ) ) { throw new RuntimeException ( "injected-merge-settings can only reference and contain array values" ) ; } $ value = array_merge ( $ value , self :: $ injectedMergeSettings [ $ this -> FileName ] [ $ blockName ] [ $ varName ] ) ; } if ( isset ( $ value ) ) return $ value ; if ( ! isset ( $ this -> BlockValues [ $ blockName ] ) ) eZDebug :: writeError ( "Undefined group: '$blockName' in " . $ this -> FileName , __METHOD__ ) ; else eZDebug :: writeError ( "Undefined variable: '$varName' in group '$blockName' in " . $ this -> FileName , __METHOD__ ) ; return false ; }
Reads a variable from the ini file. Returns false, if the variable was
not found.

@since 5.0 takes injected settings into account
@param string $blockName
@param string $varName
@return mixed
Reads a variable from the ini file . Returns false if the variable was not found .