ZF-1172: option names do not follow coding standard
Description
automaticSerialization
cacheDir
writeControl
automaticCleaningFactor
etc.
See: Naming Conventions
automaticSerialization
cacheDir
writeControl
automaticCleaningFactor
etc.
See: Naming Conventions
Comments
Posted by Fabien MARTY (fab) on 2007-03-30T11:52:54.000+0000
sorry but I didn't found anything about option option names in your link.
can you provide an example ?
Posted by Gavin (gavin) on 2007-03-30T12:12:10.000+0000
{quote} h2. Naming Conventions
h3. Abstractions Used in API (Class Interfaces)
When creating an API for use by application developers (as opposed to Zend Framework internal developers), if application developers must identify abstractions using a compound name, separate the names using underscores, not camelCase. For example, the name used for the MySQL PDO driver is 'pdo_mysql', not 'pdoMysql'. When the developer uses a string, normalize it to lowercase. Where reasonable, add constants to support this (e.g. PDO_MYSQL). {quote}
I only mention this because Andi asked me to make the same changes to the options of Zend_Db last Summer.
Posted by Bill Karwin (bkarwin) on 2007-04-04T12:59:05.000+0000
I've been making camelCase option names in Zend_Db and other places too. But I use UPPER_CASE_WITH_UNDERSCORES for constant names. We should reconsider a policy that strings that form option names must follow a certain capitalization. I'll talk with Andi about this.
Posted by Gavin (gavin) on 2007-04-04T13:08:15.000+0000
FYI, We had a long discussion last Summer and decided specifically to make option names case-insensitive. Most of the ZF seems to follow that standard already.