Pimcore\Console\Command\CacheWarmingCommand::humanList PHP Метод

humanList() защищенный Метод

A,B,C -> A, B or C (with an optional template for each item)
protected humanList ( $list, string $glue = 'or', null $template = null ) : string
$list
$glue string
$template null
Результат string
    protected function humanList($list, $glue = 'or', $template = null)
    {
        if (null !== $template) {
            array_walk($list, function (&$item) use($template) {
                $item = sprintf($template, $item);
            });
        }
        if (count($list) > 1) {
            $lastElement = array_pop($list);
            return implode(', ', $list) . ' ' . $glue . ' ' . $lastElement;
        } else {
            return implode(', ', $list);
        }
    }