Exemple #1
0
 /**
  *
  * @return Iterator\Statements
  */
 public function getStatements()
 {
     $select = $this->getAdapter()->select()->from(array('s' => 'wyciag_bankowy_saldo', 's.*'))->join(array('p' => 'wyciag_bankowy_plik'), 's.id = p.id', array('*'))->join(array('pp' => 'lt_wyciag_bankowy_plik_parser'), 'p.parser = pp.PK_parser', array('bank' => 'nazwa'))->where('p.FK_Cedenci =?', Auth::getInstance()->getIdentity()->getOwnerId());
     $this->addFilters($select, array('nazwa' => 'p.nazwa', 'bank' => 'pp.nazwa'));
     if (!$this->getRequestData()->getSort()) {
         $select->order('p.id DESC');
     }
     $iterator = new Iterator\Statements();
     $iterator->setPaginator($paginator = $this->getPaginator($select));
     foreach ($paginator as $result) {
         $iterator->append($entity = new Entity\Statement($result));
         $entity->setFile(new Entity\File($result));
     }
     return $iterator;
 }
Exemple #2
0
 /**
  * 
  * @return \Vindication\Auth
  */
 protected function getAuth()
 {
     return Auth::getInstance();
 }