From ca71e1fde3c4dff6994ef95824e24ef4cef110e1 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 24 Feb 2012 23:54:18 +0100 Subject: [PATCH] ObjectType::getProcessor() now supports SingletonFactory --- .../files/lib/data/object/type/ObjectType.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/data/object/type/ObjectType.class.php b/wcfsetup/install/files/lib/data/object/type/ObjectType.class.php index e4042c0b0f..61cbb78969 100644 --- a/wcfsetup/install/files/lib/data/object/type/ObjectType.class.php +++ b/wcfsetup/install/files/lib/data/object/type/ObjectType.class.php @@ -64,7 +64,12 @@ class ObjectType extends ProcessibleDatabaseObject { throw new SystemException("'".$this->className."' should implement ".$definitionInterface); } - $this->processor = new $this->className($this); + if (ClassUtil::isInstanceOf($this->className, 'wcf\system\SingletonFactory')) { + $this->processor = call_user_func(array($this->className, 'getInstance')); + } + else { + $this->processor = new $this->className($this); + } } } -- 2.20.1