Phalcon\Db\Adapter\MongoDB\Model\CollectionInfoLegacyIterator::accept PHP Метод

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

Filter out internal or invalid collections.
См. также: http://php.net/filteriterator.accept
public accept ( ) : boolean
Результат boolean
    public function accept()
    {
        $info = parent::current();
        if (!isset($info['name']) || !is_string($info['name'])) {
            return false;
        }
        // Reject names with "$" characters (e.g. indexes, oplog)
        if (strpos($info['name'], '$') !== false) {
            return false;
        }
        $firstDot = strpos($info['name'], '.');
        /* Legacy collection names are a namespace and should be prefixed with
         * the database name and a dot. Reject values that omit this prefix or
         * are empty beyond it.
         */
        if ($firstDot === false || $firstDot + 1 == strlen($info['name'])) {
            return false;
        }
        return true;
    }
CollectionInfoLegacyIterator