Esempio n. 1
0
 /**
  * Get singletom instance
  * @return News
  * @author LamTX
  */
 public static final function getInstance()
 {
     //Check instance
     if (is_null(self::$_instance)) {
         self::$_instance = new self();
     }
     //Return instance
     return self::$_instance;
 }
Esempio n. 2
0
 /**
  * @author   : PhongTX - 29/01/2013
  * call job update caching FE
  * @param : string $strPageCode
  * @name : updateCache
  * @copyright   : FPT Online
  * @todo    : updateCache
  */
 public function updateBlock($strPageCode)
 {
     //init return
     $arrResponse = array();
     $objBlockModelNosql = new Thethao_Business_Block_Adapter_Redis();
     //rewrite redis
     $objBlockModelSql = new Thethao_Business_Block_Adapter_Mysql();
     $arrDevice = array(1, 2, 4);
     foreach ($arrDevice as $device) {
         //layout mobile
         $arrLayout = $objBlockModelSql->getBlockByPage($strPageCode, $device, 1);
         $arrResponse[] = $objBlockModelNosql->setBlockByPage($strPageCode, $device, $arrLayout);
     }
     //Return data
     return $arrResponse;
 }