src/Liip/Drupal/Modules/Registry/Dispatcher.php
public function attach(Registry $registry, $id = '')
    {
        if (!empty($id) || 0 === $id) {

            if (!empty($this->registries[$id])) {

                throw new RegistryException(
                    RegistryException::DUPLICATE_REGISTRATION_ATTEMPT_TEXT,
                    RegistryException::DUPLICATE_REGISTRATION_ATTEMPT_CODE
                );
            }

            $this->registries[$id] = $registry;

        } else {

            $this->registries[] = $registry;
        }
    }
public function attach(Registry $registry, $id = '')
    {
        if (!empty($id) || 0 === $id) {

            if (!empty($this->registries[$id])) {

                throw new RegistryException(
                    RegistryException::DUPLICATE_REGISTRATION_ATTEMPT_TEXT,
                    RegistryException::DUPLICATE_REGISTRATION_ATTEMPT_CODE
                );
            }

            $this->registries[$id] = $registry;

        } else {

            $this->registries[] = $registry;
        }
    }
public function attach ( Registry $ registry , $ id = '' ) { if ( ! empty ( $ id ) || 0 === $ id ) { if ( ! empty ( $ this -> registries [ $ id ] ) ) { throw new RegistryException ( RegistryException :: DUPLICATE_REGISTRATION_ATTEMPT_TEXT , RegistryException :: DUPLICATE_REGISTRATION_ATTEMPT_CODE ) ; } $ this -> registries [ $ id ] = $ registry ; } else { $ this -> registries [ ] = $ registry ; } }
Adds the provided registry to the dispatcher queue.

@param Registry $registry
@param string $id

@throws RegistryException
Adds the provided registry to the dispatcher queue .