Exemplo n.º 1
0
 /**
  * Extended to pass URLs through Laravel.
  *
  * @internal
  * @param  array  $matches
  * @return string
  * @uses Laravel\URL::to_asset()
  */
 function _doImages_inline_callback($matches)
 {
     $alt_text = $matches[2];
     $url = $matches[3] == '' ? $matches[4] : $matches[3];
     $title = isset($matches[7]) ? $matches[7] : null;
     $alt_text = $this->encodeAttribute($alt_text);
     $url = $this->encodeAttribute($url);
     // BEGIN: Modification to pass URLs through Laravel
     if ($url[0] !== '#' and is_null(parse_url($url, PHP_URL_SCHEME))) {
         $url = Laravel\URL::to_asset($url);
     }
     // END
     $result = "<img src=\"{$url}\" alt=\"{$alt_text}\"";
     if (isset($title)) {
         $title = $this->encodeAttribute($title);
         $result .= " title=\"{$title}\"";
         # $title already quoted
     }
     $result .= $this->empty_element_suffix;
     return $this->hashPart($result);
 }
Exemplo n.º 2
0
/**
 * Generate a URL from a route name.
 *
 * <code>
 *		// Create a URL to the "profile" named route
 *		$url = route('profile');
 *
 *		// Create a URL to the "profile" named route with wildcard parameters
 *		$url = route('profile', array($username));
 * </code>
 *
 * @param  string  $name
 * @param  array   $parameters
 * @return string
 */
function route($name, $parameters = array())
{
    return Laravel\URL::to_route($name, $parameters);
}
Exemplo n.º 3
0
/**
 * Generate a URL from a route name.
 *
 * <code>
 *		// Create a URL to the "profile" named route
 *		$url = route('profile');
 *
 *		// Create a URL to the "profile" named route with wildcard parameters
 *		$url = route('profile', array($username));
 * </code>
 *
 * @param  string  $name
 * @param  array   $parameters
 * @param  bool    $https
 * @return string
 */
function route($name, $parameters = array(), $https = false)
{
    return Laravel\URL::to_route($name, $parameters, $https);
}