File manager - Edit - /home/web/vm-3fadc827.na4u.ru/www/bitrix/modules/seo/lib/businesssuite/exception/configexceptionhandler.php
Back
<?php namespace Bitrix\Seo\BusinessSuite\Exception; use Bitrix\Main; final class ConfigExceptionHandler { /** @var ConfigException */ private $exception; /** @var Main\ErrorCollection */ private $errorCollection; private function getErrorQueueGenerator() : \Generator { $currentException = $this->exception; do { yield new Main\Error( $currentException->getMessage(), $currentException->getCode() ); } while($currentException = $currentException->getPrevious()); } /** * ConfigExceptionHandler constructor. * * @param ConfigException $exception */ public function __construct(ConfigException $exception) { $this->exception = $exception; } /** * @return Main\ErrorCollection */ public function getErrorCollection() : Main\ErrorCollection { return $this->errorCollection = $this->errorCollection ?? new Main\ErrorCollection( array_filter(iterator_to_array($this->getErrorQueueGenerator())) ); } /** * @return array */ public function getCustomData() { return $this->exception->getCustomData(); } /** * @param ConfigException $exception * * @return ConfigExceptionHandler */ public static function handle(ConfigException $exception) { return new self($exception); } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.28 |
proxy
|
phpinfo
|
Settings