call init method

@access  private
@param   object  $instance
164090
private function callInitMethod($instance)
    {
        $args = [];
        foreach ($this->init_method_args as $arg) {
            if (is_string($arg) && preg_match('/^\$([\w_]+)$/', $arg, $matches)) {
                $arg = $this->container->get($matches[1]);
            }
            $args[] = $arg;
        }
        call_user_func_array(array($instance, $this->init_method_name), $args);
    }
870846
public function initialize($instance, ServiceLocatorInterface $serviceLocator)
    {
        if ($instance instanceof HandlesSystemConfigChanges) {
            $instance->setEventBus($serviceLocator->get('proophessor.event_bus'));
            $instance->setConfigWriter($serviceLocator->get('prooph.link.system_config.config_writer'));
        }
    }
903972
private function callMethod($instance, $method)
    {
        if (!method_exists($instance, $method) || !is_callable([$instance, $method])) {
            return false;
        }

        return call_user_func([$instance, $method]);
    }
659522
static function init()
  {
    if (self::$initialized) return;

    self::$initialized = TRUE;

    self::$COFFEE_KEYWORDS  = array_merge(self::$COFFEE_KEYWORDS, array_keys(self::$COFFEE_ALIASES));
    self::$COFFEE_RESERVED  = array_merge(self::$JS_RESERVED, self::$JS_KEYWORDS, self::$COFFEE_KEYWORDS, self::$STRICT_PROSCRIBED);
    self::$JS_FORBIDDEN     = array_merge(self::$JS_KEYWORDS, self::$JS_RESERVED, self::$STRICT_PROSCRIBED);
    self::$INDEXABLE        = array_merge(self::$CALLABLE, self::$INDEXABLE);
    self::$NOT_SPACED_REGEX = array_merge(self::$NOT_REGEX, self::$NOT_SPACED_REGEX);

    Rewriter::init();

    self::$INVERSES         = Rewriter::$INVERSES;
  }
277296
public function initBridge($instance)
    {
        $this->setInstance($instance);
        $this->config = $this->configure();
        $this->bridge = new ElFinderBridge($this->config);
        if ($this->session) {
            $this->bridge->setSession($this->session);
        }
    }
732909
function initialize()
	{
		$a = func_get_args();
		Debugger::log(__CLASS__ . ": " . __METHOD__ . "; args: " . print_r($a, true));
	}
697477
public function prepare(&$instance)
    {
        $requirements = $this->getDiRequirements(get_class($instance));

        foreach ($requirements as $propertyName => $property) {

            $dependencyIdentifier = $property['identifier'];
            $dependency = $this->container[$dependencyIdentifier];

            if (!isset($this->container[$dependencyIdentifier])) {
                throw new \InvalidArgumentException("Unable to resolve dependency $dependencyIdentifier for injection");
            }

            if ($property['isPublic']) {
                // If its public, just set it!
                $instance->$propertyName = $dependency;
            } else {
                if ($property['setter']) {
                    // If there is a setter method, use that
                    call_user_func($instance, $property['setter'], $dependency);
                } else {
                    // Otherwise set by brute force
                    $refl = new \ReflectionClass($instance);
                    $prop = $refl->getProperty($propertyName);
                    $prop->setAccessible(true);
                    $prop->setValue($instance, $this->container[$dependencyIdentifier]);
                    $prop->setAccessible(false);
                }
            }

        }

    }
1052911
public function initialize($instance, ServiceLocatorInterface $serviceLocator)
    {
        if ($instance instanceof EventManagerAwareInterface)
            if ($instance->getEventManager() instanceof EventManagerInterface) {
                $instance->getEventManager()->setSharedManager(
                    $serviceLocator->get('SharedEventManager')
                );
            } else {
                $instance->setEventManager($serviceLocator->get('EventManager'));
            }

        if ($instance instanceof ServiceManagerAwareInterface)
            $instance->setServiceManager($serviceLocator);

        if ($instance instanceof ServiceLocatorAwareInterface)
            $instance->setServiceLocator($serviceLocator);
    }
1334691
private static function initInstance(): Instance
    {
        $instance = new Instance();
        $instance->setOptions(Config::get('translator'));
        $instance->init();
        return $instance;
    }
46268
public function setInstance(Instance $instance)
    {
        $this->instance = $instance;
        $this->exception = null;
        $this->connect();
        
        return $this;
    }
579772
public function initialize($instance, ServiceLocatorInterface $serviceLocator)
	{
        if ($instance instanceof CurrencyExchangerAwareInterface) {
            if ($serviceLocator instanceof AbstractPluginManager) {
            	$serviceLocator = $serviceLocator->getServiceLocator();
            }

            $exchanger = $serviceLocator->get(CurrencyExchangerInterface::class);
            $instance->setCurrencyExchanger($exchanger);
        }
	}
723752
function init($what='')
    {
        if($what=='')
        {
            $this->table='';
            $this->primary='id';
            $this->select='*';
            $this->sql='';
            $this->limit='';
            $this->where='';
            $this->order='';
            $this->group='';
            $this->use_index='';
            $this->join='';
            $this->union='';
        }
        else
        $this->$what = '';
    }
38580
public function init($file)
	{
		try {
			
			$this->load($file);

		} catch (Exceptions\FileNotExists $e) {

			$this->create($file);
		}
	}
991588
protected function invokeMethods($instance)
    {
        foreach ($this->methods as $method) {
            $args = $this->resolveArguments($method['arguments']);
            call_user_func_array([$instance, $method['method']], $args);
        }

        return $instance;
    }
131283
public static function initCacheInstanceValidators($instance, $group = "") {
		$class = get_class ( $instance );
		$members = self::fetch ( $class );
		self::initInstancesValidators ( $instance, $members, $group );
	}
1238877
protected function init() {
        $this->context = \context_system::instance();
        $this->data['crud'] = 'u';
        $this->data['edulevel'] = self::LEVEL_OTHER;
        $this->data['objecttable'] = 'external_services';
    }
193047
private function _init()
    {
        // TODO: check if self::$instance is required here or if we can only set
        // decorated object

        // initialize and store the instance of template engine for further access
        self::$instance = Doozr_Loader_Serviceloader::load($this->library, $this->resource);

        // set this instance as decorated object of our generic Facade and
        // so we can access all the base methods of any lib easily!
        $this->setDecoratedObject(self::$instance);
    }