private function allHours()
	{
		$index = 1;
		$same = false;
		$hours = array();
		while(!$same)
		{
			# Get the page
			$this->uri->addParam('index', $index);
			$request = $this->client->get($this->uri);
			$resource = $request->getResource();
			if(!$resource->code(200))
			{
				return array('error' => 'fail to call Stac website');
			}
			$page = $resource->getContent();
			
			# Get page array representation
			$array = $this->parser($page);
			if(isset($previousArray))
			{
				# End condition when same page is called
				$compareId = 0;
				do
				{
					$comparePrevious = $previousArray[$compareId]['hours'][0];
					$compareCurrent = $array[$compareId]['hours'][0];
					$compareId++;
				}
				while($comparePrevious === '-');
				
				if($comparePrevious === $compareCurrent)
				{
					$same = true;
				}
				else
				{
					# Add new array informations
					$previousArray = $array;
					foreach($array as $pKey => $place)
					{
						foreach($place['hours'] as $hour){
							$hours[$pKey]['hours'][] = $hour;
						}
					}
				}
			}
			else
			{
				# First save of informations
				$previousArray = $array;
				$hours = $array;
			}
			$index+=6;
		}
		return $hours;
	}
private function allHours()
	{
		$index = 1;
		$same = false;
		$hours = array();
		while(!$same)
		{
			# Get the page
			$this->uri->addParam('index', $index);
			$request = $this->client->get($this->uri);
			$resource = $request->getResource();
			if(!$resource->code(200))
			{
				return array('error' => 'fail to call Stac website');
			}
			$page = $resource->getContent();
			
			# Get page array representation
			$array = $this->parser($page);
			if(isset($previousArray))
			{
				# End condition when same page is called
				$compareId = 0;
				do
				{
					$comparePrevious = $previousArray[$compareId]['hours'][0];
					$compareCurrent = $array[$compareId]['hours'][0];
					$compareId++;
				}
				while($comparePrevious === '-');
				
				if($comparePrevious === $compareCurrent)
				{
					$same = true;
				}
				else
				{
					# Add new array informations
					$previousArray = $array;
					foreach($array as $pKey => $place)
					{
						foreach($place['hours'] as $hour){
							$hours[$pKey]['hours'][] = $hour;
						}
					}
				}
			}
			else
			{
				# First save of informations
				$previousArray = $array;
				$hours = $array;
			}
			$index+=6;
		}
		return $hours;
	}
private function allHours ( ) { $ index = 1 ; $ same = false ; $ hours = array ( ) ; while ( ! $ same ) { # Get the page $ this -> uri -> addParam ( 'index' , $ index ) ; $ request = $ this -> client -> get ( $ this -> uri ) ; $ resource = $ request -> getResource ( ) ; if ( ! $ resource -> code ( 200 ) ) { return array ( 'error' => 'fail to call Stac website' ) ; } $ page = $ resource -> getContent ( ) ; # Get page array representation $ array = $ this -> parser ( $ page ) ; if ( isset ( $ previousArray ) ) { # End condition when same page is called $ compareId = 0 ; do { $ comparePrevious = $ previousArray [ $ compareId ] [ 'hours' ] [ 0 ] ; $ compareCurrent = $ array [ $ compareId ] [ 'hours' ] [ 0 ] ; $ compareId ++ ; } while ( $ comparePrevious === '-' ) ; if ( $ comparePrevious === $ compareCurrent ) { $ same = true ; } else { # Add new array informations $ previousArray = $ array ; foreach ( $ array as $ pKey => $ place ) { foreach ( $ place [ 'hours' ] as $ hour ) { $ hours [ $ pKey ] [ 'hours' ] [ ] = $ hour ; } } } } else { # First save of informations $ previousArray = $ array ; $ hours = $ array ; } $ index += 6 ; } return $ hours ; }
Get all hours in an array
@return array Schedules line informations
Get all hours in an array