lithium\console\command\g11n\Extract::run PHP Method

run() public method

The main method of the command.
public run ( ) : void
return void
    public function run()
    {
        $this->header('Message Extraction');
        if (!($data = $this->_extract())) {
            $this->error('Yielded no items.');
            return 1;
        }
        $count = count($data);
        $this->out("Yielded {$count} item(s).");
        $this->out();
        $this->header('Message Template Creation');
        if (!$this->_writeTemplate($data)) {
            $this->error('Failed to write template.');
            return 1;
        }
        $this->out();
        return 0;
    }

Usage Example

Example #1
0
 /**
  * Runs the `Extract` command.
  *
  * @return void
  */
 public function extract()
 {
     $extract = new Extract(array('request' => $this->request));
     return $extract->run();
 }