Skip to content

Instantly share code, notes, and snippets.

@develop7
Created January 26, 2010 14:40
Show Gist options
  • Save develop7/286880 to your computer and use it in GitHub Desktop.
Save develop7/286880 to your computer and use it in GitHub Desktop.
<?php
class Model extends BaseModel
{
public function getPrice($format = null)
{
return is_null($format)?$this->_get('price'):sprintf($format, $this->_get('price'));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment