From: Alexander Ebert Date: Fri, 21 Oct 2011 16:54:49 +0000 (+0200) Subject: Disabled interface check for providers X-Git-Tag: 2.0.0_Beta_1~1670 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=19c84c59b110beeb2b5ffda50568048b3b61dd98;p=GitHub%2FWoltLab%2FWCF.git Disabled interface check for providers --- 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 e65d5d7626..e3ef46d0c0 100644 --- a/wcfsetup/install/files/lib/data/object/type/ObjectType.class.php +++ b/wcfsetup/install/files/lib/data/object/type/ObjectType.class.php @@ -34,9 +34,16 @@ class ObjectType extends ProcessibleDatabaseObject { if (!class_exists($this->className)) { throw new SystemException("Unable to find class '".$this->className."'"); } + /* + TODO: + Why should the class implement IDatabaseObjectProcessor? Given the fact, + that the default implementation IObjectTypeProvider does not decorate the + objects itself - instead it provides methods to receive the required objects. + if (!ClassUtil::isInstanceOf($this->className, 'wcf\data\IDatabaseObjectProcessor')) { throw new SystemException("'".$this->className."' should implement wcf\data\IDatabaseObjectProcessor"); } + */ if (($definitionInterface = ObjectTypeCache::getInstance()->getDefinition($this->definitionID)->interfaceName) && !ClassUtil::isInstanceOf($this->className, $definitionInterface)) { throw new SystemException("'".$this->className."' should implement ".$definitionInterface); }