mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
Tweak abstracts
This commit is contained in:
@@ -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.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user