O que uma lib php deveria ter como funcionalidades para manipular "objetos" do Facebook ?
- User
- Album
; Possible bug on Respect/Config. Test and open an issue. | |
; MONOLOG | |
[redisMonologHandler Monolog\Handler\StreamHandler] | |
[monolog Monolog\Logger] | |
name = phartitura | |
handlers = [[redisMonologHandler],] | |
; handlers = [[redisMonologHandler]] <----- without comma, it's not parsed and the library throws an error | |
; Object of class Respect\Config\Instantiator could not be converted to string in .. /vendor/respect/config/library/Respect/Config/Container.php on line 317 |
<?php | |
namespace Respect\Validation\Rules; | |
use Respect\Validation\Exceptions\ComponentException; | |
class Twitter extends AbstractRule | |
{ | |
private $pattern = '/^@[a-zA-Z0-9]/'; | |
private $account = NULL; | |
<?php | |
namespace Respect\Validation\Rules; | |
use Respect\Validation\Exceptions\ComponentException; | |
class Twitter extends AbstractRule | |
{ | |
private $pattern = '/^@[a-zA-Z0-9]/'; | |
private $curl = NULL; | |
<?php | |
$h = date('H', strtotime($agenda->getData())); | |
$horariosPossiveis = array_map(function($v){ | |
return str_replace('%H%', $h,$v); | |
},$horariosPossiveis); |
<?php | |
$proj = substr(__DIR__,0,strrpos(__DIR__, '/')); | |
$root = substr($proj,0,strrpos($proj, '/')); | |
set_include_path($root . PATH_SEPARATOR. $proj . PATH_SEPARATOR. get_include_path()); | |
function loader($class_name) | |
{ | |
$path = str_replace('\\','/',($class_name)).'.php'; | |
<?php | |
class Foo extends Model | |
{ | |
/** | |
* @var int | |
*/ | |
protected $value; | |
public function getValue(){ | |
return $this->value; |
<?php | |
// A ideia é descobrir se a regra existe | |
// ex: $p['validate'] == 'image' | |
// Usei a SplClassLoader para carregar o Respect, porém, acho que na hora da biblioteca instanciar uma | |
// regra via Reflection, o autoload dá require num arquivo que nao existe, gerando um erro fatal | |
// ou seja, que não é capturado pelo try...catch. | |
use Respect\Validation as v; | |
$validator = new v\Validator(); |
<?php | |
$lambda = function() use($nota){ | |
echo '<br />'.$nota; | |
}; | |
function soma($v1,$v2,$f){ | |
$nota = $v1 + $v2 ; | |
$f(); | |
} |
{ | |
"name" : "NomeDoProjeto", | |
"autoload" : { | |
"psr-0" : { "NomeDoProjeto" : "src/"} | |
}, | |
"minimum-stability": "dev" , | |
"license" : "MIT", | |
"authors": [ | |
{ | |
"name": "Claudson Oliveira", |