PHP Autoloader Changelog
- 09/04/2010 Markus Malkusch
-
-
AbstractAutoloader::autoload()classes/AbstractAutoloader.phpAbstractAutoloader::autoload() checks also interface_exists() to skip its work.
-
AbstractAutoloader::autoload()classes/AbstractAutoloader.phpExceptions are never thrown as this breaks compatibility with functions like class_exists().
-
AutoloaderIndex::setContext()classes/index/AutoloaderIndex.phpIt is possible to define an own context for the index. This is useful if you want to build your index on a different system.
-
- 05/27/2010 Markus Malkusch
-
-
AutoloadAPIclasses/autoloadAPI/AutoloadAPI.phpBefore PHP 5.2.11 spl_autoload_functions() didn't return proper callbacks. The callback always contained the class name and a function. The object got lost in the stack. This prevented the Autoloader to work in such an environment. AutoloadAPI::getInstance() returns a wrapper for the spl_autoload methods which would work around this problem.
-
- 05/20/2010 Markus Malkusch
-
-
AbstractAutoloader::CLASS_CONSTRUCTORclasses/AbstractAutoloader.phpThe class constructor __static() is deprecated. The new class constructor is called classConstructor(). A method which is called __static() would violate the PEAR coding standard. Only PHP magic methods should be prefixed with a double underscore. Code which uses the old class constructor will still work. The autoloader would raise an E_USER_DEPRECATED warning for the deprecated class constructor __static().
-
- 05/18/2010 Markus Malkusch
-
-
AbstractAutoloader::loadClass()classes/AbstractAutoloader.phpThe include of the class definition used @ for error suppression. This avoided the useful output of fatal errors.
-
- 05/09/2010 Markus Malkusch
-
-
AutoloaderFileParser_RegExp::getClassesInSource()classes/parser/AutoloaderFileParser_RegExp.phpAutoloaderFileParser_RegExp has support for Namespaces.
-
- 05/08/2010 Markus Malkusch
-
-
AutoloaderFileParser_Tokenizer::getClassesInSource()classes/parser/AutoloaderFileParser_TokenizerThe Autoloader has support for Namespaces. Only the AutoloaderFileParser_Tokenizer is able to determine the namespace of a class. The AutoloaderFileParser_RegExp is yet not able to recognize namespaces. You can use any possible namespace declaration. The AutoloaderFileParser_Tokenizer can handle the braket syntax as well as the non braket syntaxt. Multiple namespace declarations in one file are no problem.
-
- 04/25/2010 Markus Malkusch
-
-
AutoloaderIndexFilter_RelativePathclasses/index/filter/AutoloaderIndexFilter_RelativePath.phpAn AutoloaderIndex can filter the paths which are stored or read with an AutoloaderIndexFilter. The AutoloaderIndexFilter_RelativePath stores relative paths in an index. With this filter and Autoloader::buildIndex() you can build an index in your developement environment and deploy the built index into your productive environment.
-
- 04/21/2010 Markus Malkusch
-
-
Autoloader::buildIndex()classes/Autoloader.phpAutoloader::buildIndex() iterates through all files in the class path and builds an index for all found classes. This index is still not really usable for deployment as it contains absolute paths.
-
AutoloaderFileParser::getClassesInFile()classes/parser/AutoloaderFileParser.phpThe Autoloader parser is able to return the list of found classes in a parsed file. This will be used in future to build an index before deployment in a productive environment.
-
- 04/16/2010 Markus Malkusch
-
-
Autoloader.phpAutoloader.phpAutoloader classes are required only once, even if you have several Autoloader packages in your application. This might happen if you use external libraries which use the Autoloader by them selves in their class paths.
-
- 04/15/2010 Markus Malkusch
-
-
AutoloaderIndex_CSVclasses/index/AutoloaderIndex_CSV.phpIndex implementation which produces a human readable CSV file.
-
- 04/14/2010 Markus Malkusch
-
-
AutoloaderIndex_Fileclasses/index/AutoloaderIndex_File.phpAutoloaderIndex_SerializedHashtable derives from AutoloaderIndex_File. This makes it easier to write a new Index implementation which uses an index file.
-
AutoloaderIndex_PHPArrayCodeclasses/index/AutoloaderIndex_PHPArrayCode.phpIndex implementation which produces a human readable file in PHP, which produces an array.
-
AutoloaderIndex_IniFileclasses/index/AutoloaderIndex_IniFile.phpIndex implementation which produces a human readable file with an array in a PHP ini file style.
-
- 04/10/2010 Markus Malkusch
-
-
Autoloader::__autoload()classes/Autoloader.phpThe search process is divided into first iterating through all indexes and then searching each path in the filesystem. This prevents in a multi Autoloader environment that before the index of a later Autoloader would be used the previous Autoloaders would vainly search their class paths.
-
AutoloaderIndex::getPaths()classes/index/AutoloaderIndex.phpFor debuging the index has to return an indexed array with its indexed paths.
-
- 01/09/2010 Markus Malkusch
-
-
AutoloaderFileIterator_PriorityListclasses/fileIterator/AutoloaderFileIterator_PriorityList.phpThe AutoloaderFileIterator_PriorityList prefers *.inc and *.php files. Additionally the prefered files are ordered by the Levenshtein distance to the class name. This is the default iterator.
-
AutoloaderFileIterator_SimpleCachedclasses/fileIterator/AutoloaderFileIterator_SimpleCached.phpOnce a AutoloaderFileIterator_Simple is completely iterated the found files are cached in an ArrayIterator.
-
Autoloader::setPath()classes/Autoloader.phpAutoloader::setPath() became private. The path is only set by the constructor. If the constructor is empty, the path will be guessed.
-
- 01/08/2010 Markus Malkusch
-
-
AbstractAutoloader::isRegistered()classes/AbstractAutoloader.phpUsing strict mode to avoid the endless recursion.
-
Autoloader::setFileIterator()classes/Autoloader.phpThe file search is using a dedicated object (AutoloaderFileIterator) for iterating through the filesystem. Therefore the methods addSkipPattern() and setSkipFilesize() are moved into the AutoloaderFileIterator class.
-
Autoloader::setPath()classes/Autoloader.phpThrows AutoloaderException_ClassPath if realpath() fails.
-
- 12/18/2009 Markus Malkusch
-
-
InternalAutoloader::remove()classes/Autoloader.phpAfter removing an Autoloader a previously by normalization removed Autoloader could become activated again.
-
- 12/15/2009 Markus Malkusch
-
-
InternalAutoloaderclasses/InternalAutoloader.phpInternal classes needed by the Autoloader itself are handled with the InternalAutolader.
-
Autoloader::registerInternalClass()classes/Autoloader.phpAutoloader::registerInternalClass() is deprecated and removed. InternalAutoloader::getInstance()->registerClass() is used instead.
-
OldPHPAPI::checkAPI()classes/OldPHPAPI.phpSome functions are missing in older PHP 5 APIs. If needed, these missing functions are implemented.
-
- 12/11/2009 Markus Malkusch
-
-
Autoloader::setPath()classes/Autoloader.phpFor each class path one single Autoloader instance is responsable. That allows to use individual configurations per class path and to reuse an index for common class paths in different projects. This is a major change which affects other classes and methods.
-
- 12/10/2009 Markus Malkusch
-
-
AutoloaderIndex::getContext()classes/index/AutoloaderIndex.phpClass paths are sorted for generating the context.
-
- 12/09/2009 Markus Malkusch
-
-
Autoloader::getNormalizeSearchPaths()classes/Autoloader.phpClass paths are normalized for searching. That means that class paths which are included in other class paths are removed.
-
- 12/08/2009 Markus Malkusch
-
-
Autoloader::searchPath()classes/Autoloader.phpEach searching for a class definition resets the max_execution_time.
-
AutoloaderFileParser::isClassInFile()classes/parser/AutoloaderFileParser.phpThe path for AutoloaderException_Parser_IO was wrong.
-
AutoloaderFileParser_Tokenizer::isClassInSource()classes/parser/AutoloaderFileParser_Tokenizer.phpIf the tokenizer fails it throws an AutoloaderException_Parser.
-
- 11/29/2009 Markus Malkusch
-
-
AutoloaderException_SearchFailed::getClass()classes/exception/AutoloaderException_SearchFailed.phpA method for getting the information which class couldn't be found.
-
- 11/27/2009 Markus Malkusch
-
-
AutoloaderIndex_SerializedHashtable::save()classes/index/AutoloaderIndex_SerializedHashtable.phpRaceconditions were possible during saving the index. Saving is done now atomically.
-