示例#1
0
 /**
  * Changing the hostname and port.
  */
 public function testShouldChangeHostnameAndPort4()
 {
     lumenUrlHost(['host' => 'example.com', 'port' => '8080']);
     $this->assertEquals('http://example.com:8080', $this->url->to('/'));
     lumenUrlHost('localhost:8000');
     $this->assertEquals('http://example.com:8080', $this->url->to('/'));
 }
 /**
  * Get the action for an "action" option.
  *
  * @param array|string $options
  *
  * @return string
  */
 protected function getControllerAction($options)
 {
     if (is_array($options)) {
         return $this->url->action($options[0], array_slice($options, 1));
     }
     return $this->url->action($options);
 }
示例#3
0
 /**
  * Get the fallback callback redirect URL if none provided.
  *
  * @param string $callback_url
  *
  * @return string
  */
 private function getCallbackUrl($callback_url)
 {
     $callback_url = $callback_url ?: $this->config_handler->get('laravel-facebook-sdk.default_redirect_uri');
     return $this->url->to($callback_url);
 }
示例#4
0
 /**
  * Generate a HTML link to a controller action.
  *
  * @param string $action
  * @param string $title
  * @param array  $parameters
  * @param array  $attributes
  *
  * @return string
  */
 public function linkAction($action, $title = null, $parameters = [], $attributes = [])
 {
     return $this->link($this->url->action($action, $parameters), $title, $attributes);
 }
 /**
  * @inheritdoc
  */
 public function getCurrentUrl()
 {
     return $this->url->current();
 }