9 namespace Fossology\Lib\Data;
19 const SIGNATURE =
"S";
24 const COPYRIGHT =
"C";
30 const KEYWORDOTHERS =
"KW";
31 const UNDEFINED =
"any";
75 function __construct($start, $end, $type, $refStart=-1, $refEnd=-1, $infoText =
"", $htmlElement =
null)
77 $this->
start = $start;
80 $this->refStart = $refStart;
81 $this->refEnd = $refEnd;
82 $this->infoText = $infoText;
83 $this->htmlElement = $htmlElement;
85 $this->licenseId =
null;
118 $this->licenseId = intval($licenseId);
126 return $this->licenseId;
134 return $this->licenseId !=
null;
142 return $this->licenseId ==
null;
151 return $this->refStart;
154 private function hasRef()
164 return $this->refEnd;
172 return max(0, $this->refEnd - $this->refStart);
180 $this->infoText = $infoText;
188 return $this->infoText;
196 return $this->htmlElement;
206 "start" => intval($this->
start),
207 "end" => intval($this->end),
208 "type" => $this->type ==
null ? Highlight::UNDEFINED : $this->type,
209 "licenseId" => $this->licenseId,
210 "refStart" => $this->refStart == -1 ? 0 : $this->refStart,
211 "refEnd" => $this->refEnd == -1 ? 0 : $this->refEnd,
212 "infoText" => $this->infoText,
213 "htmlElement" => $this->htmlElement
217 public function __toString()
220 . $this->
start .
"-" . $this->end
221 .
", type=" . $this->type
222 .
", id=" . $this->licenseId .
223 ($this->hasRef() ?
":". $this->refStart .
"-" . $this->refEnd :
"")
__construct($start, $end, $type, $refStart=-1, $refEnd=-1, $infoText="", $htmlElement=null)
FUNCTION int max(int permGroup, int permPublic)
Get the maximum group privilege.
start($application)
start the application Assumes application is restartable via /etc/init.d/<script>....