out('This is the main method called from SampleShell'); } /** * derp method * * @return void */ public function derp() { $this->out('This is the example method called from TestPlugin.SampleShell'); } public function withAbort() { $this->abort('Bad things'); } public function returnValue() { return 99; } /** * Bridge of Death question * * @return void */ public function bridge() { $name = $this->in('What is your name'); if ($name !== 'cake') { $this->err('No!'); $this->_stop(Shell::CODE_ERROR); } $color = $this->in('What is your favorite color?'); if ($color !== 'blue') { $this->err('Wrong! Aaaahh'); $this->_stop(Shell::CODE_ERROR); } $this->out('You may pass.'); } }