Intellisense Not Picking Up Class Members

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

Intellisense Not Picking Up Class Members

Postby flareman2020 » August 19th, 2012, 6:41 pm

The IntelliSense picks up my variable and function declarations within a project, but it doesn't display the class members after I type the -> operator.

Below is a simple class that I created in a blank project--that is, there are no other files or code that would create any interference. After declaring an instance of the TestMailMessage class into the $msg variable, I tried accessing that object's members with no success.

Code: Select all
   
<?php
/**
     * TestMailMessage Class
     */
    class TestMailMessage{
        public $Sender;
        private $Recipients;
        public $ReplyTo;       
        public $Body;
        public $Subject;
        public $IsBodyHTML;
   
        function __construct($from, $to, $body, $subject, $reply_to, $is_html = true){
            $this->IsBodyHTML = $is_html;
            $this->Recipients = array();
            $this->Recipients[] = $to;           
            $this->ReplyTo = $reply_to;
            $this->Sender = $from;
            $this->Subject = $subject;
            $this->Body = $body;
        }
   
        function AddRecipient($email_address){
            $this->Recipients[] = $email_address;
        }
   
        function SendMessage(){
            $result = 0;
            $headers = "";
       
            if(strlen($this->ReplyTo)){
                $headers  = "Reply-To: ".$this->ReplyTo."\r\n";
            }
       
            $headers .= "From: ".$this->Sender."\r\n";
       
            if($this->IsBodyHTML){
                $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
            }
            else{
                $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
            }
       
            $headers .= "MIME-Version: 1.0\r\n";           
       
            //Currently, this function only supports a single recipient
            if(strlen(trim($this->Recipients[0])) && strlen(trim($this->Sender))){
                if(mail($this->Recipients[0], stripslashes($this->Subject), stripslashes($this->Body), $headers)){
                    $result = -1;
                }
            }
       
            return $result;
        }
    }

    $msg = new TestMailMessage("test@test.com", "test2@test.com", "", "", "");

//IntelliSense doesn't seem to work when typing $msg->
?>


Within the class, the object members are displayed when using $this->
flareman2020
 
Posts: 2
Joined: August 19th, 2012, 6:33 pm

Re: Intellisense Not Picking Up Class Members

Postby Miloslav Beno » August 19th, 2012, 10:15 pm

Hello,

We were able to replicate the issue. We'll fix it ASAP.

Thank you very much!
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm

Re: Intellisense Not Picking Up Class Members

Postby Miloslav Beno » August 20th, 2012, 1:40 pm

The bug is fixed, it was introduced in the latest update. We'll publish the update ASAP.

Thank you again!
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm

Re: Intellisense Not Picking Up Class Members

Postby Miloslav Beno » August 22nd, 2012, 1:49 pm

We've published the update today, so it should work fine now. Please notify us if it works as expected for you.

Thanks again!
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 19 guests

cron

User Control Panel

Login

Who is online

In total there are 19 users online :: 0 registered, 0 hidden and 19 guests (based on users active over the past 5 minutes)
Most users ever online was 787 on May 12th, 2024, 11:50 am

Users browsing this forum: No registered users and 19 guests