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 | |
interface Sign | |
{ | |
/** | |
* @param string $string | |
* @return string | |
*/ | |
public function __invoke(string $string) : string; | |
} |
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 | |
/** | |
* class AndX | |
* @author Vasil Dakov <[email protected]> | |
*/ | |
class AndX extends CompositeSpecification | |
{ | |
/** | |
* @var SpecificationInterface $left |
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 | |
class CachedSkuRepository implements SkuRepositoryInterface | |
{ | |
private $repository; | |
private $cache; | |
public function __construct( | |
SkuRepositoryInterface $repository, |
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
class Film implements FilmInterface { | |
public String getTitle() {} | |
public Float getRating() {} | |
public int addRating(int rating) {} | |
} |
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 | |
# generic stream handler | |
use Monolog\Handler\StreamHandler; | |
class CustomStreamHandlerFactory | |
{ | |
public function __invoke(ContainerInterface $container) : StreamHandler | |
{ | |
$options = $container->get(CustomStreamHandlerOptions::class); | |
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 | |
use Zend\Expressive\AppFactory; | |
use Firebase\JWT\JWT; | |
use Slim\Middleware\JwtAuthentication; | |
chdir(dirname(__DIR__)); | |
require "vendor/autoload.php"; | |
$app = AppFactory::create(); |
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 | |
/* | |
Original version: | |
written by Jarrod Oberto | |
taken from http://net.tutsplus.com/tutorials/php/image-resizing-made-easy-with-php/ | |
Example usage: | |
include("classes/Resize.php"); |
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 | |
/** | |
* Configuration for doctrine cli. | |
* | |
* This file is auto detected and used by doctrine cli. | |
*/ | |
use Doctrine\ORM\Tools\Console\ConsoleRunner; | |
use Doctrine\ORM\EntityManager; |
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 | |
// Ws\Fleet\UiBundle\Tests\Controller\DepotControllerTest.php | |
namespace Ws\Fleet\UiBundle\Tests\Controller; | |
use Ws\Fleet\UiBundle\Controller\DepotController; | |
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | |
use Symfony\Component\HttpFoundation\Response; | |
use Symfony\Component\HttpFoundation\Request; |
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 | |
// Production Config | |
return array( | |
'doctrine' => array( | |
'connection' => array( | |
'orm_default' => array( | |
'driverClass' =>'Doctrine\DBAL\Driver\PDOMySql\Driver', | |
'params' => array( | |
'host' => 'localhost', | |
'port' => '3306', |
NewerOlder