-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from texthtml/feature/factory-interface
add \TH\Lock\Factory interface
- Loading branch information
Showing
4 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
namespace TH\Lock; | ||
|
||
interface Factory | ||
{ | ||
/** | ||
* Create a Lock for $resource | ||
* | ||
* @param string $resource resource identifier | ||
* @return Lock | ||
*/ | ||
public function create($resource); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace TH\Lock; | ||
|
||
interface TtlFactory extends Factory | ||
{ | ||
/** | ||
* Create a Lock for $resource | ||
* | ||
* @param string $resource resource identifier | ||
* @param integer $ttl lock time-to-live in milliseconds | ||
* @return Lock | ||
*/ | ||
public function create($resource, $ttl = null); | ||
} |