Class yii\db\pgsql\ArrayParser

Inheritanceyii\db\pgsql\ArrayParser
Available since version2.0.14
Source Code https://github.com/yiisoft/yii2/blob/master/framework/db/pgsql/ArrayParser.php

The class converts PostgreSQL array representation to PHP array

Public Methods

Hide inherited methods

Method Description Defined By
parse() Convert array from PostgreSQL to PHP yii\db\pgsql\ArrayParser

Method Details

Hide inherited methods

parse() public method

Convert array from PostgreSQL to PHP

public array|null parse ( $value )
$value string

String to be converted

                public function parse($value)
{
    if ($value === null) {
        return null;
    }
    if ($value === '{}') {
        return [];
    }
    return $this->parseArray($value);
}