Page tree
Skip to end of metadata
Go to start of metadata

Implementation

When calling driver based methods such as FreePBX::Filestore→put('FTP',1,foo.tar.gz);  you should wrap it in a try catch.  

  • Exception code 501 method not implemented in driver
  • Exception code 404 Driver not implemented

Methods

listAll

DescriptionList all filestore types and locations
Example

FreePBX::Filestore()→listAll('all');

FreePBX::Filestore()→listAll(array('general','backup'));

Argument can be a string or an array.

  • all - returns all (default)
  • general - Types can be used anywhere
  • backup - Types that only supported for backup/restore operations
  • read - Types you can read.
  • write - Types you can write to
Returns

array()

array(
		'filestoreTypes' => array(
			'FTP',
			'SSH',
		),
		'locations'	=> array(
			'FTP' => array(
				array(
					'id' => 1,
					'name' => 'Name',
					'description'
				),
				array(
					'id' => 2,
					'name' => 'Name',
					'description'

				),
			),
			'SSH' => array(
				array(
					'id' => 1,
					'name' => 'Name',
					'description'

				),
				array(
					'id' => 2,
					'name' => 'Name',
					'description'
				),
			),
		),
	);
  • No labels