phpDocumentor SGL
cms
[ class tree: SGL ] [ index: SGL ] [ all elements ]

Class: SGL_CmsImport_Strategy_Publisher

Source Location: /lib/CmsImport/Publisher.php

Class SGL_CmsImport_Strategy_Publisher

Class Overview

Enter description here...

Located in /lib/CmsImport/Publisher.php [line 22]

SGL_CmsImport_StrategyAbstract
   |
   --SGL_CmsImport_Strategy_Publisher

Properties

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From SGL_CmsImport_StrategyAbstract

SGL_CmsImport_StrategyAbstract::__construct()
Constructor, accepts options.
SGL_CmsImport_StrategyAbstract::getConfig()
Return strategy config.
SGL_CmsImport_StrategyAbstract::setConfig()
Set strategy config.

[ Top ]
Property Summary
mixed   $conf  

[ Top ]
Method Summary
bool   init()   Checks whether the connection to remote DB could be set up.
array   read()   Reads items from remote SGL Publisher install based on options. Should return array of objects.
bool   write()   Expects array of objects to be written, uses $this->conf['mapping'] options to map remote fields -> cms content fields
object DB   &_getRemoteDB()   Returns instance of PEAR's DB object.

[ Top ]
Properties
mixed   $conf = array(
'db' => array(
'type' => 'mysql_SGL',
'host' => 'localhost',
'protocol' => 'unix',
'socket' => '',
'port' => '3306',
'user' => '',
'pass' => '',
'name' => '',
'prefix' => '',
'postConnect' => "SET NAMES 'utf8'",
),'table'=>array('item'=>'item','item_addition'=>'item_addition','item_type'=>'item_type','item_type_mapping'=>'item_type_mapping',),'fields'=>array('title'=>'Title','description'=>'Description','date_created'=>'Date Created',),'filters'=>array('status'=>'','item_type_id'=>1,'date_created_after'=>'','date_created_before'=>'','orderBy'=>'date_created ASC',),'mapping'=>array('content_type_id'=>'1',// content_type_id => mapping array
'1'=>array('name'=>'title','dateCreated'=>'date_created','introduction'=>'description','body'=>'description','isPublished'=>'',)))
[line 26]
API Tags:
Access:  protected


Redefinition of:
SGL_CmsImport_StrategyAbstract::$conf
Configuration options

[ Top ]
Methods
init  [line 75]

  bool init( )

Checks whether the connection to remote DB could be set up.



[ Top ]
read  [line 102]

  array read( )

Reads items from remote SGL Publisher install based on options. Should return array of objects.



[ Top ]
write  [line 162]

  bool write( [array $aItems = array()]  )

Expects array of objects to be written, uses $this->conf['mapping'] options to map remote fields -> cms content fields

Parameters:
array   $aItems: 


[ Top ]
_getRemoteDB  [line 91]

  object DB &_getRemoteDB( array $conf  )

Returns instance of PEAR's DB object.

Parameters:
array   $conf: 

API Tags:
Access:  protected


[ Top ]

Documentation generated on Thu, 25 Dec 2008 22:04:53 +0000 by phpDocumentor 1.4.1