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


PHP App::getFacadeApplication方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     $app = App::getFacadeApplication();
     $this->supplierRepository = new SupplierRepository($app);
     $this->productRepository = new ProductRepository($app);
     $this->skuFactory = new SkuFactory();
 }
开发者ID:rlacerda83,项目名称:catalog-microservice,代码行数:7,代码来源:ProductFactory.php

示例2: container

 public function container()
 {
     if (is_null($this->ioc)) {
         $this->ioc = App::getFacadeApplication();
     }
     return $this->ioc;
 }
开发者ID:aedart,项目名称:data-transfer-object-dto,代码行数:7,代码来源:DataTransferObject.php

示例3: children

 public function children()
 {
     parent::children();
     list($orderCol, $orderDirection) = $this->page->getChildOrderingPolicy();
     $manager = App::getFacadeApplication()['boomcms.template.manager'];
     $templates = $manager->getValidTemplates();
     // Create the main view with the basic settings
     $v = view("{$this->viewPrefix}/children", ['default_child_template' => $this->page->getDefaultChildTemplateId(), 'templates' => $templates, 'child_order_column' => $orderCol, 'child_order_direction' => $orderDirection, 'allowAdvanced' => $this->allowAdvanced, 'page' => $this->page]);
     // If we're showing the advanced settings then set the neccessary variables.
     if ($this->allowAdvanced) {
         // Add the view for the advanced settings to the main view.
         $v->default_grandchild_template = $this->page->getGrandchildTemplateId() != 0 ? $this->page->getGrandchildTemplateId() : $this->page->getTemplateId();
     }
     return $v;
 }
开发者ID:robbytaylor,项目名称:boom-core,代码行数:15,代码来源:View.php

示例4: foreach

 /**
  * Constructor
  */
 function __construct()
 {
     $this->app = App::getFacadeApplication();
     $this->paths = (require SRC_PATH . '/bootstrap/paths.php');
     $appActions = $this->app['config']['view.view_actions'];
     $appFilters = $this->app['config']['view.view_filters'];
     $viewAct = $appActions ?: $this->defaultActions;
     $viewFil = $appFilters ?: $this->defaultFilters;
     /**
      * Add actions
      */
     foreach ((array) $viewAct as $action) {
         add_action($action, array($this, 'parse'));
     }
     /**
      * Add filters
      */
     foreach ((array) $viewFil as $filter) {
         add_filter($filter, array($this, 'parse'));
     }
 }
开发者ID:bruno-barros,项目名称:w.eloquent-framework,代码行数:24,代码来源:blade.php

示例5: foreach

<?php

namespace Khill\Lavacharts\Laravel;

use Illuminate\Support\Facades\App;
$app = App::getFacadeApplication();
$blade = $app['view']->getEngineResolver()->resolve('blade')->getCompiler();
$charts = ['AreaChart', 'BarChart', 'CalendarChart', 'ColumnChart', 'ComboChart', 'DonutChart', 'GaugeChart', 'GeoChart', 'LineChart', 'PieChart', 'GoogleTable'];
$dashboards = ['Dashboard'];
$controls = ['Control', 'CategoryFilter', 'ChartRangeFilter', 'DateRangeFilter', 'NumberRangeFilter', 'StringFilter'];
/**
 * If the directive method exists, we're using Laravel 5
 */
if (method_exists($blade, 'directive')) {
    foreach ($charts as $chart) {
        $blade->directive(strtolower($chart), function ($expression) use($chart) {
            return '<?php echo Lava::renderChart' . $chart . $expression . '; ?>';
        });
    }
    foreach ($charts as $chart) {
        $blade->directive(strtolower($chart) . 'Wrapper', function ($expression) use($chart) {
            return '<?php echo Lava::renderChartWrapper' . $chart . $expression . '; ?>';
        });
    }
    foreach ($controls as $control) {
        $blade->directive(strtolower($control), function ($expression) use($control) {
            return '<?php echo Lava::renderControl' . $control . $expression . '; ?>';
        });
    }
    foreach ($dashboards as $dashboard) {
        $blade->directive(strtolower($dashboard), function ($expression) use($dashboard) {
开发者ID:peter-draznik,项目名称:lavacharts,代码行数:31,代码来源:BladeTemplateExtensions.php

示例6: __construct

 public function __construct()
 {
     $app = App::getFacadeApplication();
     $this->skuRepository = new SkuRepository($app);
     $this->variationRepository = new VariationRepository($app);
 }
开发者ID:rlacerda83,项目名称:catalog-microservice,代码行数:6,代码来源:SkuFactory.php

示例7: setupContainer

 /**
  * Initialise the IoC Service Container
  */
 protected function setupContainer()
 {
     // Only set the application on the Facade
     // if there is none yet set
     if (is_null(App::getFacadeApplication())) {
         App::setFacadeApplication(new Container());
     }
     $this->container = App::getFacadeApplication();
     $this->container->singleton('app', $this->container);
 }
开发者ID:aedart,项目名称:scaffold,代码行数:13,代码来源:IoC.php

示例8: hasUnsetFacadeApplication

 /**
  * @test
  *
  * @depends canDestroy
  */
 public function hasUnsetFacadeApplication()
 {
     $this->assertNull(App::getFacadeApplication(), 'Container / Application should be null');
 }
开发者ID:aedart,项目名称:data-transfer-object-dto,代码行数:9,代码来源:BootstrapTest.php

示例9: function

 * Plugin URI: http://brunobarros.com/
 * Description: A framework for WordPress developers.
 * Version: 1.0.0
 * Author: Bruno Barros
 * Author URI: http://www.brunobarros.com/
 * License: GPLv2
 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
 * Text Domain:       app-integration
 * Domain Path:       /languages
 */
// If this file is called directly, abort.
use Weloquent\Plugins\AppIntegration\Includes\AppIntegration;
use Illuminate\Support\Facades\App;
use Weloquent\Plugins\AppIntegration\Includes\ConfigurationsAutoLoader;
if (!defined('WPINC')) {
    die;
}
/**
 * The core plugin class that is used to define internationalization,
 * dashboard-specific hooks, and public-facing site hooks.
 */
//$plugin = new AppIntegration(App::getFacadeApplication());
//$plugin->run();
add_action('setup_theme', function () {
    /**
     * ----------------------------------------------------------------
     * Bootstrap auto loading theme scripts on app/autoload folder
     * ----------------------------------------------------------------
     */
    ConfigurationsAutoLoader::setApp(App::getFacadeApplication())->add();
});
开发者ID:bruno-barros,项目名称:w.eloquent-framework,代码行数:31,代码来源:app-integration.php

示例10: init

 public function init()
 {
     $this->app = App::getFacadeApplication();
     $this->router = $this->app->make('router');
     $this->routes = $this->router->getRoutes();
 }
开发者ID:aginev,项目名称:acl,代码行数:6,代码来源:RouteList.php

示例11: getCurrentPath

 public function getCurrentPath()
 {
     if (!$this->currentPath) {
         $this->currentPath = dirname(App::getFacadeApplication()->basePath());
     }
     return $this->currentPath;
 }
开发者ID:igorwanbarros,项目名称:commands-laravel,代码行数:7,代码来源:AbstractStub.php

示例12: _verifyIsDirectory

 private function _verifyIsDirectory($files)
 {
     $path = dirname(App::getFacadeApplication()->basePath()) . '/' . $this->argument('module');
     $exec = 'y';
     if ($files->isDirectory($path)) {
         $exec = $this->ask("Directory `{$this->argument('module')}` already exists, to continue? " . "This action will overwrite existing files! [Y,N]");
     }
     return strtolower($exec);
 }
开发者ID:igorwanbarros,项目名称:commands-laravel,代码行数:9,代码来源:MakeModuleCommand.php

示例13: getInstance

 public static function getInstance()
 {
     if (!self::$instance) {
         self::$instance = new static(App::getFacadeApplication());
     }
     return self::$instance;
 }
开发者ID:bruno-barros,项目名称:w.eloquent-framework,代码行数:7,代码来源:AppIntegration.php


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