From c1b216bf5134e74308ea0b522b3b4e8806065136 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 8 Dec 2014 14:36:26 +0100 Subject: [PATCH] running controller can set an error number getErrorNr() retrieves this number --- inc/inc.ClassControllerCommon.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/inc/inc.ClassControllerCommon.php b/inc/inc.ClassControllerCommon.php index b09826e32..123230832 100644 --- a/inc/inc.ClassControllerCommon.php +++ b/inc/inc.ClassControllerCommon.php @@ -17,8 +17,21 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. class SeedDMS_Controller_Common { + /** + * @var array $params list of parameters + * @access protected + */ + protected $params; + + /** + * @var integer $error error number of last run + * @access protected + */ + protected $error; + function __construct($params) { $this->params = $params; + $this->error = 0; } function setParams($params) { @@ -37,6 +50,15 @@ class SeedDMS_Controller_Common { function run() { } + /** + * Get error number of last run + * + * @return integer error number + */ + public function getErrorNo() { /* {{{ */ + return $this->error; + } /* }}} */ + /** * Call a controller hook *