Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1081158
CodeFolderFilterIterator.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Aug 3, 7:12 AM
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Aug 5, 7:12 AM (7 h, 2 m)
Engine
blob
Format
Raw Data
Handle
701734
Attached To
rINP In-Portal
CodeFolderFilterIterator.php
View Options
<?php
/**
* @version $Id: CodeFolderFilterIterator.php 16252 2015-09-27 06:34:45Z alex $
* @package In-Portal
* @copyright Copyright (C) 1997 - 2015 Intechnic. All rights reserved.
* @license GNU/GPL
* In-Portal is Open Source software.
* This means that this software may have been modified pursuant
* the GNU General Public License, and as distributed it includes
* or is derivative of works licensed under the GNU General Public License
* or other free or open source software licenses.
* See http://www.in-portal.org/license for copyright notices and details.
*/
namespace
InPortal\Core\kernel\utility\ClassDiscovery
;
defined
(
'FULL_PATH'
)
or
die
(
'restricted access!'
);
class
CodeFolderFilterIterator
extends
\RecursiveFilterIterator
{
/**
* Folders, that should be ignored.
*
* @var array
*/
public
$skipFolders
=
array
(
'CVS'
,
'.svn'
,
'.git'
,
'admin_templates'
,
'libchart'
,
);
/**
* Creates iterator instance.
*
* @param \RecursiveDirectoryIterator $directory_iterator Directory iterator.
*/
public
function
__construct
(
\RecursiveDirectoryIterator
$directory_iterator
)
{
parent
::
__construct
(
$directory_iterator
);
$this
->
skipFolders
[]
=
basename
(
EDITOR_PATH
);
}
/**
* Accepts only folders with valid names.
*
* @return boolean
*/
public
function
accept
()
{
return
!
in_array
(
$this
->
current
()->
getFilename
(),
$this
->
skipFolders
,
true
);
}
}
Event Timeline
Log In to Comment