Tweak abstracts

This commit is contained in:
Barry vd. Heuvel
2015-03-17 09:06:21 +01:00
parent 99cebb5566
commit b6fdfe0df7
+12 -4
View File
@@ -66,11 +66,8 @@ class MetaCommand extends Command {
*/ */
public function fire() public function fire()
{ {
$filename = $this->option('filename');
$bindings = array(); $bindings = array();
foreach ($this->getAbstracts() as $abstract) {
foreach ($this->laravel->getBindings() as $abstract => $options) {
try { try {
$concrete = $this->laravel->make($abstract); $concrete = $this->laravel->make($abstract);
if (is_object($concrete)) { if (is_object($concrete)) {
@@ -86,6 +83,7 @@ class MetaCommand extends Command {
'methods' => $this->methods, 'methods' => $this->methods,
))->render(); ))->render();
$filename = $this->option('filename');
$written = $this->files->put($filename, $content); $written = $this->files->put($filename, $content);
if ($written !== false) { if ($written !== false) {
@@ -95,6 +93,16 @@ class MetaCommand extends Command {
} }
} }
/**
* Get a list of abstracts from the Laravel Application.
*
* @return array
*/
protected function getAbstracts()
{
return array_keys($this->laravel->getBindings());
}
/** /**
* Get the console command options. * Get the console command options.
* *