Do you remember the times when using var_dump() to inspect a variable did help? Not anymore! Thanks to frameworks and Dependency Injection those horrible times are over!
Nikita Popov pointed out that in this case, it's not Dependency Injection but rather the Service Locator design pattern. Paul M. Jones wrote a blog post that explains the difference:
When the container is used inside a non-Factory object, you are using the container as a Service Locator.
/var/www/vendor/dingo/api/src/Http/Response/Factory.php:156:
class Dingo\Api\Transformer\Binding#536 (5) {
protected $container =>
class Illuminate\Foundation\Application#3 (28) {
protected $basePath =>
string(8) "/var/www"
protected $hasBeenBootstrapped =>
bool(true)
protected $booted =>
bool(true)
protected $bootingCallbacks =>
array(4) {
[0] =>
class Closure#112 (1) {
...
}
[1] =>
class Closure#204 (2) {
...
}
[2] =>
class Closure#209 (2) {
...
}
[3] =>
class Closure#226 (2) {
...
}
}
protected $bootedCallbacks =>
array(1) {
[0] =>
class Closure#240 (1) {
...
}
}
protected $terminatingCallbacks =>
array(0) {
}
protected $serviceProviders =>
array(33) {
[0] =>
class Illuminate\Events\EventServiceProvider#2 (2) {
...
}
[1] =>
class Illuminate\Routing\RoutingServiceProvider#7 (2) {
...
}
[2] =>
class Illuminate\Auth\AuthServiceProvider#34 (2) {
...
}
[3] =>
class Illuminate\Cookie\CookieServiceProvider#53 (2) {
...
}
[4] =>
class Illuminate\Database\DatabaseServiceProvider#55 (2) {
...
}
[5] =>
class Illuminate\Encryption\EncryptionServiceProvider#62 (2) {
...
}
[6] =>
class Illuminate\Filesystem\FilesystemServiceProvider#64 (2) {
...
}
[7] =>
class Illuminate\Foundation\Providers\FoundationServiceProvider#69 (2) {
...
}
[8] =>
class Illuminate\Pagination\PaginationServiceProvider#70 (2) {
...
}
[9] =>
class Illuminate\Session\SessionServiceProvider#74 (2) {
...
}
[10] =>
class Illuminate\View\ViewServiceProvider#78 (2) {
...
}
[11] =>
class Dingo\Api\Provider\RoutingServiceProvider#83 (3) {
...
}
[12] =>
class Dingo\Api\Provider\HttpServiceProvider#87 (3) {
...
}
[13] =>
class Dingo\Api\Provider\LaravelServiceProvider#82 (3) {
...
}
[14] =>
class Immogic\Providers\CrateServiceProvider#107 (2) {
...
}
[15] =>
class Chumper\Zipper\ZipperServiceProvider#109 (2) {
...
}
[16] =>
class Torann\GeoIP\GeoIPServiceProvider#113 (2) {
...
}
[17] =>
class Toin0u\Geocoder\GeocoderServiceProvider#119 (2) {
...
}
[18] =>
class Jaybizzle\LaravelCrawlerDetect\LaravelCrawlerDetectServiceProvider#124 (2) {
...
}
[19] =>
class Spatie\Activitylog\ActivitylogServiceProvider#127 (2) {
...
}
[20] =>
class Immogic\Providers\ApiCacheServiceProvider#131 (2) {
...
}
[21] =>
class Immogic\Providers\AppServiceProvider#132 (2) {
...
}
[22] =>
class Immogic\Providers\AuthServiceProvider#133 (3) {
...
}
[23] =>
class Immogic\Providers\BroadcastServiceProvider#134 (2) {
...
}
[24] =>
class Immogic\Providers\EventServiceProvider#135 (4) {
...
}
[25] =>
class Immogic\Providers\RouteServiceProvider#136 (3) {
...
}
[26] =>
class Immogic\Providers\LocalDatabaseFilesystemAdapterServiceProvider#137 (2) {
...
}
[27] =>
class Immogic\Providers\FtpUserServiceProvider#138 (2) {
...
}
[28] =>
class Immogic\Providers\GeonamesServiceProvider#139 (2) {
...
}
[29] =>
class Illuminate\Validation\ValidationServiceProvider#199 (2) {
...
}
[30] =>
class Illuminate\Translation\TranslationServiceProvider#206 (2) {
...
}
[31] =>
class Illuminate\Broadcasting\BroadcastServiceProvider#222 (2) {
...
}
[32] =>
class Illuminate\Hashing\HashServiceProvider#514 (2) {
...
}
}
protected $loadedProviders =>
array(33) {
'Illuminate\Events\EventServiceProvider' =>
bool(true)
'Illuminate\Routing\RoutingServiceProvider' =>
bool(true)
'Illuminate\Auth\AuthServiceProvider' =>
bool(true)
'Illuminate\Cookie\CookieServiceProvider' =>
bool(true)
'Illuminate\Database\DatabaseServiceProvider' =>
bool(true)
'Illuminate\Encryption\EncryptionServiceProvider' =>
bool(true)
'Illuminate\Filesystem\FilesystemServiceProvider' =>
bool(true)
'Illuminate\Foundation\Providers\FoundationServiceProvider' =>
bool(true)
'Illuminate\Pagination\PaginationServiceProvider' =>
bool(true)
'Illuminate\Session\SessionServiceProvider' =>
bool(true)
'Illuminate\View\ViewServiceProvider' =>
bool(true)
'Dingo\Api\Provider\RoutingServiceProvider' =>
bool(true)
'Dingo\Api\Provider\HttpServiceProvider' =>
bool(true)
'Dingo\Api\Provider\LaravelServiceProvider' =>
bool(true)
'Immogic\Providers\CrateServiceProvider' =>
bool(true)
'Chumper\Zipper\ZipperServiceProvider' =>
bool(true)
'Torann\GeoIP\GeoIPServiceProvider' =>
bool(true)
'Toin0u\Geocoder\GeocoderServiceProvider' =>
bool(true)
'Jaybizzle\LaravelCrawlerDetect\LaravelCrawlerDetectServiceProvider' =>
bool(true)
'Spatie\Activitylog\ActivitylogServiceProvider' =>
bool(true)
'Immogic\Providers\ApiCacheServiceProvider' =>
bool(true)
'Immogic\Providers\AppServiceProvider' =>
bool(true)
'Immogic\Providers\AuthServiceProvider' =>
bool(true)
'Immogic\Providers\BroadcastServiceProvider' =>
bool(true)
'Immogic\Providers\EventServiceProvider' =>
bool(true)
'Immogic\Providers\RouteServiceProvider' =>
bool(true)
'Immogic\Providers\LocalDatabaseFilesystemAdapterServiceProvider' =>
bool(true)
'Immogic\Providers\FtpUserServiceProvider' =>
bool(true)
'Immogic\Providers\GeonamesServiceProvider' =>
bool(true)
'Illuminate\Validation\ValidationServiceProvider' =>
bool(true)
'Illuminate\Translation\TranslationServiceProvider' =>
bool(true)
'Illuminate\Broadcasting\BroadcastServiceProvider' =>
bool(true)
'Illuminate\Hashing\HashServiceProvider' =>
bool(true)
}
protected $deferredServices =>
array(83) {
'Illuminate\Broadcasting\BroadcastManager' =>
string(48) "Illuminate\Broadcasting\BroadcastServiceProvider"
'Illuminate\Contracts\Broadcasting\Broadcaster' =>
string(48) "Illuminate\Broadcasting\BroadcastServiceProvider"
'Illuminate\Bus\Dispatcher' =>
string(33) "Illuminate\Bus\BusServiceProvider"
'Illuminate\Contracts\Bus\Dispatcher' =>
string(33) "Illuminate\Bus\BusServiceProvider"
'Illuminate\Contracts\Bus\QueueingDispatcher' =>
string(33) "Illuminate\Bus\BusServiceProvider"
'cache' =>
string(37) "Illuminate\Cache\CacheServiceProvider"
'cache.store' =>
string(37) "Illuminate\Cache\CacheServiceProvider"
'memcached.connector' =>
string(37) "Illuminate\Cache\CacheServiceProvider"
'command.cache.clear' =>
string(37) "Illuminate\Cache\CacheServiceProvider"
'command.clear-compiled' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.auth.resets.clear' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.config.cache' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.config.clear' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.down' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.environment' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.key.generate' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.optimize' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.route.cache' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.route.clear' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.route.list' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.storage.link' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.tinker' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.up' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.view.clear' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.app.name' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.auth.make' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.cache.table' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.console.make' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.controller.make' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.event.generate' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.event.make' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.job.make' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.listener.make' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.mail.make' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.middleware.make' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.model.make' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.notification.make' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.notification.table' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.policy.make' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.provider.make' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.queue.failed-table' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.queue.table' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.request.make' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.seeder.make' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.session.table' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.serve' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.test.make' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.vendor.publish' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'Illuminate\Console\Scheduling\ScheduleRunCommand' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'migrator' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'migration.repository' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.migrate' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.migrate.rollback' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.migrate.reset' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.migrate.refresh' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.migrate.install' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.migrate.status' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'migration.creator' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.migrate.make' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'seeder' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.seed' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'composer' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.queue.failed' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.queue.retry' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.queue.forget' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'command.queue.flush' =>
string(61) "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
'mailer' =>
string(35) "Illuminate\Mail\MailServiceProvider"
'swift.mailer' =>
string(35) "Illuminate\Mail\MailServiceProvider"
'swift.transport' =>
string(35) "Illuminate\Mail\MailServiceProvider"
'Illuminate\Contracts\Pipeline\Hub' =>
string(43) "Illuminate\Pipeline\PipelineServiceProvider"
'queue' =>
string(37) "Illuminate\Queue\QueueServiceProvider"
'queue.worker' =>
string(37) "Illuminate\Queue\QueueServiceProvider"
'queue.listener' =>
string(37) "Illuminate\Queue\QueueServiceProvider"
'queue.failer' =>
string(37) "Illuminate\Queue\QueueServiceProvider"
'command.queue.work' =>
string(37) "Illuminate\Queue\QueueServiceProvider"
'command.queue.listen' =>
string(37) "Illuminate\Queue\QueueServiceProvider"
'command.queue.restart' =>
string(37) "Illuminate\Queue\QueueServiceProvider"
'queue.connection' =>
string(37) "Illuminate\Queue\QueueServiceProvider"
'redis' =>
string(37) "Illuminate\Redis\RedisServiceProvider"
'auth.password' =>
string(54) "Illuminate\Auth\Passwords\PasswordResetServiceProvider"
'auth.password.broker' =>
string(54) "Illuminate\Auth\Passwords\PasswordResetServiceProvider"
'translation.loader' =>
string(49) "Illuminate\Translation\TranslationServiceProvider"
'validation.presence' =>
string(47) "Illuminate\Validation\ValidationServiceProvider"
}
protected $monologConfigurator =>
class Closure#20 (1) {
public $parameter =>
array(1) {
...
}
}
protected $databasePath =>
NULL
protected $storagePath =>
NULL
protected $environmentPath =>
NULL
protected $environmentFile =>
string(4) ".env"
protected $namespace =>
NULL
protected $resolved =>
array(51) {
'events' =>
bool(true)
'router' =>
bool(true)
'Immogic\Http\Kernel' =>
bool(true)
'Illuminate\Contracts\Http\Kernel' =>
bool(true)
'Illuminate\Foundation\Bootstrap\DetectEnvironment' =>
bool(true)
'Illuminate\Foundation\Bootstrap\LoadConfiguration' =>
bool(true)
'Illuminate\Foundation\Bootstrap\ConfigureLogging' =>
bool(true)
'env' =>
bool(true)
'Illuminate\Foundation\Bootstrap\HandleExceptions' =>
bool(true)
'Illuminate\Foundation\Bootstrap\RegisterFacades' =>
bool(true)
'Illuminate\Foundation\Bootstrap\RegisterProviders' =>
bool(true)
'Illuminate\Foundation\Bootstrap\BootProviders' =>
bool(true)
'db.factory' =>
bool(true)
'db' =>
bool(true)
'view.engine.resolver' =>
bool(true)
'files' =>
bool(true)
'view.finder' =>
bool(true)
'view' =>
bool(true)
'Dingo\Api\Http\Response\Format\Json' =>
bool(true)
'League\Fractal\Manager' =>
bool(true)
'Dingo\Api\Transformer\Adapter\Fractal' =>
bool(true)
'api.transformer' =>
bool(true)
'Dingo\Api\Http\Parser\Accept' =>
bool(true)
'Immogic\Exceptions\Handler' =>
bool(true)
'Illuminate\Contracts\Debug\ExceptionHandler' =>
bool(true)
'api.exception' =>
bool(true)
'api.router.adapter' =>
bool(true)
'api.router' =>
bool(true)
'api.http.validator' =>
bool(true)
'Dingo\Api\Http\Middleware\Request' =>
bool(true)
'translation.loader' =>
bool(true)
'translator' =>
bool(true)
'validation.presence' =>
bool(true)
'validator' =>
bool(true)
'Illuminate\Contracts\Auth\Access\Gate' =>
bool(true)
'Illuminate\Broadcasting\BroadcastManager' =>
bool(true)
'url' =>
bool(true)
'Dingo\Api\Routing\ResourceRegistrar' =>
bool(true)
'filesystem' =>
bool(true)
'Dingo\Api\Http\Validation\Domain' =>
bool(true)
'Dingo\Api\Http\Validation\Prefix' =>
bool(true)
'Dingo\Api\Http\Validation\Accept' =>
bool(true)
'Dingo\Api\Http\Request' =>
bool(true)
'Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode' =>
bool(true)
'Immogic\Http\Middleware\LogAfterRequest' =>
bool(true)
'auth' =>
bool(true)
'hash' =>
bool(true)
'Immogic\Http\Controllers\Api\V1\BrokerController' =>
bool(true)
'Dingo\Api\Http\Middleware\PrepareController' =>
bool(true)
'Immogic\Http\Middleware\Authenticate' =>
bool(true)
'api.http.response' =>
bool(true)
}
protected $bindings =>
array(80) {
'events' =>
array(2) {
...
}
'router' =>
array(2) {
...
}
'url' =>
array(2) {
...
}
'redirect' =>
array(2) {
...
}
'Psr\Http\Message\ServerRequestInterface' =>
array(2) {
...
}
'Psr\Http\Message\ResponseInterface' =>
array(2) {
...
}
'Illuminate\Contracts\Routing\ResponseFactory' =>
array(2) {
...
}
'Illuminate\Contracts\Http\Kernel' =>
array(2) {
...
}
'Illuminate\Contracts\Console\Kernel' =>
array(2) {
...
}
'Illuminate\Contracts\Debug\ExceptionHandler' =>
array(2) {
...
}
'env' =>
array(2) {
...
}
'auth' =>
array(2) {
...
}
'auth.driver' =>
array(2) {
...
}
'Illuminate\Contracts\Auth\Authenticatable' =>
array(2) {
...
}
'Illuminate\Contracts\Auth\Access\Gate' =>
array(2) {
...
}
'cookie' =>
array(2) {
...
}
'Faker\Generator' =>
array(2) {
...
}
'Illuminate\Database\Eloquent\Factory' =>
array(2) {
...
}
'Illuminate\Contracts\Queue\EntityResolver' =>
array(2) {
...
}
'db.factory' =>
array(2) {
...
}
'db' =>
array(2) {
...
}
'db.connection' =>
array(2) {
...
}
'encrypter' =>
array(2) {
...
}
'files' =>
array(2) {
...
}
'filesystem' =>
array(2) {
...
}
'filesystem.disk' =>
array(2) {
...
}
'filesystem.cloud' =>
array(2) {
...
}
'session' =>
array(2) {
...
}
'session.store' =>
array(2) {
...
}
'Illuminate\Session\Middleware\StartSession' =>
array(2) {
...
}
'view.engine.resolver' =>
array(2) {
...
}
'view.finder' =>
array(2) {
...
}
'view' =>
array(2) {
...
}
'api.router' =>
array(2) {
...
}
'Dingo\Api\Routing\ResourceRegistrar' =>
array(2) {
...
}
'api.url' =>
array(2) {
...
}
'api.limiting' =>
array(2) {
...
}
'api.http.validator' =>
array(2) {
...
}
'Dingo\Api\Http\Validation\Domain' =>
array(2) {
...
}
'Dingo\Api\Http\Validation\Prefix' =>
array(2) {
...
}
'Dingo\Api\Http\Validation\Accept' =>
array(2) {
...
}
'Dingo\Api\Http\Parser\Accept' =>
array(2) {
...
}
'api.http.response' =>
array(2) {
...
}
'Dingo\Api\Http\Middleware\Request' =>
array(2) {
...
}
'Dingo\Api\Http\Middleware\Auth' =>
array(2) {
...
}
'Dingo\Api\Http\Middleware\RateLimit' =>
array(2) {
...
}
'Dingo\Api\Http\Middleware\PrepareController' =>
array(2) {
...
}
'api.exception' =>
array(2) {
...
}
'api.dispatcher' =>
array(2) {
...
}
'api.auth' =>
array(2) {
...
}
'api.transformer' =>
array(2) {
...
}
'Dingo\Api\Console\Command\Docs' =>
array(2) {
...
}
'api.router.adapter' =>
array(2) {
...
}
'zipper' =>
array(2) {
...
}
'geoip' =>
array(2) {
...
}
'command.geoip.update' =>
array(2) {
...
}
'geocoder.adapter' =>
array(2) {
...
}
'geocoder.chain' =>
array(2) {
...
}
'geocoder' =>
array(2) {
...
}
'LaravelCrawlerDetect' =>
array(2) {
...
}
'laravel-activitylog' =>
array(2) {
...
}
'command.activitylog:clean' =>
array(2) {
...
}
'geonames.repository' =>
array(2) {
...
}
'Arberd\Geonames\RepositoryInterface' =>
array(2) {
...
}
'command.geonames.install' =>
array(2) {
...
}
'command.geonames.import' =>
array(2) {
...
}
'command.geonames.convert' =>
array(2) {
...
}
'command.geonames.update' =>
array(2) {
...
}
'command.geonames.seed' =>
array(2) {
...
}
'command.geonames.truncate' =>
array(2) {
...
}
'blade.compiler' =>
array(2) {
...
}
'validation.presence' =>
array(2) {
...
}
'validator' =>
array(2) {
...
}
'translation.loader' =>
array(2) {
...
}
'translator' =>
array(2) {
...
}
'Illuminate\Broadcasting\BroadcastManager' =>
array(2) {
...
}
'Illuminate\Contracts\Broadcasting\Broadcaster' =>
array(2) {
...
}
'illuminate.route.dispatcher' =>
array(2) {
...
}
'auth.loaded' =>
array(2) {
...
}
'hash' =>
array(2) {
...
}
}
protected $instances =>
array(48) {
'app' =>
...
'Illuminate\Container\Container' =>
...
'events' =>
class Illuminate\Events\Dispatcher#5 (6) {
...
}
'path' =>
string(12) "/var/www/app"
'path.base' =>
string(8) "/var/www"
'path.lang' =>
string(23) "/var/www/resources/lang"
'path.config' =>
string(15) "/var/www/config"
'path.public' =>
string(15) "/var/www/public"
'path.storage' =>
string(16) "/var/www/storage"
'path.database' =>
string(17) "/var/www/database"
'path.resources' =>
string(18) "/var/www/resources"
'path.bootstrap' =>
string(18) "/var/www/bootstrap"
'Illuminate\Contracts\Http\Kernel' =>
class Immogic\Http\Kernel#26 (7) {
...
}
'request' =>
class Dingo\Api\Http\Request#437 (26) {
...
}
'config' =>
class Illuminate\Config\Repository#24 (1) {
...
}
'log' =>
class Illuminate\Log\Writer#42 (3) {
...
}
'db.factory' =>
class Illuminate\Database\Connectors\ConnectionFactory#156 (1) {
...
}
'db' =>
class Illuminate\Database\DatabaseManager#39 (4) {
...
}
'view.engine.resolver' =>
class Illuminate\View\Engines\EngineResolver#161 (2) {
...
}
'files' =>
class Illuminate\Filesystem\Filesystem#165 (0) {
...
}
'view' =>
class Illuminate\View\Factory#166 (15) {
...
}
'api.transformer' =>
class Dingo\Api\Transformer\Factory#167 (3) {
...
}
'Dingo\Api\Http\Parser\Accept' =>
class Dingo\Api\Http\Parser\Accept#174 (4) {
...
}
'api.exception' =>
class Dingo\Api\Exception\Handler#171 (5) {
...
}
'api.router.adapter' =>
class Dingo\Api\Routing\Adapter\Laravel#169 (5) {
...
}
'api.router' =>
class Dingo\Api\Routing\Router#176 (10) {
...
}
'api.http.validator' =>
class Dingo\Api\Http\RequestValidator#170 (2) {
...
}
'Dingo\Api\Http\Middleware\Request' =>
class Dingo\Api\Http\Middleware\Request#172 (6) {
...
}
'translation.loader' =>
class Illuminate\Translation\FileLoader#210 (3) {
...
}
'translator' =>
class Illuminate\Translation\Translator#211 (6) {
...
}
'validation.presence' =>
class Illuminate\Validation\DatabasePresenceVerifier#212 (2) {
...
}
'validator' =>
class Illuminate\Validation\Factory#205 (8) {
...
}
'Illuminate\Contracts\Auth\Access\Gate' =>
class Illuminate\Auth\Access\Gate#221 (6) {
...
}
'Illuminate\Broadcasting\BroadcastManager' =>
class Illuminate\Broadcasting\BroadcastManager#227 (3) {
...
}
'routes' =>
class Illuminate\Routing\RouteCollection#242 (4) {
...
}
'Dingo\Api\Routing\ResourceRegistrar' =>
class Dingo\Api\Routing\ResourceRegistrar#308 (3) {
...
}
'filesystem' =>
class Illuminate\Filesystem\FilesystemManager#418 (3) {
...
}
'Dingo\Api\Http\Validation\Domain' =>
class Dingo\Api\Http\Validation\Domain#426 (1) {
...
}
'Dingo\Api\Http\Validation\Prefix' =>
class Dingo\Api\Http\Validation\Prefix#427 (1) {
...
}
'Dingo\Api\Http\Validation\Accept' =>
class Dingo\Api\Http\Validation\Accept#428 (2) {
...
}
'Illuminate\Contracts\Debug\ExceptionHandler' =>
class Dingo\Api\Exception\Handler#171 (5) {
...
}
'Dingo\Api\Http\Request' =>
class Dingo\Api\Http\Request#437 (26) {
...
}
'Illuminate\Routing\Route' =>
class Illuminate\Routing\Route#327 (11) {
...
}
'auth' =>
class Illuminate\Auth\AuthManager#510 (5) {
...
}
'hash' =>
class Illuminate\Hashing\BcryptHasher#516 (1) {
...
}
'Dingo\Api\Http\Middleware\PrepareController' =>
class Dingo\Api\Http\Middleware\PrepareController#522 (1) {
...
}
'Immogic\Http\Controllers\Api\V1\BrokerController' =>
class Immogic\Http\Controllers\Api\V1\BrokerController#529 (7) {
...
}
'api.http.response' =>
class Dingo\Api\Http\Response\Factory#534 (1) {
...
}
}
protected $aliases =>
array(75) {
'Illuminate\Foundation\Application' =>
string(3) "app"
'Illuminate\Contracts\Container\Container' =>
string(3) "app"
'Illuminate\Contracts\Foundation\Application' =>
string(3) "app"
'Illuminate\Auth\AuthManager' =>
string(4) "auth"
'Illuminate\Contracts\Auth\Factory' =>
string(4) "auth"
'Illuminate\Contracts\Auth\Guard' =>
string(11) "auth.driver"
'Illuminate\View\Compilers\BladeCompiler' =>
string(14) "blade.compiler"
'Illuminate\Cache\CacheManager' =>
string(5) "cache"
'Illuminate\Contracts\Cache\Factory' =>
string(5) "cache"
'Illuminate\Cache\Repository' =>
string(11) "cache.store"
'Illuminate\Contracts\Cache\Repository' =>
string(11) "cache.store"
'Illuminate\Config\Repository' =>
string(6) "config"
'Illuminate\Contracts\Config\Repository' =>
string(6) "config"
'Illuminate\Cookie\CookieJar' =>
string(6) "cookie"
'Illuminate\Contracts\Cookie\Factory' =>
string(6) "cookie"
'Illuminate\Contracts\Cookie\QueueingFactory' =>
string(6) "cookie"
'Illuminate\Encryption\Encrypter' =>
string(9) "encrypter"
'Illuminate\Contracts\Encryption\Encrypter' =>
string(9) "encrypter"
'Illuminate\Database\DatabaseManager' =>
string(2) "db"
'Illuminate\Database\Connection' =>
string(13) "db.connection"
'Illuminate\Database\ConnectionInterface' =>
string(13) "db.connection"
'Illuminate\Events\Dispatcher' =>
string(6) "events"
'Illuminate\Contracts\Events\Dispatcher' =>
string(6) "events"
'Illuminate\Filesystem\Filesystem' =>
string(5) "files"
'Illuminate\Filesystem\FilesystemManager' =>
string(10) "filesystem"
'Illuminate\Contracts\Filesystem\Factory' =>
string(10) "filesystem"
'Illuminate\Contracts\Filesystem\Filesystem' =>
string(15) "filesystem.disk"
'Illuminate\Contracts\Filesystem\Cloud' =>
string(16) "filesystem.cloud"
'Illuminate\Contracts\Hashing\Hasher' =>
string(4) "hash"
'Illuminate\Translation\Translator' =>
string(10) "translator"
'Symfony\Component\Translation\TranslatorInterface' =>
string(10) "translator"
'Illuminate\Log\Writer' =>
string(3) "log"
'Illuminate\Contracts\Logging\Log' =>
string(3) "log"
'Psr\Log\LoggerInterface' =>
string(3) "log"
'Illuminate\Mail\Mailer' =>
string(6) "mailer"
string(7) "request"
'Symfony\Component\HttpFoundation\Request' =>
string(7) "request"
'Illuminate\Routing\Router' =>
string(6) "router"
'Illuminate\Contracts\Routing\Registrar' =>
string(6) "router"
'Illuminate\Session\SessionManager' =>
string(7) "session"
'Illuminate\Session\Store' =>
string(13) "session.store"
'Symfony\Component\HttpFoundation\Session\SessionInterface' =>
string(13) "session.store"
'Illuminate\Routing\UrlGenerator' =>
string(3) "url"
'Illuminate\Contracts\Routing\UrlGenerator' =>
string(3) "url"
'Illuminate\Validation\Factory' =>
string(9) "validator"
'Illuminate\Contracts\Validation\Factory' =>
string(9) "validator"
'Illuminate\View\Factory' =>
string(4) "view"
'Illuminate\Contracts\View\Factory' =>
string(4) "view"
'Dingo\Api\Contract\Http\Request' =>
string(22) "Dingo\Api\Http\Request"
'Dingo\Api\Dispatcher' =>
string(14) "api.dispatcher"
'Dingo\Api\Http\RequestValidator' =>
string(18) "api.http.validator"
'Dingo\Api\Http\Response\Factory' =>
string(17) "api.http.response"
'Dingo\Api\Routing\Router' =>
string(10) "api.router"
'Dingo\Api\Contract\Routing\Adapter' =>
string(18) "api.router.adapter"
'Dingo\Api\Auth\Auth' =>
string(8) "api.auth"
'Dingo\Api\Http\RateLimit\Handler' =>
string(12) "api.limiting"
'Dingo\Api\Transformer\Factory' =>
string(15) "api.transformer"
'Dingo\Api\Routing\UrlGenerator' =>
string(7) "api.url"
'Dingo\Api\Exception\Handler' =>
string(13) "api.exception"
'Dingo\Api\Contract\Debug\ExceptionHandler' =>
string(13) "api.exception"
'Illuminate\Contracts\Broadcasting\Factory' =>
string(40) "Illuminate\Broadcasting\BroadcastManager"
}
protected $extenders =>
array(0) {
}
protected $tags =>
array(0) {
}
protected $buildStack =>
array(0) {
}
public $contextual =>
array(0) {
}
protected $reboundCallbacks =>
array(3) {
'request' =>
array(3) {
...
}
'api.routes' =>
array(1) {
...
}
'routes' =>
array(1) {
...
}
}
protected $globalResolvingCallbacks =>
array(0) {
}
protected $globalAfterResolvingCallbacks =>
array(0) {
}
protected $resolvingCallbacks =>
array(2) {
'db' =>
array(1) {
...
}
'Illuminate\Foundation\Http\FormRequest' =>
array(1) {
...
}
}
protected $afterResolvingCallbacks =>
array(1) {
'Illuminate\Contracts\Validation\ValidatesWhenResolved' =>
array(1) {
...
}
}
}
protected $resolver =>
class Immogic\Lib\Transformer\UserTransformer#532 (3) {
protected $availableIncludes =>
array(0) {
}
protected $defaultIncludes =>
array(0) {
}
protected $currentScope =>
NULL
}
protected $parameters =>
array(0) {
}
protected $callback =>
NULL
protected $meta =>
array(0) {
}
}
Output shortened for brevity.
Don't tell me I need to use a framework-specific dumping method that filters out the shit.
The reddit thread washed up all the negative shit we've come to expect from unmoderated public comments, but there are some things to comment on:
You should be using a debugger.
A debugger would hide this from me by collapsing the container variable, just as framework-specific dumping methods do. But I want to use var_dump(), so that comment is not helpful
Once you learn how frameworks work, you build a sense of where you can fire var_dump() at and where not.
I was dumping an object to see if its internal state was as I expected it to be. Having to learn which of the thousand parts of an application are ok-to-inspect is not friendly.