/** * @param ProjectionBuilderInterface $builder * @param string[] $exclude * * @throws \LogicException * * @return \Cubiche\Core\Projection\ProjectionBuilderInterface */ protected function copyTo(ProjectionBuilderInterface $builder, $exclude = array()) { foreach ($this->properties() as $property => $value) { if (\in_array($property, $exclude)) { continue; } if ($builder->has($property)) { throw new \LogicException('There already is a property with name ' . $property); } $builder->set($property, $value); } return $builder; }
/** * @param ProjectionBuilderInterface $leftBuilder * @param ProjectionBuilderInterface $rightBuilder * * @return ProjectionBuilderInterface */ protected function doJoin(ProjectionBuilderInterface $leftBuilder, ProjectionBuilderInterface $rightBuilder) { return $leftBuilder->join($rightBuilder); }