summaryrefslogtreecommitdiff
path: root/app/Core/Helper.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-07-05 12:23:00 -0400
committerFrederic Guillot <fred@kanboard.net>2015-07-05 12:23:00 -0400
commit4438e03c62962ecf6265eddcb3d2c6e761638cda (patch)
tree426da61f5b1721397b56548f13d429c21b3b8976 /app/Core/Helper.php
parent45774afafcae850ecf71ea90b426fffc2c6f0628 (diff)
Set the assignee as organizer for ical events
Diffstat (limited to 'app/Core/Helper.php')
-rw-r--r--app/Core/Helper.php32
1 files changed, 26 insertions, 6 deletions
diff --git a/app/Core/Helper.php b/app/Core/Helper.php
index 53084a7e..e4f225b0 100644
--- a/app/Core/Helper.php
+++ b/app/Core/Helper.php
@@ -2,6 +2,8 @@
namespace Core;
+use Pimple\Container;
+
/**
* Helper base class
*
@@ -19,16 +21,34 @@ namespace Core;
* @property \Helper\Url $url
* @property \Helper\User $user
*/
-class Helper extends Base
+class Helper
{
/**
* Helper instances
*
- * @static
* @access private
* @var array
*/
- private static $helpers = array();
+ private $helpers = array();
+
+ /**
+ * Container instance
+ *
+ * @access protected
+ * @var \Pimple\Container
+ */
+ protected $container;
+
+ /**
+ * Constructor
+ *
+ * @access public
+ * @param \Pimple\Container $container
+ */
+ public function __construct(Container $container)
+ {
+ $this->container = $container;
+ }
/**
* Load automatically helpers
@@ -39,12 +59,12 @@ class Helper extends Base
*/
public function __get($name)
{
- if (! isset(self::$helpers[$name])) {
+ if (! isset($this->helpers[$name])) {
$class = '\Helper\\'.ucfirst($name);
- self::$helpers[$name] = new $class($this->container);
+ $this->helpers[$name] = new $class($this->container);
}
- return self::$helpers[$name];
+ return $this->helpers[$name];
}
/**