From 48e9c14ebded89d858c8be0333f77f77a81b0877 Mon Sep 17 00:00:00 2001 From: thomascube Date: Sat, 31 Mar 2012 12:25:48 +0000 Subject: Move plugins repository into roundcubemail root folder; svn:externals are not defined anymore --- plugins/enigma/lib/enigma_error.php | 62 +++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 plugins/enigma/lib/enigma_error.php (limited to 'plugins/enigma/lib/enigma_error.php') diff --git a/plugins/enigma/lib/enigma_error.php b/plugins/enigma/lib/enigma_error.php new file mode 100644 index 000000000..9f424dc2b --- /dev/null +++ b/plugins/enigma/lib/enigma_error.php @@ -0,0 +1,62 @@ + | + +-------------------------------------------------------------------------+ +*/ + +class enigma_error +{ + private $code; + private $message; + private $data = array(); + + // error codes + const E_OK = 0; + const E_INTERNAL = 1; + const E_NODATA = 2; + const E_KEYNOTFOUND = 3; + const E_DELKEY = 4; + const E_BADPASS = 5; + + function __construct($code = null, $message = '', $data = array()) + { + $this->code = $code; + $this->message = $message; + $this->data = $data; + } + + function getCode() + { + return $this->code; + } + + function getMessage() + { + return $this->message; + } + + function getData($name) + { + if ($name) + return $this->data[$name]; + else + return $this->data; + } +} -- cgit v1.2.3