Skip to content

Commit

Permalink
Move Pyrus dir to /vendor/pyrus/
Browse files Browse the repository at this point in the history
  • Loading branch information
naderman committed Jan 15, 2011
1 parent c2e07e4 commit ed171ef
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Pyrus.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ class Pyrus
*/
public function __construct(Kernel $kernel, \PEAR2\Pyrus\ScriptFrontend\Commands $frontend = null)
{
$this->kernel = $kernel;

if (!file_exists($this->getPyrusDir())) {
mkdir($this->getPyrusDir(), 0777, true);
}

if (!$frontend) {
if (file_exists(__DIR__ . '/../../../../../PEAR2_Pyrus')) {
spl_autoload_register(array($this, 'pyrus_src_autoload'));
Expand All @@ -36,11 +42,9 @@ public function __construct(Kernel $kernel, \PEAR2\Pyrus\ScriptFrontend\Commands
$frontend = new \PEAR2\Pyrus\ScriptFrontend\Commands;
}

$this->kernel = $kernel;
$this->frontend = $frontend;

$this->readConfig(\PEAR2\Pyrus\Config::singleton($this->getPyrusDir(), $this->getPearConfig()));

$this->setupPyrus();
}

Expand Down Expand Up @@ -157,7 +161,7 @@ public function installCustomRole()
*/
public function getPyrusDir()
{
return $this->kernel->getRootDir() . '/../src/vendor';
return $this->kernel->getRootDir() . '/../vendor/pyrus/';
}

/**
Expand Down

0 comments on commit ed171ef

Please sign in to comment.