当前位置: 首页>>代码示例>>PHP>>正文


PHP Configuration::where方法代码示例

本文整理汇总了PHP中Configuration::where方法的典型用法代码示例。如果您正苦于以下问题:PHP Configuration::where方法的具体用法?PHP Configuration::where怎么用?PHP Configuration::where使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Configuration的用法示例。


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

示例1: isSuccesful

 public function isSuccesful()
 {
     foreach ((array) $_REQUEST as $ixField => $fieldValue) {
         $this->responseFields[$ixField] = $fieldValue;
     }
     $sSignatureBase = sprintf("%03s", $this->responseFields['ver']) . sprintf("%-10s", $this->responseFields['id']) . sprintf("%012s", $this->responseFields['ecuno']) . sprintf("%06s", $this->responseFields['receipt_no']) . sprintf("%012s", $this->responseFields['eamount']) . sprintf("%3s", $this->responseFields['cur']) . $this->responseFields['respcode'] . $this->responseFields['datetime'] . $this->mb_sprintf("%-40s", $this->responseFields['msgdata']) . $this->mb_sprintf("%-40s", $this->responseFields['actiontext']);
     function hex2str($hex)
     {
         $str = '';
         for ($i = 0; $i < strlen($hex); $i += 2) {
             $str .= chr(hexdec(substr($hex, $i, 2)));
         }
         return $str;
     }
     $mac = hex2str($this->responseFields['mac']);
     $flKey = openssl_get_publickey(\Configuration::where('code', '=', 'estcard/pubkey')->first()->value);
     if (!openssl_verify($sSignatureBase, $mac, $flKey)) {
         // invalidSignature
         return false;
     }
     if ($this->responseFields['receipt_no'] == 00) {
         # Payment was cancelled
         return false;
     }
     if ($this->responseFields['respcode'] == 00) {
         # Payment success
         return true;
     }
 }
开发者ID:Silxik,项目名称:banklink,代码行数:29,代码来源:Estcard.php

示例2: fire

 /**
  * Execute the console command.
  *
  * @return void
  */
 public function fire()
 {
     $this->line('Welcome to the job cron.');
     $auto_close = Configuration::where('key', 'auto_close')->first();
     if ($auto_close['value']) {
         $auto_close_time = Configuration::where('key', 'auto_close_time')->first();
         $diff_time = date("Y-m-d H:i:s", time() - $auto_close_time['value'] * 60 * 60);
         $jobs = Job::where('status', '=', '1')->where('invalid', '=', '0')->where('start_time', '<', $diff_time)->get();
         foreach ($jobs as $job) {
             Job::where('id', $job->id)->update(array('status' => 2));
         }
     }
     $this->line('Done !');
 }
开发者ID:torome,项目名称:ticket,代码行数:19,代码来源:JobEndCronCommand.php

示例3: beerOfTheDay

 public function beerOfTheDay()
 {
     $dateInDatabase = Configuration::where('name', '=', 'beer_of_the_day_modification_date')->first();
     $date = Carbon::createFromFormat("Y-m-d", "{$dateInDatabase->value}");
     $now = Carbon::now();
     $difference = $now->diffInDays($date);
     if ($difference >= 1) {
         $dateInDatabase->value = $now->format('Y-m-d');
         $dateInDatabase->save();
         $beer = $this->generateRandomBeer();
         $selectedBeer = new Configuration();
         $selectedBeer->name = "beer_id";
         $selectedBeer->value = $beer->beer_id;
         $selectedBeer->save();
     } else {
         $beer = Beer::find(Configuration::where('name', '=', 'beer_id')->orderBy('id', 'desc')->first()->value);
     }
     return View::make('beers.beer-of-the-day')->with(['beer' => $beer]);
 }
开发者ID:hopshoppub,项目名称:hopshop.dev,代码行数:19,代码来源:BeersController.php

示例4: register

 public function register()
 {
     $this->app->bind('banklink', function ($app, $parameters) {
         switch ($parameters['bank_code']) {
             case 'seb':
                 $protocol = new Protocol\iPizza(@\Configuration::where('code', '=', 'seb/vk_snd_id')->first()->value, @\Configuration::where('code', '=', 'seb/vk_name')->first()->value, @\Configuration::where('code', '=', 'seb/vk_acc')->first()->value, @\Configuration::where('code', '=', 'seb/vk_privkey')->first()->value, @\Configuration::where('code', '=', 'seb/vk_pubkey')->first()->value, @$parameters['return_url'], $mbStrlen = true);
                 return new SEB($protocol, $testMode = false, @\Configuration::where('code', '=', 'seb/vk_dest')->first()->value);
             case 'swedbank':
                 $protocol = new Protocol\iPizza(@\Configuration::where('code', '=', 'swedbank/vk_snd_id')->first()->value, @\Configuration::where('code', '=', 'swedbank/vk_name')->first()->value, @\Configuration::where('code', '=', 'swedbank/vk_acc')->first()->value, @\Configuration::where('code', '=', 'swedbank/vk_privkey')->first()->value, @\Configuration::where('code', '=', 'swedbank/vk_pubkey')->first()->value, @$parameters['return_url'], $mbStrlen = true);
                 return new Swedbank($protocol, $testMode = false, @\Configuration::where('code', '=', 'swedbank/vk_dest')->first()->value);
             case 'nordea':
                 $protocol = new Protocol\Solo(@\Configuration::where('code', '=', 'nordea/rcv_id')->first()->value, @\Configuration::where('code', '=', 'nordea/mac_key')->first()->value, @$parameters['return_url'], @\Configuration::where('code', '=', 'nordea/rcv_name')->first()->value, @\Configuration::where('code', '=', 'nordea/rcv_account')->first()->value);
                 return new Nordea($protocol, $testMode = false, isset($parameters['auth']) ? \Configuration::where('code', '=', 'nordea/vk_dest_auth')->first()->value : \Configuration::where('code', '=', 'nordea/vk_dest')->first()->value);
             case 'lhv':
                 $protocol = new Protocol\iPizza(@\Configuration::where('code', '=', 'lhv/vk_snd_id')->first()->value, @\Configuration::where('code', '=', 'lhv/vk_name')->first()->value, @\Configuration::where('code', '=', 'lhv/vk_acc')->first()->value, @\Configuration::where('code', '=', 'lhv/vk_privkey')->first()->value, @\Configuration::where('code', '=', 'lhv/vk_pubkey')->first()->value, @$parameters['return_url'], $mbStrlen = true);
                 return new LHV($protocol, $testMode = false, @\Configuration::where('code', '=', 'lhv/vk_dest')->first()->value);
             case 'danske':
                 $protocol = new Protocol\iPizza(@\Configuration::where('code', '=', 'danske/vk_snd_id')->first()->value, @\Configuration::where('code', '=', 'danske/vk_name')->first()->value, @\Configuration::where('code', '=', 'danske/vk_acc')->first()->value, @\Configuration::where('code', '=', 'danske/vk_privkey')->first()->value, @\Configuration::where('code', '=', 'danske/vk_pubkey')->first()->value, @$parameters['return_url'], $mbStrlen = true);
                 return new DanskeBank($protocol, $testMode = false, @\Configuration::where('code', '=', 'danske/vk_dest')->first()->value);
             case 'estcard':
                 return new Estcard(@\Configuration::where('code', '=', 'estcard/url')->first()->value, @$parameters['return_url'], @\Configuration::where('code', '=', 'estcard/id')->first()->value);
         }
     });
 }
开发者ID:Silxik,项目名称:banklink,代码行数:24,代码来源:BanklinkServiceProvider.php

示例5: showHome

 public function showHome()
 {
     $beer = Beer::find(Configuration::where('name', '=', 'beer_id')->orderBy('id', 'desc')->first()->value);
     return View::make('home')->with(['beer' => $beer]);
 }
开发者ID:hopshoppub,项目名称:hopshop.dev,代码行数:5,代码来源:HomeController.php


注:本文中的Configuration::where方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。