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


PHP Bundle::start方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     Bundle::register('settings');
     Bundle::start('settings');
     Bundle::register('modules');
     Bundle::start('modules');
 }
开发者ID:juaniiie,项目名称:mwi,代码行数:7,代码来源:schema.php

示例2: setUp

 /**
  * Setup the test environment.
  */
 public function setUp()
 {
     Bundle::start('oneauth');
     Config::set('application.url', 'http://localhost');
     Config::set('application.index', '');
     Config::set('oneauth::urls', array('registration' => 'auth/register', 'login' => 'auth/login', 'callback' => 'auth/callback', 'registered' => 'auth/home', 'logged_in' => 'auth/account'));
 }
开发者ID:marmaray,项目名称:OLD-laravel-France-website,代码行数:10,代码来源:core.test.php

示例3: __construct

 /**
  * Set up a mock environment to test iBundle.
  *
  * @return  null
  */
 public function __construct()
 {
     // Start the bundle
     Bundle::start('ibundle');
     // Set test ibundle cache file
     $this->cache_file = ibundle_config('file', Bundle::path('ibundle') . 'storage/test.cache');
 }
开发者ID:neoighodaro,项目名称:ibundle,代码行数:12,代码来源:ibundle.test.php

示例4: run

 public function run()
 {
     Bundle::start('messages');
     $twoweeks = date('Y-m-d', strtotime('+2 weeks'));
     $week = date('Y-m-d', strtotime('+1 weeks'));
     $tomorrow = date('Y-m-d', strtotime('+1 day'));
     $rooms = Room::where_del_date($tomorrow)->or_where('del_date', '=', $week)->or_where('del_date', '=', $twoweeks)->get();
     foreach ($rooms as $room) {
         switch ($room->del_date) {
             case $twoweeks:
                 $expire_date = "over twee weken";
                 break;
             case $week:
                 $expire_date = "over een week";
                 break;
             case $tomorrow:
                 $expire_date = "morgen";
                 break;
         }
         Message::send(function ($message) use($room, $expire_date) {
             $message->to($room->email);
             $message->from('kamers@kamergenood.nl', 'Kamergenood');
             $message->subject('Verleng de kameradvertentie: "' . $room->title . '"');
             $message->body('view: emails.extend');
             $message->body->id = $room->id;
             $message->body->title = $room->title;
             $message->body->url = $room->url;
             $message->body->delkey = $room->delkey;
             $message->body->expire_date = $expire_date;
             $message->html(true);
         });
     }
 }
开发者ID:sanneterpstra,项目名称:Kamergenood,代码行数:33,代码来源:extend.php

示例5: send

 /**
  * Sends an email
  *
  * @param string  $email
  * @param string  $title
  * @param string $content
  * @return boolean
  */
 public static function send($email, $title, $content)
 {
     Bundle::start('swiftmailer');
     $transporter = Swift_SmtpTransport::newInstance('smtp.googlemail.com', Config::get('gotin::gotin.smtp_port'), 'ssl')->setUsername(Config::get('gotin::gotin.smtp_user'))->setPassword(Config::get('gotin::gotin.smtp_password'));
     $mailer = Swift_Mailer::newInstance($transporter);
     $message = Swift_Message::newInstance($title)->setFrom(array(Config::get('gotin::gotin.from_email') => Config::get('gotin::gotin.from_title')))->setTo(array($email => $email))->setBody($content, 'text/html');
     return $mailer->send($message);
 }
开发者ID:SerdarSanri,项目名称:gotin,代码行数:16,代码来源:mailer.php

示例6: testIssues

 public function testIssues()
 {
     Bundle::start('flyswatter');
     // Seed Database
     Controller::call('flyswatter::seed@seed');
     $issue = Issue::find(1);
     $this->assertNotNull($issue->id);
 }
开发者ID:SerdarSanri,项目名称:flyswatter,代码行数:8,代码来源:models.test.php

示例7: __construct

 public function __construct()
 {
     Bundle::register('modules');
     Bundle::start('modules');
     Bundle::register('navigation');
     Bundle::start('navigation');
     Bundle::register('pages');
     Bundle::start('pages');
 }
开发者ID:juaniiie,项目名称:mwi,代码行数:9,代码来源:schema.php

示例8: post_process

 public function post_process()
 {
     Log::write('PayPal', 'Trying to process IPN');
     Bundle::start('paypal-ipn');
     $listener = new IpnListener();
     //        $listener->use_sandbox = true;
     try {
         $listener->requirePostMethod();
         $verified = $listener->processIpn();
     } catch (Exception $e) {
         Log::info($e->getMessage());
     }
     if ($verified) {
         Log::write('PayPal', 'IPN payment looks verified');
         $data = Input::get();
         $settings = IniHandle::readini();
         if (!in_array($data['payment_status'], array('Completed', 'COMPLETED', 'completed'))) {
             Log::write('PayPal', 'payment not completed');
             return View::make('msg.error')->with('error', 'PayPal: payment not completed');
         }
         if (strtolower($data['receiver_email']) != strtolower($settings['ppemail'])) {
             Log::write('PayPal', 'receive email not same as set in settings. Settings: ' . $settings['ppemail'] . ' ||| PayPal email: ' . $data['receiver_email']);
             return View::make('msg.error')->with('error', 'PayPal: receive email not same as set in settings');
         }
         if (Payment::where('transaction_id', '=', $data['txn_id'])->count() != 0) {
             Log::write('PayPal', 'transaction ID already exists');
             return View::make('msg.error')->with('error', 'PayPal: transaction ID already exists');
         }
         if (strtolower($data['mc_currency']) != strtolower($settings['ppcurrency'])) {
             Log::write('PayPal', 'Currencies do not match');
             return View::make('msg.error')->with('error', 'PayPal: currencies do not match');
         }
         Log::write('PayPal', 'Got past all PLAN controller checks now going into CUSTOM');
         if (strtolower($data['custom']) == 'plan') {
             $result = Payment::verifyPlan($data);
             if (!$result) {
                 return $result;
             }
         } elseif (strtolower($data['custom']) == 'blacklist_skype' || strtolower($data['custom']) == 'blacklist_ip') {
             $result = Payment::verifyBlacklist($data);
             if (!$result) {
                 return $result;
             }
         } else {
             Log::write('PayPal', 'Custom not found, can\'t verify anything');
             return View::make('msg.error')->with('error', 'Fraudulent payment?');
         }
         Log::write('PayPal', 'Now trying to add Payment info to DB');
         $payment = Payment::create(array('user_id' => $data['option_selection1'], 'token' => $data['ipn_track_id'], 'date' => date('Y-m-d H:i:s', time()), 'ack' => $data['payment_status'], 'transaction_id' => $data['txn_id'], 'amount' => $data['mc_gross'], 'paypal_fee' => $data['mc_fee'], 'status' => $data['payment_status'], 'description' => $data['custom']));
         Log::write('PayPal', 'Successful payment, DB id: ' . $payment->id);
     } else {
         Log::write('PayPal', 'IPN listener returns false on check');
     }
     return 'handled';
 }
开发者ID:albertpaulp,项目名称:PrettyBoot,代码行数:55,代码来源:plan.php

示例9: start

 static function start()
 {
     Bundle::start('htmlki');
     error_reporting(-1);
     static::$logged = array();
     assert_options(ASSERT_BAIL, 1);
     if (!static::$attached) {
         static::$attached = true;
         \Event::listen('laravel.log', array(get_called_class(), 'onLog'));
     }
 }
开发者ID:SerdarSanri,项目名称:VaneMart,代码行数:11,代码来源:test.php

示例10: __construct

 public function __construct()
 {
     // the required modules must be enabled already
     // at this point
     Bundle::register('email');
     Bundle::start('email');
     Bundle::register('settings');
     Bundle::start('settings');
     Bundle::register('modules');
     Bundle::start('modules');
     Bundle::register('navigation');
     Bundle::start('navigation');
 }
开发者ID:juaniiie,项目名称:mwi,代码行数:13,代码来源:schema.php

示例11: post_upload

 public function post_upload($galleryID)
 {
     $path = path('public') . 'images/' . $galleryID;
     Fineuploader::init($path);
     $name = Fineuploader::getName();
     $fuResponse = Fineuploader::upload($name);
     if (isset($fuResponse['success']) && $fuResponse['success'] == true) {
         $file = Fineuploader::getUploadName();
         Bundle::start('resizer');
         $success = Resizer::open($file)->resize(300, 300, 'landscape')->save($path . '/thumbs/' . $name, 90);
         Images::create($galleryID, $name);
     }
     return Response::json($fuResponse);
 }
开发者ID:WebtoolsWendland,项目名称:juballery,代码行数:14,代码来源:galleries.php

示例12: listRole

 public static function listRole()
 {
     Bundle::start('datagrid');
     $rolelist = Admin_UserRole::where('roleid', '<>', 1)->get();
     $datagrid = new Datagrid();
     $datagrid->setFields(array('roleid' => 'Role Id', 'role' => 'User Role Description'));
     $datagrid->setAction('edit', 'editRoleModal', true, array('roleid'));
     //false,array('id'=>'roleid','data-toggle'=>'modal'));
     $datagrid->setAction('delete', 'deleteRole', true, array('roleid'));
     $datagrid->setContainer('list01', 'span12');
     $datagrid->setTable('users', 'table table-bordered table-hover table-striped table-condensed');
     $datagrid->build($rolelist, 'roleid');
     return $datagrid->render();
 }
开发者ID:jigeeshup,项目名称:bootstrap-base-application,代码行数:14,代码来源:userrole.php

示例13: run

 public function run()
 {
     Bundle::start('messages');
     $today = date('Y-m-d');
     $rooms = Room::where_del_date($today)->get();
     foreach ($rooms as $room) {
         Message::send(function ($message) use($room) {
             $message->to($room->email);
             $message->from('kamers@kamergenood.nl', 'Kamergenood');
             $message->subject('Kamer verlopen en verwijderd: "' . $room->title . '"');
             $message->body('view: emails.deleted');
             $message->body->title = $room->title;
             $message->html(true);
         });
         $path_room_folder = getcwd() . '/public_html/img/room/' . $room->id;
         File::rmdir($path_room_folder);
         $room->delete();
     }
 }
开发者ID:sanneterpstra,项目名称:Kamergenood,代码行数:19,代码来源:expired.php

示例14: create_user

 public function create_user($data, $is_admin)
 {
     Session::load();
     Bundle::start('sentry');
     try {
         $user_id = Sentry::user()->create($data);
         if ($user_id) {
             if ($is_admin) {
                 $permissions = array('is_admin' => 1);
                 if (Sentry::user($data['email'])->update_permissions($permissions)) {
                     // all good
                 } else {
                     throw new \Exception('Error updation permission.');
                 }
             }
         } else {
             throw new \Exception('Error creating user.');
         }
     } catch (Sentry\SentryException $e) {
         throw $e;
     }
 }
开发者ID:jvillasante,项目名称:cubanartjb,代码行数:22,代码来源:users.php

示例15: load

 /**
  * Load the file corresponding to a given class.
  *
  * This method is registerd in the bootstrap file as an SPL auto-loader.
  *
  * @param  string  $class
  * @return void
  */
 public static function load($class)
 {
     // First, we will check to see if the class has been aliased. If it has,
     // we will register the alias, which may cause the auto-loader to be
     // called again for the "real" class name.
     if (isset(static::$aliases[$class])) {
         class_alias(static::$aliases[$class], $class);
     } elseif (isset(static::$mappings[$class])) {
         require static::$mappings[$class];
     }
     // If the class namespace is mapped to a directory, we will load the
     // class using the PSR-0 standards from that directory; however, we
     // will trim off the beginning of the namespace to account for
     // the root of the mapped directory.
     if (!is_null($info = static::namespaced($class))) {
         $class = substr($class, strlen($info['namespace']));
         return static::load_psr($class, $info['directory']);
     } elseif (($slash = strpos($class, '\\')) !== false) {
         $namespace = substr($class, 0, $slash);
         // If the class is namespaced to an existing bundle and the bundle has
         // not been started, we will start the bundle and attempt to load the
         // class file again. If that fails, an error will be thrown by PHP.
         //
         // This allows bundle classes to be loaded by the auto-loader before
         // their class mappings have actually been registered; however, it
         // is up to the bundle developer to namespace their classes to
         // match the name of their bundle.
         if (Bundle::exists($namespace) and !Bundle::started($namespace)) {
             Bundle::start(strtolower($namespace));
             static::load($class);
         }
     }
     // If the class is not maped and is not part of a bundle or a mapped
     // namespace, we'll make a last ditch effort to load the class via
     // the PSR-0 from one of the registered directories.
     static::load_psr($class);
 }
开发者ID:bamper,项目名称:laravel.com,代码行数:45,代码来源:autoloader.php


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