/**
  * Register the application services.
  *
  * @return void
  */
 public function register()
 {
     $this->app->singleton("mycelium", function ($app) {
         $mycelium = new MyceliumManager($app["config"], $app["db.connection"]);
         $mycelium->createAndRegisterDefaultMounters();
         $mycelium->createAndRegisterDefaultParsers(config("app.timezone"));
         return $mycelium;
     });
 }
示例#2
0
 /**
  * Create Mycelium service and setup fake Facade
  */
 protected function createMycelium()
 {
     $configurationData = (require __DIR__ . "/../../src/config/mycelium.php");
     $config = new \Illuminate\Config\Repository(["mycelium" => $configurationData]);
     $connection = DB::connection();
     $mycelium = new MyceliumManager($config, $connection);
     $mycelium->createAndRegisterDefaultMounters();
     $mycelium->createAndRegisterDefaultParsers("Europe/Prague");
     // initialize fake facade
     Mycelium::saveInstance($mycelium);
 }
示例#3
0
 public function decode(array $node, $default)
 {
     return $this->mycelium->decodePointer($node, $default);
 }