Extension/Theme/Model/DependencyInitializer.php
public function initialize($object)
    {
        if (!is_object($object)) {
            return;
        }

        foreach ($this->knownDependencies as $interface => $dependencyInfo) {
            list($setterMethod, $serviceId) = $dependencyInfo;

            if (is_a($object, $interface)) {
                $object->$setterMethod($this->container->get($serviceId));
            }
        }
    }
public function initialize($object)
    {
        if (!is_object($object)) {
            return;
        }

        foreach ($this->knownDependencies as $interface => $dependencyInfo) {
            list($setterMethod, $serviceId) = $dependencyInfo;

            if (is_a($object, $interface)) {
                $object->$setterMethod($this->container->get($serviceId));
            }
        }
    }
public function initialize ( $ object ) { if ( ! is_object ( $ object ) ) { return ; } foreach ( $ this -> knownDependencies as $ interface => $ dependencyInfo ) { list ( $ setterMethod , $ serviceId ) = $ dependencyInfo ; if ( is_a ( $ object , $ interface ) ) { $ object -> $ setterMethod ( $ this -> container -> get ( $ serviceId ) ) ; } } }
Initializes object dependencies

@param object $object
Initializes object dependencies