fogproject  1.5.9
About: FOG is a Linux-based network computer cloning solution for Windows, Mac OSX and various Linux distributions that ties together a few open-source tools with a PHP-based web interface. FOG doesn’t use any boot disks, or CDs; everything is done via TFTP and PXE.
  Fossies Dox: fogproject-1.5.9.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

Host Class Reference
Inheritance diagram for Host:
[legend]
Collaboration diagram for Host:
[legend]

Public Member Functions

 set ($key, $value)
 
 add ($key, $value)
 
 destroy ($key='id')
 
 save ()
 
 isValid ()
 
 isHostnameSafe ($hostname='')
 
 getDefault ($printerid)
 
 updateDefault ($printerid, $onoff)
 
 getDispVals ($key='')
 
 setDisp ($x, $y, $r)
 
 getAlo ()
 
 setAlo ($time)
 
 getActiveTaskCount ()
 
 getOptimalStorageNode ()
 
 createImagePackage ( $taskTypeID, $taskName='', $shutdown=false, $debug=false, $deploySnapins=false, $isGroupTask=false, $username='', $passreset='', $sessionjoin=false, $wol=false)
 
 getImageMemberFromHostID ()
 
 clearAVRecordsForHost ()
 
 wakeOnLAN ()
 
 addAddMAC ($addArray, $pending=false)
 
 addPendtoAdd ($addArray=false)
 
 removeAddMAC ($removeArray)
 
 removePendMAC ($removeArray)
 
 addPriMAC ($mac)
 
 addPendMAC ($mac)
 
 addPrinter ($addArray)
 
 removePrinter ($removeArray)
 
 addSnapin ($addArray)
 
 removeSnapin ($removeArray)
 
 addModule ($addArray)
 
 removeModule ($removeArray)
 
 addPowerManagement ($addArray)
 
 removePowerManagement ($removeArray)
 
 getMyMacs ($justme=true)
 
 ignore ($imageIgnore, $clientIgnore)
 
 addGroup ($addArray)
 
 removeGroup ($removeArray)
 
 addHost ($addArray)
 
 removeHost ($removeArray)
 
 clientMacCheck ($mac=false)
 
 imageMacCheck ($mac=false)
 
 setAD ( $useAD='', $domain='', $ou='', $user='', $pass='', $override=false, $nosave=false, $legacy='', $productKey='', $enforce='')
 
 getImage ()
 
 getImageName ()
 
 getOS ()
 
 getActiveSnapinJob ()
 
 getPingCodeStr ()
 
- Public Member Functions inherited from FOGController
 __construct ($data='')
 
 __destruct ()
 
 __toString ()
 
 get ($key='')
 
 remove ($key, $value)
 
 load ($key='id')
 
 getcolumns (&$fields)
 
 key (&$key)
 
 buildQuery (&$join, &$whereArrayAnd, &$c, $not=false, $compare='=')
 
 setQuery (&$queryData)
 
 getManager ()
 
 assocSetter ($assocItem, $alterItem='', $implicitCall=false)
 
- Public Member Functions inherited from FOGBase
 __construct ()
 
 orderBy (&$orderBy)
 

Protected Member Functions

 loadMac ()
 
 loadAdditionalMACs ()
 
 loadPendingMACs ()
 
 loadGroups ()
 
 loadGroupsnotinme ()
 
 loadPrinters ()
 
 loadPrintersnotinme ()
 
 loadSnapins ()
 
 loadSnapinsnotinme ()
 
 loadModules ()
 
 loadPowermanagementtasks ()
 
 loadUsers ()
 
 loadSnapinjob ()
 
 loadTask ()
 
 loadOptimalStorageNode ()
 
- Protected Member Functions inherited from FOGController
 loadItem ($key)
 
 addRemItem ($key, $array, $array_type)
 
- Protected Member Functions inherited from FOGBase
 isLoaded ($key)
 
 setRequest ()
 
 sendData ( $datatosend, $service=true, $array=array())
 

Protected Attributes

 $databaseTable = 'hosts'
 
 $databaseFields
 
 $databaseFieldsRequired
 
 $additionalFields
 
 $databaseFieldClassRelationships
 
- Protected Attributes inherited from FOGController
 $data = array()
 
 $autoSave = false
 
 $databaseTable = ''
 
 $databaseFields = array()
 
 $databaseFieldsRequired = array()
 
 $additionalFields = array()
 
 $databaseFieldsFlipped = array()
 
 $databaseFieldsToIgnore
 
 $aliasedFields = array()
 
 $databaseFieldClassRelationships = array()
 
 $loadQueryTemplate = 'SELECT %s FROM `%s` %s WHERE `%s`=%s %s'
 
 $insertQueryTemplate = 'INSERT INTO `%s` (%s) VALUES (%s) %s %s'
 
 $destroyQueryTemplate = 'DELETE FROM `%s` WHERE %s=%s%s'
 
- Protected Attributes inherited from FOGBase
 $isLoaded = array()
 

Private Member Functions

 _setDispVals ()
 
 _setAlo ()
 
 _createTasking ( $taskName, $taskTypeID, $username, $groupID, $memID, $imagingTask=true, $shutdown=false, $passreset=false, $debug=false, $wol=false)
 
 _cancelJobsSnapinsForHost ()
 
 _createSnapinTasking ( $snapin=-1, $error=false, $Task=false)
 

Static Private Member Functions

static _retValidMacs ($macs, &$arr)
 

Static Private Attributes

static $_hostscreen = array()
 
static $_hostalo = array()
 

Additional Inherited Members

- Static Public Member Functions inherited from FOGBase
static getClass ($class, $data='', $props=false)
 
static getHostItem ( $service=true, $encoded=false, $hostnotrequired=false, $returnmacs=false, $override=false, $mac=false)
 
static getAllBlamedNodes ($Host)
 
static niceDate ($date='now', $utc=false)
 
static formatTime ($time, $format=false, $utc=false)
 
static createSecToken ()
 
static aesencrypt ( $data, $key=false, $enctype='aes-256-cbc')
 
static aesdecrypt ( $encdata, $key=false, $enctype='aes-128-cbc')
 
static parseMacList ( $stringlist, $image=false, $client=false)
 
static getSubObjectIDs ( $object='Host', $findWhere=array(), $getField='id', $not=false, $operator='AND', $orderBy='name', $groupBy=false, $filter='array_unique')
 
static getSetting ($key)
 
static setSetting ($key, $value)
 
static getQueuedStates ()
 
static getQueuedState ()
 
static getCheckedInState ()
 
static getProgressState ()
 
static getCompleteState ()
 
static getCancelledState ()
 
static stringBetween ($string, $start, $end)
 
static stripAndDecode (&$item)
 
static getMasterInterface ($ip_find)
 
static lasterror ()
 
static getFilesize ($path)
 
static wakeUp ($macs)
 
static fastmerge ($array1)
 
static getHash ($file)
 
static attemptLogin ($username, $password)
 
static clearMACLookupTable ()
 
static getMACLookupCount ()
 
static resolveHostname ($host)
 
static getBroadcast ()
 
static randWait ()
 
- Static Public Attributes inherited from FOGBase
static $locale = ''
 
static $fogpingactive = false
 
static $fogdeleteactive = false
 
static $fogexportactive = false
 
static $pendingMACs = 0
 
static $pendingHosts = 0
 
static $defaultscreen = ''
 
static $pluginsinstalled = array()
 
static $useragent
 
static $foglang
 
static $ajax = false
 
static $post = false
 
static $service = false
 
static $json = false
 
static $newService = false
 
static $scriptname
 
static $querystring
 
static $httpreqwith
 
static $reqmethod
 
static $remoteaddr
 
static $httpreferer
 
static $mySchema = 0
 
static $showhtml = true
 
static $httpproto = false
 
static $httphost = ''
 
static $Host = null
 
- Static Protected Member Functions inherited from FOGBase
static getActivePlugins ()
 
static fatalError ($txt, $data=array())
 
static error ($txt, $data=array())
 
static debug ($txt, $data=array())
 
static info ($txt, $data=array())
 
static setMessage ($txt, $data=array())
 
static getMessages ()
 
static redirect ($url='')
 
static arrayInsertBefore ( $key, array &$array, $new_key, $new_value)
 
static arrayInsertAfter ( $key, array &$array, $new_key, $new_value)
 
static arrayRemove ($key, array &$array)
 
static arrayFind ( $needle, array $haystack, $ignorecase=false)
 
static resetRequest ()
 
static formatByteSize ($size)
 
static getGlobalModuleStatus ($names=false, $keys=false)
 
static validDate ($date, $format='')
 
static pluralize ($count, $text, $space=false)
 
static diff ($start, $end, $ago=false)
 
static humanify ($diff, $unit)
 
static arrayChangeKey (array &$array, $old_key, $new_key)
 
static byteconvert ($kilobytes)
 
static hex2bin ($hex)
 
static certEncrypt ($data)
 
static certDecrypt ($dataArr, $padding=true)
 
static arrayStrpos ($haystack, $needles, $case=true)
 
static log ( $txt, $curlog, $logfile, $logbrow, $obj, $level=1)
 
static logHistory ($string)
 
static getIPAddress ($force=false)
 
- Static Protected Attributes inherited from FOGBase
static $strlen
 
static $debug = false
 
static $info = false
 
static $buildSelectBox
 
static $selected
 
static $DB
 
static $FOGFTP
 
static $FOGCore
 
static $EventManager
 
static $HookManager
 
static $TimeZone
 
static $FOGUser
 
static $FOGPageManager
 
static $FOGURLRequests
 
static $FOGSubMenu
 
static $ips = array()
 
static $interface = array()
 
static $searchPages
 

Detailed Description

Definition at line 22 of file host.class.php.

Member Function Documentation

◆ _cancelJobsSnapinsForHost()

Host::_cancelJobsSnapinsForHost ( )
private

Cancels and tasks/jobs for snapins on this host

Returns
void

Definition at line 1154 of file host.class.php.

References FOGBase\getClass(), and FOGBase\getSubObjectIDs().

Referenced by createImagePackage().

◆ _createSnapinTasking()

Host::_createSnapinTasking (   $snapin = -1,
  $error = false,
  $Task = false 
)
private

Creates the snapin tasking as needed

Parameters
int$snapinThe snapin to create tasking on (-1 = all)
bool$errorWhether to die on error or not
object$TaskThe task object
Returns
void

Definition at line 1220 of file host.class.php.

References $SnapinJob, $Task, FOGController\get(), FOGBase\getClass(), isValid(), save(), and set().

Referenced by createImagePackage().

◆ _createTasking()

Host::_createTasking (   $taskName,
  $taskTypeID,
  $username,
  $groupID,
  $memID,
  $imagingTask = true,
  $shutdown = false,
  $passreset = false,
  $debug = false,
  $wol = false 
)
private

Creates the tasking so I don't have to keep typing it in for each element.

Parameters
string$taskNamethe name to assign to the tasking
int$taskTypeIDthe task type id to set the tasking
string$usernamethe username to associate with the tasking
int$groupIDthe Storage Group ID to associate with
int$memIDthe Storage Node ID to associate with
bool$imagingTaskif the task is an imaging type
bool$shutdownif the task is to be shutdown once completed
string$passresetif the task is a password reset task
bool$debugif the task is a debug task
bool$wolif the task is to wol
Returns
object

Definition at line 1107 of file host.class.php.

References FOGBase\$debug, $Task, $username, FOGBase\getClass(), and getImage().

Referenced by createImagePackage().

◆ _retValidMacs()

static Host::_retValidMacs (   $macs,
$arr 
)
staticprivate

Returns Valid MACs

Parameters
array$macsthe array of macs
array$arrthe array to define
Returns
array

Definition at line 281 of file host.class.php.

References $mac.

Referenced by save().

◆ _setAlo()

Host::_setAlo ( )
private

Sets this hosts alo time (or default to global if needed

Returns
void

Definition at line 770 of file host.class.php.

References FOGBase\getSetting(), and isValid().

Referenced by getAlo().

◆ _setDispVals()

Host::_setDispVals ( )
private

Sets display vals for the host

Returns
void

Definition at line 694 of file host.class.php.

References FOGBase\getSubObjectIDs(), and isValid().

Referenced by getDispVals().

◆ add()

Host::add (   $key,
  $value 
)

Add value to key (array)

Parameters
string$keythe key to add to
mixed$valuethe value to add
Exceptions
Exception
Returns
object

Reimplemented from FOGController.

Definition at line 198 of file host.class.php.

References FOGController\key().

Referenced by addAddMAC().

◆ addAddMAC()

Host::addAddMAC (   $addArray,
  $pending = false 
)

Adds additional macs

Parameters
array$addArraythe macs to add
bool$pendingshould it be added as a pending mac
Returns
object

Definition at line 1600 of file host.class.php.

References $mac, add(), and FOGBase\parseMacList().

Referenced by addPendMAC(), and addPendtoAdd().

◆ addGroup()

Host::addGroup (   $addArray)

Adds host to the selected group alias to addHost method

Parameters
array$addArraythe groups to add
Returns
object

Definition at line 1968 of file host.class.php.

References addHost().

◆ addHost()

Host::addHost (   $addArray)

Adds host to the selected group

Parameters
array$addArraythe groups to add
Returns
object

Definition at line 1991 of file host.class.php.

References FOGController\addRemItem().

Referenced by addGroup().

◆ addModule()

Host::addModule (   $addArray)

Adds modules to the host

Parameters
array$addArraythe modules to add
Returns
object

Definition at line 1808 of file host.class.php.

References FOGController\addRemItem().

◆ addPendMAC()

Host::addPendMAC (   $mac)

Adds pending mac

Parameters
string$macthe mac to add
Returns
obect

Definition at line 1713 of file host.class.php.

References $mac, and addAddMAC().

◆ addPendtoAdd()

Host::addPendtoAdd (   $addArray = false)

Moves pending macs to additional macs

Parameters
array$addArraythe macs to move
Returns
object

Definition at line 1618 of file host.class.php.

References $MACs, and addAddMAC().

◆ addPowerManagement()

Host::addPowerManagement (   $addArray)

Adds powermanagement tasks to the host

Parameters
array$addArraythe powermanagement tasks to add
Returns
object

Definition at line 1838 of file host.class.php.

References FOGController\addRemItem().

◆ addPriMAC()

Host::addPriMAC (   $mac)

Adds primary mac

Parameters
string$macthe mac to make as primary
Returns
object

Definition at line 1685 of file host.class.php.

References $host, $mac, and FOGBase\parseMacList().

◆ addPrinter()

Host::addPrinter (   $addArray)

Adds printers to the host

Parameters
array$addArraythe printers to add
Returns
object

Definition at line 1724 of file host.class.php.

References FOGController\addRemItem().

◆ addSnapin()

Host::addSnapin (   $addArray)

Adds snapins to the host

Parameters
array$addArraythe snapins to add
Exceptions
Exception
Returns
object

Definition at line 1755 of file host.class.php.

References FOGController\addRemItem(), FOGBase\getClass(), and FOGBase\getSetting().

◆ clearAVRecordsForHost()

Host::clearAVRecordsForHost ( )

Clears virus records for the host

Returns
object

Definition at line 1574 of file host.class.php.

References FOGBase\getClass(), and getMyMacs().

◆ clientMacCheck()

Host::clientMacCheck (   $mac = false)

Tells if the mac is client ignored

Parameters
string$macthe mac to test
Returns
string

Definition at line 2021 of file host.class.php.

References $mac.

◆ createImagePackage()

Host::createImagePackage (   $taskTypeID,
  $taskName = '',
  $shutdown = false,
  $debug = false,
  $deploySnapins = false,
  $isGroupTask = false,
  $username = '',
  $passreset = '',
  $sessionjoin = false,
  $wol = false 
)

Creates tasking for the host based on the type

Parameters
int$taskTypeIDthe task type
string$taskNamethe name of the task
bool$shutdownwhether to shutdown or reboot
bool$debugis this a debug task
mixed$deploySnapinssnapins to deploy
bool$isGroupTaskis the tasking a group task
string$usernamethe username creating the task
string$passresetusername that needs password reset
bool$sessionjoinis this task joining an mc task
bool$wolshould we wake the host up
Returns
string

Definition at line 1284 of file host.class.php.

References FOGBase\$debug, $foglang, $Image, $mac, $msg, $str, $Task, $TaskType, $username, _cancelJobsSnapinsForHost(), _createSnapinTasking(), _createTasking(), FOGBase\fastmerge(), FOGController\get(), FOGBase\getClass(), getImage(), getOptimalStorageNode(), FOGBase\getProgressState(), FOGBase\getQueuedStates(), FOGBase\getSetting(), FOGBase\getSubObjectIDs(), TaskType\isCapture(), TaskType\isImagingTask(), TaskType\isMulticast(), TaskType\isSnapinTask(), TaskType\isSnapinTasking(), FOGController\isValid(), isValid(), save(), FOGBase\setSetting(), and wakeOnLAN().

◆ destroy()

Host::destroy (   $key = 'id')

Removes the item from the database

Parameters
string$keythe key to remove
Exceptions
Exception
Returns
object

Reimplemented from FOGController.

Definition at line 219 of file host.class.php.

References FOGBase\getClass().

◆ getActiveSnapinJob()

Host::getActiveSnapinJob ( )

Returns the snapinjob

Returns
SnapinJob

Definition at line 2159 of file host.class.php.

◆ getActiveTaskCount()

Host::getActiveTaskCount ( )

Gets the active task count

Returns
int

Definition at line 1069 of file host.class.php.

References $count, and FOGBase\getClass().

◆ getAlo()

Host::getAlo ( )

Gets the auto logout time

Returns
int

Definition at line 787 of file host.class.php.

References $_hostalo, and _setAlo().

◆ getDefault()

Host::getDefault (   $printerid)

Returns if the printer is the default

Parameters
int$printeridthe printer id to test
Returns
bool

Definition at line 648 of file host.class.php.

References FOGBase\getClass().

◆ getDispVals()

Host::getDispVals (   $key = '')

Gets the display values

Parameters
string$keythe key to get
Returns
mixed

Definition at line 738 of file host.class.php.

References _setDispVals().

◆ getImage()

Host::getImage ( )

Returns the hosts image object

Returns
Image

Definition at line 2130 of file host.class.php.

Referenced by _createTasking(), createImagePackage(), FOGPage\deploy(), getImageMemberFromHostID(), and getOS().

◆ getImageMemberFromHostID()

Host::getImageMemberFromHostID ( )

Returns task if host image is valid

Returns
Task

Definition at line 1533 of file host.class.php.

References $Image, $Task, FOGBase\error(), FOGBase\getClass(), getImage(), and getOptimalStorageNode().

◆ getImageName()

Host::getImageName ( )

Returns the hosts image name

Returns
string

Definition at line 2139 of file host.class.php.

◆ getMyMacs()

Host::getMyMacs (   $justme = true)

Returns the macs

Parameters
bool$justmeshould only return this or all macs
Returns
array

Definition at line 1868 of file host.class.php.

References FOGBase\getSubObjectIDs().

Referenced by clearAVRecordsForHost(), ignore(), and wakeOnLAN().

◆ getOptimalStorageNode()

Host::getOptimalStorageNode ( )

Returns the optimal storage node

Returns
object

Definition at line 1087 of file host.class.php.

Referenced by createImagePackage(), and getImageMemberFromHostID().

◆ getOS()

Host::getOS ( )

Returns the hosts image os name

Returns
string

Definition at line 2150 of file host.class.php.

References getImage().

◆ getPingCodeStr()

Host::getPingCodeStr ( )

Translates the ping status code to string

Returns
string

Definition at line 2168 of file host.class.php.

References $val, and FOGBase\getSubObjectIDs().

◆ ignore()

Host::ignore (   $imageIgnore,
  $clientIgnore 
)

Sets the ignore status of a mac for either image or client ignore

Parameters
array$imageIgnoreto ignore for imaging
array$clientIgnoreto ignore for client
Returns
object

Definition at line 1891 of file host.class.php.

References $mac, FOGBase\getClass(), and getMyMacs().

◆ imageMacCheck()

Host::imageMacCheck (   $mac = false)

Tells if the mac is image ignored

Parameters
string$macthe mac to test
Returns
string

Definition at line 2041 of file host.class.php.

References $mac.

◆ isHostnameSafe()

Host::isHostnameSafe (   $hostname = '')

Tells us if the hostname is safe to use

Parameters
string$hostnamethe hostname to test
Returns
bool

Definition at line 633 of file host.class.php.

Referenced by isValid().

◆ isValid()

◆ loadAdditionalMACs()

Host::loadAdditionalMACs ( )
protected

Loads any additional macs

Returns
void

Definition at line 821 of file host.class.php.

References FOGBase\getSubObjectIDs().

◆ loadGroups()

Host::loadGroups ( )
protected

Loads any groups this host is in

Returns
void

Definition at line 857 of file host.class.php.

References FOGBase\getSubObjectIDs().

◆ loadGroupsnotinme()

Host::loadGroupsnotinme ( )
protected

Loads any groups this host is not in

Returns
void

Definition at line 875 of file host.class.php.

◆ loadMac()

Host::loadMac ( )
protected

Loads the mac additional field

Returns
void

Definition at line 811 of file host.class.php.

References $mac.

◆ loadModules()

Host::loadModules ( )
protected

Loads any modules this host has

Returns
void

Definition at line 950 of file host.class.php.

References FOGBase\getSubObjectIDs().

◆ loadOptimalStorageNode()

Host::loadOptimalStorageNode ( )
protected

Loads the optimal storage node

Returns
void

Definition at line 1056 of file host.class.php.

◆ loadPendingMACs()

Host::loadPendingMACs ( )
protected

Loads any pending macs

Returns
void

Definition at line 839 of file host.class.php.

References FOGBase\getSubObjectIDs().

◆ loadPowermanagementtasks()

Host::loadPowermanagementtasks ( )
protected

Loads any powermanagement tasks this host has

Returns
void

Definition at line 968 of file host.class.php.

References FOGBase\getSubObjectIDs().

◆ loadPrinters()

Host::loadPrinters ( )
protected

Loads any printers those host has

Returns
void

Definition at line 888 of file host.class.php.

References FOGBase\getSubObjectIDs().

◆ loadPrintersnotinme()

Host::loadPrintersnotinme ( )
protected

Loads any printers this host does not have

Returns
void

Definition at line 906 of file host.class.php.

◆ loadSnapinjob()

Host::loadSnapinjob ( )
protected

Loads the current snapin job

Returns
void

Definition at line 994 of file host.class.php.

References $SnapinJob, and FOGBase\getSubObjectIDs().

◆ loadSnapins()

Host::loadSnapins ( )
protected

Loads any snapins this host has

Returns
void

Definition at line 919 of file host.class.php.

References FOGBase\getSubObjectIDs().

◆ loadSnapinsnotinme()

Host::loadSnapinsnotinme ( )
protected

Loads any snapins this host does not have

Returns
void

Definition at line 937 of file host.class.php.

◆ loadTask()

Host::loadTask ( )
protected

Loads the current task

Returns
void

Definition at line 1014 of file host.class.php.

References FOGBase\fastmerge(), and FOGBase\getSubObjectIDs().

◆ loadUsers()

Host::loadUsers ( )
protected

Loads any users have logged in

Returns
void

Definition at line 981 of file host.class.php.

References FOGBase\getSubObjectIDs().

◆ removeAddMAC()

Host::removeAddMAC (   $removeArray)

Removes additional macs

Parameters
array$removeArraythe macs to remove
Returns
object

Definition at line 1643 of file host.class.php.

References $mac.

◆ removeGroup()

Host::removeGroup (   $removeArray)

Removes host from the selected group alias to removeHost method

Parameters
array$removeArraythe groups to remove
Returns
object

Definition at line 1980 of file host.class.php.

References removeHost().

◆ removeHost()

Host::removeHost (   $removeArray)

Removes host from the selected group

Parameters
array$removeArraythe groups to remove
Returns
object

Definition at line 2006 of file host.class.php.

References FOGController\addRemItem().

Referenced by removeGroup().

◆ removeModule()

Host::removeModule (   $removeArray)

Removes modules from the host

Parameters
array$removeArraythe modules to remove
Returns
object

Definition at line 1823 of file host.class.php.

References FOGController\addRemItem().

◆ removePendMAC()

Host::removePendMAC (   $removeArray)

Removes pending macs

Parameters
array$removeArraythe macs to remove
Returns
object

Definition at line 1664 of file host.class.php.

References $mac.

◆ removePowerManagement()

Host::removePowerManagement (   $removeArray)

Removes powermanagement tasks from the host

Parameters
array$removeArraythe powermanagement tasks to remove
Returns
object

Definition at line 1853 of file host.class.php.

References FOGController\addRemItem().

◆ removePrinter()

Host::removePrinter (   $removeArray)

Removes printers from the host

Parameters
array$removeArraythe printers to remove
Returns
object

Definition at line 1739 of file host.class.php.

References FOGController\addRemItem().

◆ removeSnapin()

Host::removeSnapin (   $removeArray)

Removes snapins from the host

Parameters
array$removeArraythe snapins to remove
Returns
object

Definition at line 1793 of file host.class.php.

References FOGController\addRemItem().

◆ save()

Host::save ( )

Stores data into the database

Returns
bool|object

Reimplemented from FOGController.

Definition at line 301 of file host.class.php.

References $foglang, $mac, FOGController\__toString(), _retValidMacs(), FOGBase\getClass(), FOGBase\getSubObjectIDs(), FOGBase\isLoaded(), and isValid().

Referenced by _createSnapinTasking(), and createImagePackage().

◆ set()

Host::set (   $key,
  $value 
)

Set value to key

Parameters
string$keythe key to set to
mixed$valuethe value to set
Exceptions
Exception
Returns
object

Reimplemented from FOGController.

Definition at line 156 of file host.class.php.

References $mac, and FOGController\key().

Referenced by SnapinClient\_closeout(), _createSnapinTasking(), SnapinClient\_downloadfile(), Task\cancel(), SnapinClient\json(), and SnapinClient\send().

◆ setAD()

Host::setAD (   $useAD = '',
  $domain = '',
  $ou = '',
  $user = '',
  $pass = '',
  $override = false,
  $nosave = false,
  $legacy = '',
  $productKey = '',
  $enforce = '' 
)

Sets the host settings for AD (mainly)

Parameters
mixed$useADwhether to perform joins
string$domainthe domain to associate
string$outhe ou to bind to
string$userthe user to perform join with
string$passthe pass to perform join with
bool$overrideshould the host fields override whats passed
bool$nosaveshould we save automatically
string$legacythe legacy client ad pass string
string$productKeythe product key for the host to activate
mixed$enforceshould the host perform changes forcibly
Returns
object

Definition at line 2070 of file host.class.php.

References $pass, $productKey, and $user.

◆ setAlo()

Host::setAlo (   $time)

Sets the auto logout time

Parameters
int$timethe time to set
Returns
object

Definition at line 799 of file host.class.php.

◆ setDisp()

Host::setDisp (   $x,
  $y,
  $r 
)

Sets the display values

Parameters
mixed$xthe width
mixed$ythe height
mixed$rthe refresh
Returns
object

Definition at line 752 of file host.class.php.

References isValid().

◆ updateDefault()

Host::updateDefault (   $printerid,
  $onoff 
)

Updates the default printer

Parameters
int$printeridthe printer id to update
mixed$onoffwhether to enable or disable
Returns
object

Definition at line 667 of file host.class.php.

References FOGBase\getClass().

◆ wakeOnLAN()

Host::wakeOnLAN ( )

Wakes this host up

Returns
object

Definition at line 1587 of file host.class.php.

References getMyMacs(), and FOGBase\wakeUp().

Referenced by createImagePackage().

Member Data Documentation

◆ $_hostalo

Host::$_hostalo = array()
staticprivate

Definition at line 146 of file host.class.php.

Referenced by getAlo().

◆ $_hostscreen

Host::$_hostscreen = array()
staticprivate

Definition at line 140 of file host.class.php.

◆ $additionalFields

Host::$additionalFields
protected
Initial value:
= array(
'mac',
'primac',
'imagename',
'additionalMACs',
'pendingMACs',
'groups',
'groupsnotinme',
'hostscreen',
'hostalo',
'optimalStorageNode',
'printers',
'printersnotinme',
'snapins',
'snapinsnotinme',
'modules',
'inventory',
'task',
'snapinjob',
'users',
'fingerprint',
'powermanagementtasks'
)

Definition at line 79 of file host.class.php.

◆ $databaseFieldClassRelationships

Host::$databaseFieldClassRelationships
protected
Initial value:
= array(
'MACAddressAssociation' => array(
'hostID',
'id',
'primac',
array('primary' => 1)
),
'Image' => array(
'id',
'imageID',
'imagename'
),
'HostScreenSetting' => array(
'hostID',
'id',
'hostscreen'
),
'HostAutoLogout' => array(
'hostID',
'id',
'hostalo'
),
'Inventory' => array(
'hostID',
'id',
'inventory'
)
)

Definition at line 107 of file host.class.php.

◆ $databaseFields

Host::$databaseFields
protected

Definition at line 35 of file host.class.php.

◆ $databaseFieldsRequired

Host::$databaseFieldsRequired
protected
Initial value:
= array(
'name'
)

Definition at line 71 of file host.class.php.

◆ $databaseTable

Host::$databaseTable = 'hosts'
protected

Definition at line 29 of file host.class.php.


The documentation for this class was generated from the following file: