/** @param IMapper */ public function __construct(IMapper $mapper) { $this->loadFk((array) $mapper->getRepository()->getEntityClassName(), $mapper->getRepository()->getModel()); $primaryKey = $this->getPrimaryKey(); $this->cache['entity']['id'] = $primaryKey; $this->cache['storage'][$primaryKey] = 'id'; }
/** * @return mixed */ public function getMapped() { $result = null; if ($this->isApplicable()) { $result = $this->postProcessMapped($this->performMap()); } elseif ($this->nextMapper) { $this->nextMapper->setInputData($this->inputData); $result = $this->nextMapper->getMapped(); } else { \XLite\Logger::logCustom("PitneyBowes", 'Internal error in mapper ' . get_class($this), false); } return $result; }
/** * @return mixed */ public function getMappings() { $this->setMappings(); return $this->mapper->getMappings(); }