public function addOrigin()
    {
        $args = func_get_args();

        if (isset($args[0]) && is_string($args[0])) {
            $this->origins[] = $args[0];
        } elseif (isset($args[0]) && ($args[0] instanceof Coordinate)) {
            $this->origins[] = $args[0];
        } elseif ((isset($args[0]) && is_numeric($args[0])) && (isset($args[1]) && is_numeric($args[1]))) {
            $origin = new Coordinate();
            $origin->setLatitude($args[0]);
            $origin->setLongitude($args[1]);

            if (isset($args[2]) && is_bool($args[2])) {
                $origin->setNoWrap($args[2]);
            }

            $this->origins[] = $origin;
        } else {
            throw DistanceMatrixException::invalidDistanceMatrixRequestOrigin();
        }
    }
public function addOrigin()
    {
        $args = func_get_args();

        if (isset($args[0]) && is_string($args[0])) {
            $this->origins[] = $args[0];
        } elseif (isset($args[0]) && ($args[0] instanceof Coordinate)) {
            $this->origins[] = $args[0];
        } elseif ((isset($args[0]) && is_numeric($args[0])) && (isset($args[1]) && is_numeric($args[1]))) {
            $origin = new Coordinate();
            $origin->setLatitude($args[0]);
            $origin->setLongitude($args[1]);

            if (isset($args[2]) && is_bool($args[2])) {
                $origin->setNoWrap($args[2]);
            }

            $this->origins[] = $origin;
        } else {
            throw DistanceMatrixException::invalidDistanceMatrixRequestOrigin();
        }
    }
public function addOrigin ( ) { $ args = func_get_args ( ) ; if ( isset ( $ args [ 0 ] ) && is_string ( $ args [ 0 ] ) ) { $ this -> origins [ ] = $ args [ 0 ] ; } elseif ( isset ( $ args [ 0 ] ) && ( $ args [ 0 ] instanceof Coordinate ) ) { $ this -> origins [ ] = $ args [ 0 ] ; } elseif ( ( isset ( $ args [ 0 ] ) && is_numeric ( $ args [ 0 ] ) ) && ( isset ( $ args [ 1 ] ) && is_numeric ( $ args [ 1 ] ) ) ) { $ origin = new Coordinate ( ) ; $ origin -> setLatitude ( $ args [ 0 ] ) ; $ origin -> setLongitude ( $ args [ 1 ] ) ; if ( isset ( $ args [ 2 ] ) && is_bool ( $ args [ 2 ] ) ) { $ origin -> setNoWrap ( $ args [ 2 ] ) ; } $ this -> origins [ ] = $ origin ; } else { throw DistanceMatrixException :: invalidDistanceMatrixRequestOrigin ( ) ; } }
Adds an origin to the request.

Available prototypes:
- function addOrigin(string $destination)
- function addOrigin(Ivory\GoogleMap\Base\Coordinate $destination)
- function addOrigin(double $latitude, double $longitude, boolean $noWrap)

@throws \Ivory\GoogleMap\Exception\DistanceMatrixException If the origin is not valid (prototypes).
Adds an origin to the request .