PHP code example of thomas-squall / efxphp

1. Go to this page and download the library: Download thomas-squall/efxphp 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/ */

    

thomas-squall / efxphp example snippets

 php
$db->registerModel(new person());
 php
$items = $adapter->find('people');
 php
use MongDriver\Filter;

$filters =
[
    new Filter('age', 29, Filter::IS_EQUALS),
    new Filter('nationality', ['italian', 'spanish'], Filters::IS_IN_ARRAY)
];

$items = $adapter->find('people', $filters);
 php
$item = new Person();
$item->name = 'Thomas';
$item->surname = 'Cocchiara');

$adapter->insert($item);