Example #1
0
 /**
  * Build a REST URL.
  *
  * @internal.
  */
 protected function build_rest_url($url, $params = array())
 {
     $base = '';
     if (substr($this->_url, 0, 4) !== 'http') {
         $base .= 'http://';
     }
     $base .= $this->_url;
     if ($this->_port != 80) {
         $base .= ':' . $this->_port;
     }
     $rurl = new \Rapid\URL($base . '/api/' . $url, $params);
     return $rurl->out();
 }
Example #2
0
 /**
  * Adds a Stylesheet to the page.
  */
 public function require_css($path)
 {
     $url = new \Rapid\URL($path);
     $this->stylesheets[] = $url->out();
 }