Grima  2018-08
Whispering into Alma's ear
Public Member Functions | Public Attributes | List of all members
Job Class Reference

class Job More...

Inheritance diagram for Job:
AlmaObject

Public Member Functions

  addParameter ($name, $value)
  add a parameter to the job More...
 
  runInAlma ()
  run a job in Alma More...
 
- Public Member Functions inherited from AlmaObject
  __construct ()
  create new blank Alma Object More...
 
  offsetExists ($offset)
 
  offsetGet ($offset)
 
  offsetSet ($offset, $value)
 
  offsetUnset ($offset)
 

Public Attributes

  $el_address
 
- Public Attributes inherited from AlmaObject
  $el_access = array()
 
  $xml
 
  $templateDir = __DIR__ . "/templates"
 

Detailed Description

class Job

Definition at line 3773 of file grima-lib.php.

Member Function Documentation

◆ addParameter()

Job::addParameter (   $name,
  $value 
)

add a parameter to the job

Parameters
$name - name of parameter to set
$value - value of parameter to set

Definition at line 3795 of file grima-lib.php.

3795  {
3796  $frag = "<parameter><name>$name</name><value>$value</value></parameter>";
3797  $source = new DOMDocument();
3798  $source->loadXML($frag);
3799 
3800  $xpath = new DomXpath($this->xml);
3801  $members = $xpath->query('//parameters')->item(0);
3802  $members->appendChild($this->xml->importNode($source->documentElement, true));
3803  }

◆ runInAlma()

Job::runInAlma ( )

run a job in Alma

Parameters
DomDocument job

Definition at line 3812 of file grima-lib.php.

References $grima.

3812  {
3813  global $grima;
3814  $grima->postJob($this['id'],'run',$this->xml);
3815  }
$grima
Definition: grima-lib.php:4293

Member Data Documentation

◆ $el_address

Job::$el_address
Initial value:
= array(
'id' => '//id',
'name' => '//name',
'description' => '//description',
'type' => '//type',
'category' => '//category',
'content' => '//content',
'schedule' => '//schedule',
'creator' => '//creator',
'next_run' => '//next_run',
'related_profile' => '//related_profile',
'additional_info' => '//additional_info',
)

Definition at line 3774 of file grima-lib.php.


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