本文整理汇总了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();
}
示例2: container
public function container()
{
if (is_null($this->ioc)) {
$this->ioc = App::getFacadeApplication();
}
return $this->ioc;
}
示例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;
}
示例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'));
}
}
示例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) {
示例6: __construct
public function __construct()
{
$app = App::getFacadeApplication();
$this->skuRepository = new SkuRepository($app);
$this->variationRepository = new VariationRepository($app);
}
示例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);
}
示例8: hasUnsetFacadeApplication
/**
* @test
*
* @depends canDestroy
*/
public function hasUnsetFacadeApplication()
{
$this->assertNull(App::getFacadeApplication(), 'Container / Application should be null');
}
示例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();
});
示例10: init
public function init()
{
$this->app = App::getFacadeApplication();
$this->router = $this->app->make('router');
$this->routes = $this->router->getRoutes();
}
示例11: getCurrentPath
public function getCurrentPath()
{
if (!$this->currentPath) {
$this->currentPath = dirname(App::getFacadeApplication()->basePath());
}
return $this->currentPath;
}
示例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);
}
示例13: getInstance
public static function getInstance()
{
if (!self::$instance) {
self::$instance = new static(App::getFacadeApplication());
}
return self::$instance;
}