public function __call($method, $params) { switch (true) { # Checking status: $paramsost->is_pending(); case strpos($method, 'is_') === 0: $status = str_replace('is_', '', $method); return $this->status == $status; default: return parent::__call($method, $params); } }
public function toXml(array $options = array()) { return parent::toXml(array_merge($options, ['attributes' => $this->api_attributes()])); }
public function toXml(array $options = []) { return parent::toXml(['attributes' => ['id' => $this->id, 'post_id' => $this->post_id, 'tags' => $this->tags], 'root' => "tag_history"]); }
public static function authenticate_hash($name, $pass) { $user = parent::where("lower(name) = lower(?) AND password_hash = ?", $name, $pass)->first(); return $user; }
public function toXml(array $options = []) { return parent::toXml(array_merge($options, ['root' => 'wiki_page', 'attributes' => ['id' => $this->id, 'created_at' => $this->created_at, 'updated_at' => $this->updated_at, 'title' => $this->title, 'body' => $this->body, 'updater_id' => $this->user_id, 'locked' => (bool) (int) $this->is_locked, 'version' => $this->version]])); }
public function toXml(array $options = []) { return parent::toXml(array_merge($options, ['root' => "forum-post", 'attributes' => $this->api_attributes()])); }
public function toXml(array $options = array()) { $options['root'] = "artist"; $options['attributes'] = $this->api_attributes(); return parent::toXml($options); }