Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F25244322
TriggerBuild.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
TriggerBuild.php
View Options
<?php
namespace
Keruald\DockerHub\Build
;
use
Keruald\DockerHub\DockerHubImage
as
Image
;
/**
* this classe represents a trigger for a new build on the Docker Hub registry.
*/
class
TriggerBuild
{
///
/// Private members
///
/**
* The image to build
*
* @var Keruald\DockerHub\DockerHubImage
*/
protected
$image
;
/**
* Trigger token used to authentify requests
*
* @var string
*/
protected
$token
;
///
/// Constructor
///
/**
* Initializes a new instance of the TriggerBuild class.
*
* @param Keruald\DockerHub\DockerHubImage $image The image to build
* @param string $token The token to authentify the build request
*/
public
function
__construct
(
Image
$image
,
$token
)
{
$this
->
image
=
$image
;
$this
->
token
=
$token
;
}
///
/// Helper methods
///
/**
* Gets build trigger URL.
*
* @return string
*/
public
function
getTriggerUrl
()
{
return
$this
->
image
->
getRegistryUrl
()
.
'/trigger/'
.
$this
->
token
.
'/'
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Thu, Apr 9, 02:35 (4 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3601834
Default Alt Text
TriggerBuild.php (1 KB)
Attached To
Mode
rKDOCKERHUB Keruald Docker Hub
Attached
Detach File
Event Timeline
Log In to Comment