*
 * @category   PHP
 * @package    Autoloader
 * @subpackage Index
 * @author     Markus Malkusch <*****@*****.**>
 * @copyright  2009 - 2010 Markus Malkusch
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    SVN: $Id: AutoloaderIndex_SerializedHashtable_GZ.php,v 1.5 2011/01/11 14:25:31 nicke Exp $
 * @link       http://php-autoloader.malkusch.de/en/
 */
/**
 * The parent class is needed.
 */
InternalAutoloader::getInstance()->registerClass('AutoloaderIndex_SerializedHashtable', dirname(__FILE__) . '/AutoloaderIndex_SerializedHashtable.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_Index_IO', dirname(__FILE__) . '/exception/AutoloaderException_Index_IO.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_Index_IO_FileNotExists', dirname(__FILE__) . '/exception/AutoloaderException_Index_IO_FileNotExists.php');
/**
 * Extends AutoloaderIndex_SerializedHashtable by compressing the
 * serialized hashtable
 *
 * This index works similar to AutoloaderIndex_SerializedHashtable. Its only
 * difference is that the index file is compressed. In environments with
 * a hugh count of class definitions a plain text index file would produce
 * too much IO costs.
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage Index
 * @author     Markus Malkusch <*****@*****.**>
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    Release: 1.11
 * along with this program.
 * If not, see <http://php-autoloader.malkusch.de/en/license/>.
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage Index
 * @author     Markus Malkusch <*****@*****.**>
 * @copyright  2009 - 2010 Markus Malkusch
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    SVN: $Id$
 * @link       http://php-autoloader.malkusch.de/en/
 */
/**
 * The parent class is needed.
 */
InternalAutoloader::getInstance()->registerClass('AutoloaderIndex_File', dirname(__FILE__) . '/AutoloaderIndex_File.php');
/**
 * Implements AutoloaderIndex_File with PHP code
 *
 * This index is working in every PHP environment. It should be fast enough
 * for most applications. The index is a file in the temporary directory.
 * The content of this file is PHP code which produces the index.
 *
 * This implementation uses eval() to execute the code of the index file.
 * If other users have access to the index file your application might
 * easily compromitted by this index. This index should really not be used!
 *
 * This implementation is threadsafe.
 *
 * @category   PHP
 * @package    Autoloader
 * @category   PHP
 * @package    Autoloader
 * @subpackage Index
 * @author     Markus Malkusch <*****@*****.**>
 * @copyright  2009 - 2010 Markus Malkusch
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    SVN: $Id$
 * @link       http://php-autoloader.malkusch.de/en/
 */
namespace malkusch\autoloader;

/**
 * These classes must be loaded.
 */
InternalAutoloader::getInstance()->registerClass('AutoloaderIndexFilter', __DIR__ . '/AutoloaderIndexFilter.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_Index_Filter_RelativePath_InvalidBasePath', __DIR__ . '/exception/AutoloaderException_Index_Filter_RelativePath_InvalidBasePath.php');
/**
 * Transforms absolute paths into relative paths and vice versa
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage Index
 * @author     Markus Malkusch <*****@*****.**>
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    Release: 1.12
 * @link       http://php-autoloader.malkusch.de/en/
 * @see        AutoloaderIndex::addFilter()
 * @see        AutoloaderIndex::getPath()
 * @see        AutoloaderIndex::setPath()
 */
class AutoloaderIndexFilter_RelativePath implements AutoloaderIndexFilter
 * along with this program.
 * If not, see <http://php-autoloader.malkusch.de/en/license/>.
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage Exception
 * @author     Markus Malkusch <*****@*****.**>
 * @copyright  2009 - 2010 Markus Malkusch
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    SVN: $Id$
 * @link       http://php-autoloader.malkusch.de/en/
 */
/**
 * The parent class must be loaded.
 */
InternalAutoloader::getInstance()->registerClass('AutoloaderException', dirname(__FILE__) . '/AutoloaderException.php');
/**
 * Raised if searching for a class fails
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage Exception
 * @author     Markus Malkusch <*****@*****.**>
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    Release: 1.11
 * @link       http://php-autoloader.malkusch.de/en/
 * @see        Autoloader::searchPath()
 */
class AutoloaderException_SearchFailed extends AutoloaderException
{
    private $_class = '';
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage Index
 * @author     Markus Malkusch <*****@*****.**>
 * @copyright  2009 - 2010 Markus Malkusch
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    SVN: $Id$
 * @link       http://php-autoloader.malkusch.de/en/
 */
namespace malkusch\autoloader;

/**
 * The parent class is needed.
 */
InternalAutoloader::getInstance()->registerClass('AutoloaderIndex_File', __DIR__ . '/AutoloaderIndex_File.php');
/**
 * Implements AutoloaderIndex_File with a CSV file
 *
 * This index is working in every PHP environment. It should be fast enough
 * for most applications. The index is a file in the temporary directory.
 * The content of this file is a CSV file.
 *
 * This implementation is threadsafe.
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage Index
 * @author     Markus Malkusch <*****@*****.**>
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    Release: 1.12
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage Exception
 * @author     Markus Malkusch <*****@*****.**>
 * @copyright  2009 - 2010 Markus Malkusch
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    SVN: $Id$
 * @link       http://php-autoloader.malkusch.de/en/
 */
namespace malkusch\autoloader;

/**
 * The parent class must be loaded.
 */
InternalAutoloader::getInstance()->registerClass('AutoloaderException_Configuration_Setting', __DIR__ . '/AutoloaderException_Configuration_Setting.php');
/**
 * Object creation error
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage Exception
 * @author     Markus Malkusch <*****@*****.**>
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    Release: 1.12
 * @link       http://php-autoloader.malkusch.de/en/
 * @see        AutoloaderConfiguration::getObject()
 */
class AutoloaderException_Configuration_Setting_Object extends AutoloaderException_Configuration_Setting
{
}
Exemple #7
0
 * If not, see <http://php-autoloader.malkusch.de/en/license/>.
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage Index
 * @author     Markus Malkusch <*****@*****.**>
 * @copyright  2009 - 2010 Markus Malkusch
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    SVN: $Id: AutoloaderIndex_PDO.php,v 1.5 2011/01/11 14:25:31 nicke Exp $
 * @link       http://php-autoloader.malkusch.de/en/
 */
/**
 * The parent class is needed.
 */
InternalAutoloader::getInstance()->registerClass('AutoloaderIndex', dirname(__FILE__) . '/AutoloaderIndex.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_Index_NotFound', dirname(__FILE__) . '/exception/AutoloaderException_Index_NotFound.php');
/**
 * Implements AutoloaderIndex with PDO
 *
 * This index uses a PDO object to store its data in any
 * database wich understands SQL. There is no need to
 * create any table. The index creates its structure by itself.
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage Index
 * @author     Markus Malkusch <*****@*****.**>
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    Release: 1.11
 * @link       http://php-autoloader.malkusch.de/en/
 * @see        Autoloader::setIndex()
Exemple #8
0
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage Parser
 * @author     Markus Malkusch <*****@*****.**>
 * @copyright  2009 - 2010 Markus Malkusch
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    SVN: $Id: AutoloaderFileParser.php,v 1.4 2011/01/11 14:25:31 nicke Exp $
 * @link       http://php-autoloader.malkusch.de/en/
 */
/**
 * These classes must be loaded.
 */
InternalAutoloader::getInstance()->registerClass('AutoloaderException_Parser_IO', dirname(__FILE__) . '/exception/AutoloaderException_Parser_IO.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderFileParser_Tokenizer', dirname(__FILE__) . '/AutoloaderFileParser_Tokenizer.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderFileParser_RegExp', dirname(__FILE__) . '/AutoloaderFileParser_RegExp.php');
/**
 * An abstract parser for class definitions
 *
 * An implementation of this class should be able to parse a file and
 * find a class definition.
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage Parser
 * @author     Markus Malkusch <*****@*****.**>
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    Release: 1.11
 * @link       http://php-autoloader.malkusch.de/en/
 * @see        Autoloader::searchPath()
 */
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage FileIterator
 * @author     Markus Malkusch <*****@*****.**>
 * @copyright  2009 - 2010 Markus Malkusch
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    SVN: $Id$
 * @link       http://php-autoloader.malkusch.de/en/
 */
namespace malkusch\autoloader;

/**
 * This class must be loaded.
 */
InternalAutoloader::getInstance()->registerClass('Autoloader', __DIR__ . '/../Autoloader.php');
/**
 * Finds potential files with class definitions
 *
 * As AutoloaderFileIterator implements the Iterator interface iterating through
 * a class path recursively is as simple as:
 *
 * <code>
 * <?php
 *
 * foreach ($fileIterator as $path) {
 *
 * }
 * </code>
 *
 * @category   PHP
 * @category   PHP
 * @package    Autoloader
 * @subpackage Parser
 * @author     Markus Malkusch <*****@*****.**>
 * @copyright  2009 - 2010 Markus Malkusch
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    SVN: $Id$
 * @link       http://php-autoloader.malkusch.de/en/
 */
namespace malkusch\autoloader;

/**
 * These class must be loaded.
 */
InternalAutoloader::getInstance()->registerClass("AutoloaderException_Parser", __DIR__ . "/exception/AutoloaderException_Parser.php");
InternalAutoloader::getInstance()->registerClass("AutoloaderFileParser", __DIR__ . "/AutoloaderFileParser.php");
/**
 * A reliable AutoloaderFileParser implementation which uses PHP's tokenizer
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage Parser
 * @author     Markus Malkusch <*****@*****.**>
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    Release: 1.12
 * @link       http://php-autoloader.malkusch.de/en/
 * @see        Autoloader::searchPath()
 * @see        token_get_all()
 */
class AutoloaderFileParser_Tokenizer extends AutoloaderFileParser
{
 * @package    Autoloader
 * @subpackage Parser
 * @author     Markus Malkusch <*****@*****.**>
 * @copyright  2009 - 2010 Markus Malkusch
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    SVN: $Id$
 * @link       http://php-autoloader.malkusch.de/en/
 */
namespace malkusch\autoloader;

/**
 * These classes must be loaded.
 */
InternalAutoloader::getInstance()->registerClass('AutoloaderException_Parser_IO', __DIR__ . '/exception/AutoloaderException_Parser_IO.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderFileParser_Tokenizer', __DIR__ . '/AutoloaderFileParser_Tokenizer.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderFileParser_RegExp', __DIR__ . '/AutoloaderFileParser_RegExp.php');
/**
 * An abstract parser for class definitions
 *
 * An implementation of this class should be able to parse a file and
 * find a class definition.
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage Parser
 * @author     Markus Malkusch <*****@*****.**>
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    Release: 1.12
 * @link       http://php-autoloader.malkusch.de/en/
 * @see        Autoloader::searchPath()
 */
Exemple #12
0
        }
    }
}
/**
 * These classes are needed by the Autoloader itself.
 * They have to be registered statically.
 */
InternalAutoloader::getInstance()->registerClass('AutoloaderIndex', dirname(__FILE__) . '/index/AutoloaderIndex.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_SearchFailed', dirname(__FILE__) . '/exception/AutoloaderException_SearchFailed.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_SearchFailed_EmptyClassPath', dirname(__FILE__) . '/exception/AutoloaderException_SearchFailed_EmptyClassPath.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_Include', dirname(__FILE__) . '/exception/AutoloaderException_Include.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_Include_FileNotExists', dirname(__FILE__) . '/exception/AutoloaderException_Include_FileNotExists.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_Include_ClassNotDefined', dirname(__FILE__) . '/exception/AutoloaderException_Include_ClassNotDefined.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_ClassPath', dirname(__FILE__) . '/exception/AutoloaderException_ClassPath.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_ClassPath_NotExists', dirname(__FILE__) . '/exception/AutoloaderException_ClassPath_NotExists.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_Index_NotDefined', dirname(__FILE__) . '/index/exception/AutoloaderException_Index_NotDefined.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_GuessPathFailed', dirname(__FILE__) . '/index/exception/AutoloaderException_GuessPathFailed.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderIndex_Dummy', dirname(__FILE__) . '/index/AutoloaderIndex_Dummy.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderIndex_PDO', dirname(__FILE__) . '/index/AutoloaderIndex_PDO.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderIndex_CSV', dirname(__FILE__) . '/index/AutoloaderIndex_CSV.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderIndex_IniFile', dirname(__FILE__) . '/index/AutoloaderIndex_IniFile.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderIndex_PHPArrayCode', dirname(__FILE__) . '/index/AutoloaderIndex_PHPArrayCode.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderIndex_SerializedHashtable', dirname(__FILE__) . '/index/AutoloaderIndex_SerializedHashtable.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderIndex_SerializedHashtable_GZ', dirname(__FILE__) . '/index/AutoloaderIndex_SerializedHashtable_GZ.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderFileParser', dirname(__FILE__) . '/parser/AutoloaderFileParser.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderFileIterator_Simple', dirname(__FILE__) . '/fileIterator/AutoloaderFileIterator_Simple.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderFileIterator_SimpleCached', dirname(__FILE__) . '/fileIterator/AutoloaderFileIterator_SimpleCached.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderFileIterator_PriorityList', dirname(__FILE__) . '/fileIterator/AutoloaderFileIterator_PriorityList.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_IndexBuildCollision', dirname(__FILE__) . '/exception/AutoloaderException_IndexBuildCollision.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderIndexFilter_RelativePath', dirname(__FILE__) . '/index/filter/AutoloaderIndexFilter_RelativePath.php');
 * @link      http://php-autoloader.malkusch.de/en/
 */
namespace malkusch\autoloader;

/**
 * fix PHP version 
 */
include_once __DIR__ . "/../Autoloader/OldPHPAPI.php";
$__oldAPI = new OldPHPAPI();
$__oldAPI->checkAPI();
unset($__oldAPI);
/**
 * Autoloader classes
 */
require __DIR__ . "/../Autoloader/Autoloader.php";
InternalAutoloader::getInstance()->registerClass("AutoloaderBuilder", __DIR__ . "/../Autoloader/AutoloaderBuilder.php");
/**
 * Run the script
 */
$_script = new AutoloaderBuildScript();
$_script->run();
/**
 * run() might kill the script. So the following code might not be executed.
 * Who cares?
 */
unset($_script);
/**
 * Build script
 *
 * @category PHP
 * @package  Autoloader
 * @category   PHP
 * @package    Autoloader
 * @subpackage Index
 * @author     Markus Malkusch <*****@*****.**>
 * @copyright  2009 - 2010 Markus Malkusch
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    SVN: $Id$
 * @link       http://php-autoloader.malkusch.de/en/
 */
namespace malkusch\autoloader;

/**
 * These classes are needed.
 */
InternalAutoloader::getInstance()->registerClass('AutoloaderIndex', __DIR__ . '/AutoloaderIndex.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_Index_NotFound', __DIR__ . '/exception/AutoloaderException_Index_NotFound.php');
/**
 * A dummy implementation without any persistent abilities
 *
 * There is no sense except testing in using this index.
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage Index
 * @author     Markus Malkusch <*****@*****.**>
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    Release: 1.12
 * @link       http://php-autoloader.malkusch.de/en/
 * @see        Autoloader::setIndex()
 * @see        Autoloader::getIndex()
 */
/**
 * These classes are needed by the Autoloader itself.
 * They have to be registered statically.
 */
InternalAutoloader::getInstance()->registerClass('AutoloaderIndex', __DIR__ . '/index/AutoloaderIndex.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_SearchFailed', __DIR__ . '/exception/AutoloaderException_SearchFailed.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_SearchFailed_EmptyClassPath', __DIR__ . '/exception/AutoloaderException_SearchFailed_EmptyClassPath.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_Include', __DIR__ . '/exception/AutoloaderException_Include.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_Include_FileNotExists', __DIR__ . '/exception/AutoloaderException_Include_FileNotExists.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_Include_ClassNotDefined', __DIR__ . '/exception/AutoloaderException_Include_ClassNotDefined.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_ClassPath', __DIR__ . '/exception/AutoloaderException_ClassPath.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_ClassPath_NotExists', __DIR__ . '/exception/AutoloaderException_ClassPath_NotExists.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_Index_NotDefined', __DIR__ . '/index/exception/AutoloaderException_Index_NotDefined.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_GuessPathFailed', __DIR__ . '/index/exception/AutoloaderException_GuessPathFailed.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderIndex_Dummy', __DIR__ . '/index/AutoloaderIndex_Dummy.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderIndex_PDO', __DIR__ . '/index/AutoloaderIndex_PDO.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderIndex_CSV', __DIR__ . '/index/AutoloaderIndex_CSV.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderIndex_IniFile', __DIR__ . '/index/AutoloaderIndex_IniFile.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderIndex_PHPArrayCode', __DIR__ . '/index/AutoloaderIndex_PHPArrayCode.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderIndex_SerializedHashtable', __DIR__ . '/index/AutoloaderIndex_SerializedHashtable.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderIndex_SerializedHashtable_GZ', __DIR__ . '/index/AutoloaderIndex_SerializedHashtable_GZ.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderIndex_Memcache', __DIR__ . '/index/AutoloaderIndex_Memcache.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderFileParser', __DIR__ . '/parser/AutoloaderFileParser.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderFileIterator_Simple', __DIR__ . '/fileIterator/AutoloaderFileIterator_Simple.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderFileIterator_SimpleCached', __DIR__ . '/fileIterator/AutoloaderFileIterator_SimpleCached.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderFileIterator_PriorityList', __DIR__ . '/fileIterator/AutoloaderFileIterator_PriorityList.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_IndexBuildCollision', __DIR__ . '/exception/AutoloaderException_IndexBuildCollision.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderIndexFilter_RelativePath', __DIR__ . '/index/filter/AutoloaderIndexFilter_RelativePath.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderConfiguration', __DIR__ . '/AutoloaderConfiguration.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderLocale', __DIR__ . '/locale/AutoloaderLocale.php');
 * along with this program.
 * If not, see <http://php-autoloader.malkusch.de/en/license/>.
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage FileIterator
 * @author     Markus Malkusch <*****@*****.**>
 * @copyright  2009 - 2010 Markus Malkusch
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    SVN: $Id: AutoloaderFileIterator.php,v 1.5 2011/01/11 19:42:31 nicke Exp $
 * @link       http://php-autoloader.malkusch.de/en/
 */
/**
 * This class must be loaded.
 */
InternalAutoloader::getInstance()->registerClass('Autoloader', dirname(__FILE__) . '/../Autoloader.php');
/**
 * Finds potential files with class definitions
 *
 * As AutoloaderFileIterator implements the Iterator interface iterating through
 * a class path recursively is as simple as:
 *
 * <code>
 * <?php
 *
 * foreach ($fileIterator as $path) {
 *
 * }
 * </code>
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage Index
 * @author     Markus Malkusch <*****@*****.**>
 * @copyright  2009 - 2010 Markus Malkusch
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    SVN: $Id$
 * @link       http://php-autoloader.malkusch.de/en/
 */
namespace malkusch\autoloader;

/**
 * The parent class is needed.
 */
InternalAutoloader::getInstance()->registerClass('AutoloaderIndex_SerializedHashtable', __DIR__ . '/AutoloaderIndex_SerializedHashtable.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_Index_IO', __DIR__ . '/exception/AutoloaderException_Index_IO.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_Index_IO_FileNotExists', __DIR__ . '/exception/AutoloaderException_Index_IO_FileNotExists.php');
/**
 * Extends AutoloaderIndex_SerializedHashtable by compressing the
 * serialized hashtable
 *
 * This index works similar to AutoloaderIndex_SerializedHashtable. Its only
 * difference is that the index file is compressed. In environments with
 * a hugh count of class definitions a plain text index file would produce
 * too much IO costs.
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage Index
 * @author     Markus Malkusch <*****@*****.**>
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    Release: 1.12
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage FileIterator
 * @author     Markus Malkusch <*****@*****.**>
 * @copyright  2009 - 2010 Markus Malkusch
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    SVN: $Id$
 * @link       http://php-autoloader.malkusch.de/en/
 */
namespace malkusch\autoloader;

/**
 * The parent class must be loaded.
 */
InternalAutoloader::getInstance()->registerClass('AutoloaderFileIterator', __DIR__ . '/AutoloaderFileIterator.php');
/**
 * Searches all files without any logic
 *
 * It uses RecursiveDirectoryIterator.
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage FileIterator
 * @author     Markus Malkusch <*****@*****.**>
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    Release: 1.12
 * @link       http://php-autoloader.malkusch.de/en/
 * @see        Autoloader::searchPath()
 */
class AutoloaderFileIterator_Simple extends AutoloaderFileIterator
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage Index
 * @author     Markus Malkusch <*****@*****.**>
 * @copyright  2009 - 2010 Markus Malkusch
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    SVN: $Id$
 * @link       http://php-autoloader.malkusch.de/en/
 */
namespace malkusch\autoloader;

/**
 * The parent class must be loaded.
 */
InternalAutoloader::getInstance()->registerClass('AutoloaderException_Index', __DIR__ . '/../../exception/AutoloaderException_Index.php');
/**
 * Thrown by AutoloaderIndexFilter
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage Index
 * @author     Markus Malkusch <*****@*****.**>
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    Release: 1.12
 * @link       http://php-autoloader.malkusch.de/en/
 * @see        AutoloaderIndexFilter
 * @see        AutoloaderIndex::getPath()
 * @see        AutoloaderIndex::setPath()
 */
class AutoloaderException_Index_Filter extends AutoloaderException_Index
Exemple #20
0
 /**
  * Creates the only instance of this class and registeres it to the autoload
  * stack
  *
  * @see register()
  * @see getInstance()
  * @return void
  */
 public static function classConstructor()
 {
     self::$_instance = new self();
     self::$_instance->register();
 }
 * along with this program.
 * If not, see <http://php-autoloader.malkusch.de/en/license/>.
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage Index
 * @author     Markus Malkusch <*****@*****.**>
 * @copyright  2009 - 2010 Markus Malkusch
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    SVN: $Id: AutoloaderException_Index_Filter_RelativePath_InvalidBasePath.php,v 1.4 2011/01/11 14:25:31 nicke Exp $
 * @link       http://php-autoloader.malkusch.de/en/
 */
/**
 * The parent class must be loaded.
 */
InternalAutoloader::getInstance()->registerClass('AutoloaderException_Index_Filter_RelativePath', dirname(__FILE__) . '/AutoloaderException_Index_Filter_RelativePath.php');
/**
 * Thrown if a AutoloaderIndexFilter_RelativePath is constructored with an invalid
 * base path
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage Index
 * @author     Markus Malkusch <*****@*****.**>
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    Release: 1.11
 * @link       http://php-autoloader.malkusch.de/en/
 * @see        AutoloaderIndexFilter_RelativePath::__construct()
 * @see        AutoloaderIndex::getPath()
 * @see        AutoloaderIndex::setPath()
 */
 /**
  * Asserts that no instance of InternalAutoloader is registered
  *
  * It also asserts that registration would still work.
  *
  * @return void
  */
 private function _assertRemoved()
 {
     $this->assertFalse(InternalAutoloader::getInstance()->isRegistered());
     $this->assertEquals(0, count(InternalAutoloader::getRegisteredAutoloaders()));
     InternalAutoloader::getInstance()->register();
     $this->assertTrue(InternalAutoloader::getInstance()->isRegistered());
 }
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage Exception
 * @author     Markus Malkusch <*****@*****.**>
 * @copyright  2009 - 2010 Markus Malkusch
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    SVN: $Id$
 * @link       http://php-autoloader.malkusch.de/en/
 */
namespace malkusch\autoloader;

/**
 * The parent class must be loaded.
 */
InternalAutoloader::getInstance()->registerClass('AutoloaderException_ClassPath', __DIR__ . '/AutoloaderException_ClassPath.php');
/**
 * Raised if the class path doesn't exist
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage Exception
 * @author     Markus Malkusch <*****@*****.**>
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    Release: 1.12
 * @link       http://php-autoloader.malkusch.de/en/
 * @see        Autoloader::__construct()
 */
class AutoloaderException_ClassPath_NotExists extends AutoloaderException_ClassPath
{
}
    {
        if (strpos($class, "\\") === false) {
            $class = __NAMESPACE__ . "\\" . $class;
        }
        Autoloader::normalizeClass($class);
        $this->_classes[$class] = $path;
    }
    /**
     * Implements autoloading for internal classes
     *
     * @param String $class The class name
     *
     * @throws AutoloaderException_InternalClassNotLoadable
     * @throws AutoloaderException_Include
     * @throws AutoloaderException_Include_FileNotExists
     * @throws AutoloaderException_Include_ClassNotDefined
     * @return void
     */
    protected function doAutoload($class)
    {
        if (!\array_key_exists($class, $this->_classes)) {
            throw new AutoloaderException_InternalClassNotLoadable($class);
        }
        $this->loadClass($class, $this->_classes[$class]);
    }
}
/**
 * The class constructor is called.
 */
InternalAutoloader::classConstructor();
 * along with this program.
 * If not, see <http://php-autoloader.malkusch.de/en/license/>.
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage FileIterator
 * @author     Markus Malkusch <*****@*****.**>
 * @copyright  2009 - 2010 Markus Malkusch
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    SVN: $Id$
 * @link       http://php-autoloader.malkusch.de/en/
 */
/**
 * The parent class must be loaded.
 */
InternalAutoloader::getInstance()->registerClass('AutoloaderFileIterator', dirname(__FILE__) . '/AutoloaderFileIterator.php');
/**
 * Searches all files without any logic
 *
 * It uses a stack of DirectoryIterator objects for searching recursively.
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage FileIterator
 * @author     Markus Malkusch <*****@*****.**>
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    Release: 1.11
 * @link       http://php-autoloader.malkusch.de/en/
 * @see        Autoloader::searchPath()
 */
class AutoloaderFileIterator_Simple extends AutoloaderFileIterator
 * @category   PHP
 * @package    Autoloader
 * @subpackage Index
 * @author     Markus Malkusch <*****@*****.**>
 * @copyright  2009 - 2010 Markus Malkusch
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    SVN: $Id$
 * @link       http://php-autoloader.malkusch.de/en/
 */
namespace malkusch\autoloader;

/**
 * These classes must be loaded.
 */
InternalAutoloader::getInstance()->registerClass('AutoloaderIndexGetFilter', __DIR__ . '/AutoloaderIndexGetFilter.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderIndexSetFilter', __DIR__ . '/AutoloaderIndexSetFilter.php');
/**
 * The AutoloaderIndexFilter interface
 *
 * When a path is read from an AutoloaderIndex or set, this filter is applied on
 * that path.
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage Index
 * @author     Markus Malkusch <*****@*****.**>
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    Release: 1.12
 * @link       http://php-autoloader.malkusch.de/en/
 * @see        AutoloaderIndex::addFilter()
 * @see        AutoloaderIndex::getPath()
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage Index
 * @author     Markus Malkusch <*****@*****.**>
 * @copyright  2009 - 2010 Markus Malkusch
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    SVN: $Id$
 * @link       http://php-autoloader.malkusch.de/en/
 */
namespace malkusch\autoloader;

/**
 * The parent class must be loaded.
 */
InternalAutoloader::getInstance()->registerClass('AutoloaderException_Index_Filter', __DIR__ . '/AutoloaderException_Index_Filter.php');
/**
 * Thrown by AutoloaderIndexFilter_RelativePath
 *
 * @category   PHP
 * @package    Autoloader
 * @subpackage Index
 * @author     Markus Malkusch <*****@*****.**>
 * @license    http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version    Release: 1.12
 * @link       http://php-autoloader.malkusch.de/en/
 * @see        AutoloaderIndexFilter_RelativePath
 * @see        AutoloaderIndex::getPath()
 * @see        AutoloaderIndex::setPath()
 */
class AutoloaderException_Index_Filter_RelativePath extends AutoloaderException_Index_Filter
 * @category  PHP
 * @package   Autoloader
 * @author    Markus Malkusch <*****@*****.**>
 * @copyright 2009 - 2010 Markus Malkusch
 * @license   http://php-autoloader.malkusch.de/en/license/ GPL 3
 * @version   SVN: $Id$
 * @link      http://php-autoloader.malkusch.de/en/
 */
namespace malkusch\autoloader;

/**
 * Includes
 */
InternalAutoloader::getInstance()->registerClass('AutoloaderException_Builder_NoClassPath', __DIR__ . '/exception/AutoloaderException_Builder_NoClassPath.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_Builder_NoDeployPath', __DIR__ . '/exception/AutoloaderException_Builder_NoDeployPath.php');
InternalAutoloader::getInstance()->registerClass('AutoloaderException_Builder_IO', __DIR__ . '/exception/AutoloaderException_Builder_IO.php');
/**
 * Builds an index and deploys a portable autoloader for you project
 *
 * PHP version 5
 *
 * LICENSE: This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *