/** * Load the iterator. */ public function __construct($it, $dsn, $table) { $this->_it = $it; $this->_dsn = $dsn; $this->_table = $table; parent::__construct($this->_it, self::LEAVES_ONLY); }
/** * Creates a new CategoryNodeList instance. * * @param string $objectType * @param integer $parentCategoryID * @param boolean $includeDisabledCategories * @param array<integer> $excludedCategoryIDs */ public function __construct($objectType, $parentCategoryID = 0, $includeDisabledCategories = false, array $excludedCategoryIDs = array()) { if (empty($this->nodeClassName)) { $this->nodeClassName = str_replace('List', '', get_class($this)); if (!class_exists($this->nodeClassName)) { throw new SystemException("Unknown category node class '".$this->nodeClassName."'."); } } $this->parentCategoryID = $parentCategoryID; // get parent category if (!$this->parentCategoryID) { // empty node $parentCategory = new Category(null, array( 'categoryID' => 0, 'objectTypeID' => CategoryHandler::getInstance()->getObjectTypeByName($objectType)->objectTypeID )); } else { $parentCategory = CategoryHandler::getInstance()->getCategory($this->parentCategoryID); if ($parentCategory === null) { throw new SystemException("There is no category with id '".$this->parentCategoryID."'"); } } parent::__construct(new $this->nodeClassName($parentCategory, $includeDisabledCategories, $excludedCategoryIDs), \RecursiveIteratorIterator::SELF_FIRST); }
/** * Constructor. * * @param LoaderInterface $loader The templating loader * @param string $bundle The current bundle name * @param string $path The directory * @param RecursiveIterator $iterator The inner iterator */ public function __construct(LoaderInterface $loader, $bundle, $path, \RecursiveIterator $iterator) { $this->loader = $loader; $this->bundle = $bundle; $this->path = $path; parent::__construct($iterator); }
/** * @param IItem $root * @param int $maxDepth * @param array $filter */ public function __construct(IItem $root, $maxDepth = -1, $filter = array()) { parent::__construct($root, parent::SELF_FIRST); parent::setMaxDepth($maxDepth); $this->filter = $filter; $this->accessor = PropertyAccess::getPropertyAccessor(); $this->iterated = new \SplObjectStorage(); }
/** * Constructor * * @param DatabaseRowsetInterface $rowset * @param integer $max_level The maximum allowed level. 0 is used for any level * @return DatabaseIteratorRecursive */ public function __construct(DatabaseRowsetInterface $rowset, $max_level = 0) { parent::__construct(static::_createInnerIterator($rowset), \RecursiveIteratorIterator::SELF_FIRST); //Set the max iteration level if (isset($max_level)) { $this->setMaxLevel($max_level); } }
/** * Construct from a path. * @param $path directory to iterate */ public function __construct($path) { try { parent::__construct(new RecursiveCachingIterator(new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::KEY_AS_FILENAME), CachingIterator::CALL_TOSTRING | CachingIterator::CATCH_GET_CHILD), parent::SELF_FIRST); } catch (Exception $e) { die($e->getMessage()); } }
/** * Constructor * * @param ControllerToolbarInterface $toolbar * @param integer $max_level The maximum allowed level. 0 is used for any level * @return ControllerToolbarIteratorRecursive */ public function __construct(ControllerToolbarInterface $toolbar, $max_level = 0) { parent::__construct(static::_createInnerIterator($toolbar), \RecursiveIteratorIterator::SELF_FIRST); //Set the max iteration level if (isset($max_level)) { $this->setMaxLevel($max_level); } }
public function __construct($sourcePath, $destBasePath) { $sourcePath = realpath($sourcePath); $sourcePath = rtrim($sourcePath, '\\/') . '/'; $destBasePath = realpath($destBasePath); $destBasePath = rtrim($destBasePath, '\\/') . '/'; parent::__construct(new mediaDirectoryRecursiveIterator($sourcePath, $sourcePath, $destBasePath)); }
function __construct($iterator, $mode = \RecursiveIteratorIterator::SELF_FIRST, array $flags = null) { if (method_exists($iterator, 'getIterator')) { $iterator = $iterator->getIterator(); } if (!$iterator instanceof Iterator) { throw new \Exception('Iterator must be instance of Data\\Tree\\Node\\Iterator, ' . get_class($iterator) . ' provided.'); } parent::__construct($iterator, $mode, $flags); }
function __construct($iterator) { if (method_exists($iterator, 'getIterator')) { $iterator = $iterator->getIterator(); } if (!$iterator instanceof NestedSetIterator) { throw new Exception('Iterator must be instance of NestedSetIterator'); } parent::__construct($iterator, \RecursiveIteratorIterator::SELF_FIRST); }
public function __construct($path) { $path = realpath($path); if (!file_exists($path)) { throw new Exception("Path {$path} could not be found."); } elseif (!is_dir($path)) { throw new Exception("Path {$path} is not a directory."); } parent::__construct(new RecursiveDirectoryIterator($path)); }
/** * Construct from RecursiveDualIterator * * @param RecursiveDualIterator $it RecursiveDualIterator * @param integer $mode Should be LEAVES_ONLY * @param integer $flags Should be 0 */ public function __construct(RecursiveDualIterator $it, $mode = self::LEAVES_ONLY, $flags = 0) { parent::__construct($it); }
/** * @param it iterator to use as inner iterator * @param ritFlags flags passed to RecursiveIteratoIterator (parent) * @param citFlags flags passed to RecursiveCachingIterator (for hasNext) * @param mode mode passed to RecursiveIteratoIterator (parent) */ public function __construct(RecursiveIterator $it, $ritFlags = self::BYPASS_KEY, $citFlags = CachingIterator::CATCH_GET_CHILD, $mode = self::SELF_FIRST) { parent::__construct(new RecursiveCachingIterator($it, $citFlags), $mode, $ritFlags); $this->ritFlags = $ritFlags; }
public function __construct(Errors $iterator) { parent::__construct($iterator, \RecursiveIteratorIterator::LEAVES_ONLY); }
/** * @param \RecursiveIterator $iterator * @param int $mode * @param int $flags */ public function __construct(\RecursiveIterator $iterator, $mode = \RecursiveIteratorIterator::SELF_FIRST, $flags = 0) { parent::__construct($iterator, $mode, $flags); }
public function __construct(ControllerToolbarInterface $toolbar, $mode = \RecursiveIteratorIterator::SELF_FIRST, $flags = 0) { parent::__construct($toolbar, $mode, $flags); }
function __construct($iterator) { parent::__construct($iterator, self::LEAVES_ONLY); }
function __construct($it) { parent::__construct($it, self::LEAVES_ONLY); }
function __construct($it, $max_depth) { $this->max_depth = $max_depth; parent::__construct($it); }
/** * __construct * * @access public * @return void */ public function __construct($path) { $dir_iterator = new RecursiveDirectoryIterator($path); parent::__construct($dir_iterator); }
/** * @param \Traversable $array */ public function __construct($array) { parent::__construct(new RecursiveBlockIterator($array), \RecursiveIteratorIterator::SELF_FIRST); }
/** * Creates a depth-first pre-order traversal iterator * * @param Zym_Navigation_Container $container container to iterate */ public function __construct(Zym_Navigation_Container $container) { parent::__construct($container, self::SELF_FIRST); }
function __construct(Menu $it) { parent::__construct($it); }
public function __construct($arr) { parent::__construct(new MyArrIter($arr)); }
public function __construct(ComFilesModelEntityFolders $nodes, $mode = \RecursiveIteratorIterator::SELF_FIRST, $flags = 0) { parent::__construct($nodes, $mode, $flags); }
/** * @param string $source Source dir (usually from an IDE workspace) * @param string $target Target dir (usually where a joomla installation resides) */ public function __construct($source, $target) { $this->source = $source; $this->target = $target; parent::__construct(new \RecursiveDirectoryIterator($source)); }
/** * @param \Traversable $iterator * @param string $separator * @param int $mode * @param int $flags */ public function __construct(\Traversable $iterator, $separator = '.', $mode = \RecursiveIteratorIterator::LEAVES_ONLY, $flags = 0) { $this->keySeparator = $separator; parent::__construct($iterator, $mode, $flags); }
function __construct($it, $max_depth) { $this->max_depth = $max_depth; parent::__construct($it, RecursiveIteratorIterator::LEAVES_ONLY, RecursiveIteratorIterator::CATCH_GET_CHILD); }
function __construct($path) { parent::__construct(new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::KEY_AS_FILENAME), parent::SELF_FIRST); }
function __construct($m) { parent::__construct($m, self::SELF_FIRST); }