[Finder] moved most protected methods and properties to private

This commit is contained in:
Fabien Potencier 2011-03-08 20:54:22 +01:00
parent 75b29ffdfe
commit c9b965dbee
11 changed files with 29 additions and 29 deletions

View File

@ -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.

View File

@ -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.

View File

@ -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;

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -18,7 +18,7 @@ namespace Symfony\Component\Finder\Iterator;
*/ */
class ExcludeDirectoryFilterIterator extends \FilterIterator class ExcludeDirectoryFilterIterator extends \FilterIterator
{ {
protected $patterns; private $patterns;
/** /**
* Constructor. * Constructor.

View File

@ -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.

View File

@ -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;

View File

@ -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.

View File

@ -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