public function createInstance()
    {
        $classname = $this->getPlatformClassname();

        if (!class_exists($classname)) {
            throw new \Exception(
                sprintf('Unable to locate class %s', $classname)
            );
        }

        return new $classname();
    }
public function createInstance()
    {
        $classname = $this->getPlatformClassname();

        if (!class_exists($classname)) {
            throw new \Exception(
                sprintf('Unable to locate class %s', $classname)
            );
        }

        return new $classname();
    }
public function createInstance ( ) { $ classname = $ this -> getPlatformClassname ( ) ; if ( ! class_exists ( $ classname ) ) { throw new \ Exception ( sprintf ( 'Unable to locate class %s' , $ classname ) ) ; } return new $ classname ( ) ; }
Create a class instance.

@return object.
@throws \Exception
Create a class instance .