private function formatEventName($event_name, $entity)
    {
        if (is_object($entity)) {
            $event_name = strtolower(str_replace(NAMESPACE_SEPARATOR, '.', get_class($entity)).'.'.$event_name);

            if ($entity instanceof \Doctrine\ORM\Proxy\Proxy) {
                $prefix = str_replace(
                    NAMESPACE_SEPARATOR,
                    '.',
                    $this->application->getEntityManager()->getConfiguration()->getProxyNamespace()
                );
                $prefix .= '.'.$entity::MARKER.'.';

                $event_name = str_replace(strtolower($prefix), '', $event_name);
            }
        } else {
            $event_name = strtolower(str_replace(NAMESPACE_SEPARATOR, '.', $entity).'.'.$event_name);
        }

        $event_name = str_replace(array('backbee.', 'classcontent.'), array('', ''), $event_name);

        return $event_name;
    }
private function formatEventName($event_name, $entity)
    {
        if (is_object($entity)) {
            $event_name = strtolower(str_replace(NAMESPACE_SEPARATOR, '.', get_class($entity)).'.'.$event_name);

            if ($entity instanceof \Doctrine\ORM\Proxy\Proxy) {
                $prefix = str_replace(
                    NAMESPACE_SEPARATOR,
                    '.',
                    $this->application->getEntityManager()->getConfiguration()->getProxyNamespace()
                );
                $prefix .= '.'.$entity::MARKER.'.';

                $event_name = str_replace(strtolower($prefix), '', $event_name);
            }
        } else {
            $event_name = strtolower(str_replace(NAMESPACE_SEPARATOR, '.', $entity).'.'.$event_name);
        }

        $event_name = str_replace(array('backbee.', 'classcontent.'), array('', ''), $event_name);

        return $event_name;
    }
private function formatEventName ( $ event_name , $ entity ) { if ( is_object ( $ entity ) ) { $ event_name = strtolower ( str_replace ( NAMESPACE_SEPARATOR , '.' , get_class ( $ entity ) ) . '.' . $ event_name ) ; if ( $ entity instanceof \ Doctrine \ ORM \ Proxy \ Proxy ) { $ prefix = str_replace ( NAMESPACE_SEPARATOR , '.' , $ this -> application -> getEntityManager ( ) -> getConfiguration ( ) -> getProxyNamespace ( ) ) ; $ prefix .= '.' . $ entity :: MARKER . '.' ; $ event_name = str_replace ( strtolower ( $ prefix ) , '' , $ event_name ) ; } } else { $ event_name = strtolower ( str_replace ( NAMESPACE_SEPARATOR , '.' , $ entity ) . '.' . $ event_name ) ; } $ event_name = str_replace ( array ( 'backbee.' , 'classcontent.' ) , array ( '' , '' ) , $ event_name ) ; return $ event_name ; }
Format the name of an event.

@param string $event_name
@param object $entity

@return string the formated event name
Format the name of an event .