MatthiasMullie\Scrapbook\Psr6\Repository::get PHP Method

get() public method

public get ( string $unique ) : mixed | null
$unique string
return mixed | null Value, of null if non-existent
    public function get($unique)
    {
        return $this->exists($unique) ? $this->resolved[$unique] : null;
    }

Usage Example

Example #1
0
 /**
  * {@inheritdoc}
  */
 public function get()
 {
     // value was already set on this object, return that one!
     if ($this->value !== null) {
         return $this->value;
     }
     // sanity check
     if (!$this->isHit()) {
         return;
     }
     return $this->repository->get($this->hash);
 }