PHPDoc and code formatting changes

This commit is contained in:
James Brooks
2014-12-20 20:40:48 +00:00
parent 3790ae240e
commit 5eab8093e7
10 changed files with 52 additions and 14 deletions
+9
View File
@@ -11,10 +11,19 @@ class Service extends Eloquent {
'properties' => ''
];
/**
* Returns a decoded properties object for the service.
* @param string $properties
* @return object
*/
public function getPropertiesAttribute($properties) {
return json_decode($properties);
}
/**
* Sets the properties attribute which auto encodes to a JSON string.
* @param mixed $properties
*/
public function setPropertiesAttribute($properties) {
$this->attributes['properties'] = json_encode($properties);
}