mam takie pliki w takich lokalizacjach
/xxx/application/forms/ContactForm /xxx/public/index.php /xxx/controllers/RegisterController.php
=============================
/xxx/application/forms/ContactForm
<?php class forms_ContactForm extends Zend_Form { public function __construct($options = null) { parent::__construct($options); $this->setName('contact_us'); $title = new Zend_Form_Element_Select('title'); $title->setLabel('Title') ->setRequired(true)->addValidator('NotEmpty', true); $firstName = new Zend_Form_Element_Text('firstName'); $firstName->setLabel('First name') ->setRequired(true) ->addValidator('NotEmpty'); $lastName = new Zend_Form_Element_Text('lastName'); $lastName->setLabel('Last name') ->setRequired(true) ->addValidator('NotEmpty'); $email = new Zend_Form_Element_Text('email'); $email->setLabel('Email address') ->addFilter('StringToLower') ->setRequired(true) ->addValidator('NotEmpty', true) ->addValidator('EmailAddress'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel('Contact us'); $lastName, $email, $submit)); } }
=============================
/xxx/controllers/RegisterController.php
public function indexAction() { $form = new forms_ContactForm(); // <========= tu sie wykrzacza
=============================
/xxx/public/index.php :
<?php // Set the initial include_path. You may need to change this to ensure that // Zend Framework is in the include_path; additionally, for performance // reasons, it's best to move this to your web server configuration or php.ini // for production. ))); // Define path to application directory // Define application environment /** Zend_Application */ require_once 'Zend/Application.php'; // Create application, bootstrap, and run $application = new Zend_Application( APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini' ); $application->bootstrap(); $application->run();