Gumbo PHP Library API Documentation
Debug
[
class tree
] [
index
] [
all elements
]
Todo List
Packages:
Buffer
Collection
Composite
Config
Converter
Curl
Date
DB
Debug
Encryption
Error
Factory
Filter
Flyweight
Http
Input
Iterator
List
Load
Lockable
Log
Map
Number
Observer
Output
Query
Record
Router
Session
Setting
Singleton
Template
Timer
Utility
Valid
Source for file Class.class.php
Documentation is available at
Class.class.php
<?php
/**
* Gumbo Library Framework
*
* LICENSE
* This library is being released under the terms of the New BSD License. A
* copy of the license is packaged with the software (LICENSE.txt). If no
* copy is found, a copy of the license template can be found at:
* http://www.opensource.org/licenses/bsd-license.php
*
*
@category
Gumbo
*
@package
Debug
*
@copyright
Copyright (c) 2007, iBayou, Michael Luster
*
@license
http://www.opensource.org/licenses/bsd-license.php New BSD License
*
@author
Michael Luster <mluster79@yahoo.com>
*
@link
http://sourceforge.net/projects/phpgumbo
*
@version
0.0.1
*/
/**
* Debug Server Report - Class
*
*
@category
Gumbo
*
@package
Debug
*
@copyright
Copyright (c) 2007, iBayou, Michael Luster
*
@license
http://www.opensource.org/licenses/bsd-license.php New BSD License
*
@author
Michael Luster <mluster79@yahoo.com>
*
@link
http://sourceforge.net/projects/phpgumbo
*
@desc
Debug Server Report - Class
*
@version
0.0.1
*/
gumbo_load
(
"Interface_Debug_Server_Report"
)
;
class
Gumbo_Debug_Server_Class
implements
Gumbo_Interface_Debug_Server_Report
{
/**
@var
bool
$_php
include default PHP Classes */
private
$_php
=
false
;
/**
* Constructor
*
@param
bool
$php
include default PHP Classes
*/
public
function
__construct
(
$php
=
null
)
{
if
(
!
is_null
(
$php
))
{
$this
->
setPhp
(
$php
)
;
}
}
/** ACTION METHODS **/
/**
* Runs the Report
*
@return
string
*/
public
function
run
(
)
{
$txt
=
"<div class=\"debug\">\n"
;
$txt
.=
"\t<ul>Declared Classes\n"
;
$restrict
=
$this
->
getPhp
(
)
;
foreach
(
get_declared_classes
(
)
as
$val
)
{
if
(
$restrict
&&
$val
!=
"Gumbo_Exception"
)
{
continue
;
}
$txt
.=
"
\t\t<
li
>{
$val
}
</
li
>\n
"
;
$restrict
=
false
;
}
$txt
.=
"\t</ul>\n"
;
return
$txt
;
}
/** MUTATOR METHODS **/
/**
* Sets if to include default PHP Classes
*
@param
bool
$php
*
@throws
Gumbo_Exception
*/
public
function
setPhp
(
$php
)
{
try
{
// verify precondition
if
(
!
is_bool
(
$php
))
{
throw
new
Gumbo_Exception
(
"
Invalid
Argument
'
php
:
bool
' => {
$php
}
:
"
.
gettype
(
$php
))
;
}
$this
->
_php
=
$php
;
}
catch
(
Gumbo_Exception
$e
)
{
$e
->
setFunction
(
__METHOD__
)
;
gumbo_trigger
(
$e
)
;
}
}
/** ACCESSOR METHODS **/
/**
* Returns if to include default PHP Classes
*
@return
bool
*/
public
function
getPhp
(
)
{
return
$this
->
_php
;
}
}
?>