changeset 308 | e032d686d88e |
parent 145 | 49b75287c30b |
child 502 | 74fba571487e |
--- a/server/src/app/Libraries/CocoonUtils.php Fri Sep 30 00:43:04 2016 +0200 +++ b/server/src/app/Libraries/CocoonUtils.php Sun Oct 02 11:49:00 2016 +0200 @@ -76,4 +76,14 @@ ); } + public static function getGeonamesidFromUrl($url) { + $matches = []; + if(preg_match(config('corpusparole.geonames_url_regexp'), $url, $matches) === 1) { + return $matches[1]; + } + else { + return null; + } + } + }