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


PHP Tree::__construct方法代码示例

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


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

示例1: TreeFileTester

 function __construct()
 {
     $file = new TreeFileTester('file');
     $file->properties = ['test1' => 'value'];
     $file->data = 'foobar';
     parent::__construct(new TreeDirectoryTester('root', [new TreeDirectoryTester('hi', [new TreeDirectoryTester('sub'), $file]), new TreeMultiGetTester('multi', [new TreeFileTester('1'), new TreeFileTester('2'), new TreeFileTester('3')])]));
 }
开发者ID:BlaBlaNet,项目名称:hubzilla,代码行数:7,代码来源:TreeTest.php

示例2: __construct

 /**
  * Constructor
  *
  * @param   string version default XSL_VERSION_1_0
  */
 public function __construct($version = XSL_VERSION_1_0)
 {
     parent::__construct('xsl:stylesheet');
     // Add attributes for root node
     $this->root()->setAttribute('version', $version);
     $this->root()->setAttribute('xmlns:xsl', XSL_NAMESPACE);
 }
开发者ID:xp-framework,项目名称:xml,代码行数:12,代码来源:Stylesheet.class.php

示例3: __construct

 /**
  * Constructor
  *
  */
 public function __construct()
 {
     parent::__construct();
     $this->formresult = new Node('formresult', NULL, array('serial' => time(), 'tz' => date('Z'), 'xmlns:xsd' => 'http://www.w3.org/2001/XMLSchema', 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance'));
     $this->withRoot($this->formresult);
     $this->formvalues = $this->formresult->addChild(new Node('formvalues'));
     $this->formerrors = $this->formresult->addChild(new Node('formerrors'));
 }
开发者ID:melogamepay,项目名称:xp-framework,代码行数:12,代码来源:OutputDocument.class.php

示例4: __construct

 /**
  * Constructor. Can't be called directly, use getInstance() instead.
  */
 public function __construct(SystemSite $site)
 {
     parent::__construct();
     $this->systemSite = $site;
     $this->nodename = 'item';
     $this->rootName = 'tree';
     $this->initialize();
 }
开发者ID:rverbrugge,项目名称:dif,代码行数:11,代码来源:SiteTree.php

示例5: __construct

 public function __construct($csv_with_header, $display_debug = 0)
 {
     $this->display_debug = $display_debug;
     $this->training_data = $this->csv_to_array($csv_with_header);
     array_pop($this->training_data['header']);
     parent::__construct(new Node('Root'));
     $this->find_root($this->root, 'Any', $this->training_data);
 }
开发者ID:enterlight,项目名称:ID3-PHP,代码行数:8,代码来源:dec_tree3.php

示例6: __construct

 /**
  * Constructor
  *
  */
 public function __construct()
 {
     parent::__construct('rdf:RDF');
     $this->root()->setAttribute('xmlns:rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#');
     $this->root()->setAttribute('xmlns:dc', 'http://purl.org/dc/elements/1.1/');
     $this->root()->setAttribute('xmlns', 'http://purl.org/rss/1.0/');
     $this->channel = new stdClass();
     $this->image = new stdClass();
     $this->items = array();
 }
开发者ID:melogamepay,项目名称:xp-framework,代码行数:14,代码来源:RDFNewsFeed.class.php

示例7: __construct

 /**
  * Constructor. Can't be called directly, use getInstance() instead.
  */
 public function __construct($fileName, $useLogin)
 {
     parent::__construct();
     $this->useLogin = $useLogin;
     $this->fileName = $fileName;
     $this->nodename = 'item';
     $this->rootName = 'tree';
     $this->treeName = 'DIF';
     $this->treeTitle = $this->treeName;
 }
开发者ID:rverbrugge,项目名称:dif,代码行数:13,代码来源:AdminTree.php

示例8: __construct

 /**
  * Create a new JNLP document 
  *
  * @param   string codebase
  * @param   string href
  * @param   string spec default JNLP_SPEC_1_PLUS
  */
 public function __construct($codebase = NULL, $href = NULL, $spec = JNLP_SPEC_1_PLUS)
 {
     parent::__construct('jnlp');
     $this->root->setAttribute('spec', $spec);
     $this->root->setAttribute('codebase', $codebase);
     $this->root->setAttribute('href', $href);
     $this->_nodes['information'] = $this->root->addChild(new Node('information'));
     $this->_nodes['security'] = $this->root->addChild(new Node('security'));
     $this->_nodes['resources'] = $this->root->addChild(new Node('resources'));
     $this->_nodes['application-desc'] = $this->root->addChild(new Node('application-desc'));
 }
开发者ID:Gamepay,项目名称:xp-contrib,代码行数:18,代码来源:JnlpDocument.class.php

示例9: __construct

 public function __construct($id, $title = null, $root_category = null, $lang = null, $use_shop_restriction = true)
 {
     if (isset($title)) {
         $this->setTitle($title);
     }
     if (isset($root_category)) {
         $this->setRootCategory($root_category);
     }
     parent::__construct($id);
     $this->setLang($lang);
     $this->setUseShopRestriction($use_shop_restriction);
 }
开发者ID:Oldwo1f,项目名称:yakaboutique,代码行数:12,代码来源:tree_products.php

示例10: __construct

 /**
  * Constructor
  *
  * @param \ModelCriteria|string $modelOrQuery A query object, or model class as string.
  * @param array $options
  */
 public function __construct($modelOrQuery, array $options = array())
 {
     if (is_string($modelOrQuery)) {
         $this->model = $modelOrQuery;
         $this->query = \PropelQuery::from($this->model);
     } else {
         if ($modelOrQuery instanceof \ModelCriteria) {
             $this->query = $modelOrQuery;
             $this->model = $this->query->getModelName();
         } else {
             throw new \Exception('Invalid argument');
         }
     }
     parent::__construct($options);
 }
开发者ID:bombayworks,项目名称:currycms,代码行数:21,代码来源:PropelTree.php

示例11: __construct

 /**
  * Constructor.
  *
  */
 public function __construct()
 {
     parent::__construct('wddxPacket');
     $this->root()->setAttribute('version', '1.0');
 }
开发者ID:melogamepay,项目名称:xp-framework,代码行数:9,代码来源:WddxMessage.class.php

示例12: __construct

 public function __construct(array $data, $hierarchyMember = 'position', $charsPerLevel = 3)
 {
     $this->hierarchyMember = $hierarchyMember;
     $this->charsPerLevel = $charsPerLevel;
     parent::__construct((new Builder\PathTreeBuilder($hierarchyMember, $charsPerLevel))->build($data));
 }
开发者ID:jandanielcz,项目名称:oliva-tree,代码行数:6,代码来源:PathTree.php

示例13: __construct

 public function __construct(array $data, $parentMember = 'parent', $idMember = 'id')
 {
     $this->parentMember = $parentMember;
     $this->idMember = $idMember;
     parent::__construct((new Builder\RecursiveTreeBuilder($parentMember, $idMember))->build($data));
 }
开发者ID:jandanielcz,项目名称:oliva-tree,代码行数:6,代码来源:RecursiveTree.php

示例14: __construct

 /**
  * Constructor
  *
  * @param string $root
  * @param array $options
  */
 public function __construct($root, array $options = array())
 {
     $this->setRoot($root);
     parent::__construct($options);
 }
开发者ID:bombayworks,项目名称:currycms,代码行数:11,代码来源:FilesystemTree.php

示例15:

 function __construct($root, $root_type = ROOT_TYPE_ID)
 {
     $this->_table = "categories";
     parent::__construct($root, $root_type);
 }
开发者ID:mi-squared,项目名称:openemr,代码行数:5,代码来源:CategoryTree.class.php


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