fix calendar css, take 2. (#213)
[openemr.git] / interface / modules / zend_modules / library / Zend / Cache / Storage / ExceptionEvent.php
blob1882c6ad0f5cdc813521cbeb77f6eccc00900ceb
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
8 */
10 namespace Zend\Cache\Storage;
12 use ArrayObject;
13 use Exception;
15 class ExceptionEvent extends PostEvent
17 /**
18 * The exception to be thrown
20 * @var Exception
22 protected $exception;
24 /**
25 * Throw the exception or use the result
27 * @var bool
29 protected $throwException = true;
31 /**
32 * Constructor
34 * Accept a target and its parameters.
36 * @param string $name
37 * @param StorageInterface $storage
38 * @param ArrayObject $params
39 * @param mixed $result
40 * @param Exception $exception
42 public function __construct($name, StorageInterface $storage, ArrayObject $params, & $result, Exception $exception)
44 parent::__construct($name, $storage, $params, $result);
45 $this->setException($exception);
48 /**
49 * Set the exception to be thrown
51 * @param Exception $exception
52 * @return ExceptionEvent
54 public function setException(Exception $exception)
56 $this->exception = $exception;
57 return $this;
60 /**
61 * Get the exception to be thrown
63 * @return Exception
65 public function getException()
67 return $this->exception;
70 /**
71 * Throw the exception or use the result
73 * @param bool $flag
74 * @return ExceptionEvent
76 public function setThrowException($flag)
78 $this->throwException = (bool) $flag;
79 return $this;
82 /**
83 * Throw the exception or use the result
85 * @return bool
87 public function getThrowException()
89 return $this->throwException;