platform/plugins/Streams/classes/Streams/Task.php - Q Platform
Show:

File: platform/plugins/Streams/classes/Streams/Task.php

  1. <?php
  2. /**
  3. * @module Streams
  4. */
  5. /**
  6. * Class representing 'Task' rows in the 'Streams' database
  7. * You can create an object of this class either to
  8. * access its non-static methods, or to actually
  9. * represent a task row in the Streams database.
  10. *
  11. * @class Streams_Task
  12. * @extends Base_Streams_Task
  13. */
  14. class Streams_Task extends Base_Streams_Task
  15. {
  16. /**
  17. * The setUp() method is called the first time
  18. * an object of this class is constructed.
  19. * @method setUp
  20. */
  21. function setUp()
  22. {
  23. parent::setUp();
  24. // INSERT YOUR CODE HERE
  25. // e.g. $this->hasMany(...) and stuff like that.
  26. }
  27. /**
  28. * Implements the __set_state method, so it can work with
  29. * with var_export and be re-imported successfully.
  30. * @method __set_state
  31. * @static
  32. * @param {array} $array
  33. * @return {Streams_Task} Class instance
  34. */
  35. static function __set_state(array $array) {
  36. $result = new Streams_Task();
  37. foreach($array as $k => $v)
  38. $result->$k = $v;
  39. return $result;
  40. }
  41. };