protected function _init() { parent::_init(); $this->_timestamp = time(); $this->_tmp_dir = Libraries::path('li3_filemanager\\', array('dirs' => true)); $this->_tmp_dir .= "/resources/tmp/{$this->_timestamp}_test"; Locations::add('test', array('adapter' => 'FileSystem', 'url' => 'http://example.com/tmp', 'location' => $this->_tmp_dir)); $this->_location = Locations::get('test'); }
<?php use li3_filemanager\extensions\storage\Locations; Locations::add('default', array('adapter' => 'FileSystem', 'location' => LITHIUM_APP_PATH . '/webroot/img', 'url' => 'http://localhost/dev/img'));
public function testAdding() { $location = Locations::add('test', array('adapter' => 'FileSystem', 'location' => Libraries::path('li3_filemanager\\', array('dirs' => true)) . '/resources/tmp')); $this->assertTrue(is_array($location)); }