desbiger/arresult-decorator

dev-master 2018-03-29 12:06 UTC

This package is auto-updated.

Last update: 2025-01-16 01:08:13 UTC


README

Пример использования

Обращение к ключам массива как к полям объекта

<?
$arResult = new \Icewood\Nedvijimost\arResultDecorator($arResult);

echo $arResult->NAME; 

Мутаторы. Определение кастумных полей на основании массива arResult

<?

class MyDecorator extends \Icewood\Nedvijimost\ArResultObject{
    
    function getCustomField(){
        return $this->NAME . ' - название элемента';
    }
}

$arResult = new MyDecorator($arResult);

echo $arResult->Custom;