/** * Размещение пакета * * @throws Exception if one of deploy task throws an exception */ function deploy() { // распаковть в buildpad $bp = PackageManager::getBuildpadDir()->getDir($this->name . '_' . $this->version); PackageManager::getRollback()->push('delete', $bp); Packer::unpack($this->file, $bp); // Вырезать нужный кусок их Package.xml $rp = new DOMXPath($this->xml); $nodes = $rp->query('//deploy'); if ($nodes->length == 0) { return io::out('Nothing to deploy') | 0; } $tasks = $nodes->item(0)->childNodes; // создать deployer $d = new Deployer($bp); $d->setTaskList($tasks); $d->executeTasks(); // удалить директорию в билдпаде $bp->delete(); }