Community
Participate
Working Groups
1. Create a PHP 5.3 project 2. Create 2 php files with the code below. 3. In caller.php file point the "L" in "L\MYCONST" or "L\MyFunction()" -> you get a tooltip showing App\Lib1 (OK) 4. Ctrl+click on the "L" -> App\Lib1 in lib1.php file is selected (OK) 5. Now repeat steps 3 and 4 for "Obj" in "Obj::WhoAmI()" -> no tooltip is shown plus ctrl+click is not available lib1.php: ========= <?php // application library 1 namespace App\Lib1; const MYCONST = 'App\Lib1\MYCONST'; function MyFunction() { return __FUNCTION__; } class MyClass { static function WhoAmI() { return false; } } ?> caller.php: ============ <?php use App\Lib1 as L; use App\Lib1\MyClass as Obj; require_once('lib1.php'); //require_once('lib2.php'); header('Content-type: text/plain'); echo L\MYCONST . "\n"; echo L\MyFunction() . "\n"; echo Obj::WhoAmI() . "\n"; ?>
Created attachment 178227 [details] patch
I think that there's not need of the if statement. The getRealName should handle the alias/type name already. I created a new patch.
Created attachment 178232 [details] Alternative
Hi QS yes,you are right,thanks,your patch is better than mine.
fixed
change status
the following case does not work <?php namespace ns1\n\a; class CCC{ } namespace ns1; use ns1\n as m; $v = new m\a\CCC();
fixed in head
Verified with Studio 9 #179. Closing. Ilina Stefanova