/** * Make sure that we're only using integer ids. */ static function factory($model, $id = null) { if ($id && !is_int($id) && !is_string($id)) { throw new Exception("@todo ORM::factory requires integer ids"); } return ORM_Core::factory($model, (int) $id); }