Validation within view scripts

General discussion on Zend Studio
Post Reply
Posts: 1
Joined: Tue Feb 23, 2016 5:20 pm

Validation within view scripts

Post by stev810 » Tue Feb 23, 2016 5:44 pm


I'm having a problem with Zend Studio underlining the variable "$this" in all of my view scripts. The warning is "Variable $this is undefined":
zs_view_this.png (6.53 KiB) Viewed 3074 times
Is Zend Studio supposed to understand that this is a view script (phtml) and resolve $this to the view object? My project is setup as a ZendFramework project with the ZF 1.12.17 library included.

The project structure is standard for a ZF1 project so the view scripts are in a folder that corresponds to a controller. Example:

Code: Select all

The IndexController is a standard controller as generated by Zend Tool.

I would like to have auto complete for the views but ZS doesn't seem to understand that the phtml files are Zend Framework views objects.

Posts: 55
Joined: Fri Nov 06, 2015 11:42 pm

Re: Validation within view scripts

Post by stij2324 » Tue Feb 23, 2016 11:06 pm

Indeed i can agree with trhis.
I have the same issue.

Posts: 4
Joined: Thu Aug 13, 2009 8:04 am

Re: Validation within view scripts

Post by poldekch » Fri Oct 07, 2016 12:20 pm

Is there any fix for that?
I'm trying to clean up my project but the 'Problem' window/view is flooded with these warnings...

Post Reply