mirror of
https://github.com/flarum/framework.git
synced 2024-12-03 07:33:36 +08:00
fixes #799, now properly assigning a id
This commit is contained in:
parent
b11b952aff
commit
5179d2eb52
|
@ -86,9 +86,18 @@ class Extension implements Arrayable
|
||||||
*/
|
*/
|
||||||
public function __construct($path, $composerJson)
|
public function __construct($path, $composerJson)
|
||||||
{
|
{
|
||||||
$this->id = end(explode('/', $path));
|
|
||||||
$this->path = $path;
|
$this->path = $path;
|
||||||
$this->composerJson = $composerJson;
|
$this->composerJson = $composerJson;
|
||||||
|
$this->assignId();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Assigns the id for the extension used globally.
|
||||||
|
*/
|
||||||
|
protected function assignId()
|
||||||
|
{
|
||||||
|
$segments = explode('/', $this->path);
|
||||||
|
$this->id = end($segments);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue
Block a user