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)  

multicastsession.class.php
Go to the documentation of this file.
1 <?php
23 {
29  protected $databaseTable = 'multicastSessions';
35  protected $databaseFields = array(
36  'id' => 'msID',
37  'name' => 'msName',
38  'port' => 'msBasePort',
39  'logpath' => 'msLogPath',
40  'image' => 'msImage',
41  'clients' => 'msClients',
42  'sessclients' => 'msSessClients',
43  'interface' => 'msInterface',
44  'starttime' => 'msStartDateTime',
45  'percent' => 'msPercent',
46  'stateID' => 'msState',
47  'completetime' => 'msCompleteDateTime',
48  'isDD' => 'msIsDD',
49  'storagegroupID' => 'msNFSGroupID',
50  'anon3' => 'msAnon3',
51  'anon4' => 'msAnon4',
52  'anon5' => 'msAnon5',
53  );
59  protected $additionalFields = array(
60  'imagename',
61  'state'
62  );
69  'Image' => array(
70  'id',
71  'image',
72  'imagename'
73  ),
74  'TaskState' => array(
75  'id',
76  'stateID',
77  'state'
78  )
79  );
85  public function getImage()
86  {
87  return new Image($this->get('image'));
88  }
94  public function getTaskState()
95  {
96  return new TaskState($this->get('stateID'));
97  }
103  public function cancel()
104  {
105  $find = ['msID' => $this->get('id')];
106  Route::ids(
107  'multicastsessionassociation',
108  $find,
109  'taskID'
110  );
111  $taskIDs = json_decode(Route::getData(), true);
112  self::getClass('TaskManager')->update(
113  ['id' => $taskIDs],
114  '',
115  ['stateID' => self::getCancelledState()]
116  );
117  self::getClass('MulticastSessionAssociationManager')
118  ->destroy(['msID' => $this->get('id')]);
119  return $this
120  ->set('stateID', self::getCancelledState())
121  ->set('name', '')
122  ->set('clients', 0)
123  ->set('completetime', self::niceDate()->format('Y-m-d H:i:s'))
124  ->save();
125  }
131  public function complete()
132  {
133  $find = ['msID' => $this->get('id')];
134  Route::ids(
135  'multicastsessionassociation',
136  $find,
137  'taskID'
138  );
139  $taskIDs = json_decode(Route::getData(), true);
140  self::getClass('TaskManager')->update(
141  ['id' => $taskIDs],
142  '',
143  ['stateID' => self::getCompleteState()]
144  );
145  self::getClass('MulticastSessionAssociationManager')
146  ->destroy(['msID' => $this->get('id')]);
147  return $this
148  ->set('stateID', self::getCompleteState())
149  ->set('name', '')
150  ->set('clients', 0)
151  ->set('completetime', self::niceDate()->format('Y-m-d H:i:s'))
152  ->save();
153  }
154 }
FOGBase\getClass
static getClass($class, $data='', $props=false)
Definition: fogbase.class.php:439
MulticastSession\complete
complete()
Definition: multicastsession.class.php:131
MulticastSession\$databaseFieldClassRelationships
$databaseFieldClassRelationships
Definition: multicastsession.class.php:68
MulticastSession\cancel
cancel()
Definition: multicastsession.class.php:103
MulticastSession\$additionalFields
$additionalFields
Definition: multicastsession.class.php:59
Image
Definition: image.class.php:23
MulticastSession
Definition: multicastsession.class.php:23
MulticastSession\$databaseTable
$databaseTable
Definition: multicastsession.class.php:29
Route\ids
ids($class, $whereItems=[], $getField='id')
Definition: route.class.php:1567
TaskState
Definition: taskstate.class.php:23
FOGController
Definition: fogcontroller.class.php:29
Route\getData
static getData()
Definition: route.class.php:1173
MulticastSession\$databaseFields
$databaseFields
Definition: multicastsession.class.php:35
MulticastSession\getTaskState
getTaskState()
Definition: multicastsession.class.php:94
MulticastSession\getImage
getImage()
Definition: multicastsession.class.php:85