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 | |
namespace FiremonPHP\Storage; | |
class FileStorage | |
{ | |
private $files = []; | |
public function __construct(array $files) | |
{ | |
$this->storeInternal($files); |
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 | |
namespace App\Core; | |
class Core { | |
public function run() { | |
$url = '/'; | |
if (isset($_GET['url'])) { | |
$url .= $_GET['url']; | |
} | |
$params = array(); | |
if (!empty($url) && $url != '/') { |
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 | |
require 'vendor/autoload.php'; | |
use Mongolid\Manager; | |
use Mongolid\Connection\Connection; | |
$manager = new Manager(new Connection('mongodb://localhost:27017')); | |
class Post extends Mongolid\ActiveRecord { |
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 | |
function validate($data) { | |
if (empty($data['nome'])) { | |
return 'nome nรฃo pode ser vazio'; | |
} | |
if (empty($data['email'])) { | |
return 'email nรฃo pode ser branco'; | |
} |
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 | |
/* | |
* This file is part of the CORS middleware package | |
* | |
* Copyright (c) 2016 Mika Tuupola | |
* | |
* Licensed under the MIT license: | |
* http://www.opensource.org/licenses/mit-license.php | |
* |
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
trait DispatchAction | |
{ | |
public function process(ServerRequestInterface $request, DelegateInterface $delegate) | |
{ | |
$dictionary = [ | |
'GET' => 'index', | |
'POST' => 'create', | |
'PUT' => 'edit', | |
'DELETE' => 'delete' | |
]; |
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
class Logger { | |
/** | |
* @var array | |
*/ | |
private $config; | |
public function __construct(array $config) | |
{ | |
$this->config = $config; | |
} |
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 | |
namespace NFePHP\Common\Soap; | |
use NFePHP\Common\Certificate; | |
use NFePHP\Common\Soap\SoapInterface; | |
use NFePHP\Common\Exception\SoapException; | |
use NFePHP\Common\Exception\RuntimeException; | |
use NFePHP\Common\Strings; | |
use League\Flysystem\Filesystem; | |
use League\Flysystem\Adapter\Local; |
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
require 'vendor/autoload.php'; | |
$exemplo = file_get_contents('exemplo.xml'); | |
$service = new \Sabre\Xml\Service(); | |
$xmlArray = $service->parse($exemplo); | |
$adicionar = [ | |
[ |
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 | |
namespace ExpressiveProvider; | |
use Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory; | |
abstract class BaseProvider | |
{ | |
/** | |
* @var array | |
*/ |