1
0
mirror of synced 2025-01-18 14:31:40 +03:00
doctrine2/manual/codes/Basic Components - Record - Accessing properties.php

22 lines
320 B
PHP
Raw Normal View History

2006-07-23 21:08:06 +00:00
<?php
$user = $table->find(3);
// access property through overloading
$name = $user->name;
// access property with get()
$name = $user->get("name");
// access property with ArrayAccess interface
$name = $user['name'];
// iterating through properties
foreach($user as $key => $value) {
}
?>