本文整理汇总了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')])]));
}
示例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);
}
示例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'));
}
示例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();
}
示例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);
}
示例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();
}
示例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;
}
示例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'));
}
示例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);
}
示例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);
}
示例11: __construct
/**
* Constructor.
*
*/
public function __construct()
{
parent::__construct('wddxPacket');
$this->root()->setAttribute('version', '1.0');
}
示例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));
}
示例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));
}
示例14: __construct
/**
* Constructor
*
* @param string $root
* @param array $options
*/
public function __construct($root, array $options = array())
{
$this->setRoot($root);
parent::__construct($options);
}
示例15:
function __construct($root, $root_type = ROOT_TYPE_ID)
{
$this->_table = "categories";
parent::__construct($root, $root_type);
}