コード例 #1
0
ファイル: JoinAbstract.php プロジェクト: sgdoc/sgdoce-codigo
 /**
  * Fábrica de JoinAbstract
  *
  * @return JoinAbstract
  * @throws IllegalArgumentException
  * */
 public static function factory()
 {
     $entity = func_get_arg(0);
     $conditional = func_get_arg(1);
     IllegalArgumentException::throwsExceptionIfParamIsNull(self::JOINABSTRACT_FACTORY_PARAM_NUMBER == func_num_args(), self::JOINABSTRACT_EXPECTED_TWO_PARAM);
     IllegalArgumentException::throwsExceptionIfParamIsNull($entity instanceof Entity, self::JOINABSTRACT_FIRST_PARAM_MUST_BE_ENTITY);
     IllegalArgumentException::throwsExceptionIfParamIsNull($conditional, self::JOINABSTRACT_SECOND_PARAM_MUST_BE_RELATIONALABSTRACT);
     $join = parent::factory();
     $join->_entity = $entity;
     $join->_conditional = $conditional;
     return $join;
 }
コード例 #2
0
ファイル: GroupBy.php プロジェクト: sgdoc/sgdoce-codigo
 /**
  * Representação textual
  *
  * @return string
  * @throws IllegalArgumentException
  * */
 public function render()
 {
     $content = parent::render();
     IllegalArgumentException::throwsExceptionIfParamIsNull(self::T_COMMAND != $content, self::GROUPBY_UNAVAILABLE_COLUMN);
     return $content;
 }