package midcom.helper.filesync

 Methods

__construct (string $root_dir, boolean $delete_missing)

Initializes the class.

Parameters

$root_dir

stringThe import root directory

$delete_missing

booleanwhether to delete missing items from database

create (string $type)

This is a static factory method which lets you dynamically create importer instances.
Static

It takes care of loading the required class files. The returned instances will be created but not initialized.

Parameters

$type

stringtype

Returns

\midcom_helper_filesync_importerA reference to the newly created importer instance.

delete_missing_files ($filenames, $parent_id)

Parameters

$filenames

$parent_id

delete_missing_folders ($foldernames, $parent_id)

Parameters

$foldernames

$parent_id

get_leaf_qb (integer $parent_id)

Returns leaf QB

Parameters

$parent_id

integerThe parent's ID

Returns

\midcom_core_querybuilderThe prepared QB instance

get_node_qb (integer $parent_id)

Returns node QB

Parameters

$parent_id

integerThe parent's ID

Returns

\midcom_core_querybuilderThe prepared QB instance

import ()

Run the import

run ()

_get_node ($classname, $parent_id, $path)

Parameters

$classname

$parent_id

$path

 Properties

 

boolean $delete_missing

Whether to delete elements from database that do not exist in the file system
 

mixed $root_dir