parseDsn() public static method

- host:port - redis://user:pass@host:port/db?option1=val1&option2=val2 - tcp://user:pass@host:port/db?option1=val1&option2=val2 - unix:///path/to/redis.sock Note: the 'user' part of the DSN is not used.
public static parseDsn ( string $dsn ) : array
$dsn string A DSN string
return array An array of DSN compotnents, with 'false' values for any unknown components. e.g. [host, port, db, user, pass, options]
Beispiel #1
0
 /**
  * @dataProvider bogusDsnStringProvider
  * @expectedException InvalidArgumentException
  */
 public function testParsingBogusDsnStringThrowsException($dsn)
 {
     // The next line should throw an InvalidArgumentException
     $result = Resque_Redis::parseDsn($dsn);
 }