Framework\Box

Box class will hold your data across the execution cycle. You can assign data in one class and retrieve that in another class.

Methods

Following static methods are available in Box class

  • setConfig($key, $value): void
  • getConfig($key): mixed
  • setEnv($name, $value): void
  • getEnv($name): mixed
  • setApplication(array $application): void
  • getApplication(): array
  • setFramework(array $framework): void
  • getFramework(): array
  • setRoute($pattern, $callback)
  • getRoute($pattern)
  • setRoutes(array $routes): void
  • getRoutes(): array
  • setIdentity(Identity $identity): void
  • getIdentity(): Identity
  • setData(array $data): void
  • getData(): array