classes/Map.php
public function get($key, $default=null){
        if (null !== ($ptr =& $this->find($key,false))){
            return $ptr;
        } else {
            if ($default !== null){
                return $this->set($key, is_callable($default) ? call_user_func($default) : $default);
            } else {
                return null;
            }
        }
    }
public function get($key, $default=null){
        if (null !== ($ptr =& $this->find($key,false))){
            return $ptr;
        } else {
            if ($default !== null){
                return $this->set($key, is_callable($default) ? call_user_func($default) : $default);
            } else {
                return null;
            }
        }
    }
public function get ( $ key , $ default = null ) { if ( null !== ( $ ptr = & $ this -> find ( $ key , false ) ) ) { return $ ptr ; } else { if ( $ default !== null ) { return $ this -> set ( $ key , is_callable ( $ default ) ? call_user_func ( $ default ) : $ default ) ; } else { return null ; } } }
Get a value assigned to a key path from the map
@param  string $key The key path of the value in dot notation
@param  mixed $default (optional) The default value. If is a callable it will executed and the return value will be used.
@return mixed The value of the key or the default (resolved) value if the key not existed.
Get a value assigned to a key path from the map