PhpRiot
Follow phpriot on Twitter
Sponsored Link
Download Article
Download this article or the entire “Eight Weeks of Prototype” series with all listings and files.




More information
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store
Free iPad/iPhone App
Available on the App Store

  • PHP manual
  • Zend Framework manual
  • Smarty manual
  • PHP articles
  • PHP training

Eight Weeks of Prototype: Week 3, Prototype Data Types

Creating Custom Enumerables

It is possible to create your own enumerated objects simply by defining a function called _each() when you create your own classes. Because we have not yet covered how to create classes in Prototype yet, I will leave discussion of this until we do so in the sixth article of this series.

In This Article