protected function expand_format_expression($format) {

		$increment = 1;

		if(strpos($format, '/') !== false) {
			list($format, $increment) = explode('/', $format, 2);
			$increment = ($increment === '*') ? 1 : (int) $increment;
		}

		$parts = explode('-', $format, 2);

		$start = array_shift($parts);
		$end = array_shift($parts);

		if($start === '*') $start = $this->min;
		if($end === null) $end = $this->max;

		$start = max($this->min, $start);
		$end = min($this->max, $end);

		if( ($end - $start) < $increment) return array($start);
		return range($start, $end, $increment);

	}
protected function expand_format_expression($format) {

		$increment = 1;

		if(strpos($format, '/') !== false) {
			list($format, $increment) = explode('/', $format, 2);
			$increment = ($increment === '*') ? 1 : (int) $increment;
		}

		$parts = explode('-', $format, 2);

		$start = array_shift($parts);
		$end = array_shift($parts);

		if($start === '*') $start = $this->min;
		if($end === null) $end = $this->max;

		$start = max($this->min, $start);
		$end = min($this->max, $end);

		if( ($end - $start) < $increment) return array($start);
		return range($start, $end, $increment);

	}
protected function expand_format_expression ( $ format ) { $ increment = 1 ; if ( strpos ( $ format , '/' ) !== false ) { list ( $ format , $ increment ) = explode ( '/' , $ format , 2 ) ; $ increment = ( $ increment === '*' ) ? 1 : ( int ) $ increment ; } $ parts = explode ( '-' , $ format , 2 ) ; $ start = array_shift ( $ parts ) ; $ end = array_shift ( $ parts ) ; if ( $ start === '*' ) $ start = $ this -> min ; if ( $ end === null ) $ end = $ this -> max ; $ start = max ( $ this -> min , $ start ) ; $ end = min ( $ this -> max , $ end ) ; if ( ( $ end - $ start ) < $ increment ) return array ( $ start ) ; return range ( $ start , $ end , $ increment ) ; }
Expand sub-list within a format

@param string Format
@return array Accepted values
@author Luke Lanchester
Expand sub - list within a format