core/model/modx/import/modimport.class.php
- Package
- modx
- Subpackage
- import
\modImport
Package: modx\import
Provides common functions for importing content into a modX repository.
- Children
- \modStaticImport
Properties

array
$properties= 'array ()'
A collection of properties that are being used in this import
Default value
array ()Details- Type
- array
Methods

__construct(
\modX $modx
)
:
void
Parameters
| Name | Type | Description |
|---|---|---|
| $modx | \modX | A reference to the modX instance |

getFileContent(
string $file
)
:
stringGets the buffered content of a file
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $file | string | An absolute path to the file |
| Type | Description |
|---|---|
| string |

getFileContentType(
\$extension $extension
)
:
stringGets the content type of a file
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $extension | \$extension | The extension of the file |
| Type | Description |
|---|---|
| string | The content-type of the file |

getFiles(
array $filesfound, string $directory, array $listing
=
array (), int $count
=
0
)
:
array
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $filesfound | array | A reference to an array of file locations |
| $directory | string | The directory to import from |
| $listing | array | A listing of imported files |
| $count | int | The current count iteration |
| Type | Description |
|---|---|
| array |