Example #1
0
 public function __construct(array $attributes = [])
 {
     // This is needed for testing
     date_default_timezone_set('UTC');
     parent::__construct($attributes);
 }
Example #2
0
 /**
  * Create a new relation instance.
  *
  * @param  \Torann\RemoteModel\Model  $related
  * @param  \Torann\RemoteModel\Model  $parent
  * @param  string  $parentKey
  * @param  string  $localKey
  */
 public function __construct(Model $related, Model $parent, $parentKey, $localKey)
 {
     $this->related = $related;
     $this->parent = $parent;
     $this->related->setParentID($this->parent->getAttribute($localKey));
 }