src/Context.php
public function extract($parts = null) {
        if ($this->isEmpty()) {
            return false;
        }

        if ($parts === null) {
            return $this->content;
        }

        if (is_array($parts)) {
            $result = array();
            foreach ($parts as $key) {
                if (isset($this->content[$key])) {
                    $result[$key] = $this->content[$key];
                }
            }

            return $result;
        }

        return isset($this->content[$parts])?$this->content[$parts]:false;
    }
public function extract($parts = null) {
        if ($this->isEmpty()) {
            return false;
        }

        if ($parts === null) {
            return $this->content;
        }

        if (is_array($parts)) {
            $result = array();
            foreach ($parts as $key) {
                if (isset($this->content[$key])) {
                    $result[$key] = $this->content[$key];
                }
            }

            return $result;
        }

        return isset($this->content[$parts])?$this->content[$parts]:false;
    }
public function extract ( $ parts = null ) { if ( $ this -> isEmpty ( ) ) { return false ; } if ( $ parts === null ) { return $ this -> content ; } if ( is_array ( $ parts ) ) { $ result = array ( ) ; foreach ( $ parts as $ key ) { if ( isset ( $ this -> content [ $ key ] ) ) { $ result [ $ key ] = $ this -> content [ $ key ] ; } } return $ result ; } return isset ( $ this -> content [ $ parts ] ) ? $ this -> content [ $ parts ] : false ; }
Extract result parts of current query.
@param  mixed $parts
@return mixed
Extract result parts of current query .