資源追蹤PHP類庫
<?php namespace Lurker\Tests\Event; use Lurker\Resource\FileResource; use Lurker\Resource\DirectoryResource; use Lurker\Event\FilesystemEvent; use Lurker\Resource\TrackedResource; class FilesystemEventTest extends \PHPUnit_Framework_TestCase { public function testConstructAndGetters() { $event = new FilesystemEvent( $tracked = new TrackedResource(23, new DirectoryResource(__DIR__)), $resource = new FileResource(__FILE__), $type = FilesystemEvent::MODIFY ); $this->assertSame($tracked, $event->getTrackedResource()); $this->assertSame($resource, $event->getResource()); $this->assertSame($type, $event->getType()); } public function testIsFileChange() { $event = new FilesystemEvent( $tracked = new TrackedResource(23, new DirectoryResource(__DIR__.'/../')), $resource = new FileResource(__FILE__), $type = FilesystemEvent::MODIFY ); $this->assertTrue($event->isFileChange()); $this->assertFalse($event->isDirectoryChange()); }
這是一個資源追蹤PHP類別庫,需要的朋友可以下載使用。
免責聲明
本站所有資源皆由網友貢獻或各大下載網站轉載。請自行檢查軟體的完整性!本站所有資源僅供學習參考。請不要將它們用於商業目的。否則,一切後果都由您負責!如有侵權,請聯絡我們刪除。聯絡方式:admin@php.cn
相關文章

21Jul2016
整合了前面的PHP資料庫連線類別~~做成一個分頁類別!。不知道學PHP有沒有前途~哎越寫越沒勁?php Classcreatedb//類的開始{ var$db="localhost";//資料庫位址; var$dbname="root";//用戶名; var$ dbpwd="";//密碼; var$

18Dec2024
從 PHP 中的其他類別存取 MySQLi 連線從 PHP 5.6 升級到 7.0 時,必須從 MySQL 過渡到 MySQLi。這...

23Oct2024
本文介紹了一種在 PHP/MySQL 中使用鄰接清單模型儲存分層資料(例如類別和子類別)的方法。它提出了一種一次性資料檢索演算法,可以使用單一資料有效地獲取分層資料。


Hot Tools

熱門文章
丟失記錄:Bloom&Rage -Corey和Dylan的鎖組合
19Feb2025手游攻略
Longvinter:完整的釣魚指南
21Feb2025手游攻略
KCD 2:Zhelejov Marshes的地圖位置和解決方案
19Feb2025手游攻略
Hello Kitty Island冒險:重新啟動機器人任務演練
16Feb2025手游攻略
三角洲力量:如何找到鑰匙卡
16Feb2025手游攻略