当前位置: 首页>>代码示例>>PHP>>正文


PHP RecursiveIteratorIterator::__construct方法代码示例

本文整理汇总了PHP中RecursiveIteratorIterator::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP RecursiveIteratorIterator::__construct方法的具体用法?PHP RecursiveIteratorIterator::__construct怎么用?PHP RecursiveIteratorIterator::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RecursiveIteratorIterator的用法示例。


在下文中一共展示了RecursiveIteratorIterator::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * 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);
 }
开发者ID:rooster,项目名称:symfony,代码行数:15,代码来源:DirectoryResourceIterator.php

示例2: __construct

	/**
	 * 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);
	}
开发者ID:0xLeon,项目名称:WCF,代码行数:35,代码来源:CategoryNodeList.class.php

示例3: __construct

 /**
  * 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);
 }
开发者ID:pixlr,项目名称:ZCE-PHP-Cert,代码行数:10,代码来源:pdo-iterator.php

示例4: __construct

 /**
  * @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();
 }
开发者ID:appsco,项目名称:component-firi,代码行数:13,代码来源:BushIterator.php

示例5: __construct

 /**
  * 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);
     }
 }
开发者ID:nooku,项目名称:nooku-framework,代码行数:15,代码来源:recursive.php

示例6: __construct

 /** 
  * 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());
     }
 }
开发者ID:pixlr,项目名称:ZCE-PHP-Cert,代码行数:12,代码来源:directory-tree.php

示例7: __construct

 /**
  * 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);
     }
 }
开发者ID:nooku,项目名称:nooku-framework,代码行数:15,代码来源:recursive.php

示例8: __construct

 public function __construct($sourcePath, $destBasePath)
 {
     $sourcePath = realpath($sourcePath);
     $sourcePath = rtrim($sourcePath, '\\/') . '/';
     $destBasePath = realpath($destBasePath);
     $destBasePath = rtrim($destBasePath, '\\/') . '/';
     parent::__construct(new mediaDirectoryRecursiveIterator($sourcePath, $sourcePath, $destBasePath));
 }
开发者ID:googlecode-mirror,项目名称:bulldoc,代码行数:8,代码来源:media_dir_iterators.php

示例9:

 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);
 }
开发者ID:Kinetical,项目名称:Kinesis,代码行数:10,代码来源:IteratorIterator.php

示例10: Exception

 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);
 }
开发者ID:Kinetical,项目名称:Kinesis,代码行数:10,代码来源:IteratorIterator.php

示例11: __construct

 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));
 }
开发者ID:jgosier,项目名称:kamusi,代码行数:10,代码来源:DirIterator.php

示例12: __construct

 /**
  * 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);
 }
开发者ID:rokite,项目名称:windwalker,代码行数:11,代码来源:RecursiveCompareDualIterator.php

示例13: __construct

 /**
  * @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;
 }
开发者ID:gawonmi,项目名称:Validation,代码行数:11,代码来源:RecursiveTreeIterator.php

示例14: __construct

 public function __construct(Errors $iterator)
 {
     parent::__construct($iterator, \RecursiveIteratorIterator::LEAVES_ONLY);
 }
开发者ID:z7zmey,项目名称:rvalidate,代码行数:4,代码来源:ErrorsIterator.php

示例15: __construct

 /**
  * @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);
 }
开发者ID:getherbie,项目名称:herbie,代码行数:9,代码来源:HtmlTree.php


注:本文中的RecursiveIteratorIterator::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。