コード例 #1
0
 /**
  * 构造函数,处理配置
  */
 public function __construct()
 {
     $params = spExt('spUrlRewrite');
     if (is_array($params)) {
         $this->params = array_merge($this->params, $params);
     }
 }
コード例 #2
0
ファイル: spVerifyCode.php プロジェクト: eon-hong/anypay
 public function __construct()
 {
     $params = spExt('spVerifyCode');
     if (!empty($params['width'])) {
         $this->width = $params['width'];
     }
     if (!empty($params['height'])) {
         $this->height = $params['height'];
     }
     if (!empty($params['length'])) {
         $this->len = $params['length'];
     }
     if (!empty($params['bgcolor'])) {
         $this->backcolor = $params['bgcolor'];
     }
     if (!empty($params['noisenum'])) {
         $this->noisenum = $params['noisenum'];
     }
     if (!empty($params['fontsize'])) {
         $this->textsize = $params['fontsize'];
     }
     if (!empty($params['fontfile'])) {
         $this->font = str_replace('\\', '/', dirname(__FILE__)) . '/' . $params['fontfile'];
     }
     if (!empty($params['format'])) {
         $this->format = strtolower($params['format']);
     }
 }
コード例 #3
0
ファイル: Session.php プロジェクト: httvncoder/151722441
 public function __construct($p = null)
 {
     $params = spExt('sessionAndCookie');
     if (!$p) {
         array_merge($params, $p);
     }
     $this->init($params);
 }
コード例 #4
0
ファイル: FeiAccessCache.php プロジェクト: ivanberry/grw
 public function __construct()
 {
     if (!function_exists('memcache_connect')) {
         FeiError('PHP环境未安装Memcache函数库!');
     }
     $params = spExt('FeiAccessCache');
     $memcache_host = isset($params['memcache_host']) ? $params['memcache_host'] : 'localhost';
     $memcache_port = isset($params['memcache_port']) ? $params['memcache_port'] : '11211';
     $this->mmc = memcache_connect($memcache_host, $memcache_port);
 }
コード例 #5
0
ファイル: spAcl.php プロジェクト: Geoge-Henry/travelnote
 /**
  * 构造函数,设置权限检查程序与提示程序
  */
 public function __construct()
 {
     $params = spExt("spAcl");
     if (!empty($params["prompt"])) {
         $this->prompt = $params["prompt"];
     }
     if (!empty($params["checker"])) {
         $this->checker = $params["checker"];
     }
 }
コード例 #6
0
ファイル: spEmail.php プロジェクト: Geoge-Henry/travelnote
 function __construct($relay_host = "", $smtp_port = 25, $auth = false, $from = '', $user = '', $pass = '')
 {
     $params = spExt("spEmail");
     $this->relay_host = empty($relay_host) ? $params['smtp_host'] : $relay_host;
     $this->smtp_port = empty($smtp_port) ? $params['smtp_port'] : $smtp_port;
     $this->auth = empty($auth) ? $params['auth'] : $auth;
     $this->user = empty($user) ? $params['user'] : $user;
     $this->pass = empty($pass) ? $params['pass'] : $pass;
     $this->from = empty($from) ? $params['from'] : $from;
     if (!empty($params['debug'])) {
         $this->debug = $params['debug'];
     }
     if (!empty($params["time_out"])) {
         $this->time_out = $params["time_out"];
     }
     if (!empty($params["log_file"])) {
         $this->log_file = $params["log_file"];
     }
     if (!empty($params["host_name"])) {
         $this->host_name = $params["host_name"];
     }
     $this->sock = FALSE;
 }