PHP code example of jose_martins / generic-dao

1. Go to this page and download the library: Download jose_martins/generic-dao 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/ */

    

jose_martins / generic-dao example snippets



//importando a classe de configuração
use Jose\GenericDao\DBConfig;

DBConfig::setConfigFile(__DIR__ . 'DBConfig.json');


//importando a classe principal
use Jose\GenericDao\GenericDao;

$tableDao = new GenericDao('myTable');


//importando a classe principal
use Jose\GenericDao\GenericDao;

$tableDao = new GenericDao('myTable', 'myCustomPK', true);