0 follower

Final Class Yiisoft\Db\Pgsql\Data\StructuredParser

InheritanceYiisoft\Db\Pgsql\Data\StructuredParser

Structured type representation to PHP array parser for PostgreSQL Server.

Public Methods

Hide inherited methods

Method Description Defined By
parse() Converts structured (composite) type value from PostgreSQL to PHP array. Yiisoft\Db\Pgsql\Data\StructuredParser

Method Details

Hide inherited methods

parse() public method

Converts structured (composite) type value from PostgreSQL to PHP array.

public (string|null)[]|null parse ( string $value )
$value string

Value to parse.

return (string|null)[]|null

Parsed value.

                public function parse(string $value): ?array
{
    if ($value[0] !== '(') {
        return null;
    }
    return $this->parseComposite($value);
}