NuSphere Forums Forum Index
NuSphere Forums
Reply to topic


Joined: 07 Aug 2008
Posts: 6
Reply with quote
I THINK it should return AMethod() !! hmmm you made me feel shame :$, so what's the right thing??
View user's profileFind all posts by m_abdelfattahSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
It would be correct to say that "thing is undefined" Smile
From the code, it absolutely unclear which object instance is in $this->Wood, and even whether it's object instance at all, it's not clear either.
To understand what is in $this->Wood, a developer (like you or me) would need to see an assignment for $this->Wood or an appropriately formed phpdoc definition (typehint) for this property. Same goes to the IDE.

Check posts on this thread submitted earlier and screenshots with shown red rectangles in particular. It's how it works.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 07 Aug 2008
Posts: 6
Reply with quote
dmitri wrote:
It would be correct to say that "thing is undefined" Smile
From the code, it absolutely unclear which object instance is in $this->Wood, and even whether it's object instance at all, it's not clear either.
To understand what is in $this->Wood, a developer (like you or me) would need to see an assignment for $this->Wood or an appropriately formed phpdoc definition (typehint) for this property. Same goes to the IDE.

Check posts on this thread submitted earlier and screenshots with shown red rectangles in particular. It's how it works.

Sorry for all this, really sorry for disturbing u alot.

BTW, 1st method works fine with me, 2nd not.
View user's profileFind all posts by m_abdelfattahSend private message


Joined: 25 Jul 2006
Posts: 70
Reply with quote
dmitri wrote:
I believe "@property array[myRegion] $tblRegions " would be useless. What may make sense is @property someobject $tblRegions[], otherwise it would be completely unclear of what class the object instances are in the array.


Did this functionality ever make it in? This would be awesome, I have a lot of places I would love to use this type hinting.
View user's profileFind all posts by cpriestSend private message


Joined: 13 Jun 2007
Posts: 5
Reply with quote
this works great:
/** @var Events $the_events*/
$the_events=Factory::inst("Events");

but would it be possible to have this working?

$the_events=Factory::inst("Events");/** @var Events $the_events*/

It would make the code more compact and still keep it readable.

Thanks.
View user's profileFind all posts by zolteeSend private message


Joined: 20 Oct 2010
Posts: 2
Reply with quote
Hello,

I just registered on this site to make this reply so others like me who need to get Code Completion aka Code Insight to work with CodeIgniter in PhpED, don't waste their time.
This will make it possible for you to get access to for example $this->load->view('view_blog', $data) etc.
Just copy paste the code below in your Controller class file above the class declaration, like this:

<?php
/**
* @property CI_Loader $load
* @property CI_Form_validation $form_validation
* @property CI_Input $input
* @property CI_Email $email
* @property CI_DB_active_record $db
* @property CI_DB_forge $dbforge
*/

class Blog extends Controller {

}

I don't understand why such important code is so hard to get by... same issue is with debugging CI. I know there is blog post here but come on one shouldn't need to dig in Internet and read a long blog thread to be able to maybe get it to work after a lot of tweaking.

I don't intend to sound negative but to make positive criticism to improve PhpED IDE. CodeIgniter is now one of the popular and growing frameworks out there and every serious PHP IDE in the market specially the commercials ones, should implement such basic features as Code Completion and Debugging for CodeIgniter. I was even considering to suggest a change of IDE for our company while looking for an IDE that could handle these features for CodeIgniter.
View user's profileFind all posts by CromSend private message
Custom code-completion rules
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 2 of 2  

  
  
 Reply to topic