This repository has been archived by the owner on Jan 31, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed old test files for Zend/Cloud/Infrastructure
- Loading branch information
50 parents
4c554ee
+
dbfb1b8
+
ccab83f
+
00b350f
+
78945d0
+
f0e5f4b
+
ceb7d8c
+
9e124d1
+
3de5912
+
b6a974a
+
10a6438
+
cb6c1e7
+
18afd6c
+
3baf1bd
+
c800904
+
f52dcb8
+
126ccb2
+
e7d6206
+
e2d24ab
+
ec1abfc
+
290ea90
+
9f4ca1b
+
edaa760
+
c4c0c95
+
d21f055
+
5b18029
+
e6b97af
+
010fb36
+
64c7b8d
+
636523e
+
4cc2cd6
+
e34098a
+
16367cd
+
943c77f
+
8226e5b
+
0b47726
+
3cd8a03
+
cc4782c
+
9c653a6
+
656dbe5
+
9bce1ba
+
7dc18ca
+
861130d
+
2d2ffbd
+
4f413a5
+
ede838c
+
030ff33
+
f2f20f3
+
a50e133
+
2e1067a
commit 1d082e4
Showing
18 changed files
with
273 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
<?php | ||
/** | ||
* Zend Framework | ||
* | ||
* LICENSE | ||
* | ||
* This source file is subject to the new BSD license that is bundled | ||
* with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://framework.zend.com/license/new-bsd | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to license@zend.com so we can send you a copy immediately. | ||
* | ||
* @category Zend | ||
* @package Zend_Stdlib | ||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
|
||
namespace Zend\Stdlib; | ||
|
||
use ErrorException; | ||
|
||
/** | ||
* ErrorHandler that can be used to catch internal PHP errors | ||
* and convert to a ErrorException instance. | ||
* | ||
* @category Zend | ||
* @package Zend_Stdlib | ||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
abstract class ErrorHandler | ||
{ | ||
/** | ||
* Flag to mark started | ||
* | ||
* @var boolean | ||
*/ | ||
protected static $started = false; | ||
|
||
/** | ||
* All errors as one instance of ErrorException | ||
* using the previous exception support. | ||
* | ||
* @var null|ErrorException | ||
*/ | ||
protected static $errorException = null; | ||
|
||
/** | ||
* If the error handler has been started. | ||
* | ||
* @return boolean | ||
*/ | ||
public static function started() | ||
{ | ||
return static::$started; | ||
} | ||
|
||
/** | ||
* Starting the error handler | ||
* | ||
* @param int $errorLevel | ||
* @throws Exception\LogicException If already started | ||
*/ | ||
public static function start($errorLevel = \E_WARNING) | ||
{ | ||
if (static::started() === true) { | ||
throw new Exception\LogicException('ErrorHandler already started'); | ||
} | ||
|
||
static::$started = true; | ||
static::$errorException = null; | ||
|
||
set_error_handler(array(get_called_class(), 'addError'), $errorLevel); | ||
} | ||
|
||
/** | ||
* Stopping the error handler | ||
* | ||
* @param boolean $throw Throw the ErrorException if any | ||
* @return null|ErrorException | ||
* @throws Exception\LogicException If not started before | ||
* @throws ErrorException If an error has been catched and $throw is true | ||
*/ | ||
public static function stop($throw = false) | ||
{ | ||
if (static::started() === false) { | ||
throw new Exception\LogicException('ErrorHandler not started'); | ||
} | ||
|
||
$errorException = static::$errorException; | ||
|
||
static::$started = false; | ||
static::$errorException = null; | ||
restore_error_handler(); | ||
|
||
if ($errorException && $throw) { | ||
throw $errorException; | ||
} | ||
|
||
return $errorException; | ||
} | ||
|
||
/** | ||
* Add an error to the stack. | ||
* | ||
* @param int $errno | ||
* @param string $errstr | ||
* @param string $errfile | ||
* @param int $errline | ||
* @return void | ||
*/ | ||
public static function addError($errno, $errstr = '', $errfile = '', $errline = 0) | ||
{ | ||
static::$errorException = new ErrorException($errstr, 0, $errno, $errfile, $errline, static::$errorException); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
/** | ||
* Zend Framework | ||
* | ||
* LICENSE | ||
* | ||
* This source file is subject to the new BSD license that is bundled | ||
* with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://framework.zend.com/license/new-bsd | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to license@zend.com so we can send you a copy immediately. | ||
* | ||
* @category Zend | ||
* @package Zend_Stdlib | ||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
|
||
/** | ||
* @namespace | ||
*/ | ||
namespace Zend\Stdlib\Exception; | ||
|
||
use Zend\Stdlib\Exception; | ||
|
||
/** | ||
* logic exception | ||
* | ||
* @category Zend | ||
* @package Zend_Stdlib | ||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
class LogicException extends \LogicException implements Exception | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.