Issues

ZF-1172: option names do not follow coding standard

Issue Type: Coding Standards Violation Created: 2007-03-29T19:44:22.000+0000 Last Updated: 2007-07-05T14:44:01.000+0000 Status: Resolved Fix version(s): Reporter: Gavin (gavin) Assignee: Fabien MARTY (fab) Tags: - Zend_Cache

Related issues: Attachments:

Description

<pre class="highlight">
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.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts