Tag Archives: Code Igniter

Choosing a PHP MVC Framework: Yii Vs. Kohana Vs. Home made MVC

Choosing a framework is never an easy task, there are many aspects to consider, the three most important ones are, from my point of view:

  • Available features and community extensions.
  • A good documentation with examples.
  • A low footprint.

The balance between these three values and the impact of each one on your project will determine the good candidate. Since having a wide range of included features and an active community who provides with extensions, we are sure that the wheel won’t be reinvented. Thus, we can become productive much faster.

Continue reading Choosing a PHP MVC Framework: Yii Vs. Kohana Vs. Home made MVC

Access Control List (ACL) with Code Igniter

In the last project I’ve worked on, I needed to install any kind of ACL to allow certain methods to be accessed only by some user roles, like website administration, etc. I’m building this website on Code Igniter, so I missed some related features that are available in other PHP frameworks like CakePHP or Zend.

After googling a bit, I found our several methods to get an ACL. Zend framework can be integrated into Code Igniter to use its library, but doesn’t seem really natural to me. I prefer having an previously constructed list, than building it ‘on the fly’ inside my code.

Then I fell into phpGACL, a free software project which allows to solve this problem on an easy way. It uses an API to connect to a database, where tuples of ‘controller’ – ‘method’ – ‘user’ can be stored (actually, AXO – ACO – ARO, acronyms of Access eXtended Object, Access Control Object, Access Request Object). And I developed my first version over this tool, on the most transparent way I was able to find:

Continue reading Access Control List (ACL) with Code Igniter