예제 #1
0
파일: Facade.php 프로젝트: sunnyct/cronario
 /**
  * @param Producer $producer
  *
  * @throws Exception\FacadeException
  */
 public static function addProducer(Producer $producer)
 {
     $appId = $producer->getAppId();
     if (array_key_exists($appId, static::$producers)) {
         throw new Exception\FacadeException("Producer with {$appId} already exists!");
     }
     static::$producers[$appId] = $producer;
 }