• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP services\Config类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中App\services\Config的典型用法代码示例。如果您正苦于以下问题:PHP Config类的具体用法?PHP Config怎么用?PHP Config使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了Config类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: bootDb

 public static function bootDb()
 {
     // Init Eloquent ORM Connection
     $capsule = new Capsule();
     $capsule->addConnection(Config::getDbConfig());
     $capsule->bootEloquent();
 }
开发者ID:NothingToDoCN,项目名称:ss-panel,代码行数:7,代码来源:Boot.php


示例2: testHandleRegister

 public function testHandleRegister()
 {
     $code = $this->addCode();
     // test wrong code
     $this->post('/auth/register', []);
     $this->assertEquals('200', $this->response->getStatusCode());
     $this->checkErrorCode(AuthController::WrongCode);
     // test illegal email
     $this->post('/auth/register', ["code" => $code]);
     $this->assertEquals('200', $this->response->getStatusCode());
     $this->checkErrorCode(AuthController::IllegalEmail);
     // test password to short
     $shortPwd = '123';
     $this->post('/auth/register', ["code" => $code, "email" => $this->email, "passwd" => $shortPwd]);
     $this->assertEquals('200', $this->response->getStatusCode());
     $this->checkErrorCode(AuthController::PasswordTooShort);
     // test password not equal
     $this->post('/auth/register', ["code" => $code, "email" => $this->email, "passwd" => $this->password, "repasswd" => $shortPwd]);
     $this->assertEquals('200', $this->response->getStatusCode());
     $this->checkErrorCode(AuthController::PasswordNotEqual);
     // test email used
     $this->post('/auth/register', ["code" => $code, "email" => $this->getExistEmail(), "passwd" => $this->password, "repasswd" => $this->password]);
     $this->assertEquals('200', $this->response->getStatusCode());
     $this->checkErrorCode(AuthController::EmailUsed);
     //  illegal register
     Config::set('emailVerifyEnabled', false);
     $this->post('/auth/register', ["code" => $code, "email" => $this->email, "passwd" => $this->password, "repasswd" => $this->password, "name" => "name"]);
     $this->assertEquals('200', $this->response->getStatusCode());
 }
开发者ID:SharkIng,项目名称:ss-panel,代码行数:29,代码来源:AuthTest.php


示例3: getProgrammes

 /**
  * Get a collection of programmes listed by letter, using a cached record if it exists
  * @param  string $letter The letter for which to query the programmes
  * @return \Illuminate\Support\Collection 
  */
 public function getProgrammes($letter)
 {
     $page = Request::get('page', 1);
     return $this->cache->remember("bbc.programmes.{$letter}.page.{$page}", \Config::get('cache.remember_time'), function () use($letter) {
         return $this->bbc_api_client->getProgrammes($letter);
     });
 }
开发者ID:harrygr,项目名称:azlisting,代码行数:12,代码来源:CacheBbcApiClient.php


示例4: debug

 public function debug($request, $response, $args)
 {
     $server = ["headers" => $request->getHeaders(), "content_type" => $request->getContentType()];
     $res = ["server_info" => $server, "ip" => Http::getClientIP(), "version" => Config::get('version'), "reg_count" => Check::getIpRegCount(Http::getClientIP())];
     Logger::debug(json_encode($res));
     return $this->echoJson($response, $res);
 }
开发者ID:xyz12810,项目名称:ss-panel,代码行数:7,代码来源:HomeController.php


示例5: __construct

 public function __construct()
 {
     $this->config = Config::get("mail")["mailgun"];
     $this->mg = new MailgunService($this->config["key"]);
     $this->domain = $this->config["domain"];
     $this->sender = $this->config["sender"];
 }
开发者ID:cainiaocome,项目名称:ss-panel,代码行数:7,代码来源:Mailgun.php


示例6: charge

 public static function charge($token, $email, $amount)
 {
     $key = Config::get('stripeKey');
     Stripe\Stripe::setApiKey($key);
     $customer = Stripe\Customer::create(array('email' => $email, 'card' => $token));
     $charge = Stripe\Charge::create(array('customer' => $customer->id, 'amount' => $amount, 'currency' => 'USD'));
     return $charge;
 }
开发者ID:SharkIng,项目名称:ss-panel,代码行数:8,代码来源:StripePayment.php


示例7: checkPassword

 public static function checkPassword($hashedPassword, $password)
 {
     $method = Config::get('pwdMethod');
     if ($hashedPassword == self::passwordHash($password)) {
         return true;
     }
     return false;
 }
开发者ID:ss-panel,项目名称:ss-panel,代码行数:8,代码来源:Hash.php


示例8: testDebug

 public function testDebug()
 {
     $this->get('/debug');
     $this->assertEquals('200', $this->response->getStatusCode());
     $ary = json_decode($this->response->getBody(), true);
     // test version
     $this->assertEquals(Config::get('version'), $ary['version']);
 }
开发者ID:SharkIng,项目名称:ss-panel,代码行数:8,代码来源:HomeTest.php


示例9: sendEmailConfirmationTo

 /**
  * Deliver the email confirmation.
  *
  * @param  User $user
  * @return void
  */
 public function sendEmailConfirmationTo(User $user)
 {
     $this->to = $user->email;
     $this->view = 'emails.confirm';
     $this->from = \Config::get('mail.from.address');
     $this->name = \Config::get('mail.from.name');
     $this->data = compact('user');
     $this->deliver(' 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Entity\Post类代码示例发布时间:2022-05-23
下一篇:
PHP Repositories\UserRepository类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap