sasezaki http://twitter.com/sasezaki
Zend Framework というプロダクト・コンセプトが世にでてから11年が経過しようしています。この発表では、私がZend Frameworkを中心に PHPのOSSに関する各種トピックについて感じたことを振り返って見たいと思います。
- 導入
- Zend Framework 登場前
<?php | |
$post = [ | |
'k' => 'v', | |
'kk' => [ | |
'll' => 'あああ', | |
'l2' => [ | |
['xCode' => 'おおお'], | |
['x2Code' => 'おおお'], | |
'm1' => [ |
<?php | |
declare(strict_types=1); | |
namespace ClassHydrator { | |
interface ClassHydrationInterface | |
{ | |
public function hydrate(array $data, string $className); | |
} |
<?php | |
// INSTALL: $composer require zendframework/zend-mvc:^3 | |
// USAGE: $php -d allow_url_include=1 zend-mvc-mini.php | |
namespace Application { | |
use Zend\Router\Http\Literal; | |
use Zend\Router\Http\Segment; | |
use Zend\Mvc\Controller\AbstractActionController; | |
use Zend\ServiceManager\Factory\InvokableFactory; |
sasezaki http://twitter.com/sasezaki
Zend Framework というプロダクト・コンセプトが世にでてから11年が経過しようしています。この発表では、私がZend Frameworkを中心に PHPのOSSに関する各種トピックについて感じたことを振り返って見たいと思います。
<?php | |
/** | |
* ズンドコキヨシ・コーディングに対する感想 | |
* | |
* 設問から派生したところを考えた場合、 | |
* ズンドコキヨシ問題をPHPとFSMで解く http://developer.cybozu.co.jp/akky/2016/03/zundoko-kiyoshi-in-php-and-fsm/ | |
* などは導入したほうが分かりやすくなる例としてなるほどなとは思ったり、 | |
* 短くするコードゴルフ始めてたりしてフーン(読みにくっ)と思ったり | |
* |
<?php | |
/** | |
* Zend Framework (http://framework.zend.com/) | |
* | |
* @link http://github.com/zendframework/zf2 for the canonical source repository | |
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) | |
* @license http://framework.zend.com/license/new-bsd New BSD License | |
*/ | |
namespace Zend\Paginator\Adapter; |
Index: Adapter/DbSelect.php | |
=================================================================== | |
--- Adapter/DbSelect.php (revision 23657) | |
+++ Adapter/DbSelect.php (revision 23658) | |
@@ -100,7 +100,9 @@ | |
if ($rowCount instanceof Zend_Db_Select) { | |
$columns = $rowCount->getPart(Zend_Db_Select::COLUMNS); | |
- $countColumnPart = $columns[0][1]; | |
+ $countColumnPart = empty($columns[0][2]) |
<?php | |
use Zend\Paginator\Paginator; | |
use Zend\Db\Adapter\Adapter; | |
use Zend\Cache\StorageFactory; | |
use Zend\Db\TableGateway\TableGateway; | |
require_once 'vendor/autoload.php'; | |
$adapter = new Zend\Db\Adapter\Adapter(array( | |
'driver' => 'Pdo_Sqlite', |
<?php | |
// Minified | |
// class B{function __construct($m){$this->m = $m;} function __invoke($req,$res) {if($this->m)return array_shift($this->m)($req,$res,$this);}} | |
class B{ | |
function __construct($m) | |
{ | |
$this->m = $m; | |
} |
<?php | |
// git clone https://github.com/nikic/PHP-Backporter.git | |
// git submodule init | |
// git submodule update | |
// in PHPBackporter_Converter_Namespace, should change like below. | |
// $functionDataParser->parse(file_get_contents(dirname(__FILE__).'/../../../function.data')), | |
$file = $argv[1]; |