Jasig/phpCAS — Issue #8: Autoload class files
Author: adamfranco
Created: 2011-10-26 20:35:50+00:00
State: open
Labels: Enhancement

*[Migrated from PHPCAS-125](https://issues.jasig.org/browse/PHPCAS-125)*

Description
=========

Implement autoload for phpCAS using `spl_autoload_register()`. This will allow new classes to be added without adding `include_once()` lines to the `CAS_client`. It will also help us stay consistent with our naming conventions.

Using `spl_autoload_register()` will prevent conflicts with other packages' autoload functions.

Keep with the convention of the directory and filename mapping to the classname (replacing '/' with '_' and dropping the extension).

Joachim Fritschi added a comment - 18/Sep/11 7:28 AM
---------------------------------------------------------------------------

I have started working on an autoloader and it seems to work. :-) I opted for using the autoloader that simplecas is using. It works like a charm and the license is not really an issues since it's also BSD. We can replace it with something else if we really need to.

I had to rework quite a bit of the languages and some other class renames that were not in line with our naming standard.

Joachim Fritschi added a comment - 18/Sep/11 7:29 AM
---------------------------------------------------------------------------

All the work is in the [PHPCAS-125](https://github.com/Jasig/phpCAS/tree/PHPCAS-125) branch.