public function getConfiguredPlatform(PDO $con = null, $database = null)
    {
        $buildConnection = $this->getBuildConnection($database);
        //First try to load platform from the user provided build properties
        if ($this->getBuildProperty('platformClass')) {
            // propel.platform.class = platform.${propel.database}Platform by default
            $clazz = $this->getClassname('platformClass');
        } elseif (null !== $buildConnection['adapter']) {
            $clazz = Phing::import('platform.' . ucfirst($buildConnection['adapter']) . 'Platform');
        } else {
            return null;
        }
        $platform = new $clazz();

        if (!$platform instanceof PropelPlatformInterface) {
            throw new BuildException("Specified platform class ($clazz) does not implement teh PropelPlatformInterface interface.");
        }

        if ($this->getBuildProperty('disableIdentifierQuoting')) {
            $platform->setIdentifierQuoting(false);
        } else {
            $platform->setIdentifierQuoting(true);
        }
        $platform->setConnection($con);
        $platform->setGeneratorConfig($this);

        return $platform;
    }
public function getConfiguredPlatform(PDO $con = null, $database = null)
    {
        $buildConnection = $this->getBuildConnection($database);
        //First try to load platform from the user provided build properties
        if ($this->getBuildProperty('platformClass')) {
            // propel.platform.class = platform.${propel.database}Platform by default
            $clazz = $this->getClassname('platformClass');
        } elseif (null !== $buildConnection['adapter']) {
            $clazz = Phing::import('platform.' . ucfirst($buildConnection['adapter']) . 'Platform');
        } else {
            return null;
        }
        $platform = new $clazz();

        if (!$platform instanceof PropelPlatformInterface) {
            throw new BuildException("Specified platform class ($clazz) does not implement teh PropelPlatformInterface interface.");
        }

        if ($this->getBuildProperty('disableIdentifierQuoting')) {
            $platform->setIdentifierQuoting(false);
        } else {
            $platform->setIdentifierQuoting(true);
        }
        $platform->setConnection($con);
        $platform->setGeneratorConfig($this);

        return $platform;
    }
public function getConfiguredPlatform ( PDO $ con = null , $ database = null ) { $ buildConnection = $ this -> getBuildConnection ( $ database ) ; //First try to load platform from the user provided build properties if ( $ this -> getBuildProperty ( 'platformClass' ) ) { // propel.platform.class = platform.${propel.database}Platform by default $ clazz = $ this -> getClassname ( 'platformClass' ) ; } elseif ( null !== $ buildConnection [ 'adapter' ] ) { $ clazz = Phing :: import ( 'platform.' . ucfirst ( $ buildConnection [ 'adapter' ] ) . 'Platform' ) ; } else { return null ; } $ platform = new $ clazz ( ) ; if ( ! $ platform instanceof PropelPlatformInterface ) { throw new BuildException ( "Specified platform class ($clazz) does not implement teh PropelPlatformInterface interface." ) ; } if ( $ this -> getBuildProperty ( 'disableIdentifierQuoting' ) ) { $ platform -> setIdentifierQuoting ( false ) ; } else { $ platform -> setIdentifierQuoting ( true ) ; } $ platform -> setConnection ( $ con ) ; $ platform -> setGeneratorConfig ( $ this ) ; return $ platform ; }
Creates and configures a new Platform class.

@param PDO $con

@return Platform
@throws BuildException
Creates and configures a new Platform class .