/** * Constructor of class * we don't permit an explicit call of the constructor! (like $v = new Singleton()) * @author LamTX */ public function __construct() { //get key config $key = Thethao_Global::getConfig('caching'); //init keys redis related to this class $this->_key_block_detail = $key['block_detail']; }
/** * return Thethao_Model_Article * @author LamTX */ public function __construct() { //get config key caching $key = Thethao_Global::getConfig('caching'); $this->_key_rss_latest_news = $key['key_rss_latest_news']; $this->_tuong_thuat = $key['match_tuong_thuat']; unset($key); }
/** * Constructor of class * @return Thethao_Business_Sport_Adapter_Redis * @author HungNT1 */ public function __construct() { //get key caching $key = Thethao_Global::getConfig('caching'); //init keys redis related to this class $this->_team_match_league = $key['football_team_match_league']; unset($key); }
/** * Constructor of class * @return Thethao_Business_Sport_Adapter_Redis * @author HungNT1 */ public function __construct() { //get key caching $key = Thethao_Global::getConfig('caching'); //init keys redis related to this class $this->_tennis_matches = $key['tennis_matches']; $this->_tennis_player_matches = $key['tennis_player_matches']; unset($key); }
/** * Constructor of class * we don't permit an explicit call of the constructor! (like $v = new Singleton()) * @author PhuongTN * @return Thethao_Model_News */ public function __construct() { //get config key caching $key = Thethao_Global::getConfig('caching'); //init News key $this->_map_article = $key['map_article']; $this->_list_article_ids_by_rule_3 = $key['list_article_ids_by_rule_3']; unset($key); }
/** * return Thethao_Model_Tennis * @author LamTX */ public function __construct() { $key = Thethao_Global::getConfig('caching'); $this->_table_ranking = $key['tennis_table_ranking']; $this->_tennis_match_info = $key['tennis_match_info']; $this->_tennis_player_detail = $key['tennis_player_detail']; $this->_tennis_player_matches = $key['tennis_player_matches']; unset($key); }
/** * Constructor of class * @return Thethao_Business_Article_Adapter_Redis * @author HungNT1 */ public function __construct() { //get key caching $key = Thethao_Global::getConfig('caching'); //init keys redis related to this class $this->_list_article_ids_by_rule_1 = $key['list_article_ids_by_rule_1']; $this->_list_article_ids_by_rule_2 = $key['list_article_ids_by_rule_2']; $this->_list_article_ids_by_rule_3 = $key['list_article_ids_by_rule_3']; unset($key); }
/** * Constructor of class * we don't permit an explicit call of the constructor! (like $v = new Singleton()) * @return Thethao_Model_Category * @author LamTX */ public function __construct() { //get config key caching $key = Thethao_Global::getConfig('caching'); //init News key $this->_cate = null; $this->_menu = null; $this->_key_cache = $key['cate_full']; unset($key); }
/** * return Thethao_Model_Player * @author LamTX */ public function __construct() { $key = Thethao_Global::getConfig('caching'); $this->_player_team_match_list = $key['player_team_match_list']; $this->_player_award = $key['player_award']; $this->_detail_info_trans_term = $key['player_detail_info_trans_term']; $this->_detail_player_rating_term = $key['player_detail_rating_term']; $this->_player_champion_by_season = $key['player_champion_by_season']; $this->_player_by_team = $key['player_by_team']; unset($key); }
/** * return Thethao_Model_Football * @author LamTX */ public function __construct() { $key = Thethao_Global::getConfig('caching'); $this->_table_detail = $key['football_table_detail']; $this->_league_all = $key['football_league_all']; $this->_league_detail = $key['football_league_detail']; $this->_season_detail = $key['football_season_detail']; $this->_season_by_league_list = $key['football_season_by_league_list']; $this->_league_by_group_list = $key['football_league_by_group_list']; unset($key); }
/** * return Thethao_Model_Match * @author LamTX */ public function __construct() { $key = Thethao_Global::getConfig('caching'); $this->_team_match_commingsoon = $key['match_commingsoon']; $this->_match_in_week = $key['match_week']; $this->_match_team_season_league = $key['match_season_league']; $this->_match_statistic = $key['match_statistic']; $this->_report_type_all = $key['match_report_type_all']; $this->_diem_tin = $key['match_diem_tin']; $this->_tuong_thuat = $key['match_tuong_thuat']; $this->_predict_match_thethao_circle = $key['match_predict_thethao_circle']; $this->_predict_match_thethao_top = $key['match_predict_thethao_top']; $this->_match_betrate_detail = $key['match_betrate_detail']; $this->_match_time_list = $key['match_time_list']; $this->_player_team_match_list = $key['player_team_match_list']; $this->_match_extend = $key['match_extend']; unset($key); }
} exit; } //difened application path defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application')); // Define application environment defined('ZONE_ENV') || define('ZONE_ENV', getenv('ZONE_ENV') ? getenv('ZONE_ENV') : 'hn'); // Ensure library/ is on include_path set_include_path(implode(PATH_SEPARATOR, array('/home/hungnt1/phpgiaitri', APPLICATION_PATH, realpath(APPLICATION_PATH . '/../library')))); //print_r(get_include_path());die; //include defined configs require_once APPLICATION_PATH . '/configs/defined.php'; //include file Autoload for Zend require_once 'Zend/Loader/Autoloader.php'; //include file Autoload for Fpt framwork require_once 'Fpt/Autoloader.php'; //getInstance Autoload $Autoloader = Zend_Loader_Autoloader::getInstance(); //set default Autoload to Fpt framework $Autoloader->setDefaultAutoloader(array(new Fpt_Autoloader(), 'loadClass')); //regis name space for giaitri $Autoloader->registerNamespace('Thethao_'); //get config from application $config = Thethao_Global::getConfig('application'); //get Application Zend $application = new Zend_Application(APPLICATION_ENV, $config); //Zend application execute $application->bootstrap()->run(); //$end = microtime(true) - $time_start; //echo "\n Time:" . $end.' - '.date("Y/m/d H:i:s"); //echo "\n Memory:" . round(memory_get_usage(true) / 1048576, 2) . " megabytes";
set_include_path(implode(PATH_SEPARATOR, array(get_include_path(), realpath(APPLICATION_PATH . '/../library'), realpath(APPLICATION_PATH . '/../server')))); //include defined configs require_once APPLICATION_PATH . '/configs/defined.php'; require_once APPLICATION_PATH . '/../server/Job/Application.php'; //include file Autoload for Zend require_once 'Zend/Loader/Autoloader.php'; //include file Autoload for Fpt framwork require_once 'Fpt/Autoloader.php'; //getInstance Autoload $Autoloader = Zend_Loader_Autoloader::getInstance(); //set default Autoload to Fpt framework $Autoloader->setDefaultAutoloader(array(new Fpt_Autoloader(), 'loadClass')); //regis name space for giaitri $Autoloader->registerNamespace('Thethao_')->registerNamespace('Fpt_')->registerNamespace('Job_'); //get application conf $arrConfig = Thethao_Global::getConfig('job'); $application = new Application($arrConfig); Zend_Controller_Front::getInstance()->setParam('bootstrap', $application); unset($application); //get job hn $arrJobConf = $arrConfig['job']['hn']['sport']; //get job hcm $arrHCMJobConf = $arrConfig['job']['hcm']['sport']; //merge config server $arrJobConf['servers'] = array_merge($arrJobConf['servers'], $arrHCMJobConf['servers']); $objWorker = new Fpt_Job_Worker_Adapter_Gearman($arrJobConf); //Map function register den function thuc hien worker //framework add, edit, delete article and update category $objWorker->addFunction($arrConfig['job']['task']['sport']['add_article'], 'function_reduce'); $objWorker->addFunction($arrConfig['job']['task']['sport']['edit_article'], 'function_reduce'); $objWorker->addFunction($arrConfig['job']['task']['sport']['delete_article'], 'function_reduce');
set_include_path(implode(PATH_SEPARATOR, array('/home/tiendq3/phpV3', APPLICATION_PATH, realpath(APPLICATION_PATH . '/../library')))); //print_r(get_include_path());die; //include defined configs require_once APPLICATION_PATH . '/configs/defined-seagame.php'; //include file Autoload for Zend require_once 'Zend/Loader/Autoloader.php'; //include file Autoload for Fpt framwork require_once 'Fpt/Autoloader.php'; //getInstance Autoload $Autoloader = Zend_Loader_Autoloader::getInstance(); //set default Autoload to Fpt framework $Autoloader->setDefaultAutoloader(array(new Fpt_Autoloader(), 'loadClass')); //regis name space for thethao $Autoloader->registerNamespace('Thethao_'); //get config from application $config = Thethao_Global::getConfig('application', 'seagame'); //get Application Zend $application = new Zend_Application(APPLICATION_ENV, $config); //Zend application execute $application->bootstrap()->run(); //$end = microtime(true) - $time_start; //echo "\n Time:" . $end.' - '.date("Y/m/d H:i:s"); //echo "\n Memory:" . round(memory_get_usage(true) / 1048576, 2) . " megabytes"; function __shutdown() { global $time, $memory; $endTime = microtime(true); $endMemory = memory_get_usage(); $error = error_get_last(); print_r($error); echo 'Time: [' . ($endTime - $time) . '] - Memory: [' . number_format(($endMemory - $memory) / 1024) . 'Kb]';