src/config/Config.php
protected function getProperty($key, &$notFound) {
        $properties  = $this->properties;
        $subkeys     = $this->parseSubkeys(strtolower($key));
        $subKeysSize = sizeof($subkeys);
        $notFound    = false;

        for ($i=0; $i < $subKeysSize; ++$i) {
            $subkey = trim($subkeys[$i]);
            if (!is_array($properties) || !key_exists($subkey, $properties))
                break;                                      // not found
            if ($i+1 == $subKeysSize)                       // return at the last subkey
                return $properties[$subkey];
            $properties = $properties[$subkey];             // go to the next sublevel
        }

        $notFound = true;
        return null;
    }
protected function getProperty($key, &$notFound) {
        $properties  = $this->properties;
        $subkeys     = $this->parseSubkeys(strtolower($key));
        $subKeysSize = sizeof($subkeys);
        $notFound    = false;

        for ($i=0; $i < $subKeysSize; ++$i) {
            $subkey = trim($subkeys[$i]);
            if (!is_array($properties) || !key_exists($subkey, $properties))
                break;                                      // not found
            if ($i+1 == $subKeysSize)                       // return at the last subkey
                return $properties[$subkey];
            $properties = $properties[$subkey];             // go to the next sublevel
        }

        $notFound = true;
        return null;
    }
protected function getProperty ( $ key , & $ notFound ) { $ properties = $ this -> properties ; $ subkeys = $ this -> parseSubkeys ( strtolower ( $ key ) ) ; $ subKeysSize = sizeof ( $ subkeys ) ; $ notFound = false ; for ( $ i = 0 ; $ i < $ subKeysSize ; ++ $ i ) { $ subkey = trim ( $ subkeys [ $ i ] ) ; if ( ! is_array ( $ properties ) || ! key_exists ( $ subkey , $ properties ) ) break ; // not found if ( $ i + 1 == $ subKeysSize ) // return at the last subkey return $ properties [ $ subkey ] ; $ properties = $ properties [ $ subkey ] ; // go to the next sublevel } $ notFound = true ; return null ; }
Look-up a property and return its value.

@param  string $key      - property key
@param  bool   $notFound - reference to a flag indicating whether the property was found

@return mixed - Property value (including NULL) or NULL if no such property was found. If NULL is returned the flag
$notFound must be checked to find out whether the property was found.
Look - up a property and return its value .