示例#1
0
 /**
  *  (non-PHPdoc)
  * @see \Zend\Stdlib\Hydrator\ArraySerializable::hydrate()
  * @param IssueAbstract $object
  */
 public function hydrate(array $data, $object)
 {
     $exchangeArray = ['id' => $data['local_id'], 'title' => $data['title'], 'created_at' => $data['utc_created_on'], 'updated_at' => $data['utc_last_updated'], 'kind' => 'issue', 'priority' => '', 'status' => $data['status']];
     $exchangeArray['description'] = '';
     if (isset($data['content'])) {
         $exchangeArray['description'] = $data['content'];
     }
     $exchangeArray['asignee'] = '';
     if (isset($data['responsible'])) {
         $exchangeArray['asignee'] = $data['responsible']['first_name'] . ' ' . $data['responsible']['last_name'];
     }
     $object->exchangeArray($exchangeArray);
 }
示例#2
0
 /**
  *  (non-PHPdoc)
  * @see \Zend\Stdlib\Hydrator\ArraySerializable::hydrate()
  * @param IssueAbstract $object
  */
 public function hydrate(array $data, $object)
 {
     $exchangeArray = ['id' => $data['id'], 'title' => $data['title'], 'created_at' => $data['created_at'], 'updated_at' => $data['updated_at'], 'kind' => 'issue', 'priority' => '', 'status' => $data['state']];
     $exchangeArray['description'] = '';
     if (isset($data['content'])) {
         $exchangeArray['description'] = $data['description'];
     }
     $data['asignee'] = '';
     if (isset($data['asignee'])) {
         $exchangeArray['asignee'] = $data['asignee'];
     }
     $object->exchangeArray($exchangeArray);
 }