/**
  * Create and return the Task object using the information collected
  * until the call to #build()# was made.
  *
  * NOTE: This method uses the newly added TaskFactory class to
  * defer the decision of which class we want to instantiate.
  *
  * @return Officine\Amaka\Task
  */
 public function build()
 {
     if (null === $this->task) {
         $this->task = TaskFactory::factory($this->name);
     }
     return $this->task;
 }
Example #2
0
 /**
  * Rely only on class autoloading
  * Use a Task ClassNameResolver/Loader?
  *
  * @test
  */
 public function should()
 {
     TaskFactory::factory(':foo');
 }