Example #1
0
 public function actionLog()
 {
     //for ($i = 0; $i < 1000; $i++) {
     YcfCore::$log->log('hello ycf' . time(), 'info');
     YcfCore::$log->log('hello 123' . time(), 'info');
     YcfCore::$log->log('hello 123' . time(), 'info');
     YcfCore::$log->log('hello 123' . time(), 'info');
     YcfCore::end("Greet, Klcoze!");
     //}
 }
Example #2
0
File: index.php Project: kcloze/ycf
<?php

date_default_timezone_set('Asia/Shanghai');
define('DEBUG', true);
define('DS', DIRECTORY_SEPARATOR);
define('ROOT_PATH', realpath(dirname(__FILE__)) . DS);
define('YCF_BEGIN_TIME', microtime(true));
//echo 'worker start....';
require 'vendor/autoload.php';
use Ycf\Core\YcfCore;
$ycf = new YcfCore();
$ycf->init();
$ycf->run();
Example #3
0
 public function onTask($serv, $task_id, $from_id, $data)
 {
     $ycf = new YcfCore();
     $ycf->init();
     return ModelTask::run($serv, $task_id, $from_id, $data);
 }
Example #4
0
<?php

date_default_timezone_set('Asia/Shanghai');
define('DEBUG', true);
define('YCF_BEGIN_TIME', microtime(true));
define('DS', DIRECTORY_SEPARATOR);
define('ROOT_PATH', realpath(dirname(__FILE__)) . DS);
require 'vendor/autoload.php';
use Ycf\Core\YcfCore;
YcfCore::run();
Example #5
0
 function __construct()
 {
     $this->_redis = YcfCore::load('_redis');
 }
Example #6
0
 function __construct()
 {
     $this->_db = YcfCore::load('_db');
 }