Exemplo n.º 1
0
 /**
  * Finds all personal polls.
  *
  * @return \Causal\DoodleClient\Domain\Model\Poll[]
  */
 public function findAll()
 {
     static $polls = null;
     if ($polls === null) {
         $polls = $this->doodleClient->getPersonalPolls();
     }
     return $polls;
 }
Exemplo n.º 2
0
 /**
  * Injects the information of a given poll.
  *
  * @param Poll $poll
  * @return array
  */
 public function injectInfo(Poll $poll)
 {
     $info = $poll->_getInfo();
     if ($info === null) {
         $info = $this->client->_getInfo($poll);
         $poll->_setInfo($info);
     }
     return $info;
 }