Пример #1
0
 private function _launchAllPath()
 {
     \Path1\path1::_log('path1');
     \Path2\path2::_log('path2');
     \Path1\Path2\path1_2::_log('path1-2');
     \Logger\Log::getInstance()->info('current');
     \root::_log('root');
     \_log('root_func');
 }
Пример #2
0
 /**
  * Render the document tree into (nicely formatted) XML
  *
  * @param mixed $root A root XMLElement or a tagname to create one with the remaining parameters.
  * @param mixed $content Either a string of content, or an array of sub-elements
  * @param array $attributes An array of attribute name/value pairs
  * @param array $xmlns An XML namespace specifier
  *
  * @return A rendered namespaced XML document.
  */
 function Render($root, $content = false, $attributes = false, $xmlns = null)
 {
     if (is_object($root)) {
         /** They handed us a pre-existing object.  We'll just use it... */
         $this->root = $root;
     } else {
         /** We got a tag name, so we need to create the root element */
         $this->root = $this->NewXMLElement($root, $content, $attributes, $xmlns);
     }
     /**
      * Add our namespace attributes here.
      */
     foreach ($this->namespaces as $n => $p) {
         $this->root->SetAttribute('xmlns' . ($p == '' ? '' : ':') . $p, $n);
     }
     /** And render... */
     return $this->root->Render(0, '<?xml version="1.0" encoding="utf-8" ?>');
 }