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 ABSTDimensionObject.class.php
Documentation is available at
ABSTDimensionObject.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 of all HTML-tags.
*/
require_once
CLASSPATH
.
"html/ABSTHTMLTag.class.php"
;
/**
* Constants of regular expression.
*/
require_once
CLASSPATH
.
"RegExpConstants.inc.php"
;
/**
*
@package
html
*
*
@version
0.1.0
*
@since
0.9.1.5
*
@author
Daniel Plücken <daniel@debakel.net>
*
@license
http://www.gnu.org/copyleft/lesser.html
* GNU Lesser General Public License
*
@copyright
Copyright (C) 2006 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
ABSTDimensionObject
extends
ABSTHTMLTag
{
/**
* Stores the value of the width-attribute of this dimension Object.
*
*
@var
integer
$width
* access public
*/
var
$width
;
/**
* Stores the value of the height-attribute of this image.
*
*
@var
integer
$height
* access public
*/
var
$height
;
/**
* The Constructor let the script die, cause this is an abstract class!
*
*
@version
1.0
*
@since
0.1.0
*
@author
Daniel Plücken <daniel@debakel.net>
*
@access
public
*
@return
void
*/
function
ABSTDimensionObject
(
)
{
die
(
"ABSTDimensionObject is an abstract class. "
.
"You cannot create an instance of it."
)
;
}
/**
* Sets the width-attribute of this object.
*
*
@version
1.1
*
@since
0.1.0
*
@author
Daniel Plücken <daniel@debakel.net>
*
@access
public
*
@param
integer
$int
*
@return
void
*/
function
setWidth
(
$int
=
0
)
{
if
(
empty
(
$int
) )
$int
=
0
;
if
(
preg_match
(
"!^"
.
UNSIGNEDINTEGER
.
"%?$!"
,
$int
) )
$this
->
width
=
$int
;
else
if
(
!
empty
(
$int
) )
die
(
"The value \""
.
$int
.
"\" is not valid value for a width.<br>"
.
"The value has to be a number!"
)
;
}
/**
* Sets the height-attribute of this object.
*
*
@version
1.1
*
@since
0.1.0
*
@author
Daniel Plücken <daniel@debakel.net>
*
@access
public
*
@param
integer
$int
*
@return
void
*/
function
setHeight
(
$int
=
0
)
{
if
(
empty
(
$int
) )
$int
=
0
;
if
(
preg_match
(
"!^"
.
UNSIGNEDINTEGER
.
"%?$!"
,
$int
) )
$this
->
height
=
$int
;
else
die
(
"The value \""
.
$int
.
"\" is not valid value for a height.<br>"
.
"The value has to be a number!"
)
;
}
}
// End of class ABSTDimensionObject
?>
Documentation generated on Thu, 05 Jun 2008 19:09:44 +0200 by
phpDocumentor 1.4.1