# Zhamao Framework: src/ZM/Container/ContainerTrait.php 文件参考

ContainerTrait.php 文件参考

## 命名空间

| ZM\Container

## 函数

| __construct ()
| bound (string $abstract)
| getAlias (string $abstract)
| alias (string $abstract, string $alias)
| bind (string $abstract, $concrete=null, bool $shared=false)
| bindIf (string $abstract, $concrete=null, bool $shared=false)
| singleton (string $abstract, $concrete=null)
| singletonIf (string $abstract, $concrete=null)
| instance (string $abstract, mixed $instance)
| factory (string $abstract)
| flush ()
| make (string $abstract, array $parameters=[])
| build (\Closure|string $concrete)
| call (callable|string $callback, array $parameters=[], string $default_method=null)
| get (string $id)
| has (string $id)
| extend (string $abstract, \Closure $closure)
| getLogPrefix ()
| setLogPrefix (string $prefix)
| getExtenders (string $abstract)
| isAlias (string $name)
| dropStaleInstances (string $abstract)
| getClosure (string $abstract, string $concrete)
| getLastParameterOverride ()
| notInstantiable (string $concrete, string $reason='')
| resolveDependencies (array $dependencies)
| hasParameterOverride (\ReflectionParameter $parameter)
| getParameterOverride (\ReflectionParameter $parameter)
| hasParameterTypeOverride (\ReflectionParameter $parameter)
| getParameterTypeOverride (\ReflectionParameter $parameter)
| resolvePrimitive (\ReflectionParameter $parameter)
| resolveClass (\ReflectionParameter $parameter)
| getConcrete (string $abstract)
| isBuildable (mixed $concrete, string $abstract)
| isShared (string $abstract)
| shouldLog ()
| log (string $message)

## 变量

trait | ContainerTrait
array | $build_stack = []
array | $with = []
string | $log_prefix