Basket::load PHP 메소드

load() 공개 메소드

Map current item to matching key/value pair
public load ( $key, $val ) : array
$key string
$val mixed
리턴 array
    function load($key, $val)
    {
        if ($found = $this->find($key, $val)) {
            $this->id = $found[0]->id;
            return $this->item = $found[0]->item;
        }
        $this->reset();
        return [];
    }