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


PHP static::app方法代码示例

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


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

示例1: init

 /** 
  * Main function for initialize this class.
  * @param \Slim\Slim
  */
 public static function init()
 {
     date_default_timezone_set(static::config()->timezone);
     static::$db = static::config()->db;
     static::$user = new \ptejada\uFlex\User();
     static::$app = new \Slim\Slim();
     static::$mail = new \PHPMailer();
     static::$assets = new \Assets();
     static::$user->config->database->host = static::config()->db['server'];
     static::$user->config->database->user = static::config()->db['username'];
     static::$user->config->database->password = static::config()->db['password'];
     static::$user->config->database->name = static::config()->db['database_name'];
     static::$user->start();
     require 'app/config/mail.php';
     static::$mail->isSMTP();
     static::$mail->Host = $mail['Host'];
     static::$mail->SMTPAuth = $mail['SMTPAuth'];
     static::$mail->Username = $mail['Username'];
     static::$mail->Password = $mail['Password'];
     static::$mail->SMTPSecure = $mail['SMTPSecure'];
     static::$mail->Port = $mail['Port'];
     static::$mail->From = $mail['From'];
     static::$mail->FromName = $mail['FromName'];
     static::$mail->isHTML(true);
 }
开发者ID:mgilangjanuar,项目名称:slimedoo,代码行数:29,代码来源:App.php

示例2: app

 /**
  * @return App Return a single instance of App
  */
 public static function app()
 {
     if (static::$app === null) {
         static::$app = new App(static::$configFile);
     }
     return static::$app;
 }
开发者ID:sinaru,项目名称:lp-test,代码行数:10,代码来源:main.php

示例3: getFacadeAccessor

 /**
  * Get the registered name of the component.
  *
  * @return string
  */
 protected static function getFacadeAccessor()
 {
     if (!static::$app) {
         static::$app = TruckerServiceProvider::make();
     }
     return 'trucker.model';
 }
开发者ID:summer11123,项目名称:trucker,代码行数:12,代码来源:Trucker.php

示例4: getFacadeAccessor

 /**
  * Retrieve Illuminage from the Container
  *
  * @return string
  */
 public static function getFacadeAccessor()
 {
     if (!static::$app) {
         static::$app = IlluminageServiceProvider::make();
     }
     return 'illuminage';
 }
开发者ID:anahkiasen,项目名称:illuminage,代码行数:12,代码来源:Illuminage.php

示例5: getInstance

 /**
  * @param Config $config
  *
  * @return Application
  */
 public static function getInstance(Config $config)
 {
     if (static::$app === null) {
         static::$app = new static($config);
     }
     return static::$app;
 }
开发者ID:Oxyaction,项目名称:salary-calendar,代码行数:12,代码来源:Application.php

示例6: instance

 /**
  * Get the Application Instance
  * @return Kernel
  */
 public static function instance()
 {
     if (!static::$app instanceof Kernel) {
         static::$app = new Kernel();
     }
     return static::$app;
 }
开发者ID:joshbrw,项目名称:rss.manager,代码行数:11,代码来源:Kernel.php

示例7: __construct

 /**
  * Create a new CabinetUpload instance.
  */
 public function __construct(array $attributes = array())
 {
     parent::__construct($attributes);
     if (!static::$app) {
         static::$app = app();
     }
 }
开发者ID:andrewelkins,项目名称:cabinet,代码行数:10,代码来源:CabinetUpload.php

示例8: getFacadeAccessor

 /**
  * Get the registered name of the component.
  *
  * @return string
  */
 protected static function getFacadeAccessor()
 {
     if (!static::$app) {
         static::$app = AcetoneServiceProvider::make();
     }
     return 'acetone.acetone';
 }
开发者ID:anahkiasen,项目名称:acetone,代码行数:12,代码来源:Acetone.php

示例9: getFacadeAccessor

 /**
  * Get the registered name of the component.
  *
  * @return string
  */
 protected static function getFacadeAccessor()
 {
     if (!static::$app) {
         static::$app = RocketeerServiceProvider::make();
     }
     return static::$accessor;
 }
开发者ID:denji,项目名称:rocketeer,代码行数:12,代码来源:StandaloneFacade.php

示例10: app

 /**
  * @return SeviceLocator
  */
 public static function app()
 {
     if (empty(static::$app)) {
         static::$app = new SeviceLocator(static::$config);
     }
     return static::$app;
 }
开发者ID:visionp,项目名称:TestFramework,代码行数:10,代码来源:Application.php

示例11: getSlimApp

 public static function getSlimApp()
 {
     if (!isset(static::$app)) {
         static::$app = $GLOBALS['app'];
     }
     return static::$app;
 }
开发者ID:joshjim27,项目名称:jobsglobal-api,代码行数:7,代码来源:Factory.php

示例12: getFacadeAccessor

 /**
  * Get the registered component.
  *
  * @return string
  */
 protected static function getFacadeAccessor()
 {
     if (!static::$app) {
         static::$app = FormerServiceProvider::make();
     }
     return 'former';
 }
开发者ID:autocar,项目名称:former,代码行数:12,代码来源:Former.php

示例13: __construct

 /**
  * App constructor
  */
 public function __construct()
 {
     if (empty(static::$app)) {
         static::$app = $this;
     }
     $this->setTimezone()->setErrorHandler()->addRegistry()->factory();
 }
开发者ID:Emericanec,项目名称:avenue,代码行数:10,代码来源:App.php

示例14: __construct

 /**
  * Create a new Notification instance.
  *
  * @param Twig_Template $template The Twig template object to use to create this notification.
  * @todo Allow other content sources (string, database, etc)
  */
 public function __construct($template)
 {
     $this->template = $template;
     if (!static::$app) {
         static::$app = UserFrosting::getInstance();
     }
 }
开发者ID:Odinthewanderer,项目名称:UserFrosting,代码行数:13,代码来源:Notification.php

示例15: app

 /**
  * Returns singleton app.
  */
 public function app()
 {
     if (!isset(static::$app)) {
         static::$app = new static();
     }
     return static::$app;
 }
开发者ID:artfulrobot,项目名称:styler,代码行数:10,代码来源:index.php


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