function current() { if (!($record = parent::current())) { return null; } return self::createObjectFromRecord($record, $this->class_path, $this->conn, $this->lazy_attributes, $this->use_proxy); }
function current() { if (!($record = parent::current())) { return null; } $this->_extractPrefixedFieldsAsActiveRecords($record); return $record; }
function current() { $record = parent::current(); $data = $record->export(); $data['full'] = $this->prefix1 . $data['name'] . '-' . $data['job'] . $this->prefix2; $processed_record = new lmbSet(); $processed_record->import($data); return $processed_record; }
function current() { $object = parent::current(); $fields = new lmbSet(); foreach ($this->attach_relations as $relation_name => $params) { $relation_type = $this->base_object->getRelationType($relation_name); $relation_info = $this->base_object->getRelationInfo($relation_name); switch ($relation_type) { case lmbActiveRecord::HAS_ONE: case lmbActiveRecord::MANY_BELONGS_TO: if (isset($this->loaded_attaches[$relation_name][$object->get($this->prefix . $relation_info['field'])])) { $fields->set($this->prefix . $relation_name, $this->loaded_attaches[$relation_name][$object->get($this->prefix . $relation_info['field'])]); } break; case lmbActiveRecord::BELONGS_TO: if (isset($this->loaded_attaches[$relation_name][$object->get($this->prefix . $this->base_object->getPrimaryKeyName())])) { $fields->set($this->prefix . $relation_name, $this->loaded_attaches[$relation_name][$object->get($this->prefix . $this->base_object->getPrimaryKeyName())]); } break; case lmbActiveRecord::HAS_MANY: case lmbActiveRecord::HAS_MANY_TO_MANY: $collection = $this->base_object->createRelationCollection($relation_name); $collection->setOwner($object); if (isset($this->loaded_attaches[$relation_name][$object->get($this->prefix . $this->base_object->getPrimaryKeyName())])) { $collection->setDataset(new lmbCollection($this->loaded_attaches[$relation_name][$object->get($this->prefix . $this->base_object->getPrimaryKeyName())])); } else { $collection->setDataset(new lmbCollection()); } $fields->set($this->prefix . $relation_name, $collection); break; } } $object->loadFromRecord($fields); return $object; }
function current() { $record = parent::current(); $this->_processRecord($record); return $record; }