Immediately echoes content of specified filled slot.

Equivalent of echo $this->getSlot();

@return string
329608
public function echoSlot($key)
    {
        if (isset($this->_slots[$key])) {
            if (is_string($this->_slots[$key])) {
                echo $this->_slots[$key];
            } else {
                call_user_func($this->_slots[$key][0], $this->_slots[$key][1], $this->_slots[$key][2]);
            }
        } else if ($this->_parentContext) {
            return $this->_parentContext->echoSlot($key);
        }
    }
1365888
public function shift()
    {
        if (null !== $this->getDraft()) {
            return $this->getDraft()->shift();
        }

        $first = $this->first();
        if (null === $first) {
            return;
        }

        array_shift($this->_data);
        $content = null;
        if (isset($this->subcontentmap[$first->getUid()])) {
            $content = $this->_subcontent->get($this->subcontentmap[$first->getUid()]);
            $this->_subcontent->removeElement($content);
            unset($this->subcontentmap[$first->getUid()]);
        }

        $this->rewind();

        return $content;
    }
341525
public function toString()
    {
        $adapter = $this->getAdapter();
        $prefix  = $adapter->getTablePrefix();
        $query   = $this->type;

        if($this->table) {
            $query .= ' INTO '.$adapter->quoteIdentifier($prefix.$this->table);
        }

        if($this->columns) {
            $query .= '('.implode(', ', array_map(array($adapter, 'quoteIdentifier'), $this->columns)).')';
        }

        if($this->values)
        {
            if(!$this->values instanceof KDatabaseQuerySelect)
            {
                $query .= ' VALUES'.PHP_EOL;

                $values = array();
                foreach ($this->values as $row)
                {
                    $data = array();
                    foreach($row as $column) {
                        $data[] = $adapter->quoteValue(is_object($column) ? (string) $column : $column);
                    }

                    $values[] = '('.implode(', ', $data).')';
                }

                $query .= implode(', '.PHP_EOL, $values);
            }
            else $query .= ' '.$this->values;
        }

        if($this->duplicate_key_values && $this->type === 'INSERT')
        {
            $values = array();
            foreach($this->duplicate_key_values as $value) {
                $values[] = ' '. $adapter->quoteIdentifier($value);
            }

            $update_clause = implode(', ', $values);

            if($this->_parameters) {
                $update_clause = $this->_replaceParams($update_clause);
            }

            $query .= ' ON DUPLICATE KEY UPDATE '.$update_clause;
        }

        return $query;
    }
1184023
public function toString()
    {
        ob_start();

        printf(
            "%s Exception: %s\n\nMessage: %s\n\nCode:\n\t%s\n\n" .
                "Created in file '%s' on line %s.\n\n",
            $this->wasHandled() ? 'Caught' : 'Uncaught',
            $this->class,
            $this->getMessage(),
            $this->getCode(),
            $this->getFile(),
            $this->getLine()
        );

        echo "Stack Trace:\n";
        $count = count($this->backtrace);

        foreach ($this->backtrace as $entry) {
            $class = array_key_exists('class', $entry) ? $entry['class'] : null;

            $function = array_key_exists('function', $entry)
                ? $entry['function']
                : null;

            if (array_key_exists('args', $entry)) {
                $arguments = $this->getArguments(
                    $entry['args'],
                    $function,
                    $class
                );
            } else {
                $arguments = '';
            }

            printf(
                "%s. In file '%s' on line %s.\n%sMethod: %s%s%s(%s)\n",
                str_pad(--$count, 6, ' ', STR_PAD_LEFT),
                array_key_exists('file', $entry) ? $entry['file'] : 'unknown',
                array_key_exists('line', $entry) ? $entry['line'] : 'unknown',
                str_repeat(' ', 8),
                $class === null ? '' : $class,
                array_key_exists('type', $entry) ? $entry['type'] : '',
                $function === null ? '' : $function,
                $arguments
            );
        }

        echo "\n";

        return ob_get_clean();
    }
1327680
public function peek(): string
    {
        if ($this->atEnd()) {
            return self::END;
        }

        return $this->input[$this->index];
    }
119760
public function description(): string
    {
        if (0 === $this->offset) {
            return 'limited to ' . $this->count . ' elements';
        }

        if (-1 === $this->count) {
            return 'skipped until offset ' . $this->offset;
        }

        return 'limited to ' . $this->count
         . ' elements starting from offset ' . $this->offset;
    }
37500
public function getToString()
    {
        $get = $this->allGet();
        $formatted = array();
        foreach($get as $name => $val) {
            $formatted[] = "$name=$val";
        }

        return implode('&', $formatted);
    }
536195
public function getNumberOfItemSlots(): int
    {
        if ($this->numberOfItemSlots === self::VALUE_UNLIMITED_SLOTS_DATABASE) {
            $result = self::VALUE_UNLIMITED_SLOTS;
        } else {
            $result = $this->numberOfItemSlots;
        }
        return $result;
    }
1277967
private function _getMatchesIdsFromSlots()
    {
        $db = Db::obtain();
        $forSlots = 'SELECT match_id ' . Db::realTablename('FROM slots') . '';
        $whereForSlots = '';
        $dataForSlots = array();

        if (null !== $this->getHeroId()) {
            $whereForSlots .= 'hero_id = ? AND ';
            array_push($dataForSlots, $this->getHeroId());
        }
        if (null !== $this->getAccountId()) {
            $whereForSlots .= 'account_id = ? AND ';
            array_push($dataForSlots, $this->getAccountId());
        }

        if (trim($whereForSlots) !== '') {
            $forSlots .= ' WHERE ' . substr($whereForSlots, 0, strlen($whereForSlots) - 4);
        }
        $matchesIds = $db->fetchArrayPDO($forSlots, $dataForSlots);
        $ret = array();
        foreach ($matchesIds as $val) {
            array_push($ret, $val['match_id']);
        }
        return $ret;
    }
231332
private function _echo() {
    $node = new EchoStatementNode();
    $this->mustMatch(T_ECHO, $node);
    $expressions = new CommaListNode();
    do {
      $expressions->addChild($this->expr());
    } while ($this->tryMatch(',', $expressions));
    $node->addChild($expressions, 'expressions');
    $this->endStatement($node);
    return $node;
  }
798242
public function getSlotByName($name)
    {
        foreach ($this->slots as $slot) {
            if ($slot->name === $name) {
                return $slot;
            }
        }

        return null;
    }
1003124
public function getContent_copied()
    {
        $attr = '';
        $cntattr = count($this->attribute);
        $count = ($this->separatorCount >= $cntattr) ? ($cntattr - 1) : $this->separatorCount;
        $content = '';

        for ($i = 0; $i <= $count; $i++) {
            if (in_array($this->attribute[$i], $this->ignoreAttribute))
                continue;
            if ($this->attribute[$i] != '$$') {
                $attr .= ' ' . $this->attribute[$i] . '="' . $this->wikiContentArr[$i] . '"';
            } else {
                $content = $this->contents[$i];
            }
        }

        foreach ($this->additionnalAttributes as $name => $value) {
            $attr .= ' ' . $name . '="' . htmlspecialchars($value) . '"';
        }

        return '<' . $this->name . $attr . '>' . $content . '</' . $this->name . '>';
    }
998822
public function getCachedContent()
    {
        if ($this->_content === null) {
            $this->_content = false;
            if ($this->cache instanceof Cache) {
                $key = $this->calculateKey();
                $data = $this->cache->get($key);
                if (is_array($data) && count($data) === 2) {
                    list ($content, $placeholders) = $data;
                    if (is_array($placeholders) && count($placeholders) > 0) {
                        if (empty($this->getView()->cacheStack)) {
                            // outermost cache: replace placeholder with dynamic content
                            $content = $this->updateDynamicContent($content, $placeholders);
                        }
                        foreach ($placeholders as $name => $statements) {
                            $this->getView()->addDynamicPlaceholder($name, $statements);
                        }
                    }
                    $this->_content = $content;
                }
            }
        }

        return $this->_content;
    }
651507
public function getSlot($slotIdentifier)
    {
        if (!isset($this->slots[$slotIdentifier])) {
            throw new NotFoundException('slot', $slotIdentifier);
        }

        return $this->slots[$slotIdentifier];
    }
1364692
public function __tostring ()
    {
        if (is_null($this->queryElements))
        {
            return "";
        }

        $query = [];

        foreach ($this->queryElements as $soqlKey => $value)
        {
            $value = (is_array($value)) ? implode(self::DELIMITER, $value) : $value;

            $query[] = sprintf("%s=%s", $soqlKey, $value);
        }

        return implode("&", $query);
    }
406118
public function getDescription()
    {
        return vsprintf(
            'The value is expected to be between %f and %f'
            . ' (%f <= x <= %f).',
            [$this->min, $this->max, $this->min, $this->max]
        );
    }
496457
public static function getSlots()
    {
        $slots = array();

        foreach (array_keys(WindowMaker::getStartTimeChoices()) as $hour)
        {
            for ($i=0; $i<14; $i++)
            {
                $date = new \DateTime('+'.$i.' days');

                $slots[$hour.':00'][$date->format('Y-m-d')] = null;
            }
        }

        return $slots;
    }