Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Protected Member Functions
Xml Class Reference
Inheritance diagram for Xml:
ConverterInterface

Protected Member Functions

 convertCronConfig (\DOMElement $jobConfig)
 

Additional Inherited Members

- Public Member Functions inherited from ConverterInterface
 convert ($source)
 

Detailed Description

Converts cron parameters from XML files

Definition at line 11 of file Xml.php.

Member Function Documentation

◆ convertCronConfig()

convertCronConfig ( \DOMElement  $jobConfig)
protected

Convert specific cron configurations

Parameters
\DOMElement$jobConfig
Returns
array
Exceptions

Definition at line 63 of file Xml.php.

64  {
65  $instanceName = $jobConfig->getAttribute('instance');
66  $methodName = $jobConfig->getAttribute('method');
67 
68  if (!isset($instanceName)) {
69  throw new \InvalidArgumentException('Attribute "instance" does not exist');
70  }
71  if (!isset($methodName)) {
72  throw new \InvalidArgumentException('Attribute "method" does not exist');
73  }
74 
75  return ['instance' => $instanceName, 'method' => $methodName];
76  }

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