本文整理汇总了PHP中CSS::register_css_property方法的典型用法代码示例。如果您正苦于以下问题:PHP CSS::register_css_property方法的具体用法?PHP CSS::register_css_property怎么用?PHP CSS::register_css_property使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSS
的用法示例。
在下文中一共展示了CSS::register_css_property方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CSSCellPadding
<?php
// $Header: /cvsroot/html2ps/css.pseudo.cellpadding.inc.php,v 1.6 2006/09/07 18:38:14 Konstantin Exp $
class CSSCellPadding extends CSSPropertyHandler
{
function CSSCellPadding()
{
$this->CSSPropertyHandler(true, false);
}
function default_value()
{
return Value::fromData(1, UNIT_PX);
}
function parse($value)
{
return Value::fromString($value);
}
function getPropertyCode()
{
return CSS_HTML2PS_CELLPADDING;
}
function getPropertyName()
{
return '-html2ps-cellpadding';
}
}
CSS::register_css_property(new CSSCellPadding());
示例2: is_inline_element
{
$parent_display = $old_state[CSS_DISPLAY];
if ($parent_display === "table-row") {
$new_state[CSS_MIN_HEIGHT] = $old_state[CSS_MIN_HEIGHT];
return;
}
$new_state[CSS_MIN_HEIGHT] = is_inline_element($parent_display) ? $this->get($old_state) : $this->default_value();
}
function _getAutoValue()
{
return $this->default_value();
}
function default_value()
{
return $this->_defaultValue->copy();
}
function parse($value)
{
return ValueMinHeight::fromString($value);
}
function getPropertyCode()
{
return CSS_MIN_HEIGHT;
}
function getPropertyName()
{
return 'min-height';
}
}
CSS::register_css_property(new CSSMinHeight());
示例3: define
<?php
// $Header: /cvsroot/html2ps/css.direction.inc.php,v 1.7 2006/07/09 09:07:44 Konstantin Exp $
define('DIRECTION_LTR', 1);
define('DIRECTION_RTF', 1);
class CSSDirection extends CSSPropertyStringSet
{
function CSSDirection()
{
$this->CSSPropertyStringSet(true, true, array('lrt' => DIRECTION_LTR, 'rtl' => DIRECTION_RTF));
}
function default_value()
{
return DIRECTION_LTR;
}
function get_property_code()
{
return CSS_DIRECTION;
}
function get_property_name()
{
return 'direction';
}
}
CSS::register_css_property(new CSSDirection());
示例4: CSSLetterSpacing
function CSSLetterSpacing()
{
$this->CSSPropertyHandler(false, true);
$this->_default_value = Value::fromString("0");
}
function default_value()
{
return $this->_default_value;
}
function parse($value)
{
$value = trim($value);
if ($value === 'inherit') {
return CSS_PROPERTY_INHERIT;
}
if ($value === 'normal') {
return $this->_default_value;
}
return Value::fromString($value);
}
function getPropertyCode()
{
return CSS_LETTER_SPACING;
}
function getPropertyName()
{
return 'letter-spacing';
}
}
CSS::register_css_property(new CSSLetterSpacing());
示例5: define
<?php
// $Header: /cvsroot/html2ps/css.html2ps.pseudoelements.inc.php,v 1.1 2006/09/07 18:38:14 Konstantin Exp $
define('CSS_HTML2PS_PSEUDOELEMENTS_NONE', 0);
define('CSS_HTML2PS_PSEUDOELEMENTS_BEFORE', 1);
define('CSS_HTML2PS_PSEUDOELEMENTS_AFTER', 2);
class CSSHTML2PSPseudoelements extends CSSPropertyHandler
{
function CSSHTML2PSPseudoelements()
{
$this->CSSPropertyHandler(false, false);
}
function default_value()
{
return CSS_HTML2PS_PSEUDOELEMENTS_NONE;
}
function parse($value)
{
return $value;
}
function getPropertyCode()
{
return CSS_HTML2PS_PSEUDOELEMENTS;
}
function getPropertyName()
{
return '-html2ps-pseudoelements';
}
}
CSS::register_css_property(new CSSHTML2PSPseudoelements());
示例6: CSSColor
<?php
// $Header: /cvsroot/html2ps/css.color.inc.php,v 1.13 2007/01/24 18:55:51 Konstantin Exp $
class CSSColor extends CSSPropertyHandler
{
function CSSColor()
{
$this->CSSPropertyHandler(true, true);
}
function default_value()
{
return new Color(array(0, 0, 0), false);
}
function parse($value)
{
if ($value === 'inherit') {
return CSS_PROPERTY_INHERIT;
}
return parse_color_declaration($value);
}
function get_property_code()
{
return CSS_COLOR;
}
function get_property_name()
{
return 'color';
}
}
CSS::register_css_property(new CSSColor());
示例7: CSSBorder
if (preg_match("/\\b(thin|medium|thick|[+-]?\\d+(.\\d*)?(em|ex|px|in|cm|mm|pt|pc)?)\\b/i", $value)) {
return BORDER_VALUE_WIDTH;
}
if (preg_match("/\\b(none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset)\\b/", $value)) {
return BORDER_VALUE_STYLE;
}
return;
}
}
$border = new CSSBorder();
CSS::register_css_property($border);
CSS::register_css_property(new CSSBorderColor($border));
CSS::register_css_property(new CSSBorderWidth($border));
CSS::register_css_property(new CSSBorderStyle($border));
CSS::register_css_property(new CSSBorderTop($border, 'top'));
CSS::register_css_property(new CSSBorderRight($border, 'right'));
CSS::register_css_property(new CSSBorderBottom($border, 'bottom'));
CSS::register_css_property(new CSSBorderLeft($border, 'left'));
CSS::register_css_property(new CSSBorderLeftColor($border));
CSS::register_css_property(new CSSBorderTopColor($border));
CSS::register_css_property(new CSSBorderRightColor($border));
CSS::register_css_property(new CSSBorderBottomColor($border));
CSS::register_css_property(new CSSBorderLeftStyle($border));
CSS::register_css_property(new CSSBorderTopStyle($border));
CSS::register_css_property(new CSSBorderRightStyle($border));
CSS::register_css_property(new CSSBorderBottomStyle($border));
CSS::register_css_property(new CSSBorderLeftWidth($border));
CSS::register_css_property(new CSSBorderTopWidth($border));
CSS::register_css_property(new CSSBorderRightWidth($border));
CSS::register_css_property(new CSSBorderBottomWidth($border));
示例8: getPropertyName
}
function getPropertyName()
{
return 'margin-left';
}
}
class CSSMarginBottom extends CSSSubFieldProperty
{
function parse($value)
{
if ($value === 'inherit') {
return CSS_PROPERTY_INHERIT;
}
return MarginSideValue::init($value);
}
function getPropertyCode()
{
return CSS_MARGIN_BOTTOM;
}
function getPropertyName()
{
return 'margin-bottom';
}
}
$mh = new CSSMargin();
CSS::register_css_property($mh);
CSS::register_css_property(new CSSMarginLeft($mh, 'left'));
CSS::register_css_property(new CSSMarginRight($mh, 'right'));
CSS::register_css_property(new CSSMarginTop($mh, 'top'));
CSS::register_css_property(new CSSMarginBottom($mh, 'bottom'));
示例9: CSSBottom
*/
class CSSBottom extends CSSPropertyHandler
{
function CSSBottom()
{
$this->CSSPropertyHandler(false, false);
$this->_autoValue = ValueBottom::fromString('auto');
}
function _getAutoValue()
{
return $this->_autoValue->copy();
}
function default_value()
{
return $this->_getAutoValue();
}
function getPropertyCode()
{
return CSS_BOTTOM;
}
function getPropertyName()
{
return 'bottom';
}
function parse($value)
{
return ValueBottom::fromString($value);
}
}
CSS::register_css_property(new CSSBottom());
示例10: CSSTextIndent
{
function CSSTextIndent()
{
$this->CSSPropertyHandler(true, true);
}
function default_value()
{
return new TextIndentValuePDF(array(0, false));
}
function parse($value)
{
if ($value === 'inherit') {
return CSS_PROPERTY_INHERIT;
}
if (is_percentage($value)) {
return new TextIndentValuePDF(array((int) $value, true));
} else {
return new TextIndentValuePDF(array($value, false));
}
}
function getPropertyCode()
{
return CSS_TEXT_INDENT;
}
function getPropertyName()
{
return 'text-indent';
}
}
CSS::register_css_property(new CSSTextIndent());
示例11: define
<?php
// $Header: /cvsroot/html2ps/css.float.inc.php,v 1.7 2006/07/09 09:07:44 Konstantin Exp $
define('FLOAT_NONE', 0);
define('FLOAT_LEFT', 1);
define('FLOAT_RIGHT', 2);
class CSSFloat extends CSSPropertyStringSet
{
function CSSFloat()
{
$this->CSSPropertyStringSet(false, false, array('left' => FLOAT_LEFT, 'right' => FLOAT_RIGHT, 'none' => FLOAT_NONE));
}
function default_value()
{
return FLOAT_NONE;
}
function get_property_code()
{
return CSS_FLOAT;
}
function get_property_name()
{
return 'float';
}
}
CSS::register_css_property(new CSSFloat());
示例12: default_value
}
function default_value()
{
return TA_LEFT;
}
function value2pdf($value)
{
switch ($value) {
case TA_LEFT:
return "ta_left";
case TA_RIGHT:
return "ta_right";
case TA_CENTER:
return "ta_center";
case TA_JUSTIFY:
return "ta_justify";
default:
return "ta_left";
}
}
function get_property_code()
{
return CSS_TEXT_ALIGN;
}
function get_property_name()
{
return 'text-align';
}
}
CSS::register_css_property(new CSSTextAlign());
示例13: CSSZIndex
<?php
class CSSZIndex extends CSSPropertyHandler
{
function CSSZIndex()
{
$this->CSSPropertyHandler(false, false);
}
function default_value()
{
return 0;
}
function parse($value)
{
if ($value === 'inherit') {
return CSS_PROPERTY_INHERIT;
}
return (int) $value;
}
function get_property_code()
{
return CSS_Z_INDEX;
}
function get_property_name()
{
return 'z-index';
}
}
CSS::register_css_property(new CSSZIndex());
示例14: CSSWordSpacing
function CSSWordSpacing()
{
$this->CSSPropertyHandler(false, true);
$this->_default_value = Value::fromString("0");
}
function default_value()
{
return $this->_default_value;
}
function parse($value)
{
$value = trim($value);
if ($value === 'inherit') {
return CSS_PROPERTY_INHERIT;
}
if ($value === 'normal') {
return $this->_default_value;
}
return Value::fromString($value);
}
function getPropertyCode()
{
return CSS_WORD_SPACING;
}
function getPropertyName()
{
return 'word-spacing';
}
}
CSS::register_css_property(new CSSWordSpacing());
示例15: CSSPage
<?php
// $Header: /cvsroot/html2ps/css.color.inc.php,v 1.13 2007/01/24 18:55:51 Konstantin Exp $
class CSSPage extends CSSPropertyHandler
{
function CSSPage()
{
$this->CSSPropertyHandler(true, true);
}
function default_value()
{
return 'auto';
}
function parse($value)
{
return $value;
}
function getPropertyCode()
{
return CSS_PAGE;
}
function getPropertyName()
{
return 'page';
}
}
CSS::register_css_property(new CSSPage());