/** * Initializes an index with an Autoloader and for * AutoloaderIndex_File instances with an index path * * @param AutoloaderIndex $index The index which should be initialized * * @return void */ private function _initIndex(AutoloaderIndex $index) { $index->setAutoloader(new Autoloader()); if ($index instanceof AutoloaderIndex_File) { $index->setIndexPath($this->_getIndexFile()); } }
/** * Inserts an amount of classes into an empty index * * @param AutoloaderIndex $index An instance of AutoloaderIndex * @param int $count the amount of classes for the index * * @see _createIndexes() * @return void */ private function _fillIndex(AutoloaderIndex $index, $count) { for ($i = 0; $i < $count; $i++) { $index->setPath($this->_getIndexedClassName($i), uniqid()); } $index->save(); }