desbiger/arresult-decorator

decorator

Installs: 9

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/desbiger/arresult-decorator

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

This package is auto-updated.

Last update: 2025-10-16 03:03:52 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;