Scalr\Tests\Functional\Api\V2\Iterator\ApiDataRecursiveFilterIterator::prepareData PHP Méthode

prepareData() public méthode

If has not path parts cut or create Api data
public prepareData ( )
    public function prepareData()
    {
        if (count($this->parts) === 1 && preg_match('#{\\w*}#', $this->part)) {
            $this->getInnerIterator()->offsetSet($this->key(), [$this->parts[0] => null]);
        }
        if (empty($this->parts)) {
            if (!preg_match('#{\\w*}#', $this->part) && $this->getInnerIterator()->key() !== $this->part) {
                $this->getInnerIterator()->offsetSet($this->part, null);
            } else {
                $this->getInnerIterator()->offsetSet($this->key(), null);
            }
        }
    }