示例#1
0
 /**
  * Registers the module-only services
  * @param \Phalcon\DiInterface $di
  */
 public function registerServices(\Phalcon\DiInterface $di)
 {
     parent::registerServices($di);
     $di->set('tagNav', function () {
         return new \PhalconPlus\Html\TagNav();
     });
 }
示例#2
0
 /**
  * Registers the module-only services
  * @param \Phalcon\DiInterface $di
  */
 public function registerServices(\Phalcon\DiInterface $di)
 {
     parent::registerServices($di);
     $config = $this->config;
     $versionmin = $config->api->versionmin;
     if (isset($_POST['version'])) {
         $version = $_POST['version'];
     }
     if (!empty($version)) {
         if ($version < $versionmin) {
             //版本不可用  VersionError
             $arr = array("status" => "701", "result" => 'null', "errmsg" => "版本不可用", "timestamp" => time(), "attach" => "", "sign" => "");
             echo json_encode($arr);
             exit;
         }
     }
     /////////////////////////////////////////
     //$config = $this->config;
     $di['apiConfig'] = function () use($config) {
         return $config->api;
     };
 }
示例#3
0
 /**
  * Registers the module-only services
  * @param \Phalcon\DiInterface $di
  */
 public function registerServices(\Phalcon\DiInterface $di)
 {
     parent::registerServices($di);
     $config = (include APP_COMMON_PATH . "base-config/pay.php");
     $di['payConfig'] = new Config($config);
 }