SublimePHPIntel icon indicating copy to clipboard operation
SublimePHPIntel copied to clipboard

Resolve classes instantiated inside a construct

Open joao-pedro-alves opened this issue 6 years ago • 0 comments

I'd like to know if there is any way to resolve classes which were instantiated inside a __construct. It is very commom in frameworks that use Dependency Injection.

Example:

namespace App\Http\Controllers;

use App\Repositories\VideosRepository;

class VideoController extends Controller
{
    public function __construct(VideosRepository $videosRepo)
    {
        $this->videosRepo = $videosRepo;
	}
}

In this case, if a create a new method inside this classe and type $this->videosRepo-> i'd like to be shown the methods of the class VideosRepository.

Thanks in advance

joao-pedro-alves avatar Jan 11 '19 15:01 joao-pedro-alves