src/Logger/src/Processor/LifeCycleTokenInjector.php
public function process(array $event)
    {
        if (!isset($event[LifeCycleToken::KEY_LIFECYCLE_TOKEN])) {
            $event[LifeCycleToken::KEY_LIFECYCLE_TOKEN] = $this->token->toString();
        } elseif (!isset($event['context'][LifeCycleToken::KEY_ORIGINAL_LIFECYCLE_TOKEN])
            && ($this->token->toString() !== $event[LifeCycleToken::KEY_LIFECYCLE_TOKEN])) {
            $event['context'][LifeCycleToken::KEY_ORIGINAL_LIFECYCLE_TOKEN] = $this->token->toString();
        }
        if ($this->token->hasParentToken()) {
            if (!isset($event[LifeCycleToken::KEY_PARENT_LIFECYCLE_TOKEN])) {
                $event[LifeCycleToken::KEY_PARENT_LIFECYCLE_TOKEN] = $this->token->getParentToken()
                    ->toString();
            } elseif (!isset($event['context'][LifeCycleToken::KEY_ORIGINAL_PARENT_LIFECYCLE_TOKEN])
                && $this->token->getParentToken()
                    ->toString() !== $event[LifeCycleToken::KEY_PARENT_LIFECYCLE_TOKEN]) {
                $event['context'][LifeCycleToken::KEY_ORIGINAL_PARENT_LIFECYCLE_TOKEN] = $this->token->getParentToken()
                    ->toString();
            }
        }

        return $event;
    }
public function process(array $event)
    {
        if (!isset($event[LifeCycleToken::KEY_LIFECYCLE_TOKEN])) {
            $event[LifeCycleToken::KEY_LIFECYCLE_TOKEN] = $this->token->toString();
        } elseif (!isset($event['context'][LifeCycleToken::KEY_ORIGINAL_LIFECYCLE_TOKEN])
            && ($this->token->toString() !== $event[LifeCycleToken::KEY_LIFECYCLE_TOKEN])) {
            $event['context'][LifeCycleToken::KEY_ORIGINAL_LIFECYCLE_TOKEN] = $this->token->toString();
        }
        if ($this->token->hasParentToken()) {
            if (!isset($event[LifeCycleToken::KEY_PARENT_LIFECYCLE_TOKEN])) {
                $event[LifeCycleToken::KEY_PARENT_LIFECYCLE_TOKEN] = $this->token->getParentToken()
                    ->toString();
            } elseif (!isset($event['context'][LifeCycleToken::KEY_ORIGINAL_PARENT_LIFECYCLE_TOKEN])
                && $this->token->getParentToken()
                    ->toString() !== $event[LifeCycleToken::KEY_PARENT_LIFECYCLE_TOKEN]) {
                $event['context'][LifeCycleToken::KEY_ORIGINAL_PARENT_LIFECYCLE_TOKEN] = $this->token->getParentToken()
                    ->toString();
            }
        }

        return $event;
    }
public function process ( array $ event ) { if ( ! isset ( $ event [ LifeCycleToken :: KEY_LIFECYCLE_TOKEN ] ) ) { $ event [ LifeCycleToken :: KEY_LIFECYCLE_TOKEN ] = $ this -> token -> toString ( ) ; } elseif ( ! isset ( $ event [ 'context' ] [ LifeCycleToken :: KEY_ORIGINAL_LIFECYCLE_TOKEN ] ) && ( $ this -> token -> toString ( ) !== $ event [ LifeCycleToken :: KEY_LIFECYCLE_TOKEN ] ) ) { $ event [ 'context' ] [ LifeCycleToken :: KEY_ORIGINAL_LIFECYCLE_TOKEN ] = $ this -> token -> toString ( ) ; } if ( $ this -> token -> hasParentToken ( ) ) { if ( ! isset ( $ event [ LifeCycleToken :: KEY_PARENT_LIFECYCLE_TOKEN ] ) ) { $ event [ LifeCycleToken :: KEY_PARENT_LIFECYCLE_TOKEN ] = $ this -> token -> getParentToken ( ) -> toString ( ) ; } elseif ( ! isset ( $ event [ 'context' ] [ LifeCycleToken :: KEY_ORIGINAL_PARENT_LIFECYCLE_TOKEN ] ) && $ this -> token -> getParentToken ( ) -> toString ( ) !== $ event [ LifeCycleToken :: KEY_PARENT_LIFECYCLE_TOKEN ] ) { $ event [ 'context' ] [ LifeCycleToken :: KEY_ORIGINAL_PARENT_LIFECYCLE_TOKEN ] = $ this -> token -> getParentToken ( ) -> toString ( ) ; } } return $ event ; }
Processes a log message before it is given to the writers

@param  array $event
@return array
Processes a log message before it is given to the writers