Skip to content
Snippets Groups Projects
Commit 29db669e authored by xamgore's avatar xamgore
Browse files

Model Discipline implements Serializable interface

parent 3478dc4a
Branches
Tags
No related merge requests found
......@@ -15,7 +15,7 @@
* @property $type string
* @property $isLocked bool
*/
class Model_Discipline extends Model
class Model_Discipline extends Model implements Serializable
{
private $data;
......@@ -80,6 +80,23 @@ class Model_Discipline extends Model
throw new InvalidArgumentException;
}
/**
* String representation of object.
* @return string the string representation of the object or null
*/
public function serialize() {
return serialize($this->data);
}
/**
* Constructs the object
* @param string $serialized
* The string representation of the object.
* @return void
*/
public function unserialize($serialized) {
$this->data = unserialize($serialized);
}
/**
* @param $id int discipline id
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment