| 1 | <?php |
||
| 16 | class Default_Error404SuccessView extends SampleAppDefaultBaseView |
||
| 17 | { |
||
| 18 | |||
| 19 | public function executeHtml(RequestDataHolder $rd) |
||
| 20 | { |
||
| 21 | $this->setupHtml($rd); |
||
| 22 | |||
| 23 | // set the title |
||
| 24 | $this->setAttribute('_title', $this->tm->_('404 Not Found', 'default.ErrorControllers')); |
||
| 25 | |||
| 26 | $this->container->getResponse()->setHttpStatusCode('404'); |
||
| 27 | } |
||
| 28 | |||
| 29 | public function executeXmlrpc(RequestDataHolder $rd) |
||
| 30 | { |
||
| 31 | return array( |
||
| 32 | 'faultCode' => -32601, // as per http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php |
||
| 33 | 'faultString' => 'requested method not found', |
||
| 34 | ); |
||
| 35 | } |
||
| 36 | |||
| 37 | public function executeText(RequestDataHolder $rd) |
||
| 38 | { |
||
| 39 | return |
||
| 40 | 'Usage: console.php <command> [OPTION]...' . PHP_EOL . |
||
| 41 | PHP_EOL . |
||
| 42 | 'Commands:' . PHP_EOL . |
||
| 43 | ' viewproduct <id>' . PHP_EOL . |
||
| 44 | ' Retrieves product details given a product ID.' . PHP_EOL . |
||
| 45 | ' listproducts' . PHP_EOL . |
||
| 46 | ' Lists all products in the application.' . PHP_EOL; |
||
| 47 | } |
||
| 48 | } |
||
| 49 | |||
| 50 | ?> |