/** * getter na records * @return AbstractRecords */ public function getRecords() { try { if ($this->records instanceof AbstractRecords || $this->records instanceof LBoxPagingIterator) { return $this->records; } if (strlen($this->classNameRecord) < 1) { throw new LBoxExceptionPage(LBoxExceptionPage::MSG_INSTANCE_VAR_STRING_NOTNULL, LBoxExceptionPage::CODE_BAD_INSTANCE_VAR); } $classNameRecords = eval("return " . $this->classNameRecord . "::\$itemsType;"); if (is_numeric($this->pageItems) && $this->pageItems > 0) { $this->records = new LBoxPagingIteratorRecords($classNameRecords, $this->pageItems, $this->classNameRecordOutputFilter, $this->filter, $this->orderBy, $this->limit, $this->where); } else { $this->records = new $classNameRecords($this->filter, $this->orderBy, $this->limit, $this->where); if (strlen($this->classNameRecordOutputFilter) > 0) { $this->records->setOutputFilterItemsClass($this->classNameRecordOutputFilter); } } /*DbControl::$debug = true; $this->records->count(); DbControl::$debug = false;*/ return $this->records; } catch (Exception $e) { throw $e; } }