public function __construct()
 {
     $app = new Application();
     if ($app->getInstance() != NULL) {
         $this->app = $app::getInstance();
     } else {
         $this->app = $app;
     }
 }
 public function testApplicationIsSingleton()
 {
     $container = new Application($this->path);
     $this->assertSame($container, Application::getInstance());
     $container2 = new Application($this->path);
     $this->assertInstanceOf(Application::class, $container2);
     $this->assertNotSame($container, $container2);
 }
Exemple #3
0
 /**
  * Get the available container instance.
  *
  * @return application main instance
  */
 function app()
 {
     return \Betasyntax\Core\Application::getInstance();
 }