-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This creates a new read model to hold all data of a Property. The class previously called "Property" is renamed to "PredicateProperty" to indicate the statement context. Change-Id: If602fc45b24826bbb61a0c593c57f3fd72c90c11
- Loading branch information
Showing
8 changed files
with
58 additions
and
38 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,31 @@ | ||
<?php declare( strict_types=1 ); | ||
|
||
namespace Wikibase\Repo\RestApi\Domain\ReadModel; | ||
|
||
use Wikibase\DataModel\Entity\PropertyId; | ||
|
||
/** | ||
* @license GPL-2.0-or-later | ||
*/ | ||
class PredicateProperty { | ||
|
||
private PropertyId $id; | ||
private ?string $dataType; | ||
|
||
public function __construct( PropertyId $id, ?string $dataType ) { | ||
$this->id = $id; | ||
$this->dataType = $dataType; | ||
} | ||
|
||
public function getId(): PropertyId { | ||
return $this->id; | ||
} | ||
|
||
/** | ||
* @return string|null null only if the property was deleted/cannot be found | ||
*/ | ||
public function getDataType(): ?string { | ||
return $this->dataType; | ||
} | ||
|
||
} |
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
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
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
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