예제 #1
0
 /**
  * Parse data
  *
  * @param array $data Data
  *
  * @return array
  */
 public function parseData($data)
 {
     $parts = \RevPDFLib\Application::getSupportedParts();
     foreach ($parts as $part) {
         if (!isset($data[$part])) {
             $data[$part] = array();
         }
     }
     return $data;
 }
예제 #2
0
 /**
  * Parse data
  *
  * @param array $report Report data
  */
 public function parse($report)
 {
     if ($this->connector === null) {
         throw new \Exception('Connector is NOT set');
     }
     $data = array();
     $parts = \RevPDFLib\Application::getSupportedParts();
     foreach ($parts as $part) {
         if (array_key_exists($part, $report)) {
             if (isset($report[$part]['elements'])) {
                 foreach ($report[$part]['elements'] as $element) {
                     if ($element['type'] == 'textzone') {
                         $data[$element['value']] = $element['value'];
                     }
                 }
             }
         }
     }
     $this->setData(array($data));
 }