![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/lib/internal/Customweb/Annotation/Parser/ |
<?php class Customweb_Annotation_Parser_AnnotationsMatcher{ public function matches($string, &$annotations){ $annotations = array(); $annotationMatcher = new Customweb_Annotation_Parser_AnnotationMatcher(); while (true) { if (preg_match('~(?P<leadingSpace>\s)?(?=@)~', $string, $matches, PREG_OFFSET_CAPTURE)) { $offset = $matches[0][1]; if (isset($matches['leadingSpace'])) { $offset ++; } $string = substr($string, $offset); } else { // no more annotations break; } if (($length = $annotationMatcher->matches($string, $data)) !== false) { $string = substr($string, $length); list($name, $params) = $data; $annotations[$name] = new Customweb_Annotation_Cache_Annotation($name, $params); } else { // Move on ! $string = substr($string, 1); } } } }