The Danger of Hooks - Paul Reinheimer

Courtesy Planet PHP  Tue, 01/10/2012 - 08:27

I fell in love with Hooks in frameworks recently; the honeymoon period was tragically short. First, the love story:

I ran into hooks rather simultaneously with two very different frameworks: Code Igniter and Lithium.

In both cases I was using a rather nifty hook to handle ensuring that users were properly authenticated and authorized before accessing a page.

I think we can all agree having to add some code to every single method is foolhardy: if (!isset($_SESSION['user_level']) OR ($_SESSION['user_level'] !=...


 

More related items

Bitstorm: The World’s Most Simple BitTorrent Tracker
Let’s start off by saying that running a reliable tracker with tens of thousands of peers is not something everyone is capable of. It requires the right skills and expertise to keep...

Integrating Markdown with Symfony - Anna Filina
Context I needed to create a number of static help pages in three languages in a Symfony 1.4 application. Using the XLIFF translation files seemed absurd, since I knew that I will include a...

uTorrent 3.0 Adds Ratings, Comments and Streaming
uTorrent for Windows saw its first public release in September 2005 and soon became the most widely used BitTorrent application. Today close to 100 million users worldwide use the client...


 

Post new comment

The content of this field is kept private and will not be shown publicly.
computer-internet.marc8.com