Page 1 of 1

Intellisense Not Picking Up Class Members

PostPosted: August 19th, 2012, 6:41 pm
by flareman2020
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->

Re: Intellisense Not Picking Up Class Members

PostPosted: August 19th, 2012, 10:15 pm
by Miloslav Beno
Hello,

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

Thank you very much!

Re: Intellisense Not Picking Up Class Members

PostPosted: August 20th, 2012, 1:40 pm
by Miloslav Beno
The bug is fixed, it was introduced in the latest update. We'll publish the update ASAP.

Thank you again!

Re: Intellisense Not Picking Up Class Members

PostPosted: August 22nd, 2012, 1:49 pm
by Miloslav Beno
We've published the update today, so it should work fine now. Please notify us if it works as expected for you.

Thanks again!