|
| Code completion with different scope | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
Joined: 16 Oct 2006 |
Posts: 6 |
|
|
|
Posted: Mon Oct 16, 2006 5:59 am |
|
|
|
|
|
a quick example of my code:
site.php?action=login
$engine = new engine();
$engine->parse($_REQUEST['action']);
|
engine.class:
$this->template = new smarty();
function parse($action) {
include("../actions/".$action.".action.php);
}
|
login.action.php:
#login action; if no data is posted, display login screen;
$this->template->getContent("login.tmpl");
engine:: // code completion works; so it knows the engine object
template:: // code completion works; so it knows the template object
$this-> // code completion doesn't work, it doesn't know what "this" is.
|
In login.action.php, I now have the "this" object, which is the engine object.
But if I type "$this->" and try to complete it, the message: "
Code completion is not available due to the following error(s):
Failed to identify type of "$this" global variable"
So, the problem is not that the files are not in my Code Insight Include List.
|
|
|
| | |
|
| | |
Joined: 16 Oct 2006 |
Posts: 6 |
|
|
|
Posted: Mon Oct 16, 2006 8:22 am |
|
|
|
|
|
Ok, that solves half!
Thanks.
in my actionfile I have set this:
/**
* @var engine
*/
$this->void();
|
In my engine class I have documented customer and factory:
/**
* @var customer
*/
public
$customer;
/**
* @var objectfactory
*/
public
$factory;
|
$c = $this->factory->getCustomerById(); // CC works for the factoryclass;
$this->customer-> // CC works for the customerclass;
$a = $this->customer;
$a-> // CC doesn't work. [i]Failed to find class of "factory" member, declared as "factory")[/i]
|
Strange, because I declared the factory member as objectfactory.
|
|
|
| | |
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
All times are GMT - 5 Hours
Page 1 of 2
|
|
|
| |