Exemple #1
0
 /**
  * {@inheritdoc}
  */
 public function project($value)
 {
     /** @var \Cubiche\Core\Projection\ProjectionWrapperInterface $leftProjection */
     foreach ($this->left()->project($value) as $leftProjection) {
         /** @var \Cubiche\Core\Projection\ProjectionWrapperInterface $rightProjection */
         foreach ($this->right()->project($value) as $rightProjection) {
             if ($this->checkJoin($leftProjection, $rightProjection)) {
                 (yield $this->doJoin(ProjectionBuilder::fromWrapper($leftProjection), ProjectionBuilder::fromWrapper($rightProjection)));
             }
         }
     }
 }
 /**
  * @param object $projection
  *
  * @return Generator
  */
 protected static function projectionProperties($projection)
 {
     if ($projection instanceof \stdClass) {
         return self::stdClassProjectionProperties($projection);
     } else {
         return parent::projectionProperties($projection);
     }
 }
 /**
  * @param string $class
  */
 public function __construct($class)
 {
     $reflection = new \ReflectionClass($class);
     $instance = $reflection->newInstanceWithoutConstructor();
     parent::__construct($instance);
 }