Smart.Framework Logo

final class \SmartParser
{ } ::

Class: SmartParser - Provides misc parsing methods.


class Methods

public static function extract_base_domain_from_domain ( string $domain ) {} :: STRING
public static function get_arr_urls ( string $string ) {} :: ARRAY
@return: {ARRAY} A non-associative array with the URL links detected in the string
@param: {STRING} $string: The text string to be processed
Detect URL links in a text string
public static function text_urls ( string $string, string $ytarget = "_blank", string $ypict = "", int $y_lentrim = 100 ) {} :: STRING
@return: {STRING} The HTML processed text with URLs replaced with real tags
@param: {STRING} $string: The text string to be processed
@param: {STRING} $ytarget: URL target ; default is '_blank' ; can be: '_self' or a specific window name: 'myWindow' ...
@param: {STRING} $ypict: The image path to display as link ; default is blank: ''
@param: {INTEGER} $y_lentrim: The length of the URL to be displayed into [DetectedURL] (used only if no image has been provided)
Replace URL in a text string with HTML links <a href="(DetectedURL)" target="{target}">[DetectedURL]</a>
public static function get_arr_emails ( string $string ) {} :: ARRAY
@return: {ARRAY} A non-associative array with the EMAIL addresses detected in the string
@param: {STRING} $string: The text string to be processed
Detect EMAIL addresses in a text string
public static function text_emails ( string $string, string $yaction = "mailto:", string $ytarget = "", int $y_lentrim = 100 ) {} :: STRING
@return: {STRING} The HTML processed text with EMAIL addresses replaced with real tags as links
@param: {STRING} $string: The text string to be processed
@param: {STRING} $yaction: Action to append the email link to ; Default is: 'mailto:' but can be for example: 'script.php?action=email&addr='
@param: {STRING} $ytarget: URL target ; default is '_blank' ; can be: '_self' or a specific window name: 'myWindow' ...
@param: {INTEGER} $y_lentrim: The length of the URL to be displayed into [DetectedURL] (used only if no image has been provided)
Replace EMAIL addresses in a text string with HTML links <a href="(emailAddr)" target="{target}">[emailAddr]</a>
public static function get_arr_faxnums ( string $string ) {} :: ARRAY
@return: {ARRAY} A non-associative array with the FAX numbers detected in the string
@param: {STRING} $string: The text string to be processed
Detect FAX numbers in a text string
public static function text_faxnums ( string $string, string $yaction = "efax:", string $ytarget = "_blank", int $y_lentrim = 100 ) {} :: STRING
@return: {STRING} The HTML processed text with FAX numbers replaced with real tags as links
@param: {STRING} $string: The text string to be processed
@param: {STRING} $yaction: Action to append the fax-num link to ; Default is: 'efax:' but can be for example: 'script.php?action=fax&number='
@param: {STRING} $ytarget: URL target ; default is '_blank' ; can be: '_self' or a specific window name: 'myWindow' ...
@param: {INTEGER} $y_lentrim: The length of the URL to be displayed into [DetectedURL] (used only if no image has been provided)
Replace FAX numbers in a text string with HTML links <a href="(faxNum)" target="{target}">[faxNum]</a>

class Properties


class Constants


Sample code: PHP

<?php

// Usage example:
 
SmartParser::some_method_of_this_class(...);

// #end php code


documentation generated on: 2023-10-19 23:15:44 +0000


Smart.Framework © 2009-2023 unix-world.org