Jump to content

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/302284-finding-file-when-use-is-used/
Share on other sites

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.

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/*.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.