Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F25452027
DockerHubImage.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
DockerHubImage.php
View Options
<?php
namespace
Keruald\DockerHub
;
use
Keruald\DockerHub\Build\TriggerBuild
;
use
GuzzleHttp\ClientInterface
;
/**
* Represents a DockerHub image.
*/
class
DockerHubImage
extends
DockerImage
{
/**
* Gets the URL to the image on the registry.
*
* @return string
*/
public
function
getRegistryUrl
()
{
return
"https://registry.hub.docker.com/u/$this->user/$this->image"
;
}
/**
* Gets a trigger build for this image
* to be able to prepare a build trigger payload.
*
* @param string $token The token to authentify the build request
* @return Keruald\DockerHub\Build\TriggerBuild
*/
public
function
getTriggerBuild
(
ClientInterface
$client
,
$token
)
{
return
new
TriggerBuild
(
$this
,
$token
);
}
/**
* Triggers a full build for this image.
*
* @param string $token The token to authentify the build request
*/
public
function
triggerBuild
(
ClientInterface
$client
,
$token
)
{
$this
->
getTriggerBuild
(
$client
,
$token
)->
sendPayloadForAll
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Thu, Apr 16, 05:48 (14 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3597092
Default Alt Text
DockerHubImage.php (1 KB)
Attached To
Mode
rKDOCKERHUB Keruald Docker Hub
Attached
Detach File
Event Timeline
Log In to Comment