示例#1
0
 /**
  * @param $result
  * @param CloneObjectMap $hydrator
  * @return array|bool
  */
 protected function hydrateCollection($result, CloneObjectMap $hydrator)
 {
     if (is_array($result) && count($result) > 0) {
         foreach ($result as $key => $row) {
             $result[$key] = $hydrator->hydrate($row);
         }
         return $result;
     }
     return false;
 }
示例#2
0
 /**
  * @param $apiResult
  * @param \SocialConnect\Common\Hydrator\CloneObjectMap $hydrator
  * @return array|bool
  */
 protected function hydrateCollection($apiResult, $hydrator)
 {
     if ($apiResult && is_array($apiResult)) {
         $result = array();
         foreach ($apiResult as $row) {
             $result[] = $hydrator->hydrate($row);
         }
         return $result;
     }
     return array();
 }