0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

この名前空間ってどこにあるんだ?

0
Last updated at Posted at 2019-04-11

Laravel5.7に入れたbarryvdh/laravel-debugbarのコードを読んでいた時に、**use DebugBar\OpenHandler;**と書いてあって「namespace DebugBar/なんかどこにも書いてないぞ?」と思っていました。

ですがcomposerが生成したコードを読んでいたら、/vendor/composer/autoload_classmap.phpに書いてありました。

autoload_classmap.php
'DebugBar\\OpenHandler' => $vendorDir . '/maximebf/debugbar/src/DebugBar/OpenHandler.php',

DebugBarから始まるのはmaximebf/debugbarのようですね。
これでコードリーディングが捗るぞい!

追記

もっと簡単な方法がありました。

PHP
use DebugBar\OpenHandler;

echo (new ReflectionClass(DebugBar\OpenHandler::class))->getFileName();

//C:\xampp\htdocs\myapp\laravel58\vendor\maximebf\debugbar\src\DebugBar\OpenHandler.php
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?