changeset 314 | f5690d918358 |
parent 308 | e032d686d88e |
child 502 | 74fba571487e |
--- a/server/src/app/Libraries/CocoonUtils.php Sun Oct 02 19:11:06 2016 +0200 +++ b/server/src/app/Libraries/CocoonUtils.php Sun Oct 02 19:14:07 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; + } + } + }