Files
spa-api/laravel/controller.php

27 lines
733 B
PHP
Raw Normal View History

<?php namespace Laravel;
2011-08-31 00:07:45 -05:00
abstract class Controller extends Resolver {
/**
* A stub method that will be called before every request to the controller.
*
2011-08-31 00:07:45 -05:00
* If a value is returned by the method, it will be halt the request cycle
* and will be considered the response to the request.
*
* @return mixed
*/
2011-08-26 21:42:04 -05:00
public function before() {}
/**
* Magic Method to handle calls to undefined functions on the controller.
2011-09-03 23:46:52 -05:00
*
* By default, the 404 response will be returned for an calls to undefined
* methods on the controller. However, this method may also be overridden
* and used as a pseudo-router by the controller.
*/
2011-09-03 23:46:52 -05:00
public function __call($method, $parameters)
{
return $this->response->error('404');
}
}