Overview

Namespaces

  • Syringe
    • Exceptions

Classes

  • Container
  • Resolver
  • Overview
  • Namespace
  • Class

Class Container

The Container. Used to hold, modify, and retrieve bindings of parameters and services.

Class Container

Syringe\Container implements Interop\Container\ContainerInterface
Namespace: Syringe
Package: Syringe
Located at Container.php
Methods summary
public
# bind( Syringe\string $key, callable|object|mixed $value )

Bind a class or parameter to the container

Bind a class or parameter to the container

Parameters

$key
$value
public
# bindClass( Syringe\string $key, $value )

Bind a class to the container

Bind a class to the container

Parameters

$key
$value
public
# bindInstance( Syringe\string $key, $object )

Bind an object instance to the container

Bind an object instance to the container

Parameters

$key
$object
public
# bindValue( Syringe\string $key, mixed $value )

Bind a primitive value to the cntainer

Bind a primitive value to the cntainer

Parameters

$key
$value
public
# get( $key )

Inheritdoc

public
# has( $key )

Inheritdoc

public
# extend( Syringe\string $key, callable $func )

Modify an already bound value

Modify an already bound value

Parameters

$key
$func
public mixed
# raw( Syringe\string $key )

Retrieve the original raw binding for a bound value (without evaluating)

Retrieve the original raw binding for a bound value (without evaluating)

Parameters

$key

Returns

mixed
Properties summary
protected static array $instanceBindings
#
protected static array $valueBindings
#
protected static array $classBindings
#
protected static array $instances

Shared services which have been instantiated by the container

Shared services which have been instantiated by the container

#
protected static array $extensions
#
API documentation generated by ApiGen