Remove magic methods from Message
This commit is contained in:
parent
566384f1e4
commit
c1937e8a33
|
|
@ -49,63 +49,6 @@ abstract class Message
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
// Accessors
|
// Accessors
|
||||||
|
|
||||||
/**
|
|
||||||
* Magic accessor method
|
|
||||||
*
|
|
||||||
* @param string $propertyName
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
public function __get($propertyName)
|
|
||||||
{
|
|
||||||
$method = 'get' . ucfirst($propertyName);
|
|
||||||
if (method_exists($this, $method)) {
|
|
||||||
return $this->{$method}();
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Magic accessor method
|
|
||||||
*
|
|
||||||
* @param string $propertyName
|
|
||||||
* @param $value
|
|
||||||
*/
|
|
||||||
public function __set($propertyName, $value)
|
|
||||||
{
|
|
||||||
$method = 'set' . ucfirst($propertyName);
|
|
||||||
if (method_exists($this, $method)) {
|
|
||||||
$this->{$method}($value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Magic accessor method
|
|
||||||
*
|
|
||||||
* @param string $propertyName
|
|
||||||
* @return boolean
|
|
||||||
*/
|
|
||||||
public function __isset($propertyName)
|
|
||||||
{
|
|
||||||
$method = 'isset' . ucfirst($propertyName);
|
|
||||||
if (method_exists($this, $method)) {
|
|
||||||
return $this->{$method}();
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Magic accessor method
|
|
||||||
*
|
|
||||||
* @param string $propertyName
|
|
||||||
*/
|
|
||||||
public function __unset($propertyName)
|
|
||||||
{
|
|
||||||
$method = 'unset' . ucfirst($propertyName);
|
|
||||||
if (method_exists($this, $method)) {
|
|
||||||
$this->{$method}();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the body payload of the instance.
|
* Return the body payload of the instance.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue