WordPress DB config on the EkinoWordPressBundle for Symfony2?

Maybe is a bad question but I became very curious about how do this SF2 bundle connects to the wordpress database from the Symfony side? There is not required a database connection on a parameters.yml file? It sounds like a dummy question, but came curious how is the connection to the wordpress database done to manage posts and everything else, Because I didn’t see any explanation on the readme at github https://github.com/ekino/EkinoWordpressBundle

Related posts

Leave a Reply

2 comments

  1. I’m the creator of the EkinoWordpressBundle.

    Indeed, you have to set up your parameters.yml file in order to configure a Doctrine database connection in your Symfony application, as it is described here: http://symfony.com/doc/current/book/doctrine.html#configuring-the-database

    This way, you will be able to use the Doctrine managers available in the EkinoWordpressBundle, for instance, to retrieve all blog posts in a controller:

    $posts = $this->get('ekino.wordpress.manager.post')->findAll();
    

    Hope it helps.

  2. I do not know this Bundle, but I think, you have to configure the wordpress database in your parameters.yml as your primary database. Because I do not find any source code, getting the wordpress config.php or calling WordPress API.