/
PrivateActionException.php
44 lines (39 loc) · 1.17 KB
/
PrivateActionException.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/**
* PrivateActionException class
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://book.cakephp.org/2.0/en/development/testing.html
* @since 3.0.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
namespace Cake\Controller\Error;
use Cake\Error\Exception;
/**
* Private Action exception - used when a controller action
* starts with a `_`.
*/
class PrivateActionException extends Exception {
/**
* Message template.
*
* @var string
*/
protected $_messageTemplate = 'Private Action %s::%s() is not directly accessible.';
/**
* Constructor
*
* @param string $message Excception message
* @param int $code Exception code
* @param Exception $previous Previous exception
*/
public function __construct($message, $code = 404, Exception $previous = null) {
parent::__construct($message, $code, $previous);
}
}