Symfony 5 extensions There’s no limit to the functionality you can incorporate in your Bolt project. At its core, Bolt is a Symfony application, so you can use the tools provided by the framework. Twig templates There's a reason why Twig is the de-facto standard across the PHP community. It is flexible, fast and secure. Take a look how easy it is to generate the HTML for your pages. Built-in inter
whoops php errors for cool kids whoops is a nice little library that helps you develop and maintain your projects better, by helping you deal with errors and exceptions in a less painful way. view the demo view on github download a stable version view on packagist read the docs Features Includes providers for Silex and Zend Framework 2, with community-provided support for other platforms and frame
In my humble opinion Silex is great. It’s perfect to create prototypes, but when our application grows up it turns into a mess. That was what I thought until the last month, when I attended to a great talk about Silex with Javier Eguiluz. OK. Scaling Silex it’s not the same than with a Symfony application, but it’s possible. It’s pretty straightforward to create a Silex application with composer:
Scaling a Silex code base Warning: This blog post is not about clouds, it’s about people. One common misconception about silex and microframeworks in general is that they are only suited for small, simple apps, APIs and prototyping. Of course, those use cases are the main selling point, but they are by no means the limit of what is possible. Creating the mess The first experience with silex will m
Silex + OptionsResolver で FizzBuzz の続きです。 前回のサンプルだとSilex使っている意味がないので、パスで指定された値を使ってFizzBuzzを実行するよう、エントリスクリプトを書き換えました。 "/{var}/{type}" という2つのパラメータを含んだパスへのGETリクエストのハンドラを設定しています。 1つ目のパラメータは「1-100」というようにFizzBuzzの範囲をハイフン区切りで指定でき、2つ目のパラメータでは戻り値のフォーマット(html or json)を指定します。 Silex\Route::value()メソッドによって、1つ目のパラメータは "1-100" 2つ目のパラメータは "html" を初期値に指定し、パラメータ指定のないパス "/" へのリクエストもこのハンドラで処理させています。 ハンドラの戻り値は文字列ではなく、
The website you want to visit is currently not available. This may be due to that the website is being developed, that maintenance is underway or that the website is closed due to some other reason. Domain owner, please see your contact address (email) or contact support@loopia.com for more information. Webbplatsen går ej att nå för tillfället Webbplatsen du vill besöka är för tillfället inte till
This document contains code snippets related to Spring Security configuration and authentication. It defines classes and methods for configuring security, processing login requests, loading user details, and authenticating users. Key aspects include configuring security filters and authorization rules, processing username/password authentication, validating login credentials against encoded passwo
In my previous post, I wrote about wrapping a legacy application in Silex, using output buffering and Twig. Finally, to allow for better decoupling as well as lazy loading of services, we passed the actual Silex\Application instance as the first argument of legacy controllers. The first and quite easy way we can enhance our legacy application, is to make use of the request service (which contains
igorw opened this pull request June 30, 2012 Re-bind closures to the application object on PHP 5.4 This allows using $app as $this in controllers and before/after handlers without having to use() it: $app->get('/', function () { return $this->redirect('/foo'); }); Works for: closure controllers before/after filters error handlers finish handlers It can also be disabled by overriding the closure_re
いよいよアプリの実装に移ります。まずは、ライブラリを設定します。リスト3が三つのライブラリの初期化処理です。これをpublic/index.phpとして保存します。 アプリのタブページを実装 まず(1)でSilexおよびFacebook PHP SDKを読み込んでいます。(2)はPHP 5.3から採用された名前空間の読み込みです*6。後ほど、ApplicationやRequestという短いクラス名が登場しますが、それらの正式なクラス名は(2)に記述したものになります。(3)は、SilexのApplicationクラスの初期化です。(4)でデバッグモードを有効にしています。エラーを見つけやすくするためにデバッグモードを設定しました。 (5)は、Silexの関連ライブラリの読み込みです。ここではセッションとtwigフォルダに格納したライブラリを読み込んでいます。(6)は、Facebook PH
I can't seem to get anything to work past the root path so far: Do you put all your controller calls in the app.php file? $app->get('/', function ($id) { ... }); $app->get('/about', function ($id) { ... }); Or do you put them in separate files? So far the root get method works fine and renders a twig template, but anything past that does nothing.
かなり放置してしまっていたPHPTALのSilexエクステンションを更新しました。 Extensionという名前からProviderという名前に変わったのでその対応だけです。 GitHub - brtriver/PHPTALServiceProvider: PHPTAL Extension for Silex そして、SilexがExtensionからProviderへと名前を変えたのには意図があるということが最近把握できた気がするので一言。 Providerは2種類ある Silexが提供しているProviderはServiceProviderというものです。 外部ライブラリやサービスを利用するための遅延読込、腐敗防止層的な役割を行います。 PHPTALServiceProviderもこの1種です。 また、Silexにはコントローラーを別ファイル化し、mountする仕組みが用意されています
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く