method in parent class not foun


I am using Yii framework and i have controller name 'ActivityController' which extends from Controller which in turn extends from CController. CController has method render() but when I use $this->render in my 'ActivityController' class file i get notification from IDE that "method reneder not found in  'ActivityController' "

it is not just render method , it is same situation about all other methods. why it can't find method in parents class in yii?



Hi there,

  • What error PhpStorm gives you (screenshot would be great)?
  • Does code completion works when you trying to type render() (e.g. $this->r<Ctrl+Space> ... or how it works in Yii -- sorry, I'm not familiar with this framework much)?
  • Do you see "There more than 1 class with such name exist" or similar message (when hovering over Controler class)?
  • "class ActivityController extends Controller" -- if you Ctrl+Click on "Controller" -- will it take you to that class straight away or will show you some options (multiple choices) ?
  • I get "method reneder not found in  'ActivityController' " error when i hover over 'reneder' method
  • Code completion also doesn't work
  • yeah i see multiple definitions exist msg
  • there are two different options to choose when i hit CTRL+B on 'Contoller' class

Class - 23.03.2012 , 09_53_07.png
Method- 23.03.2012 , 09_52_52.png

Code Completion- 23.png
Class-Options- 23.03.2012 , 09_58_56.png


Go to both declarations separately and tell me what the file names are (including path relative to the project root).

If one of the files is yiilite.php (which I'm expecting it to be), then find it in Project View panel, right click on it and use "Mark as Plain Text" command.

Additional possibly useful link:

I think this is your case:


I had deleted yiilite.php long time ago on recommendation on yii forums and added yii as external library in my project.
I was calling yii.php in index.php as
instead of
$yii = "c:/php/libs/yii/yii.php";

because i was getting error that string "Dynamic include expression require_once($yii) is not analysed"

now after going to the yiiframework link and following steps i was again getting error that class Yii not found. Then i tried to add yii library as external libraries in my project but after adding several tim ethey never show up in external library view.
after some frustration i added "c:/php/libs/yii" to directories as shown in screenshotDirectories - 23.03.2012 , 11_39_29.png
Library - 23.03.2012 , 11_56_17.png

in above screenshot you can see that i have added c:/php/libs/yii in included path but it never appears in external libraries. i double clicked external library after adding c:/php/libs/yii in settings/php.

Now even after i can't see yii in external libraries my project is working as expected and i think it because i added c:/php/libs/yii in directories as in previous screenshot.

but why yii library is not showing up in external library is beyond my understanding? first i though that it is not showin gup becaus ei have already added it in directories but that was not the case. i tried to add c:/php/libs/zend and even that never showed up in external library resource.

am i doing something wrong?



just to let you know that after posting i invalidated caches and tried to add c:/php/libs/pear and it worked. I could see it in the external libraries.
just for testing i removed c:/php/libs/yii from setting->project settings->directories and added again in external libraries and it showed up there . i don't know how to ignore c:/php/libs/yii/cli/views in external libraries view so i removed it from there and added agian in setting->project settings->directories and now i can work perfectly. it is all good now.

thanks for guiding me in right direction. I will add comment to yiiframewrok link also about how i get it working


same procedure is not working in EAP 116.101 on another yii project which i created using yii tutorial.
dir- 23.03.2012 , 16_51_05.png
when i add assets and runtime dir in excluded i get above errors. although in dir view it shows as excluded after i restart IDE but actually it is not excluded. may be bug in this EAP.
should I submit issue in tracker?


I think you are doing something wrong here (I'm not sure about External Libraries entry). Could you create some simple project (set it up as you think it should), archive it and attach here (all files are required) so I can play with it myself?


I closed the project in eap 116.101 and reopened in 3.0.3 and project worked as it should. there is definetly something different in both version regarding above feature.
I will create and upload new project soon.



Please sign in to leave a comment.