Jump to main content Jump to doc navigation

xPDOCacheManager::matches

Синтаксис

API Docs: http://api.modxcms.com/xpdo/cache/xPDOCacheManager.html#matches

boolean matches (string $string, string|array $pattern)

Пример

Проверяет, есть ли в строке слова 'php':

if ($xpdo->cacheManager->matches('This string loves PHP!','/php/i')) {
  echo 'Yay!';
}
// Outputs: 'Yay!'

Смотрите также

  1. xPDOCacheManager.copyFile
  2. xPDOCacheManager.copyTree
  3. xPDOCacheManager.delete
  4. xPDOCacheManager.deleteTree
  5. xPDOCacheManager.endsWith
  6. xPDOCacheManager.escapeSingleQuotes
  7. xPDOCacheManager.get
  8. xPDOCacheManager.getCachePath
  9. xPDOCacheManager.getCacheProvider
  10. xPDOCacheManager.matches
  11. xPDOCacheManager.replace
  12. xPDOCacheManager.writeFile
  13. xPDOCacheManager.set
  14. xPDOCacheManager.writeTree
  15. xPDOCacheManager