Ejemplo n.º 1
0
 public static function __callStatic($methName, $args)
 {
     if ($methName == 'whoami') {
         Dev\Console::out('whoami:' . __CLASS__);
     } else {
         throw new \Exception(sprintf("Undefine method [%s] in class [%s]", $methName, __CLASS__));
     }
 }
Ejemplo n.º 2
0
/*
 * Created on 		19.09.2009
 *
 * @see http://github.com/swwwfactory/entry8
 *
 */
namespace My\Tests;

use swwwfactory\Dev;
const AUTOLOADER_PKG_BASE = __DIR__;
const MY_PHAR_PKG_NAME = 'my.tests.phar';
const MY_LIB_PHAR_PKG_NAME = 'my.lib.phar';
include MY_LIB_PHAR_PKG_NAME;
Dev\Console::out();
include MY_PHAR_PKG_NAME;
Dev\Pkg::import('My\\classes\\foo\\Bar\\Module', 'phar://' . MY_PHAR_PKG_NAME . '/foo/Bar.php');
Dev\Pkg::import('My\\classes\\A\\Helper', 'phar://' . MY_PHAR_PKG_NAME . '/A.php');
\My\classes\A\Helper::whoami();
\My\classes\foo\Bar\Module::whoami();
Dev\Console::out();
Dev\Console::out('Listing of ' . MY_LIB_PHAR_PKG_NAME . ':');
Dev\PharShell::ls(MY_LIB_PHAR_PKG_NAME);
Dev\Console::out();
Dev\Console::out('Listing of ' . MY_PHAR_PKG_NAME . ':');
Dev\PharShell::ls(MY_PHAR_PKG_NAME);
Dev\Console::out();
//Dev\Console::dump(\get_declared_classes());
Dev\Console::out('Success loading phar archives');
Dev\Console::out();
Ejemplo n.º 3
0
 public static function whoami()
 {
     Dev\Console::out('called:' . __METHOD__);
 }
Ejemplo n.º 4
0
 private static function _showNewClasses()
 {
     Dev\Console::out();
     Dev\Console::out('Opened classes from phar package:');
     Dev\Console::dump(\array_diff(\get_declared_classes(), self::$_classes_stack->pop()));
 }