How does the Zend Framework handle controller names and routing, and what are common pitfalls in specifying controllers?

The Zend Framework uses a convention-based approach for mapping controller names to controller classes. By default, the framework expects controller names to be in the format of "ControllerNameController" and automatically maps them to the corresponding controller class. Common pitfalls in specifying controllers include incorrect naming conventions, missing controller classes, and incorrect routing configurations.

// Example of specifying a controller named "IndexController" in Zend Framework

// Controller class file: IndexController.php
class IndexController extends Zend_Controller_Action {
    // Controller actions
}

// Routing configuration in application.ini
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.defaultControllerName = "index"
resources.frontController.defaultAction = "index"