fixes #799, now properly assigning a id

This commit is contained in:
Daniel Klabbers 2016-02-13 20:32:46 +01:00
parent b11b952aff
commit 5179d2eb52

View File

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