Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 634 Bytes

stringifier.md

File metadata and controls

21 lines (14 loc) · 634 Bytes

Stringifier

Описание

Stringifier - сервис приведения свойств объектов Doctrine к строке.

Использование

Пример использования:

$page = new Page();
$page->setTags(array('hello', 'world'));
$tagsString = $this->getContainer()->get('darvin_utils.stringifier.doctrine')->stringify($page->getTags(), Type::SIMPLE_ARRAY);
echo $tagsString; // '["hello","world"]'

Особенности:

  • значением аргумента "dataType" должна являться константа класса "Doctrine\DBAL\Types\Type".