Skip to content
This repository was archived by the owner on Jul 27, 2023. It is now read-only.
This repository was archived by the owner on Jul 27, 2023. It is now read-only.

Custom application class #11

@Ragazzo

Description

@Ragazzo

In current implementation i can not create my own application with for example class ApiApplication because of application creation is hardcoded as web/console, i suggest to check the second param of Initializer::create(), and if it is an array then first element of it must be application class, and second one is config.
Small changes are also needed here:
https://github.com/2amigos/yiinitializr/blob/master/Helpers/Initializer.php#L41

So, overall the end version can be like this in index.php:

$config = array(
    'ApiApplication',
    'frontend'
);
Yiinitializr\Helpers\Initializer::create('./../', $config, array(
    __DIR__ .'/../../common/config/main.php',
    __DIR__ .'/../../common/config/env.php',
    __DIR__ .'/../../common/config/local.php'
))->run();

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions