Skip to content

Commit

Permalink
Merge pull request #5 from mveldhuizen/master
Browse files Browse the repository at this point in the history
Implement __isset function in Model class
  • Loading branch information
dirkgroenen committed Nov 16, 2015
2 parents 01ebf6d + 6c1d17c commit a3df55b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Pinterest/Models/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,17 @@ public function __set($key, $value)
}
}

/**
* Check if the model's attribute is set
*
* @param $key
* @return bool
*/
public function __isset($key)
{
return array_key_exists($key, $this->attributes);
}

/**
* Fill the attributes
*
Expand Down

0 comments on commit a3df55b

Please sign in to comment.