예제 #1
0
 /**
  * Return model object to use
  *
  * @return \XLite\Model\Profile
  */
 public function getModelObject()
 {
     $profile = parent::getModelObject();
     // Reset profile if it's not valid
     if (!\XLite\Core\Auth::getInstance()->checkProfile($profile)) {
         $profile = \XLite\Model\CachingFactory::getObject(__METHOD__, '\\XLite\\Model\\Profile');
     }
     return $profile;
 }
예제 #2
0
 /**
  * Return model form object
  *
  * @param array $params Form constructor params OPTIONAL
  *
  * @return \XLite\View\Model\AModel|void
  */
 public function getModelForm(array $params = array())
 {
     $result = null;
     $class = $this->getModelFormClass();
     if (isset($class)) {
         $result = \XLite\Model\CachingFactory::getObject(__METHOD__ . $class . (empty($params) ? '' : md5(serialize($params))), $class, $params);
     }
     return $result;
 }
예제 #3
0
파일: XLite.php 프로젝트: kewaunited/xcart
 /**
  * Clear some data
  *
  * @return void
  */
 protected function clearDataOnStartup()
 {
     static::$controller = null;
     \XLite\Model\CachingFactory::clearCache();
 }
예제 #4
0
 /**
  * Run controller
  *
  * @param string $applicationId Cache key OPTIONAL
  *
  * @return void
  */
 public function runController($applicationId = null)
 {
     return \XLite\Model\CachingFactory::getObjectFromCallback(__METHOD__ . $applicationId, $this->getApplication($applicationId), 'runController');
 }
예제 #5
0
 /**
  * Return model form object
  *
  * @param array $params Form constructor params OPTIONAL
  *
  * @return \XLite\View\Model\AModel|void
  */
 public function getInventoryModelForm(array $params = array())
 {
     $class = '\\XLite\\View\\Model\\InventoryTracking';
     return \XLite\Model\CachingFactory::getObject(__METHOD__ . $class . (empty($params) ? '' : md5(serialize($params))), $class, $params);
 }
예제 #6
0
 /**
  * Return model form object
  *
  * @param array $params Form constructor params OPTIONAL
  *
  * @return \XLite\View\Model\AModel
  */
 protected function getAuctionIncModelForm(array $params = array())
 {
     $class = 'XLite\\Module\\XC\\AuctionInc\\View\\Model\\ProductAuctionInc';
     return \XLite\Model\CachingFactory::getObject(__METHOD__ . $class . (empty($params) ? '' : md5(serialize($params))), $class, $params);
 }
예제 #7
0
 /**
  * Return model form object
  *
  * @param array $params Form constructor params OPTIONAL
  *
  * @return \XLite\View\Model\AModel|void
  */
 public function getDetailsModelForm(array $params = array())
 {
     $class = '\\XLite\\Module\\XC\\PitneyBowes\\View\\Model\\AdditionalDetails';
     return \XLite\Model\CachingFactory::getObject(__METHOD__ . $class . (empty($params) ? '' : md5(serialize($params))), $class, $params);
 }