Phalcon\Db\Adapter\MongoDB\Model\CollectionInfoLegacyIterator::current PHP Method

current() public method

Return the current element as a CollectionInfo instance.
See also: CollectionInfoIterator::current()
See also: http://php.net/iterator.current
public current ( ) : CollectionInfo
return CollectionInfo
    public function current()
    {
        $info = parent::current();
        // Trim the database prefix up to and including the first dot
        $firstDot = strpos($info['name'], '.');
        if ($firstDot !== false) {
            $info['name'] = (string) substr($info['name'], $firstDot + 1);
        }
        return new CollectionInfo($info);
    }
CollectionInfoLegacyIterator