mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixed some API doc in controllers and errors.
This commit is contained in:
parent
fbbfbaf870
commit
3723f7d396
6 changed files with 21 additions and 18 deletions
|
@ -97,7 +97,7 @@ class AclShell extends Shell {
|
|||
/**
|
||||
* Override main() for help message hook
|
||||
*
|
||||
* @return voids
|
||||
* @return void
|
||||
*/
|
||||
public function main() {
|
||||
$this->out($this->OptionParser->help());
|
||||
|
|
|
@ -426,7 +426,7 @@ class DbAcl extends Object implements AclInterface {
|
|||
*
|
||||
* @param string $aro ARO The requesting object identifier.
|
||||
* @param string $aco ACO The controlled object identifier.
|
||||
* @param string $actions Action (defaults to *)
|
||||
* @param string $action Action (defaults to *)
|
||||
* @return boolean Success
|
||||
* @link http://book.cakephp.org/view/1248/Assigning-Permissions
|
||||
*/
|
||||
|
@ -439,7 +439,7 @@ class DbAcl extends Object implements AclInterface {
|
|||
*
|
||||
* @param string $aro ARO The requesting object identifier.
|
||||
* @param string $aco ACO The controlled object identifier.
|
||||
* @param string $actions Action (defaults to *)
|
||||
* @param string $action Action (defaults to *)
|
||||
* @return boolean Success
|
||||
*/
|
||||
public function inherit($aro, $aco, $action = "*") {
|
||||
|
@ -451,7 +451,7 @@ class DbAcl extends Object implements AclInterface {
|
|||
*
|
||||
* @param string $aro ARO The requesting object identifier.
|
||||
* @param string $aco ACO The controlled object identifier.
|
||||
* @param string $actions Action (defaults to *)
|
||||
* @param string $action Action (defaults to *)
|
||||
* @return boolean Success
|
||||
* @see allow()
|
||||
*/
|
||||
|
@ -464,7 +464,7 @@ class DbAcl extends Object implements AclInterface {
|
|||
*
|
||||
* @param string $aro ARO The requesting object identifier.
|
||||
* @param string $aco ACO The controlled object identifier.
|
||||
* @param string $actions Action (defaults to *)
|
||||
* @param string $action Action (defaults to *)
|
||||
* @return boolean Success
|
||||
* @see deny()
|
||||
*/
|
||||
|
|
|
@ -337,9 +337,7 @@ class AuthComponent extends Component {
|
|||
* Attempts to introspect the correct values for object properties including
|
||||
* $userModel and $sessionKey.
|
||||
*
|
||||
* @param object $controller A reference to the instantiating controller object
|
||||
* @return boolean
|
||||
* @access private
|
||||
*/
|
||||
function __setDefaults() {
|
||||
$defaults = array(
|
||||
|
@ -520,9 +518,8 @@ class AuthComponent extends Component {
|
|||
* custom logout logic. AuthComponent will remove the session data, so
|
||||
* there is no need to do that in an authentication object.
|
||||
*
|
||||
* @param mixed $url Optional URL to redirect the user to after logout
|
||||
* @return string AuthComponent::$loginAction
|
||||
* @see AuthComponent::$loginAction
|
||||
* @return string AuthComponent::$logoutRedirect
|
||||
* @see AuthComponent::$logoutRedirect
|
||||
* @link http://book.cakephp.org/view/1262/logout
|
||||
*/
|
||||
public function logout() {
|
||||
|
@ -615,6 +612,7 @@ class AuthComponent extends Component {
|
|||
* by credentials contained in $request.
|
||||
*
|
||||
* @param CakeRequest $request The request that contains authentication data.
|
||||
* @param CakeResponse $response The response
|
||||
* @return array User record data, or false, if the user could not be identified.
|
||||
*/
|
||||
public function identify(CakeRequest $request, CakeResponse $response) {
|
||||
|
@ -676,7 +674,8 @@ class AuthComponent extends Component {
|
|||
/**
|
||||
* Component shutdown. If user is logged in, wipe out redirect.
|
||||
*
|
||||
* @param object $controller Instantiating controller
|
||||
* @param Controller $controller Instantiating controller
|
||||
* @return void
|
||||
*/
|
||||
public function shutdown($controller) {
|
||||
if ($this->loggedIn()) {
|
||||
|
|
|
@ -121,6 +121,7 @@ class SessionComponent extends Component {
|
|||
* @param string $element Element to wrap flash message in.
|
||||
* @param array $params Parameters to be sent to layout as view variables
|
||||
* @param string $key Message key, default is 'flash'
|
||||
* @return void
|
||||
* @link http://book.cakephp.org/view/1313/setFlash
|
||||
*/
|
||||
public function setFlash($message, $element = 'default', $params = array(), $key = 'flash') {
|
||||
|
@ -167,7 +168,7 @@ class SessionComponent extends Component {
|
|||
* If $id is passed in a beforeFilter, the Session will be started
|
||||
* with the specified id
|
||||
*
|
||||
* @param $id string
|
||||
* @param string $id
|
||||
* @return string
|
||||
*/
|
||||
public function id($id = null) {
|
||||
|
|
|
@ -285,8 +285,9 @@ class Scaffold {
|
|||
/**
|
||||
* Performs a delete on given scaffolded Model.
|
||||
*
|
||||
* @param array $params Parameters for scaffolding
|
||||
* @param CareRequest $request Request for scaffolding
|
||||
* @return mixed Success on delete, error if delete fails
|
||||
* @throws NotFoundException
|
||||
*/
|
||||
protected function _scaffoldDelete(CakeRequest $request) {
|
||||
if ($this->controller->_beforeScaffold('delete')) {
|
||||
|
|
|
@ -57,7 +57,6 @@ class ExceptionRenderer {
|
|||
* Controller instance.
|
||||
*
|
||||
* @var Controller
|
||||
* @access public
|
||||
*/
|
||||
public $controller = null;
|
||||
|
||||
|
@ -87,8 +86,7 @@ class ExceptionRenderer {
|
|||
* If the error is a CakeException it will be converted to either a 400 or a 500
|
||||
* code error depending on the code used to construct the error.
|
||||
*
|
||||
* @param string $method Method producing the error
|
||||
* @param array $messages Error messages
|
||||
* @param Exception $exception Exception
|
||||
*/
|
||||
public function __construct(Exception $exception) {
|
||||
$this->controller = $this->_getController($exception);
|
||||
|
@ -197,7 +195,8 @@ class ExceptionRenderer {
|
|||
/**
|
||||
* Convenience method to display a 400 series page.
|
||||
*
|
||||
* @param array $params Parameters for controller
|
||||
* @param Exception $error
|
||||
* @return void
|
||||
*/
|
||||
public function error400($error) {
|
||||
$message = $error->getMessage();
|
||||
|
@ -217,7 +216,8 @@ class ExceptionRenderer {
|
|||
/**
|
||||
* Convenience method to display a 500 page.
|
||||
*
|
||||
* @param array $params Parameters for controller
|
||||
* @param Exception $error
|
||||
* @return void
|
||||
*/
|
||||
public function error500($error) {
|
||||
$url = $this->controller->request->here();
|
||||
|
@ -235,6 +235,7 @@ class ExceptionRenderer {
|
|||
* Generate the response using the controller object.
|
||||
*
|
||||
* @param string $template The template to render.
|
||||
* @return void
|
||||
*/
|
||||
protected function _outputMessage($template) {
|
||||
$this->controller->render($template);
|
||||
|
@ -247,6 +248,7 @@ class ExceptionRenderer {
|
|||
* and doesn't call component methods.
|
||||
*
|
||||
* @param string $template The template to render
|
||||
* @return void
|
||||
*/
|
||||
protected function _outputMessageSafe($template) {
|
||||
$this->controller->helpers = array('Form', 'Html', 'Session');
|
||||
|
|
Loading…
Reference in a new issue