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 Acme\Test; | |
class SplFileInfoTest extends \PHPUnit_Framework_TestCase | |
{ | |
private $isWin; | |
private $testDir; | |
public function setUp() |
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 | |
function factory($class, array $options = array()) | |
{ | |
if (count($options) === 0) { | |
return new $class(); | |
} | |
$refClass = new \ReflectionClass($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
RewriteEngine On | |
#---------------------------------------------------------- | |
# RewriteBase for develop | |
#---------------------------------------------------------- | |
# SetEnvIf | |
SetEnvIf Host ^develop.example.com$ REWRITE_BASE=/path/to/develop | |
# or RewriteCond | |
#RewriteCond %{HTTP_HOST} ^develop.example.com$ |
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 俺の; | |
trait プロパティ実行 | |
{ | |
public function __call($name, $args) | |
{ | |
if (isset($this->{$name}) && is_callable($this->{$name})) { | |
return call_user_func_array($this->{$name}, $args); | |
} |
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 Acme; | |
class ImageType | |
{ | |
private $name; | |
private $value; | |
private $supportedImageTypes; | |
public function __construct($name, $supportedImageTypes = null) |
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 Acme; | |
/* | |
* 【Symfony-HttpFoundationで条件付きGET】 | |
* | |
* @copyright 2012 k-holy <[email protected]> | |
* @license The MIT License (MIT) | |
*/ | |
$loader = include __DIR__ . '/../../../vendor/autoload.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 | |
namespace Holy; | |
/** | |
* Registry for Smarty plugin/filter functions | |
* | |
* @author [email protected] | |
*/ | |
class SmartyFunctionRegistry | |
{ |
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
{ | |
"require": { | |
"silex/silex": "1.0.*", | |
"volcanus/csv": "dev-master" | |
}, | |
"minimum-stability": "dev" | |
} |
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 | |
$app = new Application(); | |
$app['pdo'] = $app->share(function(Application $app) { | |
$db = new \PDO(sprintf('sqlite:%s', __DIR__ . '/../test.sqlite')); | |
$db->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); | |
return $db; | |
}); |
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 | |
require_once __DIR__ . '/../vendor/autoload.php'; | |
use Silex\Application; | |
use Silex\Provider\DoctrineServiceProvider; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpFoundation\Response; | |
use Symfony\Component\HttpFoundation\StreamedResponse; |
NewerOlder