1. Go to this page and download the library: Download rey/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/ */
rey / orm example snippets
php
php
use Rey\Orm\Repository\BaseRepository;
use CIBlockElement;
class NewsRepository extends BaseRepository
{
public function getAllNews()
{
$r = CIBlockElement::getList(array(), array('IBLOCK_ID' => $this->getMetadata()->get('iblock_id')));
return $r;
}
}