]> git.mxchange.org Git - friendica.git/blobdiff - src/Util/ParseUrl.php
Merge pull request #8271 from MrPetovan/bug/8229-frio-mobile-back-to-top
[friendica.git] / src / Util / ParseUrl.php
index 569136e6d13da5b67ebfd16f94a7823747326f45..06e320c40e03f29a93ce987d4f9a217deb13486f 100644 (file)
@@ -1,8 +1,24 @@
 <?php
 /**
- * @file src/Util/ParseUrl.php
- * @brief Get informations about a given URL
+ * @copyright Copyright (C) 2020, Friendica
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
  */
+
 namespace Friendica\Util;
 
 use DOMDocument;
@@ -13,7 +29,9 @@ use Friendica\Core\Logger;
 use Friendica\Database\DBA;
 
 /**
- * @brief Class with methods for extracting certain content from an url
+ * Get information about a given URL
+ *
+ * Class with methods for extracting certain content from an url
  */
 class ParseUrl
 {
@@ -28,7 +46,7 @@ class ParseUrl
        const MIN_DESC_COUNT = 100;
 
        /**
-        * @brief Search for chached embeddable data of an url otherwise fetch it
+        * Search for chached embeddable data of an url otherwise fetch it
         *
         * @param string $url         The url of the page which should be scraped
         * @param bool   $no_guessing If true the parse doens't search for
@@ -80,7 +98,7 @@ class ParseUrl
        }
 
        /**
-        * @brief Parse a page for embeddable content information
+        * Parse a page for embeddable content information
         *
         * This method parses to url for meta data which can be used to embed
         * the content. If available it prioritizes Open Graph meta tags.
@@ -376,7 +394,7 @@ class ParseUrl
        }
 
        /**
-        * @brief Convert tags from CSV to an array
+        * Convert tags from CSV to an array
         *
         * @param string $string Tags
         * @return array with formatted Hashtags
@@ -393,9 +411,9 @@ class ParseUrl
        }
 
        /**
-        * @brief Add a hasht sign to a string
+        * Add a hasht sign to a string
         *
-        *  This method is used as callback function
+        * This method is used as callback function
         *
         * @param string $tag The pure tag name
         * @param int    $k   Counter for internal use
@@ -407,7 +425,7 @@ class ParseUrl
        }
 
        /**
-        * @brief Add a scheme to an url
+        * Add a scheme to an url
         *
         * The src attribute of some html elements (e.g. images)
         * can miss the scheme so we need to add the correct