View sourcecode

The following files exists in this folder. Click to view.

phpdoc-cache-file_83ad6bd4885732fd14b9d8709d592efd.dat

1 lines ASCII Unix (LF)
1
O:39:"phpDocumentor\Descriptor\FileDescriptor":22:{s:7:"*hash";s:32:"452de99d51b4e647b3756794d14a63b1";s:7:"*path";s:12:"autoload.php";s:9:"*source";s:2279:"<?php
/**
 * Autoloader for Anax environment, including composer autoloader, if available.
 *
 */

/**
 * Autoloader for classes using Anax-base names.
 *
 * @param string $class The fully-qualified class name.
 * @return void
 */
spl_autoload_register(function ($class) {
    $path = ANAX_SOURCE_PATH . "/{$class}/{$class}.php";
    if(is_file($path)) {
        require($path);
    }
});



// Maybe just use the CLoader-class and put loader code into it?



/**
 * PSR-0 autoloader for classes supporting namespaces, adapted to Anax environment.
 *
 * @link http://www.php-fig.org/psr/psr-0/
 * @param string $class The fully-qualified class name.
 * @return void
 */
spl_autoload_register(function ($className) {

    $path      = ANAX_SOURCE_PATH . DIRECTORY_SEPARATOR;
    $className = ltrim($className, '\\');
    $fileName  = $path;
    $namespace = '';
    
    if ($lastNsPos = strrpos($className, '\\')) {
        $namespace  = substr($className, 0, $lastNsPos);
        $className  = substr($className, $lastNsPos + 1);
        $fileName  .= str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
    }
    $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';

    if(is_file($fileName)) {
        require $fileName;
    }
});



/**
 * PSR-4 autoloader for Anax environment.
 *
 * @link http://www.php-fig.org/psr/psr-4/
 * @param string $class The fully-qualified class name.
 * @return void
 */
spl_autoload_register(function ($class) {

    // project-specific namespace prefix
    $prefix = 'Anax\\';

    // base directory for the namespace prefix
    $base_dir = ANAX_SOURCE_PATH;

    // does the class use the namespace prefix?
    $len = strlen($prefix);
    if (strncmp($prefix, $class, $len) !== 0) {
        // no, move to the next registered autoloader
        return;
    }

    // get the relative class name
    $relative_class = substr($class, $len);

    // replace the namespace prefix with the base directory, replace namespace
    // separators with directory separators in the relative class name, append
    // with .php
    $file = $base_dir . '/' . str_replace('\\', '/', $relative_class) . '.php';

    // if the file exists, require it
    if (file_exists($file)) {
        require $file;
    }
});


";s:19:"*namespaceAliases";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:11:"*includes";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:3:{i:0;O:41:"phpDocumentor\Reflection\IncludeReflector":3:{s:7:"*node";O:27:"PHPParser_Node_Expr_Include":2:{s:11:"*subNodes";a:2:{s:4:"expr";O:28:"PHPParser_Node_Expr_Variable":2:{s:11:"*subNodes";a:1:{s:4:"name";s:4:"path";}s:13:"*attributes";a:2:{s:9:"startLine";i:16;s:7:"endLine";i:16;}}s:4:"type";i:3;}s:13:"*attributes";a:2:{s:9:"startLine";i:16;s:7:"endLine";i:16;}}s:23:"*default_package_name";s:0:"";s:10:"*context";O:41:"phpDocumentor\Reflection\DocBlock\Context":3:{s:12:"*namespace";s:0:"";s:20:"*namespace_aliases";a:0:{}s:7:"*lsen";s:0:"";}}i:1;O:41:"phpDocumentor\Reflection\IncludeReflector":3:{s:7:"*node";O:27:"PHPParser_Node_Expr_Include":2:{s:11:"*subNodes";a:2:{s:4:"expr";O:28:"PHPParser_Node_Expr_Variable":2:{s:11:"*subNodes";a:1:{s:4:"name";s:8:"fileName";}s:13:"*attributes";a:2:{s:9:"startLine";i:48;s:7:"endLine";i:48;}}s:4:"type";i:3;}s:13:"*attributes";a:2:{s:9:"startLine";i:48;s:7:"endLine";i:48;}}s:23:"*default_package_name";s:0:"";s:10:"*context";r:23;}i:2;O:41:"phpDocumentor\Reflection\IncludeReflector":3:{s:7:"*node";O:27:"PHPParser_Node_Expr_Include":2:{s:11:"*subNodes";a:2:{s:4:"expr";O:28:"PHPParser_Node_Expr_Variable":2:{s:11:"*subNodes";a:1:{s:4:"name";s:4:"file";}s:13:"*attributes";a:2:{s:9:"startLine";i:86;s:7:"endLine";i:86;}}s:4:"type";i:3;}s:13:"*attributes";a:2:{s:9:"startLine";i:86;s:7:"endLine";i:86;}}s:23:"*default_package_name";s:0:"";s:10:"*context";r:23;}}}s:12:"*constants";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:12:"*functions";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:10:"*classes";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:13:"*interfaces";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:9:"*traits";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:10:"*markers";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:12:{i:0;a:3:{s:4:"type";s:0:"";s:7:"message";s:61:"Maybe just use the CLoader-class and put loader code into it?";s:4:"line";i:22;}i:1;a:3:{s:4:"type";s:0:"";s:7:"message";s:26:"www.php-fig.org/psr/psr-0/";s:4:"line";i:29;}i:2;a:3:{s:4:"type";s:0:"";s:7:"message";s:26:"www.php-fig.org/psr/psr-4/";s:4:"line";i:57;}i:3;a:3:{s:4:"type";s:0:"";s:7:"message";s:33:"project-specific namespace prefix";s:4:"line";i:63;}i:4;a:3:{s:4:"type";s:0:"";s:7:"message";s:39:"base directory for the namespace prefix";s:4:"line";i:66;}i:5;a:3:{s:4:"type";s:0:"";s:7:"message";s:40:"does the class use the namespace prefix?";s:4:"line";i:69;}i:6;a:3:{s:4:"type";s:0:"";s:7:"message";s:42:"no, move to the next registered autoloader";s:4:"line";i:72;}i:7;a:3:{s:4:"type";s:0:"";s:7:"message";s:27:"get the relative class name";s:4:"line";i:76;}i:8;a:3:{s:4:"type";s:0:"";s:7:"message";s:71:"replace the namespace prefix with the base directory, replace namespace";s:4:"line";i:79;}i:9;a:3:{s:4:"type";s:0:"";s:7:"message";s:71:"separators with directory separators in the relative class name, append";s:4:"line";i:80;}i:10;a:3:{s:4:"type";s:0:"";s:7:"message";s:9:"with .php";s:4:"line";i:81;}i:11;a:3:{s:4:"type";s:0:"";s:7:"message";s:30:"if the file exists, require it";s:4:"line";i:84;}}}s:8:"*fqsen";s:0:"";s:7:"*name";s:12:"autoload.php";s:12:"*namespace";N;s:10:"*package";s:7:"Default";s:10:"*summary";s:77:"Autoloader for Anax environment, including composer autoloader, if available.";s:14:"*description";s:0:"";s:17:"*fileDescriptor";N;s:7:"*line";i:0;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:2:{s:7:"package";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:38:"phpDocumentor\Descriptor\TagDescriptor":3:{s:7:"*name";s:7:"package";s:14:"*description";s:7:"Default";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:10:"subpackage";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}