示例#1
0
 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
0
 /**
  * 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);
 }
 /**
  * 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
0
 /**
  * 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
0
 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);
 }
 /**
  * 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
0
 /**
  * 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
0
 /**
  * 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
0
 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
0
 /**
  * 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);
 }
 /**
  * Constructor.
  *
  */
 public function __construct()
 {
     parent::__construct('wddxPacket');
     $this->root()->setAttribute('version', '1.0');
 }
示例#12
0
 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
0
 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
0
 /**
  * Constructor
  *
  * @param string $root
  * @param array $options
  */
 public function __construct($root, array $options = array())
 {
     $this->setRoot($root);
     parent::__construct($options);
 }
示例#15
0
 function __construct($root, $root_type = ROOT_TYPE_ID)
 {
     $this->_table = "categories";
     parent::__construct($root, $root_type);
 }
 /**
  * Constructor
  *
  * @param   string rootName default 'document'
  */
 public function __construct($rootName = 'document')
 {
     parent::__construct($rootName);
     $this->nodeType = xp::reflect('xml.soap.xp.XPSoapNode');
 }