Fix isset for models/records

This commit is contained in:
Gregory Oschwald committed 2013-12-02 10:02:37 -08:00
1 parent 0bed941634
commit fbbe2dba24
3 files changed
+43 -4

No files matched your search

+8
View File
@@ -93,6 +93,14 @@ class Country implements \JsonSerializable
throw new \RuntimeException("Unknown attribute: $attr");
}
/**
* @ignore
*/
public function __isset($attr)
{
return $attr != "instance" && isset($this->$attr);
}
public function jsonSerialize()
{
return $this->raw;