Файловый менеджер - Редактировать - /home/harasnat/www/mf/Traits.tar
Назад
DeprecationLogger.php 0000604 00000002134 15062117665 0010657 0 ustar 00 <?php namespace PhpXmlRpc\Traits; use PhpXmlRpc\PhpXmlRpc; trait DeprecationLogger { use LoggerAware; protected function logDeprecation($message) { if (PhpXmlRpc::$xmlrpc_silence_deprecations) { return; } $this->getLogger()->warning('XML-RPC Deprecated: ' . $message); } /** * @param string $callee * @param string $expectedCaller atm only the method name is supported * @return void */ protected function logDeprecationUnlessCalledBy($expectedCaller) { if (PhpXmlRpc::$xmlrpc_silence_deprecations) { return; } $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3); /// @todo we should check as well $trace[2]['class'], and make sure that it is a descendent of the class passed in in $expectedCaller if ($trace[2]['function'] === $expectedCaller) { return; } $this->getLogger()->warning('XML-RPC Deprecated: ' . $trace[1]['class'] . '::' . $trace[1]['function'] . ' is only supposed to be called by ' . $expectedCaller); } } CharsetEncoderAware.php 0000604 00000001021 15062117665 0011125 0 ustar 00 <?php namespace PhpXmlRpc\Traits; use PhpXmlRpc\Helper\Charset; trait CharsetEncoderAware { protected static $charsetEncoder; public function getCharsetEncoder() { if (self::$charsetEncoder === null) { self::$charsetEncoder = Charset::instance(); } return self::$charsetEncoder; } /** * @param $charsetEncoder * @return void */ public static function setCharsetEncoder($charsetEncoder) { self::$charsetEncoder = $charsetEncoder; } } PayloadBearer.php 0000604 00000001370 15062117665 0007775 0 ustar 00 <?php namespace PhpXmlRpc\Traits; trait PayloadBearer { /** @var string */ protected $payload; /** @var string */ protected $content_type = 'text/xml'; /** * @internal * * @param string $payload * @param string $contentType * @return $this */ public function setPayload($payload, $contentType = '') { $this->payload = $payload; if ($contentType != '') { $this->content_type = $contentType; } return $this; } /** * @return string */ public function getPayload() { return $this->payload; } /** * @return string */ public function getContentType() { return $this->content_type; } } ParserAware.php 0000604 00000001061 15062117665 0007474 0 ustar 00 <?php namespace PhpXmlRpc\Traits; use PhpXmlRpc\Helper\XMLParser; trait ParserAware { protected static $parser; /// @todo feature-creep: allow passing in $options (but then, how to deal with changing options between invocations?) public function getParser() { if (self::$parser === null) { self::$parser = new XMLParser(); } return self::$parser; } /** * @param $parser * @return void */ public static function setParser($parser) { self::$parser = $parser; } } LoggerAware.php 0000604 00000000667 15062117665 0007472 0 ustar 00 <?php namespace PhpXmlRpc\Traits; use PhpXmlRpc\Helper\Logger; trait LoggerAware { protected static $logger; public function getLogger() { if (self::$logger === null) { self::$logger = Logger::instance(); } return self::$logger; } /** * @param $logger * @return void */ public static function setLogger($logger) { self::$logger = $logger; } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка