PHP code example of matryoshka-model / matryoshka
1. Go to this page and download the library: Download matryoshka-model/matryoshka 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/ */
matryoshka-model / matryoshka example snippets
//Assiming MyModel an instance of a Matryoshka Model class registered in Matryoshka model manager
$myModel = $modelManager->get('MyModel');
//Assuming MyCriteria a class extending ReadableCriteriaInterface
$criteria = new MyCriteria();
$criteria->setMyCustomFilter('foo');
//Execute a query
$resultSet = $myModel->find($criteria);