sabberworm/PHP-CSS-Parser — Issue #32: PSR-0 compatibility
Author: cyberwolf
Created: 2011-12-04 09:04:22+00:00
State: open

Partially as a follow-up on #13, do you have any plans on making this library [PSR-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md) compatible? This would make it a lot easier to use the library in todays common PHP frameworks, and easily install it from a PEAR channel with the PEAR installer.

Really each single class should be moved to a separate file, and a properly structured hierarchy of either PHP 5.3 namespaces or PEAR-style named classes (with each _ in a class name being replaced by the directory separator when autoloading from the file system) established.

I personally would vote for dropping PHP 5.2 compatibility and use PHP 5.3 namespaces. Like this (supposing you might want to use Sabberworm as vendor name, but can be replaced with something else unique):

Sabberworm\CSS\List
Sabberworm\CSS\Document
Sabberworm\CSS\MediaQuery
...
Sabberworm\CSS\Parser

I am willing to help you making this move or do it entirely myself, as this library rocks and I'm eager to make it easier to use it.