Skip to content

BeanBase ​

BeanBase is the base class for all beans. By inheriting from BeanBase, we can easily access commonly used tools and capabilities when writing code.

Why is Vona's IOC container code more concise? ​

The reason is to prioritize the use of the dependency lookup strategy, resulting in fewer decorator functions and fewer type annotations. Injecting system capability objects into BeanBase is one of the mechanisms for implementing dependency lookup strategies.

Built-in Members ​

NameDescription
appGlobal App object
ctxThe Context object which the current request belongs to
ctx.beanctx container
beanapp container
scopeThe Scope object of the module which the current bean instance belongs to
$scopeThe Scope object of the specified module
$loggerLogger object
$loggerChildLogger Child object

BeanBaseSimple ​

BeanBase inherits from BeanBaseSimple

Built-in Members ​

NameDescription
$beanFullNameBean Identifier
$beanOptionsBean Options
$onionNameOnion Name
$onionOptionsOnion Options

Released under the MIT License.