Completed
Push — master ( ac571e...b4d025 )
by Peter
02:07
created

SourceMagic::_call()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
/**
4
 * This software package is licensed under `AGPL, Commercial` license[s].
5
 *
6
 * @package maslosoft/zamm
7
 * @license AGPL, Commercial
8
 *
9
 * @copyright Copyright (c) Peter Maselkowski <[email protected]>
10
 *
11
 */
12
13
namespace Maslosoft\Zamm\Traits;
14
15
use Maslosoft\Zamm\Interfaces\SourceAccessorInterface;
16
17
/**
18
 * GetSet
19
 * @see SourceAccessorInterface
20
 * @author Piotr Maselkowski <pmaselkowski at gmail.com>
21
 */
22
trait SourceMagic
23
{
24
25
	public function __get($name)
26
	{
27
		return $this->_get($name);
28
	}
29
30
	protected function _get($name)
31
	{
32
		return $this->property($name);
33
	}
34
35
	public function __call($name, $arguments)
36
	{
37
		return $this->_call($name);
38
	}
39
40
	public function _call($name)
41
	{
42
		return $this->method($name);
43
	}
44
45
	abstract public function method($name);
46
47
	abstract public function property($name);
48
}
49