protected function _getProperty($path)
    {
        if (is_a($path, 'stdClass')) {
            $path = $path->dotted;
        }

        $current = $this->_document;

        $pathClone = $path;
        $parts = strtok($pathClone, '.');

        while ($parts !== false) {
            if (!array_key_exists($parts, $current)) {
                throw new CrudException("Error retrieving a value for non-existing JSON API document property '$path'");
            }
            $current = $current[$parts];
            $parts = strtok('.');
        }

        return $current;
    }
protected function _getProperty($path)
    {
        if (is_a($path, 'stdClass')) {
            $path = $path->dotted;
        }

        $current = $this->_document;

        $pathClone = $path;
        $parts = strtok($pathClone, '.');

        while ($parts !== false) {
            if (!array_key_exists($parts, $current)) {
                throw new CrudException("Error retrieving a value for non-existing JSON API document property '$path'");
            }
            $current = $current[$parts];
            $parts = strtok('.');
        }

        return $current;
    }
protected function _getProperty ( $ path ) { if ( is_a ( $ path , 'stdClass' ) ) { $ path = $ path -> dotted ; } $ current = $ this -> _document ; $ pathClone = $ path ; $ parts = strtok ( $ pathClone , '.' ) ; while ( $ parts !== false ) { if ( ! array_key_exists ( $ parts , $ current ) ) { throw new CrudException ( "Error retrieving a value for non-existing JSON API document property '$path'" ) ; } $ current = $ current [ $ parts ] ; $ parts = strtok ( '.' ) ; } return $ current ; }
Returns the value for a given document property.

@param string|stdClass $path Dot separated path of the property or path object
@throws \Crud\Error\Exception\CrudException
@return mixed
Returns the value for a given document property .