Scalr\Tests\Functional\Api\V2\Iterator\ApiDataRecursiveFilterIterator::accept PHP Метод

accept() публичный Метод

См. также: RecursiveFilterIterator::accept()
public accept ( )
    public function accept()
    {
        $result = false;
        $this->prepareData();
        if ($this->getInnerIterator()->key() === $this->part) {
            $result = true;
        }
        if (preg_match('#{\\w*}#', $this->part)) {
            $result = true;
            //check scope
            $obj = $this->current();
            if (!is_null($this->type) && array_key_exists('scope', $obj) && in_array($obj['scope'], self::$notAllowedScope[$this->type])) {
                $result = false;
            }
        }
        return $result;
    }