liam-linux-account-manager/model/serveraccountevent.php

19 lines
442 B
PHP
Raw Normal View History

2021-11-16 15:11:32 +01:00
<?php
class ServerAccountEvent extends EntityEvent {
/**
* Magic getter method - if account field requested, return ServerAccount object of the affected account.
* @param string $field to retrieve
* @return mixed data stored in field
*/
public function &__get($field) {
switch($field) {
case 'account':
$group = new ServerAccount($this->data['entity_id']);
return $group;
default:
return parent::__get($field);
}
}
}