PHP Class DataSift\Storyplayer\OsLib\OsBase

Inheritance: implements DataSift\Storyplayer\OsLib\SupportedOs
Datei anzeigen Open project: datasift/storyplayer

Protected Properties

Property Type Description
$st DataSift\Storyplayer\PlayerLib\StoryTeller;

Public Methods

Method Description
__construct ( StoryTeller $st )
determineHostname ( HostDetails $hostDetails, DataSift\Storyplayer\HostLib\SupportedHost $vm ) : string
determineIpAddress ( HostDetails $hostDetails, DataSift\Storyplayer\HostLib\SupportedHost $host ) : string
downloadFile ( $hostDetails, $sourceFilename, $destFilename )
getClient ( DataSift\Storyplayer\PlayerLib\Storyteller $st, DataSift\Storyplayer\HostLib\HostDetails $hostDetails ) : DataSift\Storyplayer\CommandLib\CommandClient
getFileDetails ( $hostDetails, $filename )
getInstalledPackageDetails ( HostDetails $hostDetails, string $packageName ) : DataSift\Stone\ObjectLib\BaseObject
getPid ( HostDetails $hostDetails, string $processName ) : integer
getProcessIsRunning ( HostDetails $hostDetails, string $processName ) : boolean
runCommand ( HostDetails $hostDetails, string $command ) : CommandResult
uploadFile ( $hostDetails, $sourceFilename, $destFilename )

Protected Methods

Method Description
runHostnameSafeguards ( HostDetails $hostDetails, string $hostname ) : string check a given hostname to make sure it is safe to use

Method Details

__construct() public method

public __construct ( StoryTeller $st )
$st DataSift\Storyplayer\PlayerLib\StoryTeller

determineHostname() abstract public method

abstract public determineHostname ( HostDetails $hostDetails, DataSift\Storyplayer\HostLib\SupportedHost $vm ) : string
$hostDetails HostDetails
$vm DataSift\Storyplayer\HostLib\SupportedHost
return string

determineIpAddress() abstract public method

abstract public determineIpAddress ( HostDetails $hostDetails, DataSift\Storyplayer\HostLib\SupportedHost $host ) : string
$hostDetails HostDetails
$host DataSift\Storyplayer\HostLib\SupportedHost
return string

downloadFile() public method

public downloadFile ( $hostDetails, $sourceFilename, $destFilename )

getClient() abstract public method

abstract public getClient ( DataSift\Storyplayer\PlayerLib\Storyteller $st, DataSift\Storyplayer\HostLib\HostDetails $hostDetails ) : DataSift\Storyplayer\CommandLib\CommandClient
$st DataSift\Storyplayer\PlayerLib\Storyteller our module loader
$hostDetails DataSift\Storyplayer\HostLib\HostDetails the details for the host we want a client for
return DataSift\Storyplayer\CommandLib\CommandClient

getFileDetails() public method

public getFileDetails ( $hostDetails, $filename )

getInstalledPackageDetails() abstract public method

abstract public getInstalledPackageDetails ( HostDetails $hostDetails, string $packageName ) : DataSift\Stone\ObjectLib\BaseObject
$hostDetails HostDetails
$packageName string
return DataSift\Stone\ObjectLib\BaseObject

getPid() abstract public method

abstract public getPid ( HostDetails $hostDetails, string $processName ) : integer
$hostDetails HostDetails
$processName string
return integer

getProcessIsRunning() abstract public method

abstract public getProcessIsRunning ( HostDetails $hostDetails, string $processName ) : boolean
$hostDetails HostDetails
$processName string
return boolean

runCommand() public method

public runCommand ( HostDetails $hostDetails, string $command ) : CommandResult
$hostDetails HostDetails
$command string
return DataSift\Storyplayer\CommandLib\CommandResult

runHostnameSafeguards() protected method

check a given hostname to make sure it is safe to use
protected runHostnameSafeguards ( HostDetails $hostDetails, string $hostname ) : string
$hostDetails HostDetails the known facts about the host
$hostname string the hostname we want to check
return string the hostname that can be added to the hostDetails data

uploadFile() public method

public uploadFile ( $hostDetails, $sourceFilename, $destFilename )

Property Details

$st protected_oe property

protected DataSift\Storyplayer\PlayerLib\StoryTeller; $st
return DataSift\Storyplayer\PlayerLib\StoryTeller;