PHP code example of nomess / orm
1. Go to this page and download the library: Download nomess/orm 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/ */
nomess / orm example snippets
use Nomess\Component\Orm\EntityManagerInterface;
$entityManager = new EntityManager(...)
// On select all
$samples = $entityManager->find(Sample::class);
// Select one
$sample = $entityManager->find(Sample::class, 1);
// Select with Sql
$samples = $entityManager->find(Sample::class, 'username = :username', [
'username' => 'nomess'
]);