/**
  * Retrieve release information for project in given core.
  *
  * @param string $name
  * @param string $core
  *
  * @return ReleaseInfo
  */
 public function getReleasesForCore($name, $core)
 {
     $core = "{$core}";
     $name = $this->drupalizeName($name);
     if (isset($this->releases[$core])) {
         if (!isset($this->releases[$core][$name])) {
             $release = new ReleaseInfo($name, $core);
             $this->releases[$core][$name] = $release->exists() ? $release : false;
         }
         return $this->releases[$core][$name];
     }
     return false;
 }
Exemplo n.º 2
0
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'svn_commit_id', 'type' => TType::STRING), 2 => array('var' => 'svn_dirty', 'type' => TType::STRING), 3 => array('var' => 'git_commit_id', 'type' => TType::STRING), 4 => array('var' => 'git_dirty', 'type' => TType::STRING), 5 => array('var' => 'git_tag', 'type' => TType::STRING), 6 => array('var' => 'build_time', 'type' => TType::STRING), 7 => array('var' => 'build_host', 'type' => TType::STRING), 8 => array('var' => 'build_user', 'type' => TType::STRING));
     }
     if (is_array($vals)) {
         parent::__construct(self::$_TSPEC, $vals);
     }
 }