background preloader

Zend Framework Manual

Zend Framework Manual

Zend Framework : champ "Pays" dans un formulaire Le Zend Framework est livré avec un ensemble de fichiers xml (dans Zend/Locale/Data/) qui contiennent des chaines localisées dans plusieurs langues. On peut par exemple récupérer une liste de pays traduite en français avec la méthode statique Zend_Locale::getCountryTranslationList. J'ai donc eu l'idée de m'en servir pour créer un select qui permet de choisir un pays. C'est assez simple à réaliser, mais je me suis heurté à quelques petits problèmes. Premièrement, la liste arrive dans le désordre et il faut donc la trier pour faciliter la sélection. Ensuite, je me suis dis que pour optimiser les performances, je pouvais désactiver la traduction automatique des libellés. Sur ma lancée, je me suis dit que c'était pas trop sympa pour les utilisateurs d'avoir à chaque fois à faire défiler toute la liste pour sélectionner leur pays d'origine, donc j'ai ajouté un peu de code pour que le pays correspond à la locale courante soit ramené en tête de liste. <? /* @var string */ protected $_table; if (!

La communauté Francophone du Zend Framework Atelier Zend Framework : Donnez de la puissance à vos modèles Decorators with Zend_Form Zend_Form has been lauded by many as a welcome addition to Zend Framework, and a flexible solution to the problem of forms. That said, one point of flexibility it offers has proved to be a pain point for many developers: decorators. This tutorial aims to shed some light on decorators, as well as provide strategies for creating your own decorators and combining them in creative ways to customize the output your forms generate. Background When designing Zend_Form, a primary goal was that it should generate the markup necessary to display each element and the form itself. The rationale was that injecting values and metadata into the element markup and reporting errors is often a tedious, repetitive task. Of course, the problem with generating form markup is that there is no standard way to do it. Another objective was that Zend_Form not be tied to Zend_View. With all these goals in mind, the solution finally presented itself: use the principles of the As an example, consider a Window class.

Framework 2.0 Roadmap - Zend Framework 2.0 <ac:macro ac:name="note"><ac:parameter ac:name="title">Superceded</ac:parameter><ac:rich-text-body> <p>This page has been superceded by <ac:link><ri:page ri:content-title="Zend Framework 2.0 Requirements" /></ac:link>; please direct further discussion to that page.</p></ac:rich-text-body></ac:macro> <ac:macro ac:name="note"><ac:parameter ac:name="title">Participate in the Discussion</ac:parameter><ac:rich-text-body> <p>Please participate in the discussion! You can either do so in comments to these pages, or by subscribing to the zf-contributors@lists.zend.com – simply send an email to zf-contributors-subscribe@lists.zend.com! <p>Zend Framework 2.0 will be the first major version following the 1.x series, and as such is the first time BC breaks will be allowed. <p>At this time, we aim to have ZF 2.0 have a minimum requirement of PHP 5.3 (which version of 5.3 is still to be determined). <h2>Architectural/Design Changes</h2> <ul> <li><strong>Unified constructor</strong>.

Zend Framework by examples (ZfEx)

Related: