private function parse_format($format) {

		$format = strtoupper($format);
		$format = str_replace('?', '*', $format);
		$parts  = explode(' ', $format);
		$count  = count($parts);

		if($count < 5 or $count > 6) throw new \InvalidArgumentException('Invalid Cron Format expression provided');

		return array(
			'minute' => new Field_Minute($parts[0]),
			'hour'   => new Field_Hour($parts[1]),
			'dom'    => new Field_DayOfMonth($parts[2]),
			'month'  => new Field_Month($parts[3]),
			'dow'    => new Field_DayOfWeek($parts[4]),
			'year'   => new Field_Year($count === 6 ? $parts[5] : '*'),
		);

	}
private function parse_format($format) {

		$format = strtoupper($format);
		$format = str_replace('?', '*', $format);
		$parts  = explode(' ', $format);
		$count  = count($parts);

		if($count < 5 or $count > 6) throw new \InvalidArgumentException('Invalid Cron Format expression provided');

		return array(
			'minute' => new Field_Minute($parts[0]),
			'hour'   => new Field_Hour($parts[1]),
			'dom'    => new Field_DayOfMonth($parts[2]),
			'month'  => new Field_Month($parts[3]),
			'dow'    => new Field_DayOfWeek($parts[4]),
			'year'   => new Field_Year($count === 6 ? $parts[5] : '*'),
		);

	}
private function parse_format ( $ format ) { $ format = strtoupper ( $ format ) ; $ format = str_replace ( '?' , '*' , $ format ) ; $ parts = explode ( ' ' , $ format ) ; $ count = count ( $ parts ) ; if ( $ count < 5 or $ count > 6 ) throw new \ InvalidArgumentException ( 'Invalid Cron Format expression provided' ) ; return array ( 'minute' => new Field_Minute ( $ parts [ 0 ] ) , 'hour' => new Field_Hour ( $ parts [ 1 ] ) , 'dom' => new Field_DayOfMonth ( $ parts [ 2 ] ) , 'month' => new Field_Month ( $ parts [ 3 ] ) , 'dow' => new Field_DayOfWeek ( $ parts [ 4 ] ) , 'year' => new Field_Year ( $ count === 6 ? $ parts [ 5 ] : '*' ) , ) ; }
Given an input format, break it down into Fields

@param string Input format
@return array Field elements
@author Luke Lanchester
Given an input format break it down into Fields