예제 #1
0
파일: Contents.php 프로젝트: horde/horde
 /**
  * Constructor.
  *
  * @param Horde_Pear_Package_Xml $xml      The package.xml handler
  *                                         to operate on.
  * @param DOMNode                $contents The root node for the
  *                                         "contents" listing.
  * @param DOMNode                $filelist The root node for the
  *                                         "filelist" listing.
  */
 public function __construct(Horde_Pear_Package_Xml $xml, DOMNode $contents, DOMNode $filelist)
 {
     $this->_xml = $xml;
     $this->_filelist = $filelist;
     $element = $this->_xml->createElementDirectory('/');
     $element->setDocument($this->_xml);
     $element->setDirectoryNode($contents);
     $this->_dir_list = $this->_xml->createDirectory($element, $this->_xml);
     $this->_populateFileList();
 }
예제 #2
0
파일: Directory.php 프로젝트: Gomez/horde
 /**
  * Insert a new directory entry into the XML at the given point with the
  * specified name
  *
  * @param string  $name   The name.
  * @param DOMNode $point  Insertion point.
  *
  * @return Horde_Pear_Package_Xml_Element_Directory The inserted element.
  */
 public function insertSubDirectory($name, DOMNode $point = null)
 {
     $element = $this->_xml->createElementDirectory($name, $this);
     $element->_insert($this, $point);
     return $element;
 }