コード例 #1
0
 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');
 }
コード例 #2
0
 public function testGetting()
 {
     $this->assertTrue(Locations::get(false));
     $this->assertTrue(is_array(Locations::get()));
     $this->assertNull(Locations::get('test2'));
     $this->assertTrue(is_array(Locations::get('test', array('config' => true))));
     $this->assertNull(Locations::get('test', array('autoCreate' => false)));
     $this->assertTrue(Locations::get('test'));
 }
コード例 #3
0
ファイル: bootstrap.php プロジェクト: djordje/li3_filemanager
<?php

use li3_filemanager\extensions\storage\Locations;
Locations::add('default', array('adapter' => 'FileSystem', 'location' => LITHIUM_APP_PATH . '/webroot/img', 'url' => 'http://localhost/dev/img'));
コード例 #4
0
ファイル: FtpTest.php プロジェクト: djordje/li3_filemanager
 public function skip()
 {
     $this->skipIf(!in_array('test-ftp', Locations::get()), 'You don\'t have <code>test-ftp</code> location setup!');
     $this->skipIf(!is_object($this->_location = Locations::get('test-ftp')), 'Adapter not initialized!');
 }