1

When I want to use for example:

$a=new PDO() 

phpstorm doesn't show PDO classes. Could you please tell me which plugin activates PDO in phpstorm7 or how to activate this classes. I use xampp server and active pdo dll file but does not work

Olimpiu POP
  • 5,001
  • 4
  • 34
  • 49
ali
  • 11
  • 1
  • 2

2 Answers2

0

You can solve this issue by doing this: File > Invalidate Caches. That will do the trick!

ljacqu
  • 2,132
  • 1
  • 17
  • 21
Suchit kumar
  • 11,809
  • 3
  • 22
  • 44
0

To use the PDO from the global namespace did the trick for me. I needed to do that, because I defined a namespace for the php-file, in which I used the PDO-Class.

<?
namespace Important\Functions;
function f1()
{
    $pdo = new \PDO("odbc:somelink","user","pass");
    f2($pdo);
}

/***
 * @param \PDO $pdo If you want code-completition within the
 * function, I had to give phpstorm this hint
 */
function f2($pdo) {}
JackLeEmmerdeur
  • 724
  • 11
  • 17