获取渠道设置模型
@return VolumeSettingsModel
964532
public function getSettingsModel()
    {
        /** @var FilesystemAdapter $volumeClass */
        $volumeClass = $this->className;
        /** @var VolumeSettingsModel $model */
        $model = $volumeClass::getSettingsModel();
        $model->setVolume($this);
        if ($this->configuration) {
            $model->setAttributes($this->configuration->toArray(), false);
        }
        return $model;
    }
1297930
public function getModuleModel()
    {
        if ($this->_moduleModel === null) {
            // 默认根据缓存的模块数据生成模块model
            $class = $this->module->moduleModelClass;
            $model = new $class;
            $class::populateRecord($model, ModuleModel::models()[$this->id]);
            $this->setModuleModel($model);
        }
        return $this->_moduleModel;
    }
1266437
protected function getOss()
    {
        if (!$this->upload) {
            $this->upload = new OssClient(
                $this->config['accessKeyId'],
                $this->config['accessKeySecret'],
                $this->config['endpoint'],
                $this->config['isCName'],
                $this->config['securityToken']
            );

            //设置请求超时时间
            $this->upload->setTimeout($this->config['timeout']);

            //设置连接超时时间
            $this->upload->setConnectTimeout($this->config['connectTimeout']);
        }

        return $this->upload;
    }
1036028
public function getAdapterInstance()
    {
        if ($this->adapter instanceof Encrypt\EncryptionAlgorithmInterface) {
            return $this->adapter;
        }

        $adapter = $this->adapter;
        $options = $this->getOptions();
        if (! class_exists($adapter)) {
            $adapter = __CLASS__ . '\\' . ucfirst($adapter);
            if (! class_exists($adapter)) {
                throw new Exception\RuntimeException(sprintf(
                    '%s unable to load adapter; class "%s" not found',
                    __METHOD__,
                    $this->adapter
                ));
            }
        }

        $this->adapter = new $adapter($options);
        if (! $this->adapter instanceof Encrypt\EncryptionAlgorithmInterface) {
            throw new Exception\InvalidArgumentException(sprintf(
                'Encryption adapter "%s" does not implement %s\\EncryptionAlgorithmInterface',
                $adapter,
                __CLASS__
            ));
        }
        return $this->adapter;
    }
776069
public function getExtensionModel()
    {
        if ($this->extensionModel === null) {
            $this->load->model('setting/extension');
            /** @noinspection PhpUndefinedFieldInspection */
            $this->extensionModel = $this->model_setting_extension;
        }
        return $this->extensionModel;
    }
1159608
public function getMode()
    {
        if (!isset($this->mode)) {
            if (isset($_ENV['SLIM_MODE'])) {
                $this->mode = $_ENV['SLIM_MODE'];
            } else {
                $envMode = getenv('SLIM_MODE');
                if ($envMode !== false) {
                    $this->mode = $envMode;
                } else {
                    $this->mode = $this->config('mode');
                }
            }
        }

        return $this->mode;
    }
1240574
public function setVolume($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->volume !== $v) {
            $this->volume = $v;
            $this->modifiedColumns[ReferenceTableMap::COL_VOLUME] = true;
        }

        return $this;
    }
1248665
public function actionSettings()
    {
        $settings = ImageResizer::$plugin->getSettings();

        $sourceOptions = array();
        $folderOptions = array();
        /** @var Volume $source */
        foreach (Craft::$app->volumes->getAllVolumes() as $source) {
            $sourceOptions[] = array('label' => $source->name, 'value' => $source->id);
        }

        $assetTree = Craft::$app->assets->getFolderTreeByVolumeIds(Craft::$app->volumes->getAllVolumeIds());
        ImageResizer::$plugin->service->getAssetFolders($assetTree, $folderOptions);

        $this->renderTemplate('image-resizer/settings/index.html', array(
            'settings' => $settings,
            'folderOptions' => $folderOptions,
            'sourceOptions' => $sourceOptions,
        ));
    }
1210957
public java.util.List<VolumeConfiguration> getVolumeConfigurations() {
        if (volumeConfigurations == null) {
            volumeConfigurations = new com.amazonaws.internal.SdkInternalList<VolumeConfiguration>();
        }
        return volumeConfigurations;
    }
597228
public function buildModelCriteria()
    {
        $query = new IndexEngineDriverConfigurationQuery();

        if (null !== $id = $this->getId()) {
            $query->filterById($id);
        }

        if (null !== $code = $this->getCode()) {
            $code = array_map("trim", explode(",", $code));
            $query->filterByCode($code);
        }

        if (null !== $driver_code = $this->getDriverCode()) {
            $driver_code = array_map("trim", explode(",", $driver_code));
            $query->filterByDriverCode($driver_code);
        }

        if (null !== $title = $this->getTitle()) {
            $title = array_map("trim", explode(",", $title));
            $query->filterByTitle($title);
        }

        foreach ($this->getOrder() as $order) {
            switch ($order) {
                case "id":
                    $query->orderById();
                    break;
                case "id-reverse":
                    $query->orderById(Criteria::DESC);
                    break;
                case "code":
                    $query->orderByCode();
                    break;
                case "code-reverse":
                    $query->orderByCode(Criteria::DESC);
                    break;
                case "driver_code":
                    $query->orderByDriverCode();
                    break;
                case "driver_code-reverse":
                    $query->orderByDriverCode(Criteria::DESC);
                    break;
                case "title":
                    $query->orderByTitle();
                    break;
                case "title-reverse":
                    $query->orderByTitle(Criteria::DESC);
                    break;
                case "serialized_configuration":
                    $query->orderBySerializedConfiguration();
                    break;
                case "serialized_configuration-reverse":
                    $query->orderBySerializedConfiguration(Criteria::DESC);
                    break;
            }
        }

        return $query;
    }
980573
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('vm_pro_api');

        $rootNode
            ->children()
                ->scalarNode('base_url')
                    ->defaultValue(self::DEFAULT_API_BASE_URL)
                ->end()
                ->scalarNode('oauth_url')
                    ->defaultValue(self::DEFAULT_OAUTH_URL)
                ->end()
                ->scalarNode('default_vm_id')
                    ->defaultValue(0)
                ->end()
                ->arrayNode('credentials')
                    ->isRequired()
                    ->children()
                        ->scalarNode('username')->isRequired()->end()
                        ->scalarNode('password')->isRequired()->end()
                    ->end()
                ->end()
                ->arrayNode('rating_meta_data_fields')
                    ->children()
                        ->scalarNode('average')->isRequired()->end()
                        ->scalarNode('count')->isRequired()->end()
                    ->end()
                ->end()
                ->scalarNode('logger')
                    ->defaultValue(null)
                ->end()
                ->scalarNode('cache_pool')
                    ->defaultValue(null)
                ->end()
                ->scalarNode('cache_ttl')
                    ->defaultValue(null)
                ->end()
                ->scalarNode('cache_bypass_argument')
                    ->defaultValue(null)
                ->end()
                ->booleanNode('enable_stopwatch')
                    ->defaultValue(false)
                ->end()
            ->end()
        ;

        return $treeBuilder;
    }
137079
public function getConfigTree()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('mandango', 'array');

        $rootNode
            ->children()
                ->scalarNode('model_dir')->end()
                ->booleanNode('logging')->end()
                ->scalarNode('default_connection')->end()
            ->end()

            ->fixXmlConfig('extra_config_classes_dir')
            ->children()
                ->arrayNode('extra_config_classes_dirs')
                ->prototype('scalar')->end()
            ->end()
        ;

        $this->addConnectionsSection($rootNode);

        return $treeBuilder->buildTree();
    }
256943
public function getMiddleLayoutModel()
    {
        if ( null === $this->middleLayoutModel )
        {
            $this->middleLayoutModel = $this->getServiceLocator()
                                            ->get( 'Grid\Paragraph\Model\Paragraph\MiddleLayoutModel' );
        }

        return $this->middleLayoutModel;
    }
382225
public function patchPluginSettings()
    {
        $path_array = explode('/', $this->request->getUrl());
        $settingId = $path_array[3];

        $body = $this->request->getBody();
        $value = $body['value'];
        $options = $this->dataStore->set($settingId, $this->api->createPluginSettingObject($settingId, $value, true, true));

        if (!isset($options)) {
            return $this->api->createAPIError('Unable to update plugin settings');
        }

        if ($settingId === Plugin::SETTING_DEFAULT_SETTINGS) {
            try {
                $this->applyDefaultSettings();
            } catch (\Exception $e) {
                if ($e instanceof Exception\CloudFlareException) {
                    return $this->api->createAPIError($e->getMessage());
                } else {
                    throw $e;
                }
            }
        }

        $response = $this->api->createAPISuccessResponse($this->dataStore->get($settingId));

        return $response;
    }
1226966
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $treeBuilder->root('massive_search')
            ->children()
                ->arrayNode('services')
                    ->addDefaultsifNotSet()
                    ->children()
                        ->scalarNode('factory')->defaultValue('massive_search.factory_default')->end()
                    ->end()
                ->end()
                ->enumNode('adapter')
                    ->values(['zend_lucene', 'elastic', 'test'])
                    ->defaultValue('zend_lucene')->end()
                ->arrayNode('adapters')
                    ->addDefaultsifNotSet()
                    ->children()
                        ->arrayNode('zend_lucene')
                            ->addDefaultsifNotSet()
                            ->children()
                                ->booleanNode('hide_index_exception')->defaultValue(false)->end()
                                ->scalarNode('basepath')->defaultValue('%kernel.root_dir%/data')->end()
                                ->scalarNode('encoding')->defaultValue('UTF-8')->end()
                            ->end()
                        ->end()
                        ->arrayNode('elastic')
                            ->addDefaultsifNotSet()
                            ->children()
                                ->scalarNode('version')->defaultValue('2.2')->end()
                                ->arrayNode('hosts')
                                    ->defaultValue(['localhost:9200'])
                                    ->prototype('scalar')->end()
                                ->end()
                            ->end()
                        ->end()
                    ->end()
                ->end()
                ->arrayNode('metadata')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->scalarNode('prefix')->defaultValue('massive')->end()
                        ->scalarNode('cache_dir')->defaultValue('%kernel.cache_dir%/massive-search')->end()
                        ->booleanNode('debug')->defaultValue('%kernel.debug%')->end()
                    ->end()
                ->end()
                ->arrayNode('persistence')
                    ->addDefaultsifNotSet()
                    ->children()
                        ->arrayNode('doctrine_orm')
                            ->canBeEnabled()
                        ->end()
                    ->end()
                ->end()
            ->end();

        return $treeBuilder;
    }
254510
public function getUpyunConfig()
    {
        if (empty($this->upyun_config)) {
            $this->upyun_config = new Config($this->option('bucket'), $this->option('user'), $this->option('passwd'));
            
            // 表单key
            $this->upyun_config->setFormApiKey($this->option('key'));
            
            // 分片大小
            $this->upyun_config->maxBlockSize = $this->option('size') * 1048576;
            
            // 单片超时时间
            $this->upyun_config->timeout = $this->option('timeout');
        }
        return $this->upyun_config;
    }
1063120
protected static function p2mSettings()
	{
		if(isset(self::$_p2mSettings)) {
			return self::$_p2mSettings;
		}

		return self::getSettingsItem(self::$_p2mSettings, Yii::$app->params, 'p2m');
	}