class User implements Value {
private $constants;
function __construct($Element, $Section, $Producer){
$this->constants = [
self::TYPE_ELEMENT => $Element,
self::TYPE_SECTION => $Section,
self::TYPE_PRODUCER => $Producer
];
}
public function getType($type) {
return $this->constants[$type];
}
function show(){
$values = [
$this->getType(self::TYPE_ELEMENT),
$this->getType(self::TYPE_SECTION),
$this->getType(self::TYPE_PRODUCER)
];
можно ли где то это прочитать?
Приходится запугивать и угрожать авансом ;)