<fields name="headertop" type="position" label="HEADERTOP_POS" description="LAYOUT_POS_DESC">
<field name="layout" type="positions" default="3,3,3,3" label="">
<schemas>1,2,3,4,5,6</schemas>
<words>2,3,4,5,6,7,8,9,10</words>
</field>
<field name="showall" type="toggle" default="0" label="FORCE_POS"/>
<field name="showmax" type="showmax" default="6" label="POS_COUNT"/>
</fields>
<fields name="header" type="position" label="HEADER_POS" description="LAYOUT_POS_DESC">
<field name="layout" type="positions" default="3,3,3,3" label="">
<schemas>1,2,3,4,5,6</schemas>
<words>2,3,4,5,6,7,8,9,10</words>
</field>
<field name="showall" type="toggle" default="0" label="FORCE_POS"/>
<field name="showmax" type="showmax" default="6" label="POS_COUNT"/>
</fields>
<fields name="headerbottom" type="position" label="HEADERBOTTOM_POS" description="LAYOUT_POS_DESC">
<field name="layout" type="positions" default="3,3,3,3" label="">
<schemas>1,2,3,4,5,6</schemas>
<words>2,3,4,5,6,7,8,9,10</words>
</field>
<field name="showall" type="toggle" default="0" label="FORCE_POS"/>
<field name="showmax" type="showmax" default="6" label="POS_COUNT"/>
</fields>
<fields name="maintop" type="position" label="MAINTOP_POS" description="LAYOUT_POS_DESC">
<field name="layout" type="positions" default="3,3,3,3" label="">
<schemas>1,2,3,4,5,6</schemas>
<words>2,3,4,5,6,7,8,9,10</words>
</field>
<field name="showall" type="toggle" default="0" label="FORCE_POS"/>
<field name="showmax" type="showmax" default="6" label="POS_COUNT"/>
</fields>
<field name="mainbodyPosition" type="positions" default="6,3,3" label="MAINBODY_POS" description="LAYOUT_POS_DESC">
<schemas>1,2,3,4</schemas>
<words>sa,sb,sc,mb</words>
<type>custom</type>
</field>
<fields name="mainbottom" type="position" label="MAINBOTTOM_POS" description="LAYOUT_POS_DESC">
<field name="layout" type="positions" default="3,3,3,3" label="">
<schemas>1,2,3,4,5,6</schemas>
<words>2,3,4,5,6,7,8,9,10</words>
</field>
<field name="showall" type="toggle" default="0" label="FORCE_POS"/>
<field name="showmax" type="showmax" default="6" label="POS_COUNT"/>
</fields>
/**
* @param $position
* @param $pattern
*
* @return array
*/
public function parsePosition($position, $pattern)
{
$filtered_positions = array();
if (count($this->positions) > 0) {
if (!array_key_exists($position, $this->cached_possitions)) {
if (null == $pattern) {
$pattern = "(-)?";
}
$regpat = "/^" . $position . $pattern . "/";
foreach ($this->positions as $key => $value) {
if (preg_match($regpat, $value) == 1) {
$filtered_positions[] = $value;
}
}
$this->cached_possitions[$position] = $filtered_positions;
}
} else {
return $filtered_positions;
}
return $this->cached_possitions[$position];
}
/**
* @param $position
* @param $pattern
*
* @return array
*/
public function parsePosition($position, $pattern)
{
$filtered_positions = array();
if (count($this->positions) > 0) {
if (!array_key_exists($position, $this->cached_possitions)) {
if (null == $pattern) {
$pattern = "(-)?[a-f]?";
}
$regpat = "/^" . $position . $pattern . "$/";
foreach ($this->positions as $key => $value) {
if (preg_match($regpat, $value) == 1) {
$filtered_positions[] = $value;
}
}
$this->cached_possitions[$position] = $filtered_positions;
}
} else {
return $filtered_positions;
}
return $this->cached_possitions[$position];
}
$regpat = "/^" . $position . $pattern . "$/";
The following users have thanked you: Lahmizzar V
Time to create page: 0.056 seconds