public static function for_name($name, $action = 'read') { return new static(sprintf('Cannot %2$s "%1$s". There is no property with this name.', $name, $action)); }
/** * Returns the value of the property with the given name. * * @since 3.0.0 * * @param string $name The name of a property. * * @return mixed The value of the property with the given name. * * @throws PropertyNotSetException if there is no property with the given name. */ public function offsetGet($name) { if (!$this->offsetExists($name)) { throw PropertyNotSetException::for_name($name, 'read'); } return $this->properties[$name]; }