public function importFromFile(
        $collectionId,
        $importFileName,
        array $options = []
    )
    {

        $contents = file_get_contents($importFileName);
        if ($contents === false) {
            throw new ClientException('Input file "' . $importFileName . '" could not be found.');
        }

        return $this->import($collectionId, $contents, $options);
    }
public function importFromFile(
        $collectionId,
        $importFileName,
        array $options = []
    )
    {

        $contents = file_get_contents($importFileName);
        if ($contents === false) {
            throw new ClientException('Input file "' . $importFileName . '" could not be found.');
        }

        return $this->import($collectionId, $contents, $options);
    }
public function importFromFile ( $ collectionId , $ importFileName , array $ options = [ ] ) { $ contents = file_get_contents ( $ importFileName ) ; if ( $ contents === false ) { throw new ClientException ( 'Input file "' . $ importFileName . '" could not be found.' ) ; } return $ this -> import ( $ collectionId , $ contents , $ options ) ; }
Import documents from a file

This will throw on all errors except insertion errors

@throws Exception

@param mixed $collectionId   - collection id as string or number
@param mixed $importFileName - The filename that holds the import data.
@param array $options        - optional - an array of options.
<p>Options are :<br>
'type' -  if type is not set or it's set to '' or null, the Header-Value format must be provided in the import file.<br>
<p>
<li>                       if set to 'documents', then the file's content must have its documents line by line. Each line will be interpreted as a document.</li>
<li>                       if set to 'array' then the file's content must provide the documents as a list of documents instead of the above line by line.</li>
<br>
More info on how the import functionality works: <a href ="https://github.com/triAGENS/ArangoDB/wiki/HttpImport">https://github.com/triAGENS/ArangoDB/wiki/HttpImport</a>
</p>
<br>
</li>
<li>'createCollection' - If true, create the collection if it does not exist. Defaults to false </li>
</p>

@return array - returns an array with the server's response data from the import command
Import documents from a file