예제 #1
0
 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
 protected function slotname_preface()
 {
     return parent::slotname_preface() . ".User";
 }
예제 #4
0
 protected function slotname_preface()
 {
     return parent::slotname_preface() . ".Touched";
 }
예제 #5
0
 protected function slotname_preface()
 {
     return parent::slotname_preface() . ".Comment";
 }
예제 #6
0
 protected function slotname_preface()
 {
     return parent::slotname_preface() . ".DescriptionUrl";
 }
예제 #7
0
 protected function slotname_preface()
 {
     return parent::slotname_preface() . ".Imagerepository";
 }
예제 #8
0
 protected function slotname_preface()
 {
     return parent::slotname_preface() . ".Length";
 }
예제 #9
0
 protected function slotname_preface()
 {
     return parent::slotname_preface() . ".Namespace";
 }
예제 #10
0
 protected function slotname_preface()
 {
     return parent::slotname_preface() . ".Pageid";
 }
예제 #11
0
 protected function slotname_preface()
 {
     return parent::slotname_preface() . ".Lastrevid";
 }
예제 #12
0
 protected function slotname_preface()
 {
     return parent::slotname_preface() . ".Timestamp";
 }
예제 #13
0
 protected function slotname_preface()
 {
     return parent::slotname_preface() . ".Height";
 }