src/Store/Document.php
public function getSubset($key)
    {
        if (isset($this->emptySubset)) {
            $this->createTrueSubset();
        }
        $doc = $this->createEmpty();
        if (! isset($this->data[$key]) or ! is_array($this->data[$key])) {
            $doc->data = null;
            $doc->emptySubset = $key;
        } else {
            $doc->data = & $this->data[$key];
        }
        if (! $this->saveDefaults) {
            if (! isset($this->defaultData[$key]) or ! is_array($this->defaultData[$key])) {
                $this->defaultData[$key] = array();
            }
            $doc->defaultData = & $this->defaultData[$key];
        }
        $doc->parent = $this;
        $doc->root = $this->root;
        return $doc;
    }
public function getSubset($key)
    {
        if (isset($this->emptySubset)) {
            $this->createTrueSubset();
        }
        $doc = $this->createEmpty();
        if (! isset($this->data[$key]) or ! is_array($this->data[$key])) {
            $doc->data = null;
            $doc->emptySubset = $key;
        } else {
            $doc->data = & $this->data[$key];
        }
        if (! $this->saveDefaults) {
            if (! isset($this->defaultData[$key]) or ! is_array($this->defaultData[$key])) {
                $this->defaultData[$key] = array();
            }
            $doc->defaultData = & $this->defaultData[$key];
        }
        $doc->parent = $this;
        $doc->root = $this->root;
        return $doc;
    }
public function getSubset ( $ key ) { if ( isset ( $ this -> emptySubset ) ) { $ this -> createTrueSubset ( ) ; } $ doc = $ this -> createEmpty ( ) ; if ( ! isset ( $ this -> data [ $ key ] ) or ! is_array ( $ this -> data [ $ key ] ) ) { $ doc -> data = null ; $ doc -> emptySubset = $ key ; } else { $ doc -> data = & $ this -> data [ $ key ] ; } if ( ! $ this -> saveDefaults ) { if ( ! isset ( $ this -> defaultData [ $ key ] ) or ! is_array ( $ this -> defaultData [ $ key ] ) ) { $ this -> defaultData [ $ key ] = array ( ) ; } $ doc -> defaultData = & $ this -> defaultData [ $ key ] ; } $ doc -> parent = $ this ; $ doc -> root = $ this -> root ; return $ doc ; }
Get a subdocument.

@param string $key
Key.
@return Document A subset.
Get a subdocument .