getEnv() public static method

public static getEnv ( $env = 'production' )
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $app = new Application(dirname(dirname(__DIR__) . '/app'), Dispatcher::getEnv());
     $dispatcher = new Dispatcher($app);
     $dispatcher->boot();
     $user_service = new UserService();
     $body_measure_service = new BodyMeasureService($app->getContainer(), $app->getTmpDir());
     $users = $user_service->getUsers();
     $response = $body_measure_service->getData($users);
     $post_service = new PostService($app->getContainer());
     $post_service->post($response);
 }
示例#2
0
<?php

/**
 *
 */
require dirname(__DIR__) . '/vendor/autoload.php';
use Dietcube\Dispatcher;
Dispatcher::invoke('\\DietcubeSample\\Application', dirname(__DIR__) . '/app', Dispatcher::getEnv());
示例#3
0
<?php

/**
 *
 */
require dirname(__DIR__) . '/vendor/autoload.php';
use Dietcube\Dispatcher;
Dispatcher::invoke('\\Bravewood\\Application', dirname(__DIR__) . '/app', Dispatcher::getEnv());
<?php

/**
 * Created by IntelliJ IDEA.
 * User: yui_tang
 * Date: 1/12/16
 * Time: 19:03
 */
require dirname(__DIR__) . '/vendor/autoload.php';
use Dietcube\Dispatcher;
Dispatcher::invoke('\\ZDiet\\Application', dirname(__DIR__) . '/app', Dispatcher::getEnv());