Download the PHP package hehex/hehep-hcontainer without Composer

On this page you can find all versions of the php package hehex/hehep-hcontainer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package hehep-hcontainer

hehep-hcontainer

介绍

hehep-hcontainer 是一个 di容器,提供类的实例化工具组件
支持注释注解
支持PHP原生注解
支持类属性,构造参数依赖注入
支持AOP切面
支持Bean作用域

安装

Bean组件

常规定义Bean

基本示例

注解定义bean

通过@Bean注解器对bean进行描述,注解器属性与"常规定义Bean"一致
基本格式如下
@Bean("user") 定义bean id的属性
@Bean("user",_scope="app") 定义bean 作用域属性
@Bean("user",_scope=true,_onProxy=true)

注册Bean

实例化Bean

Bean作用域

bean 默认只有一种作用域,即永久作用域,如需实现其他作用域容器,则可通过
设置作用域容器事件来实现,比如需实现"request" 请求级别的作用域,则需要设置request对应的容器获取事件

绑定类或接口

依赖注入

构造函数注入

属性赋值注入

属性注入对应的属性必须是public属性

属性注入Bean

Bean代理

延迟注入

扫描文件

扫描规则

注解处理器

AOP方法拦截

默认通知点位置

通知点位置 说明
before 业务行为会在调用目标方法之前执行
after 业务行为会在调用目标方法之后执行,如目标方法发生异常,则不会执行
around 业务行为会在调用目标方法之前与之后执行(即一前一后执行两次),如目标方法发生异常,则不会执行之后的方法
afterThrowing 调用目标方法时发生异常,则会执行此通知点的业务行为
afterReturning 调用目标方法后,无论是否发生异常,都会执行此通知点的业务行为,相当于异常的finally

定义"业务行为"

定义目标类

注解

注解主要用于收集用户在代码中自定义的数据,并交由注解处理器处理业务

定义注解处理器

定义注解处理器请参考扫描-注解处理器

定义注解器

PHP原生注解

获取注解对象

默认注解器列表


All versions of hehep-hcontainer with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hehex/hehep-hcontainer contains the following files

Loading the files please wait ....