Bundle/BusinessEntityBundle/Helper/BusinessEntityHelper.php
public function findByEntityInstance($entity)
    {
        $businessEntity = null;
        $class = new \ReflectionClass($entity);
        while (!$businessEntity && $class && $class->name !== null) {
            $businessEntity = $this->findByEntityClassname($class->name);
            $class = $class->getParentClass();
        }

        return $businessEntity;
    }
public function findByEntityInstance($entity)
    {
        $businessEntity = null;
        $class = new \ReflectionClass($entity);
        while (!$businessEntity && $class && $class->name !== null) {
            $businessEntity = $this->findByEntityClassname($class->name);
            $class = $class->getParentClass();
        }

        return $businessEntity;
    }
public function findByEntityInstance ( $ entity ) { $ businessEntity = null ; $ class = new \ ReflectionClass ( $ entity ) ; while ( ! $ businessEntity && $ class && $ class -> name !== null ) { $ businessEntity = $ this -> findByEntityClassname ( $ class -> name ) ; $ class = $ class -> getParentClass ( ) ; } return $ businessEntity ; }
Get a business entity.

@param object $entity

@return BusinessEntity
Get a business entity .