Example #1
0
 /**
  *
  * @return Zupal_People
  */
 public static function getInstance()
 {
     if (is_null(self::$_Instance)) {
         // process
         self::$_Instance = new self();
     }
     return self::$_Instance;
 }
Example #2
0
 /**
  *
  * @param string $pMB_ID
  * @return Zupal_Media_Artists
  */
 public function find_mb($pMB_ID)
 {
     $artist = $this->findOne(array('mb_id' => $pMB_ID));
     if (!$artist) {
         $mb_artist = Zupal_Media_Musicbrains_Artists::getInstance()->get($pMB_ID);
         if ($mb_artist) {
             $artist = new self();
             $artist->copy_mb($pMB_ID);
         }
     }
     return $artist;
 }
 /**
  * @return <type>
  */
 public function findvalidateAction()
 {
     $this->view->artists = Zupal_Media_Musicbrains_Artists::search($this->_getParam('find'));
 }
Example #4
0
 function target($pReload = FALSE)
 {
     if ($pReload || is_null($this->_target)) {
         switch (strtolower($this->target_type)) {
             case 'artist':
                 $value = Zupal_Media_Musicbrains_Artists::getInstance()->get($this->target);
                 break;
             case 'release':
                 $value = Zupal_Media_Musicbrains_Releases::getInstance()->get($this->target);
                 break;
             default:
                 $value = NULL;
         }
         // process
         $this->_target = $value;
     }
     return $this->_target;
 }