[Php-it] php, oop e caricare le classi all'inizio dello script...
Daniele P.
php at tovel.it
Wed Mar 1 12:03:37 CET 2006
On Wednesday 01 March 2006 11:53, Cristiano Verondini wrote:
> Non ho ancora trovato una soluzione che mi soddisfi appieno, ma
> il caricamento su 'richiesta' mi sembra la strada migliore.
>
> Cris
Ciao,
una cosa del genere si trova negli ez components, che lavorano con php5:
http://ez.no/products/ez_components/ez_components_technical_details
http://ez.no/community/articles/an_introduction_to_ez_components
Tanto per dare un'idea copio due righe:
Autoload Environment
[...]
You don't have to use any require or include statements for any of the
eZ components classes that you use
[...]
Therefore, you should add the following code on top of your PHP script:
<?php
require_once "Base/base.php"; // dependent on installation method
function __autoload( $className )
{
ezcBase::autoload( $className );
}
// your code here
?>
Non gli ho adoperati molto, ma quel (poco) che promettono mantengono.
Daniele P.
More information about the Php-it
mailing list