*/ class client extends \MGModule\DNSManager2\mgLibs\models\orm{ static $tableStructure = array( 'name' => 'tblclients' ); static $fieldDeclaration = array( 'id' ,'firstname' ,'lastname' ,'email' ); public $id; public $firstname; public $lastname; public $email; /** * Load Client * * @author Michal Czech * @param int $id * @param array $data */ function __construct($id = 0,$data = array()) { $this->id = $id; if($id && empty($data)) { $data = main\mgLibs\MySQL\query::select( self::$fieldDeclaration, self::$tableStructure['name'], array( 'id' => $id ) ); } if(!empty($data)) { $this->fillProperties($data); } } }