/** * __construct * * Constructor * * @access public * @param ResultHandler $result * @param Session $session * @param Projection $projection */ public function __construct(ResultHandler $result, Session $session, Projection $projection) { parent::__construct($result); $this->projection = $projection; $this->session = $session; $this->hydration_plan = new HydrationPlan($projection, $session); $this->entity_converter = $this->session->getClientUsingPooler('converter', $this->projection->getFlexibleEntityClass())->getConverter(); }
/** * getSubtypeConverter * * Since the arrays in PostgreSQL have the same subtype, it is useful to * cache it here to avoid summoning the ClientHolder all the time. * * @access protected * @param string $type * @param Session $session * @return ConverterInterface */ protected function getSubtypeConverter($type, Session $session) { if (!isset($this->converters[$type])) { $this->converters[$type] = $session->getClientUsingPooler('converter', $type)->getConverter(); } return $this->converters[$type]; }
/** * getPointConverter * * Cache the point converter. * * @access protected * @param Session $session * @return ConverterInterface */ protected function getPointConverter(Session $session) { if ($this->point_converter === null) { $this->point_converter = $session->getClientUsingPooler('converter', 'point'); } return $this->point_converter; }