/** * Constructor * @param $context SecurePoll_Context * @param $info Associative array of entity info */ function __construct( $context, $info ) { parent::__construct( $context, 'question', $info ); $this->options = array(); foreach ( $info['options'] as $optionInfo ) { $this->options[] = new SecurePoll_Option( $context, $optionInfo ); } }
/** * Constructor. * * Do not use this constructor directly, instead use * SecurePoll_Context::getElection(). * * @param $id integer */ function __construct( $context, $info ) { parent::__construct( $context, 'election', $info ); $this->id = $info['id']; $this->title = $info['title']; $this->ballotType = $info['ballot']; $this->tallyType = $info['tally']; $this->primaryLang = $info['primaryLang']; $this->startDate = $info['startDate']; $this->endDate = $info['endDate']; $this->authType = $info['auth']; }
/** * Constructor * @param $context SecurePoll_Context * @param $info Associative array of entity info */ function __construct( $context, $info ) { parent::__construct( $context, 'option', $info ); }