2017 © Pedro Peláez
 

library orm

Rey Bitrix ORM

image

rey/orm

Rey Bitrix ORM

  • Monday, June 23, 2014
  • by olegator8800
  • Repository
  • 3 Watchers
  • 2 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

README

What is ReyOrm?

The experimental version ORM for Bitrix., (*1)

Build Status, (*2)

Installation

via composer:, (*3)

$ php composer.phar require rey/orm dev-master

in your code add:, (*4)

``` php require_once DIR . '/vendor/autoload.php';, (*5)



Example ------------ Examples of work with ReyOrm (alfa version): Сode class repository for news: ``` 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; } }

User repository can structure business logic in classes., (*6)

``` php $config = new Rey\Orm\Configuration();, (*7)

$config->setCacheDir(DIR . '/cache/orm'); $config->setRepositoryClass('News', 'NewsRepository');, (*8)

$em = new Rey\Orm\EntityManager($config);, (*9)

$newsRepository = $em->getRepository('News'); $newsList = $newsRepository->getAllNews();, (*10)

while($newsItem = $newsList->Fetch()) { echo $newsItem['Title'] . '</ br>'; } ```, (*11)

When calling $em->getRepository('News') will be searched for the information block code News. If you have not set user repository for an News entity is returned instance Rey\Orm\Repository\BaseRepository., (*12)

Run tests

You can run the unit tests with the following command:, (*13)

$ cd path/to/rey/orm/
$ composer.phar install
$ phpunit

The Versions

23/06 2014

0.5.x-dev

0.5.9999999.9999999-dev https://github.com/Olegator8800/ReyOrm

Rey Bitrix ORM

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Oleg Filimoshin

orm bitrix

23/06 2014

dev-master

9999999-dev https://github.com/Olegator8800/ReyOrm

Rey Bitrix ORM

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Oleg Filimoshin

orm bitrix

23/06 2014

v0.4.0

0.4.0.0 https://github.com/Olegator8800/ReyOrm

Rey Bitrix ORM

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Oleg Filimoshin

orm bitrix