예제 #1
0
파일: Status.php 프로젝트: visapi/amun
 public function apply($value)
 {
     return Account\Record::getStatus($value) === false ? false : true;
 }
예제 #2
0
파일: Index.php 프로젝트: visapi/amun
 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);
 }
예제 #3
0
파일: Form.php 프로젝트: visapi/amun
 private function getGender()
 {
     $gender = array();
     $result = Record::getGender();
     foreach ($result as $k => $v) {
         array_push($gender, array('label' => $v, 'value' => $k));
     }
     return $gender;
 }