_id stringlengths 2 7 | title stringlengths 3 151 | partition stringclasses 3
values | text stringlengths 83 13k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q11300 | LdapFetcher.fullFetch | train | public function fullFetch($uSNChangedTo)
{
$searchFilter = Filter::andFilter(
Filter::greaterOrEqual('uSNChanged', 0),
Filter::lessOrEqual('uSNChanged', $uSNChangedTo)
);
if ($this->fullSyncEntryFilter) {
$searchFilter = $searchFilter->addAnd($this->fullS... | php | {
"resource": ""
} |
q11301 | LdapFetcher.incrementalFetch | train | public function incrementalFetch($uSNChangedFrom, $uSNChangedTo, $detectDeleted = false)
{
// fetch changed
$changedFilter = Filter::andFilter(
Filter::greaterOrEqual('uSNChanged', $uSNChangedFrom),
Filter::lessOrEqual('uSNChanged', $uSNChangedTo)
);
if ($this... | php | {
"resource": ""
} |
q11302 | LdapFetcher.getRootDse | train | private function getRootDse()
{
if (!$this->rootDse) {
$rootDse = $this->ldap->getRootDse();
if (!$rootDse instanceof ActiveDirectory) {
throw new UnsupportedRootDseException($rootDse);
}
$this->rootDse = $rootDse;
}
return $th... | php | {
"resource": ""
} |
q11303 | LdapFetcher.setupEntryFilter | train | private function setupEntryFilter($entryFilter)
{
if ($entryFilter == null) {
return null;
}
if (is_string($entryFilter)) {
$filter = new Filter\StringFilter($entryFilter);
} elseif ($entryFilter instanceof AbstractFilter) {
$filter = $entryFilter... | php | {
"resource": ""
} |
q11304 | LdapFetcher.search | train | private function search(AbstractFilter $filter)
{
if ($this->ldapSearchOptions) {
$ldapResource = $this->ldap->getResource();
foreach ($this->ldapSearchOptions as $name => $options) {
ldap_set_option($ldapResource, $name, $options);
}
}
re... | php | {
"resource": ""
} |
q11305 | ValueHolder.setValue | train | public function setValue($value, EntityInterface $entity = null)
{
$attribute_validator = $this->getAttribute()->getValidator();
$validation_result = $attribute_validator->validate($value, $entity);
if ($validation_result->getSeverity() <= IncidentInterface::NOTICE) {
$previous_... | php | {
"resource": ""
} |
q11306 | ValueHolder.sameValueAs | train | public function sameValueAs($other_value)
{
$null_value = $this->attribute->getNullValue();
if ($null_value === $this->getValue() && $null_value === $other_value) {
return true;
}
$validation_result = $this->getAttribute()->getValidator()->validate($other_value);
... | php | {
"resource": ""
} |
q11307 | ValueHolder.isEqualTo | train | public function isEqualTo(ValueHolderInterface $other_value_holder)
{
if (get_class($this) !== get_class($other_value_holder)) {
return false;
}
return $this->sameValueAs($other_value_holder->getValue());
} | php | {
"resource": ""
} |
q11308 | ValueHolder.addValueChangedListener | train | public function addValueChangedListener(ValueChangedListenerInterface $listener)
{
if (!$this->listeners->hasItem($listener)) {
$this->listeners->push($listener);
}
} | php | {
"resource": ""
} |
q11309 | ValueHolder.removedValueChangedListener | train | public function removedValueChangedListener(ValueChangedListenerInterface $listener)
{
if ($this->listeners->hasItem($listener)) {
$this->listeners->removeItem($listener);
}
} | php | {
"resource": ""
} |
q11310 | ValueHolder.onEntityChanged | train | public function onEntityChanged(EntityChangedEvent $embedded_entity_event)
{
$value_changed_event = $embedded_entity_event->getValueChangedEvent();
$this->propagateValueChangedEvent(
new ValueChangedEvent(
array(
'attribute_name' => $value_changed_eve... | php | {
"resource": ""
} |
q11311 | ValueHolder.propagateValueChangedEvent | train | protected function propagateValueChangedEvent(ValueChangedEvent $event)
{
foreach ($this->listeners as $listener) {
$listener->onValueChanged($event);
}
} | php | {
"resource": ""
} |
q11312 | ValueHolder.createValueHolderChangedEvent | train | protected function createValueHolderChangedEvent($prev_value, EventInterface $embedded_event = null)
{
return new ValueChangedEvent(
array(
'attribute_name' => $this->getAttribute()->getName(),
'prev_value' => $prev_value,
'value' => $this->toNativ... | php | {
"resource": ""
} |
q11313 | EventHandlerResolver.resolveHandlingMethod | train | protected function resolveHandlingMethod($eventType)
{
// Remove namespace
$pos = strrpos($eventType, '\\');
if ($pos !== false) {
$eventType = substr($eventType, $pos + 1);
}
// Remove "Event" suffix
if (substr($eventType, -5) === 'Event') {
... | php | {
"resource": ""
} |
q11314 | Configurable.setOptions | train | protected function setOptions($options)
{
if (!$options instanceof OptionsInterface) {
$options = is_array($options) ? $options : [];
$options = new Options($options);
}
$this->options = $options;
} | php | {
"resource": ""
} |
q11315 | ValidatorWithExclusion.shouldSkip | train | protected function shouldSkip($object, $propertyPath)
{
if (!\is_object($object) && !\is_array($object)) {
return false;
}
if (!empty($propertyPath)) {
$parts = \explode('.', $propertyPath);
$accessor = new PropertyAccessor();
$parent = $objec... | php | {
"resource": ""
} |
q11316 | UseAs.getAliasForClassname | train | public function getAliasForClassname(Classname $class)
{
foreach ($this->classnames as $c) {
if ($c['classname']->equals($class)) {
return str_replace('\\', '_', ltrim($class->classname, '\\'));
}
}
return str_replace('\\', '_', ltrim($class->classnam... | php | {
"resource": ""
} |
q11317 | Context.getParameter | train | private function getParameter($paramName)
{
if (array_key_exists($paramName, $_REQUEST))
{
return str_replace(FileUtil::Slash().FileUtil::Slash(), FileUtil::Slash(), $_REQUEST[$paramName]);
}
else
{
return "";
}
} | php | {
"resource": ""
} |
q11318 | Context.get | train | public function get($key, $persistent = false)
{
if ($persistent) {
$origKey = $key;
$key = "PVALUE.$key";
}
$key = strtoupper($key);
if (isset($this->_config[$key]))
{
$value = $this->_config[$key];
if ($value instanceof IProcessParameter)
{
return $value->getParameter();
}
else
... | php | {
"resource": ""
} |
q11319 | Context.authenticatedUser | train | public function authenticatedUser()
{
if ($this->IsAuthenticated())
{
$user = UserContext::getInstance()->userInfo();
return $user[$this->getUsersDatabase()->getUserTable()->username];
}
else
{
return "";
}
} | php | {
"resource": ""
} |
q11320 | Context.MakeLogin | train | public function MakeLogin($user, $id)
{
$userObj = $this->getUsersDatabase()->getById($id);
UserContext::getInstance()->registerLogin($userObj->toArray());
} | php | {
"resource": ""
} |
q11321 | Context.AddCollectionToConfig | train | private function AddCollectionToConfig($collection)
{
foreach($collection as $key=>$value)
{
if ($key[0] == '/')
$this->_virtualCommand = str_replace('_', '.', substr($key, 1));
$this->addPairToConfig($key, $value);
}
} | php | {
"resource": ""
} |
q11322 | Context.AddSessionToConfig | train | private function AddSessionToConfig($collection)
{
if (is_array($collection))
{
foreach($collection as $key => $value)
{
$this->addPairToConfig('session.' . $key, $value);
}
}
} | php | {
"resource": ""
} |
q11323 | Context.AddCookieToConfig | train | private function AddCookieToConfig($collection)
{
foreach($collection as $key => $value)
{
$this->addPairToConfig('cookie.' . $key, $value);
}
} | php | {
"resource": ""
} |
q11324 | Context.redirectUrl | train | public function redirectUrl($url)
{
$processor = new ParamProcessor();
$url = $processor->GetFullLink($url);
$url = str_replace("&", "&", $url);
// IIS running CGI mode has a bug related to POST and header(LOCATION) to the SAME script.
// In this environment the behavior expected causes a loop to the sa... | php | {
"resource": ""
} |
q11325 | Context.getUploadFileNames | train | public function getUploadFileNames($systemArray=false)
{
if ($systemArray)
{
return $_FILES;
}
else
{
$ret = array();
foreach($_FILES as $file => $property)
{
$ret[$file] = $property["name"];
}
}
return $ret;
} | php | {
"resource": ""
} |
q11326 | Context.processUpload | train | public function processUpload($filenameProcessor, $useProcessorForName, $field = null)
{
if (!($filenameProcessor instanceof UploadFilenameProcessor))
{
throw new UploadUtilException("processUpload must receive a UploadFilenameProcessor class");
}
else if (is_null($field))
{
$re... | php | {
"resource": ""
} |
q11327 | Context.getSuggestedContentType | train | public function getSuggestedContentType()
{
if (count($this->_contentType) == 0)
{
$this->_contentType["xsl"] = $this->getXsl();
$this->_contentType["content-type"] = "text/html";
$this->_contentType["content-disposition"] = "";
$this->_contentType["extension"] = "";
if ($this->get("xmlnuke.CHECKCON... | php | {
"resource": ""
} |
q11328 | Price.createFromArray | train | public static function createFromArray($properties, string $priceType = self::GROSS, $validate = true)
{
if (!is_array($properties) && !$properties instanceof Traversable) {
throw new InvalidArgumentException("prices must be iterable");
}
$price = new static(null, $priceType);
... | php | {
"resource": ""
} |
q11329 | DirectAdminClient.da_request | train | public function da_request(string $method, string $uri = '', array $options = []): array
{
$this->lastRequest = microtime(true);
try {
$response = $this->request($method, $uri, $options);
}
catch(\Exception $e) {
if($e instanceof RequestE... | php | {
"resource": ""
} |
q11330 | CustomConfig.generateLanguageInput | train | protected function generateLanguageInput($form)
{
$curValueArray = $this->_context->get("xmlnuke.LANGUAGESAVAILABLE");
foreach ($curValueArray as $key => $value)
{
$form->addXmlnukeObject(new XmlEasyList(EasyListType::SELECTLIST, "languagesavailable$key", "xmlnuke.LANGUAGESAVAILABLE", $this->getLangArray(), ... | php | {
"resource": ""
} |
q11331 | ConnectionFactory.needsRelogin | train | private function needsRelogin(SfdcConnectionInterface $con)
{
return ! $con->isLoggedIn() || (time() - $con->getLastLoginTime()) > $this->connectionTTL;
} | php | {
"resource": ""
} |
q11332 | Blacklist.getMinutesUntilExpired | train | protected function getMinutesUntilExpired(Payload $payload)
{
$exp = Utils::timestamp($payload['exp']);
$iat = Utils::timestamp($payload['iat']);
// get the latter of the two expiration dates and find
// the number of minutes until the expiration date,
// plus 1 minute to av... | php | {
"resource": ""
} |
q11333 | MxmapQuery.filterByTrackuid | train | public function filterByTrackuid($trackuid = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($trackuid)) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(MxmapTableMap::COL_TRACKUID, $trackuid, $comparison);
} | php | {
"resource": ""
} |
q11334 | MxmapQuery.filterByGbxmapname | train | public function filterByGbxmapname($gbxmapname = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($gbxmapname)) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(MxmapTableMap::COL_GBXMAPNAME, $gbxmapname, $comparison);... | php | {
"resource": ""
} |
q11335 | MxmapQuery.filterByTrackid | train | public function filterByTrackid($trackid = null, $comparison = null)
{
if (is_array($trackid)) {
$useMinMax = false;
if (isset($trackid['min'])) {
$this->addUsingAlias(MxmapTableMap::COL_TRACKID, $trackid['min'], Criteria::GREATER_EQUAL);
$useMinMax = ... | php | {
"resource": ""
} |
q11336 | MxmapQuery.filterByUserid | train | public function filterByUserid($userid = null, $comparison = null)
{
if (is_array($userid)) {
$useMinMax = false;
if (isset($userid['min'])) {
$this->addUsingAlias(MxmapTableMap::COL_USERID, $userid['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
... | php | {
"resource": ""
} |
q11337 | MxmapQuery.filterByUploadedat | train | public function filterByUploadedat($uploadedat = null, $comparison = null)
{
if (is_array($uploadedat)) {
$useMinMax = false;
if (isset($uploadedat['min'])) {
$this->addUsingAlias(MxmapTableMap::COL_UPLOADEDAT, $uploadedat['min'], Criteria::GREATER_EQUAL);
... | php | {
"resource": ""
} |
q11338 | MxmapQuery.filterByUpdatedat | train | public function filterByUpdatedat($updatedat = null, $comparison = null)
{
if (is_array($updatedat)) {
$useMinMax = false;
if (isset($updatedat['min'])) {
$this->addUsingAlias(MxmapTableMap::COL_UPDATEDAT, $updatedat['min'], Criteria::GREATER_EQUAL);
$... | php | {
"resource": ""
} |
q11339 | MxmapQuery.filterByMaptype | train | public function filterByMaptype($maptype = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($maptype)) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(MxmapTableMap::COL_MAPTYPE, $maptype, $comparison);
} | php | {
"resource": ""
} |
q11340 | MxmapQuery.filterByTitlepack | train | public function filterByTitlepack($titlepack = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($titlepack)) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(MxmapTableMap::COL_TITLEPACK, $titlepack, $comparison);
... | php | {
"resource": ""
} |
q11341 | MxmapQuery.filterByStylename | train | public function filterByStylename($stylename = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($stylename)) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(MxmapTableMap::COL_STYLENAME, $stylename, $comparison);
... | php | {
"resource": ""
} |
q11342 | MxmapQuery.filterByDisplaycost | train | public function filterByDisplaycost($displaycost = null, $comparison = null)
{
if (is_array($displaycost)) {
$useMinMax = false;
if (isset($displaycost['min'])) {
$this->addUsingAlias(MxmapTableMap::COL_DISPLAYCOST, $displaycost['min'], Criteria::GREATER_EQUAL);
... | php | {
"resource": ""
} |
q11343 | MxmapQuery.filterByModname | train | public function filterByModname($modname = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($modname)) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(MxmapTableMap::COL_MODNAME, $modname, $comparison);
} | php | {
"resource": ""
} |
q11344 | MxmapQuery.filterByLightmap | train | public function filterByLightmap($lightmap = null, $comparison = null)
{
if (is_array($lightmap)) {
$useMinMax = false;
if (isset($lightmap['min'])) {
$this->addUsingAlias(MxmapTableMap::COL_LIGHTMAP, $lightmap['min'], Criteria::GREATER_EQUAL);
$useMin... | php | {
"resource": ""
} |
q11345 | MxmapQuery.filterByExeversion | train | public function filterByExeversion($exeversion = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($exeversion)) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(MxmapTableMap::COL_EXEVERSION, $exeversion, $comparison);... | php | {
"resource": ""
} |
q11346 | MxmapQuery.filterByExebuild | train | public function filterByExebuild($exebuild = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($exebuild)) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(MxmapTableMap::COL_EXEBUILD, $exebuild, $comparison);
} | php | {
"resource": ""
} |
q11347 | MxmapQuery.filterByEnvironmentname | train | public function filterByEnvironmentname($environmentname = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($environmentname)) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(MxmapTableMap::COL_ENVIRONMENTNAME, $envir... | php | {
"resource": ""
} |
q11348 | MxmapQuery.filterByVehiclename | train | public function filterByVehiclename($vehiclename = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($vehiclename)) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(MxmapTableMap::COL_VEHICLENAME, $vehiclename, $compari... | php | {
"resource": ""
} |
q11349 | MxmapQuery.filterByUnlimiterrequired | train | public function filterByUnlimiterrequired($unlimiterrequired = null, $comparison = null)
{
if (is_string($unlimiterrequired)) {
$unlimiterrequired = in_array(strtolower($unlimiterrequired), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
}
return $this->addUsingA... | php | {
"resource": ""
} |
q11350 | MxmapQuery.filterByRoutename | train | public function filterByRoutename($routename = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($routename)) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(MxmapTableMap::COL_ROUTENAME, $routename, $comparison);
... | php | {
"resource": ""
} |
q11351 | MxmapQuery.filterByLengthname | train | public function filterByLengthname($lengthname = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($lengthname)) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(MxmapTableMap::COL_LENGTHNAME, $lengthname, $comparison);... | php | {
"resource": ""
} |
q11352 | MxmapQuery.filterByLaps | train | public function filterByLaps($laps = null, $comparison = null)
{
if (is_array($laps)) {
$useMinMax = false;
if (isset($laps['min'])) {
$this->addUsingAlias(MxmapTableMap::COL_LAPS, $laps['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
... | php | {
"resource": ""
} |
q11353 | MxmapQuery.filterByDifficultyname | train | public function filterByDifficultyname($difficultyname = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($difficultyname)) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(MxmapTableMap::COL_DIFFICULTYNAME, $difficult... | php | {
"resource": ""
} |
q11354 | MxmapQuery.filterByReplaytypename | train | public function filterByReplaytypename($replaytypename = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($replaytypename)) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(MxmapTableMap::COL_REPLAYTYPENAME, $replaytyp... | php | {
"resource": ""
} |
q11355 | MxmapQuery.filterByReplaywrid | train | public function filterByReplaywrid($replaywrid = null, $comparison = null)
{
if (is_array($replaywrid)) {
$useMinMax = false;
if (isset($replaywrid['min'])) {
$this->addUsingAlias(MxmapTableMap::COL_REPLAYWRID, $replaywrid['min'], Criteria::GREATER_EQUAL);
... | php | {
"resource": ""
} |
q11356 | MxmapQuery.filterByReplaywrtime | train | public function filterByReplaywrtime($replaywrtime = null, $comparison = null)
{
if (is_array($replaywrtime)) {
$useMinMax = false;
if (isset($replaywrtime['min'])) {
$this->addUsingAlias(MxmapTableMap::COL_REPLAYWRTIME, $replaywrtime['min'], Criteria::GREATER_EQUAL);... | php | {
"resource": ""
} |
q11357 | MxmapQuery.filterByReplaywruserid | train | public function filterByReplaywruserid($replaywruserid = null, $comparison = null)
{
if (is_array($replaywruserid)) {
$useMinMax = false;
if (isset($replaywruserid['min'])) {
$this->addUsingAlias(MxmapTableMap::COL_REPLAYWRUSERID, $replaywruserid['min'], Criteria::GRE... | php | {
"resource": ""
} |
q11358 | MxmapQuery.filterByReplaywrusername | train | public function filterByReplaywrusername($replaywrusername = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($replaywrusername)) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(MxmapTableMap::COL_REPLAYWRUSERNAME, $r... | php | {
"resource": ""
} |
q11359 | MxmapQuery.filterByRatingvotecount | train | public function filterByRatingvotecount($ratingvotecount = null, $comparison = null)
{
if (is_array($ratingvotecount)) {
$useMinMax = false;
if (isset($ratingvotecount['min'])) {
$this->addUsingAlias(MxmapTableMap::COL_RATINGVOTECOUNT, $ratingvotecount['min'], Criteri... | php | {
"resource": ""
} |
q11360 | MxmapQuery.filterByRatingvoteaverage | train | public function filterByRatingvoteaverage($ratingvoteaverage = null, $comparison = null)
{
if (is_array($ratingvoteaverage)) {
$useMinMax = false;
if (isset($ratingvoteaverage['min'])) {
$this->addUsingAlias(MxmapTableMap::COL_RATINGVOTEAVERAGE, $ratingvoteaverage['mi... | php | {
"resource": ""
} |
q11361 | MxmapQuery.filterByReplaycount | train | public function filterByReplaycount($replaycount = null, $comparison = null)
{
if (is_array($replaycount)) {
$useMinMax = false;
if (isset($replaycount['min'])) {
$this->addUsingAlias(MxmapTableMap::COL_REPLAYCOUNT, $replaycount['min'], Criteria::GREATER_EQUAL);
... | php | {
"resource": ""
} |
q11362 | MxmapQuery.filterByTrackvalue | train | public function filterByTrackvalue($trackvalue = null, $comparison = null)
{
if (is_array($trackvalue)) {
$useMinMax = false;
if (isset($trackvalue['min'])) {
$this->addUsingAlias(MxmapTableMap::COL_TRACKVALUE, $trackvalue['min'], Criteria::GREATER_EQUAL);
... | php | {
"resource": ""
} |
q11363 | MxmapQuery.filterByComments | train | public function filterByComments($comments = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($comments)) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(MxmapTableMap::COL_COMMENTS, $comments, $comparison);
} | php | {
"resource": ""
} |
q11364 | MxmapQuery.filterByCommentscount | train | public function filterByCommentscount($commentscount = null, $comparison = null)
{
if (is_array($commentscount)) {
$useMinMax = false;
if (isset($commentscount['min'])) {
$this->addUsingAlias(MxmapTableMap::COL_COMMENTSCOUNT, $commentscount['min'], Criteria::GREATER_E... | php | {
"resource": ""
} |
q11365 | MxmapQuery.filterByAwardcount | train | public function filterByAwardcount($awardcount = null, $comparison = null)
{
if (is_array($awardcount)) {
$useMinMax = false;
if (isset($awardcount['min'])) {
$this->addUsingAlias(MxmapTableMap::COL_AWARDCOUNT, $awardcount['min'], Criteria::GREATER_EQUAL);
... | php | {
"resource": ""
} |
q11366 | MxmapQuery.filterByHasscreenshot | train | public function filterByHasscreenshot($hasscreenshot = null, $comparison = null)
{
if (is_string($hasscreenshot)) {
$hasscreenshot = in_array(strtolower($hasscreenshot), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
}
return $this->addUsingAlias(MxmapTableMap::... | php | {
"resource": ""
} |
q11367 | MxmapQuery.filterByHasthumbnail | train | public function filterByHasthumbnail($hasthumbnail = null, $comparison = null)
{
if (is_string($hasthumbnail)) {
$hasthumbnail = in_array(strtolower($hasthumbnail), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
}
return $this->addUsingAlias(MxmapTableMap::COL_H... | php | {
"resource": ""
} |
q11368 | MxmapQuery.filterByHasghostblocks | train | public function filterByHasghostblocks($hasghostblocks = null, $comparison = null)
{
if (is_string($hasghostblocks)) {
$hasghostblocks = in_array(strtolower($hasghostblocks), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
}
return $this->addUsingAlias(MxmapTable... | php | {
"resource": ""
} |
q11369 | MxmapQuery.filterByEmbeddedobjectscount | train | public function filterByEmbeddedobjectscount($embeddedobjectscount = null, $comparison = null)
{
if (is_array($embeddedobjectscount)) {
$useMinMax = false;
if (isset($embeddedobjectscount['min'])) {
$this->addUsingAlias(MxmapTableMap::COL_EMBEDDEDOBJECTSCOUNT, $embedd... | php | {
"resource": ""
} |
q11370 | MxmapQuery.filterByMap | train | public function filterByMap($map, $comparison = null)
{
if ($map instanceof \eXpansion\Bundle\Maps\Model\Map) {
return $this
->addUsingAlias(MxmapTableMap::COL_TRACKUID, $map->getMapuid(), $comparison);
} elseif ($map instanceof ObjectCollection) {
if (null ==... | php | {
"resource": ""
} |
q11371 | MxmapQuery.useMapQuery | train | public function useMapQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinMap($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Map', '\eXpansion\Bundle\Maps\Model\MapQuery');
} | php | {
"resource": ""
} |
q11372 | LogglyFormatter.format | train | public function format(array $record)
{
if (isset($record["datetime"]) && ($record["datetime"] instanceof \DateTime)) {
$record["timestamp"] = $record["datetime"]->format("Y-m-d\TH:i:s.uO");
// TODO 2.0 unset the 'datetime' parameter, retained for BC
}
return parent:... | php | {
"resource": ""
} |
q11373 | SuccessController.init | train | public function init()
{
parent::init();
$reservation = $this->getReservation();
// If we get to the success controller form any state except PENDING or PAID
// This would mean someone would be clever and change the url from summary to success bypassing the payment
// End th... | php | {
"resource": ""
} |
q11374 | Config.loadAndMerge | train | public function loadAndMerge(string $filename)
{
# Attempt to load config file
if ( \file_exists($filename) ) {
# Set filename
$this->filename = $filename;
# Load the config
$configArray = \json_decode( \file_get_contents($filename), true);
if ($configArray) {
// $configA... | php | {
"resource": ""
} |
q11375 | NativeMailerHandler.addHeader | train | public function addHeader($headers)
{
foreach ((array) $headers as $header) {
if (strpos($header, "\n") !== false || strpos($header, "\r") !== false) {
throw new \InvalidArgumentException('Headers can not contain newline characters for security reasons');
}
... | php | {
"resource": ""
} |
q11376 | Dlstats.logDLStats | train | protected function logDLStats()
{
$q = \Database::getInstance()->prepare("SELECT id FROM `tl_dlstats` WHERE `filename`=?")
->execute($this->_filename);
if ($q->next())
{
$this->_statId = $q->id;
\Database::getInstance()->prepare("UPDATE `tl_dlstats` SET `tstamp`=?, `dow... | php | {
"resource": ""
} |
q11377 | Vote.countVote | train | protected function countVote($toCount)
{
$value = 0;
foreach ($this->votes as $login => $vote) {
if ($vote === $toCount) {
$value++;
}
}
return $value;
} | php | {
"resource": ""
} |
q11378 | BaseController.generateEtag | train | protected function generateEtag(\DateTime $timeStamp)
{
$user = $this->securityService->findGitUser();
$userString = '';
if (null !== $user) {
$userString = $user->getGitUserName();
}
return md5($timeStamp->getTimestamp() . $userString);
} | php | {
"resource": ""
} |
q11379 | FileSystemTrait.scanDirectory | train | public function scanDirectory($directory)
{
$extensions = $this->getOption('extensions');
foreach (scandir($directory) as $object) {
if ($object === '.' || $object === '..') {
continue;
}
$inputFile = $directory.DIRECTORY_SEPARATOR.$object;
... | php | {
"resource": ""
} |
q11380 | PollCommand.execute | train | protected function execute(InputInterface $input, OutputInterface $output)
{
$pollerNames = $input->getOption('poller');
$forceFullSync = $input->getOption('force-full-sync');
if ($pollerNames) {
$pollersToRun = [];
foreach ($pollerNames as $name) {
... | php | {
"resource": ""
} |
q11381 | PollCommand.runPoller | train | private function runPoller(Poller $poller, $forceFullSync, OutputInterface $output)
{
$output->write(
sprintf("Run poller <info>%s</info>, force mode is <comment>%s</comment>: ", $poller->getName(), $forceFullSync ? 'on' : 'off')
);
try {
$processed = $poller->poll($f... | php | {
"resource": ""
} |
q11382 | ConfigHandler.getAvailableOverrides | train | public function getAvailableOverrides()
{
$path = $this->getPath();
$suffix = $this->getSuffix();
$glob = "{$path}/*{$suffix}";
$result = [];
foreach (glob($glob) as $file) {
$identifier = basename($file, $suffix);
$result[$identifier] = ... | php | {
"resource": ""
} |
q11383 | ConfigHandler.setFormat | train | public function setFormat($format)
{
if ($format) {
$format = strtolower($format);
if (!in_array($format, static::$validFormats)) {
throw new Exception("Format {$format} is not supported");
}
$this->format = $format;
if (!$this->... | php | {
"resource": ""
} |
q11384 | Dedimania.sendRequest | train | final public function sendRequest(Request $request, $callback)
{
if ($this->enabled->get() == false) {
return;
}
$this->webaccess->request(
self::dedimaniaUrl,
[[$this, "process"], $callback],
$request->getXml(),
true,
... | php | {
"resource": ""
} |
q11385 | Dedimania.setGReplay | train | protected function setGReplay($login)
{
if ($this->enabled->get() == false) {
return;
}
$tempReplay = new IXR_Base64("");
$this->dedimaniaService->setGReplay("", $tempReplay);
$player = new Player();
$player->login = $login;
try {
$th... | php | {
"resource": ""
} |
q11386 | Dedimania.onEndMapStart | train | public function onEndMapStart($count, $time, $restarted, Map $map)
{
if ($this->enabled->get() == false) {
return;
}
if (!$restarted) {
$this->setRecords();
}
} | php | {
"resource": ""
} |
q11387 | MbWrapper.getNormalizedCharset | train | private function getNormalizedCharset($charset)
{
$upper = null;
if (is_array($charset)) {
$upper = array_map('strtoupper', $charset);
} else {
$upper = strtoupper($charset);
}
return preg_replace('/[^A-Z0-9]+/', '', $upper);
} | php | {
"resource": ""
} |
q11388 | MbWrapper.getMbCharset | train | private function getMbCharset($cs)
{
$normalized = $this->getNormalizedCharset($cs);
if (array_key_exists($normalized, self::$mbListedEncodings)) {
return self::$mbListedEncodings[$normalized];
} elseif (array_key_exists($normalized, self::$mbAliases)) {
return self::... | php | {
"resource": ""
} |
q11389 | MxKarma.setVote | train | public function setVote($login, $vote)
{
$player = $this->playerStorage->getPlayerInfo($login);
$obj = [
"login" => $login,
"nickname" => $player->getNickName(),
"vote" => $vote,
];
$this->changedVotes[$player->getLogin()] = new MxVote((object)$o... | php | {
"resource": ""
} |
q11390 | MxKarma.onStartMapEnd | train | public function onStartMapEnd($count, $time, $restarted, Map $map)
{
$this->startTime = time();
$this->mxKarma->loadVotes(array_keys($this->playerStorage->getOnline()), false);
} | php | {
"resource": ""
} |
q11391 | MxKarma.onEndMapEnd | train | public function onEndMapEnd($count, $time, $restarted, Map $map)
{
if (!empty($this->changedVotes)) {
$votes = [];
foreach ($this->changedVotes as $vote) {
$votes[] = $vote;
}
$this->mxKarma->saveVotes($map, (time() - $this->startTime), $vote... | php | {
"resource": ""
} |
q11392 | RequestHandler.add | train | public function add($middleware)
{
if (!is_string($middleware) && !$middleware instanceof MiddlewareInterface) {
throw new \InvalidArgumentException('Middleware must be a string or an instance of MiddlewareInterface');
}
$class = is_string($middleware) ? new ... | php | {
"resource": ""
} |
q11393 | RequestHandler.prepend | train | public function prepend($middleware)
{
if (!is_string($middleware) && !$middleware instanceof MiddlewareInterface) {
throw new \InvalidArgumentException('Middleware must be a string or an instance of MiddlewareInterface');
}
$class = is_string($middleware) ? ... | php | {
"resource": ""
} |
q11394 | RequestHandler.dispatch | train | public function dispatch(ServerRequestInterface $request, ResponseInterface $response): ResponseInterface
{
reset($this->middleware);
$this->response = $response;
return $this->handle($request);
} | php | {
"resource": ""
} |
q11395 | RequestHandler.handle | train | public function handle(ServerRequestInterface $request): ResponseInterface
{
if (!isset($this->middleware[$this->index])) {
return $this->response;
}
$middleware = $this->middleware[$this->index];
return $middleware->process($request, $this->n... | php | {
"resource": ""
} |
q11396 | QueueService.push | train | public function push(array $message, callable $messageHandler) {
$this->beanstalkMapper->put(serialize(
array_merge(
$messageHandler(), $message
)
));
return null;
} | php | {
"resource": ""
} |
q11397 | MethodGetNumberLapsDataProvider.request | train | public function request()
{
$scriptSettings = $this->gameDataStorage->getScriptOptions();
$currentMap = $this->mapStorage->getCurrentMap();
$nbLaps = 1;
if ($currentMap->lapRace) {
$nbLaps = $currentMap->nbLaps;
}
if ($scriptSettings['S_ForceLapsNb'] != ... | php | {
"resource": ""
} |
q11398 | EloquentJournalVoucher.getMaxJournalVoucherNumber | train | public function getMaxJournalVoucherNumber($id, $databaseConnectionName = null)
{
if(empty($databaseConnectionName))
{
$databaseConnectionName = $this->databaseConnectionName;
}
return $this->JournalVoucher->setConnection($databaseConnectionName)->where('organization_id', '=', $id)->max('number... | php | {
"resource": ""
} |
q11399 | EloquentJournalVoucher.getByOrganizationByPeriodAndByStatus | train | public function getByOrganizationByPeriodAndByStatus($organizationId, $periodIds, $status, $databaseConnectionName = null)
{
if(empty($databaseConnectionName))
{
$databaseConnectionName = $this->databaseConnectionName;
}
return $this->JournalVoucher->setConnection($databaseConnectionName)
... | php | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.