-
Notifications
You must be signed in to change notification settings - Fork 60
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 #42 from boly38/feature/repeatingAttributes
Fixes #41 an Article with N Comments
- Loading branch information
Showing
14 changed files
with
626 additions
and
65 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
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,30 @@ | ||
<?php | ||
|
||
namespace JsonLd\ContextTypes; | ||
|
||
class Comment extends CreativeWork | ||
{ | ||
/** | ||
* Property structure. | ||
* reference: https://schema.org/Comment (alphabetical order) | ||
* | ||
* @var array | ||
*/ | ||
private $extendedStructure = [ | ||
'downvoteCount' => null, | ||
'upvoteCount' => null, | ||
]; | ||
|
||
/** | ||
* Constructor. Merges extendedStructure up | ||
* | ||
* @param array $attributes | ||
* @param array $extendedStructure | ||
*/ | ||
public function __construct(array $attributes, array $extendedStructure = []) | ||
{ | ||
parent::__construct( | ||
$attributes, array_merge($this->structure, $this->extendedStructure, $extendedStructure) | ||
); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace JsonLd\ContextTypes; | ||
|
||
class Sculpture extends CreativeWork | ||
{ | ||
/** | ||
* Property structure. | ||
* | ||
* @var array | ||
*/ | ||
private $extendedStructure = []; | ||
|
||
/** | ||
* Constructor. Merges extendedStructure up | ||
* | ||
* @param array $attributes | ||
* @param array $extendedStructure | ||
*/ | ||
public function __construct(array $attributes, array $extendedStructure = []) | ||
{ | ||
parent::__construct( | ||
$attributes, array_merge($this->structure, $this->extendedStructure, $extendedStructure) | ||
); | ||
} | ||
} |
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
Oops, something went wrong.