PSR Namespaced version

14 views
Skip to first unread message

Cliff Ingham

unread,
Feb 19, 2014, 11:36:29 AM2/19/14
to php-sol...@googlegroups.com
Is there any interest in a PSR autoloading version of this library?  I'd be willing to give it a go, if only to avoid rewriting my code to work with Solarium.

I guess I'm only avoiding Solarium because of it's dependencies on even more libraries, and because of the need to rewrite my existing application code.

Donovan Jimenez

unread,
Feb 19, 2014, 12:22:43 PM2/19/14
to php-sol...@googlegroups.com
The library doesn't use namespaces, as mandated by PSR-0, however, it should still be autoloadable by a PSR-0 compliant autoloader because it does follow the pre-namespace compatibility conventions of 
  • Each _ character in the CLASS NAME is converted to a DIRECTORY_SEPARATOR. The _ character has no special meaning in the namespace.
  • The fully-qualified namespace and class is suffixed with .php when loading from the file system.


So if you have registered such an autoloader, and put the parent directory containing the library on the include path. Then you should have no troubles (we autoload this way ourselves). 

I don't personally have any immediate interest in moving to true namespaces as it sets a more restrictive minimum php version than we have currently. 





On Wed, Feb 19, 2014 at 11:36 AM, Cliff Ingham <ing...@gmail.com> wrote:
Is there any interest in a PSR autoloading version of this library?  I'd be willing to give it a go, if only to avoid rewriting my code to work with Solarium.

I guess I'm only avoiding Solarium because of it's dependencies on even more libraries, and because of the need to rewrite my existing application code.

--
You received this message because you are subscribed to the Google Groups "PHP Solr Client" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-solr-clie...@googlegroups.com.
To post to this group, send email to php-sol...@googlegroups.com.
Visit this group at http://groups.google.com/group/php-solr-client.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages