1. Go to this page and download the library: Download dimaxz/simpleorm 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/ */
use SimpleORM\Specification;
$SearchCriteria = (new Specification())->setWhere('tablename',$tablename);
$Price = $this->PriceMapper->findBySpecification($SearchCriteria);
$UserGroup = new UserGroup('admin','администратор');
$User = new User('master','[email protected]', '65829e542dd151f443',$UserGroup);
$User->setName('Тестовый пользюк 2');
$City = new City('Москва');
$Address = new UserAddress($City,'610110','Чернышевского');
$User->setAddress($Address);
if($UserMapper->save($User)){
echo 'save success';
}