ice framework documentation ice doc v1.10.1
Methods
  • setDefaults(variable $defaults) : void
  • __construct(array $data) : void
    Di constructor. Sets root path.
  • Return the last DI created.
  • get(string $key, variable $parameters) : void
    Resolves the service based on its configuration.
  • set(string $key, variable $value) : void
    Registers a service in the services container.
  • getDefaults() : void
    Get default services.
  • resolve(variable $service, string $key) : void
    Resolve service.
  • build(variable $service, variable $parameters) : void
    Build an instance of the given class.
  • getParameters(array $dependencies, array $parameters) : void
    If extra parameters are passed by numeric ID, rekey them by argument name.
  • getDependencies(array $parameters, array $primitives) : void
    Build up a list of dependencies for a given methods parameters.
  • resolveNonClass(variable $parameter) : void
    Determine what to do with a non-class value.
  • errors(string $className) : void
    Set handlers for error, exeception and shutdown.
  • hook(string $name, variable $callback, variable $context, int $priority) : void
    Assign hook.
  • applyHook(string $name, array $args, variable $context) : void
    Invoke hook.
  • getHooks(string $name, variable $context) : array | null
    Get hook listeners.
  • clearHooks(string $name, variable $context) : void
    Clear hook listeners.
  • __call(string $method, variable $arguments) : void
    Magic method to get or set services using setters/getters.
Methods Details
  • public function setDefaults(variable $defaults)

  • public function __construct(array $data)

    Di constructor. Sets root path.
  • public static function fetch()

    Return the last DI created.
  • public function get(string $key, variable $parameters)

    Resolves the service based on its configuration.
  • public function set(string $key, variable $value)

    Registers a service in the services container.
  • public function getDefaults()

    Get default services.
  • public function resolve(variable $service, string $key)

    Resolve service.
  • public function build(variable $service, variable $parameters)

    Build an instance of the given class.
  • protected function getParameters(array $dependencies, array $parameters)

    If extra parameters are passed by numeric ID, rekey them by argument name.
  • public function getDependencies(array $parameters, array $primitives)

    Build up a list of dependencies for a given methods parameters.
  • public function resolveNonClass(variable $parameter)

    Determine what to do with a non-class value.
  • public function errors(string $className)

    Set handlers for error, exeception and shutdown.
    Class should contain method handler, errorHandler and shutdownHandler.
  • public function hook(string $name, variable $callback, variable $context, int $priority)

    Assign hook.
  • public function applyHook(string $name, array $args, variable $context)

    Invoke hook.
  • public function getHooks(string $name, variable $context)

    Get hook listeners.
    Return an array of registered hooks. If `$name` is a valid hook name, only the listeners attached to that hook are returned. Else, all listeners are returned as an associative array whose keys are hook names and whose values are arrays of listeners.
  • public function clearHooks(string $name, variable $context)

    Clear hook listeners.
    Clear all listeners for all hooks. If `$name` is a valid hook name, only the listeners attached to that hook will be cleared.
  • public function __call(string $method, variable $arguments)

    Magic method to get or set services using setters/getters.
  • internal function zephir_init_properties_Ice_Di()