API - XOOPS 2.5.11 Beta 2
By monxoops.fr
Coordinate Class Reference

Static Public Member Functions

static parse ($c)
 
static evaluate ($coord, $dim, $sec_dim=null)
 
static fix ($value, $dim, $sec_dim=null)
 

Static Protected Attributes

static $coord_align = array('left', 'center', 'right', 'top', 'middle', 'bottom')
 
static $coord_numeric = array('[0-9]+', '[0-9]+\.[0-9]+', '[0-9]+%', '[0-9]+\.[0-9]+%')
 

Member Function Documentation

◆ evaluate()

static evaluate (   $coord,
  $dim,
  $sec_dim = null 
)
static

Evaluates the $coord relatively to $dim

Parameters
string$coordA numeric value or percent string
int$dimDimension
int$sec_dimSecondary dimension (for align)
Returns
int Calculated value

◆ fix()

static fix (   $value,
  $dim,
  $sec_dim = null 
)
static

Calculates and fixes a smart coordinate into a numeric value

Parameters
mixed$valueSmart coordinate, relative to $dim
int$dimCoordinate to which $value is relative
int$sec_dimSecondary dimension (for align)
Returns
int Calculated value
Here is the caller graph for this function:

◆ parse()

static parse (   $c)
static

Parses a numeric or string representation of a corrdinate into a structure

Parameters
string$coordSmart coordinate
Returns
array Parsed smart coordinate

Field Documentation

◆ $coord_align

$coord_align = array('left', 'center', 'right', 'top', 'middle', 'bottom')
staticprotected

◆ $coord_numeric

$coord_numeric = array('[0-9]+', '[0-9]+\.[0-9]+', '[0-9]+%', '[0-9]+\.[0-9]+%')
staticprotected

The documentation for this class was generated from the following file: