function getAssets ($i) { $anim = new Animation ($i); foreach ($anim->getAssets () as $asset) { echo $asset->name; } }