Looks promising

Zend Framework 2.0 by example – beginner’s guide
Few weeks ago I was asked to review Zend Framework 2.0 by example – beginner’s guide from Packt. While I’m not a beginner anymore – and haven’t been one for a while – I do hold from time to time training sessions on the various technologies used in web development so I can easily put […]

Validate URLs in Zend Framework
I was doing some dev work, as usual in ZF, and I was surprised to find out that there’s no Zend_Validate_Url or Zend_Validate_Uri class among the framework’s default validators. Which is a bit weird, as validating URLs in a very common task in web development, much more common than, let’s say, validating a barcode or […]

Zend_Db_Select and the LIKE clause
This is a post I’ve wanted to write for a long time, perhaps it will be useful to others. It’s about using Zend_Db_Table_Select and the SQL LIKE statement. I remember it giving me some headaches in the past, so here it is: The problem is that Zend’s implementation is a bit counterintuitive, as the % […]
Paginating randomly ordered SQL results with Zend_Paginate
As some of you might already know, I’m working on my latest project, StoreBeez, which is a virtual mall where independent businesses and artisans can open an online store fast and easy, without having to pay any upfront costs. The products are also displayed on our frontpage. And since I don’t want to promote a […]
Uploadify on Zend Framework and the 302 error
Uploadify is an awesome script and it works like a charm. But – there’s always a but – sometimes it throws a mysterious 302 error. This happened to me all day long and it drove me crazy. Well, not really, I was already crazy 🙂 So, what to do when the HTTP 302 error pops? […]
Single error message for Zend_Validate_EmailAddress
One of the strong assets of Zend Framework is its rich built in package of validators. It has validators for just about anything, from simple email addresses and digits to credit card numbers and database rows. Yet, sometimes things go wrong and they need to be hacked back on track. Today’s problem was with the […]

Zend Framework Certified Engineer
This is a post I’ve been wanting to write for a while but I didn’t quite get the time to do it. It’s about me finally taking the ZF certification exam. I wanted to take this certification for over an year and a half, but first I postponed it because I was learning python and […]
Constants for table names
While working on a PHP project, I had the following idea: wouldn’t be better to use constants for table names? I mean, having a file, let’s say /application/config/tables.php, which would look something like:
1 |
define('TABLE_USERS', 'users'); |
And afterwards, use this value throughout the application: …in the associated Zend_Db_Table_Abstract
1 2 3 4 |
class Users extends Zend_Db_Table_Abstract { protected $_name = TABLE_USERS; } |
…in joins:
1 2 3 |
$this->select(Zend_Db_Table::SELECT_WITH_FROM_PART) ->setIntegrityCheck(false) ->join(TABLE_USERS, sprintf('%s.id = %s.user_id', TABLE_USERS, $this->_name)); |
…in the forms:
1 2 3 4 5 6 |
$validator = new Zend_Validate_Db_NoRecordExists( array( 'table' => TABLE_USERS, 'field' => 'email', ) ); |
This […]
Zend Framework and web hosting services
Let’s face it. We can’t all buy or rent our own servers. It’s not cost effective. So we turn to hosting companies – always the popular choice. But when you’re using an shared hosting service, you can’t make changes in the server’s configuration file. You usually get a writeable directory in a location like
1 |
/home/{your-username}/public_html/ |
[…]
Most commented