コード例 #1
0
ファイル: fileTest.php プロジェクト: alerque/bibledit
 public function testUnique()
 {
     $path = tempnam(sys_get_temp_dir(), "");
     $unique1 = Filter_File::unique($path);
     file_put_contents($unique1, "");
     $unique2 = Filter_File::unique($path);
     unlink($path);
     unlink($unique1);
     $this->assertEquals($path . ".1", $unique1);
     $this->assertEquals($path . ".2", $unique2);
 }
コード例 #2
0
ファイル: logic.php プロジェクト: alerque/bibledit
 public static function save($command)
 {
     // Store task to disk with a unique name.
     $microtime = microtime();
     $microtime = explode(" ", $microtime);
     $microtime = $microtime[1] . $microtime[0];
     $path = dirname(__DIR__) . "/processes/{$microtime}";
     // On Windows the microtime is not fine enough which leads to one task overwriting another.
     // Deal with that problem here.
     $path = Filter_File::unique($path);
     $content = "{$command}";
     file_put_contents($path, $content);
 }
コード例 #3
0
ファイル: _generic.php プロジェクト: tomzx/wikimedia-apibot
 protected function slotname_preface()
 {
     return parent::slotname_preface() . ".User";
 }
コード例 #4
0
ファイル: _generic.php プロジェクト: tomzx/wikimedia-apibot
 protected function slotname_preface()
 {
     return parent::slotname_preface() . ".Touched";
 }
コード例 #5
0
ファイル: _generic.php プロジェクト: tomzx/wikimedia-apibot
 protected function slotname_preface()
 {
     return parent::slotname_preface() . ".Comment";
 }
コード例 #6
0
ファイル: _generic.php プロジェクト: tomzx/wikimedia-apibot
 protected function slotname_preface()
 {
     return parent::slotname_preface() . ".DescriptionUrl";
 }
コード例 #7
0
ファイル: _generic.php プロジェクト: tomzx/wikimedia-apibot
 protected function slotname_preface()
 {
     return parent::slotname_preface() . ".Imagerepository";
 }
コード例 #8
0
ファイル: _generic.php プロジェクト: tomzx/wikimedia-apibot
 protected function slotname_preface()
 {
     return parent::slotname_preface() . ".Length";
 }
コード例 #9
0
ファイル: _generic.php プロジェクト: tomzx/wikimedia-apibot
 protected function slotname_preface()
 {
     return parent::slotname_preface() . ".Namespace";
 }
コード例 #10
0
ファイル: _generic.php プロジェクト: tomzx/wikimedia-apibot
 protected function slotname_preface()
 {
     return parent::slotname_preface() . ".Pageid";
 }
コード例 #11
0
ファイル: _generic.php プロジェクト: tomzx/wikimedia-apibot
 protected function slotname_preface()
 {
     return parent::slotname_preface() . ".Lastrevid";
 }
コード例 #12
0
ファイル: _generic.php プロジェクト: tomzx/wikimedia-apibot
 protected function slotname_preface()
 {
     return parent::slotname_preface() . ".Timestamp";
 }
コード例 #13
0
ファイル: _generic.php プロジェクト: tomzx/wikimedia-apibot
 protected function slotname_preface()
 {
     return parent::slotname_preface() . ".Height";
 }