继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

ValidationException.php

偶然的你
关注TA
已关注
手记 71
粉丝 9
获赞 48


<?php namespace Illuminate\Validation; use Exception;

// more namespaceclass ValidationException extends Exception{    

/**     

* The validator instance.     

*     

* @var \Illuminate\Validation\Validator     

*/    

public $validator;//The validator instance.     

/**     

* The recommended response to send to the client.     

*     

* @var \Illuminate\Http\Response|null     

*/    

public $response;

// The recommended response to send to the client     

/**     

* Create a new exception instance.     

*     

* @param  \Illuminate\Validation\Validator  $validator     

* @param  \Illuminate\Http\Response  $response     

* @return void     

*/    

public function __construct($validator$response = null)    

{        

parent::__construct('The given data failed to pass validation.');         

$this->response = $response;        

$this->validator = $validator;    

}

// parent::   

// use parent __construct     

/**     

* Get the underlying response instance.    

*     

* @return \Symfony\Component\HttpFoundation\Response     

*/    

public function getResponse()    

{        

return $this->response;    

}

// i like or hate get}


打开App,阅读手记
0人推荐
发表评论
随时随地看视频慕课网APP