1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Класс Base
Граф наследования:Base:
File FileEntry IFileStream FileSystemEntry Index Runtime

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

 __construct ($fileName, $settings)
 addHeader ()
 addEntry ($entry)
 split ()
 getNameList ()
 getPathDirectory ()
 isNotEmpty ()
 isCurrentPartNotEmpty ()
 appendEntry ($entry)
 removeEntry ($url)
 addFileEntry (File $f)
 addIBlockEntry ($url, $modifiedDate)
 appendIBlockEntry ($url, $modifiedDate)
 addFooter ()
 getSiteRoot ()
 getUrl ()
 parse ()
Открытые члены унаследованные от File
 open ($mode)
 close ()
 isExists ()
 getContents ()
 putContents ($data, $flags=self::REWRITE)
 getSize ()
 seek ($position)
 isWritable ()
 isReadable ()
 readFile ()
 markWritable ()
 delete ()
 getContentType ()
Открытые члены унаследованные от FileEntry
 getExtension ()
 putContents ($data)
 getFileSize ()
 isDirectory ()
 isFile ()
 isLink ()
Открытые члены унаследованные от FileSystemEntry
 isSystem ()
 getName ()
 getDirectoryName ()
 getPath ()
 getDirectory ()
 getCreationTime ()
 getLastAccessTime ()
 getModificationTime ()
 getPermissions ()
 getPhysicalPath ()
 rename ($newPath)

Поля данных

const XML_HEADER = '<?xml version="1.0" encoding="UTF-8"?>'
const FILE_HEADER = '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'
const FILE_FOOTER = '</urlset>'
const ENTRY_TPL = '<url><loc>%s</loc><lastmod>%s</lastmod></url>'
const ENTRY_TPL_SEARCH = '<url><loc>%s</loc>'
const XPATH_URL = '/urlset/url'
const MAX_SIZE = 5000000
const FILE_EXT = '.xml'
const FILE_PART_SUFFIX = '.part'
Поля данных унаследованные от File
const REWRITE = 0
const APPEND = 1

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

 prepareFileName ($fileName)
 reInit ($fileName)
 isSplitNeeded ()
 getFileUrl (File $f)

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

 $documentRoot
 $settings = array()
 $parser = false
 $siteRoot = ''
 $partFile = ''
array $partList = []
int $part = 0
bool $partChanged = false
bool $footerClosed = false
 $urlToSearch = ''
 $urlFound = false
Защищенные данные унаследованные от File
 $filePointer
Защищенные данные унаследованные от FileSystemEntry
 $path
 $originalPath
 $pathPhysical
 $siteId
bool $exists = null

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

Открытые статические члены унаследованные от File
static isFileExists ($path)
static getFileContents ($path)
static putFileContents ($path, $data, $flags=self::REWRITE)
static deleteFile ($path)
Защищенные статические члены унаследованные от FileSystemEntry
static getDocumentRoot ($siteId)

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

Base class for sitemap file

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

Конструктор(ы)

◆ __construct()

__construct ( $fileName,
$settings )

Переопределяет метод предка File.

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

Методы

◆ addEntry()

addEntry ( $entry)

Adds new entry to the current sitemap file

Entry array keys XML_LOC - loc field value XML_LASTMOD - lastmod field value

Аргументы
array$entryEntry array.
Возвращает
void

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

◆ addFileEntry()

addFileEntry ( File $f)

Adds new file entry to the current sitemap

Аргументы
File$fFile to add.
Возвращает
void
Исключения

Bitrix\Main\IO\FileNotFoundException

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

◆ addFooter()

addFooter ( )

Adds footer to the current sitemap part

Возвращает
void

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

◆ addHeader()

addHeader ( )

Adds header to the current sitemap file.

Возвращает
void

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

◆ addIBlockEntry()

addIBlockEntry ( $url,
$modifiedDate )

Adds new IBlock entry to the current sitemap

Аргументы
string$urlIBlock entry URL.
string$modifiedDateIBlock entry modify timestamp.
Возвращает
void

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

◆ appendEntry()

appendEntry ( $entry)

Appends new entry to the existing and finished sitemap file

Entry array keys XML_LOC - loc field value XML_LASTMOD - lastmod field value

Аргументы
array$entryEntry array.
Возвращает
void

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

◆ appendIBlockEntry()

appendIBlockEntry ( $url,
$modifiedDate )

Appends new IBlock entry to the existing finished sitemap

Аргументы
string$urlIBlock entry URL.
string$modifiedDateIBlock entry modify timestamp.
Возвращает
void

Переопределяется в Runtime.

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

◆ getFileUrl()

getFileUrl ( File $f)
protected

Returns file relative path for URL.

Аргументы
File$fFile object.
Возвращает
string

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

◆ getNameList()

getNameList ( )

Returns list of file parts.

Возвращает
array

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

◆ getPathDirectory()

getPathDirectory ( )

Divide path to directory and filemname

Возвращает
string

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

◆ getSiteRoot()

getSiteRoot ( )

Returns sitemap site root

Возвращает
mixed|string

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

◆ getUrl()

getUrl ( )

Returns sitemap file URL

Возвращает
string

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

◆ isCurrentPartNotEmpty()

isCurrentPartNotEmpty ( )

Returns if current sitemap part contains something besides header.

Возвращает
bool

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

◆ isNotEmpty()

isNotEmpty ( )

Returns if the whole sitemap is empty (not only current part).

Возвращает
bool

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

◆ isSplitNeeded()

isSplitNeeded ( )
protected

Checks is it needed to create new part of sitemap file

Возвращает
bool
Исключения

Bitrix\Main\IO\FileNotFoundException

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

◆ parse()

parse ( )

Parses sitemap file

Возвращает
bool|\CDataXML
Исключения

Bitrix\Main\IO\FileNotFoundException

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

◆ prepareFileName()

prepareFileName ( $fileName)
protected

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

◆ reInit()

reInit ( $fileName)
protected

Reinitializes current object with new file name.

Аргументы
string$fileNameNew file name.

Переопределяется в Runtime.

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

◆ removeEntry()

removeEntry ( $url)

Searches and removes entry to the existing and finished sitemap file

Entry array keys XML_LOC - loc field value XML_LASTMOD - lastmod field value

Аргументы
string$urlEntry URL.
Возвращает
string

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

◆ split()

split ( )

Creates next sitemap file part. Returns new part file name.

Возвращает
string

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

Поля

◆ $documentRoot

$documentRoot
protected

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

◆ $footerClosed

bool $footerClosed = false
protected

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

◆ $parser

$parser = false
protected

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

◆ $part

int $part = 0
protected

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

◆ $partChanged

bool $partChanged = false
protected

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

◆ $partFile

$partFile = ''
protected

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

◆ $partList

array $partList = []
protected

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

◆ $settings

$settings = array()
protected

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

◆ $siteRoot

$siteRoot = ''
protected

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

◆ $urlFound

$urlFound = false
protected

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

◆ $urlToSearch

$urlToSearch = ''
protected

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

◆ ENTRY_TPL

const ENTRY_TPL = '<url><loc>%s</loc><lastmod>%s</lastmod></url>'

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

◆ ENTRY_TPL_SEARCH

const ENTRY_TPL_SEARCH = '<url><loc>%s</loc>'

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

◆ FILE_EXT

const FILE_EXT = '.xml'

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

◆ FILE_FOOTER

const FILE_FOOTER = '</urlset>'

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

◆ FILE_HEADER

const FILE_HEADER = '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'

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

◆ FILE_PART_SUFFIX

const FILE_PART_SUFFIX = '.part'

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

◆ MAX_SIZE

const MAX_SIZE = 5000000

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

◆ XML_HEADER

const XML_HEADER = '<?xml version="1.0" encoding="UTF-8"?>'

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

◆ XPATH_URL

const XPATH_URL = '/urlset/url'

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


Объявления и описания членов класса находятся в файле:
  • C:/bitrix/modules/seo/lib/Sitemap/File/Base.php