first
This commit is contained in:
8613
wp-content/plugins/visual-portfolio/vendors/slugify/RuleProvider/DefaultRuleProvider.php
vendored
Normal file
8613
wp-content/plugins/visual-portfolio/vendors/slugify/RuleProvider/DefaultRuleProvider.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
47
wp-content/plugins/visual-portfolio/vendors/slugify/RuleProvider/FileRuleProvider.php
vendored
Normal file
47
wp-content/plugins/visual-portfolio/vendors/slugify/RuleProvider/FileRuleProvider.php
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of cocur/slugify.
|
||||
*
|
||||
* (c) Florian Eckerstorfer <florian@eckerstorfer.co>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Cocur\Slugify\RuleProvider;
|
||||
|
||||
/**
|
||||
* FileRuleProvider
|
||||
*
|
||||
* @package Cocur\Slugify\RuleProvider
|
||||
* @author Florian Eckerstorfer
|
||||
* @copyright 2015 Florian Eckerstorfer
|
||||
*/
|
||||
class FileRuleProvider implements RuleProviderInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $directoryName;
|
||||
|
||||
/**
|
||||
* @param string $directoryName
|
||||
*/
|
||||
public function __construct($directoryName)
|
||||
{
|
||||
$this->directoryName = $directoryName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $ruleset
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getRules($ruleset)
|
||||
{
|
||||
$fileName = $this->directoryName.DIRECTORY_SEPARATOR.$ruleset.'.json';
|
||||
|
||||
return json_decode(file_get_contents($fileName), true);
|
||||
}
|
||||
}
|
29
wp-content/plugins/visual-portfolio/vendors/slugify/RuleProvider/RuleProviderInterface.php
vendored
Normal file
29
wp-content/plugins/visual-portfolio/vendors/slugify/RuleProvider/RuleProviderInterface.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of cocur/slugify.
|
||||
*
|
||||
* (c) Florian Eckerstorfer <florian@eckerstorfer.co>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Cocur\Slugify\RuleProvider;
|
||||
|
||||
/**
|
||||
* RuleProviderInterface
|
||||
*
|
||||
* @package Cocur\Slugify\RuleProvider
|
||||
* @author Florian Eckerstorfer
|
||||
* @copyright 2015 Florian Eckerstorfer
|
||||
*/
|
||||
interface RuleProviderInterface
|
||||
{
|
||||
/**
|
||||
* @param $ruleset
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getRules($ruleset);
|
||||
}
|
Reference in New Issue
Block a user