コード例 #1
0
 /**
  * adds OutputFilter to item before returning
  * @return AbstractRecordLBox
  * @throws Exception
  */
 public function current()
 {
     try {
         if (!($record = parent::current()) instanceof AbstractRecord) {
             return $record;
         }
         if (!($record = parent::current()) instanceof AbstractRecordLBox) {
             throw new LBoxExceptionOutputFilter(LBoxExceptionOutputFilter::MSG_RECORD_ISNOT_ABSTRACTRECORDLBOX, LBoxExceptionOutputFilter::CODE_RECORD_ISNOT_ABSTRACTRECORDLBOX);
         }
         if (strlen($this->outputFilterClass) > 0) {
             $class = $this->outputFilterClass;
             $filter = new $class($record);
             $record->setOutputFilter($filter);
         }
         return $record;
     } catch (Exception $e) {
         throw $e;
     }
 }