<?php
namespace wcf\data\user\notification\event;
-use wcf\data\DatabaseObject;
+use wcf\data\ProcessibleDatabaseObject;
/**
* Represents a user notification event.
* @subpackage data.user.notification.event
* @category Community Framework
*/
-class UserNotificationEvent extends DatabaseObject {
+class UserNotificationEvent extends ProcessibleDatabaseObject {
/**
* @see wcf\data\DatabaseObject::$databaseTableName
*/
* @see wcf\data\DatabaseObject::$databaseTableIndexName
*/
protected static $databaseTableIndexName = 'eventID';
+
+ /**
+ * @see wcf\data\ProcessibleDatabaseObject::$processorInterface
+ */
+ protected static $processorInterface = 'wcf\system\user\notification\event\IUserNotificationEvent';
}
<?php
namespace wcf\data\user\notification\object\type;
-use wcf\data\DatabaseObject;
+use wcf\data\ProcessibleDatabaseObject;
/**
* Represents a user notification object type.
* @subpackage data.user.notification.object.type
* @category Community Framework
*/
-class UserNotificationObjectType extends DatabaseObject {
+class UserNotificationObjectType extends ProcessibleDatabaseObject {
/**
* @see wcf\data\DatabaseObject::$databaseTableName
*/
* @see wcf\data\DatabaseObject::$databaseTableIndexName
*/
protected static $databaseTableIndexName = 'objectTypeID';
+
+ /**
+ * @see wcf\data\ProcessibleDatabaseObject::$processorInterface
+ */
+ protected static $processorInterface = 'wcf\system\user\notification\object\type\IUserNotificationObjectType';
}
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute(array($this->userID, 1));
while ($row = $statement->fetchArray()) {
- $this->object->data['notificationTypes'][$row['eventID']] = new UserNotificationType(null, $row);
+ $databaseObject = new UserNotificationType(null, $row);
+ $this->object->data['notificationTypes'][$row['eventID']][] = $databaseObject->getProcessor();
}
}
}
* Returns the enabled notification types for the given event.
*
* @param integer $eventID
- * @return array<wcf\data\user\notification\type\UserNotificationType>
+ * @return array<wcf\system\user\notification\type\IUserNotificationType>
*/
public function getNotificationTypes($eventID) {
if (isset($this->notificationTypes[$eventID])) {
--- /dev/null
+<?php
+namespace wcf\data\user\notification\recipient;
+use wcf\data\user\notification\type\UserNotificationType;
+use wcf\data\user\UserList;
+use wcf\data\user\User;
+use wcf\system\database\util\PreparedStatementConditionBuilder;
+use wcf\system\WCF;
+
+/**
+ * Decorates the user object to provide special functions for handling recipients of user notifications.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2011 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf.notification
+ * @subpackage data.user.notification.user
+ * @category Community Framework
+ */
+class UserNotificationRecipientList extends UserList {
+ /**
+ * @see wcf\data\DatabaseObjectList\DatabaseObjectList::readObjects()
+ */
+ public function readObjects() {
+ if ($this->objectIDs === null) {
+ $this->readObjectIDs();
+ }
+
+ if (!count($this->objectIDs)) {
+ return;
+ }
+
+ // get notification types
+ $notificationTypes = array();
+ $conditionBuilder = new PreparedStatementConditionBuilder();
+ $conditionBuilder->add('event_to_user.userID IN (?)', array($this->objectIDs));
+ $conditionBuilder->add('event_to_user.enabled = ?', array(1));
+
+ $sql = "SELECT event_to_user.eventID, event_to_user.userID, notification_type.*
+ FROM wcf".WCF_N."_user_notification_event_to_user event_to_user
+ LEFT JOIN wcf".WCF_N."_user_notification_type notification_type
+ ON (notification_type.notificationTypeID = event_to_user.notificationTypeID)
+ ".$conditionBuilder->__toString();
+ $statement = WCF::getDB()->prepareStatement($sql);
+ $statement->execute($conditionBuilder->getParameters());
+ while ($row = $statement->fetchArray()) {
+ $databaseObject = new UserNotificationType(null, $row);
+ $notificationTypes[$row['userID']][$row['eventID']][] = $databaseObject->getProcessor();
+ }
+
+ // get users
+ $sql = "SELECT ".(!empty($this->sqlSelects) ? $this->sqlSelects.',' : '')."
+ ".$this->getDatabaseTableAlias().".*
+ FROM ".$this->getDatabaseTableName()." ".$this->getDatabaseTableAlias()."
+ ".$this->sqlJoins."
+ WHERE ".$this->getDatabaseTableAlias().".".$this->getDatabaseTableIndexName()." IN (?".str_repeat(',?', count($this->objectIDs) - 1).")
+ ".(!empty($this->sqlOrderBy) ? "ORDER BY ".$this->sqlOrderBy : '');
+ $statement = WCF::getDB()->prepareStatement($sql);
+ $statement->execute($this->objectIDs);
+ while ($row = $statement->fetchArray()) {
+ $row['notificationTypes'] = (isset($notificationTypes[$row['userID']]) ? $notificationTypes[$row['userID']] : array());
+ $this->objects[] = new UserNotificationRecipient(new User(null, $row));
+ }
+ }
+}
<?php
namespace wcf\data\user\notification\type;
-use wcf\data\DatabaseObject;
+use wcf\data\ProcessibleDatabaseObject;
/**
* Represents a user notification type.
* @subpackage data.user.notification.type
* @category Community Framework
*/
-class UserNotificationType extends DatabaseObject {
+class UserNotificationType extends ProcessibleDatabaseObject {
/**
* @see wcf\data\DatabaseObject::$databaseTableName
*/
* @see wcf\data\DatabaseObject::$databaseTableIndexName
*/
protected static $databaseTableIndexName = 'notificationTypeID';
+
+ /**
+ * @see wcf\data\ProcessibleDatabaseObject::$processorInterface
+ */
+ protected static $processorInterface = 'wcf\system\user\notification\type\IUserNotificationType';
}
* @subpackage system.cache
* @category Community Framework
*/
-class CacheBuilderUserNotificationObjectType implements CacheBuilder {
+class CacheBuilderUserNotificationObjectType implements ICacheBuilder {
/**
- * @see CacheBuilder::getData()
+ * @see wcf\system\cache\ICacheBuilder::getData()
*/
public function getData($cacheResource) {
$data = array();
// get package id
$tmp = explode('-', $cacheResource['cache']);
- $packageID = array_pop($packageID);
+ $packageID = array_pop($tmp);
// get object types
$typeIDArray = array();
$statement->execute(array($packageID));
while ($row = $statement->fetchArray()) {
if (!isset($data[$row['objectType']])) {
+ $databaseObject = new UserNotificationObjectType(null, $row);
$data[$row['objectType']] = array(
- 'object' => new UserNotificationObjectType(null, $row),
+ 'object' => $databaseObject->getProcessor(),
'events' => array()
);
}
$statement->execute(array($packageID));
while ($row = $statement->fetchArray()) {
if (isset($data[$row['objectType']]) && !isset($data[$row['objectType']]['events'][$row['eventName']])) {
- $data[$row['objectType']]['events'][$row['eventName']] = new UserNotificationEvent(null, $row);
+ $databaseObject = new UserNotificationEvent(null, $row);
+ $data[$row['objectType']]['events'][$row['eventName']] = $databaseObject->getProcessor();
}
}
$statement = WCF::getDB()->prepareStatement($sql, 1);
$statement->execute(array($this->installation->getPackageID(), $data['elements']['defaultnotificationtype']));
$row = $statement->fetchArray();
- if (empty($row['objectTypeID'])) throw new SystemException("unknown notification type '".$data['elements']['defaultnotificationtype']."' given");
+ if (empty($row['notificationTypeID'])) throw new SystemException("unknown notification type '".$data['elements']['defaultnotificationtype']."' given");
$defaultNotificationTypeID = $row['notificationTypeID'];
}
<?php
namespace wcf\system\user\notification;
use wcf\data\user\notification\event\UserNotificationEvent;
-use wcf\data\user\notification\object\type\UserNotificationObjectType;
use wcf\data\user\notification\recipient\UserNotificationRecipientList;
use wcf\data\user\notification\UserNotificationAction;
use wcf\system\cache\CacheHandler;
use wcf\system\exception\SystemException;
-use wcf\system\user\notification\object\UserNotificationObject;
+use wcf\system\user\notification\object\IUserNotificationObject;
use wcf\system\SingletonFactory;
/**
*
* @param string $eventName
* @param string $objectType
- * @param wcf\system\user\notification\object\UserNotificationObject $notificationObject
+ * @param wcf\system\user\notification\object\IUserNotificationObject $notificationObject
* @param array<integer> $recipientIDs
* @param array<mixed> $additionalData
*/
- public function fireEvent($eventName, $objectType, UserNotificationObject $notificationObject, array $recipientIDs, array $additionalData = array()) {
+ public function fireEvent($eventName, $objectType, IUserNotificationObject $notificationObject, array $recipientIDs, array $additionalData = array()) {
// check given object type and event name
if (!isset($this->availableObjectTypes[$objectType]['events'][$eventName])) {
throw new SystemException("Unknown event '.$objectType.'-.$eventName.' given");
}
// get objects
- $objectTypeData = $this->availableObjectTypes[$objectType]['object'];
- $eventData = $this->availableObjectTypes[$objectType]['events'][$eventName];
+ $objectType = $this->availableObjectTypes[$objectType]['object'];
+ $event = $this->availableObjectTypes[$objectType]['events'][$eventName];
// save notification
- $action = new UserNotificationAction(array(), 'create', array(
+ $action = new UserNotificationAction(array(), 'create', array('data' => array(
'packageID' => PACKAGE_ID,
- 'eventID' => $eventData->eventID,
+ 'eventID' => $event->eventID,
'objectID' => $notificationObject->getObjectID(),
'time' => TIME_NOW,
- 'shortOutput' => $eventData->getObject()->getShortOutput($eventName),
- 'mediumOutput' => $eventData->getObject()->getMediumOutput($eventName),
- 'longOutput' => $eventData->getObject()->getOutput($eventName),
+ 'shortOutput' => $event->getShortOutput($eventName),
+ 'mediumOutput' => $event->getMediumOutput($eventName),
+ 'longOutput' => $event->getOutput($eventName),
'additionalData' => serialize($additionalData),
'recipientIDs' => $recipientIDs
- ));
- $notification = $action->executeAction();
+ )));
+ $result = $action->executeAction();
+ $notification = $result['returnValues'];
// get recipients
$recipientList = new UserNotificationRecipientList();
- $recipientList->getConditionBuilder()->add('user_table.userID = ?', array($recipientIDs));
+ $recipientList->getConditionBuilder()->add('user.userID = ?', array($recipientIDs));
$recipientList->readObjects();
// sends notifications
foreach ($recipientList->getObjects() as $recipient) {
- foreach ($recipient->getNotificationTypes($eventData->eventID) as $notificationType) {
- if ($eventData->getObject()->supportsNotificationType($notificationType)) {
- $notificationType->getObject()->send($notification, $recipient, $eventData);
+ foreach ($recipient->getNotificationTypes($event->eventID) as $notificationType) {
+ if ($event->supportsNotificationType($notificationType)) {
+ $notificationType->send($notification, $recipient, $event);
}
}
}
--- /dev/null
+<?php
+namespace wcf\system\user\notification\event;
+use wcf\data\DatabaseObjectDecorator;
+
+/**
+ * Provides default a implementation for user notification events.
+ *
+ * @author Marcel Werk, Oliver Kliebisch
+ * @copyright 2001-2011 WoltLab GmbH, Oliver Kliebisch
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf.notification
+ * @subpackage system.user.notification.event
+ * @category Community Framework
+ */
+abstract class AbstractUserNotificationEvent extends DatabaseObjectDecorator implements IUserNotificationEvent {
+ /**
+ * @see wcf\data\DatabaseObjectDecorator::$baseClass
+ */
+ protected static $baseClass = 'wcf\data\user\notification\event\UserNotificationEvent';
+}
--- /dev/null
+<?php
+namespace wcf\system\user\notification\event;
+use wcf\data\IDatabaseObjectProcessor;
+use wcf\system\user\notification\type\IUserNotificationType;
+
+/**
+ * This interface should be implemented by every event which is fired by the notification system.
+ *
+ * @author Marcel Werk, Oliver Kliebisch
+ * @copyright 2001-2011 WoltLab GmbH, Oliver Kliebisch
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf.notification
+ * @subpackage system.user.notification.event
+ * @category Community Framework
+ */
+interface IUserNotificationEvent extends IDatabaseObjectProcessor {
+ /**
+ * Returns the message for this notification event.
+ *
+ * @param wcf\system\user\notification\type\IUserNotificationType $notificationType
+ * @return string
+ */
+ public function getMessage(IUserNotificationType $notificationType);
+
+ /**
+ * Returns the short output for this notification event.
+ *
+ * @return string
+ */
+ public function getShortOutput();
+
+ /**
+ * Returns the medium output for this notification event.
+ *
+ * @return string
+ */
+ public function getMediumOutput();
+
+ /**
+ * Returns the full output for this notification event.
+ *
+ * @return string
+ */
+ public function getOutput();
+
+ /**
+ * Returns the human-readable title of this event.
+ *
+ * @return string
+ */
+ public function getTitle();
+
+ /**
+ * Returns the human-readable description of this event.
+ *
+ * @return string
+ */
+ public function getDescription();
+
+ /**
+ * Returns true if this event supports the given notification type.
+ *
+ * @param wcf\system\user\notification\type\IUserNotificationType $notificationType
+ * @return boolean
+ */
+ public function supportsNotificationType(IUserNotificationType $notificationType);
+}
+++ /dev/null
-<?php
-namespace wcf\system\user\notification\event;
-use wcf\data\user\notification\type;
-
-/**
- * This interface should be implemented by every event which is fired by the notification system.
- *
- * @author Marcel Werk, Oliver Kliebisch
- * @copyright 2001-2011 WoltLab GmbH, Oliver Kliebisch
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf.notification
- * @subpackage system.user.notification.event
- * @category Community Framework
- */
-interface UserNotificationEvent {
- /**
- * Returns the message for this notification event.
- *
- * @param wcf\data\user\notification\type\UserNotificationType $notificationType
- * @return string
- */
- public function getMessage(UserNotificationType $notificationType);
-
- /**
- * Returns the short output for this notification event.
- *
- * @return string
- */
- public function getShortOutput();
-
- /**
- * Returns the medium output for this notification event.
- *
- * @return string
- */
- public function getMediumOutput();
-
- /**
- * Returns the full output for this notification event.
- *
- * @return string
- */
- public function getOutput();
-
- /**
- * Returns the human-readable title of this event.
- *
- * @return string
- */
- public function getTitle();
-
- /**
- * Returns the human-readable description of this event.
- *
- * @return string
- */
- public function getDescription();
-
- /**
- * Returns true if this event supports the given notification type.
- *
- * @param wcf\data\user\notification\type\UserNotificationType $notificationType
- * @return boolean
- */
- public function supportsNotificationType(UserNotificationType $notificationType);
-}
--- /dev/null
+<?php
+namespace wcf\system\user\notification\object;
+use wcf\data\IDatabaseObjectProcessor;
+
+/**
+ * This interface should be implemented by every object which is part of a notification.
+ *
+ * @author Marcel Werk, Oliver Kliebisch
+ * @copyright 2001-2011 WoltLab GmbH, Oliver Kliebisch
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf.notification
+ * @subpackage system.user.notification.object
+ * @category Community Framework
+ */
+interface IUserNotificationObject extends IDatabaseObjectProcessor {
+ /**
+ * Returns the ID of this object.
+ *
+ * @return integer
+ */
+ public function getObjectID();
+
+ /**
+ * Returns the title of this object.
+ *
+ * @return string
+ */
+ public function getTitle();
+
+ /**
+ * Returns the url of this object.
+ *
+ * @return string
+ */
+ public function getURL();
+}
+++ /dev/null
-<?php
-namespace wcf\system\user\notification\object;
-
-/**
- * This interface should be implemented by every object which is part of a notification.
- *
- * @author Marcel Werk, Oliver Kliebisch
- * @copyright 2001-2011 WoltLab GmbH, Oliver Kliebisch
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf.notification
- * @subpackage system.user.notification.object
- * @category Community Framework
- */
-interface UserNotificationObject {
- /**
- * Returns the ID of this object.
- *
- * @return integer
- */
- public function getObjectID();
-
- /**
- * Returns the title of this object.
- *
- * @return string
- */
- public function getTitle();
-
- /**
- * Returns the url of this object.
- *
- * @return string
- */
- public function getURL();
-}
--- /dev/null
+<?php
+namespace wcf\system\user\notification\object\type;
+use wcf\data\DatabaseObjectDecorator;
+
+/**
+ * Provides default a implementation for user notification object types.
+ *
+ * @author Marcel Werk, Oliver Kliebisch
+ * @copyright 2001-2011 WoltLab GmbH, Oliver Kliebisch
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf.notification
+ * @subpackage system.user.notification.event
+ * @category Community Framework
+ */
+abstract class AbstractUserNotificationObjectType extends DatabaseObjectDecorator implements IUserNotificationObjectType {
+ /**
+ * @see wcf\data\DatabaseObjectDecorator::$baseClass
+ */
+ protected static $baseClass = 'wcf\data\user\notification\object\type\UserNotificationObjectType';
+}
--- /dev/null
+<?php
+namespace wcf\system\user\notification\object\type;
+use wcf\data\IDatabaseObjectProcessor;
+
+/**
+ * This interface defines the basic methods every notification object type should implement.
+ *
+ * @author Marcel Werk, Oliver Kliebisch
+ * @copyright 2001-2011 WoltLab GmbH, Oliver Kliebisch
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf.notification
+ * @subpackage system.user.notification.object.type
+ * @category Community Framework
+ */
+interface IUserNotificationObjectType extends IDatabaseObjectProcessor {
+ /**
+ * Gets a notification object by its ID.
+ *
+ * @param integer $objectID
+ * @return wcf\system\user\notification\object\IUserNotificationObject
+ */
+ public function getObjectByID($objectID);
+
+ /**
+ * Gets notification objects by their IDs.
+ *
+ * @param array<integer> $objectIDs
+ * @return array<wcf\system\user\notification\object\IUserNotificationObject>
+ */
+ public function getObjectsByIDs($objectIDs);
+
+}
+++ /dev/null
-<?php
-namespace wcf\system\user\notification\object\type;
-
-/**
- * This interface defines the basic methods every notification object type should implement.
- *
- * @author Marcel Werk, Oliver Kliebisch
- * @copyright 2001-2011 WoltLab GmbH, Oliver Kliebisch
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf.notification
- * @subpackage system.user.notification.object.type
- * @category Community Framework
- */
-interface UserNotificationObjectType {
- /**
- * Gets a notification object by its ID.
- *
- * @param integer $objectID
- * @return wcf\system\user\notification\object\UserNotificationObject
- */
- public function getObjectByID($objectID);
-
- /**
- * Gets notification objects by their IDs.
- *
- * @param array<integer> $objectIDs
- * @return array<wcf\system\user\notification\object\UserNotificationObject>
- */
- public function getObjectsByIDs($objectIDs);
-
-}
--- /dev/null
+<?php
+namespace wcf\system\user\notification\type;
+use wcf\data\DatabaseObjectDecorator;
+
+/**
+ * Provides default a implementation for user notification types.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2011 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf.notification
+ * @subpackage system.user.notification.type
+ * @category Community Framework
+ */
+abstract class AbstractUserNotificationType extends DatabaseObjectDecorator implements IUserNotificationType {
+ /**
+ * @see wcf\data\DatabaseObjectDecorator::$baseClass
+ */
+ protected static $baseClass = 'wcf\data\user\notification\type\UserNotificationType';
+}
--- /dev/null
+<?php
+namespace wcf\system\user\notification\type;
+use wcf\data\user\notification\recipient\UserNotificationRecipient;
+use wcf\data\user\notification\UserNotification;
+use wcf\data\IDatabaseObjectProcessor;
+use wcf\system\user\notification\event\IUserNotificationEvent;
+
+/**
+ * This interface should be implemented by every user notification type.
+ *
+ * @author Marcel Werk, Oliver Kliebisch
+ * @copyright 2001-2011 WoltLab GmbH, Oliver Kliebisch
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf.notification
+ * @subpackage system.user.notification.type
+ * @category Community Framework
+ */
+interface IUserNotificationType extends IDatabaseObjectProcessor {
+ /**
+ * Sends the notification using this notification transport type.
+ *
+ * @param wcf\data\user\notification\UserNotification $notification
+ * @param wcf\data\user\notification\recipient\UserNotificationRecipient $user
+ * @param wcf\system\user\notification\event\IUserNotificationEvent $event
+ */
+ public function send(UserNotification $notification, UserNotificationRecipient $user, IUserNotificationEvent $event);
+
+ /**
+ * Tries to revoke the notification. This might not be applicable for all notification types.
+ *
+ * @param wcf\data\user\notification\UserNotification $notification
+ * @param wcf\data\user\notification\recipient\UserNotificationRecipient $user
+ * @param wcf\system\user\notification\event\IUserNotificationEvent $event
+ */
+ public function revoke(UserNotification $notification, UserNotificationRecipient $user, IUserNotificationEvent $event);
+}
<?php
namespace wcf\system\user\notification\type;
-use wcf\data\user\notification\event\UserNotificationEvent;
+use wcf\data\user\notification\recipient\UserNotificationRecipient;
use wcf\data\user\notification\UserNotification;
use wcf\data\user\UserEditor;
-use wcf\data\user\User;
use wcf\system\mail\Mail;
+use wcf\system\user\notification\event\IUserNotificationEvent;
+use wcf\util\FileUtil;
+use wcf\util\StringUtil;
/**
* A notification type for sending mail notifications.
* @subpackage system.user.notification.type
* @category Community Framework
*/
-class MailUserNotificationType implements UserNotificationType {
+class MailUserNotificationType extends AbstractUserNotificationType {
/**
- * @see wcf\system\user\notification\type\UserNotificationType::send()
+ * @see wcf\system\user\notification\type\IUserNotificationType::send()
*/
- public function send(UserNotification $notification, User $user, UserNotificationEvent $event) {
+ public function send(UserNotification $notification, UserNotificationRecipient $user, IUserNotificationEvent $event) {
// get message
$message = $event->getMessage($this, array(
'user' => $user,
if (!$token) {
// generate token if not present
$token = StringUtil::substring($token = StringUtil::getHash(serialize(array($user->userID, StringUtil::getRandomID()))), 0, 20);
- $editor = new UserEditor($user);
+ $editor = new UserEditor($user->getDecoratedObject());
$editor->updateUserOptions(array('notificationMailToken' => $token));
}
- $message .= "\n".$event->getLanguage()->getDynamicVariable('wcf.user.notification.type.mail.footer', array(
+ $message .= "\n".$user->getLanguage()->getDynamicVariable('wcf.user.notification.type.mail.footer', array(
'user' => $user,
'pageURL' => FileUtil::addTrailingSlash(PAGE_URL),
'token' => $token,
$shortMessage = StringUtil::stripHTML($notification->shortOutput);
// build mail
- $mail = new Mail(array($user->username => $user->email), $event->getLanguageVariable('wcf.user.notification.type.mail.subject', array('title' => $shortMessage)), $message);
+ $mail = new Mail(array($user->username => $user->email), $user->getLanguage()->getDynamicVariable('wcf.user.notification.type.mail.subject', array('title' => $shortMessage)), $message);
$mail->send();
}
/**
- * @see wcf\system\user\notification\type\UserNotificationType::revoke()
+ * @see wcf\system\user\notification\type\IUserNotificationType::revoke()
*/
- public function revoke(UserNotification $notification, User $user, UserNotificationEvent $event) {
+ public function revoke(UserNotification $notification, UserNotificationRecipient $user, IUserNotificationEvent $event) {
// unsupported
return;
}
+++ /dev/null
-<?php
-namespace wcf\system\user\notification\type;
-use wcf\data\user\notification\event\UserNotificationEvent;
-use wcf\data\user\notification\UserNotification;
-use wcf\data\user\User;
-
-/**
- * This interface should be implemented by every user notification type.
- *
- * @author Marcel Werk, Oliver Kliebisch
- * @copyright 2001-2011 WoltLab GmbH, Oliver Kliebisch
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf.notification
- * @subpackage system.user.notification.type
- * @category Community Framework
- */
-interface UserNotificationType {
- /**
- * Sends the notification using this notification transport type.
- *
- * @param wcf\data\user\notification\UserNotification $notification
- * @param wcf\data\user\User $user
- * @param wcf\data\user\notification\event\UserNotificationEvent $event
- */
- public function send(UserNotification $notification, User $user, UserNotificationEvent $event);
-
- /**
- * Tries to revoke the notification. This might not be applicable for all notification types.
- *
- * @param wcf\data\user\notification\UserNotification $notification
- * @param wcf\data\user\User $user
- * @param wcf\data\user\notification\event\UserNotificationEvent $event
- */
- public function revoke(UserNotification $notification, User $user, UserNotificationEvent $event);
-}
* @package com.woltlab.wcf.system.exception\r
* @author Marcel Werk\r
*/\r
-interface PrintableException {\r
+interface IPrintableException {\r
public function show();\r
}\r
\r
* @package com.woltlab.wcf.system.exception\r
* @author Marcel Werk\r
*/\r
-class SystemException extends \Exception implements PrintableException {\r
+class SystemException extends \Exception implements IPrintableException {\r
protected $description;\r
protected $information = '';\r
protected $functions = '';\r
* @param Exception $e\r
*/\r
function handleException(\Exception $e) {\r
- if ($e instanceof PrintableException || $e instanceof \wcf\system\exception\PrintableException) {\r
+ if ($e instanceof IPrintableException || $e instanceof \wcf\system\exception\IPrintableException) {\r
$e->show();\r
exit;\r
}\r
public $templateName = 'packageInstallationStep';\r
\r
/**\r
- * @see wcf\action\Action::readParameters()\r
+ * @see wcf\action\IAction::readParameters()\r
*/\r
public function readParameters() {\r
parent::readParameters();\r
*/\r
class LogoutAction extends AbstractSecureAction {\r
/**\r
- * @see wcf\action\Action::execute()\r
+ * @see wcf\action\IAction::execute()\r
*/\r
public function execute() {\r
parent::execute();\r
public $neededPermissions = array('admin.system.canEditOption');\r
\r
/**\r
- * @see wcf\action\Action::execute();\r
+ * @see wcf\action\IAction::execute();\r
*/\r
public function execute() {\r
parent::execute();\r
public $templateName = 'packageUninstallationStep';\r
\r
/**\r
- * @see wcf\action\Action::readParameters()\r
+ * @see wcf\action\IAction::readParameters()\r
*/\r
public function readParameters() {\r
AbstractDialogAction::readParameters();\r
public $activeMenuItem = '';\r
\r
/**\r
- * @see wcf\page\Page::show()\r
+ * @see wcf\page\IPage::show()\r
*/\r
public function show() {\r
// enable menu item\r
public $typeObjects = array();\r
\r
/**\r
- * @see wcf\form\Form::readFormParameters()\r
+ * @see wcf\form\IForm::readFormParameters()\r
*/\r
public function readFormParameters() {\r
parent::readFormParameters();\r
* Returns an object of the requested option type.\r
* \r
* @param string $type\r
- * @return OptionType\r
+ * @return wcf\system\option\IOptionType\r
*/\r
protected function getTypeObject($type) {\r
if (!isset($this->typeObjects[$type])) {\r
if (!class_exists($className)) {\r
throw new SystemException("unable to find class '".$className."'", 11001);\r
}\r
- if (!ClassUtil::isInstanceOf($className, 'wcf\system\option\OptionType')) {\r
- throw new SystemException("'".$className."' should implement OptionType");\r
+ if (!ClassUtil::isInstanceOf($className, 'wcf\system\option\IOptionType')) {\r
+ throw new SystemException("'".$className."' should implement wcf\system\option\IOptionType");\r
}\r
// create instance\r
$this->typeObjects[$type] = new $className();\r
}\r
\r
/**\r
- * @see wcf\form\Form::validate()\r
+ * @see wcf\form\IForm::validate()\r
*/\r
public function validate() {\r
parent::validate();\r
}\r
\r
/**\r
- * @see OptionType::getFormElement()\r
+ * @see wcf\system\option\IOptionType::getFormElement()\r
*/\r
protected function getFormElement($type, Option $option) {\r
return $this->getTypeObject($type)->getFormElement($option, (isset($this->optionValues[$option->optionName]) ? $this->optionValues[$option->optionName] : null));\r
public $startDow = '*';\r
\r
/**\r
- * @see wcf\form\Form::readFormParameters()\r
+ * @see wcf\form\IForm::readFormParameters()\r
*/\r
public function readFormParameters() {\r
parent::readFormParameters();\r
}\r
\r
/**\r
- * @see wcf\form\Form::validate()\r
+ * @see wcf\form\IForm::validate()\r
*/\r
public function validate() {\r
parent::validate();\r
}\r
\r
/**\r
- * @see wcf\form\Form::save()\r
+ * @see wcf\form\IForm::save()\r
*/\r
public function save() {\r
parent::save();\r
}\r
\r
/**\r
- * @see wcf\page\Page::assignVariables()\r
+ * @see wcf\page\IPage::assignVariables()\r
*/\r
public function assignVariables() {\r
parent::assignVariables();\r
public $cronjob = null;\r
\r
/**\r
- * @see wcf\page\Page::readParameters()\r
+ * @see wcf\page\IPage::readParameters()\r
*/\r
public function readParameters() {\r
parent::readParameters();\r
}\r
\r
/**\r
- * @see wcf\form\Form::save()\r
+ * @see wcf\form\IForm::save()\r
*/\r
public function save() {\r
ACPForm::save();\r
}\r
\r
/**\r
- * @see wcf\page\Page::readData()\r
+ * @see wcf\page\IPage::readData()\r
*/\r
public function readData() {\r
parent::readData();\r
}\r
\r
/**\r
- * @see wcf\page\Page::assignVariables()\r
+ * @see wcf\page\IPage::assignVariables()\r
*/\r
public function assignVariables() {\r
parent::assignVariables();\r
}\r
\r
/**\r
- * @see wcf\page\Page::readParameters()\r
+ * @see wcf\page\IPage::readParameters()\r
*/\r
public function readParameters() {\r
parent::readParameters();\r
}\r
\r
/**\r
- * @see wcf\form\Form::readFormParameters()\r
+ * @see wcf\form\IForm::readFormParameters()\r
*/\r
public function readFormParameters() {\r
parent::readFormParameters();\r
}\r
\r
/**\r
- * @see wcf\form\Form::validate()\r
+ * @see wcf\form\IForm::validate()\r
*/\r
public function validate() {\r
parent::validate();\r
}\r
\r
/**\r
- * @see wcf\form\Form::save()\r
+ * @see wcf\form\IForm::save()\r
*/\r
public function save() {\r
parent::save();\r
}\r
\r
/**\r
- * @see wcf\page\Page::readData()\r
+ * @see wcf\page\IPage::readData()\r
*/\r
public function readData() {\r
parent::readData();\r
}\r
\r
/**\r
- * @see wcf\page\Page::assignVariables()\r
+ * @see wcf\page\IPage::assignVariables()\r
*/\r
public function assignVariables() {\r
parent::assignVariables();\r
public $url = '';
/**
- * @see wcf\page\Page::readParameters()
+ * @see wcf\page\IPage::readParameters()
*/
public function readParameters() {
parent::readParameters();
}
/**
- * @see wcf\form\Form::readFormParameters()
+ * @see wcf\form\IForm::readFormParameters()
*/
public function readFormParameters() {
parent::readFormParameters();
}
/**
- * @see wcf\form\Form::validate()
+ * @see wcf\form\IForm::validate()
*/
public function validate() {
parent::validate();
}
/**
- * @see wcf\form\Form::save()
+ * @see wcf\form\IForm::save()
*/
public function save() {
parent::save();
}
/**
- * @see wcf\page\Page::readData()
+ * @see wcf\page\IPage::readData()
*/
public function readData() {
parent::readData();
}
/**
- * @see wcf\page\Page::assignVariables()
+ * @see wcf\page\IPage::assignVariables()
*/
public function assignVariables() {
parent::assignVariables();
public $confirmMasterPassword = '';
/**
- * @see wcf\page\Page::readParameters()
+ * @see wcf\page\IPage::readParameters()
*/
public function readParameters() {
parent::readParameters();
}
/**
- * @see wcf\form\Form::readFormParameters()
+ * @see wcf\form\IForm::readFormParameters()
*/
public function readFormParameters() {
parent::readFormParameters();
}
/**
- * @see wcf\form\Form::validate()
+ * @see wcf\form\IForm::validate()
*/
public function validate() {
ACPForm::validate();
}
/**
- * @see wcf\form\Form::save()
+ * @see wcf\form\IForm::save()
*/
public function save() {
// generate salt
}
/**
- * @see wcf\page\Page::assignVariables()
+ * @see wcf\page\IPage::assignVariables()
*/
public function assignVariables() {
parent::assignVariables();
public $optionTree = array();\r
\r
/**\r
- * @see wcf\page\Page::readParameters()\r
+ * @see wcf\page\IPage::readParameters()\r
*/\r
public function readParameters() {\r
parent::readParameters();\r
}\r
\r
/**\r
- * @see wcf\form\Form::readFormParameters()\r
+ * @see wcf\form\IForm::readFormParameters()\r
*/\r
public function readFormParameters() {\r
parent::readFormParameters();\r
}\r
\r
/**\r
- * @see wcf\form\Form::save()\r
+ * @see wcf\form\IForm::save()\r
*/\r
public function save() {\r
parent::save();\r
}\r
\r
/**\r
- * @see wcf\page\Page::readData()\r
+ * @see wcf\page\IPage::readData()\r
*/\r
public function readData() {\r
parent::readData();\r
}\r
\r
/**\r
- * @see wcf\page\Page::assignVariables()\r
+ * @see wcf\page\IPage::assignVariables()\r
*/\r
public function assignVariables() {\r
parent::assignVariables();\r
}\r
\r
/**\r
- * @see wcf\form\Form::show()\r
+ * @see wcf\form\IForm::show()\r
*/\r
public function show() {\r
// set active menu item\r
public $options = array();
/**
- * @see wcf\form\Form::readFormParameters()
+ * @see wcf\form\IForm::readFormParameters()
*/
public function readFormParameters() {
parent::readFormParameters();
}
/**
- * @see wcf\form\Form::validate()
+ * @see wcf\form\IForm::validate()
*/
public function validate() {
parent::validate();
}
/**
- * @see wcf\form\Form::save()
+ * @see wcf\form\IForm::save()
*/
public function save() {
parent::save();
}
/**
- * @see wcf\page\Page::show()
+ * @see wcf\page\IPage::show()
*/
public function show() {
// check master password
public $queue = null;\r
\r
/**\r
- * @see wcf\form\Form::readParameters()\r
+ * @see wcf\form\IForm::readParameters()\r
*/\r
public function readParameters() {\r
parent::readParameters();\r
}\r
\r
/**\r
- * @see wcf\form\Form::readFormParameters()\r
+ * @see wcf\form\IForm::readFormParameters()\r
*/\r
public function readFormParameters() {\r
parent::readFormParameters();\r
}\r
\r
/**\r
- * @see wcf\form\Form::validate()\r
+ * @see wcf\form\IForm::validate()\r
*/\r
public function validate() {\r
parent::validate();\r
}\r
\r
/**\r
- * @see wcf\form\Form::save()\r
+ * @see wcf\form\IForm::save()\r
*/\r
public function save() {\r
parent::save();\r
}\r
\r
/**\r
- * @see wcf\page\Page::assignVariables()\r
+ * @see wcf\page\IPage::assignVariables()\r
*/\r
public function assignVariables() {\r
parent::assignVariables();\r
}\r
\r
/**\r
- * @see wcf\page\Page::show()\r
+ * @see wcf\page\IPage::show()\r
*/\r
public function show() {\r
if ($this->action == 'install') WCF::getSession()->checkPermission(array('admin.system.package.canInstallPackage'));\r
}
/**
- * @see wcf\page\Page::readParameters()
+ * @see wcf\page\IPage::readParameters()
*/
public function readParameters() {
parent::readParameters();
}
/**
- * @see wcf\page\Page::readData()
+ * @see wcf\page\IPage::readData()
*/
public function readData() {
parent::readData();
}
/**
- * @see wcf\page\Page::assignVariables()
+ * @see wcf\page\IPage::assignVariables()
*/
public function assignVariables() {
parent::assignVariables();
public $packageUpdate = null;
/**
- * @see wcf\page\Page::readParameters()
+ * @see wcf\page\IPage::readParameters()
*/
public function readParameters() {
parent::readParameters();
}
/**
- * @see wcf\form\Form::validate()
+ * @see wcf\form\IForm::validate()
*/
public function validate() {
parent::validate();
}
/**
- * @see wcf\form\Form::save()
+ * @see wcf\form\IForm::save()
*/
public function save() {
if (isset($_POST['send'])) {
}
/**
- * @see wcf\page\Page::readData()
+ * @see wcf\page\IPage::readData()
*/
public function readData() {
parent::readData();
}
/**
- * @see wcf\page\Page::assignVariables()
+ * @see wcf\page\IPage::assignVariables()
*/
public function assignVariables() {
parent::assignVariables();
}
/**
- * @see wcf\page\Page::assignVariables()
+ * @see wcf\page\IPage::assignVariables()
*/
public function show() {
// check master password
public $packageUpdateIDs = '';
/**
- * @see wcf\form\Form::readFormParameters()
+ * @see wcf\form\IForm::readFormParameters()
*/
public function readFormParameters() {
parent::readFormParameters();
}
/**
- * @see wcf\form\Form::validate()
+ * @see wcf\form\IForm::validate()
*/
public function validate() {
parent::validate();
}
/**
- * @see wcf\form\Form::save()
+ * @see wcf\form\IForm::save()
*/
public function save() {
parent::save();
}
/**
- * @see wcf\page\Page::readData()
+ * @see wcf\page\IPage::readData()
*/
public function readData() {
parent::readData();
}
/**
- * @see wcf\page\Page::assignVariables()
+ * @see wcf\page\IPage::assignVariables()
*/
public function assignVariables() {
parent::assignVariables();
}
/**
- * @see wcf\page\Page::assignVariables()
+ * @see wcf\page\IPage::assignVariables()
*/
public function show() {
// check master password
public $loginPassword = '';
/**
- * @see wcf\form\Form::readFormParameters()
+ * @see wcf\form\IForm::readFormParameters()
*/
public function readFormParameters() {
parent::readFormParameters();
}
/**
- * @see wcf\form\Form::validate()
+ * @see wcf\form\IForm::validate()
*/
public function validate() {
parent::validate();
}
/**
- * @see wcf\form\Form::save()
+ * @see wcf\form\IForm::save()
*/
public function save() {
parent::save();
}
/**
- * @see wcf\page\Page::assignVariables()
+ * @see wcf\page\IPage::assignVariables()
*/
public function assignVariables() {
parent::assignVariables();
}
/**
- * @see wcf\page\Page::assignVariables()
+ * @see wcf\page\IPage::assignVariables()
*/
public function show() {
// check master password
public $updateServer = null;
/**
- * @see wcf\page\Page::readParameters()
+ * @see wcf\page\IPage::readParameters()
*/
public function readParameters() {
parent::readParameters();
}
/**
- * @see wcf\form\Form::save()
+ * @see wcf\form\IForm::save()
*/
public function save() {
AbstractForm::save();
}
/**
- * @see wcf\page\Page::readData()
+ * @see wcf\page\IPage::readData()
*/
public function readData() {
parent::readData();
}
/**
- * @see wcf\page\Page::assignVariables()
+ * @see wcf\page\IPage::assignVariables()
*/
public function assignVariables() {
parent::assignVariables();
public $additionalFields = array();\r
\r
/**\r
- * @see wcf\form\Form::readFormParameters()\r
+ * @see wcf\form\IForm::readFormParameters()\r
*/\r
public function readFormParameters() {\r
parent::readFormParameters();\r
}\r
\r
/**\r
- * @see wcf\form\Form::validate()\r
+ * @see wcf\form\IForm::validate()\r
*/\r
public function validate() {\r
// validate static user options \r
}\r
\r
/**\r
- * @see wcf\form\Form::save()\r
+ * @see wcf\form\IForm::save()\r
*/\r
public function save() {\r
AbstractForm::save();\r
}\r
\r
/**\r
- * @see wcf\page\Page::readData()\r
+ * @see wcf\page\IPage::readData()\r
*/\r
public function readData() {\r
parent::readData();\r
}\r
\r
/**\r
- * @see wcf\page\Page::assignVariables()\r
+ * @see wcf\page\IPage::assignVariables()\r
*/\r
public function assignVariables() {\r
parent::assignVariables();\r
}\r
\r
/**\r
- * @see wcf\page\Page::show()\r
+ * @see wcf\page\IPage::show()\r
*/\r
public function show() {\r
// set active menu item\r
public $groups = array();\r
\r
/**\r
- * @see wcf\form\Form::readFormParameters()\r
+ * @see wcf\form\IForm::readFormParameters()\r
*/\r
public function readFormParameters() {\r
parent::readFormParameters();\r
}\r
\r
/**\r
- * @see wcf\form\Form::validate()\r
+ * @see wcf\form\IForm::validate()\r
*/\r
public function validate() {\r
parent::validate();\r
}\r
\r
/**\r
- * @see wcf\form\Form::save()\r
+ * @see wcf\form\IForm::save()\r
*/\r
public function save() {\r
parent::save();\r
}\r
\r
/**\r
- * @see wcf\page\Page::readData()\r
+ * @see wcf\page\IPage::readData()\r
*/\r
public function readData() {\r
parent::readData();\r
}\r
\r
/**\r
- * @see wcf\page\Page::assignVariables()\r
+ * @see wcf\page\IPage::assignVariables()\r
*/\r
public function assignVariables() {\r
parent::assignVariables();\r
public $user = null;\r
\r
/**\r
- * @see wcf\page\Page::readParameters()\r
+ * @see wcf\page\IPage::readParameters()\r
*/\r
public function readParameters() {\r
parent::readParameters();\r
}\r
\r
/**\r
- * @see wcf\page\Page::readFormParameters()\r
+ * @see wcf\page\IPage::readFormParameters()\r
*/\r
public function readFormParameters() {\r
parent::readFormParameters();\r
}\r
\r
/**\r
- * @see wcf\page\Page::readData()\r
+ * @see wcf\page\IPage::readData()\r
*/\r
public function readData() {\r
if (!count($_POST)) {\r
}\r
\r
/**\r
- * @see wcf\page\Page::assignVariables()\r
+ * @see wcf\page\IPage::assignVariables()\r
*/\r
public function assignVariables() {\r
parent::assignVariables();\r
}\r
\r
/**\r
- * @see wcf\form\Form::save()\r
+ * @see wcf\form\IForm::save()\r
*/\r
public function save() {\r
AbstractForm::save();\r
public $users = array();\r
\r
/**\r
- * @see wcf\form\Form::readFormParameters()\r
+ * @see wcf\form\IForm::readFormParameters()\r
*/\r
public function readFormParameters() {\r
parent::readFormParameters();\r
}\r
\r
/**\r
- * @see wcf\form\Form::validate()\r
+ * @see wcf\form\IForm::validate()\r
*/\r
public function validate() {\r
parent::validate();\r
}\r
\r
/**\r
- * @see wcf\form\Form::save()\r
+ * @see wcf\form\IForm::save()\r
*/\r
public function save() {\r
parent::save();\r
}\r
\r
/**\r
- * @see wcf\page\Page::readData()\r
+ * @see wcf\page\IPage::readData()\r
*/\r
public function readData() {\r
parent::readData();\r
}\r
\r
/**\r
- * @see wcf\page\Page::assignVariables()\r
+ * @see wcf\page\IPage::assignVariables()\r
*/\r
public function assignVariables() {\r
parent::assignVariables();\r
public $additionalFields = array();\r
\r
/**\r
- * @see wcf\form\Form::readFormParameters()\r
+ * @see wcf\form\IForm::readFormParameters()\r
*/\r
public function readFormParameters() {\r
parent::readFormParameters();\r
}\r
\r
/**\r
- * @see wcf\form\Form::validate()\r
+ * @see wcf\form\IForm::validate()\r
*/\r
public function validate() {\r
// validate dynamic options\r
}\r
\r
/**\r
- * @see wcf\form\Form::save()\r
+ * @see wcf\form\IForm::save()\r
*/\r
public function save() {\r
parent::save();\r
}\r
\r
/**\r
- * @see wcf\page\Page::readData()\r
+ * @see wcf\page\IPage::readData()\r
*/\r
public function readData() {\r
AbstractOptionListForm::readData();\r
}\r
\r
/**\r
- * @see wcf\page\Page::assignVariables()\r
+ * @see wcf\page\IPage::assignVariables()\r
*/\r
public function assignVariables() {\r
parent::assignVariables();\r
}\r
\r
/**\r
- * @see Form::show()\r
+ * @see wcf\form\IForm::show()\r
*/\r
public function show() {\r
// set active menu item\r
if (!class_exists($className)) {\r
throw new SystemException("unable to find class '".$className."'", 11001);\r
}\r
- if (!ClassUtil::isInstanceOf($className, 'wcf\system\option\group\GroupOptionType')) {\r
- throw new SystemException("'".$className."' should implement GroupOptionType", 11001);\r
+ if (!ClassUtil::isInstanceOf($className, 'wcf\system\option\group\IGroupOptionType')) {\r
+ throw new SystemException("'".$className."' should implement wcf\system\option\group\IGroupOptionType", 11001);\r
}\r
$this->typeObjects[$type] = new $className();\r
}\r
public $group = null;\r
\r
/**\r
- * @see wcf\page\Page::readParameters()\r
+ * @see wcf\page\IPage::readParameters()\r
*/\r
public function readParameters() {\r
parent::readParameters();\r
}\r
\r
/**\r
- * @see wcf\page\Page::readData()\r
+ * @see wcf\page\IPage::readData()\r
*/\r
public function readData() {\r
if (!count($_POST)) {\r
}\r
\r
/**\r
- * @see wcf\page\Page::assignVariables()\r
+ * @see wcf\page\IPage::assignVariables()\r
*/\r
public function assignVariables() {\r
parent::assignVariables();\r
}\r
\r
/**\r
- * @see wcf\form\Form::save()\r
+ * @see wcf\form\IForm::save()\r
*/\r
public function save() {\r
AbstractForm::save();\r
public $enableHTML = 0;\r
\r
/**\r
- * @see wcf\page\Page::readParameters()\r
+ * @see wcf\page\IPage::readParameters()\r
*/\r
public function readParameters() {\r
parent::readParameters();\r
}\r
\r
/**\r
- * @see wcf\form\Form::readFormParameters()\r
+ * @see wcf\form\IForm::readFormParameters()\r
*/\r
public function readFormParameters() {\r
parent::readFormParameters();\r
}\r
\r
/**\r
- * @see wcf\form\Form::validate()\r
+ * @see wcf\form\IForm::validate()\r
*/\r
public function validate() {\r
parent::validate();\r
}\r
\r
/**\r
- * @see wcf\form\Form::save()\r
+ * @see wcf\form\IForm::save()\r
*/\r
public function save() {\r
parent::save();\r
}\r
\r
/**\r
- * @see wcf\page\Page::assignVariables()\r
+ * @see wcf\page\IPage::assignVariables()\r
*/\r
public function readData() {\r
parent::readData();\r
}\r
\r
/**\r
- * @see wcf\page\Page::assignVariables()\r
+ * @see wcf\page\IPage::assignVariables()\r
*/\r
public function assignVariables() {\r
parent::assignVariables();\r
public $maxResults = 0;\r
\r
/**\r
- * @see wcf\form\Form::readFormParameters()\r
+ * @see wcf\form\IForm::readFormParameters()\r
*/\r
public function readFormParameters() {\r
parent::readFormParameters();\r
}\r
\r
/**\r
- * @see wcf\page\Page::readData()\r
+ * @see wcf\page\IPage::readData()\r
*/\r
public function readData() {\r
parent::readData();\r
}\r
\r
/**\r
- * @see wcf\page\Page::assignVariables()\r
+ * @see wcf\page\IPage::assignVariables()\r
*/\r
public function assignVariables() {\r
parent::assignVariables();\r
}\r
\r
/**\r
- * @see wcf\form\Form::show()\r
+ * @see wcf\form\IForm::show()\r
*/\r
public function show() {\r
// set active menu item\r
}\r
\r
/**\r
- * @see wcf\form\Form::save()\r
+ * @see wcf\form\IForm::save()\r
*/ \r
public function save() {\r
parent::save();\r
}\r
\r
/**\r
- * @see wcf\form\Form::validate()\r
+ * @see wcf\form\IForm::validate()\r
*/\r
public function validate() {\r
AbstractForm::validate();\r
public $conditions = null;
/**
- * @see wcf\form\Form::readFormParameters()
+ * @see wcf\form\IForm::readFormParameters()
*/
public function readFormParameters() {
parent::readFormParameters();
}
/**
- * @see wcf\form\Form::validate()
+ * @see wcf\form\IForm::validate()
*/
public function validate() {
AbstractForm::validate();
}
/**
- * @see wcf\form\Form::save()
+ * @see wcf\form\IForm::save()
*/
public function save() {
parent::save();
}
/**
- * @see wcf\page\Page::readData()
+ * @see wcf\page\IPage::readData()
*/
public function readData() {
parent::readData();
}
/**
- * @see wcf\page\Page::assignVariables()
+ * @see wcf\page\IPage::assignVariables()
*/
public function assignVariables() {
parent::assignVariables();
}
/**
- * @see wcf\form\Form::show()
+ * @see wcf\form\IForm::show()
*/
public function show() {
// set active menu item
}
/**
- * @see wcf\page\Page::assignVariables()
+ * @see wcf\page\IPage::assignVariables()
*/
public function assignVariables() {
parent::assignVariables();
}
/**
- * @see wcf\page\Page::show()
+ * @see wcf\page\IPage::show()
*/
public function show() {
// enable menu item
public $objectListClassName = 'wcf\data\acp\session\access\log\ACPSessionAccessLogList';
/**
- * @see wcf\page\Page::readParameters()
+ * @see wcf\page\IPage::readParameters()
*/
public function readParameters() {
parent::readParameters();
}
/**
- * @see wcf\page\Page::assignVariables()
+ * @see wcf\page\IPage::assignVariables()
*/
public function assignVariables() {
parent::assignVariables();
}
/**
- * @see wcf\page\Page::show()
+ * @see wcf\page\IPage::show()
*/
public function show() {
// enable menu item
public $cacheData = array();
/**
- * @see wcf\page\Page::readParameters()
+ * @see wcf\page\IPage::readParameters()
*/
public function readParameters() {
parent::readParameters();
}
/**
- * @see wcf\page\Page::readData()
+ * @see wcf\page\IPage::readData()
*/
public function readData() {
parent::readData();
}
/**
- * @see wcf\page\Page::assignVariables()
+ * @see wcf\page\IPage::assignVariables()
*/
public function assignVariables() {
parent::assignVariables();
}
/**
- * @see wcf\page\Page::show()
+ * @see wcf\page\IPage::show()
*/
public function show() {
// enable menu item
}
/**
- * @see wcf\page\Page::assignVariables()
+ * @see wcf\page\IPage::assignVariables()
*/
public function assignVariables() {
parent::assignVariables();
}
/**
- * @see wcf\page\Page::show()
+ * @see wcf\page\IPage::show()
*/
public function show() {
// set active menu item.
}
/**
- * @see wcf\page\Page::assignVariables()
+ * @see wcf\page\IPage::assignVariables()
*/
public function assignVariables() {
parent::assignVariables();
}
/**
- * @see wcf\page\Page::show()
+ * @see wcf\page\IPage::show()
*/
public function show() {
// set active menu item.
public $templateName = 'index';\r
\r
/**\r
- * @see wcf\page\Page::show()\r
+ * @see wcf\page\IPage::show()\r
*/\r
public function show() {\r
$wcfPackageID = WCFACP::getWcfPackageID();\r
public $availableUpdates = array();
/**
- * @see wcf\page\Page::assignVariables()
+ * @see wcf\page\IPage::assignVariables()
*/
public function readParameters() {
parent::readParameters();
}
/**
- * @see wcf\page\Page::assignVariables()
+ * @see wcf\page\IPage::assignVariables()
*/
public function assignVariables() {
parent::assignVariables();
}
/**
- * @see wcf\page\Page::show()
+ * @see wcf\page\IPage::show()
*/
public function show() {
// set active menu item
}\r
\r
/**\r
- * @see wcf\page\Page::assignVariables()\r
+ * @see wcf\page\IPage::assignVariables()\r
*/\r
public function assignVariables() {\r
parent::assignVariables();\r
}\r
\r
/**\r
- * @see wcf\page\Page::show()\r
+ * @see wcf\page\IPage::show()\r
*/\r
public function show() {\r
// enable menu item\r
public $queueID = 0;\r
\r
/**\r
- * @see wcf\page\Page::readParameters()\r
+ * @see wcf\page\IPage::readParameters()\r
*/\r
public function readParameters() {\r
parent::readParameters();\r
}\r
\r
/**\r
- * @see wcf\page\Page::show()\r
+ * @see wcf\page\IPage::show()\r
*/\r
public function show() {\r
parent::show();\r
public $packages = array();
/**
- * @see wcf\page\Page::readParameters()
+ * @see wcf\page\IPage::readParameters()
*/
public function readParameters() {
parent::readParameters();
}
/**
- * @see wcf\page\Page::readData()
+ * @see wcf\page\IPage::readData()
*/
public function readData() {
parent::readData();
}
/**
- * @see wcf\page\Page::assignVariables()
+ * @see wcf\page\IPage::assignVariables()
*/
public function assignVariables() {
parent::assignVariables();
}
/**
- * @see Page::show()
+ * @see wcf\page\IPage::show()
*/
public function show() {
// set active menu item
public $dependencies = array();\r
\r
/**\r
- * @see wcf\page\Page::readParameters()\r
+ * @see wcf\page\IPage::readParameters()\r
*/\r
public function readParameters() {\r
parent::readParameters();\r
}\r
\r
/**\r
- * @see wcf\page\Page::readData()\r
+ * @see wcf\page\IPage::readData()\r
*/\r
public function readData() {\r
parent::readData();\r
}\r
\r
/**\r
- * @see wcf\page\Page::assignVariables()\r
+ * @see wcf\page\IPage::assignVariables()\r
*/\r
public function assignVariables() {\r
parent::assignVariables();\r
}\r
\r
/**\r
- * @see wcf\page\Page::show()\r
+ * @see wcf\page\IPage::show()\r
*/\r
public function show() {\r
// enable menu item\r
public $objectListClassName = 'wcf\data\package\update\server\PackageUpdateServerList';\r
\r
/**\r
- * @see wcf\page\Page::readParameters()\r
+ * @see wcf\page\IPage::readParameters()\r
*/\r
public function readParameters() {\r
parent::readParameters();\r
}\r
\r
/**\r
- * @see wcf\page\Page::assignVariables()\r
+ * @see wcf\page\IPage::assignVariables()\r
*/\r
public function assignVariables() {\r
parent::assignVariables();\r
}\r
\r
/**\r
- * @see wcf\page\Page::show()\r
+ * @see wcf\page\IPage::show()\r
*/\r
public function show() {\r
// enable menu item\r
public $objectListClassName = 'wcf\data\user\group\UserGroupList';
/**
- * @see wcf\page\Page::readParameters()
+ * @see wcf\page\IPage::readParameters()
*/
public function readParameters() {
parent::readParameters();
}
/**
- * @see wcf\page\Page::assignVariables()
+ * @see wcf\page\IPage::assignVariables()
*/
public function assignVariables() {
parent::assignVariables();
}
/**
- * @see wcf\page\Page::show()
+ * @see wcf\page\IPage::show()
*/
public function show() {
// enable menu item
public $sqlConditions = '';\r
\r
/**\r
- * @see wcf\page\Page::readParameters()\r
+ * @see wcf\page\IPage::readParameters()\r
*/\r
public function readParameters() {\r
parent::readParameters();\r
}\r
\r
/**\r
- * @see wcf\page\Page::readData()\r
+ * @see wcf\page\IPage::readData()\r
*/\r
public function readData() {\r
parent::readData();\r
}\r
\r
/**\r
- * @see wcf\page\Page::assignVariables()\r
+ * @see wcf\page\IPage::assignVariables()\r
*/\r
public function assignVariables() {\r
parent::assignVariables();\r
}\r
\r
/**\r
- * @see wcf\page\Page::show()\r
+ * @see wcf\page\IPage::show()\r
*/\r
public function show() {\r
// set active menu item\r
\r
/**\r
* object action\r
- * @var DatabaseObjectAction\r
+ * @var wcf\data\IDatabaseObjectAction\r
*/\r
protected $objectAction = null;\r
\r
if (!class_exists($this->className)) {\r
throw new AJAXException("unknown class '".$this->className."'");\r
}\r
- if (!ClassUtil::isInstanceOf($this->className, 'wcf\data\DatabaseObjectAction')) {\r
- throw new AJAXException("'".$this->className."' should implement DatabaseObjectAction");\r
+ if (!ClassUtil::isInstanceOf($this->className, 'wcf\data\IDatabaseObjectAction')) {\r
+ throw new AJAXException("'".$this->className."' should implement wcf\system\IDatabaseObjectAction");\r
}\r
\r
// create object action instance\r
* @subpackage action\r
* @category Community Framework\r
*/\r
-abstract class AbstractAction implements Action {\r
+abstract class AbstractAction implements IAction {\r
/**\r
* Needed modules to execute this action.\r
* \r
}\r
\r
/**\r
- * @see Action::readParameters()\r
+ * @see wcf\action\IAction::readParameters()\r
*/\r
public function readParameters() {\r
// call readParameters event\r
}\r
\r
/**\r
- * @see Action::execute()\r
+ * @see wcf\action\IAction::execute()\r
*/\r
public function execute() {\r
// check modules\r
*/
abstract class AbstractSecureAction extends AbstractAction {
/**
- * @see Action::readParameters()
+ * @see wcf\action\IAction::readParameters()
*/
public function readParameters() {
parent::readParameters();
+++ /dev/null
-<?php\r
-namespace wcf\action;\r
-\r
-/**\r
- * All action classes should implement this interface.\r
- * An action executes a user input without showing a result page or a form. \r
- * \r
- * @author Marcel Werk\r
- * @copyright 2001-2009 WoltLab GmbH\r
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
- * @package com.woltlab.wcf\r
- * @subpackage action\r
- * @category Community Framework\r
- */\r
-interface Action {\r
- /**\r
- * Reads the given parameters.\r
- */\r
- public function readParameters();\r
- \r
- /**\r
- * Executes this action.\r
- */\r
- public function execute();\r
-}
--- /dev/null
+<?php\r
+namespace wcf\action;\r
+\r
+/**\r
+ * All action classes should implement this interface.\r
+ * An action executes a user input without showing a result page or a form. \r
+ * \r
+ * @author Marcel Werk\r
+ * @copyright 2001-2009 WoltLab GmbH\r
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
+ * @package com.woltlab.wcf\r
+ * @subpackage action\r
+ * @category Community Framework\r
+ */\r
+interface IAction {\r
+ /**\r
+ * Reads the given parameters.\r
+ */\r
+ public function readParameters();\r
+ \r
+ /**\r
+ * Executes this action.\r
+ */\r
+ public function execute();\r
+}
* @subpackage data
* @category Community Framework
*/
-abstract class AbstractDatabaseObjectAction implements DatabaseObjectAction {
+abstract class AbstractDatabaseObjectAction implements IDatabaseObjectAction {
/**
* pending action
*
}
/**
- * @see DatabaseObjectAction::validateAction()
+ * @see wcf\data\IDatabaseObjectAction::validateAction()
*/
public function validateAction() {
// validate action name
}
/**
- * @see DatabaseObjectAction::executeAction()
+ * @see wcf\data\IDatabaseObjectAction::executeAction()
*/
public function executeAction() {
// execute action
}
// reset cache
- if (ClassUtil::isInstanceOf($this->className, 'wcf\data\EditableCachedObject')) {
+ if (ClassUtil::isInstanceOf($this->className, 'wcf\data\IEditableCachedObject')) {
call_user_func(array($this->className, 'resetCache'));
}
}
/**
- * @see DatabaseObjectAction::getActionName()
+ * @see wcf\data\IDatabaseObjectAction::getActionName()
*/
public function getActionName() {
return $this->action;
}
/**
- * @see DatabaseObjectAction::getObjectIDs()
+ * @see wcf\data\IDatabaseObjectAction::getObjectIDs()
*/
public function getObjectIDs() {
return $this->objectIDs;
}
/**
- * @see DatabaseObjectAction::getParameters()
+ * @see wcf\data\IDatabaseObjectAction::getParameters()
*/
public function getParameters() {
return $this->parameters;
}
/**
- * @see DatabaseObjectAction::getReturnValues()
+ * @see wcf\data\IDatabaseObjectAction::getReturnValues()
*/
public function getReturnValues() {
return array(
* @subpackage data\r
* @category Community Framework\r
*/\r
-abstract class DatabaseObject implements StorableObject {\r
+abstract class DatabaseObject implements IStorableObject {\r
/**\r
* database table for this object\r
* @var string\r
}\r
\r
/**\r
- * @see StorableObject::__get()\r
+ * @see wcf\data\IStorableObject::__get()\r
*/\r
public function __get($name) {\r
if (isset($this->data[$name])) {\r
}\r
\r
/**\r
- * @see StorableObject::__isset()\r
+ * @see wcf\data\IStorableObject::__isset()\r
*/\r
public function __isset($name) {\r
return isset($this->data[$name]);\r
}\r
\r
/**\r
- * @see StorableObject::getDatabaseTableName()\r
+ * @see wcf\data\IStorableObject::getDatabaseTableName()\r
*/\r
public static function getDatabaseTableName() {\r
return 'wcf'.WCF_N.'_'.static::$databaseTableName;\r
}\r
\r
/**\r
- * @see StorableObject::getDatabaseTableAlias()\r
+ * @see wcf\data\IStorableObject::getDatabaseTableAlias()\r
*/\r
public static function getDatabaseTableAlias() {\r
return static::$databaseTableName;\r
}\r
\r
/**\r
- * @see StorableObject::getDatabaseTableIndexIsIdentity()\r
+ * @see wcf\data\IStorableObject::getDatabaseTableIndexIsIdentity()\r
*/ \r
public static function getDatabaseTableIndexIsIdentity() {\r
return static::$databaseTableIndexIsIdentity;\r
}\r
\r
/**\r
- * @see StorableObject::getDatabaseTableIndexName()\r
+ * @see wcf\data\IStorableObject::getDatabaseTableIndexName()\r
*/\r
public static function getDatabaseTableIndexName() {\r
return static::$databaseTableIndexName;\r
+++ /dev/null
-<?php
-namespace wcf\data;
-
-/**
- * Default interface for DatabaseObject-related actions.
- *
- * @author Marcel Werk
- * @copyright 2001-2011 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage data
- * @category Community Framework
- */
-interface DatabaseObjectAction {
- /**
- * Executes the previously chosen action.
- */
- public function executeAction();
-
- /**
- * Validates action-related parameters.
- */
- public function validateAction();
-
- /**
- * Returns active action name.
- *
- * @return string
- */
- public function getActionName();
-
- /**
- * Returns DatabaseObject-related object ids.
- *
- * @return array<integer>
- */
- public function getObjectIDs();
-
- /**
- * Returns action-related parameters.
- *
- * @return array<array>
- */
- public function getParameters();
-
- /**
- * Returns results returned by active action.
- *
- * @return mixed
- */
- public function getReturnValues();
-}
}
/**
- * @see StorableObject::getDatabaseTableName()
+ * @see wcf\data\IStorableObject::getDatabaseTableName()
*/
public static function getDatabaseTableName() {
return call_user_func(array(static::$baseClass, 'getDatabaseTableName'));
}
/**
- * @see StorableObject::getDatabaseTableIndexIsIdentity()
+ * @see wcf\data\IStorableObject::getDatabaseTableIndexIsIdentity()
*/
public static function getDatabaseTableIndexIsIdentity() {
return call_user_func(array(static::$baseClass, 'getDatabaseTableIndexIsIdentity'));
}
/**
- * @see StorableObject::getDatabaseTableIndexName()
+ * @see wcf\data\IStorableObject::getDatabaseTableIndexName()
*/
public static function getDatabaseTableIndexName() {
return call_user_func(array(static::$baseClass, 'getDatabaseTableIndexName'));
* @subpackage data
* @category Community Framework
*/
-abstract class DatabaseObjectEditor extends DatabaseObjectDecorator implements EditableObject {
+abstract class DatabaseObjectEditor extends DatabaseObjectDecorator implements IEditableObject {
/**
- * @see EditableObject::create()
+ * @see wcf\data\IEditableObject::create()
*/
public static function create(array $parameters = array()) {
$keys = $values = '';
}
/**
- * @see EditableObject::update()
+ * @see wcf\data\IEditableObject::update()
*/
public function update(array $parameters = array()) {
if (!count($parameters)) return;
}
/**
- * @see EditableObject::delete()
+ * @see wcf\data\IEditableObject::delete()
*/
public function delete() {
static::deleteAll(array($this->__get(static::getDatabaseTableIndexName())));
}
/**
- * @see EditableObject::deleteAll()
+ * @see wcf\data\IEditableObject::deleteAll()
*/
public static function deleteAll(array $objectIDs = array()) {
$sql = "DELETE FROM ".static::getDatabaseTableName()."
+++ /dev/null
-<?php
-namespace wcf\data;
-
-/**
- * Abstract class for all cached data holder objects.
- *
- * @author Marcel Werk
- * @copyright 2001-2011 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage data
- * @category Community Framework
- */
-interface EditableCachedObject extends EditableObject {
- /**
- * Resets the cache of this object type.
- */
- public static function resetCache();
-}
+++ /dev/null
-<?php
-namespace wcf\data;
-
-/**
- * Abstract class for all data holder classes.
- *
- * @author Marcel Werk
- * @copyright 2001-2010 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage data
- * @category Community Framework
- */
-interface EditableObject extends StorableObject {
- /**
- * Creates a new object.
- *
- * @param array $parameters
- * @return StorableObject
- */
- public static function create(array $parameters = array());
-
- /**
- * Updates this object.
- *
- * @param array $parameters
- */
- public function update(array $parameters = array());
-
- /**
- * Deletes this object.
- */
- public function delete();
-
- /**
- * Deletes all given objects.
- *
- * @param array $objectIDs
- * @return integer
- */
- public static function deleteAll(array $objectIDs = array());
-}
--- /dev/null
+<?php
+namespace wcf\data;
+
+/**
+ * Default interface for DatabaseObject-related actions.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2011 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage data
+ * @category Community Framework
+ */
+interface IDatabaseObjectAction {
+ /**
+ * Executes the previously chosen action.
+ */
+ public function executeAction();
+
+ /**
+ * Validates action-related parameters.
+ */
+ public function validateAction();
+
+ /**
+ * Returns active action name.
+ *
+ * @return string
+ */
+ public function getActionName();
+
+ /**
+ * Returns DatabaseObject-related object ids.
+ *
+ * @return array<integer>
+ */
+ public function getObjectIDs();
+
+ /**
+ * Returns action-related parameters.
+ *
+ * @return array<array>
+ */
+ public function getParameters();
+
+ /**
+ * Returns results returned by active action.
+ *
+ * @return mixed
+ */
+ public function getReturnValues();
+}
--- /dev/null
+<?php
+namespace wcf\data;
+
+interface IDatabaseObjectProcessor {
+ public function __construct(DatabaseObject $object);
+ public function __get($name);
+ public function __isset($name);
+ public function __call($name, $arguments);
+}
--- /dev/null
+<?php
+namespace wcf\data;
+
+/**
+ * Abstract class for all cached data holder objects.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2011 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage data
+ * @category Community Framework
+ */
+interface IEditableCachedObject extends IEditableObject {
+ /**
+ * Resets the cache of this object type.
+ */
+ public static function resetCache();
+}
--- /dev/null
+<?php
+namespace wcf\data;
+
+/**
+ * Abstract class for all data holder classes.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2010 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage data
+ * @category Community Framework
+ */
+interface IEditableObject extends IStorableObject {
+ /**
+ * Creates a new object.
+ *
+ * @param array $parameters
+ * @return wcf\data\IStorableObject
+ */
+ public static function create(array $parameters = array());
+
+ /**
+ * Updates this object.
+ *
+ * @param array $parameters
+ */
+ public function update(array $parameters = array());
+
+ /**
+ * Deletes this object.
+ */
+ public function delete();
+
+ /**
+ * Deletes all given objects.
+ *
+ * @param array $objectIDs
+ * @return integer
+ */
+ public static function deleteAll(array $objectIDs = array());
+}
--- /dev/null
+<?php
+namespace wcf\data;
+
+/**
+ * Abstract class for all data holder classes.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2010 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage data
+ * @category Community Framework
+ */
+interface IStorableObject {
+ /**
+ * Returns the value of a variable in object data.
+ *
+ * @param string $name variable name
+ * @return mixed value
+ */
+ public function __get($name);
+
+ /**
+ * Determines if a variable is set and is not NULL.
+ *
+ * @param string $name variable name
+ * @return boolean
+ */
+ public function __isset($name);
+
+ /**
+ * Returns the name of the database table.
+ *
+ * @return string
+ */
+ public static function getDatabaseTableName();
+
+ /**
+ * Returns the alias of the database table.
+ *
+ * @return string
+ */
+ public static function getDatabaseTableAlias();
+
+ /**
+ * Returns true if database table index is an identity column.
+ *
+ * @return boolean
+ */
+ public static function getDatabaseTableIndexIsIdentity();
+
+ /**
+ * Returns the name of the database table index.
+ *
+ * @return string
+ */
+ public static function getDatabaseTableIndexName();
+}
--- /dev/null
+<?php
+namespace wcf\data;
+use wcf\system\exception\SystemException;
+use wcf\util\ClassUtil;
+
+/**
+ * Abstract class for all data holder classes.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2011 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage data
+ * @category Community Framework
+ */
+class ProcessibleDatabaseObject extends DatabaseObject {
+ /**
+ * name of the interface the processor of this database object should implement
+ * @var string
+ */
+ protected static $processorInterface = '';
+
+ /**
+ * processor this database object
+ * @var wcf\data\IDatabaseObjectProcessor
+ */
+ protected $processor = null;
+
+ /**
+ * Returns the processor this database object.
+ *
+ * @return wcf\data\IDatabaseObjectProcessor
+ */
+ public function getProcessor() {
+ if ($this->processor === null) {
+ if ($this->className) {
+ if (!class_exists($this->className)) {
+ throw new SystemException("Unable to find class '".$this->className."'");
+ }
+ if (!ClassUtil::isInstanceOf($this->className, 'wcf\data\IDatabaseObjectProcessor')) {
+ throw new SystemException("'".$this->className."' should implement wcf\data\IDatabaseObjectProcessor");
+ }
+ if (!ClassUtil::isInstanceOf($this->className, static::$processorInterface)) {
+ throw new SystemException("'".$this->className."' should implement ".$this->processorInterface);
+ }
+
+ $this->processor = new $this->className($this);
+ }
+ }
+
+ return $this->processor;
+ }
+}
+++ /dev/null
-<?php
-namespace wcf\data;
-
-/**
- * Abstract class for all data holder classes.
- *
- * @author Marcel Werk
- * @copyright 2001-2010 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage data
- * @category Community Framework
- */
-interface StorableObject {
- /**
- * Returns the value of a variable in object data.
- *
- * @param string $name variable name
- * @return mixed value
- */
- public function __get($name);
-
- /**
- * Determines if a variable is set and is not NULL.
- *
- * @param string $name variable name
- * @return boolean
- */
- public function __isset($name);
-
- /**
- * Returns the name of the database table.
- *
- * @return string
- */
- public static function getDatabaseTableName();
-
- /**
- * Returns the alias of the database table.
- *
- * @return string
- */
- public static function getDatabaseTableAlias();
-
- /**
- * Returns true if database table index is an identity column.
- *
- * @return boolean
- */
- public static function getDatabaseTableIndexIsIdentity();
-
- /**
- * Returns the name of the database table index.
- *
- * @return string
- */
- public static function getDatabaseTableIndexName();
-}
<?php
namespace wcf\data\acp\menu\item;
use wcf\data\DatabaseObject;
-use wcf\system\menu\TreeMenuItem;
+use wcf\system\menu\ITreeMenuItem;
use wcf\system\request\LinkHandler;
/**
* @subpackage data.acp.menu.item
* @category Community Framework
*/
-class ACPMenuItem extends DatabaseObject implements TreeMenuItem {
+class ACPMenuItem extends DatabaseObject implements ITreeMenuItem {
/**
* @see DatabaseObject::$databaseTableName
*/
protected static $databaseTableIndexName = 'menuItemID';
/**
- * @see TreeMenuItem::getLink()
+ * @see wcf\system\menu\ITreeMenuItem::getLink()
*/
public function getLink() {
return LinkHandler::getInstance()->getLink($this->menuItemLink);
foreach ($this->objects as $cronjob) {\r
if (!$cronjob->isDeletable()) {\r
throw new ValidateActionException('Insufficient permissions');\r
- } \r
+ }\r
}\r
}\r
\r
<?php
namespace wcf\data\cronjob;
use wcf\data\DatabaseObjectEditor;
-use wcf\data\EditableCachedObject;
+use wcf\data\IEditableCachedObject;
use wcf\system\cache\CacheHandler;
use wcf\system\WCF;
* @subpackage data.cronjob
* @category Community Framework
*/
-class CronjobEditor extends DatabaseObjectEditor implements EditableCachedObject {
+class CronjobEditor extends DatabaseObjectEditor implements IEditableCachedObject {
/**
- * @see DatabaseObjectDecorator::$baseClass
+ * @see wcf\data\DatabaseObjectDecorator::$baseClass
*/
protected static $baseClass = 'wcf\data\cronjob\Cronjob';
/**
- * @see EditableCachedObject::resetCache()
+ * @see wcf\data\IEditableCachedObject::resetCache()
*/
public static function resetCache() {
CacheHandler::getInstance()->clear(WCF_DIR.'cache', 'cache.cronjobs-*');
<?php
namespace wcf\data\option;
use wcf\data\DatabaseObjectEditor;
-use wcf\data\EditableCachedObject;
+use wcf\data\IEditableCachedObject;
use wcf\system\cache\CacheHandler;
use wcf\system\io\File;
use wcf\system\WCF;
* @subpackage data.option
* @category Community Framework
*/
-class OptionEditor extends DatabaseObjectEditor implements EditableCachedObject {
+class OptionEditor extends DatabaseObjectEditor implements IEditableCachedObject {
/**
* options cache file name
* @var string
const FILENAME = 'options.inc.php';
/**
- * @see DatabaseObjectDecorator::$baseClass
+ * @see wcf\data\DatabaseObjectDecorator::$baseClass
*/
protected static $baseClass = 'wcf\data\option\Option';
}
/**
- * @see EditableCachedObject::resetCache()
+ * @see wcf\data\IEditableCachedObject::resetCache()
*/
public static function resetCache() {
// reset cache
--- /dev/null
+<?php\r
+namespace wcf\data\page\location;\r
+use wcf\data\IDatabaseObjectProcessor;\r
+\r
+/**\r
+ * Any page location class should implement this interface.\r
+ *\r
+ * @author Marcel Werk\r
+ * @copyright 2001-2011 WoltLab GmbH\r
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
+ * @package com.woltlab.wcf\r
+ * @subpackage data.page.location\r
+ * @category Community Framework\r
+ */\r
+interface ILocation extends IDatabaseObjectProcessor {\r
+ /**\r
+ * Caches the information of a page location.\r
+ * \r
+ * @param array $location\r
+ * @param string $requestURI\r
+ * @param string $requestMethod\r
+ * @param array $match\r
+ */\r
+ public function cache($location, $requestURI, $requestMethod, $match);\r
+ \r
+ /**\r
+ * Returns the information of a page location.\r
+ * \r
+ * @param array $location\r
+ * @param string $requestURI\r
+ * @param string $requestMethod\r
+ * @param array $match\r
+ * @return string\r
+ */\r
+ public function get($location, $requestURI, $requestMethod, $match);\r
+}
+++ /dev/null
-<?php\r
-/**\r
- * Any page location class should implement this interface.\r
- *\r
- * @author Marcel Werk\r
- * @copyright 2001-2011 WoltLab GmbH\r
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
- * @package com.woltlab.wcf\r
- * @subpackage data.page.location\r
- * @category Community Framework\r
- */\r
-interface Location {\r
- /**\r
- * Caches the information of a page location.\r
- * \r
- * @param array $location\r
- * @param string $requestURI\r
- * @param string $requestMethod\r
- * @param array $match\r
- */\r
- public function cache($location, $requestURI, $requestMethod, $match);\r
- \r
- /**\r
- * Returns the information of a page location.\r
- * \r
- * @param array $location\r
- * @param string $requestURI\r
- * @param string $requestMethod\r
- * @param array $match\r
- * @return string\r
- */\r
- public function get($location, $requestURI, $requestMethod, $match);\r
-}
<?php
namespace wcf\data\page\location;
-use wcf\data\DatabaseObject;
+use wcf\data\ProcessibleDatabaseObject;
/**
* Represents a page location.
* @subpackage data.page.location
* @category Community Framework
*/
-class PageLocation extends DatabaseObject {
+class PageLocation extends ProcessibleDatabaseObject {
/**
* @see DatabaseObject::$databaseTableName
*/
* @see DatabaseObject::$databaseIndexName
*/
protected static $databaseIndexName = 'locationID';
+
+ /**
+ * @see wcf\data\ProcessibleDatabaseObject::$processorInterface
+ */
+ protected static $processorInterface = 'wcf\data\page\location\ILocation';
}
<?php
namespace wcf\data\page\menu\item;
-use wcf\data\DatabaseObject;
-use wcf\system\exception\SystemException;
+use wcf\data\ProcessibleDatabaseObject;
use wcf\system\menu\page\DefaultPageMenuItemProvider;
-use wcf\system\menu\TreeMenuItem;
+use wcf\system\menu\ITreeMenuItem;
use wcf\system\request\LinkHandler;
-use wcf\util\ClassUtil;
/**
* Represents an page menu item.
* @subpackage data.page.menu.item
* @category Community Framework
*/
-class PageMenuItem extends DatabaseObject implements TreeMenuItem {
+class PageMenuItem extends ProcessibleDatabaseObject implements ITreeMenuItem {
/**
* @see DatabaseObject::$databaseTableName
*/
protected static $databaseTableIndexName = 'menuItemID';
/**
- * item provider for this page menu item
- * @var wcf\system\menu\page\PageMenuItemProvider
+ * @see wcf\data\ProcessibleDatabaseObject::$processorInterface
*/
- protected $provider = null;
+ protected static $processorInterface = 'wcf\system\menu\page\IPageMenuItemProvider';
/**
- * Returns the item provider for this page menu item.
- *
- * @return wcf\system\menu\page\PageMenuItemProvider
+ * @see wcf\data\ProcessibleDatabaseObject::getProcessor()
*/
- public function getProvider() {
- if ($this->provider === null) {
- if ($this->className) {
- if (!class_exists($this->className)) {
- throw new SystemException("Unable to find class '".$this->className."'");
- }
- if (!ClassUtil::isInstanceOf($this->className, 'wcf\system\menu\page\PageMenuItemProvider')) {
- throw new SystemException($this->className." should implement wcf\system\menu\page\PageMenuItemProvider");
- }
-
- $this->provider = new $this->className();
- }
- else {
- $this->provider = new DefaultPageMenuItemProvider();
- }
+ public function getProcessor() {
+ if (parent::getProcessor() === null) {
+ $this->processor = new DefaultPageMenuItemProvider($this);
}
- return $this->provider;
+ return $this->processor;
}
/**
- * @see TreeMenuItem::getLink()
+ * @see wcf\system\menu\ITreeMenuItem::getLink()
*/
public function getLink() {
return LinkHandler::getInstance()->getLink($this->menuItemLink);
<?php
namespace wcf\data\page\menu\item;
use wcf\data\DatabaseObjectEditor;
-use wcf\data\EditableCachedObject;
+use wcf\data\IEditableCachedObject;
use wcf\system\cache\CacheHandler;
use wcf\system\WCF;
* @subpackage data.page.menu.item
* @category Community Framework
*/
-class PageMenuItemEditor extends DatabaseObjectEditor implements EditableCachedObject {
+class PageMenuItemEditor extends DatabaseObjectEditor implements IEditableCachedObject {
/**
- * @see DatabaseObjectDecorator::$baseClass
+ * @see wcf\data\DatabaseObjectDecorator::$baseClass
*/
protected static $baseClass = 'wcf\data\page\menu\item\PageMenuItem';
/**
- * @see EditableObject::create()
+ * @see wcf\data\IEditableObject::create()
*
- * @todo Handle language id and create related language item
+ * @todo Handle language id and create related language item
*/
public static function create(array $parameters = array()) {
// calculate show order
}
/**
- * @see EditableObject::update()
+ * @see wcf\data\IEditableObject::update()
*
- * @todo Handle language id and update related language item
+ * @todo Handle language id and update related language item
*/
public function update(array $parameters = array()) {
if (isset($parameters['menuPosition']) && isset($parameters['showOrder'])) {
}
/**
- * @see EditableObject::delete()
+ * @see wcf\data\IEditableObject::delete()
*/
public function delete() {
// update show order
}
/**
- * Clears the page menu cache.
+ * @see wcf\data\IEditableCachedObject::resetCache()
*/
public static function resetCache() {
CacheHandler::getInstance()->clear(WCF_DIR.'cache', 'cache.pageMenu-*.php');
use wcf\data\template\group\TemplateGroupEditor;\r
use wcf\data\template\TemplateEditor;\r
use wcf\data\DatabaseObjectEditor;\r
-use wcf\data\EditableCachedObject;\r
+use wcf\data\IEditableCachedObject;\r
use wcf\system\exception\SystemException;\r
use wcf\system\image\Thumbnail;\r
use wcf\system\io\File;\r
* @subpackage data.style\r
* @category Community Framework\r
*/\r
-class StyleEditor extends DatabaseObjectEditor implements EditableCachedObject {\r
+class StyleEditor extends DatabaseObjectEditor implements IEditableCachedObject {\r
const INFO_FILE = 'style.xml';\r
const STYLE_PREVIEW_IMAGE_MAX_WIDTH = 185;\r
const STYLE_PREVIEW_IMAGE_MAX_HEIGHT = 140;\r
protected static $baseClass = 'wcf\data\style\Style';\r
\r
/**\r
- * @see EditableObject::update()\r
+ * @see wcf\data\IEditableObject::update()\r
*/\r
public function update(array $parameters = array()) {\r
$variables = null;\r
}\r
\r
/**\r
- * @see EditableObject::delete()\r
+ * @see wcf\data\IEditableObject::delete()\r
*/\r
public function delete() {\r
parent::delete();\r
}\r
\r
/**\r
- * @see EditableObject::create()\r
+ * @see wcf\data\IEditableObject::create()\r
*/\r
public static function create(array $parameters = array()) {\r
$variables = null;\r
}\r
\r
/**\r
- * @see EditableCachedObject::resetCache()\r
+ * @see IEditableCachedObject::resetCache()\r
*/\r
public static function resetCache() {\r
WCF::getCache()->clear(WCF_DIR.'cache', 'cache.icon-*-'.$this->styleID.'.php');\r
protected static $baseClass = 'wcf\data\template\Template';
/**
- * @see EditableObject::create()
+ * @see wcf\data\IEditableObject::create()
*/
public static function create(array $parameters = array()) {
// obtain default values
protected static $baseClass = 'wcf\data\user\User';
/**
- * @see EditableObject::create()
+ * @see wcf\data\IEditableObject::create()
*/
public static function create(array $parameters = array()) {
// create salt and password hash
<?php
namespace wcf\data\user\group;
use wcf\data\DatabaseObjectEditor;
-use wcf\data\EditableCachedObject;
+use wcf\data\IEditableCachedObject;
use wcf\data\acp\session\ACPSession;
use wcf\system\cache\CacheHandler;
use wcf\system\database\util\PreparedStatementConditionBuilder;
* @subpackage data.user.group
* @category Community Framework
*/
-class UserGroupEditor extends DatabaseObjectEditor implements EditableCachedObject {
+class UserGroupEditor extends DatabaseObjectEditor implements IEditableCachedObject {
/**
* @see DatabaseObjectDecorator::$baseClass
*/
protected static $baseClass = 'wcf\data\user\group\UserGroup';
/**
- * @see EditableObject::create()
+ * @see wcf\data\IEditableObject::create()
*/
public static function create(array $parameters = array()) {
$group = parent::create($parameters);
}
/**
- * @see EditableCachedObject::resetCache()
+ * @see wcf\data\IEditableCachedObject::resetCache()
*/
public static function resetCache() {
// clear cache
--- /dev/null
+<?php\r
+namespace wcf\data\user\option;\r
+use wcf\data\User;\r
+\r
+/**\r
+ * Any user option output class should implement this interface.\r
+ *\r
+ * @author Marcel Werk\r
+ * @copyright 2001-2011 WoltLab GmbH\r
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
+ * @package com.woltlab.wcf\r
+ * @subpackage data.user.option\r
+ * @category Community Framework\r
+ */\r
+interface IUserOptionOutput {\r
+ /**\r
+ * Returns a short version of the html code for the output of the given user option.\r
+ * \r
+ * @param User $user\r
+ * @param array $optionData\r
+ * @param string $value\r
+ * @return string\r
+ */\r
+ public function getShortOutput(User $user, $optionData, $value);\r
+ \r
+ /**\r
+ * Returns a medium version of the html code for the output of the given user option.\r
+ * \r
+ * @param User $user\r
+ * @param array $optionData\r
+ * @param string $value\r
+ * @return string\r
+ */\r
+ public function getMediumOutput(User $user, $optionData, $value);\r
+ \r
+ /**\r
+ * Returns the html code for the output of the given user option.\r
+ * \r
+ * @param User $user\r
+ * @param array $optionData\r
+ * @param string $value\r
+ * @return string\r
+ */\r
+ public function getOutput(User $user, $optionData, $value);\r
+}
protected static $baseClass = 'wcf\data\user\option\UserOption';\r
\r
/**\r
- * @see EditableObject::create()\r
+ * @see wcf\data\IEditableObject::create()\r
*/\r
public static function create(array $parameters = array()) {\r
$userOption = parent::create($parameters);\r
}\r
\r
/**\r
- * @see EditableObject::update()\r
+ * @see wcf\data\IEditableObject::update()\r
*/\r
public function update(array $parameters = array()) {\r
parent::update($parameters);\r
}\r
\r
/**\r
- * @see EditableObject::delete()\r
+ * @see wcf\data\IEditableObject::delete()\r
*/\r
public function delete() {\r
$sql = "DELETE FROM wcf".WCF_N."_user_option\r
+++ /dev/null
-<?php\r
-namespace wcf\data\user\option;\r
-use wcf\data\User;\r
-\r
-/**\r
- * Any user option output class should implement this interface.\r
- *\r
- * @author Marcel Werk\r
- * @copyright 2001-2011 WoltLab GmbH\r
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
- * @package com.woltlab.wcf\r
- * @subpackage data.user.option\r
- * @category Community Framework\r
- */\r
-interface UserOptionOutput {\r
- /**\r
- * Returns a short version of the html code for the output of the given user option.\r
- * \r
- * @param User $user\r
- * @param array $optionData\r
- * @param string $value\r
- * @return string\r
- */\r
- public function getShortOutput(User $user, $optionData, $value);\r
- \r
- /**\r
- * Returns a medium version of the html code for the output of the given user option.\r
- * \r
- * @param User $user\r
- * @param array $optionData\r
- * @param string $value\r
- * @return string\r
- */\r
- public function getMediumOutput(User $user, $optionData, $value);\r
- \r
- /**\r
- * Returns the html code for the output of the given user option.\r
- * \r
- * @param User $user\r
- * @param array $optionData\r
- * @param string $value\r
- * @return string\r
- */\r
- public function getOutput(User $user, $optionData, $value);\r
-}
protected static $baseClass = 'wcf\data\user\option\category\UserOptionCategory';\r
\r
/**\r
- * @see EditableObject::create()\r
+ * @see wcf\data\IEditableObject::create()\r
*/\r
public static function create(array $parameters = array()) {\r
// obtain default values\r
* @subpackage form\r
* @category Community Framework\r
*/\r
-abstract class AbstractForm extends AbstractPage implements Form {\r
+abstract class AbstractForm extends AbstractPage implements IForm {\r
/**\r
* Name of error field.\r
*\r
public $errorType = '';\r
\r
/**\r
- * @see Form::submit()\r
+ * @see wcf\form\IForm::submit()\r
*/\r
public function submit() {\r
// call submit event\r
}\r
\r
/**\r
- * @see Form::readFormParameters()\r
+ * @see wcf\form\IForm::readFormParameters()\r
*/\r
public function readFormParameters() {\r
// call readFormParameters event\r
}\r
\r
/**\r
- * @see Form::validate()\r
+ * @see wcf\form\IForm::validate()\r
*/\r
public function validate() {\r
// call validate event\r
}\r
\r
/**\r
- * @see Form::save()\r
+ * @see wcf\form\IForm::save()\r
*/\r
public function save() {\r
// call save event\r
}\r
\r
/**\r
- * @see Page::readData()\r
+ * @see wcf\page\IPage::readData()\r
*/\r
public function readData() {\r
if (count($_POST) || count($_FILES)) {\r
}\r
\r
/**\r
- * @see Page::assignVariables()\r
+ * @see wcf\page\IPage::assignVariables()\r
*/\r
public function assignVariables() {\r
parent::assignVariables();\r
*/
abstract class AbstractSecureForm extends AbstractForm {
/**
- * @see Form::readFormParameters()
+ * @see wcf\form\IForm::readFormParameters()
*/
public function readFormParameters() {
parent::readFormParameters();
+++ /dev/null
-<?php\r
-namespace wcf\form;\r
-use wcf\page\Page;\r
-\r
-/**\r
- * All form classes should implement this interface. \r
- * \r
- * @author Marcel Werk\r
- * @copyright 2001-2009 WoltLab GmbH\r
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
- * @package com.woltlab.wcf\r
- * @subpackage form\r
- * @category Community Framework\r
- */\r
-interface Form extends Page {\r
- /**\r
- * Is called when the form was submitted.\r
- */\r
- public function submit();\r
- \r
- /**\r
- * Validates form inputs.\r
- */\r
- public function validate();\r
- \r
- /**\r
- * Saves the data of the form.\r
- */\r
- public function save();\r
- \r
- /**\r
- * Reads the given form parameters.\r
- */\r
- public function readFormParameters();\r
-}
--- /dev/null
+<?php\r
+namespace wcf\form;\r
+use wcf\page\Page;\r
+\r
+/**\r
+ * All form classes should implement this interface. \r
+ * \r
+ * @author Marcel Werk\r
+ * @copyright 2001-2009 WoltLab GmbH\r
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
+ * @package com.woltlab.wcf\r
+ * @subpackage form\r
+ * @category Community Framework\r
+ */\r
+interface IForm extends Page {\r
+ /**\r
+ * Is called when the form was submitted.\r
+ */\r
+ public function submit();\r
+ \r
+ /**\r
+ * Validates form inputs.\r
+ */\r
+ public function validate();\r
+ \r
+ /**\r
+ * Saves the data of the form.\r
+ */\r
+ public function save();\r
+ \r
+ /**\r
+ * Reads the given form parameters.\r
+ */\r
+ public function readFormParameters();\r
+}
* @subpackage page\r
* @category Community Framework\r
*/\r
-abstract class AbstractPage implements Page {\r
+abstract class AbstractPage implements IPage {\r
/**\r
* Name of the template for the called page.\r
* \r
}\r
\r
/**\r
- * @see Page::readParameters()\r
+ * @see wcf\page\IPage::readParameters()\r
*/\r
public function readParameters() {\r
// call readParameters event\r
}\r
\r
/**\r
- * @see Page::readData()\r
+ * @see wcf\page\IPage::readData()\r
*/\r
public function readData() {\r
// call readData event\r
}\r
\r
/**\r
- * @see Page::assignVariables()\r
+ * @see wcf\page\IPage::assignVariables()\r
*/\r
public function assignVariables() {\r
// call assignVariables event\r
}\r
\r
/**\r
- * @see Page::checkModules()\r
+ * @see wcf\page\IPage::checkModules()\r
*/\r
public function checkModules() {\r
// call checkModules event\r
}\r
\r
/**\r
- * @see Page::checkPermissions()\r
+ * @see wcf\page\IPage::checkPermissions()\r
*/\r
public function checkPermissions() {\r
// call checkPermissions event\r
}\r
\r
/**\r
- * @see Page::show()\r
+ * @see wcf\page\IPage::show()\r
*/\r
public function show() {\r
// check modules\r
*/
abstract class AbstractSecurePage extends AbstractPage {
/**
- * @see Page::readParameters()
+ * @see wcf\page\IPage::readParameters()
*/
public function readParameters() {
parent::readParameters();
--- /dev/null
+<?php\r
+namespace wcf\page;\r
+\r
+/**\r
+ * All page classes should implement this interface. \r
+ * \r
+ * @author Marcel Werk\r
+ * @copyright 2001-2009 WoltLab GmbH\r
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
+ * @package com.woltlab.wcf\r
+ * @subpackage page\r
+ * @category Community Framework\r
+ */\r
+interface IPage {\r
+ /**\r
+ * Reads the given parameters.\r
+ */\r
+ public function readParameters();\r
+ \r
+ /**\r
+ * Checks the modules of this page.\r
+ */\r
+ public function checkModules();\r
+ \r
+ /**\r
+ * Checks the permissions of this page.\r
+ */\r
+ public function checkPermissions();\r
+ \r
+ /**\r
+ * Reads/Gets the data to be displayed on this page.\r
+ */\r
+ public function readData();\r
+ \r
+ /**\r
+ * Assigns variables to the template engine.\r
+ */\r
+ public function assignVariables();\r
+ \r
+ /**\r
+ * Shows the requested page.\r
+ */\r
+ public function show();\r
+}
public $sqlOrderBy = '';\r
\r
/**\r
- * @see Page::readParameters()\r
+ * @see wcf\page\IPage::readParameters()\r
*/\r
public function readParameters() {\r
parent::readParameters();\r
}\r
\r
/**\r
- * @see Page::readData()\r
+ * @see wcf\page\IPage::readData()\r
*/\r
public function readData() {\r
parent::readData();\r
}\r
\r
/**\r
- * @see Page::assignVariables()\r
+ * @see wcf\page\IPage::assignVariables()\r
*/\r
public function assignVariables() {\r
parent::assignVariables();\r
+++ /dev/null
-<?php\r
-namespace wcf\page;\r
-\r
-/**\r
- * All page classes should implement this interface. \r
- * \r
- * @author Marcel Werk\r
- * @copyright 2001-2009 WoltLab GmbH\r
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
- * @package com.woltlab.wcf\r
- * @subpackage page\r
- * @category Community Framework\r
- */\r
-interface Page {\r
- /**\r
- * Reads the given parameters.\r
- */\r
- public function readParameters();\r
- \r
- /**\r
- * Checks the modules of this page.\r
- */\r
- public function checkModules();\r
- \r
- /**\r
- * Checks the permissions of this page.\r
- */\r
- public function checkPermissions();\r
- \r
- /**\r
- * Reads/Gets the data to be displayed on this page.\r
- */\r
- public function readData();\r
- \r
- /**\r
- * Assigns variables to the template engine.\r
- */\r
- public function assignVariables();\r
- \r
- /**\r
- * Shows the requested page.\r
- */\r
- public function show();\r
-}
public $defaultSortOrder = 'ASC';\r
\r
/**\r
- * @see Page::readParameters()\r
+ * @see wcf\page\IPage::readParameters()\r
*/\r
public function readParameters() {\r
parent::readParameters();\r
}\r
\r
/**\r
- * @see Page::readData()\r
+ * @see wcf\page\IPage::readData()\r
*/\r
public function readData() {\r
$this->validateSortOrder();\r
}\r
\r
/**\r
- * @see Page::assignVariables()\r
+ * @see wcf\page\IPage::assignVariables()\r
*/\r
public function assignVariables() {\r
parent::assignVariables();\r
*/\r
class InlineCalendar {\r
/**\r
- * @see Page::assignVariables()\r
+ * @see wcf\page\IPage::assignVariables()\r
*/\r
public static function assignVariables() {\r
// create calendar data\r
* @param \Exception $e\r
*/\r
public static final function handleException(\Exception $e) {\r
- if ($e instanceof exception\PrintableException) {\r
+ if ($e instanceof exception\IPrintableException) {\r
$e->show();\r
exit;\r
}\r
*/\r
protected function loadDefaultCacheResources() {\r
CacheHandler::getInstance()->addResource('languages', WCF_DIR.'cache/cache.languages.php', 'wcf\system\cache\builder\CacheBuilderLanguage');\r
- CacheHandler::getInstance()->addResource('spiders', WCF_DIR.'cache/cache.spiders.php', 'wcf\system\builder\cache\CacheBuilderSpider');\r
+ CacheHandler::getInstance()->addResource('spiders', WCF_DIR.'cache/cache.spiders.php', 'wcf\system\cache\builder\CacheBuilderSpider');\r
if (defined('PACKAGE_ID')) {\r
CacheHandler::getInstance()->addResource('coreObjects-'.PACKAGE_ID, WCF_DIR.'cache/cache.coreObjects-'.PACKAGE_ID.'.php', 'wcf\system\cache\builder\CacheBuilderCoreObject');\r
}\r
self::$autoloadDirectories[$abbreviation] = $packageDir . 'lib/';\r
\r
$className = $abbreviation.'\system\\'.strtoupper($abbreviation).'Core';\r
- if (class_exists($className) && util\ClassUtil::isInstanceOf($className, 'wcf\system\application\Application')) {\r
+ if (class_exists($className) && util\ClassUtil::isInstanceOf($className, 'wcf\system\application\IApplication')) {\r
// include config file\r
$configPath = $packageDir . PackageInstallationDispatcher::CONFIG_FILE;\r
if (file_exists($configPath)) {\r
* @subpackage system
* @category Community Framework
*/
-abstract class AbstractApplication implements Application {
+abstract class AbstractApplication implements IApplication {
/**
- * @see Application::__callStatic()
+ * @see wcf\system\application\IApplication::__callStatic()
*/
public static function __callStatic($method, array $arguments) {
return call_user_func_array(array('wcf\system\WCF', $method), $arguments);
+++ /dev/null
-<?php
-namespace wcf\system\application;
-
-/**
- * Default interface for all applications for the community framework.
- *
- * @author Alexander Ebert
- * @copyright 2001-2011 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage system
- * @category Community Framework
- */
-interface Application {
- /**
- * Forwards unknown method calls to WCF.
- *
- * @param string $method
- * @param array $arguments
- * @return mixed
- */
- public static function __callStatic($method, array $arguments);
-}
* Returns the primary application for current group. Will return current
* application equal to PACKAGE_ID if not within any group.
*
- * @return Application
+ * @return wcf\data\application\Application
*/
public function getPrimaryApplication() {
return $this->cache['application'][$this->cache['primary']];
* Returns an application based upon it's abbreviation. Will return the
* primary application if $abbreviation equals to 'wcf'
*
- * @return Application
+ * @return wcf\data\application\Application
*/
public function getApplication($abbreviation) {
if ($abbreviation == 'wcf') {
* Returns active application group or 'null' if current application
* is not within a group.
*
- * @return ApplicationGroup
+ * @return wcf\data\application\group\ApplicationGroup
*/
public function getActiveGroup() {
return $this->cache['group'];
* Returns pseudo-application representing WCF used for special cases,
* e.g. cross-domain files requestable through the webserver.
*
- * @return Application
+ * @return wcf\data\application\Application
*/
public function getWCF() {
return $this->cache['wcf'];
/**
* Returns the currently active application.
*
- * @return wcf\data\application\Application
+ * @return wcf\data\application\Application
*/
public function getActiveApplication() {
return $this->cache['application'][PACKAGE_ID];
/**
* Returns a list of dependent applications.
*
- * @return array<wcf\data\application\Application>
+ * @return array<wcf\data\application\Application>
*/
public function getDependentApplications() {
$applications = array();
--- /dev/null
+<?php
+namespace wcf\system\application;
+
+/**
+ * Default interface for all applications for the community framework.
+ *
+ * @author Alexander Ebert
+ * @copyright 2001-2011 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage system
+ * @category Community Framework
+ */
+interface IApplication {
+ /**
+ * Forwards unknown method calls to WCF.
+ *
+ * @param string $method
+ * @param array $arguments
+ * @return mixed
+ */
+ public static function __callStatic($method, array $arguments);
+}
+++ /dev/null
-<?php\r
-namespace wcf\system\cache;\r
-\r
-/**\r
- * A CacheBuilder provides data to the CacheHandler that ought to be cached.\r
- * \r
- * @author Marcel Werk\r
- * @copyright 2001-2011 WoltLab GmbH\r
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
- * @package com.woltlab.wcf\r
- * @subpackage system.cache\r
- * @category Community Framework\r
- */\r
-interface CacheBuilder {\r
- /**\r
- * Returns the data that ought to be cached.\r
- *\r
- * @param array $cacheResource\r
- * @return array $data\r
- */\r
- public function getData($cacheResource);\r
-}
/**\r
* cache source object\r
* \r
- * @var CacheSource\r
+ * @var wcf\system\cache\source\ICacheSource\r
*/\r
protected $cacheSource = null;\r
\r
--- /dev/null
+<?php\r
+namespace wcf\system\cache;\r
+\r
+/**\r
+ * A CacheBuilder provides data to the CacheHandler that ought to be cached.\r
+ * \r
+ * @author Marcel Werk\r
+ * @copyright 2001-2011 WoltLab GmbH\r
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
+ * @package com.woltlab.wcf\r
+ * @subpackage system.cache\r
+ * @category Community Framework\r
+ */\r
+interface ICacheBuilder {\r
+ /**\r
+ * Returns the data that ought to be cached.\r
+ *\r
+ * @param array $cacheResource\r
+ * @return array $data\r
+ */\r
+ public function getData($cacheResource);\r
+}
<?php\r
namespace wcf\system\cache\builder;\r
use wcf\data\acp\menu\item\ACPMenuItem;\r
-use wcf\system\cache\CacheBuilder;\r
+use wcf\system\cache\ICacheBuilder;\r
use wcf\system\database\util\PreparedStatementConditionBuilder;\r
use wcf\system\WCF;\r
\r
* @subpackage system.cache.builder\r
* @category Community Framework\r
*/\r
-class CacheBuilderACPMenu implements CacheBuilder {\r
+class CacheBuilderACPMenu implements ICacheBuilder {\r
protected $optionCategoryStructure = array();\r
\r
/**\r
- * @see CacheBuilder::getData()\r
+ * @see wcf\system\cache\ICacheBuilder::getData()\r
*/\r
public function getData($cacheResource) {\r
list($cache, $packageID) = explode('-', $cacheResource['cache']); \r
use wcf\data\application;
use wcf\data\package\Package;
use wcf\data\package\PackageList;
-use wcf\system\cache\CacheBuilder;
+use wcf\system\cache\ICacheBuilder;
use wcf\system\WCF;
/**
* @subpackage system.cache.builder
* @category Community Framework
*/
-class CacheBuilderApplication implements CacheBuilder {
+class CacheBuilderApplication implements ICacheBuilder {
/**
- * @see CacheBuilder::getData()
+ * @see wcf\system\cache\ICacheBuilder::getData()
*/
public function getData($cacheResource) {
list($cache, $packageID) = explode('-', $cacheResource['cache']);
<?php
namespace wcf\system\cache\builder;
-use wcf\system\cache\CacheBuilder;
+use wcf\system\cache\ICacheBuilder;
use wcf\system\WCF;
/**
* @subpackage system.cache.builder
* @category Community Framework
*/
-class CacheBuilderCleanupAdapter implements CacheBuilder {
+class CacheBuilderCleanupAdapter implements ICacheBuilder {
/**
- * @see CacheBuilder::getData()
+ * @see wcf\system\cache\ICacheBuilder::getData()
*/
public function getData($cacheResource) {
list($cache, $packageID) = explode('-', $cacheResource['cache']);
<?php
namespace wcf\system\cache\builder;
-use wcf\system\cache\CacheBuilder;
+use wcf\system\cache\ICacheBuilder;
use wcf\data\core\object\CoreObjectList;
use wcf\system\package\PackageDependencyHandler;
* @subpackage system.cache.builder
* @category Community Framework
*/
-class CacheBuilderCoreObject implements CacheBuilder {
+class CacheBuilderCoreObject implements ICacheBuilder {
/**
- * @see CacheBuilder::getData()
+ * @see wcf\system\cache\ICacheBuilder::getData()
*/
public function getData($cacheResource) {
list($cache, $packageID) = explode('-', $cacheResource['cache']);
<?php
namespace wcf\system\cache\builder;
-use wcf\system\cache\CacheBuilder;
+use wcf\system\cache\ICacheBuilder;
use wcf\system\database\util\PreparedStatementConditionBuilder;
use wcf\system\package\PackageDependencyHandler;
use wcf\system\WCF;
* @subpackage system.cache.builder
* @category Community Framework
*/
-class CacheBuilderCronjob implements CacheBuilder {
+class CacheBuilderCronjob implements ICacheBuilder {
/**
- * @see CacheBuilder::getData()
+ * @see wcf\system\cache\ICacheBuilder::getData()
*/
public function getData($cacheResource) {
// get next execution time
<?php\r
namespace wcf\system\cache\builder;\r
-use wcf\system\cache\CacheBuilder;\r
+use wcf\system\cache\ICacheBuilder;\r
use wcf\system\event\listener\EventHandler;\r
use wcf\system\WCF;\r
use wcf\util\StringUtil;\r
* @subpackage system.cache.builder\r
* @category Community Framework\r
*/\r
-class CacheBuilderEventListener implements CacheBuilder {\r
+class CacheBuilderEventListener implements ICacheBuilder {\r
/**\r
- * @see CacheBuilder::getData()\r
+ * @see wcf\system\cache\ICacheBuilder::getData()\r
*/\r
public function getData($cacheResource) {\r
list($cache, $packageID) = explode('-', $cacheResource['cache']); \r
<?php
namespace wcf\system\cache\builder;
use wcf\data\package\Package;
-use wcf\system\cache\CacheBuilder;
+use wcf\system\cache\ICacheBuilder;
use wcf\system\database\util\PreparedStatementConditionBuilder;
use wcf\system\package\PackageDependencyHandler;
use wcf\system\WCF;
* @subpackage system.cache.builder
* @category Community Framework
*/
-class CacheBuilderIcon implements CacheBuilder {
+class CacheBuilderIcon implements ICacheBuilder {
/**
- * @see CacheBuilder::getData()
+ * @see wcf\system\cache\ICacheBuilder::getData()
*/
public function getData($cacheResource) {
list($cache, $packageID, $styleID) = explode('-', $cacheResource['cache']);
<?php\r
namespace wcf\system\cache\builder;\r
-use wcf\system\cache\CacheBuilder;\r
+use wcf\system\cache\ICacheBuilder;\r
use wcf\system\WCF;\r
\r
/**\r
* @subpackage system.cache.builder\r
* @category Community Framework\r
*/\r
-class CacheBuilderLanguage implements CacheBuilder {\r
+class CacheBuilderLanguage implements ICacheBuilder {\r
/**\r
- * @see CacheBuilder::getData()\r
+ * @see wcf\system\cache\ICacheBuilder::getData()\r
*/\r
public function getData($cacheResource) {\r
$languageToPackages = array();\r
namespace wcf\system\cache\builder;\r
use wcf\data\option\category\OptionCategory;\r
use wcf\data\option\Option;\r
-use wcf\system\cache\CacheBuilder;\r
+use wcf\system\cache\ICacheBuilder;\r
use wcf\system\database\util\PreparedStatementConditionBuilder;\r
use wcf\system\WCF;\r
\r
* @subpackage system.cache.builder\r
* @category Community Framework\r
*/\r
-class CacheBuilderOption implements CacheBuilder {\r
+class CacheBuilderOption implements ICacheBuilder {\r
/**\r
- * @see CacheBuilder::getData()\r
+ * @see wcf\system\cache\ICacheBuilder::getData()\r
*/\r
public function getData($cacheResource) {\r
$information = explode('-', $cacheResource['cache']);\r
<?php\r
namespace wcf\system\cache\builder;\r
use wcf\data\package\PackageList;\r
-use wcf\system\cache\CacheBuilder;\r
+use wcf\system\cache\ICacheBuilder;\r
use wcf\system\WCF;\r
\r
/**\r
* @subpackage system.cache.builder\r
* @category Community Framework\r
*/\r
-class CacheBuilderPackage implements CacheBuilder {\r
+class CacheBuilderPackage implements ICacheBuilder {\r
/**\r
- * @see CacheBuilder::getData()\r
+ * @see wcf\system\cache\ICacheBuilder::getData()\r
*/\r
public function getData($cacheResource) {\r
$packageList = new PackageList();\r
<?php
namespace wcf\system\cache\builder;
-use wcf\system\cache\CacheBuilder;
+use wcf\system\cache\ICacheBuilder;
use wcf\system\WCF;
/**
* @subpackage system.cache.builder
* @category Community Framework
*/
-class CacheBuilderPackageDependency implements CacheBuilder {
+class CacheBuilderPackageDependency implements ICacheBuilder {
/**
- * @see CacheBuilder::getData()
+ * @see wcf\system\cache\ICacheBuilder::getData()
*/
public function getData($cacheResource) {
list($cache, $packageID) = explode('-', $cacheResource['cache']);
<?php
namespace wcf\system\cache\builder;
use wcf\data\page\menu\item\PageMenuItem;
-use wcf\system\cache\CacheBuilder;
+use wcf\system\cache\ICacheBuilder;
use wcf\system\database\util\PreparedStatementConditionBuilder;
use wcf\system\WCF;
* @subpackage system.cache.builder
* @category Community Framework
*/
-class CacheBuilderPageMenu implements CacheBuilder {
+class CacheBuilderPageMenu implements ICacheBuilder {
/**
- * @see CacheBuilder::getData()
+ * @see wcf\system\cache\ICacheBuilder::getData()
*/
public function getData($cacheResource) {
list($cache, $packageID) = explode('-', $cacheResource['cache']);
<?php\r
namespace wcf\system\cache\builder;\r
use wcf\data\spider\SpiderList;\r
-use wcf\system\cache\CacheBuilder;\r
+use wcf\system\cache\ICacheBuilder;\r
\r
/**\r
* Caches the list of search engine spiders.\r
* @subpackage system.cache.builder\r
* @category Community Framework\r
*/\r
-class CacheBuilderSpider implements CacheBuilder {\r
+class CacheBuilderSpider implements ICacheBuilder {\r
/**\r
- * @see CacheBuilder::getData()\r
+ * @see wcf\system\cache\ICacheBuilder::getData()\r
*/\r
public function getData($cacheResource) {\r
$spiderList = new SpiderList();\r
<?php\r
namespace wcf\system\cache\builder;\r
use wcf\data\style\Style;\r
-use wcf\system\cache\CacheBuilder;\r
+use wcf\system\cache\ICacheBuilder;\r
use wcf\system\WCF;\r
\r
/**\r
* @subpackage system.cache.builder\r
* @category Community Framework\r
*/\r
-class CacheBuilderStyle implements CacheBuilder {\r
+class CacheBuilderStyle implements ICacheBuilder {\r
/**\r
- * @see CacheBuilder::getData()\r
+ * @see wcf\system\cache\ICacheBuilder::getData()\r
*/\r
public function getData($cacheResource) {\r
$data = array('default' => 0, 'styles' => array(), 'packages' => array());\r
<?php\r
namespace wcf\system\cache\builder;\r
-use wcf\system\cache\CacheBuilder;\r
+use wcf\system\cache\ICacheBuilder;\r
use wcf\system\WCF;\r
\r
/**\r
* @subpackage system.cache.builder\r
* @category Community Framework\r
*/\r
-class CacheBuilderTemplate implements CacheBuilder {\r
+class CacheBuilderTemplate implements ICacheBuilder {\r
/**\r
- * @see CacheBuilder::getData()\r
+ * @see wcf\system\cache\ICacheBuilder::getData()\r
*/\r
public function getData($cacheResource) {\r
$information = explode('-', $cacheResource['cache']);\r
<?php
namespace wcf\system\cache\builder;
use wcf\data\template\group\TemplateGroupList;
-use wcf\system\cache\CacheBuilder;
+use wcf\system\cache\ICacheBuilder;
/**
* Caches template groups.
* @subpackage system.cache.builder
* @category Community Framework
*/
-class CacheBuilderTemplateGroup implements CacheBuilder {
+class CacheBuilderTemplateGroup implements ICacheBuilder {
/**
- * @see CacheBuilder::getData()
+ * @see wcf\system\cache\ICacheBuilder::getData()
*/
public function getData($cacheResource) {
$templateGroupList = new TemplateGroupList();
<?php
namespace wcf\system\cache\builder;
use wcf\data\template\listener\TemplateListenerList;
-use wcf\system\cache\CacheBuilder;
+use wcf\system\cache\ICacheBuilder;
use wcf\system\package\PackageDependencyHandler;
/**
* @subpackage system.cache.builder
* @category Community Framework
*/
-class CacheBuilderTemplateListener implements CacheBuilder {
+class CacheBuilderTemplateListener implements ICacheBuilder {
/**
- * @see CacheBuilder::getData()
+ * @see wcf\system\cache\ICacheBuilder::getData()
*/
public function getData($cacheResource) {
list($cache, $packageID, $environment) = explode('-', $cacheResource['cache']);
<?php
namespace wcf\system\cache\builder;
use wcf\data\template\listener\TemplateListenerList;
-use wcf\system\cache\CacheBuilder;
+use wcf\system\cache\ICacheBuilder;
use wcf\system\package\PackageDependencyHandler;
/**
* @subpackage system.cache.builder
* @category Community Framework
*/
-class CacheBuilderTemplateListenerCode implements CacheBuilder {
+class CacheBuilderTemplateListenerCode implements ICacheBuilder {
/**
- * @see CacheBuilder::getData()
+ * @see wcf\system\cache\ICacheBuilder::getData()
*/
public function getData($cacheResource) {
list($packageID, $environment, $templateName) = explode('-', $cacheResource['cache']);
<?php\r
namespace wcf\system\cache\builder;\r
use wcf\data\user\group\UserGroupList;\r
-use wcf\system\cache\CacheBuilder;\r
+use wcf\system\cache\ICacheBuilder;\r
\r
/**\r
* Caches all user groups.\r
* @subpackage system.cache.builder\r
* @category Community Framework\r
*/\r
-class CacheBuilderUserGroup implements CacheBuilder {\r
+class CacheBuilderUserGroup implements ICacheBuilder {\r
/**\r
- * @see CacheBuilder::getData()\r
+ * @see wcf\system\cache\ICacheBuilder::getData()\r
*/\r
public function getData($cacheResource) {\r
$data = array('types' => array(), 'groups' => array());\r
<?php\r
namespace wcf\system\cache\builder;\r
-use wcf\system\cache\CacheBuilder;\r
+use wcf\system\cache\ICacheBuilder;\r
use wcf\system\database\util\PreparedStatementConditionBuilder;\r
use wcf\system\exception\SystemException;\r
use wcf\system\WCF;\r
* @subpackage system.cache.builder\r
* @category Community Framework\r
*/\r
-class CacheBuilderUserGroupPermission implements CacheBuilder {\r
+class CacheBuilderUserGroupPermission implements ICacheBuilder {\r
protected $typeObjects = array();\r
\r
/**\r
- * @see CacheBuilder::getData()\r
+ * @see wcf\system\cache\ICacheBuilder::getData()\r
*/\r
public function getData($cacheResource) {\r
list($cache, $packageID, $groupIDs) = explode('-', $cacheResource['cache']);\r
* Returns an object of the requested group option type.\r
* \r
* @param string $type\r
- * @return GroupOptionType\r
+ * @return wcf\system\option\group\IGroupOptionType\r
*/\r
protected function getTypeObject($type) {\r
if (!isset($this->typeObjects[$type])) {\r
if (!class_exists($className)) {\r
throw new SystemException("unable to find class '".$className."'", 11001);\r
}\r
- if (!ClassUtil::isInstanceOf($className, 'wcf\system\option\group\GroupOptionType')) {\r
- throw new SystemException("'".$className."' should implement GroupOptionType");\r
+ if (!ClassUtil::isInstanceOf($className, 'wcf\system\option\group\IGroupOptionType')) {\r
+ throw new SystemException("'".$className."' should implement wcf\system\option\group\IGroupOptionType");\r
}\r
\r
// create instance\r
* @subpackage system.cache.source
* @category Community Framework
*/
-class ApcCacheSource implements CacheSource {
+class ApcCacheSource implements ICacheSource {
/**
* Creates a new ApcCacheSource object.
*/
}
/**
- * @see wcf\system\cache\source\CacheSource::get()
+ * @see wcf\system\cache\source\ICacheSource::get()
*/
public function get(array $cacheResource) {
if (($data = apc_fetch($cacheResource['file'])) === false) {
}
/**
- * @see wcf\system\cache\source\CacheSource::set()
+ * @see wcf\system\cache\source\ICacheSource::set()
*/
public function set(array $cacheResource, $value) {
apc_store($cacheResource['file'], $value, $cacheResource['maxLifetime']);
}
/**
- * @see wcf\system\cache\source\CacheSource::delete()
+ * @see wcf\system\cache\source\ICacheSource::delete()
*/
public function delete(array $cacheResource, $ignoreLifetime = false) {
if ($ignoreLifetime || ($cacheResource['minLifetime'] == 0 || $this->checkMinLifetime($cacheResource))) {
}
/**
- * @see wcf\system\cache\source\CacheSource::clear()
+ * @see wcf\system\cache\source\ICacheSource::clear()
*/
public function clear($directory, $filepattern, $forceDelete = false) {
$pattern = preg_quote(FileUtil::addTrailingSlash($directory), '%').str_replace('*', '.*', str_replace('.', '\.', $filepattern));
}
/**
- * @see wcf\system\cache\source\CacheSource::close()
+ * @see wcf\system\cache\source\ICacheSource::close()
*/
public function close() {
// does nothing
}
/**
- * @see wcf\system\cache\source\CacheSource::flush()
+ * @see wcf\system\cache\source\ICacheSource::flush()
*/
public function flush() {
apc_clear_cache('user');
}
}
-?>
+++ /dev/null
-<?php
-namespace wcf\system\cache\source;
-
-/**
- * Any cache sources should implement this interface.
- *
- * @author Marcel Werk
- * @copyright 2001-2011 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage system.cache.source
- * @category Community Framework
- */
-interface CacheSource {
- /**
- * Returns a cached variable.
- *
- * @param array $cacheResource
- * @return mixed
- */
- public function get(array $cacheResource);
-
- /**
- * Stores a variable in the cache.
- *
- * @param array $cacheResource
- * @param mixed $value
- */
- public function set(array $cacheResource, $value);
-
- /**
- * Deletes a variable in the cache.
- *
- * @param array $cacheResource
- * @param boolean $ignoreLifetime
- */
- public function delete(array $cacheResource, $ignoreLifetime = false);
-
- /**
- * Marks cached files as obsolete.
- *
- * @param string $directory
- * @param string $filepattern
- * @param boolean $forceDelete
- */
- public function clear($directory, $filepattern, $forceDelete = false);
-
- /**
- * Closes this cache source.
- */
- public function close();
-
- /**
- * Clears the cache completely.
- */
- public function flush();
-}
* @subpackage system.cache.source
* @category Community Framework
*/
-class DiskCacheSource implements CacheSource {
+class DiskCacheSource implements ICacheSource {
/**
* Loaded cache
*
protected $loaded = array();
/**
- * @see wcf\system\cache\source\CacheSource::get()
+ * @see wcf\system\cache\source\ICacheSource::get()
*/
public function get(array $cacheResource) {
if (!isset($this->cache[$cacheResource['cache']])) {
}
/**
- * @see wcf\system\cache\source\CacheSource::set()
+ * @see wcf\system\cache\source\ICacheSource::set()
*/
public function set(array $cacheResource, $value) {
// write cache
}
/**
- * @see wcf\system\cache\source\CacheSource::delete()
+ * @see wcf\system\cache\source\ICacheSource::delete()
*/
public function delete(array$cacheResource, $ignoreLifetime = false) {
if (file_exists($cacheResource['file'])) {
}
/**
- * @see wcf\system\cache\source\CacheSource::clear()
+ * @see wcf\system\cache\source\ICacheSource::clear()
*/
public function clear($directory, $filepattern, $forceDelete = false) {
$filepattern = str_replace('*', '.*', str_replace('.', '\.', $filepattern));
}
/**
- * @see wcf\system\cache\source\CacheSource::close()
+ * @see wcf\system\cache\source\ICacheSource::close()
*/
public function close() {
// does nothing
}
/**
- * @see wcf\system\cache\source\CacheSource::flush()
+ * @see wcf\system\cache\source\ICacheSource::flush()
*/
public function flush() {
$sql = "SELECT package.packageDir
--- /dev/null
+<?php
+namespace wcf\system\cache\source;
+
+/**
+ * Any cache sources should implement this interface.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2011 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage system.cache.source
+ * @category Community Framework
+ */
+interface ICacheSource {
+ /**
+ * Returns a cached variable.
+ *
+ * @param array $cacheResource
+ * @return mixed
+ */
+ public function get(array $cacheResource);
+
+ /**
+ * Stores a variable in the cache.
+ *
+ * @param array $cacheResource
+ * @param mixed $value
+ */
+ public function set(array $cacheResource, $value);
+
+ /**
+ * Deletes a variable in the cache.
+ *
+ * @param array $cacheResource
+ * @param boolean $ignoreLifetime
+ */
+ public function delete(array $cacheResource, $ignoreLifetime = false);
+
+ /**
+ * Marks cached files as obsolete.
+ *
+ * @param string $directory
+ * @param string $filepattern
+ * @param boolean $forceDelete
+ */
+ public function clear($directory, $filepattern, $forceDelete = false);
+
+ /**
+ * Closes this cache source.
+ */
+ public function close();
+
+ /**
+ * Clears the cache completely.
+ */
+ public function flush();
+}
* @subpackage system.cache.source
* @category Community Framework
*/
-class MemcacheCacheSource implements CacheSource {
+class MemcacheCacheSource implements ICacheSource {
/**
* MemcacheAdapter object
*
// CacheSource implementations
/**
- * @see wcf\system\cache\source\CacheSource::get()
+ * @see wcf\system\cache\source\ICacheSource::get()
*/
public function get(array $cacheResource) {
$value = $this->getAdapter()->getMemcache()->get($cacheResource['file']);
}
/**
- * @see wcf\system\cache\source\CacheSource::set()
+ * @see wcf\system\cache\source\ICacheSource::set()
*/
public function set(array $cacheResource, $value) {
$this->getAdapter()->getMemcache()->set($cacheResource['file'], $value, MEMCACHE_COMPRESSED, $cacheResource['maxLifetime']);
}
/**
- * @see wcf\system\cache\source\CacheSource::delete()
+ * @see wcf\system\cache\source\ICacheSource::delete()
*/
public function delete(array $cacheResource, $ignoreLifetime = false) {
$this->getAdapter()->getMemcache()->delete($cacheResource['file']);
}
/**
- * @see wcf\system\cache\source\CacheSource::clear()
+ * @see wcf\system\cache\source\ICacheSource::clear()
*/
public function clear($directory, $filepattern, $forceDelete = false) {
$this->loadLog();
}
/**
- * @see wcf\system\cache\source\CacheSource::flush()
+ * @see wcf\system\cache\source\ICacheSource::flush()
*/
public function flush() {
// clear cache
}
/**
- * @see wcf\system\cache\source\CacheSource::close()
+ * @see wcf\system\cache\source\ICacheSource::close()
*/
public function close() {
// update log
+++ /dev/null
-<?php\r
-namespace wcf\system\cleanup;\r
-\r
-/**\r
- * Default interface for cleanup adapters.\r
- * \r
- * @author Alexander Ebert\r
- * @copyright 2001-2011 WoltLab GmbH\r
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
- * @package com.woltlab.wcf\r
- * @subpackage system.cleanup\r
- * @category Community Framework\r
- */\r
-interface CleanupAdapter {\r
- /**\r
- * Executes this adapter.\r
- * \r
- * @param array $objectIDs\r
- */\r
- public function execute(array $objectIDs);\r
-}
+++ /dev/null
-<?php
-namespace wcf\system\cleanup;
-use wcf\system\cache\CacheHandler;
-use wcf\system\database\util\PreparedStatementConditionBuilder;
-use wcf\system\event\EventHandler;
-use wcf\system\exception\SystemException;
-use wcf\system\WCF;
-use wcf\util\ArrayUtil;
-use wcf\util\ClassUtil;
-
-/**
- * Handles cleanup related actions.
- *
- * @author Alexander Ebert
- * @copyright 2001-2011 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage system.cleanup
- * @category Community Framework
- */
-class CleanupHandler {
- /**
- * unique instance of CleanupHandler
- *
- * @var CleanupHandler
- */
- protected static $instance = null;
-
- /**
- * cleanup adapter cache
- *
- * @var array<array>
- */
- protected $cache = null;
-
- /**
- * Initializes cleanup handler.
- */
- protected function __construct() {
- $this->loadCache();
- }
-
- /**
- * Prevents creating an additional instance.
- */
- protected function __clone() {}
-
- /**
- * Loads cleanup adapter cache.
- */
- protected function loadCache() {
- CacheHandler::getInstance()->addResource(
- 'cleanupAdapter-'.PACKAGE_ID,
- WCF_DIR.'cache/cache.cleanupAdapter.php',
- 'wcf\system\cache\builder\CacheBuilderCleanupAdapter'
- );
-
- $this->cache = CacheHandler::getInstance()->get('cleanupAdapter');
- }
-
- /**
- * Prepares adapter execution
- */
- public function execute() {
- // remove all logged items older than 24 hours
- $sql = "DELETE FROM wcf".WCF_N."_cleanup_log
- WHERE deleteTime < ?";
- $statement = WCF::getDB()->prepareStatement($sql);
- $statement->execute(array(
- (TIME_NOW - 86400)
- ));
-
- // loop through all available adapters
- foreach ($this->cache['adapters'] as $objectType => $adapters) {
- // determine if there are any items for current object type
- $conditions = new PreparedStatementConditionBuilder();
- $conditions->add("objectType = ?", array($objectType));
- $conditions->add("packageID IN (?)", array($this->cache['objectTypes'][$objectType]));
-
- $sql = "SELECT objectID
- FROM wcf".WCF_N."_cleanup_log
- ".$conditions;
- $statement = WCF::getDB()->prepareStatement($sql);
- $statement->execute($conditions->getParameters());
-
- $objectIDs = array();
- while ($row = $statement->fetchArray()) {
- $objectIDs[] = $row['objectID'];
- }
-
- if (count($objectIDs)) {
- $this->executeAdapters($adapters, $objectIDs);
- }
- }
- }
-
- /**
- * Executes specific cleanup adapters.
- *
- * @param array $adapters
- * @param array $objectIDs
- */
- protected function executeAdapters(array $adapters, array $objectIDs) {
- $sql = "UPDATE wcf".WCF_N."_cleanup_listener
- SET lastUpdateTime = ?
- WHERE listenerID = ?";
- $statement = WCF::getDB()->prepareStatement($sql);
-
- foreach ($adapters as $adapterData) {
- // validate class
- if (!class_exists($adapterData['className'])) {
- throw new SystemException("unable to find class '".$adapterData['className']."'", 11001);
- }
-
- // validate interface
- if (!(ClassUtil::isInstanceOf($adapterData['className'], 'wcf\system\cleanup\CleanupAdapter'))) {
- throw new SystemException("class '".$adapterData['className']."' does not implement the interface 'CleanupAdapter'", 11010);
- }
-
- $adapter = new $adapterData['className']();
- $adapter->execute($objectIDs);
-
- // update last time of execution
- $statement->execute(array(TIME_NOW, $adapterData['listenerID']));
- }
- }
-
- /**
- * Returns an unique instance of CleanupHandler.
- *
- * @return CleanupHandler
- */
- public static function getInstance() {
- if (self::$instance === null) {
- // call loadInstance event
- EventHandler::getInstance()->fireAction(__CLASS__, 'loadInstance');
-
- if (self::$instance === null) {
- self::$instance = new CleanupHandler();
- }
- }
-
- return self::$instance;
- }
-
- /**
- * Registers deleted objects.
- *
- * @param string $objectType
- * @param array $objectIDs
- * @param integer $packageID
- */
- public static function registerObjects($objectType, array $objectIDs, $packageID) {
- $objectIDs = ArrayUtil::toIntegerArray($objectIDs);
- $packageID = intval($packageID);
-
- // insert items
- $sql = "INSERT INTO wcf".WCF_N."_cleanup_log
- (packageID, objectType, objectID, deleteTime)
- VALUES (?, ?, ?, ?)";
- $statement = WCF::getDB()->prepareStatement($sql);
-
- foreach ($objectIDs as $objectID) {
- $statement->execute(array(
- $packageID,
- $objectType,
- $objectID,
- TIME_NOW
- ));
- }
- }
-}
--- /dev/null
+<?php\r
+namespace wcf\system\cleanup;\r
+\r
+/**\r
+ * Default interface for cleanup adapters.\r
+ * \r
+ * @author Alexander Ebert\r
+ * @copyright 2001-2011 WoltLab GmbH\r
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
+ * @package com.woltlab.wcf\r
+ * @subpackage system.cleanup\r
+ * @category Community Framework\r
+ */\r
+interface ICleanupAdapter {\r
+ /**\r
+ * Executes this adapter.\r
+ * \r
+ * @param array $objectIDs\r
+ */\r
+ public function execute(array $objectIDs);\r
+}
--- /dev/null
+<?php
+namespace wcf\system\cleanup;
+use wcf\system\cache\CacheHandler;
+use wcf\system\database\util\PreparedStatementConditionBuilder;
+use wcf\system\event\EventHandler;
+use wcf\system\exception\SystemException;
+use wcf\system\WCF;
+use wcf\util\ArrayUtil;
+use wcf\util\ClassUtil;
+
+/**
+ * Handles cleanup related actions.
+ *
+ * @author Alexander Ebert
+ * @copyright 2001-2011 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage system.cleanup
+ * @category Community Framework
+ */
+class ICleanupHandler {
+ /**
+ * unique instance of CleanupHandler
+ *
+ * @var CleanupHandler
+ */
+ protected static $instance = null;
+
+ /**
+ * cleanup adapter cache
+ *
+ * @var array<array>
+ */
+ protected $cache = null;
+
+ /**
+ * Initializes cleanup handler.
+ */
+ protected function __construct() {
+ $this->loadCache();
+ }
+
+ /**
+ * Prevents creating an additional instance.
+ */
+ protected function __clone() {}
+
+ /**
+ * Loads cleanup adapter cache.
+ */
+ protected function loadCache() {
+ CacheHandler::getInstance()->addResource(
+ 'cleanupAdapter-'.PACKAGE_ID,
+ WCF_DIR.'cache/cache.cleanupAdapter.php',
+ 'wcf\system\cache\builder\CacheBuilderCleanupAdapter'
+ );
+
+ $this->cache = CacheHandler::getInstance()->get('cleanupAdapter');
+ }
+
+ /**
+ * Prepares adapter execution
+ */
+ public function execute() {
+ // remove all logged items older than 24 hours
+ $sql = "DELETE FROM wcf".WCF_N."_cleanup_log
+ WHERE deleteTime < ?";
+ $statement = WCF::getDB()->prepareStatement($sql);
+ $statement->execute(array(
+ (TIME_NOW - 86400)
+ ));
+
+ // loop through all available adapters
+ foreach ($this->cache['adapters'] as $objectType => $adapters) {
+ // determine if there are any items for current object type
+ $conditions = new PreparedStatementConditionBuilder();
+ $conditions->add("objectType = ?", array($objectType));
+ $conditions->add("packageID IN (?)", array($this->cache['objectTypes'][$objectType]));
+
+ $sql = "SELECT objectID
+ FROM wcf".WCF_N."_cleanup_log
+ ".$conditions;
+ $statement = WCF::getDB()->prepareStatement($sql);
+ $statement->execute($conditions->getParameters());
+
+ $objectIDs = array();
+ while ($row = $statement->fetchArray()) {
+ $objectIDs[] = $row['objectID'];
+ }
+
+ if (count($objectIDs)) {
+ $this->executeAdapters($adapters, $objectIDs);
+ }
+ }
+ }
+
+ /**
+ * Executes specific cleanup adapters.
+ *
+ * @param array $adapters
+ * @param array $objectIDs
+ */
+ protected function executeAdapters(array $adapters, array $objectIDs) {
+ $sql = "UPDATE wcf".WCF_N."_cleanup_listener
+ SET lastUpdateTime = ?
+ WHERE listenerID = ?";
+ $statement = WCF::getDB()->prepareStatement($sql);
+
+ foreach ($adapters as $adapterData) {
+ // validate class
+ if (!class_exists($adapterData['className'])) {
+ throw new SystemException("unable to find class '".$adapterData['className']."'", 11001);
+ }
+
+ // validate interface
+ if (!(ClassUtil::isInstanceOf($adapterData['className'], 'wcf\system\cleanup\ICleanupAdapter'))) {
+ throw new SystemException("class '".$adapterData['className']."' does not implement the interface 'wcf\system\cleanup\ICleanupAdapter'", 11010);
+ }
+
+ $adapter = new $adapterData['className']();
+ $adapter->execute($objectIDs);
+
+ // update last time of execution
+ $statement->execute(array(TIME_NOW, $adapterData['listenerID']));
+ }
+ }
+
+ /**
+ * Returns an unique instance of CleanupHandler.
+ *
+ * @return CleanupHandler
+ */
+ public static function getInstance() {
+ if (self::$instance === null) {
+ // call loadInstance event
+ EventHandler::getInstance()->fireAction(__CLASS__, 'loadInstance');
+
+ if (self::$instance === null) {
+ self::$instance = new CleanupHandler();
+ }
+ }
+
+ return self::$instance;
+ }
+
+ /**
+ * Registers deleted objects.
+ *
+ * @param string $objectType
+ * @param array $objectIDs
+ * @param integer $packageID
+ */
+ public static function registerObjects($objectType, array $objectIDs, $packageID) {
+ $objectIDs = ArrayUtil::toIntegerArray($objectIDs);
+ $packageID = intval($packageID);
+
+ // insert items
+ $sql = "INSERT INTO wcf".WCF_N."_cleanup_log
+ (packageID, objectType, objectID, deleteTime)
+ VALUES (?, ?, ?, ?)";
+ $statement = WCF::getDB()->prepareStatement($sql);
+
+ foreach ($objectIDs as $objectID) {
+ $statement->execute(array(
+ $packageID,
+ $objectType,
+ $objectID,
+ TIME_NOW
+ ));
+ }
+ }
+}
* @subpackage system.cronjob
* @category Community Framework
*/
-class CleanUpCronjobLogCronjob implements Cronjob {
+class CleanUpCronjobLogCronjob implements ICronjob {
/**
- * @see Cronjob::execute()
+ * @see wcf\system\ICronjob::execute()
*/
public function execute(array $data) {
$sql = "DELETE FROM wcf".WCF_N."_cronjobs_log
* @subpackage system.cronjob
* @category Community Framework
*/
-class CleanUpSessionLogCronjob implements Cronjob {
+class CleanUpSessionLogCronjob implements ICronjob {
/**
- * @see Cronjob::execute()
+ * @see wcf\system\ICronjob::execute()
*/
public function execute(array $data) {
// delete access log
* @subpackage system.cronjob\r
* @category Community Framework\r
*/\r
-class CleanupListenerCronjob implements Cronjob {\r
+class CleanupListenerCronjob implements ICronjob {\r
/**\r
- * @see Cronjob::execute()\r
+ * @see wcf\system\ICronjob::execute()\r
*/\r
public function execute(array $data) {\r
CleanupHandler::getInstance()->execute();\r
+++ /dev/null
-<?php\r
-namespace wcf\system\cronjob;\r
-\r
-/**\r
- * Any Cronjob should implement this interface.\r
- * \r
- * @author Siegfried Schweizer\r
- * @copyright 2001-2011 WoltLab GmbH\r
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
- * @package com.woltlab.wcf.data.cronjobs\r
- * @subpackage system.cronjob\r
- * @category Community Framework\r
- */\r
-interface Cronjob {\r
- /**\r
- * To be called when executing the cronjob; the $data array e.g. might be used for passing\r
- * meaningful values to the cronjob in order to reasonably avail multipleExecs.\r
- * \r
- * @param array $data This array should basically contain the dataset \r
- * associated to the executed cronjob, particularly \r
- * the date of the planned execution (the nextExec \r
- * field).\r
- */\r
- public function execute(array $data);\r
-}
}
// verify class signature
- if (!(ClassUtil::isInstanceOf($className, 'wcf\system\cronjob\Cronjob'))) {
- throw new SystemException("class '".$className."' does not implement the interface 'Cronjob'", 11010);
+ if (!(ClassUtil::isInstanceOf($className, 'wcf\system\cronjob\ICronjob'))) {
+ throw new SystemException("class '".$className."' does not implement the interface 'wcf\system\cronjob\ICronjob'", 11010);
}
// execute cronjob
* @subpackage system.cronjob\r
* @category Community Framework\r
*/\r
-class GetUpdateInfoCronjob implements Cronjob {\r
+class GetUpdateInfoCronjob implements ICronjob {\r
/**\r
- * @see Cronjob::execute()\r
+ * @see wcf\system\ICronjob::execute()\r
* @TODO Change path and move method to lib/system/package\r
*/\r
public function execute(array $data) {\r
--- /dev/null
+<?php\r
+namespace wcf\system\cronjob;\r
+\r
+/**\r
+ * Any Cronjob should implement this interface.\r
+ * \r
+ * @author Siegfried Schweizer\r
+ * @copyright 2001-2011 WoltLab GmbH\r
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
+ * @package com.woltlab.wcf.data.cronjobs\r
+ * @subpackage system.cronjob\r
+ * @category Community Framework\r
+ */\r
+interface ICronjob {\r
+ /**\r
+ * To be called when executing the cronjob; the $data array e.g. might be used for passing\r
+ * meaningful values to the cronjob in order to reasonably avail multipleExecs.\r
+ * \r
+ * @param array $data This array should basically contain the dataset \r
+ * associated to the executed cronjob, particularly \r
+ * the date of the planned execution (the nextExec \r
+ * field).\r
+ */\r
+ public function execute(array $data);\r
+}
* @subpackage system.cronjob
* @category Community Framework
*/
-class RefreshSearchRobotsCronjob implements Cronjob {
+class RefreshSearchRobotsCronjob implements ICronjob {
/**
- * @see Cronjob::execute()
+ * @see wcf\system\ICronjob::execute()
*/
public function execute(array $data) {
$filename = FileUtil::downloadFileFromHttp('http://www.woltlab.com/spiderlist/spiderlist.xml', 'spiders');
use wcf\system\cache\CacheHandler;\r
use wcf\system\exception\SystemException;\r
use wcf\system\SingletonFactory;\r
+use wcf\util\ClassUtil;\r
\r
/**\r
* EventHandler executes all registered actions for a specific event.\r
if (!class_exists($action['listenerClassName'])) {\r
throw new SystemException("Unable to find class '".$action['listenerClassName']."'", 11001);\r
}\r
+ if (!ClassUtil::isInstanceOf($action['listenerClassName'], 'wcf\system\event\IEventListener')) {\r
+ throw new SystemException("'".$action['listenerClassName']."' should implement interface wcf\system\event\IEventListener");\r
+ }\r
\r
$object = new $action['listenerClassName'];\r
$this->listenerObjects[] = $object;\r
if (!class_exists($action['listenerClassName'])) {\r
throw new SystemException("Unable to find class '".$action['listenerClassName']."'", 11001);\r
}\r
+ if (!ClassUtil::isInstanceOf($action['listenerClassName'], 'wcf\system\event\IEventListener')) {\r
+ throw new SystemException("'".$action['listenerClassName']."' should implement interface wcf\system\event\IEventListener");\r
+ }\r
\r
$object = new $action['listenerClassName'];\r
$this->listenerObjects[$path] = $object;\r
+++ /dev/null
-<?php\r
-namespace wcf\system\event;\r
-\r
-/**\r
- * EventListeners can be registered for a specific event in many controller objects.\r
- * \r
- * @author Marcel Werk\r
- * @copyright 2001-2009 WoltLab GmbH\r
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
- * @package com.woltlab.wcf\r
- * @subpackage system.event\r
- * @category Community Framework\r
- */\r
-interface EventListener {\r
- /**\r
- * Executes this action.\r
- * \r
- * @param object $eventObj\r
- * @param string $className\r
- * @param string $eventName\r
- */\r
- public function execute($eventObj, $className, $eventName);\r
-}
--- /dev/null
+<?php\r
+namespace wcf\system\event;\r
+use wcf\data\DatabaseObjectProcessor;\r
+\r
+/**\r
+ * EventListeners can be registered for a specific event in many controller objects.\r
+ * \r
+ * @author Marcel Werk\r
+ * @copyright 2001-2009 WoltLab GmbH\r
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
+ * @package com.woltlab.wcf\r
+ * @subpackage system.event\r
+ * @category Community Framework\r
+ */\r
+interface IEventListener {\r
+ /**\r
+ * Executes this action.\r
+ * \r
+ * @param object $eventObj\r
+ * @param string $className\r
+ * @param string $eventName\r
+ */\r
+ public function execute($eventObj, $className, $eventName);\r
+}
use wcf\data\acp\session\access\log\ACPSessionAccessLogEditor;
use wcf\data\acp\session\log\ACPSessionLog;
use wcf\data\acp\session\log\ACPSessionLogEditor;
-use wcf\system\event\EventListener;
+use wcf\system\event\IEventListener;
use wcf\system\WCF;
/**
* @subpackage system.event.listener
* @category Community Framework
*/
-class SessionAccessLogListener implements EventListener {
+class SessionAccessLogListener implements IEventListener {
/**
- * @see EventListener::execute()
+ * @see wcf\system\event\IEventListener::execute()
*/
public function execute($eventObj, $className, $eventName) {
if (WCF::getUser()->userID && WCF::getSession()->getPermission('admin.general.canUseAcp') && !defined(get_class($eventObj).'::DO_NOT_LOG')) {
--- /dev/null
+<?php\r
+namespace wcf\system\exception;\r
+\r
+/**\r
+ * WCF::handleException() calls the show method on exceptions that implement this interface.\r
+ * \r
+ * @author Marcel Werk\r
+ * @copyright 2001-2011 WoltLab GmbH\r
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
+ * @package com.woltlab.wcf\r
+ * @subpackage system.exception\r
+ * @category Community Framework\r
+ */\r
+interface IPrintableException {\r
+ /**\r
+ * Prints this exception.\r
+ * This method is called by WCF::handleException().\r
+ */\r
+ public function show();\r
+}
+++ /dev/null
-<?php\r
-namespace wcf\system\exception;\r
-\r
-/**\r
- * WCF::handleException() calls the show method on exceptions that implement this interface.\r
- * \r
- * @author Marcel Werk\r
- * @copyright 2001-2011 WoltLab GmbH\r
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
- * @package com.woltlab.wcf\r
- * @subpackage system.exception\r
- * @category Community Framework\r
- */\r
-interface PrintableException {\r
- /**\r
- * Prints this exception.\r
- * This method is called by WCF::handleException().\r
- */\r
- public function show();\r
-}
* @subpackage system.exception\r
* @category Community Framework\r
*/\r
-class SystemException extends \Exception implements PrintableException {\r
+class SystemException extends \Exception implements IPrintableException {\r
/**\r
* error description\r
* @var string\r
}\r
\r
/**\r
- * @see PrintableException::show()\r
+ * @see wcf\system\exception\IPrintableException::show()\r
*/\r
public function show() {\r
// send status code\r
* @subpackage system.exception\r
* @category Community Framework\r
*/\r
-abstract class UserException extends \Exception implements PrintableException {\r
+abstract class UserException extends \Exception implements IPrintableException {\r
/**\r
- * @see PrintableException::show()\r
+ * @see wcf\system\exception\IPrintableException::show()\r
*/\r
public function show() {\r
echo '<pre>' . $this->getTraceAsString() . '</pre>';\r
/**\r
* list of FormElementContainer objects\r
*\r
- * @var FormElementContainer\r
+ * @var array<wcf\system\form\IFormElementContainer>\r
*/\r
protected $containers = array();\r
\r
/**\r
* Appends a FormElementContainer object.\r
*\r
- * @param FormElementContainer $container\r
+ * @param wcf\system\form\IFormElementContainer $container\r
*/\r
- public function appendContainer(FormElementContainer $container) {\r
+ public function appendContainer(IFormElementContainer $container) {\r
$this->containers[] = $container;\r
}\r
\r
/**\r
* Prepends a FormElementContainer object.\r
*\r
- * @param FormElementContainer $container\r
+ * @param wcf\system\form\IFormElementContainer $container\r
*/\r
- public function prependContainer(FormElementContainer $container) {\r
+ public function prependContainer(IFormElementContainer $container) {\r
array_unshift($this->containers, $container);\r
}\r
\r
/**\r
* Returns assigned FormElementContainer objects.\r
*\r
- * @return array<FormElementContainer>\r
+ * @return array<wcf\system\form\IFormElementContainer>\r
*/\r
public function getContainers() {\r
return $this->containers;\r
+++ /dev/null
-<?php\r
-namespace wcf\system\form;\r
-use wcf\system\form\FormElementContainer;\r
-\r
-/**\r
- * Interface for form elements.\r
- *\r
- * @author Alexander Ebert\r
- * @copyright 2001-2011 WoltLab GmbH\r
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
- * @package com.woltlab.wcf\r
- * @subpackage system.form\r
- * @category Community Framework\r
- */\r
-interface FormElement {\r
- /**\r
- * Creates a new object of type FormElement.\r
- *\r
- * @param FormElementContainer $parent\r
- */\r
- public function __construct(FormElementContainer $parent);\r
- \r
- /**\r
- * Returns help message.\r
- *\r
- * @return string\r
- */\r
- public function getDescription();\r
- \r
- /**\r
- * Sets help message.\r
- *\r
- * @param string $description\r
- */\r
- public function setDescription($description);\r
- \r
- /**\r
- * Returns label.\r
- *\r
- * @return string\r
- */\r
- public function getLabel();\r
- \r
- /**\r
- * Sets label.\r
- *\r
- * @param string $label\r
- */\r
- public function setLabel($label);\r
- \r
- /**\r
- * Returns element's parent container element.\r
- *\r
- * @return FormElementContainer\r
- */\r
- public function getParent();\r
- \r
- /**\r
- * Returns HTML-representation of current form element.\r
- *\r
- * @param string $formName\r
- * @return string\r
- */\r
- public function getHTML($formName);\r
-}
+++ /dev/null
-<?php\r
-namespace wcf\system\form;\r
-use wcf\system\form\FormElement;\r
-\r
-/**\r
- * Interface for form element containers.\r
- *\r
- * @author Alexander Ebert\r
- * @copyright 2001-2011 WoltLab GmbH\r
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
- * @package com.woltlab.wcf\r
- * @subpackage system.form\r
- * @category Community Framework\r
- */\r
-interface FormElementContainer {\r
- /**\r
- * Returns help message.\r
- *\r
- * @return string\r
- */\r
- public function getDescription();\r
- \r
- /**\r
- * Sets help message.\r
- *\r
- * @param string $description\r
- */\r
- public function setDescription($description);\r
- \r
- /**\r
- * Returns label.\r
- *\r
- * @return string\r
- */\r
- public function getLabel();\r
- \r
- /**\r
- * Sets label.\r
- *\r
- * @param string $label\r
- */\r
- public function setLabel($label);\r
- \r
- /**\r
- * Returns the value of child element with given name.\r
- *\r
- * @param string $key\r
- * @return mixed\r
- */\r
- public function getValue($key);\r
- \r
- /**\r
- * Returns a list of child elements.\r
- *\r
- * @return array<FormElement>\r
- */\r
- public function getChildren();\r
- \r
- /**\r
- * Appends a new child to stack.\r
- *\r
- * @param FormElement $element\r
- */\r
- public function appendChild(FormElement $element);\r
- \r
- /**\r
- * Preprens a new child to stack.\r
- *\r
- * @param FormElement $element\r
- */\r
- public function prependChild(FormElement $element);\r
- \r
- /**\r
- * Handles a POST or GET request.\r
- *\r
- * @param array $variables\r
- */\r
- public function handleRequest(array $variables);\r
- \r
- /**\r
- * Returns HTML-representation of current form element container.\r
- *\r
- * @param string $formName\r
- * @return string\r
- */\r
- public function getHTML($formName);\r
-}
--- /dev/null
+<?php\r
+namespace wcf\system\form;\r
+\r
+/**\r
+ * Interface for form elements.\r
+ *\r
+ * @author Alexander Ebert\r
+ * @copyright 2001-2011 WoltLab GmbH\r
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
+ * @package com.woltlab.wcf\r
+ * @subpackage system.form\r
+ * @category Community Framework\r
+ */\r
+interface IFormElement {\r
+ /**\r
+ * Creates a new object of type FormElement.\r
+ *\r
+ * @param wcf\system\form\IFormElementContainer $parent\r
+ */\r
+ public function __construct(IFormElementContainer $parent);\r
+ \r
+ /**\r
+ * Returns help message.\r
+ *\r
+ * @return string\r
+ */\r
+ public function getDescription();\r
+ \r
+ /**\r
+ * Sets help message.\r
+ *\r
+ * @param string $description\r
+ */\r
+ public function setDescription($description);\r
+ \r
+ /**\r
+ * Returns label.\r
+ *\r
+ * @return string\r
+ */\r
+ public function getLabel();\r
+ \r
+ /**\r
+ * Sets label.\r
+ *\r
+ * @param string $label\r
+ */\r
+ public function setLabel($label);\r
+ \r
+ /**\r
+ * Returns element's parent container element.\r
+ *\r
+ * @return wcf\system\form\IFormElementContainer\r
+ */\r
+ public function getParent();\r
+ \r
+ /**\r
+ * Returns HTML-representation of current form element.\r
+ *\r
+ * @param string $formName\r
+ * @return string\r
+ */\r
+ public function getHTML($formName);\r
+}
--- /dev/null
+<?php\r
+namespace wcf\system\form;\r
+\r
+/**\r
+ * Interface for form element containers.\r
+ *\r
+ * @author Alexander Ebert\r
+ * @copyright 2001-2011 WoltLab GmbH\r
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
+ * @package com.woltlab.wcf\r
+ * @subpackage system.form\r
+ * @category Community Framework\r
+ */\r
+interface IFormElementContainer {\r
+ /**\r
+ * Returns help message.\r
+ *\r
+ * @return string\r
+ */\r
+ public function getDescription();\r
+ \r
+ /**\r
+ * Sets help message.\r
+ *\r
+ * @param string $description\r
+ */\r
+ public function setDescription($description);\r
+ \r
+ /**\r
+ * Returns label.\r
+ *\r
+ * @return string\r
+ */\r
+ public function getLabel();\r
+ \r
+ /**\r
+ * Sets label.\r
+ *\r
+ * @param string $label\r
+ */\r
+ public function setLabel($label);\r
+ \r
+ /**\r
+ * Returns the value of child element with given name.\r
+ *\r
+ * @param string $key\r
+ * @return mixed\r
+ */\r
+ public function getValue($key);\r
+ \r
+ /**\r
+ * Returns a list of child elements.\r
+ *\r
+ * @return array<wcf\system\form\IFormElement>\r
+ */\r
+ public function getChildren();\r
+ \r
+ /**\r
+ * Appends a new child to stack.\r
+ *\r
+ * @param wcf\system\form\IFormElement $element\r
+ */\r
+ public function appendChild(IFormElement $element);\r
+ \r
+ /**\r
+ * Preprens a new child to stack.\r
+ *\r
+ * @param wcf\system\form\IFormElement $element\r
+ */\r
+ public function prependChild(IFormElement $element);\r
+ \r
+ /**\r
+ * Handles a POST or GET request.\r
+ *\r
+ * @param array $variables\r
+ */\r
+ public function handleRequest(array $variables);\r
+ \r
+ /**\r
+ * Returns HTML-representation of current form element container.\r
+ *\r
+ * @param string $formName\r
+ * @return string\r
+ */\r
+ public function getHTML($formName);\r
+}
<?php\r
namespace wcf\system\form\container;\r
-use wcf\system\form\FormElement;\r
-use wcf\system\form\FormElementContainer;\r
+use wcf\system\form\IFormElement;\r
+use wcf\system\form\IFormElementContainer;\r
use wcf\system\form\element\AbstractNamedFormElement;\r
use wcf\util\StringUtil;\r
\r
* @subpackage system.form\r
* @category Community Framework\r
*/\r
-abstract class AbstractFormElementContainer implements FormElementContainer {\r
+abstract class AbstractFormElementContainer implements IFormElementContainer {\r
/**\r
* list of FormElement objects\r
*\r
- * @var array<FormElement>\r
+ * @var array<wcf\system\form\IFormElement>\r
*/\r
protected $children = array();\r
\r
protected $label = '';\r
\r
/**\r
- * @see FormElementContainer::setDescription()\r
+ * @see wcf\system\form\IFormElementContainer::setDescription()\r
*/\r
public function setDescription($description) {\r
$this->description = StringUtil::trim($description);\r
}\r
\r
/**\r
- * @see FormElementContainer::getDescription()\r
+ * @see wcf\system\form\IFormElementContainer::getDescription()\r
*/\r
public function getDescription() {\r
return $this->description;\r
}\r
\r
/**\r
- * @see FormElementContainer::setLabel()\r
+ * @see wcf\system\form\IFormElementContainer::setLabel()\r
*/\r
public function setLabel($label) {\r
$this->label = StringUtil::trim($label);\r
}\r
\r
/**\r
- * @see FormElementContainer::getLabel()\r
+ * @see wcf\system\form\IFormElementContainer::getLabel()\r
*/\r
public function getLabel() {\r
return $this->label;\r
}\r
\r
/**\r
- * @see FormElementContainer::appendChild()\r
+ * @see wcf\system\form\IFormElementContainer::appendChild()\r
*/\r
- public function appendChild(FormElement $element) {\r
+ public function appendChild(IFormElement $element) {\r
$this->children[] = $element;\r
}\r
\r
/**\r
- * @see FormElementContainer::prependChild()\r
+ * @see wcf\system\form\IFormElementContainer::prependChild()\r
*/\r
- public function prependChild(FormElement $element) {\r
+ public function prependChild(IFormElement $element) {\r
array_unshift($this->children, $element);\r
}\r
\r
/**\r
- * @see FormElementContainer::getChildren()\r
+ * @see wcf\system\form\IFormElementContainer::getChildren()\r
*/\r
public function getChildren() {\r
return $this->children;\r
}\r
\r
/**\r
- * @see FormElementContainer::getValue()\r
+ * @see wcf\system\form\IFormElementContainer::getValue()\r
*/\r
public function getValue($key) {\r
foreach ($this->children as $element) {\r
}\r
\r
/**\r
- * @see FormElementContainer::handleRequest()\r
+ * @see wcf\system\form\IFormElementContainer::handleRequest()\r
*/\r
public function handleRequest(array $variables) {\r
foreach ($this->children as $element) {\r
*/\r
class GroupFormElementContainer extends AbstractFormElementContainer {\r
/**\r
- * @see FormElementContainer::getHTML()\r
+ * @see wcf\system\form\IFormElementContainer::getHTML()\r
*/\r
public function getHTML($formName) {\r
$content = '';\r
}\r
\r
/**\r
- * @see FormElementContainer::getHTML()\r
+ * @see wcf\system\form\IFormElementContainer::getHTML()\r
*/\r
public function getHTML($formName) {\r
$content = '';\r
}\r
\r
/**\r
- * @see FormElementContainer::getHTML()\r
+ * @see wcf\system\form\IFormElementContainer::getHTML()\r
*/\r
public function getHTML($formName) {\r
$content = '';\r
<?php\r
namespace wcf\system\form\element;\r
-use wcf\system\form\FormElement;\r
-use wcf\system\form\FormElementContainer;\r
+use wcf\system\form\IFormElement;\r
+use wcf\system\form\IFormElementContainer;\r
use wcf\util\StringUtil;\r
\r
/**\r
* @subpackage system.form\r
* @category Community Framework\r
*/\r
-abstract class AbstractFormElement implements FormElement {\r
+abstract class AbstractFormElement implements IFormElement {\r
/**\r
* element description or help text\r
*\r
/**\r
* FormElementContainer object\r
*\r
- * @var FormElementContainer\r
+ * @var wcf\system\form\IFormElementContainer\r
*/\r
protected $parent = null;\r
\r
/**\r
- * @see FormElement::__construct()\r
+ * @see wcf\system\form\IFormElement::__construct()\r
*/\r
- public function __construct(FormElementContainer $parent) {\r
+ public function __construct(IFormElementContainer $parent) {\r
$this->parent = $parent;\r
}\r
\r
/**\r
- * @see FormElement::setDescription()\r
+ * @see wcf\system\form\IFormElement::setDescription()\r
*/\r
public function setDescription($description) {\r
$this->description = StringUtil::trim($description);\r
}\r
\r
/**\r
- * @see FormElement::getDescription()\r
+ * @see wcf\system\form\IFormElement::getDescription()\r
*/\r
public function getDescription() {\r
return $this->description;\r
}\r
\r
/**\r
- * @see FormElement::setLabel()\r
+ * @see wcf\system\form\IFormElement::setLabel()\r
*/\r
public function setLabel($label) {\r
$this->label = StringUtil::trim($label);\r
}\r
\r
/**\r
- * @see FormElement::getLabel()\r
+ * @see wcf\system\form\IFormElement::getLabel()\r
*/\r
public function getLabel() {\r
return $this->label;\r
}\r
\r
/**\r
- * @see FormElement::getParent()\r
+ * @see wcf\system\form\IFormElement::getParent()\r
*/\r
public function getParent() {\r
return $this->parent;\r
}\r
\r
/**\r
- * @see FormElement::getHTML()\r
+ * @see wcf\system\form\IFormElement::getHTML()\r
*/\r
public function getHTML($formName) {\r
return <<<HTML\r
*/\r
class MultipleSelectionFormElement extends AbstractNamedFormElement {\r
/**\r
- * @see FormElement::getHTML()\r
+ * @see wcf\system\form\IFormElement::getHTML()\r
*/\r
public function getHTML($formName) {\r
return <<<HTML\r
*/\r
class PasswordInputFormElement extends AbstractNamedFormElement {\r
/**\r
- * @see FormElement::getHTML()\r
+ * @see wcf\system\form\IFormElement::getHTML()\r
*/\r
public function getHTML($formName) {\r
return <<<HTML\r
*/\r
class SingleSelectionFormElement extends AbstractNamedFormElement {\r
/**\r
- * @see FormElement::getHTML()\r
+ * @see wcf\system\form\IFormElement::getHTML()\r
*/\r
public function getHTML($formName) {\r
return <<<HTML\r
*/\r
class TextInputFormElement extends AbstractNamedFormElement {\r
/**\r
- * @see FormElement::getHTML()\r
+ * @see wcf\system\form\IFormElement::getHTML()\r
*/\r
public function getHTML($formName) {\r
return <<<HTML\r
--- /dev/null
+<?php\r
+namespace wcf\system\menu;\r
+\r
+/**\r
+ * Any tree menu item should implement this interface.\r
+ *\r
+ * @author Marcel Werk\r
+ * @copyright 2001-2011 WoltLab GmbH\r
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
+ * @package com.woltlab.wcf\r
+ * @subpackage system.menu\r
+ * @category Community Framework\r
+ */\r
+interface ITreeMenuItem {\r
+ /**\r
+ * Returns the link of this item.\r
+ * \r
+ * @return string\r
+ */\r
+ public function getLink();\r
+}
/**\r
* Checks the options and permissions of given menu item.\r
* \r
- * @param mixed $item\r
+ * @param wcf\system\menu\ITreeMenuItem $item\r
* @return boolean\r
*/\r
- protected function checkMenuItem(TreeMenuItem $item) {\r
+ protected function checkMenuItem(ITreeMenuItem $item) {\r
// check the options of this item\r
$hasEnabledOption = true;\r
if (!empty($item->options)) {\r
+++ /dev/null
-<?php\r
-namespace wcf\system\menu;\r
-\r
-/**\r
- * Any tree menu item should implement this interface.\r
- *\r
- * @author Marcel Werk\r
- * @copyright 2001-2011 WoltLab GmbH\r
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
- * @package com.woltlab.wcf\r
- * @subpackage system.menu\r
- * @category Community Framework\r
- */\r
-interface TreeMenuItem {\r
- /**\r
- * Returns the link of this item.\r
- * \r
- * @return string\r
- */\r
- public function getLink();\r
-}
<?php\r
namespace wcf\system\menu\page;\r
+use wcf\data\DatabaseObjectDecorator;\r
\r
/**\r
* Provides default implementations for page menu item providers.\r
* @subpackage system.menu.page\r
* @category Community Framework\r
*/\r
-class DefaultPageMenuItemProvider implements PageMenuItemProvider {\r
+class DefaultPageMenuItemProvider extends DatabaseObjectDecorator implements IPageMenuItemProvider {\r
/**\r
- * @see PageMenuItemProvider::isVisible()\r
+ * @see wcf\system\menu\page\IPageMenuItemProvider::isVisible()\r
*/\r
public function isVisible() {\r
return true;\r
}\r
\r
/**\r
- * @see PageMenuItemProvider::getNotifications()\r
+ * @see wcf\system\menu\page\IPageMenuItemProvider::getNotifications()\r
*/\r
public function getNotifications() {\r
return 0;\r
--- /dev/null
+<?php\r
+namespace wcf\system\menu\page;\r
+use wcf\data\IDatabaseObjectProcessor;\r
+\r
+/**\r
+ * Any page menu item provider should implement this interface.\r
+ *\r
+ * @author Marcel Werk\r
+ * @copyright 2001-2011 WoltLab GmbH\r
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
+ * @package com.woltlab.wcf\r
+ * @subpackage system.menu.page\r
+ * @category Community Framework\r
+ */\r
+interface IPageMenuItemProvider extends IDatabaseObjectProcessor {\r
+ /**\r
+ * Returns true if the associated menu item should be visible for the active user.\r
+ * \r
+ * @return boolean\r
+ */\r
+ public function isVisible();\r
+ \r
+ /**\r
+ * Returns the number of notifications for the associated menu item.\r
+ * \r
+ * @return boolean\r
+ */\r
+ public function getNotifications();\r
+}
namespace wcf\system\menu\page;\r
use wcf\data\page\menu\item\PageMenuItem;\r
use wcf\system\menu\TreeMenu;\r
-use wcf\system\menu\TreeMenuItem;\r
+use wcf\system\menu\ITreeMenuItem;\r
use wcf\system\cache\CacheHandler;\r
\r
/**\r
*/\r
class PageMenu extends TreeMenu {\r
/**\r
- * @see TreeMenu::loadCache()\r
+ * @see wcf\system\menu\TreeMenu::loadCache()\r
*/\r
protected function loadCache() {\r
parent::loadCache();\r
}\r
\r
/**\r
- * @see TreeMenu::checkMenuItem()\r
+ * @see wcf\system\menu\TreeMenu::checkMenuItem()\r
*/\r
- protected function checkMenuItem(TreeMenuItem $item) {\r
+ protected function checkMenuItem(ITreeMenuItem $item) {\r
if (!parent::checkMenuItem($item)) return false;\r
\r
- return $item->getProvider()->isVisible();\r
+ return $item->getProcessor()->isVisible();\r
}\r
}\r
+++ /dev/null
-<?php\r
-namespace wcf\system\menu\page;\r
-\r
-/**\r
- * Any page menu item provider should implement this interface.\r
- *\r
- * @author Marcel Werk\r
- * @copyright 2001-2011 WoltLab GmbH\r
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
- * @package com.woltlab.wcf\r
- * @subpackage system.menu.page\r
- * @category Community Framework\r
- */\r
-interface PageMenuItemProvider {\r
- /**\r
- * Returns true if the associated menu item should be visible for the active user.\r
- * \r
- * @return boolean\r
- */\r
- public function isVisible();\r
- \r
- /**\r
- * Returns the number of notifications for the associated menu item.\r
- * \r
- * @return boolean\r
- */\r
- public function getNotifications();\r
-}
--- /dev/null
+<?php\r
+namespace wcf\system\option;\r
+use wcf\data\option\Option;\r
+\r
+/**\r
+ * Any option type should implement this interface.\r
+ *\r
+ * @author Marcel Werk\r
+ * @copyright 2001-2011 WoltLab GmbH\r
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
+ * @package com.woltlab.wcf\r
+ * @subpackage system.option\r
+ * @category Community Framework\r
+ */\r
+interface IOptionType {\r
+ /**\r
+ * Returns the html code for the form element of this option.\r
+ * \r
+ * @param Option $option\r
+ * @param mixed $value\r
+ * @return string html\r
+ */\r
+ public function getFormElement(Option $option, $value);\r
+ \r
+ /**\r
+ * Validates the form input for this option.\r
+ * Throws an exception, if validation fails.\r
+ * \r
+ * @param Option $option\r
+ * @param string $newValue\r
+ */\r
+ public function validate(Option $option, $newValue);\r
+ \r
+ /**\r
+ * Returns the value of this option for saving in the database.\r
+ * \r
+ * @param Option $option\r
+ * @param string $newValue\r
+ * @return string\r
+ */\r
+ public function getData(Option $option, $newValue);\r
+}
--- /dev/null
+<?php\r
+namespace wcf\system\option;\r
+use wcf\data\option\Option;\r
+use wcf\system\database\util\PreparedStatementConditionBuilder;\r
+\r
+/**\r
+ * Any searchable option type should implement this interface.\r
+ *\r
+ * @author Marcel Werk\r
+ * @copyright 2001-2011 WoltLab GmbH\r
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
+ * @package com.woltlab.wcf\r
+ * @subpackage system.option\r
+ * @category Community Framework\r
+ */\r
+interface ISearchableUserOption {\r
+ /**\r
+ * Returns the html code for the search form element of this option.\r
+ * \r
+ * @param wcf\data\option\Option $option\r
+ * @param string $value\r
+ * @return string html\r
+ */\r
+ public function getSearchFormElement(Option $option, $value);\r
+ \r
+ /**\r
+ * Returns a condition for search sql query.\r
+ * \r
+ * @param wcf\system\database\condition\PreparedStatementConditionBuilder $conditions\r
+ * @param wcf\data\option\Option $option\r
+ * @param string $value\r
+ * @param boolean\r
+ */\r
+ public function getCondition(PreparedStatementConditionBuilder &$conditions, Option $option, $value);\r
+}
+++ /dev/null
-<?php\r
-namespace wcf\system\option;\r
-use wcf\data\option\Option;\r
-\r
-/**\r
- * Any option type should implement this interface.\r
- *\r
- * @author Marcel Werk\r
- * @copyright 2001-2011 WoltLab GmbH\r
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
- * @package com.woltlab.wcf\r
- * @subpackage system.option\r
- * @category Community Framework\r
- */\r
-interface OptionType {\r
- /**\r
- * Returns the html code for the form element of this option.\r
- * \r
- * @param Option $option\r
- * @param mixed $value\r
- * @return string html\r
- */\r
- public function getFormElement(Option $option, $value);\r
- \r
- /**\r
- * Validates the form input for this option.\r
- * Throws an exception, if validation fails.\r
- * \r
- * @param Option $option\r
- * @param string $newValue\r
- */\r
- public function validate(Option $option, $newValue);\r
- \r
- /**\r
- * Returns the value of this option for saving in the database.\r
- * \r
- * @param Option $option\r
- * @param string $newValue\r
- * @return string\r
- */\r
- public function getData(Option $option, $newValue);\r
-}
* @subpackage system.option\r
* @category Community Framework\r
*/\r
-class OptionTypeBoolean implements OptionType, SearchableUserOption {\r
+class OptionTypeBoolean implements IOptionType, ISearchableUserOption {\r
/**\r
- * @see OptionType::getFormElement()\r
+ * @see wcf\system\option\IOptionType::getFormElement()\r
*/\r
public function getFormElement(Option $option, $value) {\r
$options = Option::parseEnableOptions($option->enableOptions);\r
}\r
\r
/**\r
- * @see OptionType::validate()\r
+ * @see wcf\system\option\IOptionType::validate()\r
*/\r
public function validate(Option $option, $newValue) {}\r
\r
/**\r
- * @see OptionType::getData()\r
+ * @see wcf\system\option\IOptionType::getData()\r
*/\r
public function getData(Option $option, $newValue) {\r
if ($newValue !== null) return 1;\r
}\r
\r
/**\r
- * @see SearchableUserOption::getSearchFormElement()\r
+ * @see wcf\system\option\ISearchableUserOption::getSearchFormElement()\r
*/\r
public function getSearchFormElement(Option $option, $value) {\r
return $this->getFormElement($option, $value);\r
}\r
\r
/**\r
- * @see SearchableUserOption::getCondition()\r
+ * @see wcf\system\option\ISearchableUserOption::getCondition()\r
*/\r
public function getCondition(PreparedStatementConditionBuilder &$conditions, Option $option, $value) {\r
$value = intval($value);\r
*/\r
class OptionTypeCustomselect extends OptionTypeSelect {\r
/**\r
- * @see OptionType::getFormElement()\r
+ * @see wcf\system\option\IOptionType::getFormElement()\r
*/\r
public function getFormElement(Option $option, $value) {\r
WCF::getTPL()->assign(array(\r
}\r
\r
/**\r
- * @see OptionType::validate()\r
+ * @see wcf\system\option\IOptionType::validate()\r
*/\r
public function validate(Option $option, $newValue) {}\r
\r
/**\r
- * @see OptionType::getData()\r
+ * @see wcf\system\option\IOptionType::getData()\r
*/\r
public function getData(Option $option, $newValue) {\r
if (empty($newValue) && isset($_POST['values'][$option->optionName.'_custom'])) {\r
* @subpackage system.option\r
* @category Community Framework\r
*/\r
-class OptionTypeDate implements OptionType, SearchableUserOption {\r
+class OptionTypeDate implements IOptionType, ISearchableUserOption {\r
protected $yearRequired = true;\r
\r
/**\r
- * @see OptionType::getFormElement()\r
+ * @see wcf\system\option\IOptionType::getFormElement()\r
*/\r
public function getFormElement(array &$optionData) {\r
if (!isset($optionData['optionValue'])) {\r
}\r
\r
/**\r
- * @see OptionType::validate()\r
+ * @see wcf\system\option\IOptionType::validate()\r
*/\r
public function validate(array $optionData, $newValue) {\r
$this->getValue($newValue);\r
}\r
\r
/**\r
- * @see OptionType::getData()\r
+ * @see wcf\system\option\IOptionType::getData()\r
*/\r
public function getData(array $optionData, $newValue) {\r
$this->getValue($newValue);\r
}\r
\r
/**\r
- * @see SearchableUserOption::getSearchFormElement()\r
+ * @see wcf\system\option\ISearchableUserOption::getSearchFormElement()\r
*/\r
public function getSearchFormElement(array &$optionData) {\r
return $this->getFormElement($optionData);\r
}\r
\r
/**\r
- * @see SearchableUserOption::getCondition()\r
+ * @see wcf\system\option\ISearchableUserOption::getCondition()\r
*/\r
public function getCondition(PreparedStatementConditionBuilder &$conditions, Option $option, $value) {\r
$value = $this->getData($optionData, $value);\r
*/
class OptionTypeFloat extends OptionTypeText {
/**
- * @see OptionType::getFormElement()
+ * @see wcf\system\option\IOptionType::getFormElement()
*/
public function getFormElement(Option $option, $value) {
$value = str_replace('.', WCF::getLanguage()->get('wcf.global.decimalPoint'), $value);
}
/**
- * @see OptionType::getData()
+ * @see wcf\system\option\IOptionType::getData()
*/
public function getData(Option $option, $newValue) {
$newValue = str_replace(' ', '', $newValue);
*/\r
class OptionTypeInteger extends OptionTypeText {\r
/**\r
- * @see OptionType::getData()\r
+ * @see wcf\system\option\IOptionType::getData()\r
*/\r
public function getData(Option $option, $newValue) {\r
return intval($newValue);\r
*/\r
class OptionTypeMultiselect extends OptionTypeSelect {\r
/**\r
- * @see OptionType::getFormElement()\r
+ * @see wcf\system\option\IOptionType::getFormElement()\r
*/\r
public function getFormElement(array &$optionData) {\r
if (!isset($optionData['optionValue'])) {\r
}\r
\r
/**\r
- * @see OptionType::validate()\r
+ * @see wcf\system\option\IOptionType::validate()\r
*/\r
public function validate(array $optionData, $newValue) {\r
if (!is_array($newValue)) $newValue = array();\r
}\r
\r
/**\r
- * @see OptionType::getData()\r
+ * @see wcf\system\option\IOptionType::getData()\r
*/\r
public function getData(array $optionData, $newValue) {\r
if (!is_array($newValue)) $newValue = array();\r
}\r
\r
/**\r
- * @see SearchableUserOption::getSearchFormElement()\r
+ * @see wcf\system\option\ISearchableUserOption::getSearchFormElement()\r
*/\r
public function getSearchFormElement(array &$optionData) {\r
return $this->getFormElement($optionData);\r
}\r
\r
/**\r
- * @see SearchableUserOption::getCondition()\r
+ * @see wcf\system\option\ISearchableUserOption::getCondition()\r
*/\r
public function getCondition(PreparedStatementConditionBuilder &$conditions, Option $options, $value) {\r
if (!is_array($value) || !count($value)) return false;\r
protected $inputType = 'password';\r
\r
/**\r
- * @see SearchableUserOption::getCondition()\r
+ * @see wcf\system\option\ISearchableUserOption::getCondition()\r
*/\r
public function getCondition(PreparedStatementConditionBuilder &$conditions, Option $option, $value) {\r
return false;\r
* @subpackage system.option\r
* @category Community Framework\r
*/\r
-class OptionTypeRadiobuttons implements OptionType, SearchableUserOption {\r
+class OptionTypeRadiobuttons implements IOptionType, ISearchableUserOption {\r
public $templateName = 'optionTypeRadiobuttons';\r
\r
/**\r
- * @see OptionType::getFormElement()\r
+ * @see wcf\system\option\IOptionType::getFormElement()\r
*/\r
public function getFormElement(Option $option, $value) {\r
// get options\r
}\r
\r
/**\r
- * @see OptionType::validate()\r
+ * @see wcf\system\option\IOptionType::validate()\r
*/\r
public function validate(Option $option, $newValue) {\r
if (!empty($newValue)) {\r
}\r
\r
/**\r
- * @see OptionType::getData()\r
+ * @see wcf\system\option\IOptionType::getData()\r
*/\r
public function getData(Option $option, $newValue) {\r
return $newValue;\r
}\r
\r
/**\r
- * @see SearchableUserOption::getSearchFormElement()\r
+ * @see wcf\system\option\ISearchableUserOption::getSearchFormElement()\r
*/\r
public function getSearchFormElement(Option $option, $value) {\r
return $this->getFormElement($optionData, $value);\r
}\r
\r
/**\r
- * @see SearchableUserOption::getCondition()\r
+ * @see wcf\system\option\ISearchableUserOption::getCondition()\r
*/\r
public function getCondition(PreparedStatementConditionBuilder &$conditions, Option $option, $value) {\r
$value = StringUtil::trim($value);\r
*/\r
class OptionTypeSelect extends OptionTypeRadiobuttons {\r
/**\r
- * @see OptionType::getFormElement()\r
+ * @see wcf\system\option\IOptionType::getFormElement()\r
*/\r
public function getFormElement(Option $option, $value) {\r
// get options\r
}\r
\r
/**\r
- * @see SearchableUserOption::getSearchFormElement()\r
+ * @see wcf\system\option\ISearchableUserOption::getSearchFormElement()\r
*/\r
public function getSearchFormElement(Option $option, $value) {\r
return $this->getFormElement($optionData, $value);\r
* @subpackage system.option\r
* @category Community Framework\r
*/\r
-class OptionTypeText implements OptionType, SearchableUserOption {\r
+class OptionTypeText implements IOptionType, ISearchableUserOption {\r
/**\r
* input type\r
* @var string\r
protected $inputType = 'text';\r
\r
/**\r
- * @see OptionType::getFormElement()\r
+ * @see wcf\system\option\IOptionType::getFormElement()\r
*/\r
public function getFormElement(Option $option, $value) {\r
WCF::getTPL()->assign(array(\r
}\r
\r
/**\r
- * @see OptionType::validate()\r
+ * @see wcf\system\option\IOptionType::validate()\r
*/\r
public function validate(Option $option, $newValue) {}\r
\r
/**\r
- * @see OptionType::getData()\r
+ * @see wcf\system\option\IOptionType::getData()\r
*/\r
public function getData(Option $option, $newValue) {\r
return $newValue;\r
}\r
\r
/**\r
- * @see SearchableUserOption::getSearchFormElement()\r
+ * @see wcf\system\option\ISearchableUserOption::getSearchFormElement()\r
*/\r
public function getSearchFormElement(Option $option, $value) {\r
return $this->getFormElement($optionData, $value);\r
}\r
\r
/**\r
- * @see SearchableUserOption::getCondition()\r
+ * @see wcf\system\option\ISearchableUserOption::getCondition()\r
*/\r
public function getCondition(PreparedStatementConditionBuilder &$conditions, Option $option, $value) {\r
$value = StringUtil::trim($value);\r
*/\r
class OptionTypeTextarea extends OptionTypeText {\r
/**\r
- * @see OptionType::getFormElement()\r
+ * @see wcf\system\option\IOptionType::getFormElement()\r
*/\r
public function getFormElement(Option $option, $value) {\r
WCF::getTPL()->assign(array(\r
* @subpackage system.option\r
* @category Community Framework\r
*/\r
-class OptionTypeTimezone implements OptionType {\r
+class OptionTypeTimezone implements IOptionType {\r
/**\r
- * @see OptionType::getFormElement()\r
+ * @see wcf\system\option\IOptionType::getFormElement()\r
*/\r
public function getFormElement(Option $option, $value) {\r
$timezoneOptions = array();\r
}\r
\r
/**\r
- * @see OptionType::validate()\r
+ * @see wcf\system\option\IOptionType::validate()\r
*/\r
public function validate(Option $option, $newValue) {\r
if (!in_array($newValue, DateUtil::getAvailableTimezones())) {\r
}\r
\r
/**\r
- * @see OptionType::getData()\r
+ * @see wcf\system\option\IOptionType::getData()\r
*/\r
public function getData(Option $option, $newValue) {\r
return $newValue; \r
+++ /dev/null
-<?php\r
-namespace wcf\system\option;\r
-use wcf\data\option\Option;\r
-use wcf\system\database\util\PreparedStatementConditionBuilder;\r
-\r
-/**\r
- * Any searchable option type should implement this interface.\r
- *\r
- * @author Marcel Werk\r
- * @copyright 2001-2011 WoltLab GmbH\r
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
- * @package com.woltlab.wcf\r
- * @subpackage system.option\r
- * @category Community Framework\r
- */\r
-interface SearchableUserOption {\r
- /**\r
- * Returns the html code for the search form element of this option.\r
- * \r
- * @param wcf\data\option\Option $option\r
- * @param string $value\r
- * @return string html\r
- */\r
- public function getSearchFormElement(Option $option, $value);\r
- \r
- /**\r
- * Returns a condition for search sql query.\r
- * \r
- * @param wcf\system\database\condition\PreparedStatementConditionBuilder $conditions\r
- * @param wcf\data\option\Option $option\r
- * @param string $value\r
- * @param boolean\r
- */\r
- public function getCondition(PreparedStatementConditionBuilder &$conditions, Option $option, $value);\r
-}
+++ /dev/null
-<?php\r
-namespace wcf\system\option\group;\r
-use wcf\system\option\OptionType;\r
-\r
-/**\r
- * Any group permission type should implement this interface.\r
- *\r
- * @author Marcel Werk\r
- * @copyright 2001-2011 WoltLab GmbH\r
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
- * @package com.woltlab.wcf\r
- * @subpackage system.option.group\r
- * @category Community Framework\r
- */\r
-interface GroupOptionType extends OptionType {\r
- /**\r
- * Merges the different values of an option to a single value.\r
- * \r
- * @param array $values\r
- * @return mixed $value\r
- */\r
- public function merge(array $values);\r
-}
* @subpackage system.option.group\r
* @category Community Framework\r
*/\r
-class GroupOptionTypeBoolean extends OptionTypeBoolean implements GroupOptionType {\r
+class GroupOptionTypeBoolean extends OptionTypeBoolean implements IGroupOptionType {\r
/**\r
- * @see GroupOptionType::merge()\r
+ * @see wcf\system\option\group\IGroupOptionType::merge()\r
*/\r
public function merge(array $values) {\r
foreach ($values as $value) {\r
* @subpackage system.option.group\r
* @category Community Framework\r
*/\r
-class GroupOptionTypeGroups implements GroupOptionType {\r
+class GroupOptionTypeGroups implements IGroupOptionType {\r
/**\r
- * @see OptionType::getFormElement()\r
+ * @see wcf\system\option\IOptionType::getFormElement()\r
*/\r
public function getFormElement(Option $option, $value) {\r
// get selected group\r
}\r
\r
/**\r
- * @see OptionType::validate()\r
+ * @see wcf\system\option\IOptionType::validate()\r
*/\r
public function validate(Option $option, $newValue) {\r
// get all groups\r
}\r
\r
/**\r
- * @see OptionType::getData()\r
+ * @see wcf\system\option\IOptionType::getData()\r
*/\r
public function getData(Option $option, $newValue) {\r
if (!is_array($newValue)) $newValue = array();\r
}\r
\r
/**\r
- * @see GroupOptionType::merge()\r
+ * @see wcf\system\option\group\IGroupOptionType::merge()\r
*/\r
public function merge(array $values) {\r
$result = array();\r
*/\r
class GroupOptionTypeInfiniteInteger extends GroupOptionTypeInteger {\r
/**\r
- * @see GroupOptionType::merge()\r
+ * @see wcf\system\option\group\IGroupOptionType::merge()\r
*/\r
public function merge(array $values) {\r
if (in_array(-1, $values)) return -1;\r
*/\r
class GroupOptionTypeInfiniteInverseInteger extends GroupOptionTypeInverseinteger {\r
/**\r
- * @see GroupOptionType::merge()\r
+ * @see wcf\system\option\group\IGroupOptionType::merge()\r
*/\r
public function merge(array $values) {\r
foreach ($values as $key => $value) {\r
* @subpackage system.option.group\r
* @category Community Framework\r
*/\r
-class GroupOptionTypeInteger extends OptionTypeInteger implements GroupOptionType {\r
+class GroupOptionTypeInteger extends OptionTypeInteger implements IGroupOptionType {\r
/**\r
- * @see GroupOptionType::merge()\r
+ * @see wcf\system\option\group\IGroupOptionType::merge()\r
*/\r
public function merge(array $values) {\r
return max($values);\r
* @subpackage system.option.group\r
* @category Community Framework\r
*/\r
-class GroupOptionTypeInverseInteger extends OptionTypeInteger implements GroupOptionType {\r
+class GroupOptionTypeInverseInteger extends OptionTypeInteger implements IGroupOptionType {\r
/**\r
- * @see GroupOptionType::merge()\r
+ * @see wcf\system\option\group\IGroupOptionType::merge()\r
*/\r
public function merge(array $values) {\r
return min($values);\r
* @subpackage system.option.group
* @category Community Framework
*/
-class GroupOptionTypeText extends OptionTypeText implements GroupOptionType {
+class GroupOptionTypeText extends OptionTypeText implements IGroupOptionType {
/**
- * @see GroupOptionType::merge()
+ * @see wcf\system\option\group\IGroupOptionType::merge()
*/
public function merge(array $values) {
$result = '';
* @subpackage system.option.group\r
* @category Community Framework\r
*/\r
-class GroupOptionTypeTextarea extends OptionTypeTextarea implements GroupOptionType {\r
+class GroupOptionTypeTextarea extends OptionTypeTextarea implements IGroupOptionType {\r
/**\r
- * @see GroupOptionType::merge()\r
+ * @see wcf\system\option\group\IGroupOptionType::merge()\r
*/\r
public function merge(array $values) {\r
$result = '';\r
--- /dev/null
+<?php\r
+namespace wcf\system\option\group;\r
+use wcf\system\option\OptionType;\r
+\r
+/**\r
+ * Any group permission type should implement this interface.\r
+ *\r
+ * @author Marcel Werk\r
+ * @copyright 2001-2011 WoltLab GmbH\r
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
+ * @package com.woltlab.wcf\r
+ * @subpackage system.option.group\r
+ * @category Community Framework\r
+ */\r
+interface IGroupOptionType extends OptionType {\r
+ /**\r
+ * Merges the different values of an option to a single value.\r
+ * \r
+ * @param array $values\r
+ * @return mixed $value\r
+ */\r
+ public function merge(array $values);\r
+}
protected $tableName = '_acp_template';
/**
- * @see FileHandler::checkFiles()
+ * @see wcf\system\setup\IFileHandler::checkFiles()
*/
public function checkFiles(array $files) {
if ($this->packageInstallation->getPackage()->package != 'com.woltlab.wcf') {
}
/**
- * @see FileHandler::logFiles()
+ * @see wcf\system\setup\IFileHandler::logFiles()
*/
public function logFiles(array $files) {
$packageID = $this->packageInstallation->getPackageID();
*/
class FilesFileHandler extends PackageInstallationFileHandler {
/**
- * @see FileHandler::checkFiles()
+ * @see wcf\system\setup\IFileHandler::checkFiles()
*/
public function checkFiles(array $files) {
if ($this->packageInstallation->getPackage()->package != 'com.woltlab.wcf') {
}
/**
- * @see FileHandler::logFiles()
+ * @see wcf\system\setup\IFileHandler::logFiles()
*/
public function logFiles(array $files) {
if (empty($files)) {
$plugin = new $className($this, $nodeData);
- if (!($plugin instanceof \wcf\system\package\plugin\PackageInstallationPlugin)) {
- throw new SystemException("class '".$className."' does not implement the interface 'PackageInstallationPlugin'", 11010);
+ if (!($plugin instanceof \wcf\system\package\plugin\IPackageInstallationPlugin)) {
+ throw new SystemException("class '".$className."' does not implement the interface 'wcf\system\package\plugin\IPackageInstallationPlugin'", 11010);
}
// execute PIP
<?php
namespace wcf\system\package;
-use wcf\system\setup\FileHandler;
+use wcf\system\setup\IFileHandler;
/**
* PackageInstallationFileHandler is the abstract FileHandler implementation for all file installations during the package installation.
* @subpackage system.package
* @category Community Framework
*/
-abstract class PackageInstallationFileHandler implements FileHandler {
+abstract class PackageInstallationFileHandler implements IFileHandler {
protected $packageInstallation;
/**
public $tagName = 'acptemplates';
/**
- * @see wcf\system\package\plugin\PackageInstallationPlugin::install()
+ * @see wcf\system\package\plugin\IPackageInstallationPlugin::install()
*/
public function install() {
parent::install();
}
/**
- * @see wcf\system\package\plugin\PackageInstallationPlugin::uninstall()
+ * @see wcf\system\package\plugin\IPackageInstallationPlugin::uninstall()
*/
public function uninstall() {
// create ACP-templates list
*/
abstract class AbstractOptionPackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin {
/**
- * @see wcf\system\package\plugin\PackageInstallationPlugin::install()
+ * @see wcf\system\package\plugin\IPackageInstallationPlugin::install()
*/
public function install() {
AbstractPackageInstallationPlugin::install();
}
/**
- * @see wcf\system\package\plugin\PackageInstallationPlugin::hasUninstall()
+ * @see wcf\system\package\plugin\IPackageInstallationPlugin::hasUninstall()
*/
public function hasUninstall() {
$hasUninstallOptions = parent::hasUninstall();
* @subpackage system.package.plugin
* @category Community Framework
*/
-abstract class AbstractPackageInstallationPlugin implements PackageInstallationPlugin {
+abstract class AbstractPackageInstallationPlugin implements IPackageInstallationPlugin {
/**
* database table name
* @var string
}
/**
- * @see wcf\system\package\plugin\PackageInstallationPlugin::install()
+ * @see wcf\system\package\plugin\IPackageInstallationPlugin::install()
*/
public function install() {
// call install event
}
/**
- * @see wcf\system\package\plugin\PackageInstallationPlugin::update()
+ * @see wcf\system\package\plugin\IPackageInstallationPlugin::update()
*/
public function update() {
// call update event
}
/**
- * @see wcf\system\package\plugin\PackageInstallationPlugin::hasUninstall()
+ * @see wcf\system\package\plugin\IPackageInstallationPlugin::hasUninstall()
*/
public function hasUninstall() {
// call hasUninstall event
}
/**
- * @see wcf\system\package\plugin\PackageInstallationPlugin::uninstall()
+ * @see wcf\system\package\plugin\IPackageInstallationPlugin::uninstall()
*/
public function uninstall() {
// call uninstall event
public $tagName = '';
/**
- * @see wcf\system\package\plugin\PackageInstallationPlugin::install()
+ * @see wcf\system\package\plugin\IPackageInstallationPlugin::install()
*/
public function install() {
parent::install();
}
/**
- * @see wcf\system\package\plugin\PackageInstallationPlugin::uninstall()
+ * @see wcf\system\package\plugin\IPackageInstallationPlugin::uninstall()
*/
public function uninstall() {
parent::uninstall();
}
/**
- * @see wcf\system\package\plugin\PackageInstallationPlugin::uninstall()
+ * @see wcf\system\package\plugin\IPackageInstallationPlugin::uninstall()
*/
public function uninstall() {
parent::uninstall();
public $tableName = 'package_installation_file_log';
/**
- * @see wcf\system\package\plugin\PackageInstallationPlugin::install()
+ * @see wcf\system\package\plugin\IPackageInstallationPlugin::install()
*/
public function install() {
parent::install();
--- /dev/null
+<?php\r
+namespace wcf\system\package\plugin;\r
+\r
+/**\r
+ * Any PackageInstallationPlugin should implement this interface.\r
+ * \r
+ * @author Marcel Werk\r
+ * @copyright 2001-2011 WoltLab GmbH\r
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
+ * @package com.woltlab.wcf\r
+ * @subpackage system.package.plugin\r
+ * @category Community Framework\r
+ */\r
+interface IPackageInstallationPlugin {\r
+ /**\r
+ * Executes the installation of this plugin.\r
+ */\r
+ public function install();\r
+ \r
+ /**\r
+ * Executes the update of this plugin.\r
+ */\r
+ public function update();\r
+ \r
+ /**\r
+ * Returns true, if the uninstallation of the given package should execute this plugin.\r
+ * \r
+ * @return boolean\r
+ */\r
+ public function hasUninstall();\r
+ \r
+ /**\r
+ * Executes the uninstallation of this plugin.\r
+ */\r
+ public function uninstall();\r
+}
public $tableName = 'language_item';
/**
- * @see wcf\system\package\plugin\PackageInstallationPlugin::install()
+ * @see wcf\system\package\plugin\IPackageInstallationPlugin::install()
*/
public function install() {
AbstractPackageInstallationPlugin::install();
+++ /dev/null
-<?php\r
-namespace wcf\system\package\plugin;\r
-\r
-/**\r
- * Any PackageInstallationPlugin should implement this interface.\r
- * \r
- * @author Marcel Werk\r
- * @copyright 2001-2011 WoltLab GmbH\r
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
- * @package com.woltlab.wcf\r
- * @subpackage system.package.plugin\r
- * @category Community Framework\r
- */\r
-interface PackageInstallationPlugin {\r
- /**\r
- * Executes the installation of this plugin.\r
- */\r
- public function install();\r
- \r
- /**\r
- * Executes the update of this plugin.\r
- */\r
- public function update();\r
- \r
- /**\r
- * Returns true, if the uninstallation of the given package should execute this plugin.\r
- * \r
- * @return boolean\r
- */\r
- public function hasUninstall();\r
- \r
- /**\r
- * Executes the uninstallation of this plugin.\r
- */\r
- public function uninstall();\r
-}
$result['menuPosition'] = (!empty($data['elements']['position']) && $data['elements']['position'] == 'footer') ? 'footer' : 'header';\r
// class name\r
if (!empty($data['elements']['classname'])) {\r
- /*if (!class_exists($data['elements']['classname'])) {\r
- throw new SystemException("Unable to find class '".$data['elements']['classname']."'");\r
- }\r
- \r
- if (!ClassUtil::isInstanceOf($data['elements']['classname'], 'wcf\system\menu\page\PageMenuItemProvider')) {\r
- throw new SystemException($data['elements']['classname']." should implement wcf\system\menu\page\PageMenuItemProvider");\r
- }*/\r
- \r
$result['className'] = $data['elements']['classname'];\r
}\r
\r
public $tableName = 'package_installation_sql_log';
/**
- * @see wcf\system\package\plugin\PackageInstallationPlugin::install()
+ * @see wcf\system\package\plugin\IPackageInstallationPlugin::install()
*/
public function install() {
parent::install();
*/
class ScriptPackageInstallationPlugin extends AbstractPackageInstallationPlugin {
/**
- * @see wcf\system\package\plugin\PackageInstallationPlugin::install()
+ * @see wcf\system\package\plugin\IPackageInstallationPlugin::install()
*/
public function install() {
parent::install();
}\r
\r
/**\r
- * @see wcf\system\package\plugin\PackageInstallationPlugin::uninstall()\r
+ * @see wcf\system\package\plugin\IPackageInstallationPlugin::uninstall()\r
*/\r
public function uninstall() {\r
parent::uninstall();\r
public $tagName = 'style';\r
\r
/** \r
- * @see wcf\system\package\plugin\PackageInstallationPlugin::install()\r
+ * @see wcf\system\package\plugin\IPackageInstallationPlugin::install()\r
*/\r
public function install() {\r
parent::install();\r
}\r
\r
/** \r
- * @see wcf\system\package\plugin\PackageInstallationPlugin::uninstall()\r
+ * @see wcf\system\package\plugin\IPackageInstallationPlugin::uninstall()\r
*/\r
public function uninstall() {\r
// call uninstall event\r
}
/**
- * @see wcf\system\package\plugin\PackageInstallationPlugin::uninstall()
+ * @see wcf\system\package\plugin\IPackageInstallationPlugin::uninstall()
*/
public function uninstall() {
parent::uninstall();
public $tableName = 'template';
/**
- * @see wcf\system\package\plugin\PackageInstallationPlugin::install()
+ * @see wcf\system\package\plugin\IPackageInstallationPlugin::install()
*/
public function install() {
parent::install();
+++ /dev/null
-<?php\r
-namespace wcf\system\setup;\r
-\r
-/**\r
- * A FileHandler class logs files and checks their overwriting rights.\r
- * \r
- * @author Marcel Werk\r
- * @copyright 2001-2009 WoltLab GmbH\r
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
- * @package com.woltlab.wcf\r
- * @subpackage system.setup\r
- * @category Community Framework\r
- */\r
-interface FileHandler {\r
- /**\r
- * Checks the overwriting rights of the given files.\r
- * \r
- * @param array $files\r
- */\r
- public function checkFiles(array $files);\r
- \r
- /**\r
- * Logs the given list of files.\r
- * \r
- * @param array $files\r
- */\r
- public function logFiles(array $files);\r
-}
--- /dev/null
+<?php\r
+namespace wcf\system\setup;\r
+\r
+/**\r
+ * A FileHandler class logs files and checks their overwriting rights.\r
+ * \r
+ * @author Marcel Werk\r
+ * @copyright 2001-2009 WoltLab GmbH\r
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
+ * @package com.woltlab.wcf\r
+ * @subpackage system.setup\r
+ * @category Community Framework\r
+ */\r
+interface IFileHandler {\r
+ /**\r
+ * Checks the overwriting rights of the given files.\r
+ * \r
+ * @param array $files\r
+ */\r
+ public function checkFiles(array $files);\r
+ \r
+ /**\r
+ * Logs the given list of files.\r
+ * \r
+ * @param array $files\r
+ */\r
+ public function logFiles(array $files);\r
+}
* @param array $files list of files\r
*/\r
protected function checkFiles(&$files) {\r
- if ($this->fileHandler != null && $this->fileHandler instanceof FileHandler) {\r
+ if ($this->fileHandler != null && $this->fileHandler instanceof IFileHandler) {\r
$this->fileHandler->checkFiles($files);\r
}\r
}\r
* @param array $files list of files\r
*/\r
protected function logFiles(&$files) {\r
- if ($this->fileHandler != null && $this->fileHandler instanceof FileHandler) {\r
+ if ($this->fileHandler != null && $this->fileHandler instanceof IFileHandler) {\r
$this->fileHandler->logFiles($files);\r
}\r
}\r
--- /dev/null
+<?php\r
+namespace wcf\system\template;\r
+\r
+/**\r
+ * Block functions encloses a template block and operate on the contents of this block.\r
+ * \r
+ * @author Marcel Werk\r
+ * @copyright 2001-2011 WoltLab GmbH\r
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
+ * @package com.woltlab.wcf\r
+ * @subpackage system.template\r
+ * @category Community Framework\r
+ */\r
+interface ITemplatePluginBlock {\r
+ /**\r
+ * Executes this template block.\r
+ * \r
+ * @param array $tagArgs\r
+ * @param string $blockContent\r
+ * @param TemplateEngine $tplObj\r
+ * @return string output\r
+ */\r
+ public function execute($tagArgs, $blockContent, TemplateEngine $tplObj);\r
+ \r
+ /**\r
+ * Initialises this template block.\r
+ * \r
+ * @param array $tagArgs\r
+ * @param TemplateEngine $tplObj\r
+ */\r
+ public function init($tagArgs, TemplateEngine $tplObj);\r
+ \r
+ /**\r
+ * This function is called before every execution of this block function.\r
+ * \r
+ * @param TemplateEngine $tplObj\r
+ * @return boolean\r
+ */\r
+ public function next(TemplateEngine $tplObj);\r
+}
--- /dev/null
+<?php\r
+namespace wcf\system\template;\r
+\r
+/**\r
+ * Compiler functions are called during the compilation of a template.\r
+ *\r
+ * @author Marcel Werk\r
+ * @copyright 2001-2011 WoltLab GmbH\r
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
+ * @package com.woltlab.wcf\r
+ * @subpackage system.template\r
+ * @category Community Framework\r
+ */\r
+interface ITemplatePluginCompiler {\r
+ /**\r
+ * Executes the start tag of this compiler function.\r
+ * \r
+ * @param array $tagArgs \r
+ * @param TemplateScriptingCompiler $compiler\r
+ * @return string php code \r
+ */\r
+ public function executeStart($tagArgs, TemplateScriptingCompiler $compiler);\r
+ \r
+ /**\r
+ * Executes the end tag of this compiler function.\r
+ * \r
+ * @param TemplateScriptingCompiler $compiler \r
+ * @return string php code \r
+ */\r
+ public function executeEnd(TemplateScriptingCompiler $tplObj);\r
+}
--- /dev/null
+<?php\r
+namespace wcf\system\template;\r
+\r
+/**\r
+ * Template functions are identical to template blocks, but they have no closing tag.\r
+ * \r
+ * @author Marcel Werk\r
+ * @copyright 2001-2011 WoltLab GmbH\r
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
+ * @package com.woltlab.wcf\r
+ * @subpackage system.template\r
+ * @category Community Framework\r
+ */\r
+interface ITemplatePluginFunction {\r
+ /**\r
+ * Executes this template function.\r
+ * \r
+ * @param array $tagArgs\r
+ * @param TemplateEngine $tplObj\r
+ * @return string output\r
+ */\r
+ public function execute($tagArgs, TemplateEngine $tplObj);\r
+}
--- /dev/null
+<?php\r
+namespace wcf\system\template;\r
+\r
+/**\r
+ * Modifiers are functions that are applied to a variable in the template \r
+ * before it is displayed or used in some other context.\r
+ * \r
+ * @author Marcel Werk\r
+ * @copyright 2001-2011 WoltLab GmbH\r
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
+ * @package com.woltlab.wcf\r
+ * @subpackage system.template\r
+ * @category Community Framework\r
+ */\r
+interface ITemplatePluginModifier {\r
+ /**\r
+ * Executes this modifier.\r
+ * \r
+ * @param array $tagArgs \r
+ * @param TemplateEngine $tplObj\r
+ * @return string output \r
+ */\r
+ public function execute($tagArgs, TemplateEngine $tplObj);\r
+}
--- /dev/null
+<?php\r
+namespace wcf\system\template;\r
+\r
+/**\r
+ * Prefilters are used to process the source of the template immediately before compilation.\r
+ * \r
+ * @author Marcel Werk\r
+ * @copyright 2001-2011 WoltLab GmbH\r
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
+ * @package com.woltlab.wcf\r
+ * @subpackage system.template\r
+ * @category Community Framework\r
+ */\r
+interface ITemplatePluginPrefilter {\r
+ /**\r
+ * Executes this prefilter.\r
+ * \r
+ * @param string $templateName\r
+ * @param string $sourceContent \r
+ * @param TemplateScriptingCompiler $compiler \r
+ * @return string $sourceContent\r
+ */\r
+ public function execute($templateName, $sourceContent, TemplateScriptingCompiler $compiler);\r
+}
+++ /dev/null
-<?php\r
-namespace wcf\system\template;\r
-\r
-/**\r
- * Block functions encloses a template block and operate on the contents of this block.\r
- * \r
- * @author Marcel Werk\r
- * @copyright 2001-2011 WoltLab GmbH\r
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
- * @package com.woltlab.wcf\r
- * @subpackage system.template\r
- * @category Community Framework\r
- */\r
-interface TemplatePluginBlock {\r
- /**\r
- * Executes this template block.\r
- * \r
- * @param array $tagArgs\r
- * @param string $blockContent\r
- * @param TemplateEngine $tplObj\r
- * @return string output\r
- */\r
- public function execute($tagArgs, $blockContent, TemplateEngine $tplObj);\r
- \r
- /**\r
- * Initialises this template block.\r
- * \r
- * @param array $tagArgs\r
- * @param TemplateEngine $tplObj\r
- */\r
- public function init($tagArgs, TemplateEngine $tplObj);\r
- \r
- /**\r
- * This function is called before every execution of this block function.\r
- * \r
- * @param TemplateEngine $tplObj\r
- * @return boolean\r
- */\r
- public function next(TemplateEngine $tplObj);\r
-}
+++ /dev/null
-<?php\r
-namespace wcf\system\template;\r
-\r
-/**\r
- * Compiler functions are called during the compilation of a template.\r
- *\r
- * @author Marcel Werk\r
- * @copyright 2001-2011 WoltLab GmbH\r
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
- * @package com.woltlab.wcf\r
- * @subpackage system.template\r
- * @category Community Framework\r
- */\r
-interface TemplatePluginCompiler {\r
- /**\r
- * Executes the start tag of this compiler function.\r
- * \r
- * @param array $tagArgs \r
- * @param TemplateScriptingCompiler $compiler\r
- * @return string php code \r
- */\r
- public function executeStart($tagArgs, TemplateScriptingCompiler $compiler);\r
- \r
- /**\r
- * Executes the end tag of this compiler function.\r
- * \r
- * @param TemplateScriptingCompiler $compiler \r
- * @return string php code \r
- */\r
- public function executeEnd(TemplateScriptingCompiler $tplObj);\r
-}
+++ /dev/null
-<?php\r
-namespace wcf\system\template;\r
-\r
-/**\r
- * Template functions are identical to template blocks, but they have no closing tag.\r
- * \r
- * @author Marcel Werk\r
- * @copyright 2001-2011 WoltLab GmbH\r
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
- * @package com.woltlab.wcf\r
- * @subpackage system.template\r
- * @category Community Framework\r
- */\r
-interface TemplatePluginFunction {\r
- /**\r
- * Executes this template function.\r
- * \r
- * @param array $tagArgs\r
- * @param TemplateEngine $tplObj\r
- * @return string output\r
- */\r
- public function execute($tagArgs, TemplateEngine $tplObj);\r
-}
+++ /dev/null
-<?php\r
-namespace wcf\system\template;\r
-\r
-/**\r
- * Modifiers are functions that are applied to a variable in the template \r
- * before it is displayed or used in some other context.\r
- * \r
- * @author Marcel Werk\r
- * @copyright 2001-2011 WoltLab GmbH\r
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
- * @package com.woltlab.wcf\r
- * @subpackage system.template\r
- * @category Community Framework\r
- */\r
-interface TemplatePluginModifier {\r
- /**\r
- * Executes this modifier.\r
- * \r
- * @param array $tagArgs \r
- * @param TemplateEngine $tplObj\r
- * @return string output \r
- */\r
- public function execute($tagArgs, TemplateEngine $tplObj);\r
-}
+++ /dev/null
-<?php\r
-namespace wcf\system\template;\r
-\r
-/**\r
- * Prefilters are used to process the source of the template immediately before compilation.\r
- * \r
- * @author Marcel Werk\r
- * @copyright 2001-2011 WoltLab GmbH\r
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
- * @package com.woltlab.wcf\r
- * @subpackage system.template\r
- * @category Community Framework\r
- */\r
-interface TemplatePluginPrefilter {\r
- /**\r
- * Executes this prefilter.\r
- * \r
- * @param string $templateName\r
- * @param string $sourceContent \r
- * @param TemplateScriptingCompiler $compiler \r
- * @return string $sourceContent\r
- */\r
- public function execute($templateName, $sourceContent, TemplateScriptingCompiler $compiler);\r
-}
$this->compilerPlugins[$className] = new $className();
- if (!($this->compilerPlugins[$className] instanceof TemplatePluginCompiler)) {
- throw new SystemException($this->formatSyntaxError("Compiler plugin '".$tagCommand."' does not implement the interface 'TemplatePluginCompiler'", $this->currentIdentifier), 11010);
+ if (!($this->compilerPlugins[$className] instanceof ITemplatePluginCompiler)) {
+ throw new SystemException($this->formatSyntaxError("Compiler plugin '".$tagCommand."' does not implement the interface 'ITemplatePluginCompiler'", $this->currentIdentifier), 11010);
}
}
$prefilter = new $className();
}
- if ($prefilter instanceof TemplatePluginPrefilter) {
+ if ($prefilter instanceof ITemplatePluginPrefilter) {
$string = $prefilter->execute($templateName, $string, $this);
}
else {
- throw new SystemException($this->formatSyntaxError("Prefilter '".$prefilter."' does not implement the interface 'TemplatePluginPrefilter'", $this->currentIdentifier), 11010);
+ throw new SystemException($this->formatSyntaxError("Prefilter '".$prefilter."' does not implement the interface 'ITemplatePluginPrefilter'", $this->currentIdentifier), 11010);
}
}
<?php\r
namespace wcf\system\template\plugin;\r
use wcf\system\request\LinkHandler;\r
-use wcf\system\template\TemplatePluginBlock;\r
+use wcf\system\template\ITemplatePluginBlock;\r
use wcf\system\template\TemplateEngine;\r
\r
/**\r
* @subpackage system.template.plugin\r
* @category Community Framework\r
*/\r
-class TemplatePluginBlockLink implements TemplatePluginBlock {\r
+class TemplatePluginBlockLink implements ITemplatePluginBlock {\r
/**\r
* internal loop counter\r
* @var integer\r
protected $counter = 0;\r
\r
/**\r
- * @see TemplatePluginBlock::execute()\r
+ * @see wcf\system\template\ITemplatePluginBlock::execute()\r
*/\r
public function execute($tagArgs, $blockContent, TemplateEngine $tplObj) {\r
$application = 'wcf';\r
}\r
\r
/**\r
- * @see TemplatePluginBlock::init()\r
+ * @see wcf\system\template\ITemplatePluginBlock::init()\r
*/\r
public function init($tagArgs, TemplateEngine $tplObj) {\r
$this->counter = 0;\r
}\r
\r
/**\r
- * @see TemplatePluginBlock::next()\r
+ * @see wcf\system\template\ITemplatePluginBlock::next()\r
*/\r
public function next(TemplateEngine $tplObj) {\r
if ($this->counter == 0) {\r
<?php\r
namespace wcf\system\template\plugin;\r
-use wcf\system\template\TemplatePluginCompiler;\r
+use wcf\system\template\ITemplatePluginCompiler;\r
use wcf\system\template\TemplateScriptingCompiler;\r
use wcf\system\exception\SystemException;\r
\r
* @subpackage system.template.plugin\r
* @category Community Framework\r
*/\r
-class TemplatePluginCompilerAppend implements TemplatePluginCompiler {\r
+class TemplatePluginCompilerAppend implements ITemplatePluginCompiler {\r
/**\r
- * @see TemplatePluginCompiler::executeStart()\r
+ * @see wcf\system\template\ITemplatePluginCompiler::executeStart()\r
*/\r
public function executeStart($tagArgs, TemplateScriptingCompiler $compiler) {\r
if (!isset($tagArgs['var'])) {\r
}\r
\r
/**\r
- * @see TemplatePluginCompiler::executeEnd()\r
+ * @see wcf\system\template\ITemplatePluginCompiler::executeEnd()\r
*/\r
public function executeEnd(TemplateScriptingCompiler $compiler) {\r
throw new SystemException($compiler->formatSyntaxError("unknown tag {/append}", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo()), 12003);\r
<?php\r
namespace wcf\system\template\plugin;\r
-use wcf\system\template\TemplatePluginCompiler;\r
+use wcf\system\template\ITemplatePluginCompiler;\r
use wcf\system\template\TemplateScriptingCompiler;\r
use wcf\system\exception\SystemException;\r
\r
* @subpackage system.template.plugin\r
* @category Community Framework\r
*/\r
-class TemplatePluginCompilerAssign implements TemplatePluginCompiler {\r
+class TemplatePluginCompilerAssign implements ITemplatePluginCompiler {\r
/**\r
- * @see TemplatePluginCompiler::executeStart()\r
+ * @see wcf\system\template\ITemplatePluginCompiler::executeStart()\r
*/\r
public function executeStart($tagArgs, TemplateScriptingCompiler $compiler) {\r
if (!isset($tagArgs['var'])) {\r
}\r
\r
/**\r
- * @see TemplatePluginCompiler::executeEnd()\r
+ * @see wcf\system\template\ITemplatePluginCompiler::executeEnd()\r
*/\r
public function executeEnd(TemplateScriptingCompiler $compiler) {\r
throw new SystemException($compiler->formatSyntaxError("unknown tag {/assign}", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo()), 12003);\r
<?php\r
namespace wcf\system\template\plugin;\r
-use wcf\system\template\TemplatePluginCompiler;\r
+use wcf\system\template\ITemplatePluginCompiler;\r
use wcf\system\template\TemplateScriptingCompiler;\r
use wcf\system\exception\SystemException;\r
\r
* {fetch file='x.html' assign=var}\r
* \r
* @author Marcel Werk\r
- * @copyright 2001-2009 WoltLab GmbH\r
+ * @copyright 2001-2011 WoltLab GmbH\r
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
* @package com.woltlab.wcf\r
* @subpackage system.template.plugin\r
* @category Community Framework\r
*/\r
-class TemplatePluginCompilerFetch implements TemplatePluginCompiler {\r
+class TemplatePluginCompilerFetch implements ITemplatePluginCompiler {\r
/**\r
- * @see TemplatePluginCompiler::executeStart()\r
+ * @see wcf\system\template\ITemplatePluginCompiler::executeStart()\r
*/\r
public function executeStart($tagArgs, TemplateScriptingCompiler $compiler) {\r
if (!isset($tagArgs['file'])) {\r
}\r
\r
/**\r
- * @see TemplatePluginCompiler::executeEnd()\r
+ * @see wcf\system\template\ITemplatePluginCompiler::executeEnd()\r
*/\r
public function executeEnd(TemplateScriptingCompiler $compiler) {\r
throw new SystemException($compiler->formatSyntaxError("unknown tag {/fetch}", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo()), 12003);\r
<?php
namespace wcf\system\template\plugin;
-use wcf\system\template\TemplatePluginCompiler;
+use wcf\system\template\ITemplatePluginCompiler;
use wcf\system\template\TemplateScriptingCompiler;
use wcf\util\StringUtil;
* @subpackage system.template.plugin
* @category Community Framework
*/
-class TemplatePluginCompilerIcon implements TemplatePluginCompiler {
+class TemplatePluginCompilerIcon implements ITemplatePluginCompiler {
/**
- * @see TemplatePluginCompiler::executeStart()
+ * @see wcf\system\template\ITemplatePluginCompiler::executeStart()
*/
public function executeStart($tagArgs, TemplateScriptingCompiler $compiler) {
$compiler->pushTag('icon');
}
/**
- * @see TemplatePluginCompiler::executeEnd()
+ * @see wcf\system\template\ITemplatePluginCompiler::executeEnd()
*/
public function executeEnd(TemplateScriptingCompiler $compiler) {
$compiler->popTag('icon');
<?php\r
namespace wcf\system\template\plugin;\r
-use wcf\system\template\TemplatePluginCompiler;\r
+use wcf\system\template\ITemplatePluginCompiler;\r
use wcf\system\template\TemplateScriptingCompiler;\r
use wcf\system\exception\SystemException;\r
use wcf\util\StringUtil;\r
* @subpackage system.template.plugin\r
* @category Community Framework\r
*/\r
-class TemplatePluginCompilerImplode implements TemplatePluginCompiler {\r
+class TemplatePluginCompilerImplode implements ITemplatePluginCompiler {\r
protected $tagStack = array();\r
\r
/**\r
- * @see TemplatePluginCompiler::executeStart()\r
+ * @see wcf\system\template\ITemplatePluginCompiler::executeStart()\r
*/\r
public function executeStart($tagArgs, TemplateScriptingCompiler $compiler) {\r
$compiler->pushTag('implode');\r
}\r
\r
/**\r
- * @see TemplatePluginCompiler::executeEnd()\r
+ * @see wcf\system\template\ITemplatePluginCompiler::executeEnd()\r
*/\r
public function executeEnd(TemplateScriptingCompiler $compiler) {\r
$compiler->popTag('implode');\r
<?php\r
namespace wcf\system\template\plugin;\r
-use wcf\system\template\TemplatePluginCompiler;\r
+use wcf\system\template\ITemplatePluginCompiler;\r
use wcf\system\template\TemplateScriptingCompiler;\r
use wcf\util\StringUtil;\r
\r
* @subpackage system.template.plugin\r
* @category Community Framework\r
*/\r
-class TemplatePluginCompilerLang implements TemplatePluginCompiler {\r
+class TemplatePluginCompilerLang implements ITemplatePluginCompiler {\r
/**\r
- * @see TemplatePluginCompiler::executeStart()\r
+ * @see wcf\system\template\ITemplatePluginCompiler::executeStart()\r
*/\r
public function executeStart($tagArgs, TemplateScriptingCompiler $compiler) {\r
$compiler->pushTag('lang');\r
}\r
\r
/**\r
- * @see TemplatePluginCompiler::executeEnd()\r
+ * @see wcf\system\template\ITemplatePluginCompiler::executeEnd()\r
*/\r
public function executeEnd(TemplateScriptingCompiler $compiler) {\r
$compiler->popTag('lang');\r
<?php
namespace wcf\system\template\plugin;
-use wcf\system\template\TemplatePluginCompiler;
+use wcf\system\template\ITemplatePluginCompiler;
use wcf\system\template\TemplateScriptingCompiler;
use wcf\util\StringUtil;
* @subpackage system.template.plugin
* @category Community Framework
*/
-class TemplatePluginCompilerPrepend implements TemplatePluginCompiler {
+class TemplatePluginCompilerPrepend implements ITemplatePluginCompiler {
/**
- * @see TemplatePluginCompiler::executeStart()
+ * @see wcf\system\template\ITemplatePluginCompiler::executeStart()
*/
public function executeStart($tagArgs, TemplateScriptingCompiler $compiler) {
if (!isset($tagArgs['var'])) {
}
/**
- * @see TemplatePluginCompiler::executeEnd()
+ * @see wcf\system\template\ITemplatePluginCompiler::executeEnd()
*/
public function executeEnd(TemplateScriptingCompiler $compiler) {
throw new SystemException($compiler->formatSyntaxError("unknown tag {/prepend}", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo()), 12003);
<?php
namespace wcf\system\template\plugin;
-use wcf\system\template\TemplatePluginCompiler;
+use wcf\system\template\ITemplatePluginCompiler;
use wcf\system\template\TemplateScriptingCompiler;
use wcf\util\StringUtil;
* @subpackage system.template.plugin
* @category Community Framework
*/
-class TemplatePluginCompilerStaticlang implements TemplatePluginCompiler {
+class TemplatePluginCompilerStaticlang implements ITemplatePluginCompiler {
/**
- * @see TemplatePluginCompiler::executeStart()
+ * @see wcf\system\template\ITemplatePluginCompiler::executeStart()
*/
public function executeStart($tagArgs, TemplateScriptingCompiler $compiler) {
$compiler->pushTag('staticlang');
}
/**
- * @see TemplatePluginCompiler::executeEnd()
+ * @see wcf\system\template\ITemplatePluginCompiler::executeEnd()
*/
public function executeEnd(TemplateScriptingCompiler $compiler) {
$compiler->popTag('staticlang');
<?php\r
namespace wcf\system\template\plugin;\r
-use wcf\system\template\TemplatePluginFunction;\r
+use wcf\system\template\ITemplatePluginFunction;\r
use wcf\system\template\TemplateEngine;\r
\r
/**\r
* @subpackage system.template.plugin\r
* @category Community Framework\r
*/\r
-class TemplatePluginFunctionCounter implements TemplatePluginFunction {\r
+class TemplatePluginFunctionCounter implements ITemplatePluginFunction {\r
protected $counters = array();\r
\r
/**\r
- * @see TemplatePluginFunction::execute()\r
+ * @see wcf\system\template\ITemplatePluginFunction::execute()\r
*/\r
public function execute($tagArgs, TemplateEngine $tplObj) {\r
if (!isset($tagArgs['name'])) {\r
<?php\r
namespace wcf\system\template\plugin;\r
use wcf\system\exception\SystemException;\r
-use wcf\system\template\TemplatePluginFunction;\r
+use wcf\system\template\ITemplatePluginFunction;\r
use wcf\system\template\TemplateEngine;\r
\r
/**\r
* {cycle values="#eee,#fff"}\r
*\r
* @author Marcel Werk\r
- * @copyright 2001-2009 WoltLab GmbH\r
+ * @copyright 2001-2011 WoltLab GmbH\r
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
* @package com.woltlab.wcf\r
* @subpackage system.template.plugin\r
* @category Community Framework\r
*/\r
-class TemplatePluginFunctionCycle implements TemplatePluginFunction {\r
+class TemplatePluginFunctionCycle implements ITemplatePluginFunction {\r
protected $cycles = array();\r
\r
/**\r
- * @see TemplatePluginFunction::execute()\r
+ * @see wcf\system\template\ITemplatePluginFunction::execute()\r
*/\r
public function execute($tagArgs, TemplateEngine $tplObj) {\r
// get params\r
<?php\r
namespace wcf\system\template\plugin;\r
use wcf\system\exception\SystemException;\r
-use wcf\system\template\TemplatePluginFunction;\r
+use wcf\system\template\ITemplatePluginFunction;\r
use wcf\system\template\TemplateEngine;\r
use wcf\util\StringUtil;\r
\r
* @subpackage system.template.plugin\r
* @category Community Framework\r
*/\r
-class TemplatePluginFunctionHtmlcheckboxes implements TemplatePluginFunction {\r
+class TemplatePluginFunctionHtmlcheckboxes implements ITemplatePluginFunction {\r
protected $disableEncoding = false;\r
\r
/**\r
- * @see TemplatePluginFunction::execute()\r
+ * @see wcf\system\template\ITemplatePluginFunction::execute()\r
*/\r
public function execute($tagArgs, TemplateEngine $tplObj) {\r
// get options\r
protected $selected = array();\r
\r
/**\r
- * @see TemplatePluginFunction::execute()\r
+ * @see wcf\system\template\ITemplatePluginFunction::execute()\r
*/\r
public function execute($tagArgs, TemplateEngine $tplObj) {\r
if (isset($tagArgs['output']) && is_array($tagArgs['output'])) {\r
use wcf\system\WCF;\r
use wcf\system\exception\SystemException;\r
use wcf\system\template\TemplateEngine;\r
-use wcf\system\template\TemplatePluginFunction;\r
+use wcf\system\template\ITemplatePluginFunction;\r
use wcf\util\StringUtil;\r
\r
/**\r
* @subpackage system.template.plugin\r
* @category Community Framework\r
*/\r
-class TemplatePluginFunctionPages implements TemplatePluginFunction {\r
+class TemplatePluginFunctionPages implements ITemplatePluginFunction {\r
const SHOW_LINKS = 11;\r
const SHOW_SUB_LINKS = 20;\r
\r
}\r
\r
/**\r
- * @see TemplatePluginFunction::execute()\r
+ * @see wcf\system\template\ITemplatePluginFunction::execute()\r
*/\r
public function execute($tagArgs, TemplateEngine $tplObj) {\r
// needed params: link, page, pages\r
use wcf\system\WCF;
use wcf\system\exception\SystemException;
use wcf\system\template\TemplateEngine;
-use wcf\system\template\TemplatePluginFunction;
+use wcf\system\template\ITemplatePluginFunction;
use wcf\util\StringUtil;
/**
* @subpackage system.template.plugin
* @category Community Framework
*/
-class TemplatePluginFunctionSmallpages implements TemplatePluginFunction {
+class TemplatePluginFunctionSmallpages implements ITemplatePluginFunction {
const SHOW_LINKS = 5;
/**
}
/**
- * @see TemplatePluginFunction::execute()
+ * @see wcf\system\template\ITemplatePluginFunction::execute()
*/
public function execute($tagArgs, TemplateEngine $tplObj) {
// needed params: link, pages
namespace wcf\system\template\plugin;
use wcf\data\option\Option;
use wcf\system\template\TemplateEngine;
-use wcf\system\template\TemplatePluginModifier;
+use wcf\system\template\ITemplatePluginModifier;
/**
* The 'arrayfromlist' modifier generates an associative array out of a key-value list.
* @subpackage system.template.plugin
* @category Community Framework
*/
-class TemplatePluginModifierArrayfromlist implements TemplatePluginModifier {
+class TemplatePluginModifierArrayfromlist implements ITemplatePluginModifier {
/**
- * @see TemplatePluginModifier::execute()
+ * @see wcf\system\template\ITemplatePluginModifier::execute()
*/
public function execute($tagArgs, TemplateEngine $tplObj) {
return Option::parseSelectOptions($tagArgs[0]);
namespace wcf\system\template\plugin;\r
use wcf\system\exception\SystemException;\r
use wcf\system\template\TemplateEngine;\r
-use wcf\system\template\TemplatePluginModifier;\r
+use wcf\system\template\ITemplatePluginModifier;\r
\r
/**\r
* The 'concat' modifier returns the string that results from concatenating the arguments.\r
* @subpackage system.template.plugin\r
* @category Community Framework\r
*/\r
-class TemplatePluginModifierConcat implements TemplatePluginModifier {\r
+class TemplatePluginModifierConcat implements ITemplatePluginModifier {\r
/**\r
- * @see TemplatePluginModifier::execute()\r
+ * @see wcf\system\template\ITemplatePluginModifier::execute()\r
*/\r
public function execute($tagArgs, TemplateEngine $tplObj) {\r
if (count($tagArgs) < 2) {\r
<?php\r
namespace wcf\system\template\plugin;\r
use wcf\system\template\TemplateEngine;\r
-use wcf\system\template\TemplatePluginModifier;\r
+use wcf\system\template\ITemplatePluginModifier;\r
use wcf\util\DateUtil;\r
\r
/**\r
* @subpackage system.template.plugin\r
* @category Community Framework\r
*/\r
-class TemplatePluginModifierDate implements TemplatePluginModifier {\r
+class TemplatePluginModifierDate implements ITemplatePluginModifier {\r
/**\r
- * @see TemplatePluginModifier::execute()\r
+ * @see wcf\system\template\ITemplatePluginModifier::execute()\r
*/\r
public function execute($tagArgs, TemplateEngine $tplObj) {\r
return DateUtil::format(DateUtil::getDateTimeByTimestamp($tagArgs[0]), (!empty($tagArgs[2]) ? $tagArgs[2] : DateUtil::DATE_FORMAT));\r
<?php
namespace wcf\system\template\plugin;
use wcf\system\template\TemplateEngine;
-use wcf\system\template\TemplatePluginModifier;
+use wcf\system\template\ITemplatePluginModifier;
use wcf\util\DateUtil;
/**
* @subpackage system.template.plugin
* @category Community Framework
*/
-class TemplatePluginModifierDatediff implements TemplatePluginModifier {
+class TemplatePluginModifierDatediff implements ITemplatePluginModifier {
/**
- * @see TemplatePluginModifier::execute()
+ * @see wcf\system\template\ITemplatePluginModifier::execute()
*/
public function execute($tagArgs, TemplateEngine $tplObj) {
// get timestamps
<?php\r
namespace wcf\system\template\plugin;\r
use wcf\system\template\TemplateEngine;\r
-use wcf\system\template\TemplatePluginModifier;\r
+use wcf\system\template\ITemplatePluginModifier;\r
use wcf\util\StringUtil;\r
\r
/**\r
* @subpackage system.template.plugin\r
* @category Community Framework\r
*/\r
-class TemplatePluginModifierEncodejs implements TemplatePluginModifier {\r
+class TemplatePluginModifierEncodejs implements ITemplatePluginModifier {\r
/**\r
- * @see TemplatePluginModifier::execute()\r
+ * @see wcf\system\template\ITemplatePluginModifier::execute()\r
*/\r
public function execute($tagArgs, TemplateEngine $tplObj) {\r
// escape backslash\r
<?php\r
namespace wcf\system\template\plugin;\r
use wcf\system\template\TemplateEngine;\r
-use wcf\system\template\TemplatePluginModifier;\r
+use wcf\system\template\ITemplatePluginModifier;\r
use wcf\util\FileUtil;\r
\r
/**\r
* @subpackage system.template.plugin\r
* @category Community Framework\r
*/\r
-class TemplatePluginModifierFilesize implements TemplatePluginModifier {\r
+class TemplatePluginModifierFilesize implements ITemplatePluginModifier {\r
/**\r
- * @see TemplatePluginModifier::execute()\r
+ * @see wcf\system\template\ITemplatePluginModifier::execute()\r
*/\r
public function execute($tagArgs, TemplateEngine $tplObj) {\r
return FileUtil::formatFilesize($tagArgs[0]);\r
<?php
namespace wcf\system\template\plugin;
use wcf\system\template\TemplateEngine;
-use wcf\system\template\TemplatePluginModifier;
+use wcf\system\template\ITemplatePluginModifier;
use wcf\util\FileUtil;
/**
* @subpackage system.template.plugin
* @category Community Framework
*/
-class TemplatePluginModifierFilesizeBinary implements TemplatePluginModifier {
+class TemplatePluginModifierFilesizeBinary implements ITemplatePluginModifier {
/**
- * @see TemplatePluginModifier::execute()
+ * @see wcf\system\template\ITemplatePluginModifier::execute()
*/
public function execute($tagArgs, TemplateEngine $tplObj) {
return FileUtil::formatFilesizeBinary($tagArgs[0]);
<?php\r
namespace wcf\system\template\plugin;\r
use wcf\system\template\TemplateEngine;\r
-use wcf\system\template\TemplatePluginModifier;\r
+use wcf\system\template\ITemplatePluginModifier;\r
use wcf\system\WCF;\r
use wcf\util\DateUtil;\r
\r
* @subpackage system.template.plugin\r
* @category Community Framework\r
*/\r
-class TemplatePluginModifierPlainTime implements TemplatePluginModifier {\r
+class TemplatePluginModifierPlainTime implements ITemplatePluginModifier {\r
/**\r
- * @see TemplatePluginModifier::execute()\r
+ * @see wcf\system\template\ITemplatePluginModifier::execute()\r
*/\r
public function execute($tagArgs, TemplateEngine $tplObj) {\r
$dateTime = DateUtil::getDateTimeByTimestamp($tagArgs[0]);\r
<?php\r
namespace wcf\system\template\plugin;\r
use wcf\system\template\TemplateEngine;\r
-use wcf\system\template\TemplatePluginModifier;\r
+use wcf\system\template\ITemplatePluginModifier;\r
use wcf\system\WCF;\r
use wcf\util\DateUtil;\r
\r
* @subpackage system.template.plugin\r
* @category Community Framework\r
*/\r
-class TemplatePluginModifierTime implements TemplatePluginModifier {\r
+class TemplatePluginModifierTime implements ITemplatePluginModifier {\r
/**\r
- * @see TemplatePluginModifier::execute()\r
+ * @see wcf\system\template\ITemplatePluginModifier::execute()\r
*/\r
public function execute($tagArgs, TemplateEngine $tplObj) {\r
$timestamp = intval($tagArgs[0]);\r
<?php\r
namespace wcf\system\template\plugin;\r
use wcf\system\template\TemplateEngine;\r
-use wcf\system\template\TemplatePluginModifier;\r
+use wcf\system\template\ITemplatePluginModifier;\r
use wcf\util\StringUtil;\r
\r
/**\r
* @subpackage system.template.plugin\r
* @category Community Framework\r
*/\r
-class TemplatePluginModifierTruncate implements TemplatePluginModifier {\r
+class TemplatePluginModifierTruncate implements ITemplatePluginModifier {\r
/**\r
- * @see TemplatePluginModifier::execute()\r
+ * @see wcf\system\template\ITemplatePluginModifier::execute()\r
*/\r
public function execute($tagArgs, TemplateEngine $tplObj) {\r
// default values\r
<?php
namespace wcf\system\template\plugin;
-use wcf\system\template\TemplatePluginPrefilter;
+use wcf\system\template\ITemplatePluginPrefilter;
use wcf\system\template\TemplateScriptingCompiler;
/**
* @subpackage system.template.plugin
* @category Community Framework
*/
-class TemplatePluginPrefilterEvent implements TemplatePluginPrefilter {
+class TemplatePluginPrefilterEvent implements ITemplatePluginPrefilter {
/**
- * @see TemplatePluginPrefilter::execute()
+ * @see wcf\system\template\ITemplatePluginPrefilter::execute()
*/
public function execute($templateName, $sourceContent, TemplateScriptingCompiler $compiler) {
$ldq = preg_quote($compiler->getLeftDelimiter(), '~');
<?php
namespace wcf\system\template\plugin;
-use wcf\system\template\TemplatePluginPrefilter;
+use wcf\system\template\ITemplatePluginPrefilter;
use wcf\system\template\TemplateScriptingCompiler;
use wcf\util\StringUtil;
* @subpackage system.template.plugin
* @category Community Framework
*/
-class TemplatePluginPrefilterHascontent implements TemplatePluginPrefilter {
+class TemplatePluginPrefilterHascontent implements ITemplatePluginPrefilter {
/**
- * @see TemplatePluginPrefilter::execute()
+ * @see wcf\system\template\ITemplatePluginPrefilter::execute()
*/
public function execute($templateName, $sourceContent, TemplateScriptingCompiler $compiler) {
$ldq = preg_quote($compiler->getLeftDelimiter(), '~');
<?php
namespace wcf\system\template\plugin;
-use wcf\system\template\TemplatePluginPrefilter;
+use wcf\system\template\ITemplatePluginPrefilter;
use wcf\system\template\TemplateScriptingCompiler;
/**
* @subpackage system.template.plugin
* @category Community Framework
*/
-class TemplatePluginPrefilterIcon implements TemplatePluginPrefilter {
+class TemplatePluginPrefilterIcon implements ITemplatePluginPrefilter {
/**
- * @see TemplatePluginPrefilter::execute()
+ * @see wcf\system\template\ITemplatePluginPrefilter::execute()
*/
public function execute($sourceContent, TemplateScriptingCompiler $compiler) {
$ldq = preg_quote($compiler->getLeftDelimiter(), '~');
<?php\r
namespace wcf\system\template\plugin;\r
-use wcf\system\template\TemplatePluginPrefilter;\r
+use wcf\system\template\ITemplatePluginPrefilter;\r
use wcf\system\template\TemplateScriptingCompiler;\r
use wcf\system\WCF;\r
\r
* @subpackage system.template.plugin\r
* @category Community Framework\r
*/\r
-class TemplatePluginPrefilterLang implements TemplatePluginPrefilter {\r
+class TemplatePluginPrefilterLang implements ITemplatePluginPrefilter {\r
/**\r
- * @see TemplatePluginPrefilter::execute()\r
+ * @see wcf\system\template\ITemplatePluginPrefilter::execute()\r
*/\r
public function execute($templateName, $sourceContent, TemplateScriptingCompiler $compiler) {\r
$ldq = preg_quote($compiler->getLeftDelimiter(), '~');\r