コード例 #1
0
ファイル: SimplOnLink.php プロジェクト: nOoiser/SimplOnPHP
 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
ファイル: SimplOnLink.php プロジェクト: simplonphp/simplonphp
 /**
  * 
  * @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
ファイル: SelectAction.php プロジェクト: nOoiser/SimplOnPHP
 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
ファイル: Element.php プロジェクト: nOoiser/SimplOnPHP
 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);
 }