html
[
class tree: html
] [
index: html
] [
all elements
]
changelog
install
readme
Todo List
Packages:
core
communication
databases
data_structures
filesystem
forms
GilliGan
html
Services_JSON
Source for file HTMLSpan.class.php
Documentation is available at
HTMLSpan.class.php
<?php
/**
* For including this file you have to define the constant "CLASSPATH".
* Because every include in the framework depends on the CLASSPATH definition.
* The CLASSPATH means the relative path to the folder that contains the
* framework GilliGan.
*
*
@package
html
*/
if
(
!
defined
(
"CLASSPATH"
) )
{
echo
"<h3>You have to define the constant CLASSPATH!</h3>\n"
;
echo
"Example: define( 'CLASSPATH', '../path/to/classes/' );\n"
;
exit
(
)
;
}
/**
* Including the basic class.
*/
require_once
(
CLASSPATH
.
"html/HTMLLayer.class.php"
)
;
/**
* A class to generate "<div>"-Layer.
*
*
@package
html
*
@version
0.2.1
*
@author
Daniel Plücken <daniel@debakel.net>
*
@license
http://www.gnu.org/copyleft/lesser.html
* GNU Lesser General Public License
*
@copyright
Copyright (c) 2004 Daniel Plücken <daniel@debakel.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License.
*
* This library 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
* Public License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA
*/
class
HTMLSpan
extends
HTMLLayer
{
/**
* Constructor.
*
*
@version
1.1
*
@since
0.1.0
*
@author
Daniel Plücken <daniel@debakel.net>
*
@access
public
*
@param
$name
The value of the name- and id-attribute of this layer.
*
@return
void
*/
function
HTMLSpan
(
$name
=
""
)
{
$this
->
name
=
$name
;
$this
->
id
=
$name
;
}
/**
* Returns a generated string based on the attributes of this HTML-Object.
*
*
@version
1.5
*
@since
0.1.0
*
@author
Daniel Plücken <daniel@debakel.net>
*
@access
public
*
@return
string
*/
function
get
(
)
{
$this
->
idExists
(
$this
->
id
,
true
)
;
$newline
=
$this
->
no_format
?
""
:
"\r\n"
;
$outputstr
=
"<!--\r\n"
.
"--><span id=\""
.
$this
->
id
.
"\"\r\n"
.
" style=\"z-index:"
.
$this
->
z_index
.
";"
.
"visibility:"
.
$this
->
visible
.
";"
.
(
!
empty
(
$this
->
bgcolor
)
?
"background-color:"
.
$this
->
bgcolor
.
";"
:
""
)
.
(
!
empty
(
$this
->
position
)
?
"position:"
.
$this
->
position
.
";"
:
""
)
.
(
preg_match
(
"!\d+!"
,
$this
->
top
)
?
"top:"
.
$this
->
top
.
(
strpos
(
$this
->
top
,
"%"
)
?
";"
:
"px;"
)
:
""
)
.
(
preg_match
(
"!\d+!"
,
$this
->
left
)
?
"left:"
.
$this
->
left
.
(
strpos
(
$this
->
left
,
"%"
)
?
";"
:
"px;"
)
:
""
)
.
(
preg_match
(
"!\d+!"
,
$this
->
width
)
?
"width:"
.
$this
->
width
.
(
strpos
(
$this
->
width
,
"%"
)
?
";"
:
"px;"
)
:
""
)
.
(
preg_match
(
"!\d+!"
,
$this
->
height
)
?
"height:"
.
$this
->
height
.
(
strpos
(
$this
->
height
,
"%"
)
?
";"
:
"px;"
)
:
""
)
.
(
!
empty
(
$this
->
freestyle
)
?
$this
->
freestyle
:
""
)
.
"\"\r\n"
.
(
!
empty
(
$this
->
name
)
?
" name=\""
.
$this
->
name
.
"\"\r\n"
:
""
)
.
(
!
empty
(
$this
->
style_class
)
?
" class=\""
.
$this
->
style_class
.
"\"\r\n"
:
""
)
.
(
!
empty
(
$this
->
mouseup
)
?
" onMouseup=\""
.
$this
->
mouseup
.
"\"\r\n"
:
""
)
.
(
!
empty
(
$this
->
mouseout
)
?
" onMouseout=\""
.
$this
->
mouseout
.
"\"\r\n"
:
""
)
.
(
!
empty
(
$this
->
mouseover
)
?
" onMouseover=\""
.
$this
->
mouseover
.
"\"\r\n"
:
""
)
.
(
!
empty
(
$this
->
mousemove
)
?
" onMousemove=\""
.
$this
->
mousemove
.
"\"\r\n"
:
""
)
.
(
!
empty
(
$this
->
other_attributes
)
?
" "
.
$this
->
other_attributes
.
"\r\n"
:
""
)
.
" >"
;
$outputstr
.=
$this
->
body
;
$outputstr
.=
"<!--\r\n"
.
"--></span>"
;
return
$outputstr
;
}
}
// END of class HTMLSpan
?>
Documentation generated on Thu, 05 Jun 2008 19:13:06 +0200 by
phpDocumentor 1.4.1