※前提として、yield を使うので PHP5.5 以上であることが必要です Phalcon の Resultset (Model::findの返却値) は多少の機能はありますが、ほぼORM機能を持ったクエリ結果カーソルの域を出ないので Ginq を使っています。 Resultset → Ginq 変換するには Ginq::fromLazy と yield を使います。 $rs = BlogEntries::find(); $entries = Ginq::fromLazy(function() use (&$rs) { foreach ($rs as $item) { yield $item; } }); // 一日の中で PV 数が最上位のブログ記事を取得 $entries = $entries ->groupBy(['e'=>'e.getDate()']) ->select(func
In my last Windows Azure with PHP article, we went through the detailed process of deploying a PHP+MySQL app on Windows Azure; but every PHP dev knows it makes no sense not to use a framework. Reinventing the wheel is never a good option, not when you have so many excellent wheels to choose from. In this article we’ll install Phalcon, my personal framework of choice. You might be thinking “But isn
久しぶりにPHPのエクステンションで書かれた超高速フレームワークPhalconを見たら 公式ページが見やすくなってた バージョンが1.0.0になってた annotationリーダーのライブラリができてた(そしてPhlconで使える) Microというクラスがあり、マイクロフレームワーク風に書けるようになってた と、相変わらず斜め上まっしぐらな感じがします。 マイクロフレームワークはルーティングだけ欲しいのなら選択肢としてありなきがします。 Phalconのことだからオーバーヘッドも少ないでしょうし。 というわけでGWで遊んでみたい人のためのやってみよう記事。 Phalconをインストール たぶん一番難しいのはここだけ。 インストール方法: http://phalconphp.com/download 自分はmacのローカルに入れたので、以下のコマンドをぽちぽちたたいた。 $ git clo
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く