This repository has been archived on 2024-10-04. You can view files and clone it, but cannot push or open issues or pull requests.
AroMVC/Models/Company.php

19 lines
452 B
PHP
Raw Normal View History

2017-02-24 16:39:37 +00:00
<?php
namespace AroMVC\Models;
2017-02-24 22:01:32 +00:00
use \AroMVC\Core\Model;
use \AroMVC\Core\Database as db;
2017-02-24 16:39:37 +00:00
2017-02-24 22:01:32 +00:00
class Company extends Model {
protected $id;
protected $name;
protected $states;
protected function initialize() {
$this->addHook("states", function() {
return db::select("*")
->from("States")
->where("`cid` = ?")
->params([$this->get("id")]);
});
}
2017-02-24 16:39:37 +00:00
}