Advertisement
fruffl

illiFW app-only-init

Jul 26th, 2012
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.02 KB | None | 0 0
  1. <?PHP
  2. namespace localhost\illiFW\dev;
  3. require_once 'ILLI/illi.php';
  4. \Server\Init::development();
  5. \Server\Init::debug();
  6. \Server\Init::illi();
  7.  
  8. use ILLI\Application as Application;
  9. use ILLI\Runtime\Program as Program;
  10.  
  11. class lucas extends Program // this is not longer allowed
  12. {
  13.     public static function delegate($callable)
  14.     {
  15.         try
  16.         {
  17.             $callable();
  18.         }
  19.         catch(\ILLI\Exception\Base $e)
  20.         {
  21.             print $e->export()->asText();
  22.         }
  23.         catch(\Exception $e)
  24.         {
  25.             var_dump($e);
  26.         }
  27.     }
  28. }
  29.  
  30. lucas::delegate(function()
  31. {
  32.     var_dump(lucas::getThread());
  33.     var_dump((new \ILLI\Php\Filepath('foo\bar'))->invoke());
  34. });
  35.  
  36. ?>
  37.  
  38.  
  39.  
  40. ERROR
  41.  
  42. ILLI\Runtime\ProgramException
  43.         Message         *localhost\illiFW\dev\lucas* can not extend
  44.                         *ILLI\Runtime\Program* instead of
  45.                         *ILLI\Runtime\Application*.
  46.        
  47.         Thrown in       /var/www/dev/ILLI/3.0.1/VENDOR/ILLI/Runtime/Program.php
  48.         Line            00000070
  49.         ErrorCode       0x000C4567
  50.         Level           1
  51.         References
  52.                         Ref #thread             string(26) "localhost\illiFW\dev\lucas"
  53.                                                  
  54.                         Ref #class              string(20) "ILLI\Runtime\Program"
  55.                                                  
  56.                         Ref #required           string(24) "ILLI\Runtime\Application"
  57.                                                  
  58.                         Ref #__INFO__           object(ILLI\Runtime\ProgramInfo)#17 (5) {
  59.                                                    ["__fileName":"ILLI\Runtime\ProgramInfo":private]=>
  60.                                                    string(48) "/var/www/dev/index.php"
  61.                                                    ["__startLine":"ILLI\Runtime\ProgramInfo":private]=>
  62.                                                    int(11)
  63.                                                    ["__endLine":"ILLI\Runtime\ProgramInfo":private]=>
  64.                                                    int(28)
  65.                                                    ["__hash":"ILLI\Runtime\ProgramInfo":private]=>
  66.                                                    string(32) "000000007f7eb5a9000000007d5d8746"
  67.                                                    ["__threadName":"ILLI\Runtime\ProgramInfo":private]=>
  68.                                                    string(26) "localhost\illiFW\dev\lucas"
  69.                                                  }
  70.                                                  
  71.  
  72.  
  73.  
  74.  
  75. ILLI\Runtime\Program::getThread()
  76.  
  77.                 File            /var/www/dev/index.php
  78.                 Line            32
  79.  
  80. localhost\illiFW\dev\{closure}()
  81.  
  82.                 File            /var/www/dev/index.php
  83.                 Line            17
  84.  
  85. localhost\illiFW\dev\lucas::delegate()
  86.  
  87.                 Parameter 001   object(Closure)#6 (0) {
  88.                                 }
  89.                 File            /var/www/dev/index.php
  90.                 Line            34
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement