Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  *
  * {@inheritdoc}
  */
 public function getValueFromGlob(Glob $globNode)
 {
     $constStar = 'star_hjc7vjHg6jd8mv8hcy75GFt0c67cnbv74FegxtEDJkcucG64frblmkb';
     $constQuestion = 'question_hjc7vjHg6jd8mv8hcy75GFt0c67cnbv74FegxtEDJkcucG64frblmkb';
     $glob = parent::getValueFromGlob($globNode);
     $regexSQL = strtr(preg_quote(rawurldecode(strtr($glob, ['*' => $constStar, '?' => $constQuestion])), '/'), [$constStar => '%', $constQuestion => '_']);
     return $regexSQL;
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  *
  * {@inheritdoc}
  */
 public function getValueFromGlob(Glob $globNode)
 {
     $constStar = 'starhjc7vjHg6jd8mv8hcy75GFt0c67cnbv74FegxtEDJkcucG64frblmkb';
     $constQuestion = 'questionhjc7vjHg6jd8mv8hcy75GFt0c67cnbv74FegxtEDJkcucG64frblmkb';
     $glob = parent::getValueFromGlob($globNode);
     $regexRqlPrepared = strtr($glob, ['*' => $constStar, '?' => $constQuestion]);
     $regexRqlDecoded = rawurldecode($regexRqlPrepared);
     return $regexRqlDecoded;
 }
Ejemplo n.º 3
0
 /**
  * {@inheritdoc}
  *
  * {@inheritdoc}
  */
 public function getValueFromGlob(Glob $globNode)
 {
     $constStar = 'star_hjc7vjHg6jd8mv8hcy75GFt0c67cnbv74FegxtEDJkcucG64frblmkb';
     $constQuestion = 'question_hjc7vjHg6jd8mv8hcy75GFt0c67cnbv74FegxtEDJkcucG64frblmkb';
     $glob = parent::getValueFromGlob($globNode);
     $anchorStart = true;
     if (substr($glob, 0, 1) === '*') {
         $anchorStart = false;
         $glob = ltrim($glob, '*');
     }
     $anchorEnd = true;
     if (substr($glob, -1) === '*') {
         $anchorEnd = false;
         $glob = rtrim($glob, '*');
     }
     $regex = strtr(preg_quote(rawurldecode(strtr($glob, ['*' => $constStar, '?' => $constQuestion])), '/'), [$constStar => '.*', $constQuestion => '.']);
     if ($anchorStart) {
         $regex = '^' . $regex;
     }
     if ($anchorEnd) {
         $regex = $regex . '$';
     }
     return '/' . $regex . '/i';
 }