eZ\Publish\Core\FieldType\Keyword\Value::__construct PHP Метод

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

Construct a new Value object and initialize with $values.
public __construct ( string[] | string $values = null )
$values string[] | string
    public function __construct($values = null)
    {
        if ($values !== null) {
            if (!is_array($values)) {
                $tags = array();
                foreach (explode(',', $values) as $tag) {
                    $tag = trim($tag);
                    if ($tag) {
                        $tags[] = $tag;
                    }
                }
                $values = $tags;
            }
            $this->values = array_unique($values);
        }
    }