Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
Класс Common
+ Граф наследования:Common:

Открытые члены

 handle (HtmlDocument $document)
 
- Открытые члены унаследованные от Parser
 getValidNumberPattern ()
 
 parse ($phoneNumber, $defaultCountry='')
 
 stripExtension (&$phoneNumber)
 

Открытые атрибуты

const MIN_IMAGE_HEIGHT = 100
 
const MIN_IMAGE_WIDTH = 100
 
- Открытые атрибуты унаследованные от Parser
const MAX_LENGTH_COUNTRY_CODE = 3
 
const MIN_LENGTH_FOR_NSN = 2
 
const MAX_LENGTH_FOR_NSN = 17
 
const MAX_INPUT_STRING_LENGTH = 250
 
const DEFAULT_COUNTRY_OPTION = 'phone_number_default_country'
 

Защищенные члены

 getTitle (HtmlDocument $document)
 
 getImage (HtmlDocument $document)
 
 getImageCandidates ()
 
 getImageDimensions (array $imageAttributes)
 
 getVideoInfo ($html='')
 
 isValidVideoMimeType ($type='')
 
- Защищенные члены унаследованные от Parser
 __construct ()
 
 extractFormattedPhoneNumber ($phoneNumber)
 
 isViablePhoneNumber ($phoneNumber)
 
 parsePhoneNumberAndCountryPhoneCode ($phoneNumber)
 
 normalizePhoneNumber ($phoneNumber)
 
 getMetadataByCountryCode ($countryCode)
 
 findCountry ($countryCode, $localNumber)
 
 getNumberType ($localNumber, $country)
 
 getCountriesByCode ($countryCode)
 
 getCountryMetadata ($country)
 

Защищенные данные

 $imgElements = array()
 
- Защищенные данные унаследованные от Parser
 $plusChar = '+'
 
 $validDigits = '0-9'
 
 $dashes = '-'
 
 $slashes = '\/'
 
 $dot = '.'
 
 $whitespace = '\s'
 
 $brackets = '()\\[\\]'
 
 $tildes = '~'
 
 $extensionSeparators = ';#'
 
 $extensionSymbols = ','
 
 $phoneNumberStartPattern
 
 $afterPhoneNumberEndPattern
 
 $minLengthPhoneNumberPattern
 
 $validPunctuation
 
 $validPhoneNumber
 
 $validPhoneNumberPattern
 

Дополнительные унаследованные члены

- Открытые статические члены унаследованные от Parser
static getInstance ()
 
static getDefaultCountry ()
 
static getUserDefaultCountry ()
 
static detectCountry ()
 
- Защищенные статические члены унаследованные от Parser
static stripNationalPrefix (&$phoneNumber, $countryMetadata)
 
static stripCountryCode (&$phoneNumber, $countryMetadata)
 
static stripLetters ($str)
 
- Статические защищенные данные унаследованные от Parser
static $instance = null
 

Подробное описание

См. определение в файле common.php строка 8

Методы

◆ getImage()

getImage ( HtmlDocument $document)
protected
Аргументы
HtmlDocument$document
Возвращает
string

См. определение в файле common.php строка 92

◆ getImageCandidates()

getImageCandidates ( )
protected

Iterates through img elements, and return array of urls of images, which size is greater then 100pxx100px

Возвращает
array

См. определение в файле common.php строка 116

◆ getImageDimensions()

getImageDimensions ( array $imageAttributes)
protected

Returns size of the img element

Аргументы
array$imageAttributesArray of the attributes of the img tag.
Возвращает
array Returns array with keys width and height.

См. определение в файле common.php строка 135

◆ getTitle()

getTitle ( HtmlDocument $document)
protected
Аргументы
HtmlDocument$documentHTML document to scan for title.
Возвращает
string

См. определение в файле common.php строка 76

◆ getVideoInfo()

getVideoInfo ( $html = '')
protected

Parse one <video> tag and try to get valid information off it.

Аргументы
string$html- one <video> from the document.
Возвращает
array

См. определение в файле common.php строка 162

◆ handle()

handle ( HtmlDocument $document)

Parses HTML document's meta tags, and fills document's metadata.

Аргументы
HtmlDocument$documentHTML document to scan for metadata.
Возвращает
void

См. определение в файле common.php строка 22

◆ isValidVideoMimeType()

isValidVideoMimeType ( $type = '')
protected

Returns true if $type is a valid video mime-type.

Аргументы
string$type
Возвращает
bool

См. определение в файле common.php строка 215

Данные класса

◆ $imgElements

$imgElements = array()
protected

См. определение в файле common.php строка 14

◆ MIN_IMAGE_HEIGHT

const MIN_IMAGE_HEIGHT = 100

См. определение в файле common.php строка 10

◆ MIN_IMAGE_WIDTH

const MIN_IMAGE_WIDTH = 100

См. определение в файле common.php строка 11