Here are a few more examples of renaming the top-level class/sub-class
names:

 Zend_Acl_Role          => Zend_Acl_Role_Role
Zend_Acl_Resource      => Zend_Acl_Resource_Resource
Zend_Cache             => Zend_Cache_Cache
Zend_Cache_Backend     => Zend_Cache_Cache_Backend_Backend
Zend_Db                => Zend_Db_Db
Zend_Db_Profiler       => Zend_Db_Profiler_Profiler
Zend_Db_Select         => Zend_Db_Select_Select
Zend_Db_Statement      => Zend_Db_Statement_Statement
Zend_Db_Adapter_Oracle => Zend_Db_Adapter_Oracle_Oracle
Zend_Db_Table_Row      => Zend_Db_Table_Row_Row
Zend_Locale_Data       => Zend_Locale_Data_Data
...
...


As you can see, it's just the top-level class/sub-class names that are
getting renamed while the directories are getting more and more organized.
For instance, currently the Zend/Db/Adapter/Db2, Zend/Db/Adapter/Oracle and
Zend/Db/Table/Row folders have just one file each: Exception.php. After the
change, they would additionally have Db2.php, Oracle.php and Row.php -
relevantly. It's like taking the PEAR naming-convention to the next (Java
packages) level.

Regards,




On 2/27/07, Art Hundiak <[EMAIL PROTECTED]> wrote:


Really no need to tell if a given name represents a package or not.
Zend
..Filter
....Filter.php contains Zend_Filter_Filter
....Alpha.php contains Zend_Filter_Alpha

So the only change is the name of the top level class in a package.  The
autoload routine remains unchanged.

And of course if there was a module that was more or less independent from
the other filter modules (perhaps some code for a specific language) then
you could make is a subpackage.

It really does make sense and except for doubling up some of the top level
class names has no impact on the current design.



Stanislav Malyshev wrote:
>
>> The problem is that in Zend/ directory there are a lot of php files:
>
> Ok, there is. Why it is a problem though?
>
>> It would be much better to move them to:
>> Acl/Acl.php
>
> Ok, and Zend_Acl_Adapter would be in Acl/Adapter/Adapter.php or in
> Acl/Adapter.php? If the former - how it's not directory per file? If the
> latter, why Zend_Acl gets subdirectory and Zend_Acl_Adapter not and how
> one is to know that by the name?
>
>> So this means that all package files would be in package directory. If
u
>> need only one package u take the package directory.
>
> How do I know Zend_Foo_Bar_Baz is a package or part of Zend_Foo_Bar
> package or part of Zend_Foo package?
>
>> If file is in a directory - it is in package, and u know package
>> name[directory name]
>
> How do I know the directory name? You seem to have different rules for
> "packages" and "not packages" but I fail to see how do you know the name
> is package or not.
> --
> Stanislav Malyshev, Zend Products Engineer
> [EMAIL PROTECTED]  http://www.zend.com/
>
>
>

--
View this message in context:
http://www.nabble.com/Request-for-feedback%3A-moving-Zend.php-to-Zend-Zend.php-tf3290016s16154.html#a9190465
Sent from the Zend Framework mailing list archive at Nabble.com.


Reply via email to