public function apply($value) { return Account\Record::getStatus($value) === false ? false : true; }
protected function buildAccount(DocumentAbstract $document, Account\Record $account) { // subject $subject = $account->name . '@' . $this->base->getHost(); $document->setSubject($subject); // alias $document->setAliases(array($account->profileUrl)); // id $document->addProperty('http://ns.amun-project.org/2011/meta/id', $account->globalId); $document->addProperty('http://ns.amun-project.org/2011/meta/name', $account->name); $document->addProperty('http://ns.amun-project.org/2011/meta/date', $account->getDate()->format(DateTime::ATOM)); // profile $link = new Link(); $link->setRel('profile'); $link->setType('text/html'); $link->setHref($account->profileUrl); $document->addLink($link); // activity atom feed $href = $this->config['psx_url'] . '/' . $this->config['psx_dispatch'] . 'api/my/activity/' . $account->id . '?format=atom'; $link = new Link(); $link->setRel('alternate'); $link->setType('application/atom+xml'); $link->setHref($href); $document->addLink($link); // json activity streams $href = $this->config['psx_url'] . '/' . $this->config['psx_dispatch'] . 'api/my/activity/' . $account->id . '?format=jas'; $link = new Link(); $link->setRel('alternate'); $link->setType('application/stream+json'); $link->setHref($href); $document->addLink($link); }
private function getGender() { $gender = array(); $result = Record::getGender(); foreach ($result as $k => $v) { array_push($gender, array('label' => $v, 'value' => $k)); } return $gender; }