infocyph/InterMix
Getting Started
What Is this?
Requirements
Installation
Dependency Injection (Container)
Understanding Dependency Injection & Container
The theory
Classic PHP code
Using dependency injection
Using a container
Understanding with an example
Without dependency injection
With dependency injection
Usage
get(string $id) & has(string $id)
bind(string $id, mixed $definition) & addDefinitions(array $definitions)
getReturn(string $id)
call(string|Closure|callable $classOrClosure, string|bool $method = null)
make(string $class, string|bool $method = false)
registerClass(string $class, array $parameters = [])
registerClosure(string $closureAlias, callable|Closure $function, array $parameters = [])
registerProperty(string $class, array $property), registerMethod(string $class, string $method, array $parameters = [])
setOptions(bool $injection = true, bool $methodAttributes = false, bool $propertyAttributes = false, string $defaultMethod = null)
split(string|array|Closure|callable $classAndMethod)
lock()
unset()
Attribute
Method attribute
Property attribute
Definition Caching
enableDefinitionCache(CacheInterface $cache)
cacheAllDefinitions(bool $forceClearFirst = false)
Feature flow
Main Process steps
Parameter resolution steps
Property resolution steps
Method Selection
Fence (Class initialization barrier)
Lets understand with example
Instead of initializing with
new
, we have to initialize differently
Applying requirements
Macro Mix (Mixin)
macro()
mix()
Memoize
Functions
memoize()
remember()
infocyph/InterMix
infocyph/InterMix Manual
View page source
infocyph/InterMix Manual
For
infpcyph/InterMix
latest. Updated on 2024-05-07.
Licensed under
MIT
.
Contents
Getting Started
What Is this?
Requirements
Installation
Dependency Injection (Container)
Understanding Dependency Injection & Container
Usage
Attribute
Definition Caching
Feature flow
Fence (Class initialization barrier)
Lets understand with example
Instead of initializing with
new
, we have to initialize differently
Applying requirements
Macro Mix (Mixin)
macro()
mix()
Memoize
Functions
Read the Docs
v: latest
Versions
latest
stable
Downloads
On Read the Docs
Project Home
Builds