for_name() 공개 정적인 메소드

Returns a new exception object.
부터: 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'.
리턴 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];
 }