Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

Commit

Permalink
Update Config.php
Browse files Browse the repository at this point in the history
  • Loading branch information
rez1dent3 authored Apr 3, 2017
1 parent cc2f984 commit 3fd7ee2
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions src/Config/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,20 @@ public function saveFile($path, $data)
return file_put_contents($filePath, $result);
}

/**
* @param array $storage
*
* @return Slice
*/
public function make(array $storage)
{
return new Slice(
$this->helper,
$storage,
$this->withParameters ? $this->parameters : null
);
}

/**
* @param string $file
*
Expand All @@ -204,11 +218,7 @@ protected function slice($file)
{
$require = $this->requireFile($file);

$this->storage[$file] = new Slice(
$this->helper,
$require,
$this->withParameters ? $this->parameters : null
);
$this->storage[$file] = $this->make($require);
}

return $this->storage[$file];
Expand Down Expand Up @@ -241,4 +251,4 @@ public function get($path)
return $slice;
}

}
}

0 comments on commit 3fd7ee2

Please sign in to comment.