Created
May 22, 2012 18:56
-
-
Save mikeemoo/2770947 to your computer and use it in GitHub Desktop.
Lowpress boot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Lowpress\WordpressBundle; | |
use Symfony\Component\HttpKernel\Bundle\Bundle; | |
class LowpressWordpressBundle extends Bundle | |
{ | |
public function boot() | |
{ | |
$docroot = $this->container->getParameter('kernel.root_dir').'/../web/'; | |
$doctrine = $this->container->get('doctrine'); | |
$conn = $doctrine->getConnection($doctrine->getDefaultConnectionName()); | |
define('DB_NAME', $conn->getDatabase()); | |
define('DB_USER', $conn->getUsername()); | |
define('DB_PASSWORD', $conn->getPassword()); | |
define('DB_HOST', $conn->getHost()); | |
define('DB_CHARSET', 'utf8'); | |
define('DB_COLLATE', ''); | |
define('WP_USE_THEMES', false); | |
require_once($docroot.'wp-load.php'); | |
parent::boot(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment