Exemplo n.º 1
0
 /**
  * Create a new CdmSingleFileByExtension fetchermanipulator Instance.
  *
  * @param array $settings
  *   All of the settings from the .ini file.
  *
  * @param array $manipulator_settings
  *   An array of all of the settings for the current manipulator,
  *   with the manipulator class name in the first position and
  *   the strings indicating the extensions to filter on in the
  *   remaining positions.
  */
 public function __construct($settings, $manipulator_settings)
 {
     array_shift($manipulator_settings);
     $this->extensions = explode('|', $manipulator_settings[0]);
     // To get the value of $onWindows.
     parent::__construct();
 }
Exemplo n.º 2
0
 /**
  * Create a new CsvSingleFileByFilename fetchermanipulator instance.
  *
  * @param array $settings
  *   All of the settings from the .ini file.
  *
  * @param array $manipulator_settings
  *   An array of all of the settings for the current manipulator,
  *   with the manipulator class name in the first position and
  *   the PHP regex pattern to match, without the leading and trailing
  *   /, as the second member.
  */
 public function __construct($settings, $manipulator_settings)
 {
     $this->allowed_pattern = $manipulator_settings[1];
     $this->file_name_field = $settings['FILE_GETTER']['file_name_field'];
     // To get the value of $onWindows.
     parent::__construct();
 }
Exemplo n.º 3
0
 /**
  * Create a new CdmCompound fetchermanipulator Instance.
  *
  * @param array $settings
  *   All of the settings from the .ini file.
  *
  * @param array $manipulator_settings
  *   An array of all of the settings for the current manipulator,
  *   with the manipulator class name in the first position and
  *   the string indicating the document type to filter for in the
  *   second. This string must be one of: Document, Document-PDF,
  *   Document-EAD, Postcard, Picture Cube, Monograph.
  */
 public function __construct($settings, $manipulator_settings)
 {
     $this->type = $manipulator_settings[1];
     $this->alias = $settings['FETCHER']['alias'];
     $this->ws_url = $settings['FETCHER']['ws_url'];
     // To get the value of $onWindows.
     parent::__construct();
 }
Exemplo n.º 4
0
 /**
  * Create a new CsvSingleFile fetchermanipulator Instance
  *
  * @param array $settings
  *   All of the settings from the .ini file.
  *
  * @param array $manipulator_settings
  *   An array of all of the settings for the current manipulator,
  *   with the manipulator class name in the first position and
  *   the list of allowed extensions, without the leading period,
  *   as the second member. 
  */
 public function __construct($settings, $manipulator_settings)
 {
     // We remove the first member of $manipulator_settings since it contains
     // the classname of this class.
     $this->allowed_extensions = explode('|', $manipulator_settings[1]);
     $this->file_name_field = $settings['FILE_GETTER']['file_name_field'];
     // To get the value of $onWindows.
     parent::__construct();
 }
Exemplo n.º 5
0
 /**
  * Create a new CdmNoParent fetchermanipulator Instance.
  *
  * @param array $settings
  *   All of the settings from the .ini file.
  *
  * @param array $manipulator_settings
  *   An array of all of the settings for the current manipulator,
  *   with the manipulator class name in the first position and
  *   the strings indicating the extensions to filter on in the
  *   remaining positions.
  */
 public function __construct($settings, $manipulator_settings)
 {
     $this->settings = $settings;
     $this->alias = $this->settings['METADATA_PARSER']['alias'];
     // To get the value of $onWindows.
     parent::__construct();
     // Set up logger.
     $this->pathToLog = $this->settings['LOGGING']['path_to_manipulator_log'];
     $this->log = new \Monolog\Logger('config');
     $this->logStreamHandler = new \Monolog\Handler\StreamHandler($this->pathToLog, Logger::INFO);
     $this->log->pushHandler($this->logStreamHandler);
 }
Exemplo n.º 6
0
 /**
  * Create a new RangeSet fetchermanipulator Instance.
  *
  * @param array $settings
  *   All of the settings from the .ini file.
  *
  * @param array $manipulator_settings
  *   An array of all of the settings for the current manipulator,
  *   with the manipulator class name in the first position and
  *   the string indicating the set size in the second.
  */
 public function __construct($settings, $manipulator_settings)
 {
     $this->settings = $settings;
     if (preg_match('/\\|/', $manipulator_settings[1])) {
         $parameters = explode('|', $manipulator_settings[1]);
     } else {
         $parameters = array($manipulator_settings[1]);
     }
     $this->range = $parameters[0];
     // To get the value of $onWindows.
     parent::__construct($settings);
     // Set up logger.
     $this->pathToLog = $this->settings['LOGGING']['path_to_manipulator_log'];
     $this->log = new \Monolog\Logger('config');
     $this->logStreamHandler = new \Monolog\Handler\StreamHandler($this->pathToLog, Logger::INFO);
     $this->log->pushHandler($this->logStreamHandler);
 }
Exemplo n.º 7
0
 /**
  * Create a new RandomSet fetchermanipulator Instance.
  *
  * @param array $settings
  *   All of the settings from the .ini file.
  *
  * @param array $manipulator_settings
  *   An array of all of the settings for the current manipulator,
  *   with the manipulator class name in the first position and
  *   the string indicating the set size in the second.
  */
 public function __construct($settings, $manipulator_settings)
 {
     $this->setSize = $manipulator_settings[1];
     // To get the value of $onWindows.
     parent::__construct();
 }