コード例 #1
0
 /**
  * Register a pipeline in the global pipeline collector.
  * 
  * @param Pipeline $pipeline the pipeline to be registered
  *
  * @throws PipelineException a pipeline with the same name already eexists
  */
 public static function registerPipeline(Pipeline &$pipeline)
 {
     //register the current pipeline only if a pipeline with the same name doesn't exists
     if (self::checkPipelineByName($pipeline->getName())) {
         throw new PipelineException('A pipeline with the same name already exists', 0);
     }
     self::$pipelines[] =& $pipeline;
 }