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 4530 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 4553 of file grima-lib.php.

4554 {
4555 $frag = "<parameter><name>$name</name><value>$value</value></parameter>";
4556 $source = new DOMDocument();
4557 $source->loadXML($frag);
4558
4559 $xpath = new DomXpath($this->xml);
4560 $members = $xpath->query('//parameters')->item(0);
4561 $members->appendChild($this->xml->importNode($source->documentElement, true));
4562 }

◆ runInAlma()

Job::runInAlma ( )

run a job in Alma

Parameters
DomDocument job

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

4572 {
4573 global $grima;
4574 $grima->postJob($this['id'], 'run', $this->xml);
4575 }
$grima
Definition: grima-lib.php:5143

References $grima.

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 4532 of file grima-lib.php.


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