[Finder] moved most protected methods and properties to private
This commit is contained in:
parent
75b29ffdfe
commit
c9b965dbee
@ -18,8 +18,8 @@ namespace Symfony\Component\Finder\Comparator;
|
|||||||
*/
|
*/
|
||||||
class Comparator
|
class Comparator
|
||||||
{
|
{
|
||||||
protected $target;
|
private $target;
|
||||||
protected $operator = '==';
|
private $operator = '==';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the target value.
|
* Gets the target value.
|
||||||
|
@ -18,8 +18,8 @@ namespace Symfony\Component\Finder\Comparator;
|
|||||||
*/
|
*/
|
||||||
class DateComparator extends Comparator
|
class DateComparator extends Comparator
|
||||||
{
|
{
|
||||||
protected $target;
|
private $target;
|
||||||
protected $comparison;
|
private $comparison;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
|
@ -27,18 +27,18 @@ namespace Symfony\Component\Finder;
|
|||||||
*/
|
*/
|
||||||
class Finder implements \IteratorAggregate
|
class Finder implements \IteratorAggregate
|
||||||
{
|
{
|
||||||
protected $mode = 0;
|
private $mode = 0;
|
||||||
protected $names = array();
|
private $names = array();
|
||||||
protected $notNames = array();
|
private $notNames = array();
|
||||||
protected $exclude = array();
|
private $exclude = array();
|
||||||
protected $filters = array();
|
private $filters = array();
|
||||||
protected $depths = array();
|
private $depths = array();
|
||||||
protected $sizes = array();
|
private $sizes = array();
|
||||||
protected $followLinks = false;
|
private $followLinks = false;
|
||||||
protected $sort = false;
|
private $sort = false;
|
||||||
protected $ignoreVCS = true;
|
private $ignoreVCS = true;
|
||||||
protected $dirs = array();
|
private $dirs = array();
|
||||||
protected $dates = array();
|
private $dates = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Restricts the matching to directories only.
|
* Restricts the matching to directories only.
|
||||||
@ -336,7 +336,7 @@ class Finder implements \IteratorAggregate
|
|||||||
return $iterator;
|
return $iterator;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function searchInDirectory($dir)
|
private function searchInDirectory($dir)
|
||||||
{
|
{
|
||||||
$flags = \RecursiveDirectoryIterator::SKIP_DOTS;
|
$flags = \RecursiveDirectoryIterator::SKIP_DOTS;
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ namespace Symfony\Component\Finder\Iterator;
|
|||||||
*/
|
*/
|
||||||
class CustomFilterIterator extends \FilterIterator
|
class CustomFilterIterator extends \FilterIterator
|
||||||
{
|
{
|
||||||
protected $filters = array();
|
private $filters = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
|
@ -18,7 +18,7 @@ namespace Symfony\Component\Finder\Iterator;
|
|||||||
*/
|
*/
|
||||||
class DateRangeFilterIterator extends \FilterIterator
|
class DateRangeFilterIterator extends \FilterIterator
|
||||||
{
|
{
|
||||||
protected $comparators = array();
|
private $comparators = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
|
@ -18,7 +18,7 @@ namespace Symfony\Component\Finder\Iterator;
|
|||||||
*/
|
*/
|
||||||
class DepthRangeFilterIterator extends \FilterIterator
|
class DepthRangeFilterIterator extends \FilterIterator
|
||||||
{
|
{
|
||||||
protected $minDepth = 0;
|
private $minDepth = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
|
@ -18,7 +18,7 @@ namespace Symfony\Component\Finder\Iterator;
|
|||||||
*/
|
*/
|
||||||
class ExcludeDirectoryFilterIterator extends \FilterIterator
|
class ExcludeDirectoryFilterIterator extends \FilterIterator
|
||||||
{
|
{
|
||||||
protected $patterns;
|
private $patterns;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
|
@ -21,7 +21,7 @@ class FileTypeFilterIterator extends \FilterIterator
|
|||||||
const ONLY_FILES = 1;
|
const ONLY_FILES = 1;
|
||||||
const ONLY_DIRECTORIES = 2;
|
const ONLY_DIRECTORIES = 2;
|
||||||
|
|
||||||
protected $mode;
|
private $mode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
|
@ -20,8 +20,8 @@ use Symfony\Component\Finder\Glob;
|
|||||||
*/
|
*/
|
||||||
class FilenameFilterIterator extends \FilterIterator
|
class FilenameFilterIterator extends \FilterIterator
|
||||||
{
|
{
|
||||||
protected $matchRegexps;
|
private $matchRegexps;
|
||||||
protected $noMatchRegexps;
|
private $noMatchRegexps;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
@ -81,7 +81,7 @@ class FilenameFilterIterator extends \FilterIterator
|
|||||||
return $match && !$exclude;
|
return $match && !$exclude;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function toRegex($str)
|
private function toRegex($str)
|
||||||
{
|
{
|
||||||
if (preg_match('/^([^a-zA-Z0-9\\\\]).+?\\1[ims]?$/', $str)) {
|
if (preg_match('/^([^a-zA-Z0-9\\\\]).+?\\1[ims]?$/', $str)) {
|
||||||
return $str;
|
return $str;
|
||||||
|
@ -18,7 +18,7 @@ namespace Symfony\Component\Finder\Iterator;
|
|||||||
*/
|
*/
|
||||||
class SizeRangeFilterIterator extends \FilterIterator
|
class SizeRangeFilterIterator extends \FilterIterator
|
||||||
{
|
{
|
||||||
protected $comparators = array();
|
private $comparators = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
|
@ -18,8 +18,8 @@ namespace Symfony\Component\Finder;
|
|||||||
*/
|
*/
|
||||||
class SplFileInfo extends \SplFileInfo
|
class SplFileInfo extends \SplFileInfo
|
||||||
{
|
{
|
||||||
protected $relativePath;
|
private $relativePath;
|
||||||
protected $relativePathname;
|
private $relativePathname;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
|
Reference in New Issue
Block a user