Skip to content

Commit

Permalink
improved dump
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Apr 26, 2017
1 parent bce0064 commit addbdc0
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/controllers/DumpController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,19 @@
/**
* Dump goal.
*/
class DumpController extends CommonController
class DumpController extends \yii\console\Controller
{
public function actionMake()
public function actionIndex($name = null)
{
$data = Yii::$app->controllerMap;
echo Yaml::dump(ArrayHelper::toArray($data), 4);
if ($name) {
if (empty($data[$name])) {
echo "'$name' not defined\n";
return;
}
$data = [$name => $data[$name]];
}
echo Yaml::dump($data, 4);
}

public function actionInternals()
Expand Down

0 comments on commit addbdc0

Please sign in to comment.