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

17 lines
423 B
PHP
Raw Permalink Normal View History

2017-02-24 16:39:37 +00:00
<?php
2017-03-02 22:02:38 +00:00
namespace Fire\Models;
use \AroMVC\Base\Model;
use \AroMVC\Database\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() {
2017-03-02 22:02:38 +00:00
return State::select() ->where("`cid` = :cid")
->params(["cid" => $this->get("id")]);
2017-02-24 22:01:32 +00:00
});
}
2017-02-24 16:39:37 +00:00
}