Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:lib:service:exportservice

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
scriptlog:lib:service:exportservice [2026/09/26 09:09] – admin adminscriptlog:lib:service:exportservice [2026/09/26 09:34] (current) – admin admin
Line 14: Line 14:
 ======= Docblock Metadata ======= ======= Docblock Metadata =======
  
-  ^ Tag ^ Value ^ +^ Tag ^ Value ^ 
-  | ''@category'' | Service Class | +| ''@category'' | Service Class | 
-  | ''@author'' | M.Noermoehammad | +| ''@author'' | M.Noermoehammad | 
-  | ''@license'' | MIT | +| ''@license'' | MIT | 
-  | ''@version'' | 1.0 | +| ''@version'' | 1.0 | 
-  | ''@since'' | Since Release 1.0 |+| ''@since'' | Since Release 1.0 |
  
 ======= Inheritance ======= ======= Inheritance =======
Line 27: Line 27:
 ======= Constants (4) ======= ======= Constants (4) =======
  
-  ^ Visibility ^ Name ^ Value ^ Line ^ +^ Visibility ^ Name ^ Value ^ Line ^ 
-  | ''-'' | ''DESTINATION_WORDPRESS'' | '''wordpress';'' | 36 | +| ''-'' | ''DESTINATION_WORDPRESS'' | '''wordpress';'' | 36 | 
-  | ''-'' | ''DESTINATION_GHOST'' | '''ghost';'' | 37 | +| ''-'' | ''DESTINATION_GHOST'' | '''ghost';'' | 37 | 
-  | ''-'' | ''DESTINATION_BLOGSPOT'' | '''blogspot';'' | 38 | +| ''-'' | ''DESTINATION_BLOGSPOT'' | '''blogspot';'' | 38 | 
-  | ''-'' | ''DESTINATION_SCRIPTLOG'' | '''scriptlog';'' | 39 |+| ''-'' | ''DESTINATION_SCRIPTLOG'' | '''scriptlog';'' | 39 |
  
-======= Properties (0) =======+======= Properties (4) =======
  
-//None declared.//+^ Visibility ^ Type ^ Name ^ Default ^ Line ^ 
 +| ''private'' | ''(untyped)'' | ''$dbc'' |  | 31 | 
 +| ''private'' | ''(untyped)'' | ''$userDao'' |  | 32 | 
 +| ''private'' | ''(untyped)'' | ''$authorId'' |  | 33 | 
 +| ''private'' | ''(untyped)'' | ''$exportStats'' |  | 34 |
  
 ======= Methods (16) ======= ======= Methods (16) =======
  
-  ^ Visibility ^ Method ^ Summary ^ Line ^ +^ Visibility ^ Method ^ Summary ^ Line ^ 
-  | public | ''__construct()'' | ExportService constructor. | 46 | +| public | ''__construct()'' | ExportService constructor. | 46 | 
-  | public | ''setAuthorId()'' | Set author ID for filtering content (optional) | 65 | +| public | ''setAuthorId()'' | Set author ID for filtering content (optional) | 65 | 
-  | public | ''getStats()'' | Get export statistics | 75 | +| public | ''getStats()'' | Get export statistics | 75 | 
-  | public | ''resetStats()'' | Reset export statistics | 85 | +| public | ''resetStats()'' | Reset export statistics | 85 | 
-  | public | ''getExportUsers()'' | Get users available as export authors for the export form. | 102 | +| public | ''getExportUsers()'' | Get users available as export authors for the export form. | 102 | 
-  | public | ''exportToWordPress()'' | Export content to WordPress WXR format | 114 | +| public | ''exportToWordPress()'' | Export content to WordPress WXR format | 114 | 
-  | public | ''exportToGhost()'' | Export content to Ghost JSON format | 143 | +| public | ''exportToGhost()'' | Export content to Ghost JSON format | 143 | 
-  | public | ''exportToBlogspot()'' | Export content to Blogspot XML format | 172 | +| public | ''exportToBlogspot()'' | Export content to Blogspot XML format | 172 | 
-  | public | ''exportToScriptlog()'' | Export content to Scriptlog native JSON format | 202 | +| public | ''exportToScriptlog()'' | Export content to Scriptlog native JSON format | 202 | 
-  | protected | ''getPosts()'' | Get posts for export | 232 | +| protected | ''getPosts()'' | Get posts for export | 232 | 
-  | protected | ''getPages()'' | Get pages for export | 275 | +| protected | ''getPages()'' | Get pages for export | 275 | 
-  | protected | ''getCategories()'' | Get categories/topics for export | 319 | +| protected | ''getCategories()'' | Get categories/topics for export | 319 | 
-  | protected | ''getPostCategories()'' | Get categories associated with a post | 336 | +| protected | ''getPostCategories()'' | Get categories associated with a post | 336 | 
-  | protected | ''getPostTags()'' | Get tags from post_tags field (comma-separated) | 354 | +| protected | ''getPostTags()'' | Get tags from post_tags field (comma-separated) | 354 | 
-  | protected | ''getPostComments()'' | Get comments for a post | 373 | +| protected | ''getPostComments()'' | Get comments for a post | 373 | 
-  | protected | ''sanitizeInput()'' | Sanitize input for export | 391 |+| protected | ''sanitizeInput()'' | Sanitize input for export | 391 |
  
  
Line 68: Line 72:
 ExportService constructor. ExportService constructor.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$userDao'' | [[scriptlog:lib:dao:userdao|''UserDao'']] | //required// | Data access for export author lookups |+|  ''$userDao'' |  [[scriptlog:lib:dao:userdao|''UserDao'']] |  //required// |  Data access for export author lookups |
  
  
Line 82: Line 86:
 Set author ID for filtering content (optional) Set author ID for filtering content (optional)
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$authorId'' | ''(untyped)'' | //required// | //none// |+|  ''$authorId'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' **Returns:** ''(none declared)''
Line 207: Line 211:
 Get posts for export Get posts for export
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$authorId'' | ''(untyped)'' | ''null'' | //none// |+|  ''$authorId'' |  ''(untyped)'' |  ''null'' |  //none// |
  
 **Returns:** ''(none declared)'' — array **Returns:** ''(none declared)'' — array
Line 223: Line 227:
 Get pages for export Get pages for export
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$authorId'' | ''(untyped)'' | ''null'' | //none// |+|  ''$authorId'' |  ''(untyped)'' |  ''null'' |  //none// |
  
 **Returns:** ''(none declared)'' — array **Returns:** ''(none declared)'' — array
Line 254: Line 258:
 Get categories associated with a post Get categories associated with a post
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$postId'' | ''(untyped)'' | //required// | //none// |+|  ''$postId'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — array **Returns:** ''(none declared)'' — array
Line 270: Line 274:
 Get tags from post_tags field (comma-separated) Get tags from post_tags field (comma-separated)
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$tagsField'' | ''(untyped)'' | //required// | //none// |+|  ''$tagsField'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — array **Returns:** ''(none declared)'' — array
Line 286: Line 290:
 Get comments for a post Get comments for a post
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$postId'' | ''(untyped)'' | //required// | //none// |+|  ''$postId'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — array **Returns:** ''(none declared)'' — array
Line 302: Line 306:
 Sanitize input for export Sanitize input for export
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$input'' | ''(untyped)'' | //required// | //none// |+|  ''$input'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — string **Returns:** ''(none declared)'' — string
Line 309: Line 313:
 ======= Imports ======= ======= Imports =======
  
-  ^ Alias ^ Fully-qualified name ^ +^ Alias ^ Fully-qualified name ^ 
-  | ''ExportException'' | [[scriptlog:lib:core:exportexception|''Scriptlog\Core\ExportException'']] | +| ''ExportException'' | [[scriptlog:lib:core:exportexception|''Scriptlog\Core\ExportException'']] | 
-  | ''Registry'' | [[scriptlog:lib:core:registry|''Scriptlog\Core\Registry'']] | +| ''Registry'' | [[scriptlog:lib:core:registry|''Scriptlog\Core\Registry'']] | 
-  | ''Sanitize'' | [[scriptlog:lib:core:sanitize|''Scriptlog\Core\Sanitize'']] | +| ''Sanitize'' | [[scriptlog:lib:core:sanitize|''Scriptlog\Core\Sanitize'']] | 
-  | ''UserDao'' | [[scriptlog:lib:dao:userdao|''Scriptlog\Dao\UserDao'']] | +| ''UserDao'' | [[scriptlog:lib:dao:userdao|''Scriptlog\Dao\UserDao'']] | 
-  | ''BlogspotExporter'' | [[scriptlog:lib:utility:blogspotexporter|''BlogspotExporter'']] | +| ''BlogspotExporter'' | [[scriptlog:lib:utility:blogspotexporter|''BlogspotExporter'']] | 
-  | ''GhostExporter'' | [[scriptlog:lib:utility:ghostexporter|''GhostExporter'']] | +| ''GhostExporter'' | [[scriptlog:lib:utility:ghostexporter|''GhostExporter'']] | 
-  | ''ScriptlogExporter'' | [[scriptlog:lib:utility:scriptlogexporter|''ScriptlogExporter'']] | +| ''ScriptlogExporter'' | [[scriptlog:lib:utility:scriptlogexporter|''ScriptlogExporter'']] | 
-  | ''WordPressExporter'' | [[scriptlog:lib:utility:wordpressexporter|''WordPressExporter'']] |+| ''WordPressExporter'' | [[scriptlog:lib:utility:wordpressexporter|''WordPressExporter'']] |
  
  
scriptlog/lib/service/exportservice.1790413760.txt.gz · Last modified: by admin