9 namespace Fossology\Lib\Data;
19 const SIGNATURE =
"S";
23 const COPYRIGHT =
"C";
29 const KEYWORDOTHERS =
"KW";
30 const UNDEFINED =
"any";
74 function __construct($start, $end, $type, $refStart=-1, $refEnd=-1, $infoText =
"", $htmlElement =
null)
76 $this->
start = $start;
79 $this->refStart = $refStart;
80 $this->refEnd = $refEnd;
81 $this->infoText = $infoText;
82 $this->htmlElement = $htmlElement;
84 $this->licenseId =
null;
117 $this->licenseId = intval($licenseId);
125 return $this->licenseId;
133 return $this->licenseId !=
null;
141 return $this->licenseId ==
null;
150 return $this->refStart;
153 private function hasRef()
163 return $this->refEnd;
171 return max(0, $this->refEnd - $this->refStart);
179 $this->infoText = $infoText;
187 return $this->infoText;
195 return $this->htmlElement;
205 "start" => intval($this->
start),
206 "end" => intval($this->end),
207 "type" => $this->type ==
null ? Highlight::UNDEFINED : $this->type,
208 "licenseId" => $this->licenseId,
209 "refStart" => $this->refStart == -1 ? 0 : $this->refStart,
210 "refEnd" => $this->refEnd == -1 ? 0 : $this->refEnd,
211 "infoText" => $this->infoText,
212 "htmlElement" => $this->htmlElement
216 public function __toString()
219 . $this->
start .
"-" . $this->end
220 .
", type=" . $this->type
221 .
", id=" . $this->licenseId .
222 ($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>....