Beispiel #1
0
 /**
  * @param string       $name
  * @param string|Base  $refEntity
  * @param array        $reference
  * @param array        $parameters
  *
  * @throws ArgumentException
  */
 public function __construct($name, $refEntity, $reference, $parameters = array())
 {
     parent::__construct($name);
     if ($refEntity instanceof Base) {
         $this->refEntity = $refEntity;
         $this->refEntityName = $refEntity->getFullName();
     } else {
         // this one could be without leading backslash and/or with Table-postfix
         $this->refEntityName = Base::normalizeName($refEntity);
     }
     if (empty($reference)) {
         throw new ArgumentException('Reference for `' . $name . '` shouldn\'t be empty');
     }
     $this->reference = $reference;
     if (isset($parameters['join_type'])) {
         $join_type = strtoupper($parameters['join_type']);
         if (in_array($join_type, array('LEFT', 'INNER', 'RIGHT'), true)) {
             $this->join_type = $join_type;
         }
     }
 }
Beispiel #2
0
 protected static function getUtmEntityClassNameBySrcEntity(Entity\Base $srcEntity)
 {
     return $srcEntity->getFullName() . 'UtmTable';
 }