protected final function getClause(TableInterface $table): string
    {
       $mySql = "";
       $column = $table->get($table::ATTR_COLUMN);
       foreach ($table->get($table::ATTR_CLAUSE) as $key => $clause) {
           $mySql .= rtrim(" " . $this->constant($clause->getType()) . " "
                   . $clause->getSubject() . " "
                   . $this->constant($clause->getOperator()));
           if ($clause->getOperator()) {
               $type = isset($column[$clause->getSubject()])
                     ? $column[$clause->getSubject()]->getParam()
                     : (is_int($clause->getValue())
                     ? PDO::PARAM_INT
                     : (is_string($clause->getValue())
                     ? PDO::PARAM_STR
                     : PDO::PARAM_NULL));
               $id = ":c" . $key . "_" . ($clause->getSubject()
                     ? str_replace(".", "_", $clause->getSubject())
                     : "");
               $this->setParam($id, $clause->getValue(), $type);
               $mySql .= " " . $id;
           }
       }
       return ltrim($mySql);
    }
protected final function getClause(TableInterface $table): string
    {
       $mySql = "";
       $column = $table->get($table::ATTR_COLUMN);
       foreach ($table->get($table::ATTR_CLAUSE) as $key => $clause) {
           $mySql .= rtrim(" " . $this->constant($clause->getType()) . " "
                   . $clause->getSubject() . " "
                   . $this->constant($clause->getOperator()));
           if ($clause->getOperator()) {
               $type = isset($column[$clause->getSubject()])
                     ? $column[$clause->getSubject()]->getParam()
                     : (is_int($clause->getValue())
                     ? PDO::PARAM_INT
                     : (is_string($clause->getValue())
                     ? PDO::PARAM_STR
                     : PDO::PARAM_NULL));
               $id = ":c" . $key . "_" . ($clause->getSubject()
                     ? str_replace(".", "_", $clause->getSubject())
                     : "");
               $this->setParam($id, $clause->getValue(), $type);
               $mySql .= " " . $id;
           }
       }
       return ltrim($mySql);
    }
protected final function getClause ( TableInterface $ table ) : string { $ mySql = "" ; $ column = $ table -> get ( $ table :: ATTR_COLUMN ) ; foreach ( $ table -> get ( $ table :: ATTR_CLAUSE ) as $ key => $ clause ) { $ mySql .= rtrim ( " " . $ this -> constant ( $ clause -> getType ( ) ) . " " . $ clause -> getSubject ( ) . " " . $ this -> constant ( $ clause -> getOperator ( ) ) ) ; if ( $ clause -> getOperator ( ) ) { $ type = isset ( $ column [ $ clause -> getSubject ( ) ] ) ? $ column [ $ clause -> getSubject ( ) ] -> getParam ( ) : ( is_int ( $ clause -> getValue ( ) ) ? PDO :: PARAM_INT : ( is_string ( $ clause -> getValue ( ) ) ? PDO :: PARAM_STR : PDO :: PARAM_NULL ) ) ; $ id = ":c" . $ key . "_" . ( $ clause -> getSubject ( ) ? str_replace ( "." , "_" , $ clause -> getSubject ( ) ) : "" ) ; $ this -> setParam ( $ id , $ clause -> getValue ( ) , $ type ) ; $ mySql .= " " . $ id ; } } return ltrim ( $ mySql ) ; }
Get clause to MySql syntaxe

@param TableInterface $table table
@return string clause to MySql syntaxe
Get clause to MySql syntaxe