タグ

2012年7月30日のブックマーク (2件)

  • How to add new (syntactic) features to PHP

    27. July 2012 Several people have recently asked me where you should start if you want to add some new (syntactic) feature to PHP. As I’m not aware of any existing tutorials on that matter, I’ll try to illustrate the whole process in the following. At the same time this is a general introduction to the workings of the Zend Engine. So upfront: I apologize for this overly long post. This post assume

    brtRiver
    brtRiver 2012/07/30
  • フラットなPHPからSlimへ - ぷぎがぽぎ

    フラットなPHPからSilexへの姉妹版記事です。 追記 configにモデルを突っ込むコードからcontainerプロパティを作り、配列としてクロージャを登録する方式に変更 $app全体を持ち回す必要がないところは必要な情報のみ渡すように修正 追記 2014/08/13 slimがバージョンアップしてサービスコンテナが使えるようになりました。記事のコードのままだと名前がぶつかってエラーになります。(thanks to suzu_v) http://docs.slimframework.com/#DI-Overview 前提 前回の記事のSymfony Componentを使い始める前までは同じです。 まずは、前回の記事で、素のPHPでブログアプリのコードを書いてみるところまで実践してみてください。 Slimを使ってみる 参照: Slim Framework - Slim Framewor

    フラットなPHPからSlimへ - ぷぎがぽぎ
    brtRiver
    brtRiver 2012/07/30
    SlimをSilexっぽくコンテナを利用してモデルクラスなどを持ち回すようにサンプルコードを修正した(ただしPimpleは使わない)