LocalFilesystem.php 474 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * Author: NODELOG
  5. * DateTime: 2017/7/12 21:56
  6. * Description:
  7. */
  8. namespace common\modules\attachment\components\flysystem;
  9. class LocalFilesystem extends \creocoder\flysystem\LocalFilesystem
  10. {
  11. public $url;
  12. public function init()
  13. {
  14. parent::init();
  15. $this->url = \Yii::getAlias($this->url);
  16. }
  17. protected function prepareAdapter()
  18. {
  19. return new LocalAdapter($this->path, $this->url);
  20. }
  21. }