本文整理汇总了PHP中ApplicationException::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP ApplicationException::__construct方法的具体用法?PHP ApplicationException::__construct怎么用?PHP ApplicationException::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ApplicationException
的用法示例。
在下文中一共展示了ApplicationException::__construct方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($errors = null, $message = null, $ApplicationExceptionType = null)
{
parent::__construct();
$this->errors = $errors;
$this->message = $message;
$this->ApplicationExceptionType = $ApplicationExceptionType;
}
示例2: trim
function __construct ($message, $code = E_USER_WARNING)
{
$message = trim($message, ".");
$message = "Registry error: {$message}";
$message = trim($message, ".");
parent::__construct($message, $code);
}
示例3: __construct
public function __construct()
{
$message = 'Unexpected case';
$backtrace = debug_backtrace(0, 2);
if (isset($backtrace[1]['class'])) {
$message .= ' in ' . $backtrace[1]['class'] . '::' . $backtrace[1]['function'];
}
parent::__construct($message);
}
示例4: __construct
public function __construct(Controller $controller, $statusCode, $message = false)
{
$this->controller = $controller;
$this->statusCode = $statusCode;
if (!$message) {
$action = $this->getController()->getRequest()->getControllerName() . '/' . $this->getController()->getRequest()->getActionName();
$code = $this->getStatusCode() . ' (' . self::getCodeMeaning($this->getStatusCode()) . ')';
$message = "Error accessing {$action}.\n {$code}";
}
parent::__construct($message);
}
示例5: __construct
public function __construct($errors = null, $message = null)
{
parent::__construct();
$this->errors = $errors;
$this->message = $message;
}
示例6: __construct
public function __construct($errors = NULL, $message = NULL, $ApplicationExceptionType = NULL)
{
if (get_parent_class('ApiException')) {
parent::__construct();
}
$this->errors = $errors;
$this->message = $message;
$this->ApplicationExceptionType = $ApplicationExceptionType;
}
示例7:
/**
* @param string $argumentName
* @param string $message
*/
function __construct($argumentName, $message)
{
Assert::isScalar($argumentName);
parent::__construct($message);
$this->argumentName = $argumentName;
}
示例8:
function __construct($message, $code = null)
{
// Call ApplicationException constructor
parent::__construct("Licensing error: {$message}");
}
示例9: trim
function __construct ($message, $code = null)
{
$message = trim($message, ".");
$message = "{$message}. Please consult API documentation.";
parent::__construct($message, $code);
}
示例10: __construct
/**
* @param \yii\base\Model $model
*/
public function __construct($model)
{
$this->errors = $model->errors;
parent::__construct('Cannot save model ' . $model->className() . ', errors: ' . print_r($this->errors, true));
}
示例11: __construct
/**
* @inheritdoc
*/
public function __construct()
{
parent::__construct('The occurred code block is not implemented and a placeholder error is currently put in place.');
}
示例12: __construct
/**
* @param string $controller Controllers name
*/
public function __construct($controllerName)
{
parent::__construct("Specified controller ({$controllerName}) does not exist");
$this->controllerName = $controllerName;
}