Docs For Class atkImportHandler
Atk API home Class tree Element index

Todo list

Packages: » atk Classes: general » AllTests » atkConfig » atkController » atkDataNode » atkErrorHandlerBase » atkFileEditor » atkLanguage » atkMailErrorHandler » atkMetaNode » atkMockNode » atkNode » atkNodeValidator » atkOneToManyRelationSessionGridHandler » atkPHPView » atkSessionStore » atkStatementIterator » atkTreeNode » atkWizardBase » atkZendPlatformErrorHandler » clsTbsDataSource » clsTbsLocator » clsTinyButStrong » clsTinyButStrongOOo » FCKeditor » getSupportedLanguagesCollector » layout » node » sql_whereclause_blacklist_checker » test » tree utils » atkAbstractFrame » atkActionListener » atkClassFinder » atkClassLoader » atkCompatSelector » atkDataHolder » atkDebugger » atkDirectoryTraverser » atkEventLog » atkFileUtils » atkFrame » atkFrameSet » atkIpUtils » atkJSON » atkMail » atkMailer » atkMessageQueue » atkMLSelector » atkmlsplitter » atkRootFrameset » atkSelector » atkSelectorIterator » atkString » atkStringParser » atkTableRenderer » atkTableRendererGrouped » atkTextMarker » atkTmpFile » atkTriggerListener » atkYAML » atkZip » browserInfo fixture » atkAbstractFixtureLoader » atkFixtureManager » atkPHPFixtureLoader » atkYAMLFixtureLoader testcases » atkAbstractSearchHandler ui » atkActionBoxBuilder » atkDialog » atkIndexPage » atkOutput » atkPage » atkPageBuilder » atkTheme » atkThemeCompiler » atkUI handlers » atkActionHandler » atkAddHandler » atkAddOrCopyHandler » atkAdminHandler » atkAttributeEditHandler » atkCopyHandler » atkDeleteHandler » atkDocumentHandler » atkEditCopyHandler » atkEditHandler » atkExportHandler » atkFeedbackHandler » atkFileExport » atkImportHandler » atkMultiSelectHandler » atkMultiUpdatehandler » atkSaveHandler » atkSearchHandler » atkSelectHandler » atkSmartSearchHandler » atkUpdatehandler » atkViewEditBase » atkViewHandler » atkXmlHandler attributes » atkAggregatedColumn » atkAttribute » atkBoolAttribute » atkCalculatorAttribute » atkCaptchaAttribute » atkColorPickerAttribute » atkCountryAttribute » atkCreatedByAttribute » atkCreateStampAttribute » atkCurrencyAttribute » atkDateAttribute » atkDateTimeAttribute » atkDocumentAttribute » atkDummyAttribute » atkDurationAttribute » atkEmailAttribute » atkExpressionAttribute » atkFckAttribute » atkFieldSet » atkFileAttribute » atkFileWriterAttribute » atkFlagAttribute » atkFormatAttribute » atkFuzzySearchAttribute » atkHiddenAttribute » atkHtmlAttribute » atkIpAttribute » atkListAttribute » atkLiveTextPreview » atkMlAttribute » atkMlFckAttribute » atkMlHtmlAttribute » atkMlNumberAttribute » atkMlSelectorAttribute » atkMlTextAttribute » atkMlWrapper » atkMultipleFileAttribute » atkMultiSelectAttribute » atkNumberAttribute » atkParserAttribute » atkPasswordAttribute » atkProfileAttribute » atkRadioAttribute » atkRadioDetailsAttribute » atkRowCounter » atkStateAttribute » atkTabbedPane » atkTagAttribute » atkTextAttribute » atkTimeAttribute » atkTimeZoneAttribute » atkToolbar » atkUpdatedByAttribute » atkUpdateStampAttribute » atkUrlAttribute » atkWeekdayAttribute » atkWysiwygAttribute datatypes » atkArrayDt » atkDataType » atkStringDt » atkTime subpackage » atkAttributeTestCase security » atkBajusEncryption » atkBase64Encryption » atkEncryption » atkMockSecurityManager » atkOpenSSLEncryption » atkSecurityListener » atkSecurityManager » atkUrlVault » auth_config » auth_db » auth_imap » auth_interface » auth_ldap » auth_none » auth_pop3 » auth_saml » auth_server » auth_sspi cache » atkCache » atkCache_apc » atkCache_eaccelerator » atkCache_file » atkCache_memcache » atkCache_var » atkCache_xcache » atkCache_zp_disk » atkCache_zp_output » atkCache_zp_shm test » atkCacheTestCase » atkPluginTestCase » atkTestCase » test_sql_whereclause_blacklist_checker db » atkClusterDb » atkClusterDDL » atkClusterQuery » atkDb » atkdb2db » atkDb2DDL » atkDb2Query » atkDDL » atki5db » atki5DDL » atki5query » atkMockDb » atkMockDDL » atkMockQuery » atkMsSqlDb » atkMsSqlDDL » atkMssqlQuery » atkMysqlDb » atkMysqlDDL » atkMysqliDb » atkMysqliDDL » atkMysqliQuery » atkMysqlQuery » atkOci8Db » atkOci8DDL » atkOci8Query » atkOci9Db » atkOci9DDL » atkOci9Query » atkOci805Db » atkOci805Query » atkPgsqlDb » atkPgsqlDDL » atkPgsqlQuery » atkQuery recordlist » atkColumnConfig » atkCSVRecordList » atkCustomRecordList » atkExcelCSVRecordList » atkHTMLRecordList » atkPrintableRecordList » atkRecordList » atkRecordlistCache » atkTotalizer db-statement » atkCompatStatement » atkMySQLiStatement » atkStatement » atkStatementException » atkStatementParser console » atkConsoleController menu » atkcookmenu » atkDhtmlMenu » atkDropdownMenu » atkFramesMenu » atkMenu » atkmenuinterface » atkModernMenu » atkOutlookMenu » atkPlainMenu datagrid » atkDataGrid » atkDGComponent » atkDGEditControl » atkDGEvent » atkDGIndex » atkDGLimit » atkDGList » atkDGNoRecordsFound » atkDGPaginator » atkDGRenderer » atkDGSummary lock » atkDbLock » atkLock filters » atkDistinctFilter » atkFilter » atkGroupByFilter document » atkDocumentWriter » atkDocxWriter » atkOpenDocumentWriter meta » atkDutchMetaGrammar » atkMetaAttributeModifier » atkMetaCompiler » atkMetaGrammar » atkMetaPolicy » mod_meta relations » atkExtendableShuttleRelation » atkManyBoolRelation » atkManyToManyListRelation » atkManyToManyRelation » atkManyToManySelectRelation » atkManyToOneRelation » atkManyToOneTreeRelation » atkMatrixRelation » atkOneToManyRelation » atkOneToOneRelation » atkPolymorphicOneToOneRelation » atkRelation » atkSecureRelation » atkShuttleControl » atkShuttleFilter » atkShuttleRelation front » atkFrontController » atkFrontControllerBridge keyboard » atkKeyboard meta-relations » atkMetaExtendableShuttleRelation » atkMetaManyBoolRelation » atkMetaManyToManyListRelation » atkMetaManyToManySelectRelation » atkMetaManyToOneRelation » atkMetaOneToManyRelation » atkMetaOneToOneRelation » atkMetaShuttleRelation session » atkMockSessionManager » atkSessionManager » atkState modules » atkModule » mod_test listeners » atkRecycleBin interface » atkServer » atkSoapServer wizard » atkWizard » AtkWizardActionLoader » atkWizardPanel
Interfaces: datagrid » atkDGListener interface » atkServerInterface
Files: general » adodb-time.inc.php » AllTests.php » atknodetools.inc » atktools.inc » atktreetools.inc » basexml.php » bootstrap.inc » bootstrap.php » class.atkconfig.inc » class.atkcontroller.inc » class.atkdatanode.inc » class.atkerrorhandlerbase.inc » class.atkfileeditor.inc » class.atki5db.inc » class.atki5ddl.inc » class.atki5query.inc » class.atklanguage.inc » class.atkmailerrorhandler.inc » class.atkmetanode.inc » class.atkmocknode.inc » class.atkmocksessionmanager.inc » class.atknode.inc » class.atknodevalidator.inc » class.atkonetomanyrelationsessiongridhandler.inc » class.atkphpview.inc » class.atkpolymorphiconetoonerelation.inc » class.atksessionstore.inc » class.atkstatementiterator.inc » class.atktreenode.inc » class.atkwizardbase.inc » class.atkzendplatformerrorhandler.inc » class.layout.inc » class.nodename.inc » class.sql_whereclause_blacklist_checker.inc » class.test.inc » class.test_sql_whereclause_blacklist_checker.inc » commands.php » config.modules.inc » config.php » connector.php » console.php » db2yaml.php » defaultconfig.inc.php » fckeditor.php » fckeditor_php4.php » fckeditor_php5.php » io.php » module.inc » phpcompat.php » server.php » spellchecker.php » table2yaml.php » tbsooo_class.php » tbs_class.php » tooltip.tpl.php » upload.php » util.php » version.inc attributes » class.atkaggregatedcolumn.inc » class.atkattribute.inc » class.atkboolattribute.inc » class.atkcalculatorattribute.inc » class.atkcaptchaattribute.inc » class.atkcolorpickerattribute.inc » class.atkcountryattribute.inc » class.atkcreatedbyattribute.inc » class.atkcreatestampattribute.inc » class.atkcurrencyattribute.inc » class.atkdateattribute.inc » class.atkdatetimeattribute.inc » class.atkdocumentattribute.inc » class.atkdummyattribute.inc » class.atkdurationattribute.inc » class.atkemailattribute.inc » class.atkexpressionattribute.inc » class.atkfckattribute.inc » class.atkfieldset.inc » class.atkfileattribute.inc » class.atkfilewriterattribute.inc » class.atkflagattribute.inc » class.atkformatattribute.inc » class.atkfuzzysearchattribute.inc » class.atkhiddenattribute.inc » class.atkhtmlattribute.inc » class.atkipattribute.inc » class.atklistattribute.inc » class.atklivetextpreview.inc » class.atkmlattribute.inc » class.atkmlfckattribute.inc » class.atkmlhtmlattribute.inc » class.atkmlnumberattribute.inc » class.atkmlselectorattribute.inc » class.atkmltextattribute.inc » class.atkmlwrapper.inc » class.atkmultiplefileattribute.inc » class.atkmultiselectattribute.inc » class.atknumberattribute.inc » class.atkparserattribute.inc » class.atkpasswordattribute.inc » class.atkprofileattribute.inc » class.atkradioattribute.inc » class.atkradiodetailsattribute.inc » class.atkrowcounter.inc » class.atkstateattribute.inc » class.atktabbedpane.inc » class.atktagattribute.inc » class.atktextattribute.inc » class.atktimeattribute.inc » class.atktimezoneattribute.inc » class.atktoolbar.inc » class.atkupdatedbyattribute.inc » class.atkupdatestampattribute.inc » class.atkurlattribute.inc » class.atkweekdayattribute.inc » class.atkwysiwygattribute.inc attributes-- » property_accessor.php cache » class.atkcache.inc » class.atkcache_apc.inc » class.atkcache_eaccelerator.inc » class.atkcache_file.inc » class.atkcache_memcache.inc » class.atkcache_var.inc » class.atkcache_xcache.inc » class.atkcache_zp_disk.inc » class.atkcache_zp_output.inc » class.atkcache_zp_shm.inc console » class.atkconsolecontroller.inc datagrid » class.atkdatagrid.inc » class.atkdgcomponent.inc » class.atkdgeditcontrol.inc » class.atkdgevent.inc » class.atkdgindex.inc » class.atkdglimit.inc » class.atkdglist.inc » class.atkdglistener.inc » class.atkdgnorecordsfound.inc » class.atkdgpaginator.inc » class.atkdgrenderer.inc » class.atkdgsummary.inc datatypes » class.atkarraydt.inc » class.atkdatatype.inc » class.atkstringdt.inc » class.atktimedt.inc db » class.atkclusterdb.inc » class.atkclusterddl.inc » class.atkclusterquery.inc » class.atkdb.inc » class.atkdb2db.inc » class.atkdb2ddl.inc » class.atkdb2query.inc » class.atkddl.inc » class.atkmockdb.inc » class.atkmockddl.inc » class.atkmockquery.inc » class.atkmssqldb.inc » class.atkmssqlddl.inc » class.atkmssqlquery.inc » class.atkmysqldb.inc » class.atkmysqlddl.inc » class.atkmysqlidb.inc » class.atkmysqliddl.inc » class.atkmysqliquery.inc » class.atkmysqlquery.inc » class.atkoci8db.inc » class.atkoci8ddl.inc » class.atkoci8query.inc » class.atkoci9db.inc » class.atkoci9ddl.inc » class.atkoci9query.inc » class.atkoci805db.inc » class.atkoci805query.inc » class.atkpgsqldb.inc » class.atkpgsqlddl.inc » class.atkpgsqlquery.inc » class.atkquery.inc db-statement » class.atkcompatstatement.inc » class.atkmysqlistatement.inc » class.atkstatement.inc » class.atkstatementexception.inc » class.atkstatementparser.inc document » class.atkdocumentwriter.inc » class.atkdocxwriter.inc » class.atkopendocumentwriter.inc filters » class.atkdistinctfilter.inc » class.atkfilter.inc » class.atkgroupbyfilter.inc fixture » class.atkabstractfixtureloader.inc » class.atkfixturemanager.inc » class.atkphpfixtureloader.inc » class.atkyamlfixtureloader.inc front » class.atkfrontcontroller.inc » class.atkfrontcontrollerbridge.inc handlers » class.atkactionhandler.inc » class.atkaddhandler.inc » class.atkaddorcopyhandler.inc » class.atkadminhandler.inc » class.atkattributeedithandler.inc » class.atkcopyhandler.inc » class.atkdeletehandler.inc » class.atkdocumenthandler.inc » class.atkeditcopyhandler.inc » class.atkedithandler.inc » class.atkexporthandler.inc » class.atkfeedbackhandler.inc » class.atkfileexport.inc » class.atkimporthandler.inc » class.atkmultiselecthandler.inc » class.atkmultiupdatehandler.inc » class.atksavehandler.inc » class.atksearchhandler.inc » class.atkselecthandler.inc » class.atksmartsearchhandler.inc » class.atkupdatehandler.inc » class.atkvieweditbase.inc » class.atkviewhandler.inc » class.atkxmlhandler.inc include » autoload.inc » basics.inc » compatibility.inc » configs.inc » debugging.inc » errorhandler.inc » globals.inc » initial.inc » security.inc interface » class.atkserver.inc » class.atksoapserver.inc » interface.atkserverinterface.inc javascript » class.atkmultilanguage.js.php » class.atkprofileattribute.js.php » dhtml_tabs.js.php keyboard » class.atkkeyboard.inc listeners » class.atkrecyclebin.inc lock » class.atkdblock.inc » class.atklock.inc » lock.php lock-- » lock.js.php menu » atkmenutools.inc » class.atkcookmenu.inc » class.atkdhtmlmenu.inc » class.atkdropdownmenu.inc » class.atkframesmenu.inc » class.atkmenu.inc » class.atkmenuinterface.inc » class.atkmodernmenu.inc » class.atkoutlookmenu.inc » class.atkplainmenu.inc meta » class.atkdutchmetagrammar.inc » class.atkmetaattributemodifier.inc » class.atkmetacompiler.inc » class.atkmetagrammar.inc » class.atkmetapolicy.inc » module.inc meta-relations » class.atkmetaextendableshuttlerelation.inc » class.atkmetamanyboolrelation.inc » class.atkmetamanytomanylistrelation.inc » class.atkmetamanytomanyselectrelation.inc » class.atkmetamanytoonerelation.inc » class.atkmetaonetomanyrelation.inc » class.atkmetaonetoonerelation.inc » class.atkmetashuttlerelation.inc modules » class.atkmodule.inc modules-- » atkmoduletools.inc popups » colorpicker.inc recordlist » class.atkcolumnconfig.inc » class.atkcsvrecordlist.inc » class.atkcustomrecordlist.inc » class.atkexcelcsvrecordlist.inc » class.atkhtmlrecordlist.inc » class.atkprintablerecordlist.inc » class.atkrecordlist.inc » class.atkrecordlistcache.inc » class.atktotalizer.inc relations » class.atkextendableshuttlerelation.inc » class.atkmanyboolrelation.inc » class.atkmanytomanylistrelation.inc » class.atkmanytomanyrelation.inc » class.atkmanytomanyselectrelation.inc » class.atkmanytoonerelation.inc » class.atkmanytoonetreerelation.inc » class.atkmatrixrelation.inc » class.atkonetomanyrelation.inc » class.atkonetoonerelation.inc » class.atkrelation.inc » class.atksecurerelation.inc » class.atkshuttlecontrol.inc » class.atkshuttlefilter.inc » class.atkshuttlerelation.inc security » class.atkbajusencryption.inc » class.atkbase64encryption.inc » class.atkencryption.inc » class.atkmocksecuritymanager.inc » class.atkmocksecuritymanager.inc » class.atkopensslencryption.inc » class.atksecuritylistener.inc » class.atksecuritymanager.inc » class.atkurlvault.inc » class.auth_config.inc » class.auth_db.inc » class.auth_imap.inc » class.auth_interface.inc » class.auth_ldap.inc » class.auth_none.inc » class.auth_pop3.inc » class.auth_saml.inc » class.auth_server.inc » class.auth_sspi.inc session » class.atksessionmanager.inc » class.atkstate.inc skel » app.php » atk.inc » config.inc.php » debugger.php » dispatch.php » include.php » index.php » menu.php » top.php » welcome.php subpackage » class.atkattributetestcase.inc test » class.atkcachetestcase.inc » class.atkplugintestcase.inc » class.atktestcase.inc testcases » class.atkabstractsearchhandler.inc themes » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc ui » block.atknavigator.php » block.atknavigatorinfo.php » class.atkactionboxbuilder.inc » class.atkdialog.inc » class.atkindexpage.inc » class.atkoutput.inc » class.atkpage.inc » class.atkpagebuilder.inc » class.atktheme.inc » class.atkthemecompiler.inc » class.atkui.inc » function.atkconf.php » function.atkconfig.php » function.atkdatefield.php » function.atkdispatchfile.php » function.atkfrontcontroller.php » function.atkloadscript.php » function.atkmessages.php » function.atkmoduledir.php » function.atkscript.php » function.atkstyle.php » function.atktext.php » function.atkthemeicon.php » function.atkthemeimg.php » function.stacktrace.php » modifier.atkjson.php » modifier.atkvardump.php » resource.string.php » resource.theme.php » resource.ui.php utils » atkbrowsertools.inc » class.atkactionlistener.inc » class.atkclassloader.inc » class.atkcompatselector.inc » class.atkdataholder.inc » class.atkdebugger.inc » class.atkdirectorytraverser.inc » class.atkeventlog.inc » class.atkfileutils.inc » class.atkframeset.inc » class.atkiputils.inc » class.atkjson.inc » class.atkmail.inc » class.atkmailer.inc » class.atkmessagequeue.inc » class.atkmlselector.inc » class.atkmlsplitter.inc » class.atkselector.inc » class.atkselectoriterator.inc » class.atkstring.inc » class.atkstringparser.inc » class.atktablerenderer.inc » class.atktablerenderergrouped.inc » class.atktextmarker.inc » class.atktmpfile.inc » class.atktriggerlistener.inc » class.atkyaml.inc » class.atkzip.inc » help.inc wizard » class.atkwizard.inc » class.atkwizardactionloader.inc » class.atkwizardpanel.inc
Home  ->  Documentation home  ->  Atk index  ->  Docs For Class atkImportHandler [ package: atk ]

Class: atkImportHandler

Source Location: /handlers/class.atkimporthandler.inc

Class atkImportHandler

Inherited from parent

Inherited Properties Inherited Methods

Inherited From atkActionHandler

atkActionHandler::$m_action
atkActionHandler::$m_boxTemplate
atkActionHandler::$m_node
atkActionHandler::$m_partial
atkActionHandler::$m_rejecting
atkActionHandler::$m_renderBoxVars
atkActionHandler::$m_renderMode
atkActionHandler::$m_returnbehaviour

Inherited From atkActionHandler

atkActionHandler::atkActionHandler()
Default constructor.
atkActionHandler::addRenderBoxVar()
Add a variable to the renderbox
atkActionHandler::allowed()
Current action allowed on the given record?
atkActionHandler::clearCache()
Clear the recordlist cache
atkActionHandler::closeDialog()
Output JavaScript to close the dialog.
atkActionHandler::getCSRFToken()
Get/generate CSRF token for the current session stack.
atkActionHandler::getDefaultHandler()
Static factory method to get the default action handler for a certain action.
atkActionHandler::getNode()
Returns the node object.
atkActionHandler::getPage()
Get the page instance for generating output.
atkActionHandler::getRecordlistCache()
Get the cached recordlist
atkActionHandler::getRejectInfo()
Get the reject info from the session This is used by the atkAddHandler and atkEditHandler to show the validation errors
atkActionHandler::getRenderMode()
Returns the render mode.
atkActionHandler::getReturnBehaviour()
Get the returnbehaviour of this action
atkActionHandler::getUi()
Get the ui instance for drawing and templating purposes.
atkActionHandler::handle()
The handle() method handles the action.
atkActionHandler::invoke()
Generic method invoker.
atkActionHandler::isValidCSRFToken()
Checks whatever the given CSRF token matches the one stored in the session stack.
atkActionHandler::modifyDataGrid()
Modify grid.
atkActionHandler::notify()
Notify the node that an action has occured
atkActionHandler::partial()
Handle partial.
atkActionHandler::renderAccessDeniedDialog()
Render access denied dialog contents.
atkActionHandler::renderAccessDeniedPage()
Render access denied page.
atkActionHandler::renderMessageDialog()
Render message dialog contents.
atkActionHandler::setAction()
Sets the current action.
atkActionHandler::setBoxTemplate()
atkActionHandler::setNode()
Set the calling node of the current action.
atkActionHandler::setPostvars()
Set postvars of the the calling node of the current action.
atkActionHandler::setRejectInfo()
Store the reject info in the session This is used by the atkSaveHandler and atkUpdateHandler to store the record if the record is not validated
atkActionHandler::setRenderMode()
Sets the render mode ("box" or "dialog").
atkActionHandler::setReturnBehaviour()
Set the returnbehaviour of this action
atkActionHandler::updateDialog()
Outputs JavaScript for updating the existing dialog contents.
atkActionHandler::_getAccessDeniedPage()
Get the access denied page

[ Top ]

Property Summary

mixed   $m_importNode  

[ Top ]

Method Summary

void   action_import()   The action handler.
bool   add()   Add a valid record to the db
void   addRecords()   Adds the validated records but checks for errors first
void   addToRecord()   Add one value to the record
Array   checkAllFields()   Checks the allfield for correct data
array   checkImport()   Checks the import by the col_map and the initial_values Check if all obligatory fields are used in the col_map or the initial_values Check if there are no fields used twice
void   doAnalyze()   This function shows a form where the user can choose the mapping of the column, an allfield and if the first record must be past over
void   doImport()   The real import function actually imports the importfile
void   doInit()   This function shows a form to upload a .csv
void   doProcess()   This function checks if there is enough information to import the date
void   doUpload()   This function takes care of uploaded file
int   estimateColumnCount()   Counts the number of columns in the first row
String   estimateDelimiter()   Gets the char which is used for enclosure in the csv-file
String   estimateEnclosure()   Gets the char which is used for enclosure in the csv-file
Array   fgetcsvfromarray()   Get data from each line
void   fgetcsvfromline()  
mixed   getAllFieldsValues()   Add the allField to the col_map array
String   getAttributeSelector()   Returns a dropdownlist with all possible field in the importnode
Array   getAttributesTranslation()   Make a record of translations of the given attributes
void   getImportButtons()   Get import buttons.
array   getIntegratedAttributes()   Get al attributes from the import node that have the flag AF_ONETOONE_INTEGRATE
Array   getObligatoryAttributes()   Gives all obligatory attributes
int   getRowCount()   Returns the CSV line count.
Array   getSampleRows()   Get the first 5 lines from the csv-file
string   getTmpFileDestination()   Get the destination of the uploaded csv-file
object instance   &getUsableAttribute()   Get the real attribute (instance) by his name
Array   getUsableAttributes()   Gives all the attributes that can be used for the import
Array   getValidatedRecords()   Get the validated records
mixed   getValueFromRecord()   Gets a raw value from a record with ATK values for a specific attribute
boolean   hasRelationAttribute()   Check whether the attribute has a relation (only manytoonerelations)
void   importHeader()   Import header.
void   importPage()   Create import page for the given phase.
mixed   inArray()   The same als the php function array_search, but now much better.
Array   initColmap()   Tries to make a default col_map with the first record of the csv-file
boolean   integrateAttribute()   Checks whether the attribute has the flag AF_ONETOONE_INTEGRATE
boolean   isHide()   Checks whether the attribute is hiden by a flag
boolean   isObligatory()   Checks whether the attribute is obligatory
mixed   isRelationAttribute()   Check whether the attribute is part of a relation
bool   prepareUpdateRecord()   Here we prepare our record for updating or return false,
void   setImportNode()   Sets the import node. By default this is the same node as set by setNode, but if you call this method after the setNode call you can override the import node.
void   setNode()   Sets the node for this handler. Implicitly sets the import node too!
bool   showErrors()   Determines wether or not errors occurred and shows the analyze screen if errors occurred.
bool   update()   Update a record in the db
bool   validate()   Check whether the record if valide to import
void   validateRecord()   Validates a record
String   _getAnalyseExtraOptions()   Returns the extra options of the importhandler
String   _getAnalyseHeader()   Returns the HTML header for the 'analyse' mode of the import handler
void   _getAnalyseSample()   Returns a sample of the analysis
mixed   _getAttributeValue()   Gets the ATK value of the attribute
Array   _getDuplicateColumns()   Array with columns
String   _getErrors()   Transforms the $importerrors array into displayable HTML
String   _getSampleValue()   Gets the displayable value for the attribute
void   _returnErrors()   Checks if there are errors and if there are then it adds it to the collection
bool   _usableForImport()   Check if an attribute is usable for import.

[ Top ]

Properties

mixed   $m_importNode [line 30]

[ Top ]

Methods

action_import  [line 36]

  void action_import( bool 0  )

The action handler.

Parameters:
bool   0:  Always true


[ Top ]
add  [line 1315]

  bool add( &$record, Array $record  )

Add a valid record to the db

Parameters:
Array   $record:  The record to add
   &$record: 

API Tags:
Return:  Wether or not there were errors


[ Top ]
addRecords  [line 1283]

  void addRecords( &$importerrors, &$validatedrecs, Array $importerrors, Array $validatedrecs  )

Adds the validated records but checks for errors first

Parameters:
Array   $importerrors:  Errors that occurred during validation of importfile
Array   $validatedrecs:  Records that were validated
   &$importerrors: 
   &$validatedrecs: 


[ Top ]
addToRecord  [line 862]

  void addToRecord( &$record, String $attrname, String $value, Array $record  )

Add one value to the record

Parameters:
Array   $record:  the record wich will be changed
String   $attrname:  the name of the attribute
String   $value:  the value of that attribute
   &$record: 


[ Top ]
checkAllFields  [line 1448]

  Array checkAllFields( Array $fields, Array &$values  )

Checks the allfield for correct data

Parameters:
Array   $fields:  The fields
Array   &$values:  The values of the fields

API Tags:
Return:  An array with an error message, if an error occurred


[ Top ]
checkImport  [line 1393]

  array checkImport( array $col_map, array $initial_values  )

Checks the import by the col_map and the initial_values Check if all obligatory fields are used in the col_map or the initial_values Check if there are no fields used twice

Parameters:
array   $col_map:  The use of the fields for the columns in the csv
array   $initial_values:  The initial_values of the importnode

API Tags:
Return:  An array with errors, if there are any


[ Top ]
doAnalyze  [line 234]

  void doAnalyze( string $fileid, [array $importerrors = array()]  )

This function shows a form where the user can choose the mapping of the column, an allfield and if the first record must be past over

Parameters:
string   $fileid:  the id of the uploaded file
array   $importerrors:  An array with the import errors


[ Top ]
doImport  [line 1038]

  void doImport( [Bool $nopost = false]  )

The real import function actually imports the importfile

Parameters:
Bool   $nopost: 


[ Top ]
doInit  [line 174]

  void doInit( bool 0  )

This function shows a form to upload a .csv

Parameters:
bool   0:  Always true


[ Top ]
doProcess  [line 213]

  void doProcess( )

This function checks if there is enough information to import the date

else it wil shows a form to set how the file wil be imported



[ Top ]
doUpload  [line 194]

  void doUpload( )

This function takes care of uploaded file



[ Top ]
estimateColumnCount  [line 597]

  int estimateColumnCount( Array $rows, String $delimiter  )

Counts the number of columns in the first row

Parameters:
Array   $rows:  The rows from the csv-file
String   $delimiter:  The char which seperate the fields

API Tags:
Return:  The number of columns


[ Top ]
estimateDelimiter  [line 570]

  String estimateDelimiter( Array $rows  )

Gets the char which is used for enclosure in the csv-file

Parameters:
Array   $rows:  The rows from the csv-file

API Tags:
Return:  The enclosure


[ Top ]
estimateEnclosure  [line 584]

  String estimateEnclosure( Array $rows  )

Gets the char which is used for enclosure in the csv-file

Parameters:
Array   $rows:  The rows from the csv-file

API Tags:
Return:  The enclosure


[ Top ]
fgetcsvfromarray  [line 555]

  Array fgetcsvfromarray( Array $arr, int $columncount, [String $delimiterChar = ','], [String $enclosureChar = '"']  )

Get data from each line

Parameters:
Array   $arr:  An array with the lines from the CSV file
int   $columncount:  The number of columns in the file
String   $delimiterChar:  The delimeter character
String   $enclosureChar:  The enclosure character

API Tags:
Return:  An array with the CSV data


[ Top ]
fgetcsvfromline  [line 647]

  void fgetcsvfromline( $line, $columncount, [ $delimiterChar = ','], [ $enclosureChar = '"']  )

Parameters:
   $line: 
   $columncount: 
   $delimiterChar: 
   $enclosureChar: 


[ Top ]
getAllFieldsValues  [line 1006]

  mixed getAllFieldsValues( &$col_map, Array $col_map  )

Add the allField to the col_map array

but only if a valid field is selected

Parameters:
Array   $col_map:  The map of columns (!stub)
   &$col_map: 

API Tags:
Return:  The value for the field to use with all records


[ Top ]
getAttributeSelector  [line 885]

  String getAttributeSelector( [int $index = 0], [String $value = ""], [String $othername = ""], [int $emptycol = 2]  )

Returns a dropdownlist with all possible field in the importnode

Parameters:
int   $index:  the number of the column
String   $value:  the name of the attribute that is selected in the list (if empty then select the last one)
String   $othername:  if set, use a other name for the dropdown, else use the name "col_map[index]"
int   $emptycol:  mode for empty column (0 = no empty column, 1= empty column, 2= an 'ignore this column' (default))

API Tags:
Return:  the html-code for the dropdownlist (<select>...</sekect>)


[ Top ]
getAttributesTranslation  [line 944]

  Array getAttributesTranslation( Array $attributes  )

Make a record of translations of the given attributes

Parameters:
Array   $attributes:  The attributes to translate

API Tags:
Return:  The result of the translation


[ Top ]
getImportButtons  [line 148]

  void getImportButtons( string $phase  )

Get import buttons.

Parameters:
string   $phase:  import phase ('init', 'upload', 'process', 'analyze')


[ Top ]
getIntegratedAttributes  [line 791]

  array getIntegratedAttributes( )

Get al attributes from the import node that have the flag AF_ONETOONE_INTEGRATE


API Tags:
Return:  A list with all attributes from the import node that have the flag AF_ONETOONE_INTEGRATE


[ Top ]
getObligatoryAttributes  [line 752]

  Array getObligatoryAttributes( )

Gives all obligatory attributes

Same as getUsableAttributes with parameter true


API Tags:
Return:  An array with all the obligatory attributes


[ Top ]
getRowCount  [line 633]

  int getRowCount( string $file, bool $skipFirstRow  )

Returns the CSV line count.

Parameters:
string   $file:  the path to the csv-file
bool   $skipFirstRow:  Skip the first row?

API Tags:
Return:  row count


[ Top ]
getSampleRows  [line 609]

  Array getSampleRows( String $file  )

Get the first 5 lines from the csv-file

Parameters:
String   $file:  The path to the csv-file

API Tags:
Return:  The 5 lines from the csv file


[ Top ]
getTmpFileDestination  [line 542]

  string getTmpFileDestination( string $fileid  )

Get the destination of the uploaded csv-file

Parameters:
string   $fileid:  The id of the file

API Tags:
Return:  The path of the file


[ Top ]
getUsableAttribute  [line 841]

  object instance &getUsableAttribute( String $name  )

Get the real attribute (instance) by his name

Parameters:
String   $name:  name of the attribute

API Tags:
Return:  of the attribute


[ Top ]
getUsableAttributes  [line 702]

  Array getUsableAttributes( [bool $obligatoryOnly = false]  )

Gives all the attributes that can be used for the import

Parameters:
bool   $obligatoryOnly:  if false then give all attributes, if true then give only the obligatory ones defaults to false

API Tags:
Return:  the attributes


[ Top ]
getValidatedRecords  [line 1096]

  Array getValidatedRecords( String $file  )

Get the validated records

Parameters:
String   $file:  The import csv file

API Tags:
Return:  with importerrors and validatedrecs


[ Top ]
getValueFromRecord  [line 1578]

  mixed getValueFromRecord( Array $record, String $fieldname  )

Gets a raw value from a record with ATK values for a specific attribute

Parameters:
String   $fieldname:  The name of the attribute to get the value for
Array   $record:  The record to search through

API Tags:
Return:  The value


[ Top ]
hasRelationAttribute  [line 831]

  boolean hasRelationAttribute( String $attrname  )

Check whether the attribute has a relation (only manytoonerelations)

Parameters:
String   $attrname:  name of the attribute

API Tags:
Return:  result of the check


[ Top ]
importHeader  [line 138]

  void importHeader( string $phase  )

Import header.

Parameters:
string   $phase:  import phase ('init', 'upload', 'process', 'analyze')


[ Top ]
importPage  [line 98]

  void importPage( string $phase, string $content  )

Create import page for the given phase.

Parameters:
string   $phase:  import phase (init, upload, process)
string   $content:  page content


[ Top ]
inArray  [line 926]

  mixed inArray( Array $array, mixed $value  )

The same als the php function array_search, but now much better.

This function is not case sensitive

Parameters:
Array   $array:  The array to search through
mixed   $value:  The value to search for

API Tags:
Return:  The key if it is in the array, else false


[ Top ]
initColmap  [line 964]

  Array initColmap( Array $firstRecord, Bool &$matchFound  )

Tries to make a default col_map with the first record of the csv-file

Parameters:
Array   $firstRecord:  The first record of the CSV file
Bool   &$matchFound:  Found a match?

API Tags:
Return:  The default col_map


[ Top ]
integrateAttribute  [line 782]

  boolean integrateAttribute( Object $attr  )

Checks whether the attribute has the flag AF_ONETOONE_INTEGRATE

Parameters:
Object   $attr:  The attribute to check

API Tags:
Return:  The result of the check


[ Top ]
isHide  [line 772]

  boolean isHide( Object $attr  )

Checks whether the attribute is hiden by a flag

Parameters:
Object   $attr:  The attribute to check

API Tags:
Return:  The result of the check


[ Top ]
isObligatory  [line 762]

  boolean isObligatory( Object $attr  )

Checks whether the attribute is obligatory

Parameters:
Object   $attr:  The attribute to check

API Tags:
Return:  The result of the check


[ Top ]
isRelationAttribute  [line 811]

  mixed isRelationAttribute( String $attrname  )

Check whether the attribute is part of a relation

Parameters:
String   $attrname:  name of the attribute

API Tags:
Return:  false if not, relation name if yes


[ Top ]
prepareUpdateRecord  [line 1546]

  bool prepareUpdateRecord( Array &$record  )

Here we prepare our record for updating or return false,

indicating that we need to insert the record instead of updating it

Parameters:
Array   &$record:  The record to prepare

API Tags:
Return:  If the record wasn't prepared we return false, otherwise true


[ Top ]
setImportNode  [line 87]

  void setImportNode( &$node, atkNode $node  )

Sets the import node. By default this is the same node as set by setNode, but if you call this method after the setNode call you can override the import node.

Parameters:
atkNode   $node:  node instance
   &$node: 

API Tags:
See:  atkImportHandler::setNode()


[ Top ]
setNode  [line 72]

  void setNode( &$node, atkNode $node  )

Sets the node for this handler. Implicitly sets the import node too!

Parameters:
atkNode   $node:  node instance
   &$node: 

API Tags:
See:  atkImportHandler::setImportNode()


Redefinition of:
atkActionHandler::setNode()
Set the calling node of the current action.

[ Top ]
showErrors  [line 1260]

  bool showErrors( Array $importerrors, [Array $extraerror = null]  )

Determines wether or not errors occurred and shows the analyze screen if errors occurred.

Parameters:
Array   $importerrors:  An array with the errors that occurred
Array   $extraerror:  An extra error, if we found errors

API Tags:
Return:  Wether or not errors occurred


[ Top ]
update  [line 1339]

  bool update( &$record, Array $record  )

Update a record in the db

Parameters:
Array   $record:  the record to update
   &$record: 

API Tags:
Return:  Wether or not there were errors


[ Top ]
validate  [line 1362]

  bool validate( &$record, array $record  )

Check whether the record if valide to import

Parameters:
array   $record:  the record
   &$record: 

API Tags:
Return:  Wether or not there were errors


[ Top ]
validateRecord  [line 1482]

  void validateRecord( Array &$rec, Array &$validatedrecs, Array &$importerrors, int $counter  )

Validates a record

Parameters:
Array   &$rec:  The record to validate
Array   &$validatedrecs:  The records thus far validated
Array   &$importerrors:  The errors so far in the import process
int   $counter:  The number that the record is


[ Top ]
_getAnalyseExtraOptions  [line 492]

  String _getAnalyseExtraOptions( String $skipfirstrow, String $doupdate, String $updatekey1, String $onfalseidentifier, String $allFields, Bool $novalidatefirst  )

Returns the extra options of the importhandler

Parameters:
String   $skipfirstrow:  Wether or not to skip the first row
String   $doupdate:  Wether or not to do an update
String   $updatekey1:  The key to update on
String   $onfalseidentifier:  What to do on a false identifier
String   $allFields:  The fields to import
Bool   $novalidatefirst:  Validate before the import

API Tags:
Return:  The HTML with the extra options


[ Top ]
_getAnalyseHeader  [line 359]

  String _getAnalyseHeader( String $fileid, String $columncount, String $delimiter, String $enclosure, int $rowcount  )

Returns the HTML header for the 'analyse' mode of the import handler

Parameters:
String   $fileid:  The 'id' (name) of the file we are importing
String   $columncount:  The number of columns we have
String   $delimiter:  The delimiter in the file
String   $enclosure:  The enclosure in the file
int   $rowcount:  The number of rows in the CSV file

API Tags:
Return:  The HTML header


[ Top ]
_getAnalyseSample  [line 380]

  void _getAnalyseSample( String $columncount, String $col_map, String $csv_data, String $skipfirstrow  )

Returns a sample of the analysis

Parameters:
String   $columncount:  The number of columns we have
String   $col_map:  A mapping of the column
String   $csv_data:  The CSV data
String   $skipfirstrow:  Wether or not to skip the first row


[ Top ]
_getAttributeValue  [line 1200]

  mixed _getAttributeValue( String $attributename, Array $allFields, mixed $value, Array &$importerrors, Integer $counter, Array $rec  )

Gets the ATK value of the attribute

Parameters:
String   $attributename:  The name of the attribute
Array   $allFields:  Array with all the fields
mixed   $value:  The value from the CSV file
Array   &$importerrors:  Any import errors which may occur or may have occured
Integer   $counter:  The counter of the validatedrecords
Array   $rec:  The record

API Tags:
Return:  The ATK value of the field


[ Top ]
_getDuplicateColumns  [line 1431]

  Array _getDuplicateColumns( Array $array  )

Array with columns

Parameters:
Array   $array:  The array the columns to check

API Tags:
Return:  The duplicate columns


[ Top ]
_getErrors  [line 309]

  String _getErrors( Array $importerrors  )

Transforms the $importerrors array into displayable HTML

Parameters:
Array   $importerrors:  A special array with arrays in it $importerrors[0] are general errors, other than that the numbers stand for recordnumbers

API Tags:
Return:  HTML table with the errors

Information Tags:
Todo:  make this use templates

[ Top ]
_getSampleValue  [line 454]

  String _getSampleValue( String $attributename, String $value  )

Gets the displayable value for the attribute

Parameters:
String   $attributename:  The name of the attribute
String   $value:  The value of the attribute

API Tags:
Return:  The displayable value for the attribute


[ Top ]
_returnErrors  [line 1412]

  void _returnErrors( Array $errors, String $singleerror, String $doubleerror, Array &$collection  )

Checks if there are errors and if there are then it adds it to the collection

Parameters:
Array   $errors:  The errors to check
String   $singleerror:  The language code to use for a single error
String   $doubleerror:  The language code to use for multiple errors
Array   &$collection:  The collection of errors thus far


[ Top ]
_usableForImport  [line 739]

  bool _usableForImport( bool $obligatoryOnly, Object &$attrib  )

Check if an attribute is usable for import.

Parameters:
bool   $obligatoryOnly:  Wether or not we should concider obligatory attributes
Object   &$attrib:  The attribute

API Tags:
Return:  Wether or not the attribute is usable for import


[ Top ]
Home | About | Contact