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 #234 from wmde/addTermStore
Add interfaces for writing Item/Property term stores
- Loading branch information
Showing
3 changed files
with
49 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace Wikibase\DataModel\Services\Term; | ||
|
||
use Wikibase\DataModel\Entity\ItemId; | ||
use Wikibase\DataModel\Term\Fingerprint; | ||
|
||
interface ItemTermStoreWriter { | ||
|
||
/** | ||
* Updates the stored terms for the specified item. | ||
* @throws TermStoreException | ||
*/ | ||
public function storeTerms( ItemId $itemId, Fingerprint $terms ); | ||
|
||
/** | ||
* @throws TermStoreException | ||
*/ | ||
public function deleteTerms( ItemId $itemId ); | ||
|
||
} |
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,21 @@ | ||
<?php | ||
|
||
namespace Wikibase\DataModel\Services\Term; | ||
|
||
use Wikibase\DataModel\Entity\PropertyId; | ||
use Wikibase\DataModel\Term\Fingerprint; | ||
|
||
interface PropertyTermStoreWriter { | ||
|
||
/** | ||
* Updates the stored terms for the specified property. | ||
* @throws TermStoreException | ||
*/ | ||
public function storeTerms( PropertyId $propertyId, Fingerprint $terms ); | ||
|
||
/** | ||
* @throws TermStoreException | ||
*/ | ||
public function deleteTerms( PropertyId $propertyId ); | ||
|
||
} |
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,7 @@ | ||
<?php | ||
|
||
namespace Wikibase\DataModel\Services\Term; | ||
|
||
class TermStoreException extends \RuntimeException { | ||
|
||
} |