Skip to content

Instantly share code, notes, and snippets.

@saulopaiva
Created February 5, 2014 13:03
Show Gist options
  • Save saulopaiva/8823165 to your computer and use it in GitHub Desktop.
Save saulopaiva/8823165 to your computer and use it in GitHub Desktop.
Snippet para fazer Override do get() de propriedades do \Orm\Model (FuelPHP), para verificar a existencia sufixo em propriedade
<?php
public function & get($property, array $conditions = array())
{
if (array_key_exists($property . '_en', static::properties())) {
return parent::get($property . '_en', $conditions);
} else {
return parent::get($property, $conditions);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment