Hi Michal,

On Mon, Oct 26, 2009 at 6:02 PM, Michal Charemza
<[email protected]> wrote:
>
> This surprises me.  As:
>
> - It leads to inconsistent behaviour between OS X and Linux. For the
> model "Records" getModel('Records') and getModel('records') both work
> on OS X but only getModel('Records') on Linux. It took me a while to
> figure this one out when moving a project.

To your point of view, that may be inconsistent; however, this
behavior is consistent to others.

By default, Apples ships their machines with HFS+ volumes that are
case-insensitive, but case-preserving.  With this setup,
recordsModel.class.php will be stored correctly in its file system,
but you can access it via RecordsModel.class.php or
recordsmodel.class.php.

PHP is just a C application.  Thus, fread() or file_get_contents()
will use standard C calls such as fopen() underneath.  Under Mac OS X,
the C calls will not fail if it is given a wrong capitalization
because the file system doesn't care.  This is expected behavior.

By default, Linux and Unix systems use case-sensitive and
case-preserving file systems.  With this setup, recordsModel.class.php
and RecordsModel.class.php are two different files, and can co-exist
within a single directory.  In this environment, the C calls will fail
if it is given a wrong capitalization because the file system cares.
This is expected behavior.

In my world, as a FreeBSD user, getModel('records') should fail for
model "Records".  I strongly disagree that Agavi's behavior be changed
to adapt to wrong expected behavior.


Regards,

[ simon.cpu ]

_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to