Maslosoft Miniview API
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
<?php
/**
* This software package is licensed under `AGPL, Commercial` license[s].
*
* @package maslosoft/miniview
* @license AGPL, Commercial
*
* @copyright Copyright (c) Peter Maselkowski <pmaselkowski@gmail.com>
*
* @link http://maslosoft.com/miniview/
*/
namespace Maslosoft\MiniView\Traits;
/**
* OwnerForwarderTrait
*
* @author Piotr Maselkowski <pmaselkowski at gmail.com>
*/
trait OwnerForwarderTrait
{
/**
* Forward to owner
* @param string $name
* @return mixed
*/
public function __get($name)
{
return $this->getOwner()->$name;
}
/**
* Forward to owner
* @param string $name
* @param mixed $value
*/
public function __set($name, $value)
{
return $this->getOwner()->$name = $value;
}
/**
* Forward to owner
* @param string $name
* @param mixed[] $arguments
*/
public function __call($name, $arguments)
{
return call_user_func_array([$this->getOwner(), $name], $arguments);
}
/**
* Forward to owner
* @param string $name
* @return bool
*/
public function __isset($name)
{
return isset($this->getOwner()->$name);
}
/**
* Forward to owner
* @param string $name
*/
public function __unset($name)
{
unset($this->getOwner()->$name);
}
/**
* Forward __toString to owner
* @return string
*/
public function __toString()
{
return (string) $this->getOwner();
}
}
API documentation generated by ApiGen