| | |
| | | nameTrait, ownerTrait, potentialActionTrait, sameAsTrait, subjectOfTrait, urlTrait; |
| | | |
| | | protected string $id; |
| | | |
| | | protected bool $showID = true; |
| | | protected array $ignore = [ |
| | | 'mappedMethods', |
| | | 'ignore', |
| | | 'id' |
| | | 'id', |
| | | 'showID', |
| | | ]; |
| | | public function outputSchema():array |
| | | { |
| | |
| | | }, ARRAY_FILTER_USE_KEY) |
| | | ); |
| | | |
| | | return array_merge([ |
| | | $id = $this->showID ? ['@id' => $id] : []; |
| | | |
| | | return array_merge($id, [ |
| | | '@type' => $this->getTypeName(), |
| | | '@id' => $id, |
| | | ], array_filter($elements)); |
| | | } |
| | | |
| | |
| | | ); |
| | | |
| | | } |
| | | |
| | | public function showID(bool $showIt = true):void |
| | | { |
| | | $this->showID = $showIt; |
| | | } |
| | | } |