Added the Search API Synonym module to deal specifically with licence and license...
[yaffs-website] / vendor / phpunit / phpunit / src / Util / Filesystem.php
1 <?php
2 /*
3  * This file is part of PHPUnit.
4  *
5  * (c) Sebastian Bergmann <sebastian@phpunit.de>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 /**
12  * Filesystem helpers.
13  *
14  * @since Class available since Release 3.0.0
15  */
16 class PHPUnit_Util_Filesystem
17 {
18     /**
19      * @var array
20      */
21     protected static $buffer = array();
22
23     /**
24      * Maps class names to source file names:
25      *   - PEAR CS:   Foo_Bar_Baz -> Foo/Bar/Baz.php
26      *   - Namespace: Foo\Bar\Baz -> Foo/Bar/Baz.php
27      *
28      * @param string $className
29      *
30      * @return string
31      *
32      * @since  Method available since Release 3.4.0
33      */
34     public static function classNameToFilename($className)
35     {
36         return str_replace(
37             array('_', '\\'),
38             DIRECTORY_SEPARATOR,
39             $className
40         ) . '.php';
41     }
42 }