Blog

zend framework – it’s done when it’s done

Posted by:

Hooray! Zend framework has arrived!
If you haven’t heard the news yet (you should have read it by now in at least 100 of the thousands PHP developer blogs out there) I strongly recommend you to follow these steps:

  • Download the source
  • Browse the source
  • Read Andi Gutmans blog
  • Browse the source again
  • Subscribe to the mailing-list and post anything that comes into your mind regarding the design/architecture/implementation
  • (You can light up a candle now and praise the developers, but this point is optional and up to you)

It seems the maintainers are quite open to comments right now, as the ZF is in an early state and there is some room for changes suggested by the community.

I for myself can’t see why I would want to have this kind of methods in Zend_Filter:

PHP:

  1. /**

  2. * Returns dirname(value).

  3. *

  4. * @param mixed $value

  5. * @return mixed

  6. */

  7. public static function getDir($value)

  8. {

  9. return dirname($value);

  10. }

  11. /**

  12. * Returns (int) value.

  13. *

  14. * @param mixed $value

  15. * @return int

  16. */

  17. public static function getInt($value)

  18. {

  19. return (int) $value;

  20. }

  21. /**

  22. * Returns value with all tags removed.

  23. *

  24. * @param mixed $value

  25. * @return mixed

  26. */

  27. public static function noTags($value)

  28. {

  29. return strip_tags($value);

  30. }

  31. /**

  32. * Returns basename(value).

  33. *

  34. * @param mixed $value

  35. * @return mixed

  36. */

  37. public static function noPath($value)

  38. {

  39. return basename($value);

  40. }

Those methods do nothing else than providing wrappers around well-known native php functions, but I’m sure Chris had something in mind making those methods part of Zend_Filter.

Btw:
Now that it’s finally clear that ZF will not provide a class repository such as PEAR does, work on cucua will continue. We might step away from the idea to port the GNU Classpath Java API to PHP, since recent changes in the PHP community showed that there is no need for a bloated class library (which cucua is right now, I have to admit that) , rather than a a library which makes full use of the OO capabilities that ship with PHP5 and up.

0


About the Author

Thorsten is the author of the conjoon open source project and the Ext.ux.Livegrid component. In this blog he writes more or less frequently about his current projects and web development in general.

Add a Comment


Refresh