public static function getEntity($associatedObj = null)
    {
        $EntityClass = get_called_class();
        $entityClassRef = new $EntityClass();
        $ActualEntity = ModelEntity::generateClassPath($entityClassRef->getShortName());

        $entityRef = class_exists($ActualEntity) ? new $ActualEntity() : new ModelEntity();
        $entityRef->bindToObject($associatedObj);
        return $entityRef;
    }
public static function getEntity($associatedObj = null)
    {
        $EntityClass = get_called_class();
        $entityClassRef = new $EntityClass();
        $ActualEntity = ModelEntity::generateClassPath($entityClassRef->getShortName());

        $entityRef = class_exists($ActualEntity) ? new $ActualEntity() : new ModelEntity();
        $entityRef->bindToObject($associatedObj);
        return $entityRef;
    }
public static function getEntity ( $ associatedObj = null ) { $ EntityClass = get_called_class ( ) ; $ entityClassRef = new $ EntityClass ( ) ; $ ActualEntity = ModelEntity :: generateClassPath ( $ entityClassRef -> getShortName ( ) ) ; $ entityRef = class_exists ( $ ActualEntity ) ? new $ ActualEntity ( ) : new ModelEntity ( ) ; $ entityRef -> bindToObject ( $ associatedObj ) ; return $ entityRef ; }
Returns a ModelEntity related to this object.
@var mixed (Optional) Usually a WP_Post object, but can also be anything inheriting stdClass
@return ModelEntity
Returns a ModelEntity related to this object .