Skip to content

Instantly share code, notes, and snippets.

@cirpo
Forked from odino/gist:549438
Created August 25, 2010 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cirpo/549466 to your computer and use it in GitHub Desktop.
Save cirpo/549466 to your computer and use it in GitHub Desktop.
<?php
class Pippo{
private _$asset = null;
public function getAsset()
{
if(null === $this->asset)
$this->asset = Doctrine::gettable('Asset')->find($this->thumbnail_id);
return $this->asset;
}
public function getSarcazzi()
{
if(null !== $this->getAsset()) $this->getAsset()->getId();
[...]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment