mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 19:04:02 +00:00
[1.7.0] Fix Events system (#94)
* Add TenantManagerEvents * Apply fixes from StyleCI * Fix typos, add tests * end() events * Travis should be failing * Uncomment ending
This commit is contained in:
parent
c1df467601
commit
1a88cad4d6
2 changed files with 10 additions and 1 deletions
|
|
@ -41,6 +41,10 @@ trait BootstrapsTenancy
|
|||
|
||||
public function end()
|
||||
{
|
||||
array_map(function ($listener) {
|
||||
$listener($this);
|
||||
}, $this->listeners['ending']);
|
||||
|
||||
$this->initialized = false;
|
||||
|
||||
$this->disconnectDatabase();
|
||||
|
|
@ -49,6 +53,10 @@ trait BootstrapsTenancy
|
|||
}
|
||||
$this->untagCache();
|
||||
$this->resetFileSystemRootPaths();
|
||||
|
||||
array_map(function ($listener) {
|
||||
$listener($this);
|
||||
}, $this->listeners['ended']);
|
||||
}
|
||||
|
||||
public function switchDatabaseConnection()
|
||||
|
|
|
|||
1
test
1
test
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# for development
|
||||
docker-compose up -d
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue