uawdijnntqw1x1x1
IP : 18.188.71.235
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
/
perm.axolotls.ru
/
bitrix
/
modules
/
documentgenerator
/
lib
/
value
/
multiple.php
/
/
<?php namespace Bitrix\DocumentGenerator\Value; use Bitrix\DocumentGenerator\Value; class Multiple extends Value { const SEPARATOR_COMMA = 1; const SEPARATOR_NEWLINE = 2; /** * @param string $modifier * @return string|Value */ public function toString($modifier = '') { $options = $this->getOptions($modifier); $modifier = preg_replace('#mseparator=\d#', '', $modifier); $modifier = preg_replace('#mfirst=[y,n]#', '', $modifier); $modifier = preg_replace('#[,+]#', ',', $modifier); $modifier = trim($modifier, ','); $separator = $this->getSeparatorByCode($options['mseparator']); $isFirst = $options['mfirst']; if(is_array($this->value) || $this->value instanceof \Traversable) { $values = []; foreach($this->value as $value) { if($value instanceof Value) { $values[] = $value->toString($modifier); } elseif(is_array($value) || is_object($value)) { continue; } elseif(!empty($value) && $value !== 0) { $values[] = $value; } if($isFirst && count($values) == 1) { break; } } return implode($separator, $values); } elseif($this->value instanceof Value) { return $this->value->toString($modifier); } elseif(is_object($this->value) && method_exists($this->value, '__toString')) { return $this->value->__toString(); } elseif(!is_object($this->value)) { return $this->value; } return ''; } protected static function getDefaultOptions() { return ['mseparator' => static::SEPARATOR_COMMA, 'mfirst' => false]; } protected function getSeparatorByCode($separatorCode) { if($separatorCode == static::SEPARATOR_NEWLINE) { return PHP_EOL; } return ', '; } }
/var/www/axolotl/data/www/perm.axolotls.ru/bitrix/modules/documentgenerator/lib/value/multiple.php