autoloader
[ class tree: autoloader ] [ index: autoloader ] [ all elements ]

Class: AutoloaderFileParser

Source Location: /classes/parser/AutoloaderFileParser.php

Class Overview


A Parser for Class definition


Author(s):

Version:

  • 1.0

Copyright:

  • Copyright (C) 2010 Markus Malkusch

Methods


Child classes:

AutoloaderFileParser_RegExp
Implementation using a regulare expression.
AutoloaderFileParser_Tokenizer
Reliable implementation using PHP's tokenizer.

Class Details

[line 46]
A Parser for Class definition

An implementation of this class should be able to parse a file and find a class definition.




Tags:

author:  Markus Malkusch <markus@malkusch.de>
version:  1.0
copyright:  Copyright (C) 2010 Markus Malkusch
abstract:  


[ Top ]


Class Methods


static method getInstance [line 67]

static AutoloaderFileParser getInstance( )



Tags:

return:  AutoloaderFileParser_Tokenizer if suported else AutoloaderFileParser_RegExp
see:  AutoloaderFileParser_Tokenizer
see:  AutoloaderFileParser_RegExp
access:  public


[ Top ]

static method isSupported [line 59]

static bool isSupported( )



Tags:

return:  True if this implementation is supported by the current PHP environment
abstract:  
access:  public


Overridden in child classes as:

AutoloaderFileParser_RegExp::isSupported()
AutoloaderFileParser_Tokenizer::isSupported()

[ Top ]

method isClassInFile [line 85]

bool isClassInFile( String $class, String $file)



Tags:

return:  True if the class $class was found in the file $file.
throws:  AutoloaderException_Parser
throws:  AutoloaderException_Parser_IO
access:  public


Parameters:

String   $class  
String   $file  

[ Top ]

method isClassInSource [line 55]

bool isClassInSource( String $class, String $source)



Tags:

return:  True if the class $class was found in the source $source.
abstract:  
throws:  AutoloaderException_Parser
access:  public


Overridden in child classes as:

AutoloaderFileParser_RegExp::isClassInSource()
AutoloaderFileParser_Tokenizer::isClassInSource()

Parameters:

String   $class  
String   $source   The source as a string. This is the content of a file.

[ Top ]


Documentation generated on Fri, 27 Nov 2009 11:36:33 +0100 by phpDocumentor 1.4.3