fixes #799, now properly assigning a id

This commit is contained in:
Daniel Klabbers 2016-02-13 20:32:46 +01:00
parent 191589e2b1
commit 458f4f811c

View File

@ -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);
}
/**