Bundle/BusinessEntityBundle/Helper/BusinessEntityHelper.php
public static function createBusinessEntity($className, array $businessProperties)
    {
        $businessEntity = new BusinessEntity();

        $classNameArray = explode('\\', $className);
        $entityName = array_pop($classNameArray);
        $businessEntity->setId(strtolower($entityName));
        $businessEntity->setName($entityName);
        $businessEntity->setClass($className);

        //parse the array of the annotation reader
        foreach ($businessProperties as $type => $properties) {
            foreach ($properties as $property) {
                $businessProperty = new BusinessProperty();
                $businessProperty->setType($type);
                $businessProperty->setEntityProperty($property);

                //add the business property to the business entity object
                $businessEntity->addBusinessProperty($businessProperty);
                unset($businessProperty);
            }
        }

        return $businessEntity;
    }
public static function createBusinessEntity($className, array $businessProperties)
    {
        $businessEntity = new BusinessEntity();

        $classNameArray = explode('\\', $className);
        $entityName = array_pop($classNameArray);
        $businessEntity->setId(strtolower($entityName));
        $businessEntity->setName($entityName);
        $businessEntity->setClass($className);

        //parse the array of the annotation reader
        foreach ($businessProperties as $type => $properties) {
            foreach ($properties as $property) {
                $businessProperty = new BusinessProperty();
                $businessProperty->setType($type);
                $businessProperty->setEntityProperty($property);

                //add the business property to the business entity object
                $businessEntity->addBusinessProperty($businessProperty);
                unset($businessProperty);
            }
        }

        return $businessEntity;
    }
public static function createBusinessEntity ( $ className , array $ businessProperties ) { $ businessEntity = new BusinessEntity ( ) ; $ classNameArray = explode ( '\\' , $ className ) ; $ entityName = array_pop ( $ classNameArray ) ; $ businessEntity -> setId ( strtolower ( $ entityName ) ) ; $ businessEntity -> setName ( $ entityName ) ; $ businessEntity -> setClass ( $ className ) ; //parse the array of the annotation reader foreach ( $ businessProperties as $ type => $ properties ) { foreach ( $ properties as $ property ) { $ businessProperty = new BusinessProperty ( ) ; $ businessProperty -> setType ( $ type ) ; $ businessProperty -> setEntityProperty ( $ property ) ; //add the business property to the business entity object $ businessEntity -> addBusinessProperty ( $ businessProperty ) ; unset ( $ businessProperty ) ; } } return $ businessEntity ; }
create a BusinessEntity from an annotation object.

@param string $className
@param array  $businessProperties

@return BusinessEntity
create a BusinessEntity from an annotation object .