Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 247 Bytes

PropertyAccessor.md

File metadata and controls

16 lines (11 loc) · 247 Bytes

PropertyAccessor

<?php

use Chubbyphp\Serialization\Accessor\PropertyAccessor;
use MyProject\Model;

$object = new Model;
$object->name = 'php';

$accessor = new PropertyAccessor('name');

echo $accessor->getValue($object);
// 'php'