Foundation/Collection.php
public function get($key, $default = null, $dot_syntax = true)
    {
        if ($dot_syntax === true) {
            $paths = explode('.', $key);
            $node =& $this->_data;
            
            foreach ($paths as $path) {
                if (!is_array($node) || !isset($node[$path])) {
                    // error occurred
                    return $default;
                }
                $node =& $node[$path];
            }
            
            return $node;
            
        } else {
            
            return isset($this->_data[$key]) ? $this->_data[$key] : $default;
            
        }
    }
public function get($key, $default = null, $dot_syntax = true)
    {
        if ($dot_syntax === true) {
            $paths = explode('.', $key);
            $node =& $this->_data;
            
            foreach ($paths as $path) {
                if (!is_array($node) || !isset($node[$path])) {
                    // error occurred
                    return $default;
                }
                $node =& $node[$path];
            }
            
            return $node;
            
        } else {
            
            return isset($this->_data[$key]) ? $this->_data[$key] : $default;
            
        }
    }
public function get ( $ key , $ default = null , $ dot_syntax = true ) { if ( $ dot_syntax === true ) { $ paths = explode ( '.' , $ key ) ; $ node = & $ this -> _data ; foreach ( $ paths as $ path ) { if ( ! is_array ( $ node ) || ! isset ( $ node [ $ path ] ) ) { // error occurred return $ default ; } $ node = & $ node [ $ path ] ; } return $ node ; } else { return isset ( $ this -> _data [ $ key ] ) ? $ this -> _data [ $ key ] : $ default ; } }
Returns a single item from the collection data.

@param string $key
@return mixed
Returns a single item from the collection data .