insertFile() public method

Insert a new file entry into the XML at the given point with the specified name and file role.
public insertFile ( string $name, string $role, DOMNode $point = null ) : Horde_Pear_Package_Xml_Element_File
$name string The name.
$role string The role.
$point DOMNode Insertion point.
return Horde_Pear_Package_Xml_Element_File The inserted element.
Beispiel #1
0
 /**
  * Add a file to the list.
  *
  * @param string $file   The file name.
  * @param array  $params Additional file parameters.
  *
  * @return NULL
  */
 private function _addFile($file, $params)
 {
     $this->_files[basename($file)] = $this->_element->insertFile(basename($file), $params['role'], $this->_getFileInsertionPoint(basename($file)));
 }