@@ -40,6 +40,10 @@ |
||
| 40 | 40 | } |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | + /** |
|
| 44 | + * @param string $id |
|
| 45 | + * @param string $ident |
|
| 46 | + */ |
|
| 43 | 47 | public function get_Schedule($id,$ident) { |
| 44 | 48 | global $globalDebug, $globalFork, $globalSchedulesFetch; |
| 45 | 49 | // Get schedule here, so it's done only one time |
@@ -125,6 +125,9 @@ discard block |
||
| 125 | 125 | public $tag_start = 0; |
| 126 | 126 | private $dom = null; |
| 127 | 127 | |
| 128 | + /** |
|
| 129 | + * @param simple_html_dom $dom |
|
| 130 | + */ |
|
| 128 | 131 | function __construct($dom) |
| 129 | 132 | { |
| 130 | 133 | $this->dom = $dom; |
@@ -1501,6 +1504,11 @@ discard block |
||
| 1501 | 1504 | } |
| 1502 | 1505 | |
| 1503 | 1506 | // parse attributes |
| 1507 | + |
|
| 1508 | + /** |
|
| 1509 | + * @param simple_html_dom_node $node |
|
| 1510 | + * @param string[] $space |
|
| 1511 | + */ |
|
| 1504 | 1512 | protected function parse_attr($node, $name, &$space) |
| 1505 | 1513 | { |
| 1506 | 1514 | // Per sourceforge: http://sourceforge.net/tracker/?func=detail&aid=3061408&group_id=218559&atid=1044037 |
@@ -1538,6 +1546,11 @@ discard block |
||
| 1538 | 1546 | } |
| 1539 | 1547 | |
| 1540 | 1548 | // link node's parent |
| 1549 | + |
|
| 1550 | + /** |
|
| 1551 | + * @param simple_html_dom_node $node |
|
| 1552 | + * @param boolean $is_child |
|
| 1553 | + */ |
|
| 1541 | 1554 | protected function link_nodes(&$node, $is_child) |
| 1542 | 1555 | { |
| 1543 | 1556 | $node->parent = $this->parent; |
@@ -1549,6 +1562,10 @@ discard block |
||
| 1549 | 1562 | } |
| 1550 | 1563 | |
| 1551 | 1564 | // as a text node |
| 1565 | + |
|
| 1566 | + /** |
|
| 1567 | + * @param string $tag |
|
| 1568 | + */ |
|
| 1552 | 1569 | protected function as_text_node($tag) |
| 1553 | 1570 | { |
| 1554 | 1571 | $node = new simple_html_dom_node($this); |
@@ -1559,12 +1576,18 @@ discard block |
||
| 1559 | 1576 | return true; |
| 1560 | 1577 | } |
| 1561 | 1578 | |
| 1579 | + /** |
|
| 1580 | + * @param string $chars |
|
| 1581 | + */ |
|
| 1562 | 1582 | protected function skip($chars) |
| 1563 | 1583 | { |
| 1564 | 1584 | $this->pos += strspn($this->doc, $chars, $this->pos); |
| 1565 | 1585 | $this->char = ($this->pos<$this->size) ? $this->doc[$this->pos] : null; // next |
| 1566 | 1586 | } |
| 1567 | 1587 | |
| 1588 | + /** |
|
| 1589 | + * @param string $chars |
|
| 1590 | + */ |
|
| 1568 | 1591 | protected function copy_skip($chars) |
| 1569 | 1592 | { |
| 1570 | 1593 | $pos = $this->pos; |
@@ -1575,6 +1598,9 @@ discard block |
||
| 1575 | 1598 | return substr($this->doc, $pos, $len); |
| 1576 | 1599 | } |
| 1577 | 1600 | |
| 1601 | + /** |
|
| 1602 | + * @param string $chars |
|
| 1603 | + */ |
|
| 1578 | 1604 | protected function copy_until($chars) |
| 1579 | 1605 | { |
| 1580 | 1606 | $pos = $this->pos; |
@@ -1584,6 +1610,9 @@ discard block |
||
| 1584 | 1610 | return substr($this->doc, $pos, $len); |
| 1585 | 1611 | } |
| 1586 | 1612 | |
| 1613 | + /** |
|
| 1614 | + * @param string $char |
|
| 1615 | + */ |
|
| 1587 | 1616 | protected function copy_until_char($char) |
| 1588 | 1617 | { |
| 1589 | 1618 | if ($this->char===null) return ''; |
@@ -1602,6 +1631,9 @@ discard block |
||
| 1602 | 1631 | return substr($this->doc, $pos_old, $pos-$pos_old); |
| 1603 | 1632 | } |
| 1604 | 1633 | |
| 1634 | + /** |
|
| 1635 | + * @param string $char |
|
| 1636 | + */ |
|
| 1605 | 1637 | protected function copy_until_char_escape($char) |
| 1606 | 1638 | { |
| 1607 | 1639 | if ($this->char===null) return ''; |
@@ -1633,6 +1665,10 @@ discard block |
||
| 1633 | 1665 | |
| 1634 | 1666 | // remove noise from html content |
| 1635 | 1667 | // save the noise in the $this->noise array. |
| 1668 | + |
|
| 1669 | + /** |
|
| 1670 | + * @param string $pattern |
|
| 1671 | + */ |
|
| 1636 | 1672 | protected function remove_noise($pattern, $remove_tag=false) |
| 1637 | 1673 | { |
| 1638 | 1674 | global $debug_object; |
@@ -1658,6 +1694,10 @@ discard block |
||
| 1658 | 1694 | } |
| 1659 | 1695 | |
| 1660 | 1696 | // restore noise to html content |
| 1697 | + |
|
| 1698 | + /** |
|
| 1699 | + * @param string|null $text |
|
| 1700 | + */ |
|
| 1661 | 1701 | function restore_noise($text) |
| 1662 | 1702 | { |
| 1663 | 1703 | global $debug_object; |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | /** |
| 15 | 15 | * Get SQL query part for filter used |
| 16 | 16 | * @param Array $filter the filter |
| 17 | - * @return Array the SQL part |
|
| 17 | + * @return string the SQL part |
|
| 18 | 18 | */ |
| 19 | 19 | public function getFilter($filter = array(),$where = false,$and = false) { |
| 20 | 20 | global $globalFilter, $globalStatsFilters, $globalFilterName, $globalDBdriver; |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | /** |
| 15 | 15 | * Get SQL query part for filter used |
| 16 | 16 | * @param Array $filter the filter |
| 17 | - * @return Array the SQL part |
|
| 17 | + * @return string the SQL part |
|
| 18 | 18 | */ |
| 19 | 19 | public function getFilter($filter = array(),$where = false,$and = false) { |
| 20 | 20 | global $globalFilter, $globalStatsFilters, $globalFilterName, $globalDBdriver; |
@@ -759,10 +759,6 @@ discard block |
||
| 759 | 759 | * |
| 760 | 760 | * @param String $famtrackid the ID from flightaware |
| 761 | 761 | * @param String $ident the flight ident |
| 762 | - * @param String $aircraft_icao the aircraft type |
|
| 763 | - * @param String $departure_airport_icao the departure airport |
|
| 764 | - * @param String $arrival_airport_icao the arrival airport |
|
| 765 | - * @return String success or false |
|
| 766 | 762 | * |
| 767 | 763 | */ |
| 768 | 764 | public function addLiveTrackerData($famtrackid = '', $ident = '', $latitude = '', $longitude = '', $altitude = '', $heading = '', $groundspeed = '', $date = '', $putinarchive = false, $comment = '', $type = '',$noarchive = false,$format_source = '', $source_name = '', $over_country = '') |
@@ -254,6 +254,7 @@ discard block |
||
| 254 | 254 | * |
| 255 | 255 | * @param String $aircraft_registration the registration of the aircraft |
| 256 | 256 | * @param String $aircraft_name type of the aircraft |
| 257 | + * @param string $type |
|
| 257 | 258 | * @return Array the aircraft thumbnail, orignal url and copyright |
| 258 | 259 | * |
| 259 | 260 | */ |
@@ -287,6 +288,7 @@ discard block |
||
| 287 | 288 | * |
| 288 | 289 | * @param String $registration the registration of the aircraft |
| 289 | 290 | * @param String $name type of the aircraft |
| 291 | + * @param string $type |
|
| 290 | 292 | * @return Array the aircraft thumbnail, orignal url and copyright |
| 291 | 293 | * |
| 292 | 294 | */ |
@@ -325,6 +327,7 @@ discard block |
||
| 325 | 327 | * |
| 326 | 328 | * @param String $aircraft_registration the registration of the aircraft |
| 327 | 329 | * @param String $aircraft_name type of the aircraft |
| 330 | + * @param string $type |
|
| 328 | 331 | * @return Array the aircraft thumbnail, orignal url and copyright |
| 329 | 332 | * |
| 330 | 333 | */ |
@@ -367,6 +370,7 @@ discard block |
||
| 367 | 370 | * |
| 368 | 371 | * @param String $aircraft_registration the registration of the aircraft |
| 369 | 372 | * @param String $aircraft_name type of the aircraft |
| 373 | + * @param string $type |
|
| 370 | 374 | * @return Array the aircraft thumbnail, orignal url and copyright |
| 371 | 375 | * |
| 372 | 376 | */ |
@@ -401,6 +405,7 @@ discard block |
||
| 401 | 405 | * |
| 402 | 406 | * @param String $registration the registration of the aircraft |
| 403 | 407 | * @param String $name type of the aircraft |
| 408 | + * @param string $type |
|
| 404 | 409 | * @return Array the aircraft thumbnail, orignal url and copyright |
| 405 | 410 | * |
| 406 | 411 | */ |
@@ -429,6 +434,10 @@ discard block |
||
| 429 | 434 | return false; |
| 430 | 435 | } |
| 431 | 436 | |
| 437 | + /** |
|
| 438 | + * @param string $type |
|
| 439 | + * @param string $aircraft_icao |
|
| 440 | + */ |
|
| 432 | 441 | public function fromIvaoMtl($type,$aircraft_icao,$airline_icao) { |
| 433 | 442 | $Common = new Common(); |
| 434 | 443 | //echo "\n".'SEARCH IMAGE : http://mtlcatalog.ivao.aero/images/aircraft/'.$aircraft_icao.$airline_icao.'.jpg'; |
@@ -450,6 +459,7 @@ discard block |
||
| 450 | 459 | * |
| 451 | 460 | * @param String $aircraft_registration the registration of the aircraft |
| 452 | 461 | * @param String $aircraft_name type of the aircraft |
| 462 | + * @param string $type |
|
| 453 | 463 | * @return Array the aircraft thumbnail, orignal url and copyright |
| 454 | 464 | * |
| 455 | 465 | */ |
@@ -482,6 +492,7 @@ discard block |
||
| 482 | 492 | * |
| 483 | 493 | * @param String $aircraft_registration the registration of the aircraft |
| 484 | 494 | * @param String $aircraft_name type of the aircraft |
| 495 | + * @param string $type |
|
| 485 | 496 | * @return Array the aircraft thumbnail, orignal url and copyright |
| 486 | 497 | * |
| 487 | 498 | */ |
@@ -507,6 +518,7 @@ discard block |
||
| 507 | 518 | * |
| 508 | 519 | * @param String $registration the registration of the aircraft/mmsi |
| 509 | 520 | * @param String $name name |
| 521 | + * @param string $type |
|
| 510 | 522 | * @return Array the aircraft thumbnail, orignal url and copyright |
| 511 | 523 | * |
| 512 | 524 | */ |
@@ -568,6 +580,7 @@ discard block |
||
| 568 | 580 | * |
| 569 | 581 | * @param String $registration the registration of the aircraft |
| 570 | 582 | * @param String $name type of the aircraft |
| 583 | + * @param string $type |
|
| 571 | 584 | * @return Array the aircraft thumbnail, orignal url and copyright |
| 572 | 585 | * |
| 573 | 586 | */ |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | /** |
| 15 | 15 | * Get SQL query part for filter used |
| 16 | 16 | * @param Array $filter the filter |
| 17 | - * @return Array the SQL part |
|
| 17 | + * @return string the SQL part |
|
| 18 | 18 | */ |
| 19 | 19 | public function getFilter($filter = array(),$where = false,$and = false) { |
| 20 | 20 | global $globalFilter, $globalStatsFilters, $globalFilterName, $globalDBdriver; |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | /** |
| 15 | 15 | * Get SQL query part for filter used |
| 16 | 16 | * @param Array $filter the filter |
| 17 | - * @return Array the SQL part |
|
| 17 | + * @return string the SQL part |
|
| 18 | 18 | */ |
| 19 | 19 | public function getFilter($filter = array(),$where = false,$and = false) { |
| 20 | 20 | global $globalFilter, $globalStatsFilters, $globalFilterName, $globalDBdriver; |
@@ -794,10 +794,6 @@ discard block |
||
| 794 | 794 | * |
| 795 | 795 | * @param String $fammarine_id the ID from flightaware |
| 796 | 796 | * @param String $ident the flight ident |
| 797 | - * @param String $aircraft_icao the aircraft type |
|
| 798 | - * @param String $departure_airport_icao the departure airport |
|
| 799 | - * @param String $arrival_airport_icao the arrival airport |
|
| 800 | - * @return String success or false |
|
| 801 | 797 | * |
| 802 | 798 | */ |
| 803 | 799 | public function addLiveMarineData($fammarine_id = '', $ident = '', $latitude = '', $longitude = '', $heading = '', $groundspeed = '', $date = '', $putinarchive = false, $mmsi = '',$type = '',$typeid = '',$imo = '', $callsign = '',$arrival_code = '',$arrival_date = '',$status = '',$statusid = '',$noarchive = false,$format_source = '', $source_name = '', $over_country = '') |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | /** |
| 15 | 15 | * Get SQL query part for filter used |
| 16 | 16 | * @param Array $filter the filter |
| 17 | - * @return Array the SQL part |
|
| 17 | + * @return string the SQL part |
|
| 18 | 18 | */ |
| 19 | 19 | public function getFilter($filter = array(),$where = false,$and = false) { |
| 20 | 20 | global $globalFilter, $globalStatsFilters, $globalFilterName, $globalDBdriver; |
@@ -52,6 +52,10 @@ discard block |
||
| 52 | 52 | $this->openedFiles = []; |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | + /** |
|
| 56 | + * @param double $row |
|
| 57 | + * @param double $column |
|
| 58 | + */ |
|
| 55 | 59 | private function getElevationAtPosition($fileName, $row, $column) { |
| 56 | 60 | if (!array_key_exists($fileName, $this->openedFiles)) { |
| 57 | 61 | if (!file_exists($this->htgFilesDestination . DIRECTORY_SEPARATOR . $fileName)) { |
@@ -85,7 +89,7 @@ discard block |
||
| 85 | 89 | * @param float $lon |
| 86 | 90 | * @param null $fName |
| 87 | 91 | * |
| 88 | - * @return mixed |
|
| 92 | + * @return double |
|
| 89 | 93 | * @throws \Exception |
| 90 | 94 | */ |
| 91 | 95 | public function getElevation($lat, $lon, &$fName = null) { |
@@ -142,6 +146,9 @@ discard block |
||
| 142 | 146 | return $zN; |
| 143 | 147 | } |
| 144 | 148 | |
| 149 | + /** |
|
| 150 | + * @param integer $numPrefix |
|
| 151 | + */ |
|
| 145 | 152 | private function getDeg($deg, $numPrefix) { |
| 146 | 153 | $deg = abs($deg); |
| 147 | 154 | $d = floor($deg); // round degrees |
@@ -156,6 +163,9 @@ discard block |
||
| 156 | 163 | return $d; |
| 157 | 164 | } |
| 158 | 165 | |
| 166 | + /** |
|
| 167 | + * @param double $deg |
|
| 168 | + */ |
|
| 159 | 169 | private function getSec($deg) { |
| 160 | 170 | $deg = abs($deg); |
| 161 | 171 | $sec = round($deg * 3600, 4); |