These changes are relevant for application's `*Core` classes, category types, deleted content providers and taggables.
* @see \wcf\system\SingletonFactory::init()
*/
protected final function init() {
- if (empty($this->abbreviation) || $this->abbreviation == 'wcf') {
+ if (empty($this->abbreviation)) {
+ $classParts = explode('\\', get_called_class());
+ $this->abbreviation = $classParts[0];
+ }
+ else if ($this->abbreviation == 'wcf') {
throw new SystemException("Unable to determine application, abbreviation is missing");
}
* @see \wcf\system\category\ICategoryType::getApplication()
*/
public function getApplication() {
- return 'wcf';
+ $classParts = explode('\\', get_called_class());
+ return $classParts[0];
}
/**
*/
protected $maximumNestingLevel = 0;
- /**
- * @see \wcf\system\category\ICategoryType::getApplication()
- */
- public function getApplication() {
- return 'wcf';
- }
-
/**
* @see \wcf\system\category\ICategoryType::canAddCategory()
*/
--- /dev/null
+<?php
+namespace wcf\system\moderation;
+use wcf\data\object\type\AbstractObjectTypeProcessor;
+
+/**
+ * Abstract implementation of a deleted content provider.
+ *
+ * @author Matthias Schmidt
+ * @copyright 2001-2014 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage system.moderation
+ * @category Community Framework
+ */
+abstract class AbstractDeletedContentProvider extends AbstractObjectTypeProcessor implements IDeletedContentProvider {
+ /**
+ * @see \wcf\system\moderation\IDeletedContentProvider::getApplication()
+ */
+ public function getApplication() {
+ $classParts = explode('\\', get_called_class());
+ return $classParts[0];
+ }
+}
* @see \wcf\system\search\ISearchableObjectType::getApplication()
*/
public function getApplication() {
- return 'wcf';
+ $classParts = explode('\\', get_called_class());
+ return $classParts[0];
}
/**
--- /dev/null
+<?php
+namespace wcf\system\tagging;
+use wcf\data\object\type\AbstractObjectTypeProcessor;
+
+/**
+ * Abstract implementation of a taggable.
+ *
+ * @author Matthias Schmidt
+ * @copyright 2001-2014 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage system.tagging
+ * @category Community Framework
+ */
+abstract class AbstractTaggable extends AbstractObjectTypeProcessor implements ITaggable {
+ /**
+ * @see \wcf\system\tagging\ITaggable::getApplication()
+ */
+ public function getApplication() {
+ $classParts = explode('\\', get_called_class());
+ return $classParts[0];
+ }
+}