/** * Add a file to the list. * * @param string $file The file name. * @param array $params Additional file parameters. * * @return NULL */ public function add($file, $params) { $this->_dir_list->addFile($file, $params); if (!in_array($file, array_keys($this->_install_list))) { $point = $this->_getInstallInsertionPoint($file); if ($point === null) { $point = $this->_filelist->lastChild; } else { if ($point->previousSibling) { $ws = trim($point->previousSibling->textContent); if (empty($ws)) { $point = $point->previousSibling; } } } $this->_install_list[$file] = $this->_xml->insert(array("\n ", 'install' => array('as' => $params['as'], 'name' => substr($file, 1))), $point); } }