a-blog cms PHP API Reference

Registry extends Container
in package

DI Container

Class Acms\Services\Container

Table of Contents

Properties

$bootstrap  : array<string, array<string|int, callable>>

Methods

__construct()  : mixed
Container constructor.
aliasList()  : array<string|int, mixed>
DIコンテナに登録されている一覧を取得
bind()  : void
register service
bindMake()  : mixed
create service
bootstrap()  : mixed
register service bootstrap function
exists()  : bool
DIコンテナに登録されているか判定
findClassByAlias()  : class-string|null
エイリアスからクラスを取得
getOptions()  : array<string|int, array{value: string, label: string}>
ユニット設定用のオプションを取得する
getSizableTypes()  : array<string|int, string>
ユニットがサイズオプションを持つか
isInplaceSupported()  : bool
ユニットがinplace編集(ダイレクト編集)でサポートされているか
isParentUnit()  : bool
ユニットが親ユニットになれるか
make()  : mixed
get service
newInstance()  : mixed
create instance
singleton()  : void
register service as singleton
singletonMake()  : mixed
create service as singleton
createInstance()  : object
インスタンスの生成
createInstanceFromArray()  : array<string|int, mixed>
引数リストからインスタンスを生成
getConstructorArguments()  : array<string|int, mixed>
定義されているコンストラクタの引数を取得
getFunctionArguments()  : array<string|int, mixed>
定義されている関数の引数を取得
getMethodArguments()  : array<string|int, mixed>
定義されているメソッドの引数を取得

Properties

$bootstrap

protected array<string, array<string|int, callable>> $bootstrap

Methods

__construct()

Container constructor.

public __construct() : mixed

aliasList()

DIコンテナに登録されている一覧を取得

public aliasList() : array<string|int, mixed>
Return values
array<string|int, mixed>

bind()

register service

public bind(string $alias, string|callable $class[, array<string|int, mixed> $arguments = [] ]) : void
Parameters
$alias : string
$class : string|callable
$arguments : array<string|int, mixed> = []

bindMake()

create service

public bindMake(string $alias) : mixed
Parameters
$alias : string

bootstrap()

register service bootstrap function

public bootstrap(string $alias, callable $callback) : mixed
Parameters
$alias : string
$callback : callable

exists()

DIコンテナに登録されているか判定

public exists(string $alias) : bool
Parameters
$alias : string
Return values
bool

findClassByAlias()

エイリアスからクラスを取得

public findClassByAlias(string $alias) : class-string|null
Parameters
$alias : string
Return values
class-string|null

getOptions()

ユニット設定用のオプションを取得する

public getOptions() : array<string|int, array{value: string, label: string}>
Return values
array<string|int, array{value: string, label: string}>

getSizableTypes()

ユニットがサイズオプションを持つか

public getSizableTypes() : array<string|int, string>
Return values
array<string|int, string>

isInplaceSupported()

ユニットがinplace編集(ダイレクト編集)でサポートされているか

public isInplaceSupported(string $alias) : bool
Parameters
$alias : string
Return values
bool

isParentUnit()

ユニットが親ユニットになれるか

public isParentUnit(string $alias) : bool
Parameters
$alias : string
Return values
bool

make()

get service

public make(string $alias) : mixed
Parameters
$alias : string
Tags
throws
RuntimeException

newInstance()

create instance

public newInstance(mixed $class[, array<string|int, mixed> $arguments = [] ]) : mixed
Parameters
$class : mixed
$arguments : array<string|int, mixed> = []
Tags
inheritDoc

singleton()

register service as singleton

public singleton(string $alias, string|callable $class[, array<string|int, mixed> $arguments = [] ]) : void
Parameters
$alias : string
$class : string|callable
$arguments : array<string|int, mixed> = []

singletonMake()

create service as singleton

public singletonMake(string $alias) : mixed
Parameters
$alias : string

createInstance()

インスタンスの生成

protected createInstance(string $class[, array<string|int, mixed> $arguments = [] ]) : object
Parameters
$class : string
$arguments : array<string|int, mixed> = []
Return values
object

createInstanceFromArray()

引数リストからインスタンスを生成

protected createInstanceFromArray(array<string|int, mixed> $arguments) : array<string|int, mixed>
Parameters
$arguments : array<string|int, mixed>

\ReflectionParameter の配列

Return values
array<string|int, mixed>

getConstructorArguments()

定義されているコンストラクタの引数を取得

protected getConstructorArguments(string|object $class) : array<string|int, mixed>
Parameters
$class : string|object
Tags
throws
RuntimeException
Return values
array<string|int, mixed>

getFunctionArguments()

定義されている関数の引数を取得

protected getFunctionArguments(callable $closure) : array<string|int, mixed>
Parameters
$closure : callable
Return values
array<string|int, mixed>

getMethodArguments()

定義されているメソッドの引数を取得

protected getMethodArguments(string|object $class, string $method) : array<string|int, mixed>
Parameters
$class : string|object
$method : string
Tags
throws
RuntimeException
Return values
array<string|int, mixed>

        
On this page

Search results