예제 #1
0
 public function showView($sources = null)
 {
     if (!isset($sources)) {
         $sources = $this->sources;
     }
     $href = Main::encodeURL($this->class, $this->construct_params, $this->method, $this->method_params);
     $content = vsprintf(array_shift($sources), $this->sourcesToValues($sources));
     return Main::$DEFAULT_RENDERER->link($content, $href);
 }
예제 #2
0
 /**
  * 
  * @param type $sources
  * @return type
  */
 public function val($sources = null)
 {
     // verify if $sources is not an array if it's true then $sources is stored into $this->sources
     if (!is_array($sources)) {
         $sources = $this->sources;
     }
     // @href save the URL to the class indicated with the parameters to initialize it
     $href = Main::encodeURL($this->class, $this->construct_params, $this->method, $this->method_params);
     // $content save $sources with the correct format
     $content = vsprintf(array_shift($sources), $this->sourcesToValues($sources));
     // return the <a> tag with the correct href.
     return Main::$DEFAULT_RENDERER->link($content, $href);
 }
예제 #3
0
 function encodeURL($method = null, array $method_params = array())
 {
     return Main::encodeURL($this->parent->parentClass(), array($this->parent->parentId()), $method, $method_params, $this->parent->dataName());
 }
예제 #4
0
 function encodeURL(array $construct_params = array(), $method = null, array $method_params = array())
 {
     if (empty($construct_params) && $this->getId()) {
         $construct_params = array($this->getId());
     }
     return Main::encodeURL($this->getClass(), $construct_params, $method, $method_params);
 }