This file contains 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 | |
/** | |
* Função que recebe o nome completo de uma pessoa redunzido as partes do meio - maiores que 3 caracteres- a ponto, ou sem, conforme combinado | |
* | |
* Ex.: JOÃO BELTRANO CICLANO DA SILVA > (com ponto) > JOÃO B. C. DA SILVA | |
* Ex.: JOÃO BELTRANO CICLANO DA SILVA > (sem ponto) > JOÃO B C DA SILVA | |
* Ex.: MARIA ANTONIETA > (sem nomes do meio) > MARIA ANTONIETA) | |
* | |
* @param string $nome Nome completo a ser encurtado. | |
* @param bool $ponto Será usado ponto no encurtamento do nome? Padrão: true |
This file contains 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
Symfony\Component\Debug\Exception\FatalThrowableError: Call to a member function parameter() on array in /webdir/lumen/vendor/illuminate/http/Request.php:540 | |
Stack trace: | |
#0 /webdir/lumen/routes/web.php(20): Illuminate\Http\Request->route('seller_id') | |
#1 [internal function]: Closure->{closure}('1') | |
#2 /webdir/lumen/vendor/illuminate/container/BoundMethod.php(32): call_user_func_array(Object(Closure), Array) | |
#3 /webdir/lumen/vendor/illuminate/container/Util.php(36): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() | |
#4 /webdir/lumen/vendor/illuminate/container/BoundMethod.php(78): Illuminate\Container\Util::unwrapIfClosure(Object(Closure)) | |
#5 /webdir/lumen/vendor/illuminate/container/BoundMethod.php(34): Illuminate\Container\BoundMethod::callBoundMethod(Object(Laravel\Lumen\Application), Object(Closure), Object(Closure)) | |
#6 /webdir/lumen/vendor/illuminate/container/Container.php(590): Illuminate\Container\BoundMethod::call(Object(Laravel\Lumen\Application), Object(Closure), Array, NULL) | |
#7 /web |
This file contains 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 | |
namespace App\ModelRepositories\Criteria; | |
use Prettus\Repository\Contracts\RepositoryInterface; | |
use Prettus\Repository\Criteria\RequestCriteria as BaseRequestCriteria; | |
class RequestCriteria extends BaseRequestCriteria | |
{ |
This file contains 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
upload() { | |
let data = new FormData(); | |
forEach(this.getSaveData(), function(value, key) { | |
data.append(key, value); | |
}); | |
let method = 'POST', | |
route = this.id ? this.getRoute('patch') : this.getRoute('create'), | |
url = this.getURL(route, this.getRouteParameters()), |
This file contains 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 | |
namespace App\Validator; | |
use Zend\Validator\CreditCard as ZendCreditCard; | |
class CreditCard extends ZendCreditCard | |
{ | |
const HIPERCARD = 'HiperCard'; |
This file contains 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
<!-- | |
Para o caso do Pinterest DEVEMOS informar se estamos no escopo de um single, ou archive (caso não usado Wordpress), | |
pois no modo Archive ele deve considerar somente a foto informada no data-thumb, enquanto no single ele pode aceitar | |
qualquer imagem do conteúdo (ver JS) | |
--> | |
<body class="single"> |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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 | |
list($lat, $lon) = explode(',', '-22.903322,-43.173098'); | |
echo $lat; //-22.903322 | |
echo $lon; //-43.173098 |
This file contains 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
[include_form template="contato" titulo="Formulário de Contato"] | |
// É feito o include do arquivo "forms/contato.php", com uma variável $titulo, com valor "Formulário de Contato" |
This file contains 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 | |
/* | |
* With this we remove all not necessary HTML Tags for the URL and use the Title attr, also add a "ml-advert" metada for jQuery on() control | |
Where: | |
$ret_val = "<a" . | |
" href='" . MLA_BASE_URL . "out.php?id=" . $this->get_advert_id() . "'" . | |
" onmouseover='maskLink(this,event,\"" . $url_mask . "\")'" . | |
" onclick='maskLink(this,event,\"" . $url_mask . "\")'" . | |
" onmouseout='maskLink(this,event,\"" . $url_mask . "\")'" . |
NewerOlder