Орла
Области
Компаний
Пользователи
Галерея
Фиксированные новости
Орла
Отзывы о фирмах
Тарифы
Пользователи
Области
Банкоматы
Торговые точки
Доска объявлений
Курсы валют
Скидки
организации Орла
организации области
товары
сайты
сайты Орел
Данные
Разделы
Поиск
Поиск запросы
Статистика
Показы каталога организаций
Статистика клиенты
Пользователи
Сайты
Управление сайтом
Анкета
Аптеки
Афиша
Афиша новая
Баннеры
Бизнес >
Викторина
Голосование
Гость на сайте
Истории
Календарь событий
Каталоги >
Конкурс красоты
Конкурс аудио
Консультации
Меню
Новое на сайте
Новости >
Организации >
Программа ТВ
Публикации
Разделы сайта
Рассылка
Рестораны
Секрет фирмы >
Сервисы >
Ссылки
Тесты
Файловый менеджер
Форум
Фотогалерея
Обратная связь
Недвижимость
Новый год
Тексты
Пользователи
Юридический рейтинг
Отзывы на товары
Бан пользователей
Жалобы
Новые тесты
Коронавирус
Файловый менеджер
Имя файла
Serializer.php~
Содержимое
<?php /** * phpDocumentor * * PHP Version 5.3 * * @author Barry vd. Heuvel <barryvdh@gmail.com> * @copyright 2013 Mike van Riel / Naenius (http://www.naenius.com) * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ namespace phpDocumentor\Reflection\DocBlock; use phpDocumentor\Reflection\DocBlock; /** * Serializes a DocBlock instance. * * @author Barry vd. Heuvel <barryvdh@gmail.com> * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ class Serializer { /** @var string The string to indent the comment with. */ protected $indentString = ' '; /** @var int The number of times the indent string is repeated. */ protected $indent = 0; /** @var bool Whether to indent the first line. */ protected $isFirstLineIndented = true; /** @var int|null The max length of a line. */ protected $lineLength = null; /** * Create a Serializer instance. * * @param int $indent The number of times the indent string is * repeated. * @param string $indentString The string to indent the comment with. * @param bool $indentFirstLine Whether to indent the first line. * @param int|null $lineLength The max length of a line or NULL to * disable line wrapping. */ public function __construct( $indent = 0, $indentString = ' ', $indentFirstLine = true, $lineLength = null ) { $this->setIndentationString($indentString); $this->setIndent($indent); $this->setIsFirstLineIndented($indentFirstLine); $this->setLineLength($lineLength); } /** * Sets the string to indent comments with. * * @param string $indentationString The string to indent comments with. * * @return $this This serializer object. */ public function setIndentationString($indentString) { $this->indentString = (string)$indentString; return $this; } /** * Gets the string to indent comments with. * * @return string The indent string. */ public function getIndentationString() { return $this->indentString; } /** * Sets the number of indents. * * @param int $indent The number of times the indent string is repeated. * * @return $this This serializer object. */ public function setIndent($indent) { $this->indent = (int)$indent; return $this; } /** * Gets the number of indents. * * @return int The number of times the indent string is repeated. */ public function getIndent() { return $this->indent; } /** * Sets whether or not the first line should be indented. * * Sets whether or not the first line (the one with the "/**") should be * indented. * * @param bool $indentFirstLine The new value for this setting. * * @return $this This serializer object. */ public function setIsFirstLineIndented($indentFirstLine) { $this->isFirstLineIndented = (bool)$indentFirstLine; return $this; } /** * Gets whether or not the first line should be indented. * * @return bool Whether or not the first line should be indented. */ public function isFirstLineIndented() { return $this->isFirstLineIndented; } /** * Sets the line length. * * Sets the length of each line in the serialization. Content will be * wrapped within this limit. * * @param int|null $lineLength The length of each line. NULL to disable line * wrapping altogether. * * @return $this This serializer object. */ public function setLineLength($lineLength) { $this->lineLength = null === $lineLength ? null : (int)$lineLength; return $this; } /** * Gets the line length. * * @return int|null The length of each line or NULL if line wrapping is * disabled. */ public function getLineLength() { return $this->lineLength; } /** * Generate a DocBlock comment. * * @param DocBlock The DocBlock to serialize. * * @return string The serialized doc block. */ public function getDocComment(DocBlock $docblock) { $indent = str_repeat($this->indentString, $this->indent); $firstIndent = $this->isFirstLineIndented ? $indent : ''; $text = $docblock->getText(); if ($this->lineLength) { //3 === strlen(' * ') $wrapLength = $this->lineLength - strlen($indent) - 3; $text = wordwrap($text, $wrapLength); } $text = str_replace("\n", "\n{$indent} * ", $text); $comment = "{$firstIndent}/**\n{$indent} * {$text}\n{$indent} *\n"; /** @var Tag $tag */ foreach ($docblock->getTags() as $tag) { $tagText = (string) $tag; if ($this->lineLength) { $tagText = wordwrap($tagText, $wrapLength); } $tagText = str_replace("\n", "\n{$indent} * ", $tagText); $comment .= "{$indent} * {$tagText}\n"; } $comment .= $indent . ' */'; return $comment; } }
/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/
Имя
Дата
Размер
..
2016-01-25
Tag
2016-01-25
Type
2016-01-25
Context.php
2016-01-25
4 кб.
Context.php~
2025-01-10
4 кб.
Description.php
2016-01-25
7 кб.
Description.php~
2025-01-10
7 кб.
Location.php
2016-01-25
2 кб.
Location.php~
2025-01-10
2 кб.
Serializer.php
2016-01-25
5 кб.
Serializer.php~
2025-01-10
5 кб.
Tag.php
2016-01-25
10 кб.
Tag.php~
2025-01-10
10 кб.
/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock
Загрузить файлы
Файл 1
Файл 2
Файл 3