summaryrefslogtreecommitdiff
path: root/ext/spl/spl.php
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2004-11-01 16:31:19 +0000
committerMarcus Boerger <helly@php.net>2004-11-01 16:31:19 +0000
commit638b0515b3c40bc9ca3952ba07347f57db50a608 (patch)
tree86675d1a895cf100fb65405e87ff635d65baea3b /ext/spl/spl.php
parentfe1909b5919769c4805f8aacc3785f5b7a2a0dba (diff)
downloadphp-git-638b0515b3c40bc9ca3952ba07347f57db50a608.tar.gz
- Update docu
Diffstat (limited to 'ext/spl/spl.php')
-rwxr-xr-xext/spl/spl.php56
1 files changed, 44 insertions, 12 deletions
diff --git a/ext/spl/spl.php b/ext/spl/spl.php
index f3c0ba3047..7afc68170e 100755
--- a/ext/spl/spl.php
+++ b/ext/spl/spl.php
@@ -69,39 +69,71 @@ class Exception
/** Prevent clone
*/
- final private function __clone();
+ final private function __clone() {}
- /**
- */
- public function __construct($message, $code);
+ /** Construct an exception
+ *
+ * @param $message Some text describing the exception
+ * @param $code Some code describing the exception
+ */
+ function __construct($message = NULL, $code = 0) {
+ if (func_num_args()) {
+ $this->message = $message;
+ }
+ $this->code = $code;
+ $this->file = __FILE__; // of throw clause
+ $this->line = __LINE__; // of throw clause
+ $this->trace = debug_backtrace();
+ $this->string = StringFormat($this);
+ }
/** @return the message passed to the constructor
*/
- final public function getMessage();
+ final public function getMessage()
+ {
+ return $this->message;
+ }
/** @return the code passed to the constructor
*/
- final public function getCode();
+ final public function getCode()
+ {
+ return $this->code;
+ }
/** @return the name of the file where the exception was thrown
*/
- final public function getFile();
+ final public function getFile()
+ {
+ return $this->file;
+ }
/** @return the line number where the exception was thrown
*/
- final public function getLine();
+ final public function getLine()
+ {
+ return $this->line;
+ }
/** @return the stack trace as array
*/
- final public function getTrace();
+ final public function getTrace()
+ {
+ return $this->trace;
+ }
/** @return the stack trace as string
*/
- final public function getTraceAsString();
+ final public function getTraceAsString()
+ {
+ }
/** @return string represenation of exception
*/
- public function __toString();
+ public function __toString()
+ {
+ return $this->string;
+ }
}
/** @ingroup SPL
@@ -165,7 +197,7 @@ class RuntimeException extends Exception
*
* @see OutOfRangeException
*/
-class OutOfBoundsException extends LogicException
+class OutOfBoundsException extends RuntimeException
{
}