src/Route.php
public function setAction ($action)
    {
        if ($action instanceof \Closure) {

            $this->action = $action;

            return $this;
        }

        $parts = explode('::', $action);

        if (count($parts) != 2) {

            throw new \LengthException('Malformed action string');
        }

        $this->validateRoutable($parts[0], $parts[1]);

        $this->action = $parts;

        return $this;

    }
public function setAction ($action)
    {
        if ($action instanceof \Closure) {

            $this->action = $action;

            return $this;
        }

        $parts = explode('::', $action);

        if (count($parts) != 2) {

            throw new \LengthException('Malformed action string');
        }

        $this->validateRoutable($parts[0], $parts[1]);

        $this->action = $parts;

        return $this;

    }
public function setAction ( $ action ) { if ( $ action instanceof \ Closure ) { $ this -> action = $ action ; return $ this ; } $ parts = explode ( '::' , $ action ) ; if ( count ( $ parts ) != 2 ) { throw new \ LengthException ( 'Malformed action string' ) ; } $ this -> validateRoutable ( $ parts [ 0 ] , $ parts [ 1 ] ) ; $ this -> action = $ parts ; return $ this ; }
Sets the action

@param string $action
@throws \LengthException
@return self
Sets the action