PHP code example of mrmadclown / mnemosyne
1. Go to this page and download the library: Download mrmadclown/mnemosyne 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/ */
mrmadclown / mnemosyne example snippets
use \PDO;
$pdo = new \PDO();
$builder = new \MrMadClown\Mnemosyne\Builder($pdo);
...
$builder->select('*')->from('users')->where('id', 1);
#User.php
class User {
public int $id;
public string $name;
}
$builder->setClassName(User::class)->fetchAll(); // returns an array of Users