/** * */ public function visit(PEAR_PackageProjector_Package $package) { $handler = PEAR_PackageProjector::singleton()->getMessageHandler(); $mssg = preg_replace("/\\s/", " ", substr($this->summary, 0, 50)); $handler->buildMessage(5, "Setting summary... {$mssg}..", true); $package->setSummary($this->summary); }
/** * */ public function visit(PEAR_PackageProjector_Package $package) { $handler = PEAR_PackageProjector::singleton()->getMessageHandler(); $handler->buildMessage(5, "Setting license name... {$this->name}", true); $handler->buildMessage(5, "Setting license uri... {$this->uri}", true); $package->setLicense($this->name, $this->uri); }
/** * */ public function visit(PEAR_PackageProjector_Package $package) { $handler = PEAR_PackageProjector::singleton()->getMessageHandler(); $handler->buildMessage(5, "Setting API version... {$this->version}", true); $handler->buildMessage(5, "Setting API stability... {$this->stability}", true); $package->setAPIVersion($this->version); $package->setAPIStability($this->stability); }
/** * */ public function visit(PEAR_PackageProjector_Package $package) { $handler = PEAR_PackageProjector::singleton()->getMessageHandler(); $handler->buildMessage(5, "Add install group " . strtolower($this->name) . "...", true); // $postInstall = $package->getPostinstaller(); $params = array(); foreach ($this->params as $num => $param) { $params[] = $param->getArray($postInstall); } $package->addPostInstallGroup($this->name); $postInstall->addParamGroup($this->name, $params, $this->instructions); }
/** * */ public function visit(PEAR_PackageProjector_Package $package) { $handler = PEAR_PackageProjector::singleton()->getMessageHandler(); $handler->buildMessage(5, "Setting minimum version of PEAR Installer... {$this->min}", true); $package->setPearinstallerDep($this->min); }
/** * */ public function visit(PEAR_PackageProjector_Package $package) { $handler = PEAR_PackageProjector::singleton()->getMessageHandler(); $handler->buildMessage(5, "Add role... {$this->extension} => {$this->role}", true); $package->addRole($this->extension, $this->role); }
/** * */ public function visit(PEAR_PackageProjector_Package $package) { $handler = PEAR_PackageProjector::singleton()->getMessageHandler(); $handler->buildMessage(5, "Setting channel... {$this->channel}", true); $package->setChannel($this->channel); }
/** * */ public function visit(PEAR_PackageProjector_Package $package) { $handler = PEAR_PackageProjector::singleton()->getMessageHandler(); $handler->buildMessage(5, "Add " . strtolower($this->type) . " dependency package ... {$this->channel}/{$this->name}", true); $package->addPackageDepWithChannel($this->type, $this->name, $this->channel, $this->min, $this->max, $this->recommended, $this->exclude, $this->providesextension, $this->nodefault); }
/** * */ public function visit(PEAR_PackageProjector_Package $package) { $package->setPackageOption('packagedirectory', $this->getName()); }
/** * */ public function visit(PEAR_PackageProjector_Package $package) { foreach ($this->roles as $num => $value) { $package->accept($value); } }
/** * */ public function visit(PEAR_PackageProjector_Package $package) { $handler = PEAR_PackageProjector::singleton()->getMessageHandler(); // $dir = $package->getPackageDirectory(); $fullpath = realpath($dir . '/' . $this->path); // if (true === $this->_getAttr('ignore')) { $handler->buildMessage(5, "Add attribute 'ignore' of [{$this->path}]... yes", true); if (is_dir($fullpath)) { $package->addIgnore($fullpath . DIRECTORY_SEPARATOR . '*'); } else { $package->addIgnore($fullpath); } } // $role = $this->_getAttr('role'); if (!is_null($role)) { $handler->buildMessage(5, "Add attribute 'role' of [{$this->path}]... {$role}", true); if (is_dir($fullpath)) { $package->addDirectoryRole($this->path, $role); } else { $package->addExceptions($this->path, $role); } } // $platform = $this->_getAttr('platform'); if (!is_null($platform)) { $handler->buildMessage(5, "Add attribute 'platform' of [{$this->path}]... {$platform}", true); $package->addPlatformExceptions($this->path, $platform); } // $install = $this->_getAttr('install'); if (!is_null($install)) { $handler->buildMessage(5, "Add attribute 'install' of [{$this->path}]... {$install}", true); $package->addInstallAs($this->path, $install); $package->addInstallExceptions($this->path, '/'); } // $replace = $this->_getAttr('replace'); if (is_array($replace)) { foreach ($replace as $type => $value) { foreach ($value as $from => $to) { $handler->buildMessage(5, "Add attribute 'replace' of [{$this->path}]... {$from} => {$type}::{$to}", true); $package->addReplacement($this->path, $type, $from, $to); } } } }
/** * */ public function visit(PEAR_PackageProjector_Package $package) { $handler = PEAR_PackageProjector::singleton()->getMessageHandler(); $handler->buildMessage(5, "Add " . strtolower($this->role) . " maintainer... *{$this->handle}* {$this->name}<{$this->email}>", true); $package->addMaintainer($this->role, $this->handle, $this->name, $this->email); }
/** * */ public function visit(PEAR_PackageProjector_Package $package) { $handler = PEAR_PackageProjector::singleton()->getMessageHandler(); $handler->buildMessage(5, "Setting package type... {$this->type}", true); $package->setPackageType($this->type); }
/** * */ private function _buildProject() { // if (!$this->ProjectDirectory->loadSetting($this->ProjectInfo, 0)) { return; } $package = new PEAR_PackageProjector_Package(); $oldcwd = getcwd(); $handler = PEAR_PackageProjector::singleton()->getMessageHandler(); // try { chdir($this->ProjectDirectory->getSrcPath()); /* * Create package2.xml */ $handler->buildMessage(5, "*** Create package2.xml ***", true); // $package->accept($this->ProjectDirectory->getPackageDirectory()); $package->accept($this->ProjectInfo); $package->build(); $handler->buildMessage(5, "", true); /* * Create Tgz */ $handler->buildMessage(5, "*** Create Tgz File ***", true); // chdir($this->ProjectDirectory->getRelasePath()); $pkg = new PEAR_PackageProjector_Packager(); $pkg->setMessageHandler($handler); $pkg->package($this->ProjectDirectory->getPackageFile()); $handler->buildMessage(5, "", true); } catch (Exception $e) { chdir($oldcwd); $handler->buildMessage(5, "\n*** Stop for the exception was generated. ***", true); throw $e; } $handler->buildMessage(5, "*** Finish ***", true); // chdir($oldcwd); // return true; }
/** * */ public function visit(PEAR_PackageProjector_Package $package) { // foreach ($this->items as $key => $item) { $package->accept($item); } // $package->accept($this->Roles); $package->accept($this->Maintainers); $package->accept($this->AttributeManager); $package->accept($this->Dependencies); $package->accept($this->InstallGroups); }
/** * */ public function visit(PEAR_PackageProjector_Package $package) { $handler = PEAR_PackageProjector::singleton()->getMessageHandler(); $handler->buildMessage(5, "Setting base install directory... {$this->dir}", true); $package->setPackageOption('baseinstalldir', $this->dir); }