Пример #1
0
 public function option($option, $value)
 {
     if (!empty($this->postgreQuoteOptions[strtoupper($option)])) {
         $value = presuffix($value, '\'');
     }
     $this->parameters['option'] = $option . ' ' . $value;
 }
Пример #2
0
 public function defaultValue(string $default = NULL, bool $type = false) : string
 {
     if (!is_numeric($default)) {
         $default = presuffix($default, '"');
     }
     return $this->db->statements('default', $default, $type);
 }
Пример #3
0
 public function having($column = '', $value = '', $logical = '')
 {
     // Parametrelerin string kontrolü yapılıyor.
     if (!is_string($column) || !isValue($value) || !is_string($logical)) {
         Error::set(lang('Error', 'stringParameter', 'column, value, logical'));
     } else {
         $value = presuffix($this->db->realEscapeString($value), "'");
         $this->having .= ' ' . $column . ' ' . $value . ' ' . $logical . ' ';
     }
     return $this;
 }
 public function pattern(string $pattern, string $char = NULL) : InternalValidation
 {
     $this->settings['config']['pattern'] = presuffix($pattern) . $char;
     return $this;
 }
Пример #5
0
 protected function _whereHaving($column, $value, $logical)
 {
     if (!is_string($column) || !is_scalar($value) || !is_string($logical)) {
         Error::set('Error', 'stringParameter', 'column, value, logical');
     } else {
         if ($value !== '') {
             $value = presuffix($this->db->realEscapeString($value), "'");
         }
         return ' ' . $column . ' ' . $value . ' ' . $logical . ' ';
     }
     return '';
 }
Пример #6
0
 protected function _regularConverting($pattern, $ex, $delimiter)
 {
     $specialChars = REGEX_CONFIG['specialChars'];
     $pattern = str_ireplace(array_keys($specialChars), array_values($specialChars), $pattern);
     // Config/Regex.php dosyasından düzenlenmiş karakter
     // listeleri alınıyor.
     $regexChars = Arrays::multikey(REGEX_CONFIG['regexChars']);
     $settingChars = Arrays::multikey(REGEX_CONFIG['settingChars']);
     // --------------------------------------------------------------------------------------------
     $pattern = str_ireplace(array_keys($regexChars), array_values($regexChars), $pattern);
     if (!empty($ex)) {
         $ex = str_ireplace(array_keys($settingChars), array_values($settingChars), $ex);
     }
     return presuffix($pattern, $delimiter) . $ex;
 }
Пример #7
0
 protected function _whereHaving($column, $value, $logical)
 {
     if ($value !== '') {
         $value = presuffix($this->db->realEscapeString($value), "'");
     }
     if (preg_match('/^\\w+$/', trim($column))) {
         $column .= ' = ';
     }
     return ' ' . $column . ' ' . $value . ' ' . $logical . ' ';
 }
Пример #8
0
 public function pattern($pattern = '', $char = '')
 {
     $this->settings['config']['pattern'] = presuffix($pattern) . $char;
     return $this;
 }
Пример #9
0
function internalCleanInjection(string $string = '') : string
{
    $urlInjectionChangeChars = Config::get('IndividualStructures', 'security')['urlChangeChars'];
    if (!empty($urlInjectionChangeChars)) {
        foreach ($urlInjectionChangeChars as $key => $val) {
            $string = preg_replace(presuffix($key) . 'xi', $val, $string);
        }
    }
    return $string;
}
Пример #10
0
 protected function _type($type)
 {
     $return = '';
     if ($type === 'model') {
         $return = 'Models';
     } elseif ($type === 'controller') {
         $return = 'Controllers';
     } elseif ($type === 'library') {
         $return = 'Libraries';
     }
     return presuffix($return, DS);
 }
Пример #11
0
function cleanInjection($string = "")
{
    $urlInjectionChangeChars = Config::get("Security", 'urlChangeChars');
    if (!empty($urlInjectionChangeChars)) {
        foreach ($urlInjectionChangeChars as $key => $val) {
            $string = preg_replace(presuffix($key) . 'xi', $val, $string);
        }
    }
    return $string;
}