コード例 #1
0
ファイル: DITest.php プロジェクト: rado-h/neo4jphp
 public function testUnregister()
 {
     DI::register("testScalar", 42);
     $this->assertTrue(DI::isRegistered("testScalar"));
     DI::unregister("testScalar");
     $this->assertFalse(DI::isRegistered("testScalar"));
 }
コード例 #2
0
ファイル: Transport.php プロジェクト: rado-h/neo4jphp
 /**
  * Set the host and port of the endpoint
  *
  * @param string $host
  * @param integer $port
  */
 public function __construct($host = 'localhost', $port = 7474)
 {
     $this->host = $host;
     $this->port = $port;
     if (DI::isRegistered("dbPath")) {
         $this->path = DI::resolve("dbPath");
     }
 }