uawdijnntqw1x1x1
IP : 18.117.240.120
Hostname : axolotl
Kernel : Linux axolotl 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
OS : Linux
PATH:
/
var
/
www
/
axolotl
/
data
/
www
/
axolotl.ru
/
www
/
include
/
..
/
bitrix
/
modules
/
documentgenerator
/
lib
/
value.php
/
/
<?php namespace Bitrix\DocumentGenerator; abstract class Value { protected $value; protected $options = []; /** * Value constructor. * @param $value * @param array $options */ public function __construct($value, array $options = []) { $this->value = $value; $this->options = static::getDefaultOptions(); $this->options = $this->getOptions($options); } /** * @param string $modifier * @return string */ abstract public function toString($modifier = ''); public function __toString() { return $this->toString(); } /** * @param array $options * @return $this */ public function setOptions(array $options) { $this->options = $options; return $this; } /** * @return array */ protected static function getDefaultOptions() { return []; } /** * @return mixed */ public function getValue() { return $this->value; } /** * @return array */ protected static function getAliases() { return []; } /** * @param string $modifier * @return array */ public static function parseModifier($modifier) { if(is_array($modifier)) { return $modifier; } elseif(is_object($modifier)) { return []; } $modifier = (string)$modifier; if(empty($modifier)) { return []; } $result = []; $aliases = static::getAliases(); $pairs = explode(',', $modifier); foreach($pairs as $pair) { list($name, $value) = explode('=', $pair); $name = trim($name); $value = trim($value); if($name !== null && $value !== null) { if(mb_strtoupper($value) === 'Y') { $value = true; } if(mb_strtoupper($value) === 'N') { $value = false; } if(isset($aliases[$name])) { $result[$aliases[$name]] = $value; } else { $result[$name] = $value; } } } return $result; } /** * @param string $modifier * @return array */ protected function getOptions($modifier = null) { if(!$modifier) { $options = $this->options; } else { if(!is_array($this->options)) { $this->options = []; } $options = array_merge($this->options, static::parseModifier($modifier)); } if(!$options || empty($options)) { $options = static::getDefaultOptions(); } return $options; } }
/var/www/axolotl/data/www/axolotl.ru/www/include/../bitrix/modules/documentgenerator/lib/value.php