• m2_887596
  • 13.7MB
  • zip
  • 0
  • VIP专享
  • 0
  • 2022-06-15 08:01
它是PHP编程的存储库 :notebook: :elephant: :input_numbers: 我创建此存储库是为了学习PHP语言。 :backpack: 前提条件和存储库 :books: : 良好的英语领域; HTML5和CSS3; 编程逻辑; 渴望学习。 :warning: 警告:安装所示的每个组件并在自己的计算机上执行代码非常重要。 除此之外,请注意,存储库仅专注于PHP开发,如果您想了解HTML5,CSS3,JS或PHP框架,我建议您访问其他存储库,请单击下面的链接! :input_latin_uppercase: 推荐的西班牙竞技场推荐网站: :input_symbols: :elephant: 主菜单-有关PHP语言的基础知识 :elephant: : 所有主题: 还是PHP? :elephant: PHP的naualidade :calendar: 取消了对PHP acabar em 2020的重新分配,或取消了对未来的要求。 E resposta correta,para essa pergunta,équenãoirá!
# cocur/slugify > Converts a string into a slug. [![Build Status](]( [![Windows Build status](]( [![Scrutinizer Quality Score](]( [![Code Coverage](]( [![Latest Release](]( [![MIT License](]( [![Total Downloads](]( Developed by [Florian Eckerstorfer]( in Vienna, Europe with the help of [many great contributors]( ## Features - Removes all special characters from a string. - Provides custom replacements for Arabic, Austrian, Azerbaijani, Brazilian Portuguese, Bulgarian, Burmese, Chinese, Croatian, Czech, Esperanto, Estonian, Finnish, French, Georgian, German, Greek, Hindi, Hungarian, Italian, Latvian, Lithuanian, Macedonian, Norwegian, Polish, Romanian, Russian, Serbian, Spanish, Swedish, Turkish, Ukrainian and Vietnamese special characters. Instead of removing these characters, Slugify approximates them (e.g., `ae` replaces `채`). - No external dependencies. - PSR-4 compatible. - Compatible with PHP >= 7. - Integrations for [Symfony (3, 4 and 5)](, [Laravel](, [Twig (2 and 3)](, [Zend Framework 2](, [Nette Framework](, [Latte]( and [Plum]( ## Installation You can install Slugify through [Composer]( ```shell $ composer require cocur/slugify ``` Slugify requires the Multibyte String extension from PHP. Typically you can use the configure option `--enable-mbstring` while compiling PHP. More information can be found in the [PHP documentation]( Further steps may be needed for [integrations](#integrations). ## Usage Generate a slug: ```php use Cocur\Slugify\Slugify; $slugify = new Slugify(); echo $slugify->slugify('Hello World!'); // hello-world ``` You can also change the separator used by `Slugify`: ```php echo $slugify->slugify('Hello World!', '_'); // hello_world ``` The library also contains `Cocur\Slugify\SlugifyInterface`. Use this interface whenever you need to type hint an instance of `Slugify`. To add additional transliteration rules you can use the `addRule()` method. ```php $slugify->addRule('i', 'ey'); echo $slugify->slugify('Hi'); // hey ``` ### Rulesets Many of the transliterations rules used in Slugify are specific to a language. These rules are therefore categorized using rulesets. Rules for the most popular are activated by default in a specific order. You can change which rulesets are activated and the order in which they are activated. The order is important when there are conflicting rules in different languages. For example, in German `채` is transliterated with `ae`, in Turkish the correct transliteration is `a`. By default the German transliteration is used since German is used more often on the internet. If you want to use prefer the Turkish transliteration you have to possibilities. You can activate it after creating the constructor: ```php $slugify = new Slugify(); $slugify->slugify('채'); // -> "ae" $slugify->activateRuleSet('turkish'); $slugify->slugify('채'); // -> "a" ``` An alternative way would be to pass the rulesets and their order to the constructor. ```php $slugify = new Slugify(['rulesets' => ['default', 'turkish']]); $slugify->slugify('채'); // -> "a" ``` You can find a list of the available rulesets in [Resources/rules]( ### More options The constructor takes an options array, you have already seen the `rulesets` options above. You can also change the regular expression that is used to replace characters with the separator. ```php $slugify = new Slugify(['regexp' => '/([^A-Za-z0-9]|-)+/']); ``` _(The regular expression used in the example above is the default one.)_ By default Slugify will convert the slug to lowercase. If you want to preserve the case of the string you can set the `lowercase` option to false. ```php $slugify = new Slugify(['lowercase' => false]); $slugify->slugify('Hello World'); // -> "Hello-World" ``` Lowercasing is done before using the regular expression. If you want to keep the lowercasing behavior but your regular expression needs to match uppercase letters, you can set the `lowercase_after_regexp` option to `true`. ```php $slugify = new Slugify([ 'regexp' => '/(?<=[[:^upper:]])(?=[[:upper:]])/', 'lowercase_after_regexp' => false, ]); $slugify->slugify('FooBar'); // -> "foo-bar" ``` By default Slugify will use dashes as separators. If you want to use a different default separator, you can set the `separator` option. ```php $slugify = new Slugify(['separator' => '_']); $slugify->slugify('Hello World'); // -> "hello_world" ``` By default Slugify will remove leading and trailing separators before returning the slug. If you do not want the slug to be trimmed you can set the `trim` option to false. ```php $slugify = new Slugify(['trim' => false]); $slugify->slugify('Hello World '); // -> "hello-world-" ``` ### Changing options on the fly You can overwrite any of the above options on the fly by passing an options array as second argument to the `slugify()` method. For example: ```php $slugify = new Slugify(); $slugify->slugify('Hello World', ['lowercase' => false]); // -> "Hello-World" ``` You can also modify the separator this way: ```php $slugify = new Slugify(); $slugify->slugify('Hello World', ['separator' => '_']); // -> "hello_world" ``` You can even activate a custom ruleset without touching the default rules: ```php $slugify = new Slugify(); $slugify->slugify('f체r', ['ruleset' => 'turkish']); // -> "fur" $slugify->slugify('f체r'); // -> "fuer" ``` ### Contributing We really appreciate if you report bugs and errors in the transliteration, especially if you are a native speaker of the language and question. Feel free to ask for additional languages in the issues, but please note that the maintainer of this repository does not speak all languages. If you can provide a Pull Request with rules for a new language or extend the rules for an existing language that would be amazing. To add a new language you need to: 1. Create a `[language].json` in `Resources/rules` 2. If you believe the language should be a default ruleset you can add the language to `Cocur\Slugify\Slugify::$options`. If you add the language there all existing tests still have to pass 3. Run `php bin/generate-default.php` 4. Add tests for the language in `tests/SlugifyTest.php`. If the language is in the default ruleset add your test cases to `defaultRuleProvider()`, otherwise to `customRulesProvider()`. Submit PR. Thank you very much. �윊� ### Code of Conduct In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. The full Code of Conduct can be found [here](
    • CSS3 HTML5 魔方demo
      CSS3 HTML5 魔方。 CSS3旋转,变换,动画。 魔方可通过鼠标控制旋转。
    • css3 + html5
      css3 + html5超炫的效果,让你赏心悦目,心旷神怡
    • 鼠标放上图片放大缩小(css3 html5
      鼠标放上图片放大缩小(css3 html5) 鼠标放上图片放大缩小(css3 html5) 鼠标放上图片放大缩小(css3 html5) 鼠标放上图片放大缩小(css3 html5
    • HTML5+CSS3
    • 前端 css3 html5 jquery 文档
      前端 css3 html5 jquery 文档
    • css3 html5 翻转和slide动画
      css3 + html5 + javascript 实现的翻转 和滑动动画; 将jqurey mobile的动画进行了简化,方便使用。 测试使用的是ff 11,safari 5.1.5;ie的,css存在问题,如有了解的朋友,请告之我,谢谢。
    • CSS3 html5纸扇动画.rar
      CSS3 html5纸扇动画,扇子会打开,然后合拢,演示用CSS3实现动画效果,应该多看就明白了。
    • css3html5手册
      html5css3 使用手册
    • HTML5 CSS3
      WEB技术 HTML5 CSS3等 chm版
    • html5 css3