public function __construct($tthis, $context, $data) { $this->tthis = $tthis; $this->context = $context; $this->data = $data; $year = 0; if (isset($tthis->_attributes['year'])) { $year = (int) $tthis->_attributes['year']; } if (!$year > 0) { $year = date('Y') - 1; } // default year to previous $this->dateStart = date('Y-m-d', strtotime($year . '-01-01')); $this->dateEnd = date('Y-m-d', strtotime($year . '-12-31')); $this->providerId = (int) Zend_Auth::getInstance()->getIdentity()->personId; $providerId = (int) $this->context; if ($providerId > 0) { $this->providerId = $providerId; } $info = array(); $info['dateStart'] = $this->dateStart; $info['dateEnd'] = $this->dateEnd; $provider = new Provider(); $provider->personId = $this->providerId; $provider->populate(); $info['provider'] = $provider; self::$info = $info; }