UrlMatchs.php 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace Muzich\CoreBundle\Factory;
  3. use Muzich\CoreBundle\Entity\Element;
  4. class UrlMatchs
  5. {
  6. /*
  7. * Si il y a un Element::TYPE_NOTMATCH le placer en début de tableau !
  8. */
  9. public static $jamendo = array(
  10. Element::TYPE_TRACK => array(
  11. // http://www.jamendo.com/fr/track/894974
  12. "#^\/[a-zA-Z0-9_-]+\/track\/([0-9]+)#" => 1,
  13. // http://www.jamendo.com/fr/track/347602/come-come
  14. "#^\/[a-zA-Z0-9_-]+\/track\/([0-9]+)\/.#" => 1
  15. ),
  16. Element::TYPE_ALBUM => array(
  17. // http://www.jamendo.com/fr/album/3409
  18. "#^\/[a-zA-Z0-9_-]+\/album\/([0-9]+)#" => 1,
  19. // http://www.jamendo.com/fr/list/a45666/proceed-positron...
  20. "#^\/[a-zA-Z0-9_-]+\/list\/a([0-9]+)\/.#" => 1
  21. )
  22. );
  23. public static $soundcloud = array(
  24. Element::TYPE_NOTMATCH => array(
  25. "#\/search\?q#" => null
  26. ),
  27. Element::TYPE_OTHER => array(
  28. // http://soundcloud.com/matas/sets/library-project
  29. "#^\/[a-zA-Z0-9_-]+\/sets\/[a-zA-Z0-9_-]+#" => null,
  30. // http://soundcloud.com/noisia/black-sun-empire-noisia-feed
  31. // http://soundcloud.com/user4818423/mechanika-crew-andrew-dj-set
  32. "#^\/[a-zA-Z0-9_-]+\/[a-zA-Z0-9_-]+#" => null
  33. )
  34. );
  35. }