LdapTools\Event\EventDispatcherInterface::dispatch PHP Метод

dispatch() публичный Метод

Dispatch an event.
public dispatch ( LdapTools\Event\EventInterface $event )
$event LdapTools\Event\EventInterface
    public function dispatch(EventInterface $event);

Usage Example

 /**
  * Get the LdapObjectSchema for a specific schema name and object type.
  *
  * @param string $schemaName
  * @param string $objectType
  * @return LdapObjectSchema
  */
 public function get($schemaName, $objectType)
 {
     $cacheItem = $schemaName . '.' . $objectType;
     if ($this->shouldBuildCacheItem($schemaName, $cacheItem)) {
         $ldapObjectSchema = $this->parser->parse($schemaName, $objectType);
         $this->dispatcher->dispatch(new LdapObjectSchemaEvent(Event::LDAP_SCHEMA_LOAD, $ldapObjectSchema));
         $this->cache->set($ldapObjectSchema);
     } else {
         $ldapObjectSchema = $this->cache->get(LdapObjectSchema::getCacheType(), $cacheItem);
     }
     return $ldapObjectSchema;
 }
All Usage Examples Of LdapTools\Event\EventDispatcherInterface::dispatch