This repository has been archived by the owner on Apr 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
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 #19 from 21TORR/next
Added more integrations of fields + add more structured transformed data
- Loading branch information
Showing
10 changed files
with
300 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ | |
}, | ||
"extra": { | ||
"branch-alias": { | ||
"dev-next": "0.2.x-dev" | ||
"dev-next": "4.x-dev" | ||
} | ||
}, | ||
"autoload": { | ||
|
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,29 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Torr\PrismicApi\Data\Value; | ||
|
||
final class DocumentLinkValue | ||
{ | ||
/** | ||
*/ | ||
public function __construct ( | ||
private string $id, | ||
private ?string $type, | ||
) | ||
{ | ||
} | ||
|
||
/** | ||
*/ | ||
public function getId () : string | ||
{ | ||
return $this->id; | ||
} | ||
|
||
/** | ||
*/ | ||
public function getType () : ?string | ||
{ | ||
return $this->type; | ||
} | ||
} |
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,56 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Torr\PrismicApi\Data\Value; | ||
|
||
/** | ||
* | ||
*/ | ||
final class ImageValue | ||
{ | ||
/** | ||
*/ | ||
public function __construct ( | ||
private string $url, | ||
private int $width, | ||
private int $height, | ||
private ?string $alt = null, | ||
private ?string $copyright = null, | ||
) | ||
{ | ||
} | ||
|
||
/** | ||
*/ | ||
public function getUrl () : string | ||
{ | ||
return $this->url; | ||
} | ||
|
||
/** | ||
*/ | ||
public function getWidth () : int | ||
{ | ||
return $this->width; | ||
} | ||
|
||
/** | ||
*/ | ||
public function getHeight () : int | ||
{ | ||
return $this->height; | ||
} | ||
|
||
/** | ||
*/ | ||
public function getAlt () : ?string | ||
{ | ||
return $this->alt; | ||
} | ||
|
||
/** | ||
*/ | ||
public function getCopyright () : ?string | ||
{ | ||
return $this->copyright; | ||
} | ||
} |
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,71 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Torr\PrismicApi\Data\Value; | ||
|
||
final class VideoValue | ||
{ | ||
public const PROVIDER_YOUTUBE = "youtube"; | ||
public const PROVIDER_VIMEO = "vimeo"; | ||
|
||
public const PROVIDER_MAPPING = [ | ||
"Vimeo" => self::PROVIDER_VIMEO, | ||
"YouTube" => self::PROVIDER_YOUTUBE, | ||
]; | ||
|
||
/** | ||
*/ | ||
public function __construct ( | ||
private string $provider, | ||
private string $url, | ||
private string $title, | ||
private int $width, | ||
private int $height, | ||
private ImageValue $thumbnail, | ||
) | ||
{ | ||
|
||
} | ||
|
||
/** | ||
*/ | ||
public function getProvider () : string | ||
{ | ||
return $this->provider; | ||
} | ||
|
||
/** | ||
*/ | ||
public function getUrl () : string | ||
{ | ||
return $this->url; | ||
} | ||
|
||
/** | ||
*/ | ||
public function getTitle () : string | ||
{ | ||
return $this->title; | ||
} | ||
|
||
/** | ||
*/ | ||
public function getWidth () : int | ||
{ | ||
return $this->width; | ||
} | ||
|
||
/** | ||
*/ | ||
public function getHeight () : int | ||
{ | ||
return $this->height; | ||
} | ||
|
||
|
||
/** | ||
*/ | ||
public function getThumbnail () : ImageValue | ||
{ | ||
return $this->thumbnail; | ||
} | ||
} |
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
Oops, something went wrong.