8 function ALink( $target, $content, $help="", $template="" ) {
9 $this->target
= $target;
10 $this->content
= $content;
12 $this->template
= $template;
16 function Render( $class="" ) {
17 $title = ( $this->help
== "" ?
"" : " title=\"$this->help\"");
18 $class = ( $class == "" ?
"" : " class=\"$class\"");
19 if ( $this->template
== "" )
20 $this->template
= '<a href="%s"%s%s>%s</a>';
21 return sprintf( $this->template
, $this->target
, $class, $title, $this->content
);
30 function LinkSet( $template, $class ) {
31 $this->template
= $template;
32 $this->class = $class;
35 function Link( $target, $content, $help = "" ) {
36 $l = new ALink( $target, $content, $help, $this->template
);
37 return $l->Render($this->class);