Created
February 6, 2014 16:33
-
-
Save gpfiel/8847768 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* [getParametro tem como finalidade a busca do parametro global ou especifico para uma determinada solicitacao Ex. Paginação qtd de páginas] | |
* essa função está duplicada no arquivo HelperFuncoes.php | |
* @param [type] $param [Nome do parametro Ex. Paginação] | |
* @return [type] [retornará Parametro ou false] | |
*/ | |
public function getParametro($param) | |
{ | |
$autenticacao = new AuthenticationService(); | |
$padrao = null; | |
foreach ($autenticacao->getIdentity()->parametros as $paramTmp) { | |
if ($param == $paramTmp->getNome() and is_null($paramTmp->getUsuario())) { | |
$padrao = $paramTmp; | |
} | |
if ($param == $paramTmp->getNome() and !is_null($paramTmp->getUsuario())) { | |
return $paramTmp; | |
} | |
} | |
return (is_null($padrao) ? falase : $padrao); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment