_id stringlengths 2 7 | title stringlengths 3 151 | partition stringclasses 3
values | text stringlengths 83 13k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q258100 | Exif.getAuthor | test | public function getAuthor()
{
if (!isset($this->data[self::AUTHOR])) {
return false;
}
return $this->data[self::AUTHOR];
} | php | {
"resource": ""
} |
q258101 | Exif.getHeadline | test | public function getHeadline()
{
if (!isset($this->data[self::HEADLINE])) {
return false;
}
return $this->data[self::HEADLINE];
} | php | {
"resource": ""
} |
q258102 | Exif.getCredit | test | public function getCredit()
{
if (!isset($this->data[self::CREDIT])) {
return false;
}
return $this->data[self::CREDIT];
} | php | {
"resource": ""
} |
q258103 | Exif.getSource | test | public function getSource()
{
if (!isset($this->data[self::SOURCE])) {
return false;
}
return $this->data[self::SOURCE];
} | php | {
"resource": ""
} |
q258104 | Exif.getJobtitle | test | public function getJobtitle()
{
if (!isset($this->data[self::JOB_TITLE])) {
return false;
}
return $this->data[self::JOB_TITLE];
} | php | {
"resource": ""
} |
q258105 | Exif.getIso | test | public function getIso()
{
if (!isset($this->data[self::ISO])) {
return false;
}
return $this->data[self::ISO];
} | php | {
"resource": ""
} |
q258106 | Exif.getFocusDistance | test | public function getFocusDistance()
{
if (!isset($this->data[self::FOCAL_DISTANCE])) {
return false;
}
return $this->data[self::FOCAL_DISTANCE];
} | php | {
"resource": ""
} |
q258107 | Exif.getWidth | test | public function getWidth()
{
if (!isset($this->data[self::WIDTH])) {
return false;
}
return $this->data[self::WIDTH];
} | php | {
"resource": ""
} |
q258108 | Exif.getHeight | test | public function getHeight()
{
if (!isset($this->data[self::HEIGHT])) {
return false;
}
return $this->data[self::HEIGHT];
} | php | {
"resource": ""
} |
q258109 | Exif.getTitle | test | public function getTitle()
{
if (!isset($this->data[self::TITLE])) {
return false;
}
return $this->data[self::TITLE];
} | php | {
"resource": ""
} |
q258110 | Exif.getCaption | test | public function getCaption()
{
if (!isset($this->data[self::CAPTION])) {
return false;
}
return $this->data[self::CAPTION];
} | php | {
"resource": ""
} |
q258111 | Exif.getCopyright | test | public function getCopyright()
{
if (!isset($this->data[self::COPYRIGHT])) {
return false;
}
return $this->data[self::COPYRIGHT];
} | php | {
"resource": ""
} |
q258112 | Exif.getKeywords | test | public function getKeywords()
{
if (!isset($this->data[self::KEYWORDS])) {
return false;
}
return $this->data[self::KEYWORDS];
} | php | {
"resource": ""
} |
q258113 | Exif.getCamera | test | public function getCamera()
{
if (!isset($this->data[self::CAMERA])) {
return false;
}
return $this->data[self::CAMERA];
} | php | {
"resource": ""
} |
q258114 | Exif.getHorizontalResolution | test | public function getHorizontalResolution()
{
if (!isset($this->data[self::HORIZONTAL_RESOLUTION])) {
return false;
}
return $this->data[self::HORIZONTAL_RESOLUTION];
} | php | {
"resource": ""
} |
q258115 | Exif.getVerticalResolution | test | public function getVerticalResolution()
{
if (!isset($this->data[self::VERTICAL_RESOLUTION])) {
return false;
}
return $this->data[self::VERTICAL_RESOLUTION];
} | php | {
"resource": ""
} |
q258116 | Exif.getSoftware | test | public function getSoftware()
{
if (!isset($this->data[self::SOFTWARE])) {
return false;
}
return $this->data[self::SOFTWARE];
} | php | {
"resource": ""
} |
q258117 | Exif.getFocalLength | test | public function getFocalLength()
{
if (!isset($this->data[self::FOCAL_LENGTH])) {
return false;
}
return $this->data[self::FOCAL_LENGTH];
} | php | {
"resource": ""
} |
q258118 | Exif.getCreationDate | test | public function getCreationDate()
{
if (!isset($this->data[self::CREATION_DATE])) {
return false;
}
return $this->data[self::CREATION_DATE];
} | php | {
"resource": ""
} |
q258119 | Exif.getColorSpace | test | public function getColorSpace()
{
if (!isset($this->data[self::COLORSPACE])) {
return false;
}
return $this->data[self::COLORSPACE];
} | php | {
"resource": ""
} |
q258120 | Exif.getMimeType | test | public function getMimeType()
{
if (!isset($this->data[self::MIMETYPE])) {
return false;
}
return $this->data[self::MIMETYPE];
} | php | {
"resource": ""
} |
q258121 | Exif.getFileSize | test | public function getFileSize()
{
if (!isset($this->data[self::FILESIZE])) {
return false;
}
return $this->data[self::FILESIZE];
} | php | {
"resource": ""
} |
q258122 | Exif.getOrientation | test | public function getOrientation()
{
if (!isset($this->data[self::ORIENTATION])) {
return false;
}
return $this->data[self::ORIENTATION];
} | php | {
"resource": ""
} |
q258123 | Exif.getGPS | test | public function getGPS()
{
if (!isset($this->data[self::GPS])) {
return false;
}
return $this->data[self::GPS];
} | php | {
"resource": ""
} |
q258124 | Native.extractGPSCoordinate | test | protected function extractGPSCoordinate($components)
{
if (!is_array($components)) {
$components = array($components);
}
$components = array_map(array($this, 'normalizeComponent'), $components);
if (count($components) > 2) {
return floatval($components[0]) + ... | php | {
"resource": ""
} |
q258125 | Exiftool.setToolPath | test | public function setToolPath($path)
{
if (!file_exists($path)) {
throw new InvalidArgumentException(
sprintf(
'Given path (%1$s) to the exiftool binary is invalid',
$path
)
);
}
$this->toolPath = ... | php | {
"resource": ""
} |
q258126 | Exiftool.getToolPath | test | public function getToolPath()
{
if (empty($this->toolPath)) {
$path = exec('which ' . self::TOOL_NAME);
$this->setToolPath($path);
}
return $this->toolPath;
} | php | {
"resource": ""
} |
q258127 | Exiftool.getCliOutput | test | protected function getCliOutput($command)
{
$descriptorspec = array(
0 => array('pipe', 'r'),
1 => array('pipe', 'w'),
2 => array('pipe', 'a')
);
$process = proc_open($command, $descriptorspec, $pipes);
if (!is_resource($process)) {
t... | php | {
"resource": ""
} |
q258128 | Mutator.hydrate | test | public function hydrate($object, array $data)
{
foreach ($data as $property => $value) {
$mutator = $this->determineMutator($property);
if (method_exists($object, $mutator)) {
$object->$mutator($value);
}
}
} | php | {
"resource": ""
} |
q258129 | Exiftool.extractGPSCoordinates | test | protected function extractGPSCoordinates($coordinates)
{
if ($this->numeric === true) {
return abs((float) $coordinates);
} else {
if (!preg_match('!^([0-9.]+) deg ([0-9.]+)\' ([0-9.]+)"!', $coordinates, $matches)) {
return false;
}
re... | php | {
"resource": ""
} |
q258130 | AdapterAbstract.getMapper | test | public function getMapper()
{
if (null === $this->mapper) {
// lazy load one
$mapper = new $this->mapperClass;
$this->setMapper($mapper);
}
return $this->mapper;
} | php | {
"resource": ""
} |
q258131 | AdapterAbstract.getHydrator | test | public function getHydrator()
{
if (null === $this->hydrator) {
// lazy load one
$hydrator = new $this->hydratorClass;
$this->setHydrator($hydrator);
}
return $this->hydrator;
} | php | {
"resource": ""
} |
q258132 | AdapterAbstract.setOptions | test | public function setOptions(array $options)
{
$hydrator = $this->getHydrator();
$hydrator->hydrate($this, $options);
return $this;
} | php | {
"resource": ""
} |
q258133 | Native.addRequiredSection | test | public function addRequiredSection($section)
{
if (!in_array($section, $this->requiredSections)) {
array_push($this->requiredSections, $section);
}
return $this;
} | php | {
"resource": ""
} |
q258134 | Native.getIptcData | test | public function getIptcData($file)
{
getimagesize($file, $info);
$arrData = array();
if (isset($info['APP13'])) {
$iptc = iptcparse($info['APP13']);
foreach ($this->iptcMapping as $name => $field) {
if (!isset($iptc[$field])) {
con... | php | {
"resource": ""
} |
q258135 | Reader.factory | test | public static function factory($type)
{
$classname = get_called_class();
switch ($type) {
case self::TYPE_NATIVE:
$adapter = new NativeAdapter();
break;
case self::TYPE_EXIFTOOL:
$adapter = new ExiftoolAdapter();
... | php | {
"resource": ""
} |
q258136 | AbstractStrategy._generatePrefix | test | protected function _generatePrefix()
{
$prefix = Inflector::underscore(Inflector::singularize($this->_table->getAlias()));
$prefix .= '_' . $this->_alias;
return strtoupper($prefix);
} | php | {
"resource": ""
} |
q258137 | EnumBehavior._normalizeConfig | test | protected function _normalizeConfig()
{
$classMap = $this->getConfig('classMap');
$this->_classMap = array_merge($this->_classMap, $classMap);
$lists = $this->getConfig('lists');
$defaultStrategy = $this->getConfig('defaultStrategy');
foreach ($lists as $alias => $config) {... | php | {
"resource": ""
} |
q258138 | EnumBehavior._translate | test | protected function _translate(array $list)
{
$domain = $this->getConfig('translationDomain');
return array_map(function ($value) use ($domain) {
return __d($domain, $value);
}, $list);
} | php | {
"resource": ""
} |
q258139 | StaticCacheFullBuildTask.run | test | public function run($request)
{
$job = new StaticCacheFullBuildJob();
$signature = $job->getSignature();
// see if we already have this job in a queue
$filter = [
'Signature' => $signature,
'JobStatus' => [
QueuedJob::STATUS_NEW,
... | php | {
"resource": ""
} |
q258140 | StaticCacheFullBuildJob.process | test | public function process()
{
$chunkSize = self::config()->get('chunk_size');
$count = 0;
// Remove any URLs which have already been processed
if ($this->jobData->ProcessedURLs) {
$this->jobData->URLsToProcess = array_diff_key(
$this->jobData->URLsToProcess... | php | {
"resource": ""
} |
q258141 | SiteTreePublishingEngine.collectChanges | test | public function collectChanges($context)
{
Environment::increaseMemoryLimitTo();
Environment::increaseTimeLimitTo();
if ($this->getOwner()->hasExtension(PublishableSiteTree::class)
|| $this->getOwner() instanceof StaticPublishingTrigger
) {
$toUpdate = $this-... | php | {
"resource": ""
} |
q258142 | SiteTreePublishingEngine.flushChanges | test | public function flushChanges()
{
$queue = QueuedJobService::singleton();
if (!empty($this->toUpdate)) {
foreach ($this->toUpdate as $queueItem) {
$job = Injector::inst()->create(GenerateStaticCacheJob::class);
$jobData = new \stdClass();
$... | php | {
"resource": ""
} |
q258143 | ModuleExtensionCleanerDebug.getModuleExtensionsGarbage | test | protected function getModuleExtensionsGarbage($moduleMetaDataExtensions, $moduleInstalledExtensions)
{
$garbage = parent::getModuleExtensionsGarbage($moduleMetaDataExtensions, $moduleInstalledExtensions);
foreach ($moduleInstalledExtensions as $coreClassName => $listOfExtensions) {
for... | php | {
"resource": ""
} |
q258144 | ModuleExtensionCleanerDebug.filterExtensionsByModule | test | protected function filterExtensionsByModule($modules, $module)
{
if ($this->isMetadataVersionGreaterEqual($module, '2.0')) {
$moduleHelper = Registry::get(ModuleHelper::class);
$moduleHelper->setModule($module);
$path = $moduleHelper->getModuleNameSpace();
} else ... | php | {
"resource": ""
} |
q258145 | InternalModule.getModuleBlocks | test | public function getModuleBlocks()
{
$config = Registry::getConfig();
$activeThemeIds = oxNew(\OxidEsales\Eshop\Core\Theme::class)->getActiveThemesList();
$activeThemeIds[] = '';
$themeIdsSql = join(', ', \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quoteArray($activeThemeIds));... | php | {
"resource": ""
} |
q258146 | InternalModule.getModuleSettings | test | public function getModuleSettings()
{
$aResult = DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC)->select(
'SELECT * FROM oxconfig WHERE oxModule = ? AND oxshopid = ?',
[sprintf('module:%s', $this->getId()), Registry::getConfig()->getShopId()]
);
return $a... | php | {
"resource": ""
} |
q258147 | InternalModule.isMetadataSupported | test | public function isMetadataSupported()
{
$sMetadataVersion = $this->getMetaDataVersion();
$sLatestVersion = '1.0';
if (method_exists('oxModuleList', 'getModuleVersions') || method_exists('oxModule', 'getModuleEvents')) {
$sLatestVersion = '1.1';
}
if (method_exi... | php | {
"resource": ""
} |
q258148 | InternalModule.checkPhpFileExists | test | public function checkPhpFileExists($sClassName)
{
if ($this->isMetadataVersionGreaterEqual('2.0')) {
$composerClassLoader = $this->getModuleHelper()->getAutoloader();
return $composerClassLoader->findFile($sClassName);
} else {
$sExtensionPath = $sClassName . '.p... | php | {
"resource": ""
} |
q258149 | InternalModule.checkModuleVersions | test | public function checkModuleVersions()
{
$sDatabaseVersion = $this->getModuleEntries(ModuleList::MODULE_KEY_VERSIONS);
/**
* Set version for disabled module
*/
if (!count($sDatabaseVersion)) {
$iLang = \OxidEsales\Eshop\Core\Registry::getLang()->getTplLanguage()... | php | {
"resource": ""
} |
q258150 | InternalModule.checkExtendedClasses | test | public function checkExtendedClasses()
{
$aMetadataExtend = $this->getInfo('extend');
$aMetadataExtend = is_array($aMetadataExtend) ? $aMetadataExtend : [];
$aResult = [];
/**
* only convert class names to lower if we don't use namespace
*/
if (!$this->isM... | php | {
"resource": ""
} |
q258151 | InternalModule.checkTemplateBlocks | test | public function checkTemplateBlocks()
{
$sModulePath = $this->getModulePath();
$aDatabaseBlocks = $this->getModuleBlocks();
$aDatabaseBlocks = is_array($aDatabaseBlocks) ? $aDatabaseBlocks : [];
$aMetadataTemplates = $this->getInfo('templates');
$config = Registry::getConfig... | php | {
"resource": ""
} |
q258152 | InternalModule.checkModuleSettings | test | public function checkModuleSettings()
{
$aDatabaseSettings = $this->getModuleSettings();
$aDatabaseSettings = is_array($aDatabaseSettings) ? $aDatabaseSettings : [];
$list = [];
foreach ($aDatabaseSettings as $v) {
$list[$v['OXVARNAME']] = $v['OXVARTYPE'];
}
... | php | {
"resource": ""
} |
q258153 | InternalModule.checkModuleTemplates | test | public function checkModuleTemplates()
{
$aDatabaseTemplates = $this->getModuleEntries(ModuleList::MODULE_KEY_TEMPLATES);
$aResult = $this->checkFiles($aDatabaseTemplates, false);
return $aResult;
} | php | {
"resource": ""
} |
q258154 | InternalModule.checkModuleController | test | public function checkModuleController()
{
$oModuleStateFixer = Registry::get(ModuleStateFixer::class);
$controllers = $oModuleStateFixer->getModuleControllerEntries($this->getId());
return $this->checkFiles($controllers, true);
} | php | {
"resource": ""
} |
q258155 | InternalModule.checkModuleFiles | test | public function checkModuleFiles()
{
$aDatabaseFiles = $this->getModuleEntries(ModuleList::MODULE_KEY_FILES);
return $this->checkFiles($aDatabaseFiles, false);
} | php | {
"resource": ""
} |
q258156 | InternalModule.checkModuleEvents | test | public function checkModuleEvents()
{
$aDatabaseEvents = $this->getModuleEntries(ModuleList::MODULE_KEY_EVENTS);
$aDatabaseEvents = is_array($aDatabaseEvents) ? $aDatabaseEvents : [];
$aDatabaseEvents = array_map(function ($value){return print_r($value,true);}, $aDatabaseEvents);
$a... | php | {
"resource": ""
} |
q258157 | ModuleFixCommand._parseModuleIds | test | protected function _parseModuleIds()
{
if ($this->input->getOption('all')) {
return $this->_getAvailableModuleIds();
}
if (count($this->input->getArguments()['module-id']) === 0) {
throw oxNew(
InputException::class,
'Please specify at... | php | {
"resource": ""
} |
q258158 | ModuleFixCommand._parseShopConfigs | test | protected function _parseShopConfigs()
{
if ($this->input->getOption('base-shop')) {
return array(Registry::getConfig());
}
if ($shopId = $this->input->getOption('shop')) {
if ($oConfig = ShopConfig::get($shopId)) {
return array($oConfig);
... | php | {
"resource": ""
} |
q258159 | ModuleFixCommand._getAvailableModuleIds | test | protected function _getAvailableModuleIds()
{
if ($this->_aAvailableModuleIds === null) {
$oConfig = Registry::getConfig();
// We are calling getModulesFromDir() because we want to refresh
// the list of available modules. This is a workaround for OXID
// bug... | php | {
"resource": ""
} |
q258160 | ModuleFixCommand.isEnabled | test | public function isEnabled()
{
$app = $this->getApplication();
if (method_exists($app,'bootstrapOxid') ) {
return $app->bootstrapOxid(true);
}
return true;
} | php | {
"resource": ""
} |
q258161 | UtilsController.getModule | test | public function getModule()
{
if ($this->_oModule === null) {
$sModuleId = $this->getEditObjectId();
$this->addTplParam('oxid', $sModuleId);
$this->_oModule = oxNew(Module::class);
$this->_oModule->load($sModuleId);
}
return $this->_oModule;
... | php | {
"resource": ""
} |
q258162 | UtilsController.getModuleCache | test | public function getModuleCache()
{
if ($this->_oModuleCache === null) {
$this->_oModuleCache = oxNew(ModuleCache::class, $this->getModule());
}
return $this->_oModuleCache;
} | php | {
"resource": ""
} |
q258163 | UtilsController.getModuleInstaller | test | public function getModuleInstaller()
{
if ($this->_oModuleInstaller === null) {
$this->_oModuleInstaller = oxNew(ModuleInstaller::class, $this->getModuleCache());
}
return $this->_oModuleInstaller;
} | php | {
"resource": ""
} |
q258164 | ModuleStateFixer.fix | test | public function fix($module, $oConfig = null)
{
if ($oConfig !== null) {
$this->setConfig($oConfig);
}
$moduleId = $module->getId();
$this->needCacheClear = false;
if ($this->init()) {
$this->module = $module;
$this->restoreModuleInformat... | php | {
"resource": ""
} |
q258165 | ModuleStateFixer.cleanUpExtensions | test | public function cleanUpExtensions(){
//get all extions from all metadata
$oxModuleList = $this->moduleList;
$aModules = $oxModuleList->getList();
//get extensions from metadata file
$moduleClassesMf = [];
foreach ($aModules as $module) {
$extensions = $modul... | php | {
"resource": ""
} |
q258166 | ModuleStateFixer._addTemplateFiles | test | protected function _addTemplateFiles($aModuleTemplates, $sModuleId)
{
$aTemplates = (array) Registry::getConfig()->getConfigParam('aModuleTemplates');
$old = isset($aTemplates[$sModuleId]) ? $aTemplates[$sModuleId] : null;
if (is_array($aModuleTemplates)) {
$diff = $this->diff($o... | php | {
"resource": ""
} |
q258167 | ModuleStateFixer._addModuleFiles | test | protected function _addModuleFiles($aModuleFiles, $sModuleId)
{
$aFiles = (array) Registry::getConfig()->getConfigParam('aModuleFiles');
$old = isset($aFiles[$sModuleId]) ? $aFiles[$sModuleId] : null;
if ($aModuleFiles !== null) {
$aModuleFiles = array_change_key_case($aModuleF... | php | {
"resource": ""
} |
q258168 | ModuleStateFixer._addModuleEvents | test | protected function _addModuleEvents($aModuleEvents, $sModuleId)
{
$aEvents = (array) Registry::getConfig()->getConfigParam('aModuleEvents');
$old = isset($aEvents[$sModuleId]) ? $aEvents[$sModuleId] : null;
if (is_array($aModuleEvents) && count($aModuleEvents)) {
$diff = $this->... | php | {
"resource": ""
} |
q258169 | ModuleStateFixer._addModuleExtensions | test | protected function _addModuleExtensions($moduleExtensions, $moduleId)
{
$extensions = (array) Registry::getConfig()->getConfigParam('aModuleExtensions');
$old = isset($extensions[$moduleId]) ? $extensions[$moduleId] : null;
$old = (array) $old;
$new = $moduleExtensions === null ? [] ... | php | {
"resource": ""
} |
q258170 | ModuleStateFixer._addModuleVersion | test | protected function _addModuleVersion($sModuleVersion, $sModuleId)
{
$aVersions = (array) Registry::getConfig()->getConfigParam('aModuleVersions');
$old = isset($aVersions[$sModuleId]) ? $aVersions[$sModuleId] : '';
if (isset($sModuleVersion)) {
if ($old !== $sModuleVersion) {
... | php | {
"resource": ""
} |
q258171 | ModuleStateFixer.diff | test | protected function diff($array1,$array2){
if ($array1 === null) {
if ($array2 === null) {
return false; //indicate no diff
}
return $array2; //full array2 is new
}
if ($array2 === null) {
//indicate that diff is there (so return a ... | php | {
"resource": ""
} |
q258172 | ModuleStateFixer._addModuleSettings | test | protected function _addModuleSettings($moduleSettings, $moduleId)
{
$config = Registry::getConfig();
$shopId = $config->getShopId();
if (is_array($moduleSettings)) {
$diff = false;
foreach ($moduleSettings as $setting) {
$module = $this->getModuleConf... | php | {
"resource": ""
} |
q258173 | ModuleStateFixer.setModuleControllers | test | protected function setModuleControllers($moduleControllers, $moduleId, $module)
{
$controllersForThatModuleInDb = $this->getModuleControllerEntries($moduleId);
$diff = $this->diff($controllersForThatModuleInDb, $moduleControllers);
if ($diff) {
$shopId = Registry::getConfig()->... | php | {
"resource": ""
} |
q258174 | ModuleStateFixer._addExtensions | test | protected function _addExtensions(\OxidEsales\Eshop\Core\Module\Module $module)
{
$needFix = $this->checkExtensions($module, $aModulesDefault, $aModules);
if ($needFix) {
$this->needCacheClear = true;
$onlyInAfterFix = array_diff($aModules, $aModulesDefault);
$onl... | php | {
"resource": ""
} |
q258175 | OxidComposerModulesService.getList | test | public function getList(){
if ($this->list !== null){
return $this->list;
}
$list = [];
$packages = $this->getOxidModulePackages();
//$moduleList = Registry::get(ModuleList::class);
//$pathList = $moduleList->getModuleConfigParametersByKey(ModuleList::MODULE_K... | php | {
"resource": ""
} |
q258176 | State.render | test | public function render()
{
//valid for all metadata versions
$module = $this->getModule();
$state = $module->checkState();
foreach ($state as $paramName => $paramValue) {
$this->addTplParam($paramName, $paramValue);
}
return $this->sTemplate;
} | php | {
"resource": ""
} |
q258177 | State.block | test | public function block()
{
$request = Registry::getRequest();
$data = $request->getRequestParameter('data');
DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC)->execute(
"UPDATE oxtplblocks SET OXACTIVE = NOT OXACTIVE WHERE OXID = ?",[$data]);
} | php | {
"resource": ""
} |
q258178 | HttpFactory.getHttp | test | public static function getHttp($options = array(), $adapters = null)
{
if (!\is_array($options) && !($options instanceof \ArrayAccess))
{
throw new \InvalidArgumentException(
'The options param must be an array or implement the ArrayAccess interface.'
);
}
if (!$driver = self::getAvailableDriver($op... | php | {
"resource": ""
} |
q258179 | HttpFactory.getAvailableDriver | test | public static function getAvailableDriver($options = array(), $default = null)
{
if (!\is_array($options) && !($options instanceof \ArrayAccess))
{
throw new \InvalidArgumentException(
'The options param must be an array or implement the ArrayAccess interface.'
);
}
if ($default === null)
{
$av... | php | {
"resource": ""
} |
q258180 | HttpFactory.getHttpTransports | test | public static function getHttpTransports()
{
$names = array();
$iterator = new \DirectoryIterator(__DIR__ . '/Transport');
/** @var $file \DirectoryIterator */
foreach ($iterator as $file)
{
$fileName = $file->getFilename();
// Only load for php files.
if ($file->isFile() && $file->getExtensi... | php | {
"resource": ""
} |
q258181 | Curl.setCAOptionAndValue | test | protected function setCAOptionAndValue($ch)
{
if (isset($this->options['curl.certpath']))
{
// Option is passed to a .PEM file.
curl_setopt($ch, CURLOPT_CAINFO, $this->options['curl.certpath']);
return;
}
$caPathOrFile = CaBundle::getSystemCaRootBundlePath();
if (is_dir($caPathOrFile) || (is_link... | php | {
"resource": ""
} |
q258182 | Curl.getResponse | test | protected function getResponse($content, $info)
{
// Create the response object.
$return = new Response;
// Try to get header size
if (isset($info['header_size']))
{
$headerString = trim(substr($content, 0, $info['header_size']));
$headerArray = explode("\r\n\r\n", $headerString);
// Get the last... | php | {
"resource": ""
} |
q258183 | Curl.redirectsAllowed | test | private function redirectsAllowed()
{
// There are no issues on PHP 5.6 and later
if (version_compare(PHP_VERSION, '5.6', '>='))
{
return true;
}
// For PHP 5.3, redirects are not allowed if safe_mode and open_basedir are enabled
if (PHP_MAJOR_VERSION === 5 && PHP_MINOR_VERSION === 3)
{
if (!ini_g... | php | {
"resource": ""
} |
q258184 | Http.options | test | public function options($url, array $headers = array(), $timeout = null)
{
return $this->makeTransportRequest('OPTIONS', $url, null, $headers, $timeout);
} | php | {
"resource": ""
} |
q258185 | Http.head | test | public function head($url, array $headers = array(), $timeout = null)
{
return $this->makeTransportRequest('HEAD', $url, null, $headers, $timeout);
} | php | {
"resource": ""
} |
q258186 | Http.trace | test | public function trace($url, array $headers = array(), $timeout = null)
{
return $this->makeTransportRequest('TRACE', $url, null, $headers, $timeout);
} | php | {
"resource": ""
} |
q258187 | Http.patch | test | public function patch($url, $data, array $headers = array(), $timeout = null)
{
return $this->makeTransportRequest('PATCH', $url, $data, $headers, $timeout);
} | php | {
"resource": ""
} |
q258188 | AbstractGlobMatcher.match | test | public function match($relativePath, $globExpression)
{
if (!is_string($globExpression) && !is_null($globExpression)) {
$message = "Given value \"$globExpression\" is not a valid glob expression. ".
"Valid expression must be a string e.g. \"*.txt\".";
throw new Inval... | php | {
"resource": ""
} |
q258189 | AbstractPackageInstaller.getExtraParameterValueByKey | test | protected function getExtraParameterValueByKey($extraParameterKey, $defaultValue = null)
{
$extraParameters = $this->getPackage()->getExtra();
$extraParameterValue = $extraParameters[static::EXTRA_PARAMETER_KEY_ROOT][$extraParameterKey] ?? null;
return (!empty($extraParameterValue)) ? $ext... | php | {
"resource": ""
} |
q258190 | AbstractPackageInstaller.getCombinedFilters | test | protected function getCombinedFilters($listOfGlobExpressionLists)
{
$filters = [];
foreach ($listOfGlobExpressionLists as $filter) {
$filters = array_merge($filters, $filter);
}
return $filters;
} | php | {
"resource": ""
} |
q258191 | Plugin.activate | test | public function activate(Composer $composer, IOInterface $io)
{
$packageInstallerTrigger = new PackageInstallerTrigger($io, $composer);
$composer->getInstallationManager()->addInstaller($packageInstallerTrigger);
$this->composer = $composer;
$this->io = $io;
$this->packageIn... | php | {
"resource": ""
} |
q258192 | GlobListMatcher.matchAny | test | public function matchAny($relativePath, $globExpressionList)
{
if (!is_array($globExpressionList) && (!$globExpressionList instanceof \Traversable)
&& (!is_null($globExpressionList))) {
$message = "Given value \"$globExpressionList\" is not a valid glob expression list. ".
... | php | {
"resource": ""
} |
q258193 | GlobListMatcher.isMatchInList | test | private function isMatchInList($relativePath, $globExpressionList)
{
foreach ($globExpressionList as $globExpression) {
if ($this->globMatcher->match($relativePath, $globExpression)) {
return true;
}
}
return false;
} | php | {
"resource": ""
} |
q258194 | PackageInstallerTrigger.getShopSourcePath | test | public function getShopSourcePath()
{
$shopSource = Path::join(getcwd(), ShopPackageInstaller::SHOP_SOURCE_DIRECTORY);
if (isset($this->settings[AbstractPackageInstaller::EXTRA_PARAMETER_SOURCE_PATH])) {
$shopSource = $this->settings[AbstractPackageInstaller::EXTRA_PARAMETER_SOURCE_PATH... | php | {
"resource": ""
} |
q258195 | PackageInstallerTrigger.createInstaller | test | protected function createInstaller(PackageInterface $package)
{
return new $this->installers[$package->getType()]($this->io, $this->getShopSourcePath(), $package);
} | php | {
"resource": ""
} |
q258196 | ShopPackageInstaller.install | test | public function install($packagePath)
{
$this->writeInstallingMessage($this->getPackageTypeDescription());
$this->writeCopyingMessage();
$this->copyPackage($packagePath);
$this->writeDoneMessage();
} | php | {
"resource": ""
} |
q258197 | ShopPackageInstaller.update | test | public function update($packagePath)
{
$this->writeUpdatingMessage($this->getPackageTypeDescription());
$question = 'All files in the following directories will be overwritten:' . PHP_EOL .
'- ' . $this->getTargetDirectoryOfShopSource() . PHP_EOL .
'Do you wan... | php | {
"resource": ""
} |
q258198 | ShopPackageInstaller.copyShopSourceFromPackageToTarget | test | private function copyShopSourceFromPackageToTarget($packagePath)
{
$filtersToApply = [
$this->getBlacklistFilterValue(),
[self::HTACCESS_FILTER],
[self::ROBOTS_EXCLUSION_FILTER],
[self::SETUP_FILES_FILTER],
$this->getVCSFilter(),
];
... | php | {
"resource": ""
} |
q258199 | ShopPackageInstaller.copyConfigurationDistFileWithinTarget | test | private function copyConfigurationDistFileWithinTarget()
{
$pathToConfig = Path::join($this->getTargetDirectoryOfShopSource(), self::SHOP_SOURCE_CONFIGURATION_FILE);
$pathToConfigDist = $pathToConfig . self::DISTRIBUTION_FILE_EXTENSION_MARK;
$this->copyFileIfIsMissing($pathToConfigD... | php | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.