for_name() public static method

Returns a new exception object.
Since: 3.0.0
public static for_name ( string $name, string $action = 'read' ) : static
$name string The name of the property.
$action string Optional. Action to be performed. Defaults to 'read'.
return static Exception object.
 /**
  * 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];
 }