Scalr\Service\Aws\AbstractDataType::__set PHP Метод

__set() публичный Метод

public __set ( string $name, mixed $data )
$name string
$data mixed
    public function __set($name, $data)
    {
        if (in_array($name, $this->_properties)) {
            $setfn = 'set' . ucfirst($name);
            if (method_exists($this, $setfn)) {
                //makes it possible to cast argument value type for an explicitly defined setter methods
                $this->{$setfn}($data);
            } else {
                $this->propertiesData[$name] = $data;
            }
        } else {
            throw new \InvalidArgumentException(sprintf('Unknown property "%s" for the object %s', $name, get_class($this)));
        }
    }