当前位置: 首页>>代码示例>>PHP>>正文


PHP Filesystem::__construct方法代码示例

本文整理汇总了PHP中League\Flysystem\Filesystem::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Filesystem::__construct方法的具体用法?PHP Filesystem::__construct怎么用?PHP Filesystem::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在League\Flysystem\Filesystem的用法示例。


在下文中一共展示了Filesystem::__construct方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Constructor
  *
  * @param array            $backendConfig backend configuration node
  * @param AclInterface     $acl           CKFinder ACL
  * @param Config           $ckConfig      CKFinder Config
  * @param AdapterInterface $adapter       adapter
  * @param null             $config        config
  */
 public function __construct(array $backendConfig, AclInterface $acl, Config $ckConfig, AdapterInterface $adapter, $config = null)
 {
     $this->backendConfig = $backendConfig;
     $this->acl = $acl;
     $this->ckConfig = $ckConfig;
     parent::__construct($adapter, $config);
     $this->addPlugin(new GetWithMetadata());
 }
开发者ID:SevenMonks,项目名称:100cities-dev,代码行数:17,代码来源:Backend.php

示例2: __construct

 /**
  * Constructor.
  *
  * @param array            $backendConfig    the backend configuration node
  * @param CKFinder         $app              the CKFinder app container
  * @param AdapterInterface $adapter          the adapter
  * @param array|null       $filesystemConfig the configuration
  */
 public function __construct(array $backendConfig, CKFinder $app, AdapterInterface $adapter, $filesystemConfig = null)
 {
     $this->app = $app;
     $this->backendConfig = $backendConfig;
     $this->acl = $app['acl'];
     $this->ckConfig = $app['config'];
     parent::__construct($adapter, $filesystemConfig);
     $this->addPlugin(new GetWithMetadata());
 }
开发者ID:mat33470,项目名称:PFA,代码行数:17,代码来源:Backend.php

示例3: __construct

 /**
  * FileManagement constructor.
  * @param string $host
  * @param string $username
  * @param string $password
  * @param array $settings
  */
 public function __construct($host, $username, $password, $settings = array())
 {
     $settings['baseUri'] = $host;
     $settings['userName'] = $username;
     $settings['password'] = $password;
     $client = new \Sabre\DAV\Client($settings);
     $adapter = new WebDAVAdapter($client, 'remote.php/webdav/');
     parent::__construct($adapter);
 }
开发者ID:thanhpv-h9,项目名称:yii2-owncloud-api,代码行数:16,代码来源:FileManagement.php

示例4: __construct

 /**
  * @inheritdoc
  */
 public function __construct($config = [])
 {
     $this->parentConstruct($config);
     if ($this->cache instanceof CacheInterface) {
         $this->cache->save();
         $this->adapter = new CachedAdapter($this->adapter, $this->cache);
     }
     parent::__construct($this->adapter, $this->config);
     $this->addPlugin(new ListPaths());
     $this->addPlugin(new ListWith());
     $this->addPlugin(new GetWithMetadata());
 }
开发者ID:romeoz,项目名称:rock-file,代码行数:15,代码来源:FileManager.php

示例5: __construct

 /**
  * @inheritdoc
  */
 public function __construct(AdapterInterface $adapter, $config = null)
 {
     parent::__construct($adapter, $config);
 }
开发者ID:oasmobile,项目名称:php-flysystem-wrappers,代码行数:7,代码来源:ExtendedFilesystem.php

示例6: __construct

 /**
  * Create a new AdapterFilesystem instance.
  *
  * @param DiskInterface    $disk
  * @param AdapterInterface $adapter
  * @param null             $config
  */
 public function __construct(DiskInterface $disk, AdapterInterface $adapter, $config = null)
 {
     $this->disk = $disk;
     parent::__construct($adapter, $config);
 }
开发者ID:ramcda,项目名称:files-module,代码行数:12,代码来源:AdapterFilesystem.php

示例7: __construct

 /**
  * Constructor.
  *
  * @param AdapterInterface $adapter
  * @param CacheInterface   $cache
  * @param mixed            $config
  * @param Emitter          $emitter
  */
 public function __construct(AdapterInterface $adapter, CacheInterface $cache = null, $config = null, Emitter $emitter = null)
 {
     $this->setEmitter($emitter);
     parent::__construct($adapter, $cache, $config);
 }
开发者ID:nguyenducduy,项目名称:phblog,代码行数:13,代码来源:EventableFilesystem.php

示例8: __construct

    public final function __construct($prDisk = NULL)
    {
        $defaultDisk = NULL;
        $returnAdapter = NULL;
        $file = path . 'app/config/File.php';
        /** If the config file not exists */
        if (!file_exists($file)) {
            $tmp = @fopen($file, 'w+');
            @fwrite($tmp, '<?php
                    return array (

                        \'default\' => \'local\',

                        \'local\' => array (
                            \'adapter\' => \'local\',
                            \'path\'    => \'\'
                        ),

                        /*\'aws-s3\' => array (
                            \'adapter\' => \'s3\',
                            \'key\'     => \'\',
                            \'secret\'  => \'\',
                            \'region\'  => \'\',
                            \'prefix\'  => NULL,
                            \'bucket\'  => \'\'
                        )*/

                );');
            @fclose($tmp);
            @chmod($file, 0775);
            if (!file_exists($file)) {
                trigger_error('File config not found in app/config [' . $file . '].', E_USER_ERROR);
            }
        }
        $aConfigTMP = (include $file);
        foreach ($aConfigTMP as $label => $aConfig) {
            if ($label == 'default' && !is_array($aConfig)) {
                $defaultDisk = $aConfig;
                continue;
            }
            if ($aConfig['adapter'] == NULL) {
                trigger_error('Adapter missing in connection ' . $label, E_USER_ERROR);
            } else {
                $adapter = NULL;
                switch (mb_strtolower($aConfig['adapter'], 'UTF-8')) {
                    case 'local':
                        if ($aConfig['path'] == NULL) {
                            trigger_error('Path for connection ' . $label . ' is not defined.', E_USER_ERROR);
                            return false;
                        }
                        $adapter = new Local($aConfig['path']);
                        break;
                    case 's3':
                        if ($aConfig['key'] == NULL) {
                            trigger_error('Key for connection ' . $label . ' is not defined.', E_USER_ERROR);
                            return false;
                        }
                        if ($aConfig['secret'] == NULL) {
                            trigger_error('Secret for connection ' . $label . ' is not defined.', E_USER_ERROR);
                            return false;
                        }
                        if ($aConfig['bucket'] == NULL) {
                            trigger_error('Bucket for connection ' . $label . ' is not defined.', E_USER_ERROR);
                            return false;
                        }
                        $client = S3Client::factory(array('credentials' => new Credentials($aConfig['key'], $aConfig['secret']), 'region' => $aConfig['region']));
                        $adapter = new AwsS3Adapter($client, $aConfig['bucket'], $aConfig['prefix']);
                        break;
                }
                if ($label == $defaultDisk) {
                    $returnAdapter = $adapter;
                }
                if ($label == $prDisk) {
                    $returnAdapter = $adapter;
                    $defaultDisk = NULL;
                }
            }
        }
        return parent::__construct($returnAdapter);
    }
开发者ID:adrianobnu,项目名称:parvus-filesystem,代码行数:80,代码来源:File.php

示例9: __construct

 public function __construct(\Zend\ServiceManager\ServiceManager $serviceManager, $adapter, $filesystem)
 {
     parent::__construct($adapter);
     $this->service = $serviceManager;
     $this->filesystem = $filesystem;
 }
开发者ID:modelframework,项目名称:modelframework,代码行数:6,代码来源:FilesystemService.php

示例10: __construct

 /**
  * Creates a temporary directory
  *
  * @param string $prefix
  * @param null   $dir
  */
 public function __construct($prefix = '', $dir = null)
 {
     parent::__construct(new TempdirAdapter($prefix, $dir));
 }
开发者ID:emgag,项目名称:flysystem-tempdir,代码行数:10,代码来源:Tempdir.php


注:本文中的League\Flysystem\Filesystem::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。