Пример #1
0
 /**
  * Loads the release fo the passed package and version.
  *
  * @param Faett_Manager_Model_Release $release The release to load
  * @param Faett_Manager_Model_Package $package
  * 		The package to load the release for
  * @param string $version The version to load the release for
  */
 public function loadByPackageAndVersion(Faett_Manager_Model_Release $release, Faett_Manager_Model_Package $package, $version)
 {
     // initialize the SQL for loading the package by its name
     $select = $this->_getReadAdapter()->select()->from($this->getTable('manager/release'), array($this->getIdFieldName()))->where('package_id_fk=:packageIdFk')->where('version=:version');
     // try to load the release by its package and version
     if ($id = $this->_getReadAdapter()->fetchOne($select, array('packageIdFk' => $package->getId(), 'version' => $version))) {
         // use the found data to initialize the instance
         $this->load($release, $id);
     }
 }
Пример #2
0
 /**
  * Load channel for the passed package.
  *
  * @param Faett_Manager_Model_Package $package
  * 		The package to load the channel for
  * @return Faett_Manager_Model_Channel
  * 		The channel itself
  */
 public function loadByPackage(Faett_Manager_Model_Package $package)
 {
     $this->load($package->getChannelIdFk());
     return $this;
 }
Пример #3
0
 /**
  * Returns the channel of the passed package as
  * string, formatted for package installation.
  *
  * @param Faett_Manager_Model_Package $package
  * 		The package to return the formatted channel for
  * @param string $schema The schema to prepend the channel string with
  * @return string The formatted channel
  */
 public function getChannelAsString(Faett_Manager_Model_Package $package, $schema = 'channel://')
 {
     // concatenate the and return the channel
     return $schema . $package->getChannel()->getUrl() . '/' . $package->getName();
 }
Пример #4
0
 /**
  * (non-PHPdoc)
  * @see lib/TechDivision/Licenceclient/Package/Interfaces/Faett_Manager_Package_Interfaces_Information#getSerialz()
  */
 public function getSerialz()
 {
     return $this->_package->getSerialz();
 }