Package: File\Ingest
This class creates a bridge between the ZF File Transfer HTTP adapter and Omeka’s file ingest classes.
Set of arbitrary options to use when ingesting files.
Set of validators implementing Zend_Validate_Interface.
The current validated file MIME type.
Create a ZF HTTP file transfer adapter.
Returns: | void |
---|
In addition to the default options available for Omeka_File_Ingest_AbstractIngest, this understands the following options: - ‘ignoreNoFile’ => boolean False by default. Whether or not to ignore - validation errors that occur when an uploaded file is missing. This - may occur when a file input is left empty on a form.
This option can be overridden by the ‘ignore_invalid_files’ option. Forinstance, if ‘ignoreNoFile’ is set to false but ‘ignore_invalid_files’ isset to true, any exceptions due to missing uploads will be suppressed andignored.
Parameters: |
|
---|---|
Returns: | void |
The ‘name’ attribute of the $_FILES array will always contain the original name of the file.
Parameters: |
|
---|---|
Returns: | string |
Use the Zend_File_Transfer adapter to upload the file.
Parameters: |
|
---|---|
Returns: | string Path to the file in Omeka. |
Use the adapter to extract the array of file information.
Parameters: |
|
---|---|
Returns: | array |
Use the Zend Framework adapter to handle validation instead of the built-in _validateFile() method.
Parameters: |
|
---|---|
Returns: | void |
Set the item to use as a target when ingesting files.
Parameters: |
|
---|---|
Returns: | void |
Factory to retrieve Omeka_File_Ingest_* instances.
Parameters: |
|
---|---|
Returns: | Omeka_File_Ingest_AbstractIngest |
Ingest based on arbitrary file identifier info.
If this is an array that has a ‘metadata’ key, that should be an arrayrepresenting element text metadata to assign to the file. SeeActsAsElementText::addElementTextsByArray() for more details.
Parameters: |
|
---|---|
Returns: | array Ingested file records. |
Determine whether or not to ignore file ingest errors. Based on ‘ignore_invalid_files’, which is false by default.
Returns: | boolean |
---|
Log any exceptions that are thrown as a result of attempting to ingest invalid files.
These are logged as warnings because they are being ignored by the script,so they don’t actually kill the file ingest process.
Parameters: |
|
---|---|
Returns: | void |
Insert a File record corresponding to an ingested file and its metadata.
Parameters: |
|
---|---|
Returns: | File |
Retrieve the destination path for the file to be transferred.
This will generate an archival filename in order to prevent naming conflicts between ingested files.
This should be used as necessary by Omeka_File_Ingest_AbstractIngestimplementations in order to determine where to transfer any given file.
Parameters: |
|
---|---|
Returns: | string |
Validate a file that has been transferred to Omeka.
Implementations of Omeka_File_Ingest_AbstractIngest should use this to validate the uploaded file based on user-defined security criteria.
Important: $fileInfo may need to contain the following keys in order to work with particular Zend_Validate_File_* validation classes:
Parameters: |
|
---|---|
Returns: | boolean True if valid, otherwise throws an exception. |