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

Declaring Getopt Rules

The constructor for the Zend_Console_Getopt class takes from one to three arguments. The first argument declares which options are supported by your application. This class supports alternative syntax forms for declaring the options. See the sections below for the format and usage of these syntax forms.

The constructor takes two more arguments, both of which are optional. The second argument may contain the command-line arguments. This defaults to $_SERVER['argv'].

The third argument of the constructor may contain an configuration options to customize the behavior of Zend_Console_Getopt. See Adding Configuration for reference on the options available.

Zend Framework