src/FlexPress/Components/Routing/Route.php
public function addConditionsFromArray(array $conditions)
    {
        foreach ($conditions as $condition) {

            if (!is_callable($condition)) {

                $message = "One or more of the conditions you provided are not callable, ";
                $message .= "please pass an array of callable functions.";

                throw new \InvalidArgumentException($message);
            }

            $this->conditions->enqueue($condition);

        }
    }
public function addConditionsFromArray(array $conditions)
    {
        foreach ($conditions as $condition) {

            if (!is_callable($condition)) {

                $message = "One or more of the conditions you provided are not callable, ";
                $message .= "please pass an array of callable functions.";

                throw new \InvalidArgumentException($message);
            }

            $this->conditions->enqueue($condition);

        }
    }
public function addConditionsFromArray ( array $ conditions ) { foreach ( $ conditions as $ condition ) { if ( ! is_callable ( $ condition ) ) { $ message = "One or more of the conditions you provided are not callable, " ; $ message .= "please pass an array of callable functions." ; throw new \ InvalidArgumentException ( $ message ) ; } $ this -> conditions -> enqueue ( $ condition ) ; } }
Adds conditions to the route from the given array

@param array $conditions - an array of conditions

@throws \InvalidArgumentException
@author Tim Perry
Adds conditions to the route from the given array