Posted by Henrik Hansen on 03/12/07 13:03
avlee <xx@wp.pl> writes:
> Hello
>
> I have a big class in one php file.
> I would like to divide it to many smaller files. But when i try:
>
> <?php
>
> class IndexController extends Zend_Controller_Action
> {
> require_once('IndexController_common.php');
> require_once('IndexController_client_car.php');
>
> i receive parse error:
> "Parse error: syntax error, unexpected T_REQUIRE_ONCE, expecting
> T_FUNCTION in
> /mnt/hda5/www/zend/dg/car/application/controllers/IndexController.php
> on line 6"
>
> When i move require_once outside class definition everything works
> fine. But i need require inside
> of class because in thouse files are functions which are the member of
> that class.
> How can i do it ?
Put them in __construct()
--
Henrik Hansen
Navigation:
[Reply to this message]
|