Welcome Guest, Not a member yet? Register   Sign In
Convert var to my class
#1

Hi
I use custom_result_object for database and use my class
But I cannot access to class variables with auto-complete feature in PHPStorm
How do I can convert a variable to my class and force phpstorm to show my method and variables?
Example:
PHP Code:
class car {
 var 
$title,$id;
 var 
go() {}
}

$t $this->db->get('car')->custom_result_object('car');
$t = (car$t;
$t->go(); 

I need to show go method in auto-complete windows in phpstorm
Reply
#2

For one var is depreciated, you should use public, private, protected or static.

phpStorm will not be looking for var.

A couple of us did do a live templates for CodeIgniter 4.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

(This post was last modified: 02-03-2021, 07:32 AM by omid_student.)

(02-03-2021, 07:24 AM)InsiteFX Wrote: For one var is depreciated, you should use public, private, protected or static.

phpStorm will not be looking for var.

A couple of us did do a live templates for CodeIgniter 4.

Thanks

(02-03-2021, 07:24 AM)InsiteFX Wrote: For one var is depreciated, you should use public, private, protected or static.

phpStorm will not be looking for var.

A couple of us did do a live templates for CodeIgniter 4.

I try to send var to function and return class with define return type
Reply




Theme © iAndrew 2016 - Forum software by © MyBB