Set class methods call order for PsiElement resolve

I have extension class (PHP)

class some_class extends extension{

private $db;

// always called first by framework logic
public function onCreate() {
$this->db = handyCore::loadExtension('ext.database');

// always being called after onCreate() already been called
public function onExecute($param_str, $post)
$this->db; // this not resolving

i created plugin, so PhpStorm can resolve construction of extension initialization (intellisense works), in example:



It this class i have 2 basic methods which always called in order:

onCreate - first , onExecute - second


So all fields which were initialized at onCreate should have same PsiReference if being called inside onExecute.

By default PhpStorm can't resolve call order of methods by framework code and for this reason fields used in onExecute have no reference - no resolved.


So my question is: is there a way to set call order for methods in class? So PhpStorm can resolve fields which was already initialized. Or what is best practice to solve such situation?


Thanks for your time and answers!

p.s. Sorry for bad English ^^

Official comment

Unfortunately, it looks like there is currently no way to do this. Please create a feature request at: and we will extend our Open API.

Please sign in to leave a comment.