/**
  * clear
  *
  * @param AbstractSeeder|string $seeder
  *
  * @return  static
  */
 public function clear($seeder = null)
 {
     if ($seeder === null) {
         return $this;
     }
     if (is_string($seeder)) {
         $ref = new \ReflectionClass($this);
         include_once dirname($ref->getFileName()) . '/' . $seeder . '.php';
         $seeder = new $seeder();
     }
     $seeder->setDb($this->db);
     $seeder->setCommand($this->command);
     $this->command->out('Clear seeder ' . get_class($seeder));
     $seeder->doClear();
     return $this;
 }
 /**
  * Test the out method.
  *
  * @return void
  *
  * @since  2.0
  *
  * @covers Windwalker\Console\Command\AbstractCommand::out
  */
 public function testOut()
 {
     $this->instance->getIO()->getOutput()->outpur = '';
     $this->instance->out('gogo', false);
     $this->assertEquals('gogo', $this->instance->getIO()->getTestOutput());
 }
Example #3
0
 /**
  * Write a string to standard output.
  *
  * @param   string   $text  The text to display.
  * @param   boolean  $nl    True (default) to append a new line at the end of the output string.
  *
  * @return  Command  Instance of $this to allow chaining.
  */
 public function out($text = '', $nl = true)
 {
     $this->command->out($text, $nl);
     return $this;
 }
Example #4
0
 /**
  * out
  *
  * @param string $msg
  *
  * @return  $this
  */
 public function out($msg = '')
 {
     $this->command->out($msg);
     return $this;
 }