-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add new json objects, value formatters, removed unused methodes, changed
type hintings #1756
- Loading branch information
Showing
52 changed files
with
1,215 additions
and
1,254 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,22 @@ | ||
<?php | ||
|
||
namespace luya\web\jsonld; | ||
|
||
/** | ||
* http://schema.org/AggregateRating | ||
* | ||
* @author Basil Suter <basil@nadar.io> | ||
* @since 1.0.3 | ||
*/ | ||
class AggregateRating extends BaseThing implements AggregateRatingInterface | ||
{ | ||
use AggregateRatingTrait; | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function typeDefintion() | ||
{ | ||
return 'AggregateRating'; | ||
} | ||
} |
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,13 @@ | ||
<?php | ||
|
||
namespace luya\web\jsonld; | ||
|
||
/** | ||
* http://schema.org/AggregateRating | ||
* | ||
* @author Basil Suter <basil@nadar.io> | ||
* @since 1.0.3 | ||
*/ | ||
interface AggregateRatingInterface extends RatingInterface | ||
{ | ||
} |
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 luya\web\jsonld; | ||
|
||
/** | ||
* http://schema.org/AggregateRating | ||
* | ||
* @author Basil Suter <basil@nadar.io> | ||
* @since 1.0.3 | ||
*/ | ||
trait AggregateRatingTrait | ||
{ | ||
use RatingTrait; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace luya\web\jsonld; | ||
|
||
/** | ||
* Represents any value object. | ||
* | ||
* Value objects are used to formate the value of a property. | ||
* | ||
* @author Basil Suter <basil@nadar.io> | ||
* @since 1.0.3 | ||
*/ | ||
abstract class BaseValue | ||
{ | ||
/** | ||
* Get the value to assign from BaseValue. | ||
*/ | ||
abstract public function getValue(); | ||
} |
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,22 @@ | ||
<?php | ||
|
||
namespace luya\web\jsonld; | ||
|
||
/** | ||
* http://schema.org/Comment | ||
* | ||
* @author Basil Suter <basil@nadar.io> | ||
* @since 1.0.3 | ||
*/ | ||
class Comment extends BaseThing implements CommentInterface | ||
{ | ||
use CommentTrait; | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function typeDefintion() | ||
{ | ||
return 'Comment'; | ||
} | ||
} |
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,13 @@ | ||
<?php | ||
|
||
namespace luya\web\jsonld; | ||
|
||
/** | ||
* http://schema.org/Comment | ||
* | ||
* @author Basil Suter <basil@nadar.io> | ||
* @since 1.0.3 | ||
*/ | ||
interface CommentInterface extends CreativeWorkInterface | ||
{ | ||
} |
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 luya\web\jsonld; | ||
|
||
/** | ||
* http://schema.org/Comment | ||
* | ||
* @author Basil Suter <basil@nadar.io> | ||
* @since 1.0.3 | ||
*/ | ||
trait CommentTrait | ||
{ | ||
use CreativeWorkTrait; | ||
} |
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,22 @@ | ||
<?php | ||
|
||
namespace luya\web\jsonld; | ||
|
||
/** | ||
* http://schema.org/Comment | ||
* | ||
* @author nadar | ||
* | ||
*/ | ||
class ContactPoint extends BaseThing implements ContactPointInterface | ||
{ | ||
use ContactPointTrait; | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function typeDefintion() | ||
{ | ||
return 'ContactPoint'; | ||
} | ||
} |
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 luya\web\jsonld; | ||
|
||
interface ContactPointInterface extends ThingInterface | ||
{ | ||
public function setEmail($email); | ||
|
||
public function getEmail(); | ||
|
||
public function setTelephone($telephone); | ||
|
||
public function getTelephone(); | ||
} |
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,36 @@ | ||
<?php | ||
|
||
namespace luya\web\jsonld; | ||
|
||
trait ContactPointTrait | ||
{ | ||
use ThingTrait; | ||
|
||
private $_email; | ||
|
||
public function setEmail($email) | ||
{ | ||
$this->_email = $email; | ||
|
||
return $this; | ||
} | ||
|
||
public function getEmail() | ||
{ | ||
return $this->_email; | ||
} | ||
|
||
private $_telephone; | ||
|
||
public function setTelephone($telephone) | ||
{ | ||
$this->_telephone = $telephone; | ||
|
||
return $this; | ||
} | ||
|
||
public function getTelephone() | ||
{ | ||
return $this->_telephone; | ||
} | ||
} |
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,22 @@ | ||
<?php | ||
|
||
namespace luya\web\jsonld; | ||
|
||
/** | ||
* http://schema.org/Country | ||
* | ||
* @author Basil Suter <basil@nadar.io> | ||
* @since 1.0.3 | ||
*/ | ||
class Country extends BaseThing implements CountryInterface | ||
{ | ||
use CountryTrait; | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function typeDefintion() | ||
{ | ||
return 'Country'; | ||
} | ||
} |
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,13 @@ | ||
<?php | ||
|
||
namespace luya\web\jsonld; | ||
|
||
/** | ||
* http://schema.org/Country | ||
* | ||
* @author Basil Suter <basil@nadar.io> | ||
* @since 1.0.3 | ||
*/ | ||
interface CountryInterface extends PlaceInterface | ||
{ | ||
} |
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 luya\web\jsonld; | ||
|
||
/** | ||
* http://schema.org/Country | ||
* | ||
* @author Basil Suter <basil@nadar.io> | ||
* @since 1.0.3 | ||
*/ | ||
trait CountryTrait | ||
{ | ||
use PlaceTrait; | ||
} |
Oops, something went wrong.