Sections

Abstract class Phalcon\Di\Injectable

implements Phalcon\Di\InjectionAwareInterface, Phalcon\Events\EventsAwareInterface

源码在GitHub

This class allows to access services in the services container by just only accessing a public property with the same name of a registered service

方法

public setDI (Phalcon\DiInterface $dependencyInjector)

Sets the dependency injector

public getDI ()

Returns the internal dependency injector

public setEventsManager (Phalcon\Events\ManagerInterface $eventsManager)

Sets the event manager

public getEventsManager ()

返回内部事件管理器

public __get (string $propertyName)

Magic method __get to easily get access to services through the name of them