class Ioc (View source)

The Factory class.

Methods

static Container
factory(string $name = null, string $profile = null)

getInstance

static Container
getContainer(string $name = null, string $profile = null)

getContainer

static void
setContainer(string $profile, Container $container)

setContainer

static void
setProfile(string $name = 'windwalker')

setProfile

static string
getProfile()

Method to get property Profile

static void
reset(string $profile = null)

reset

static WebApplication|Console
getApplication()

getApplication

static UserManager
getUserManager()

getUserManager

static Config
getConfig()

getConfig

static WebEnvironment
getEnvironment()

getEnvironment

static Input
getInput()

getInput

static Dispatcher
getDispatcher()

getDispatcher

static Session
getSession()

getSession

static Cache
getGlobalCache()

getCache

static AbstractDatabaseDriver
getDatabase()

getDB

static Router
getRouter()

getRouter

static Language
getLanguage()

getLanguage

static UriData
getUriData()

getUriData

static Run
getDebugger()

getDebugger

static NullLogger|Logger
getLogger()

getLogger

static AbstractPackage
getPackage(string $name)

getPackage

static mixed
get(string $key, string $child = null, bool $forceNew = false)

get

Container
share(string $key, callable $callback, string $name = null)

Convenience method for creating shared keys.

static mixed
getNewInstance(string $key, string $child = null)

getNewInstance

static boolean
exists(string $key, string $child = null)

exists

static string
dump(int $level = 10, string $name = null, string $profile = null)

dump

Details

at line line 47
static Container factory(string $name = null, string $profile = null)

getInstance

Parameters

string $name
string $profile

Return Value

Container

at line line 90
static Container getContainer(string $name = null, string $profile = null)

getContainer

Parameters

string $name
string $profile

Return Value

Container

at line line 103
static void setContainer(string $profile, Container $container)

setContainer

Parameters

string $profile
Container $container

Return Value

void

at line line 119
static void setProfile(string $name = 'windwalker')

setProfile

Parameters

string $name

Return Value

void

at line line 131
static string getProfile()

Method to get property Profile

Return Value

string

at line line 143
static void reset(string $profile = null)

reset

Parameters

string $profile

Return Value

void

at line line 160
static WebApplication|Console getApplication()

getApplication

Return Value

WebApplication|Console

at line line 170
static UserManager getUserManager()

getUserManager

Return Value

UserManager

at line line 180
static Config getConfig()

getConfig

Return Value

Config

at line line 190
static WebEnvironment getEnvironment()

getEnvironment

Return Value

WebEnvironment

at line line 200
static Input getInput()

getInput

Return Value

Input

at line line 210
static Dispatcher getDispatcher()

getDispatcher

Return Value

Dispatcher

at line line 220
static Session getSession()

getSession

Return Value

Session

at line line 230
static Cache getGlobalCache()

getCache

Return Value

Cache

at line line 240
static AbstractDatabaseDriver getDatabase()

getDB

Return Value

AbstractDatabaseDriver

at line line 250
static Router getRouter()

getRouter

Return Value

Router

at line line 260
static Language getLanguage()

getLanguage

Return Value

Language

at line line 270
static UriData getUriData()

getUriData

Return Value

UriData

at line line 280
static Run getDebugger()

getDebugger

Return Value

Run

at line line 290
static NullLogger|Logger getLogger()

getLogger

Return Value

NullLogger|Logger

at line line 302
static AbstractPackage getPackage(string $name)

getPackage

Parameters

string $name

Return Value

AbstractPackage

at line line 316
static mixed get(string $key, string $child = null, bool $forceNew = false)

get

Parameters

string $key
string $child
bool $forceNew

Return Value

mixed

at line line 334
Container share(string $key, callable $callback, string $name = null)

Convenience method for creating shared keys.

Parameters

string $key Name of dataStore key to set.
callable $callback Callable function to run when requesting the specified $key.
string $name Container name.

Return Value

Container This object for chaining.

at line line 347
static mixed getNewInstance(string $key, string $child = null)

getNewInstance

Parameters

string $key
string $child

Return Value

mixed

at line line 360
static boolean exists(string $key, string $child = null)

exists

Parameters

string $key
string $child

Return Value

boolean

at line line 374
static string dump(int $level = 10, string $name = null, string $profile = null)

dump

Parameters

int $level
string $name
string $profile

Return Value

string