{
parent::assignVariables();
- $classParts = \explode('\\', \get_class($this));
+ $classParts = \explode('\\', static::class);
WCF::getTPL()->assign([
'actions' => $this->actions,
*/
public function __run()
{
- $classNameParts = \explode('\\', \get_called_class());
+ $classNameParts = \explode('\\', static::class);
$className = \array_pop($classNameParts);
// autoset controllers
*/
public function __run()
{
- $classNameParts = \explode('\\', \get_called_class());
+ $classNameParts = \explode('\\', static::class);
$className = \array_pop($classNameParts);
// autoset controllers
}
// execute request
- $className = \get_called_class();
+ $className = static::class;
/** @var AJAXInvokeAction $actionObject */
$actionObject = new $className();
$methodName = 'step' . StringUtil::firstCharToUpperCase($this->step);
if (!\method_exists($this, $methodName)) {
- throw new AJAXException("Class '" . \get_class($this) . "' does not implement the required method '" . $methodName . "'");
+ throw new AJAXException("Class '" . static::class . "' does not implement the required method '" . $methodName . "'");
}
// execute step
{
// set class name
if (empty($this->className)) {
- $className = \get_called_class();
+ $className = static::class;
if (\mb_substr($className, -6) == 'Action') {
$this->className = \mb_substr($className, 0, -6) . 'Editor';
*/
public static function getDatabaseTableName()
{
- $className = \get_called_class();
+ $className = static::class;
$classParts = \explode('\\', $className);
if (static::$databaseTableName !== '') {
return static::$databaseTableName;
}
- $className = \get_called_class();
+ $className = static::class;
static $databaseTableAliases = [];
if (!isset($databaseTableAliases[$className])) {
$classParts = \explode('\\', $className);
static $databaseTableIndexName = null;
if ($databaseTableIndexName === null) {
- $className = \explode('\\', \get_called_class());
+ $className = \explode('\\', static::class);
$parts = \preg_split(
'~(?=[A-Z](?=[a-z]))~',
\array_pop($className),
{
// set class name
if (empty($this->className)) {
- $className = \get_called_class();
+ $className = static::class;
if (\mb_substr($className, -4) == 'List') {
$this->className = \mb_substr($className, 0, -4);
break;
}
- EventHandler::getInstance()->fireAction(\get_called_class(), 'isVisible', $data);
+ EventHandler::getInstance()->fireAction(static::class, 'isVisible', $data);
return $data['result'];
}
break;
}
- EventHandler::getInstance()->fireAction(\get_called_class(), 'isVisibleUser', $data);
+ EventHandler::getInstance()->fireAction(static::class, 'isVisibleUser', $data);
return $data['result'];
}
*/
protected function createForm()
{
- $classNamePieces = \explode('\\', \get_class($this));
+ $classNamePieces = \explode('\\', static::class);
$controller = \preg_replace('~Form$~', '', \end($classNamePieces));
$this->form = $this->formClassName::create(\lcfirst($controller));
protected function validateText()
{
if (empty($this->messageObjectType)) {
- throw new \RuntimeException("Expected non-empty message object type for '" . \get_class($this) . "'");
+ throw new \RuntimeException("Expected non-empty message object type for '" . static::class . "'");
}
if (empty($this->text)) {
EventHandler::getInstance()->fireAction($this, 'show');
// try to guess template name
- $classParts = \explode('\\', \get_class($this));
+ $classParts = \explode('\\', static::class);
if (empty($this->templateName)) {
$className = \preg_replace('~(Form|Page)$~', '', \array_pop($classParts));
RegisterForm::class,
RegisterNewActivationCodeForm::class,
];
- if (\in_array(\get_class($this), $allowedControllers)) {
+ if (\in_array(static::class, $allowedControllers)) {
// controller is allowed
return;
}
*/
final public static function isInitialized()
{
- $className = \get_called_class();
+ $className = static::class;
return isset(self::$__singletonObjects[$className]);
}
final protected function init()
{
if (empty($this->abbreviation)) {
- $classParts = \explode('\\', \get_called_class());
+ $classParts = \explode('\\', static::class);
$this->abbreviation = $classParts[0];
} elseif ($this->abbreviation == 'wcf') {
throw new SystemException("Unable to determine application, abbreviation is missing");
$reType = new Regex('\\\\?wcf\\\\system\\\\bbcode\\\\highlighter\\\\(.*)Highlighter', Regex::CASE_INSENSITIVE);
return WCF::getLanguage()->get('wcf.bbcode.code.' . $reType->replace(
- \strtolower(\get_class($this)),
+ \strtolower(static::class),
'\1'
) . '.title');
}
*/
public function getConditionHTML()
{
- return WCF::getTPL()->fetch($this->templateName, \explode('\\', \get_class($this))[0]);
+ return WCF::getTPL()->fetch($this->templateName, \explode('\\', static::class)[0]);
}
/**
public function getLanguageItemPrefix()
{
if (empty($this->languageItemPrefix)) {
- $application = \explode('\\', \get_class($this))[0];
+ $application = \explode('\\', static::class)[0];
$objectTypePieces = \explode('.', $this->getDecoratedObject()->objectType);
$this->languageItemPrefix = $application . '.acp.' . \end($objectTypePieces) . '.bulkProcessing';
*/
public function getApplication()
{
- $classParts = \explode('\\', \get_called_class());
+ $classParts = \explode('\\', static::class);
return $classParts[0];
}
*/
public function getDBType()
{
- return \get_class($this);
+ return static::class;
}
/**
{
if ($this->type === null) {
throw new \BadMethodCallException(
- "Type of the database table column " . \get_class($this) . " has not been set yet"
+ "Type of the database table column " . static::class . " has not been set yet"
);
}
*/
protected function getXsdFilename()
{
- $classNamePieces = \explode('\\', \get_class($this));
+ $classNamePieces = \explode('\\', static::class);
return \lcfirst(\str_replace('PackageInstallationPlugin', '', \array_pop($classNamePieces)));
}
}
SessionHandler::getInstance()->disableTracking();
- $name = \get_class($this);
+ $name = static::class;
$exceptionClassName = \mb_substr($name, \mb_strrpos($name, '\\') + 1);
WCF::getTPL()->assign([
@\header('HTTP/1.1 403 Forbidden');
- $name = \get_class($this);
+ $name = static::class;
$exceptionClassName = \mb_substr($name, \mb_strrpos($name, '\\') + 1);
WCF::getTPL()->assign([
- 'name' => \get_class($this),
+ 'name' => static::class,
'file' => $this->getFile(),
'line' => $this->getLine(),
'message' => $this->getMessage(),
*/
public function replaceTag(array $data)
{
- throw new \BadMethodCallException("Method replaceTag() is not supported by " . \get_class($this));
+ throw new \BadMethodCallException("Method replaceTag() is not supported by " . static::class);
}
}
*/
public function getApplication()
{
- $classParts = \explode('\\', \get_called_class());
+ $classParts = \explode('\\', static::class);
return $classParts[0];
}
break;
case 'options':
- $classnamePieces = \explode('\\', \get_class($this));
+ $classnamePieces = \explode('\\', static::class);
$pipPrefix = \str_replace('PackageInstallationPlugin', '', \array_pop($classnamePieces));
$dataContainer->appendChildren([
*/
public static function getDefaultFilename()
{
- $classParts = \explode('\\', \get_called_class());
+ $classParts = \explode('\\', static::class);
return \lcfirst(\str_replace('PackageInstallationPlugin', '', \array_pop($classParts))) . '.xml';
}
*/
public function getApplication()
{
- $classParts = \explode('\\', \get_called_class());
+ $classParts = \explode('\\', static::class);
return $classParts[0];
}
*/
public function getApplication()
{
- $classParts = \explode('\\', \get_called_class());
+ $classParts = \explode('\\', static::class);
return $classParts[0];
}