mirror of
https://github.com/flarum/framework.git
synced 2024-11-24 22:03:27 +08:00
fixes #799, now properly assigning a id
This commit is contained in:
parent
191589e2b1
commit
458f4f811c
|
@ -86,9 +86,18 @@ class Extension implements Arrayable
|
|||
*/
|
||||
public function __construct($path, $composerJson)
|
||||
{
|
||||
$this->id = end(explode('/', $path));
|
||||
$this->path = $path;
|
||||
$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