Example #1
0
 /**
  * @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;
 }
Example #2
0
 /**
  * @param ProjectionBuilderInterface $leftBuilder
  * @param ProjectionBuilderInterface $rightBuilder
  *
  * @return ProjectionBuilderInterface
  */
 protected function doJoin(ProjectionBuilderInterface $leftBuilder, ProjectionBuilderInterface $rightBuilder)
 {
     return $leftBuilder->join($rightBuilder);
 }