For Programmers: Free Programming Magazines  


Home > Archive > PHP PEAR Questions and Answers > July 2005 > 1 file / 1 class == 2 headers









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author 1 file / 1 class == 2 headers
bertrand Gugger

2005-07-31, 8:59 am

Hi QAs !
Why 1 class = 1 file, why 2 headers ?
1 CLASS == 1 FILE ! Let scripts do ... the 2 headers :)

As I multiplied headers for Text_Wiki ...
where we have very little classes but ... (in work)
(5 parsers + 6 renderers) * (43 rules, potentially)

er ... 473 files possibly ?

I don't want to do 956 headers , neither 473 ...

I did not do Text_Wiki, but it has all my agreement.
The multiplication of rules cannot be handled in this structure.
(yes I would use arrays)

That's not necessary here, to have a class each correspondance
.... but we need to be able to redefine as precisely we want ...
and come for certain correspondances to *1* class.

We could need (for now) a few 100 headers,

Is the 1 class / 1 file so necesseray ?
Couldn't we agree of a finer separator ?
(yes _autoload is important for weak scripting)
a "_" in class name is a DIRECTORY_SEPARATOR in path ... ok
'-' usable ?

à+
--
bertrand "toggg" Gugger
Paul Jones

2005-07-31, 5:16 pm

Hi Bertrand -- I don't mean to be dumb, but I don't understand what =20
you're getting at here.


On Jul 31, 2005, at 8:53 AM, bertrand Gugger wrote:

> Hi QAs !
> Why 1 class =3D 1 file, why 2 headers ?
> 1 CLASS =3D=3D 1 FILE ! Let scripts do ... the 2 headers :)
>
> As I multiplied headers for Text_Wiki ...
> where we have very little classes but ... (in work)
> (5 parsers + 6 renderers) * (43 rules, potentially)
>
> er ... 473 files possibly ?
>
> I don't want to do 956 headers , neither 473 ...
>
> I did not do Text_Wiki, but it has all my agreement.
> The multiplication of rules cannot be handled in this structure.
> (yes I would use arrays)
>
> That's not necessary here, to have a class each correspondance
> ... but we need to be able to redefine as precisely we want ...
> and come for certain correspondances to *1* class.
>
> We could need (for now) a few 100 headers,
>
> Is the 1 class / 1 file so necesseray ?
> Couldn't we agree of a finer separator ?
> (yes _autoload is important for weak scripting)
> a "_" in class name is a DIRECTORY_SEPARATOR in path ... ok
> '-' usable ?
>
> =E0+
> --=20
> bertrand "toggg" Gugger
>






--

Paul M. Jones <http://paul-m-jones.com>

Solar: Simple Object Library and Application Repository
for PHP5. <http://solarphp.com>

Savant: The simple, elegant, and powerful alternative to
Smarty for templates in PHP. <http://phpsavant.com>
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com