Re: [PHP-DEV] Re: [RFC] [Discussion] Class Naming

2017-07-03 Thread Fleshgrinder
On 7/3/2017 7:18 PM, Niklas Keller wrote: > While true, most applications actually depend on the case for class > names because of autoloaders. > > Regards, Niklas > Nobody is auto-loading internal classes, they are auto-loaded by PHP. That is the only thing this vote is about. PS: Note that

Re: [PHP-DEV] Re: [RFC] [Discussion] Class Naming

2017-07-03 Thread Niklas Keller
2017-07-03 17:53 GMT+02:00 Fleshgrinder : > On 7/3/2017 5:30 PM, Andreas Treichel wrote: > > With any exception from PascalCase you cannot e.g. generate class names > > from strings without a explicit mapping table: > > > > > > > function findParserByRootNode(DomDocument

Re: [PHP-DEV] Re: [RFC] [Discussion] Class Naming

2017-07-03 Thread Fleshgrinder
On 7/3/2017 5:30 PM, Andreas Treichel wrote: > With any exception from PascalCase you cannot e.g. generate class names > from strings without a explicit mapping table: > > > function findParserByRootNode(DomDocument $document) > { > $tagName = $document->documentElement->tagName; >

[PHP-DEV] Re: [RFC] [Discussion] Class Naming

2017-07-03 Thread Andreas Treichel
With any exception from PascalCase you cannot e.g. generate class names from strings without a explicit mapping table: documentElement->tagName; $className = ucfirst($tagName) . 'Parser'; if (!class_exists($className)) { throw new RuntimeException('Parser not found for