예제 #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)));
             }
         }
     }
 }
예제 #2
0
 /**
  * @param object $projection
  *
  * @return Generator
  */
 protected static function projectionProperties($projection)
 {
     if ($projection instanceof \stdClass) {
         return self::stdClassProjectionProperties($projection);
     } else {
         return parent::projectionProperties($projection);
     }
 }
예제 #3
0
 /**
  * @param string $class
  */
 public function __construct($class)
 {
     $reflection = new \ReflectionClass($class);
     $instance = $reflection->newInstanceWithoutConstructor();
     parent::__construct($instance);
 }