NotionCommotion Posted October 5, 2016 Share Posted October 5, 2016 I was reviewing the following lines of code. <?php namespace Concrete\Block\Html; use Loader; use \Concrete\Core\Block\BlockController; class Controller extends BlockController { Turns out BlockController.php is located at /var/www/concrete5.7.5.9/concrete/src/Block/BlockController.php. Other than a brute search for "class BlockController", how should I find the file? Quote Link to comment https://forums.phpfreaks.com/topic/302284-finding-file-when-use-is-used/ Share on other sites More sharing options...
kicken Posted October 5, 2016 Share Posted October 5, 2016 You'd look at your autoloader settings to see what directory the namespace maps too then follow that. If you're using composer and the file is part of a library then search the vendor/composer/autoload_* files. If you're using some other setup you'll have to determine how it handles autoloading and figure out the path from it. Quote Link to comment https://forums.phpfreaks.com/topic/302284-finding-file-when-use-is-used/#findComment-1538048 Share on other sites More sharing options...
requinix Posted October 5, 2016 Share Posted October 5, 2016 If Concrete\Core\Block\BlockController is located in /var/www/concrete5.7.5.9/concrete/src/Block/BlockController.php then it's a good bet that any Concrete\Core\* class is located in /var/www/concrete5.7.5.9/concrete/src/*. Quote Link to comment https://forums.phpfreaks.com/topic/302284-finding-file-when-use-is-used/#findComment-1538049 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.