Файловый менеджер - Редактировать - /var/www/axolotl/data/www/axolotls.ru/www/bitrix/modules/socialnetwork/lib/commentaux/handlermanager.php
Назад
<?php namespace Bitrix\Socialnetwork\CommentAux; class HandlerManager { protected $handlerListByPostText = array(); protected $handlerListByType = array(); public function __construct() { $this->buildHandlerList(); } protected function buildHandlerList() { /** @var Share $shareClass */ $shareClass = Share::className(); /** @var CreateTask $createTaskClass */ $createTaskClass = CreateTask::className(); /** @var FileVersion $fileVersionClass */ $fileVersionClass = FileVersion::className(); /** @var TaskInfo $taskInfoClass */ $taskInfoClass = TaskInfo::className(); $this->handlerListByPostText = array( $shareClass::getPostText() => $shareClass, $createTaskClass::getPostText() => $createTaskClass, $fileVersionClass::getPostText() => $fileVersionClass, $taskInfoClass::getPostText() => $taskInfoClass, ); $this->handlerListByType = array( $shareClass::getType() => $shareClass, $createTaskClass::getType() => $createTaskClass, $fileVersionClass::getType() => $fileVersionClass, $taskInfoClass::getType() => $taskInfoClass, ); } public function getHandlerByPostText($postText) { $handler = false; if(isset($this->handlerListByPostText[$postText])) { $handler = new $this->handlerListByPostText[$postText](); } return $handler; } public function getHandlerByType($type) { $handler = false; if(isset($this->handlerListByType[$type])) { $handler = new $this->handlerListByType[$type](); } return $handler; } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.8 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка