Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
Y
yii2
  • Project
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • PSDI Army
  • yii2
  • Repository

Switch branch/tag
  • yii2
  • tests
  • unit
  • framework
  • helpers
  • FallbackInflector.php
Find file
BlameHistoryPermalink
  • Alexander Makarov's avatar
    Fixes #3939: `\yii\Inflector::slug()` improvements: · c3de3450
    Alexander Makarov authored 10 years ago
    - Added protected `\yii\Inflector::transliterate()` that could be replaced with custom translit implementation.
    - Added proper tests for both intl-based slug and PHP fallback.
    - Removed character maps for non-latin languages.
    - Improved overall slug results.
    - Added note about the fact that intl is required for non-latin languages to requirements checker.
    c3de3450
FallbackInflector.php 308 Bytes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
<?php


namespace yiiunit\framework\helpers;


use yii\helpers\BaseInflector;

/**
 * Forces Inflector::slug to use PHP even if intl is available
 */
class FallbackInflector extends BaseInflector
{
    /**
     * @inheritdoc
     */
    protected static function hasIntl()
    {
        return false;
    }
}
×

Replace FallbackInflector.php

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.