예제 #1
0
파일: BuildEvent.php 프로젝트: hunde/bsc
 /**
  * Construct a BuildEvent for a project, task or target source event
  *
  * @param  object  project the project that emitted the event.
  */
 public function __construct($source)
 {
     parent::__construct($source);
     if ($source instanceof Project) {
         $this->project = $source;
         $this->target = null;
         $this->task = null;
     } elseif ($source instanceof Target) {
         $this->project = $source->getProject();
         $this->target = $source;
         $this->task = null;
     } elseif ($source instanceof Task) {
         $this->project = $source->getProject();
         $this->target = $source->getOwningTarget();
         $this->task = $source;
     } else {
         throw new Exception("Can not construct BuildEvent, unknown source given.");
     }
 }
예제 #2
0
 public function __construct($user, $relatedSource = null)
 {
     parent::__construct($user, $relatedSource);
     $this->skel = null;
 }
예제 #3
0
 public function __construct($source, $relatedSource = null, $changes = null)
 {
     parent::__construct($source, $relatedSource);
     $this->changes = $changes;
 }
예제 #4
0
 public function __construct($source, $relatedSource = null)
 {
     parent::__construct($source, $relatedSource);
 }