Corcel\PostMetaCollection::__set PHP Метод

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

public __set ( $key, $value )
    public function __set($key, $value)
    {
        $this->changedKeys[] = $key;
        foreach ($this->items as $item) {
            if ($item->meta_key == $key) {
                $item->meta_value = $value;
                return;
            }
        }
        $item = new PostMeta(['meta_key' => $key, 'meta_value' => $value]);
        $this->push($item);
    }
PostMetaCollection