PHP code example of snicco / better-wpdb-bundle

1. Go to this page and download the library: Download snicco/better-wpdb-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

snicco / better-wpdb-bundle example snippets



// /path/to/configuration/bundles.php

use Snicco\Bundle\BetterWPDB\BetterWPDBBundle;

return [
    
    'bundles' => [
        Snicco\Component\Kernel\ValueObject\Environment::ALL => [
            BetterWPDBBundle::class
        ]   
    ]   
];


use Snicco\Component\BetterWPDB\BetterWPDB;
use Snicco\Component\Kernel\Kernel;

/**
* @var Kernel $kernel
*/
$kernel->boot();

$better_wpdb = $kernel->container()->make(BetterWPDB::class);