Opsway\Doctrine\DBAL\Types\TsVector::convertToPHPValue PHP Метод

convertToPHPValue() публичный Метод

Converts a value from its database representation to its PHP representation of this type.
public convertToPHPValue ( mixed $value, Doctrine\DBAL\Platforms\AbstractPlatform $platform ) : mixed
$value mixed The value to convert.
$platform Doctrine\DBAL\Platforms\AbstractPlatform The currently used database platform.
Результат mixed The PHP representation of the value.
    public function convertToPHPValue($value, AbstractPlatform $platform)
    {
        // Wish there was a database way to make this cleaner... implement in convertToPHPValueSQL
        $terms = array();
        if (!empty($value)) {
            foreach (explode(' ', $value) as $item) {
                list($term, $_) = explode(':', $item);
                $terms[] = trim($term, '\'');
            }
        }
        return $terms;
    }