Digital Fashion

Rien de grand ne se fit jamais sans enthousiasme.

To content | To menu | To search

Searching the Zend Framework's manual: Google Co-op to the rescue

While the Zend Framework's manual is somewhat quite good, it lacks a feature that make it a really good manual: search. I find it very frustrating to not be able to make a simple search and therefor having to browse through the extensive TOC to find what I'm actually looking for. Here enters the very handy Google co-op service which allows creation of custom search engines based on Google's indexes. It do not takes more than five minutes to setup a simple search engine, thus providing search capability to the manual :-)

And as a good news never comes alone, I also made the OpenSearch plugin for it.

UPDATE

I made a simpler url to remind of: http://zend.riskle.com/search/ and updated the opensearch thing to use that url.

Pagination with the Zend Framework

Yesterday I came up with a small pagination component for the Zend Frameworks. It implements the Proxy pattern around a Zend_Db_Table object, and overloads the fetchAll method. The main problem I encountered here was to retrieve the total number of rows for the table. I'm using a Zend_Db_Select query for now, but I'll have to improve that. The component also features a view helper to draw the pagination links.

You'll find the code for the component and the view helper on my SVN.

And here is how it is used in the controller:

    public function indexAction() {
        $urls = new Riskle_Db_Table_Paginate(new Urls, $this->_getParam('page'));
        $this->view->urlsList = $urls->fetchAll(null, 'datetime DESC');
        $this->view->paginationInfos = $urls->getPaginationInfos();
    }

The view helper takes paginationInfos as an argument:

echo $this->paginate($this->paginationInfos);

UPDATE

As pointed out by Guy, the _getPageCount method does not actually takes care of the $where condition, thus rendering the class inefficient as getting the real totel number of items. This issue will be adressed in an upcoming version of the class :-)

UPDATE

There's an updated version of this component available.

A Zend controller plugin to enable RESTful behaviour

This is a simple controller plugin for the Zend Framework which enable RESTful behaviour. It basically adds the HTTP method name to the action name, so that the URL http://example.com/foo/bar will be dispatched to FooController::barGetAction on a GET, FooController::barPostAction on a POST, etc.

Continue reading...

Get the current $view from a view helper

So you're making your own view helper and you need, for a reason, to access the running $view instance. Don't worry, all you have to do is implement a setView() method which will be called on your helper's instantiation, with the $view as argument:

class My_View_Helper_SpecialPurpose {
	
	protected $_view = null;
	
	public function setView($view) {
		$this->_view = $view;
	}

}

And voila !

Mon nouveau keupin Diboug

Hier j'ai acheté un nabaztag/tag hier, il s'appelle Diboug, et vu qu'il existe une API a peu près potable pour le programmer, je prédis tout un tas de fun dans les jours qui viennent :-)

No comment

C'est pas vraiment dans mon habitude, mais là on m'a lancé un défi, alors s'il vous plait, un ptit clic ?

Zend Framework 1.0.0 RC3

Allez hop, la RC3 du Zend Framework est sortie (il y a 2 jours).

J'en profite pour faire un peu de pub pour zftalk, un chan IRC sympa.

Technobabble

J'ai fait un thème dc2 vite fait basé sur le template Technobabble de dreamLogic trouvé sur oswd. C'est spartiate comme on dit.

4 trucs

Puisqu'on m'a lancé la patate et que l'activité de ce blog et tout sauf débordante en ce moment, je m'y colle.

Quatre emplois que j’ai tenus dans ma vie

  • Développeur
  • Manutentionnaire

Quatre films que je regarderais encore et encore

Quatre endroits où j’ai vécu

  • Coutances (50)
  • Saint Brévin (44)
  • Savennières (49)
  • Courbevoie (92)

Quatre émissions/séries TV que je regarde

  • Les Simpsons
  • South Park
  • NCIS
  • Moult séries en divx

Quatre lieux où je suis déjà allé en vacances

  • Biaritz
  • Batz sur mer
  • Chez ma mère
  • Les vacances c'est pas vraiment mon fort vous savez.

Quatre trucs que je check à chaque fois que je vais sur le Net

  • Mon aggrégateur RSS (Google Reader)
  • IRC (over screen over ssh)
  • Mes mails
  • Popomundo

Quatre mets que je ne mangerais pour rien au monde

  • Des moules
  • Des huîtres
  • heu ?

Quatre mets/plats favoris

  • La texmex au pizzaoïolo de mon quartier
  • Sashimis
  • La poule au pot
  • L'entrecôte XL

Quatre endroits où j’aimerais être en ce moment

  • E.F.P. Le Blanc, altitude 1200m
  • En Suède
  • Chez moi (ça tombe bien j'y suis)
  • Sous la douche (ça tombe bien j'y vais)

C'était vraiment très interressant.

Zend Framework 1.0.0 RC2

Au fait, j'ai mis en ligne le package pear de la 1.0 RC2 du Zend Framework hier, avec un peu de retard donc, puisque j'étais occupé à imiter les oiseaux :)

Je suis vivant.

Non, ce n'est pas le traditionnel billet de remise en vie du blog, cette fois, je suis bel et bien vivant, après mes 2 sauts en parachute de ce week end :D Le truc le plus "ouf" qu'on puisse faire dans sa vie. Vivement les prochains sauts !

Deux choses

  1. Nantes / Poitiers en train c'est la galère ultime
  2. http://www.librarything.com/catalog...

Bon par contre, mon librarything est (très) loin d'être complet. J'ai fini tout a l'heure dans le train La Horde du Contrevent, et franchement, il vaut bien les 5 étoiles que je lui ai mis.

Google Gears

La dernière petite roxitude de google: Google Gears, une extension firefox qui embarque une base SQLite pour faciliter le développement d'applications offline.

on en parle , et puis aussi .

Google Reader + Wii

Google Reader dispose d'une interface dédiée à la wii (sur laquelle on tombe automatiquement quand on s'y rend avec opera4wii) et optimisé pour la wiimote.

via

Zend Framework 1.0.0 RC1

Disponible sur le channel pear.

Voir aussi: le changelog

N.B.: je n'ai pas pu installer le package sur la machine qui héberge le channel via le channel, mais il semblerait que ce soit un cas isolé. Si vous rencontriez un problème (par exemple l'installeur PEAR qui vous dirait Nothing to upgrade) n'hésitez pas à me le signaler !

Déménagement

Pour ceux que ma vie intéresse, je suis en ce moment en train de déménager dans un nouvel appartement pas loin de chez moi (en général ça fait marrer les gens quand on déménage a 200m de chez soi).

La migration des cartons est en bonne voie, et il ne me reste en gros plus que le minimum vital dans mon ancien studio, que je devrais quitter définitivement le 19 mai. Malheureusement, je m'y suis pris un peu tard pour mon abonnement internet, je vais donc devoir taxer du wifi au voisin (je sais, c'est une préoccupation purement geekeske). En attendant d'avoir du vrai internet, je pense que je rentabiliserai l'achat probable a venir d'Eledees sur Wii (et de mario strikers charged si ça prend vraiment du temps :/).

J'en profite pour signaler qu'un Starbuck a ouvert en bas de chez moi (quasiment), ô joie.

Zend Framework 0.9.3

Dernière ligne droite avant les premières 1.0 RC, la beta 0.9.3 du Zend Framework est sortie, et son package est disponible sur le channel PEAR PHPMafia.

Quand je serais grand...

...je veux faire comme lui.

Are you no the list ?

SVN: MKACTIVITY Could not parse response status line.

Un petit billet pour un problème qui ne bénéficie que d'une faible visibilité sur google. Si votre client SVN vous jette avec un message du genre:

svn: MKACTIVITY de '/pwnd/!svn/act/a4eec923-2c2e-0410-a786-c01cbd856e8f': Could not parse response status line. (http://svn.phpmafia.net)

Vérifiez que vous n'êtes pas derrière un proxy, ça peut venir de là.

cf: DevjaVu Forums

- page 3 of 36 -