Table of Contents
BlogspotImporter
Layer: Utility · Source: lib/utility/import-blogspot.php:16 (lines 16–451)
class BlogspotImporter
Blogspot/Blogger XML Importer Utility
Parses Blogger/Ghost export XML files
Docblock Metadata
| Tag | Value |
|---|---|
@category | Utility |
@author | M.Noermoehammad |
@license | MIT |
@version | 1.0 |
@since | Since Release 1.0 |
Inheritance
No parent, interface or trait. This is a root type.
Constants (0)
None.
Properties (5)
| Visibility | Type | Name | Default | Line |
|---|---|---|---|---|
private | (untyped) | $xml | 18 | |
private | (untyped) | $feedId | 19 | |
private | (untyped) | $title | 20 | |
private | (untyped) | $subtitle | 21 | |
private | (untyped) | $url | 22 |
Methods (10)
| Visibility | Method | Summary | Line |
|---|---|---|---|
| public | __construct() | (undocumented) | 24 |
| public | parse() | Parse XML file from string | 39 |
| private | extractFeedInfo() | Extract feed information | 68 |
| public | getSiteInfo() | Get site information | 112 |
| public | getPosts() | Extract all posts from Blogger XML | 127 |
| public | getPages() | Extract all pages from Blogger XML | 295 |
| public | getCategories() | Extract all categories/labels from Blogger XML | 357 |
| private | generateSlug() | Generate unique slug | 404 |
| private | formatDate() | Format date string | 421 |
| private | cleanXmlContent() | Clean XML content | 437 |
__construct()
public function __construct()
lines 24–30 (7)
Takes no parameters.
parse()
public function parse($content)
lines 39–61 (23)
Parse XML file from string
| Parameter | Type | Default | Description |
|---|---|---|---|
$content | (untyped) | required | none |
Returns: (none declared) — bool
Throws: ImportException
extractFeedInfo()
private function extractFeedInfo()
lines 68–105 (38)
Extract feed information
Takes no parameters.
Returns: (none declared) — void
getSiteInfo()
public function getSiteInfo()
lines 112–120 (9)
Get site information
Takes no parameters.
Returns: (none declared) — array
getPosts()
public function getPosts()
lines 127–288 (162)
Extract all posts from Blogger XML
Takes no parameters.
Returns: (none declared) — array
getPages()
public function getPages()
lines 295–350 (56)
Extract all pages from Blogger XML
Takes no parameters.
Returns: (none declared) — array
getCategories()
public function getCategories()
lines 357–395 (39)
Extract all categories/labels from Blogger XML
Takes no parameters.
Returns: (none declared) — array
generateSlug()
private function generateSlug($title, $id = '')
lines 404–413 (10)
Generate unique slug
| Parameter | Type | Default | Description |
|---|---|---|---|
$title | (untyped) | required | none |
$id | (untyped) | '''''' | none |
Returns: (none declared) — string
formatDate()
private function formatDate($date)
lines 421–429 (9)
Format date string
| Parameter | Type | Default | Description |
|---|---|---|---|
$date | (untyped) | required | none |
Returns: (none declared) — string
cleanXmlContent()
private function cleanXmlContent($content)
lines 437–450 (14)
Clean XML content
| Parameter | Type | Default | Description |
|---|---|---|---|
$content | (untyped) | required | none |
Returns: (none declared) — string
This page is generated from source by 'tools/gendoc'. Edits will be overwritten.
