This domain may be for sale!
こんにちは。小川です。 先日Symfony 2のアプリケーション構成を読むという記事で、Symfony 2の大まかなアプリケーションのディレクトリ構成と、KernelやBundleという存在について書きました。Symfony 2を語る上でSymfony Componentsの存在はかかせません。本日は一挙2本立て!Symfony Componentsの中でも特に重要になるEvent DispatcherコンポーネントとRequest Handlerコンポーネントをご紹介します。今回ご紹介するのはEvent Dispatcherコンポーネントです。 ちなみに本日2つ目の記事はこちらです <Symfony Componentsシリーズ> Symfony 2の秘密兵器: Request Handler ◆ Symfony Components はじめに、コンポーネントについてご存じない方のために
HelloKernel.php cache/ config/ console logs/ 先ほど説明をしたKernelというものが出てきます。Kernelの中にはいくつかのメソッドが実装されています。簡単に説明します。 ◆registerRootDir() Kernelのルートとなるディレクトリです。またカーネルを配置してあるディレクトリ、ここではhelloがカーネルの名称、つまりアプリケーションの名称となります。 ◆registerBundles() Bundleとは日本語にすると束とか1つにまとめたものという意味です。このBundleはSymfony 2では非常に重要な役割を持ちます。 このメソッドの中でZendBundleやDoctrineBundleを返しているのをみると、Bundleは従来のPluginのように思われるかもしれませんが、あながち間違いではないでしょう。 こ
Symfony is a set of reusable PHP components... The standard foundation on which the best PHP applications are built. Choose any of the 50 stand-alone components available for your own applications. Browse components ... and a PHP framework for web projects Speed up the creation and maintenance of your PHP web applications. End repetitive coding tasks and enjoy the power of controlling your code. W
This document provides an overview of dependency injection and describes how to build a simple dependency injection container in PHP 5.3 using anonymous functions (lambdas). It discusses how the container can be used to manage parameters, describe object creation through lambdas, handle object scoping, and provide a unified interface. The container allows decoupling object dependencies and makes c
symfony検定 - ゆっくり*ゆっくり というわけで、勝手に問題を考えてみます。 初級っぽいものを考えてみました。 symfonyにバンドルされている2つのORMコンポーネントは? 約20チャプターで構成されるsymfonyのチュートリアルで構築する仕事情報サイトの名称は? symfony 1.4が動作する最小のPHPバージョンは? モジュール/アクション形式ではないURLにカスタマイズしたい場合に設定を記述するファイルは? 特定のアクションへのアクセスに認証を設定するには、どの設定ファイルを使用するか? 「_partial.php」というファイル名のパーシャルをビューに埋め込むための記述は? アクション(例:executeIndex(sfWebResponse $response))の代表的な戻り値を3つ答えよ ルーティングの設定名を使ってビューでURLを生成するためのヘルパー関数は
symfony検定に出そうな問題です!w Hidenori Goto on Twitter: "symfony検定に出そうな問題です!w RT @fivestr: settings.ymlのerror_reportingに文字列でE_ALL | E_STRICTとかいてあって、エラーがでないまま放置されているプロジェクトがあった。わろす" symfonyのことつぶやいていたらid:innx_hidenoriさんがこんなことをつぶやきました。 というわけで先ほどからTwitter上で#symfony_kenteiというハッシュタグで設問があがってたりします。 あがっている設問: symfonyのディレクトリ構造を書け forwardとredirectの違いを書け partialとcomponentの違いを書け factories.yml は何を行うためのファイルかを書け symfonyの内部
# 2009/09/23 22:45 Fivestarさんからコメントで教えていただいたDoctrineのINSERTについてテスト1に追記しました。 # 2009/09/24 01:03 Fivestarさんからコメントで教えていただいたDoctrineのQueryCacheについてテスト3に追記しました。 symfonyとしては「これからはDoctrineがメイン」という方向性(symfony 1.3ではデフォルトのORMがDoctrineになっていますし)のようなので、いろいろな機能がDoctrineを基準に実装されていくことになるのだろうと思われますが、実際の案件に使っていくには、やはりパフォーマンスが気になるところです。 そもそもPropelでもPDOが採用された1.3が出るまではさんざん「遅い」と言われていて、それが「symfonyってもっさり」の原因になっていたのではないかと
11月15-18日に行われている International PHP Conferenceで発表されているらしい資料があり、おもしろいことが色々書いてあったのでご紹介したいと思います。 Symfony Components 2.0 on PHP 5.3View more documents from Fabien Potencier. Symfony Components Symfony Componentsはsymfonyのコアから独立したライブラリ群です。つい先日のKlabさんとの勉強会の時は知らなかった(知る余地もなかった)内容が色々あったのでそのあたりのことを書きます。 現在公開されているSymfony Components(http://components.symfony-project.org/)には5つのコンポーネントがあり、そのうちRequest Handler以外はソー
TwitterにてTakiTakeさんがつぶやいていたので、気になって調べてみました。 いろいろググッたところ、次のエントリが見つかりました。 http://arpeggios.wordpress.com/2008/08/15/logging-on-tasks/ エントリの内容を簡単にまとめると以下のような感じです。 symfonyのtaskはsfTaskの派生クラスで、sfTask::log($messages)メソッドなどを利用できる。 sfTask::logメソッドは、command.logイベントを発生させる。 したがって、タスク側でcommand.logイベントをファイルに記録するsfFileLoggerオブジェクトを作成して、このイベントにconnectすればOK というわけで、以下のようなコードが示されています。 <?php $file_logger = new sfFile
Previously, I talked about creating a custom logging event in order to log into a another file . This post shows how to add a task-specific logger. About logging in tasks In a Symfony task, two logging methods are available : sfTask::log($messages) sfTask::logSection($section, $message, $size = null, $style = ‘INFO’) Both can be called anywhere in your task class : class myownTask extends sfBaseTa
補完王 zsh で symfony1.2 のコマンドオプションを補完するするための設定です。 #compdef symfony _symfony() { local curcontext="$curcontext" state line expl ret=1 _arguments -C \ '(-n --dry-run)'{-n,--dry-run}'[Do a dry run without executing actions.]' \ '(-H --help)'{-H,--help}'[Display this help message.]' \ '(-I --libdir)'{-I,--libdir=}'[Include LIBDIR in the search path for required modules.]' \ '(-N --nosearch)'{-N,--nosearc
Symfony Componentsというのをご存知でしょうか?その名前のとおり、あのPHPのフレームワークで有名なsymfonyに関係するコンポーネントなのですが、symfonyの次期バージョンであるSymfony2で利用されるコアとなる各コンポーネントがライブラリとして公開されています。 近頃、その1つでテンプレート機能部分である Symfony Templatingが公開されましたので、さっそく使ってみました。軽量で柔軟性が高いのでsymfonyを使った事がある人も無い人も簡単に導入する事が可能だと感じました。 そこで、symfonyを使った事がある人も無い人も、「テンプレートエンジンといえばSmartyを使っているけど、PHPってテンプレートエンジンみたいなものだしPHPでテンプレートを書きたい。。」という方まで、ドキュメントとソースを読んで実際に使ってみた例を紹介したいと思います
Playing casino games is one of the most thrilling and exciting activities of all times. Casino games include different interesting games such as Russian roulette, rummy, poker, bridge, bingo and other games like slot machines etc. There are millions of casino game fans all across the globe. However, casino games come with a limitation. Not every casino fan is able to play his favorite game at the
These are the slides of the talk I gave at Symfonyday Cologne '09 (http://www.symfonyday.com/)Read less
Symfony Event Dispatcher とは Symfony Event DispatcherというのはPHPフレームワークであるsymfonyに含まれるライブラリで、GoF*1のObserverパターンの変種です。 このクラスは現在Symfony Event Dispatcherという名前で単体公開されていますので、symfony以外のプロジェクトでも気軽に利用できると思います。全部で300行程度の小さいライブラリで、テストコードが29件書かれています。 また、ガイドとAPIリファレンスが書かれています。レシピ集を見ればsymfonyでどう利用されているかを垣間見ることが出来ます。テストカバレッジ率100%なんてことも書いてありますね。 本稿では、PHP5に対応したObserverパターンの実装としてのSymfony Event Dispatcherについて紹介します。 Obs
So as we’ve promised here goes more slides for online viewing: 1. Symfony 2 by Fabien Potencier It’s long one but contains great information “where will be moving symfony in next 1-2 years”. Frankly, I’m a bit confused b/c I feel that symfony 2 wont be compatible with 1.x branch. I did not hear that but I dont think after all these major changes compatibility is still possible. 2. Sympal – The fle
permalink When the URL entered by the user doesn't match any route or when an sfError404Exception occurs, symfony tries to access to the default/error404 action. To customize the "Oops! Page Not Found" page, add the executeError404() method in apps/frontend/modules/default/actions/actions.class.php: /** * Error page for page not found (404) error * */ public function executeError404() { } Then cre
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く