Пример #1
0
 /**
  * Create a new metadata manipulator Instance.
  */
 public function __construct($settings = null, $paramsArray, $record_key)
 {
     parent::__construct($settings, $paramsArray, $record_key);
     // 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);
 }
Пример #2
0
 /**
  * Create a new metadata manipulator instance.
  */
 public function __construct($settings = null, $paramsArray, $record_key)
 {
     parent::__construct($settings, $paramsArray, $record_key);
     $this->record_key = $record_key;
     // 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);
     if (count($paramsArray) == 2) {
         $this->sourceDateField = $paramsArray[0];
         $this->destDateElement = $paramsArray[1];
     } else {
         $this->log->addInfo("NormalizeDate", array('Wrong parameter count' => count($paramsArray)));
     }
 }