PHP 클래스 Webgrind_Reader, webgrind

저자: Jacob Oettinger
파일 보기 프로젝트 열기: jokkedk/webgrind

공개 메소드들

메소드 설명
__construct ( $dataFile, $costFormat ) Constructor
formatCost ( integer $cost, string $format = null ) : integer Formats $cost using the format in $this->costFormat or optionally the format given as input
getCalledFromInfo ( $functionNr, $calledFromNr ) : array Returns information about positions where a function has been called from
getFunctionCount ( ) : integer Returns number of functions
getFunctionInfo ( $nr ) : array Returns information about function with nr $nr
getHeader ( $header ) : string Returns value of a single header
getSubCallInfo ( $functionNr, $subCallNr ) : array Returns information about functions called by a function

비공개 메소드들

메소드 설명
init ( ) : void Initializes the parser by reading initial information.
read ( $numbers = 1 )
readLine ( )
seek ( $offset, $whence = SEEK_SET )

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( $dataFile, $costFormat )

formatCost() 공개 메소드

Formats $cost using the format in $this->costFormat or optionally the format given as input
public formatCost ( integer $cost, string $format = null ) : integer
$cost integer Cost
$format string 'percent', 'msec' or 'usec'
리턴 integer Formatted cost

getCalledFromInfo() 공개 메소드

Returns information about positions where a function has been called from
public getCalledFromInfo ( $functionNr, $calledFromNr ) : array
$functionNr int Function number
$calledFromNr int Called from position nr
리턴 array Called from information

getFunctionCount() 공개 메소드

Returns number of functions
public getFunctionCount ( ) : integer
리턴 integer

getFunctionInfo() 공개 메소드

Returns information about function with nr $nr
public getFunctionInfo ( $nr ) : array
$nr int Function number
리턴 array Function information

getHeader() 공개 메소드

Returns value of a single header
public getHeader ( $header ) : string
리턴 string Header value

getSubCallInfo() 공개 메소드

Returns information about functions called by a function
public getSubCallInfo ( $functionNr, $subCallNr ) : array
$functionNr int Function number
$subCallNr int Sub call position nr
리턴 array Sub call information