diff options
| -rw-r--r-- | boston_food_trucks.php | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/boston_food_trucks.php b/boston_food_trucks.php index 109ccf8..e6afeff 100644 --- a/boston_food_trucks.php +++ b/boston_food_trucks.php @@ -63,113 +63,6 @@ class BostonFoodTrucks { function schedule ($options = array()) { -// for ($i = 0; $i < $this->food_truck_nodes['locations']->length; $i++) { -// if (isset($options['days_of_week']) && -// in_array($this->food_truck_nodes['days_of_week']->item($i)->nodeValue, $options['days_of_week'])) { -// -// if (isset($options['times_of_day']) && -// in_array($this->food_truck_nodes['times_of_day']->item($i)->nodeValue, $options['times_of_day'])) { -// -// if (isset($options['locations']) && -// in_array($this->food_truck_nodes['locations']->item($i)->nodeValue, $options['locations'])) { -// -// $this->_add_food_truck($i); -// -// } -// else { -// $this->_add_food_truck($i); -// } -// } -// else { -// $this->_add_food_truck($i); -// } -// } -// else { -// $this->_add_food_truck($i); -// } -// } -// -// -// $has_days = isset($options['days_of_week']); -// $has_times = isset($options['times_of_day']); -// $has_locations = isset($options['locations']); -// -// $add_by_days = function($list_index) { -// if (in_array($this->food_truck_nodes['days_of_week']->item($i)->nodeValue, $options['days_of_week'])) { -// $this->_add_food_truck($list_index); -// } -// }; -// -// $add_by_times = function($list_index) { -// if (in_array($this->food_truck_nodes['times_of_day']->item($i)->nodeValue, $options['times_of_day'])) { -// $this->_add_food_truck($list_index); -// } -// }; -// -// $add_by_locations = function($list_index) { -// if (in_array($this->food_truck_nodes['locations']->item($i)->nodeValue, $options['locations'])) { -// $this->_add_food_truck($list_index); -// } -// }; -// -// if ($has_days and $has_times and $has_locations) { -// $add_by_days($i); -// $add_by_times($i); -// $add_by_locations($i); -// } -// else if (! $has_days and $has_times and $has_locations) { -// $add_by_times($i); -// $add_by_locations($i); -// } -// else if ($has_days and ! $has_times and $has_locations) { -// $add_by_days($i); -// $add_by_locations($i); -// } -// else if ($has_days and $has_times and ! $has_locations) { -// $add_by_days($i); -// $add_by_locations($i); -// } -// else if (! $has_days and ! $has_times and $has_locations) { -// $add_by_locations($i); -// } - - -// $has_days = isset($options['days_of_week']); -// $has_times = isset($options['times_of_day']); -// $has_locations = isset($options['locations']); -// -// if (! $has_days and ! $has_times and ! $has_locations) { -// for ($i = 0; $i < $this->food_truck_nodes['locations']->length; $i++) { -// $this->_add_food_truck($i); -// } -// } -// else { -// if ($has_days) { -// for ($i = 0; $i < $this->food_truck_nodes['days_of_week']->length; $i++) { -// if (in_array($this->food_truck_nodes['days_of_week']->item($i)->nodeValue, $options['days_of_week'])) { -// $this->_add_food_truck($i); -// } -// } -// } -// -// if ($has_times) { -// for ($i = 0; $i < $this->food_truck_nodes['times_of_day']->length; $i++) { -// if (in_array($this->food_truck_nodes['times_of_day']->item($i)->nodeValue, $options['times_of_day'])) { -// $this->_add_food_truck($i); -// } -// } -// } -// -// if ($has_locations) { -// for ($i = 0; $i < $this->food_truck_nodes['locations']->length; $i++) { -// if (in_array($this->food_truck_nodes['locations']->item($i)->nodeValue, $options['locations'])) { -// $this->_add_food_truck($i); -// } -// } -// } -// } - - $has_days = isset($options['days_of_week']); $has_times = isset($options['times_of_day']); $has_locations = isset($options['locations']); |
