MediaWiki REL1_35
ClassCollector.php File Reference

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. More...

Go to the source code of this file.

Classes

class  ClassCollector
 Reads PHP code and returns the FQCN of every class defined within it. More...
 

Functions

 implodeTokens ()
 Returns the string representation of the tokens within the current expect sequence and resets the sequence.
 
static stripQuotes ( $str)
 Decode a quoted PHP string, interpreting escape sequences, like eval($str).
 

Detailed Description

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html

Definition in file ClassCollector.php.

Function Documentation

◆ implodeTokens()

implodeTokens ( )
protected

Returns the string representation of the tokens within the current expect sequence and resets the sequence.

Returns
string

Definition at line 234 of file ClassCollector.php.

References $content.

Referenced by ClassCollector\tryEndExpect().

◆ stripQuotes()

static stripQuotes (   $str)
staticprivate

Decode a quoted PHP string, interpreting escape sequences, like eval($str).

The implementation is half-baked, but the character set allowed in class names is pretty small. This could be replaced by a call to a fully-baked utility function.

Parameters
string$str
Returns
string

Definition at line 224 of file ClassCollector.php.

Referenced by ClassCollector\tryEndExpect().