Пример #1
0
 /**
  * Check the passed arguments and throw an exception if necessary.
  *
  * @param ColumnInterface $firstColumn
  * @param ColumnInterface $secondColumn
  *
  * @throws \Exception
  */
 private function _validateOnArguments(ColumnInterface $firstColumn, ColumnInterface $secondColumn)
 {
     $initialJoinArray = array('way' => null, 'tables' => null, 'conditionType' => null, 'condition' => null);
     if ($this->joinArray === $initialJoinArray) {
         throw new \Exception('method to set join way have call before!');
     }
     if (!$firstColumn->getTableName() || !$secondColumn->getTableName()) {
         throw new \Exception('column arguments require a referenced table!');
     }
     //		if($firstColumn->getColumnName() !== $secondColumn->getColumnName())
     //		{
     //			throw new \Exception('column arguments require a equivalent column names!');
     //		}
 }