_id stringlengths 2 7 | title stringlengths 3 151 | partition stringclasses 3
values | text stringlengths 33 8k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q10900 | EloquentPeriod.byOrganizationWithYear | train | public function byOrganizationWithYear($id)
{
// return $this->Period->where('organization_id', '=', $id)->with('year')->get(); -> Evitar los with
$periods = $this->DB->connection($this->databaseConnectionName)
->table('ACCT_Period As p')
->join('ACCT_Fiscal_Year AS f', | php | {
"resource": ""
} |
q10901 | EloquentPeriod.lastPeriodbyOrganizationAndByFiscalYear | train | public function lastPeriodbyOrganizationAndByFiscalYear($organizationId, $fiscalYearId)
{
$Period = $this->Period->selectRaw('id, end_date, max(month) as month')
->where('organization_id', '=', $organizationId)
->where('fiscal_year_id', | php | {
"resource": ""
} |
q10902 | EloquentPeriod.create | train | public function create(array $data)
{
$Period = new Period();
$Period->setConnection($this->databaseConnectionName); | php | {
"resource": ""
} |
q10903 | EloquentPeriod.update | train | public function update(array $data, $Period = null)
{
if(empty($Period))
{
$Period = $this->byId($data['id']);
}
foreach ($data as $key => $value) | php | {
"resource": ""
} |
q10904 | File.setModificationDate | train | private function setModificationDate(array $ftpInfo)
{
$modDate = !empty($ftpInfo['modify'])
? DateTimeImmutable::createFromFormat('YmdHis', $ftpInfo['modify'])
| php | {
"resource": ""
} |
q10905 | XmlnukeMediaGallery.addIFrame | train | public function addIFrame($src, $windowWidth, $windowHeight, $thumb="", $title = "", $caption="", $width="", $height="")
{
| php | {
"resource": ""
} |
q10906 | Render.buildAttrs | train | public function buildAttrs(array $attrs = array())
{
$result = ' ';
foreach ($attrs as $key => $param) {
$param = (array) $param;
if ($key === 'data') {
$result .= $this->_buildDataAttrs($param);
| php | {
"resource": ""
} |
q10907 | Render._buildAttr | train | protected function _buildAttr($key, $val)
{
$return = null;
if (!empty($val) || $val === '0' || $key === 'value') {
| php | {
"resource": ""
} |
q10908 | Render._buildDataAttrs | train | protected function _buildDataAttrs(array $param = array())
{
$return = '';
foreach ($param as $data => $val) {
$dKey = 'data-' . trim($data);
if (is_object($val)) {
$val = (array) $val;
}
if (is_array($val)) {
$val = str_replace('"', '\'', json_encode($val));
| php | {
"resource": ""
} |
q10909 | Render._cleanAttrs | train | protected function _cleanAttrs(array $attrs = array())
{
foreach ($attrs as $key => $val) {
| php | {
"resource": ""
} |
q10910 | Render._cleanValue | train | protected function _cleanValue($value, $trim = false)
{
$value = htmlspecialchars($value, ENT_QUOTES, 'UTF-8'); | php | {
"resource": ""
} |
q10911 | Render._mergeAttr | train | protected function _mergeAttr(array $attrs = array(), $val = null, $key = 'class')
{
if (Arr::key($key, $attrs)) {
$attrs[$key] .= ' ' | php | {
"resource": ""
} |
q10912 | MenuContentFactory.createTabsMenu | train | protected function createTabsMenu(ManialinkInterface $manialink, ParentItem $rootItem, $openId)
{
/** @var Frame $tabsFrame */
$tabsFrame = $manialink->getData('tabs_frame');
$tabsFrame->removeAllChildren();
| php | {
"resource": ""
} |
q10913 | MenuContentFactory.callbackClose | train | public function callbackClose(
ManialinkInterface $manialink,
| php | {
"resource": ""
} |
q10914 | FloatValueHolder.almostEqual | train | public static function almostEqual($a, $b, $epsilon = 0.0000000001)
{
$diff = abs($a - $b);
if ($a === $b) {
// just compare values, handles e.g. INF
return true;
} elseif ($a === 0.0 || $b === 0.0 || $diff < self::FLOAT_MIN) {
| php | {
"resource": ""
} |
q10915 | CheckInForm.doCheckIn | train | public function doCheckIn($data, CheckInForm $form)
{
/** @var CheckInController $controller */
$controller = $form->getController();
$validator = CheckInValidator::create();
$result = $validator->validate($data['TicketCode']);
switch ($result['Code']) {
case CheckInValidator::MESSAGE_CHECK_OUT_SUCCESS:
$validator->getAttendee()->checkOut();
break;
case CheckInValidator::MESSAGE_CHECK_IN_SUCCESS:
$validator->getAttendee()->checkIn();
| php | {
"resource": ""
} |
q10916 | ExtendQueuedTask.getLengthQueue | train | public function getLengthQueue($jobType = null) {
$jobType = (string)$jobType;
$queueLength = 0;
$pendingStats = $this->getPendingStats();
if (empty($pendingStats)) {
return $queueLength;
}
foreach ($pendingStats as $pendingStatsItem) {
if ((!empty($jobType) && (strcmp($pendingStatsItem[$this->alias]['jobtype'], | php | {
"resource": ""
} |
q10917 | ExtendQueuedTask.getPendingJob | train | public function getPendingJob($jobType = null, $includeFinished = false, $timestamp = null) {
if (empty($jobType)) {
return false;
}
if (empty($timestamp) || (!is_int($timestamp) || !ctype_digit($timestamp))) {
$timestamp = strtotime('-15 minute');
}
$fetchedTime = date('Y-m-d H:i:s', $timestamp);
$fields = [
$this->alias . '.jobtype',
$this->alias . '.created',
$this->alias . '.status',
$this->alias . '.age',
$this->alias . '.fetched',
$this->alias . '.progress',
$this->alias . '.completed',
$this->alias . '.reference',
$this->alias . '.failed',
$this->alias . '.failure_message'
];
$conditions = [
'OR' => [
[ // NOT_READY
$this->alias . '.notbefore > NOW()',
],
[ // NOT_STARTED
$this->alias . '.fetched' => null,
],
[ // IN_PROGRESS
'AND' => [
$this->alias . '.fetched NOT' => null,
$this->alias . '.fetched >' => $fetchedTime,
$this->alias . '.completed' => null,
$this->alias . '.failed' => 0,
],
]
],
$this->alias . '.jobtype' => $jobType,
];
if ($includeFinished) {
$conditions['OR'][] = [ // FAILED
'AND' => [
$this->alias . '.fetched NOT' => null,
$this->alias . '.fetched >' => $fetchedTime,
$this->alias . '.completed' => null,
$this->alias . '.failed >' => 0,
],
];
| php | {
"resource": ""
} |
q10918 | ExtendQueuedTask.updateMessage | train | public function updateMessage($id = null, $message = null) {
if (empty($id) || !$this->exists($id)) {
return false;
}
$message = (string)$message;
if (empty($message)) {
$message | php | {
"resource": ""
} |
q10919 | ExtendQueuedTask.updateTaskProgress | train | public function updateTaskProgress($id, &$step, $maxStep = 0) {
if (empty($id) || !$this->exists($id) ||
($maxStep < 1) || ($maxStep < $step)) {
return false;
| php | {
"resource": ""
} |
q10920 | ExtendQueuedTask.updateTaskErrorMessage | train | public function updateTaskErrorMessage($id = null, $errorMessage = null, $keepExistingMessage = false) {
if (empty($id) || !$this->exists($id) || empty($errorMessage)) {
return false;
}
if ($keepExistingMessage) {
$this->id = $id; | php | {
"resource": ""
} |
q10921 | ExtendQueuedTask.deleteTasks | train | public function deleteTasks($data = null) {
if (empty($data) || !is_array($data)) {
return false;
}
$excludeFields = [
'data',
'failure_message',
'workerkey',
];
$data = array_diff_key($data, array_flip($excludeFields));
$conditions = [];
foreach ($data as $field => $value) {
$conditions[$this->alias . '.' . $field] = $value;
}
if (empty($conditions)) {
| php | {
"resource": ""
} |
q10922 | ConnectionManager.findConnection | train | public function findConnection(string $name=null)
{
if ( empty($name) ) {
# Take first available connection
$connection = \reset($this->connections);
if ($connection === false)
return null;
} else {
# Attempt to | php | {
"resource": ""
} |
q10923 | ConnectionManager.addConnection | train | public function addConnection(PdoConnectionInterface $connection)
{
| php | {
"resource": ""
} |
q10924 | MimeType.register | train | public static function register(string $guesser): void
{
if (\in_array(MimeTypeGuesserContract::class, \class_implements($guesser), true)) {
| php | {
"resource": ""
} |
q10925 | MimeType.guess | train | public static function guess(string $guess): ?string
{
$guessers = self::getGuessers();
if (\count($guessers) === 0) {
$msg = 'Unable to guess the mime type as no guessers are available';
if (! MimeTypeFileInfoGuesser::isSupported()) {
$msg .= ' (Did you enable the php_fileinfo extension?).';
}
throw new \LogicException($msg);
}
$exception = null;
foreach ($guessers as $guesser) {
try {
| php | {
"resource": ""
} |
q10926 | MimeType.getGuessers | train | private static function getGuessers(): array
{
if (! self::$nativeGuessersLoaded) {
if (MimeTypeFileExtensionGuesser::isSupported()) {
self::$guessers[] = MimeTypeFileExtensionGuesser::class;
}
if (MimeTypeFileInfoGuesser::isSupported()) {
self::$guessers[] = MimeTypeFileInfoGuesser::class;
| php | {
"resource": ""
} |
q10927 | View.get_block_template | train | public static function get_block_template( $url ) {
$template = static::get_template( $url );
$template = str_replace( '<a ', '<span ', $template );
$template = str_replace( '</a>', '</span>', $template );
// @codingStandardsIgnoreStart
$template .= sprintf(
'<link rel="stylesheet" href="%1$s">',
esc_url_raw( get_template_directory_uri() . '/vendor/inc2734/wp-oembed-blog-card/src/assets/css/gutenberg-embed.min.css' )
);
$template .= sprintf(
| php | {
"resource": ""
} |
q10928 | View.get_pre_blog_card_template | train | public static function get_pre_blog_card_template( $url ) {
if ( ! $url ) {
return;
}
if ( 0 === strpos( $url, home_url() ) ) {
$target = '_self';
} else {
$target = '_blank';
}
return static::_strip_newlines(
sprintf(
| php | {
"resource": ""
} |
q10929 | Path.combine | train | public static function combine($part1, $part2)
{
if ($part1 && $part2) {
return sprintf("%s/%s", rtrim($part1, '/'), ltrim($part2, '/'));
}
| php | {
"resource": ""
} |
q10930 | Path.getRoot | train | public static function getRoot($rootForPath = null, $rootHasDir = 'lib')
{
if (!$rootForPath) {
$includes = get_included_files();
$rootForPath = $includes[0];
}
$rootForPath = rtrim($rootForPath, DIRECTORY_SEPARATOR);
$rootHasDir = ltrim($rootHasDir, DIRECTORY_SEPARATOR);
while (!is_dir($rootForPath . DIRECTORY_SEPARATOR . $rootHasDir)) {
| php | {
"resource": ""
} |
q10931 | Path.purge | train | public static function purge($path, $fileFilterRegex = null, $dirFilterRegex = null)
{
Path::validatePath($path);
$iterator = new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS);
$iterator = new RecursiveIteratorIterator($iterator, RecursiveIteratorIterator::CHILD_FIRST);
foreach ((array) $fileFilterRegex | php | {
"resource": ""
} |
q10932 | ExtendedRequest.getIp | train | public function getIp()
{
$keys = ['X_FORWARDED_FOR', 'HTTP_X_FORWARDED_FOR', 'CLIENT_IP', 'REMOTE_ADDR'];
foreach ($keys as $key) {
$ip = $this->getServerParam($key); | php | {
"resource": ""
} |
q10933 | ExtendedRequest.getRequestTargetWithParams | train | public function getRequestTargetWithParams($params)
{
$target = $this->getFullPath();
if ($params) {
| php | {
"resource": ""
} |
q10934 | ExtendedRequest.withHost | train | public function withHost($host)
{
$uri = $this->getUri()->withHost($host);
/** @var static $clone */
| php | {
"resource": ""
} |
q10935 | Pearify.getTempDir | train | protected static function getTempDir()
{
$name = tempnam(sys_get_temp_dir(), 'tmp'); | php | {
"resource": ""
} |
q10936 | Player.initRecords | train | public function initRecords($overrideExisting = true)
{
if (null !== $this->collRecords && !$overrideExisting) {
return;
}
$collectionClassName = RecordTableMap::getTableMap()->getCollectionClassName();
| php | {
"resource": ""
} |
q10937 | Player.getRecords | train | public function getRecords(Criteria $criteria = null, ConnectionInterface $con = null)
{
$partial = $this->collRecordsPartial && !$this->isNew();
if (null === $this->collRecords || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collRecords) {
// return empty collection
$this->initRecords();
} else {
$collRecords = RecordQuery::create(null, $criteria)
->filterByPlayer($this)
->find($con);
if (null !== $criteria) {
if (false !== $this->collRecordsPartial && count($collRecords)) {
$this->initRecords(false);
foreach ($collRecords as $obj) {
if (false == $this->collRecords->contains($obj)) {
$this->collRecords->append($obj);
| php | {
"resource": ""
} |
q10938 | Player.countRecords | train | public function countRecords(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
{
$partial = $this->collRecordsPartial && !$this->isNew();
if (null === $this->collRecords || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collRecords) {
return 0;
}
if ($partial && !$criteria) {
return count($this->getRecords());
| php | {
"resource": ""
} |
q10939 | Player.addRecord | train | public function addRecord(Record $l)
{
if ($this->collRecords === null) {
$this->initRecords();
$this->collRecordsPartial = true;
}
if (!$this->collRecords->contains($l)) {
| php | {
"resource": ""
} |
q10940 | EloquentAccount.byIds | train | public function byIds(array $ids, $databaseConnectionName = null)
{
if(empty($databaseConnectionName))
{
| php | {
"resource": ""
} |
q10941 | EloquentAccount.byOrganizationAndByKey | train | public function byOrganizationAndByKey($organizationId, $key)
{
if(empty($databaseConnectionName))
{
$databaseConnectionName = $this->databaseConnectionName;
}
| php | {
"resource": ""
} |
q10942 | EloquentAccount.byParent | train | public function byParent($id, $databaseConnectionName = null)
{
if(empty($databaseConnectionName))
{
$databaseConnectionName = $this->databaseConnectionName;
}
| php | {
"resource": ""
} |
q10943 | PayeeVisitor.beforePayeeBankgiro | train | public function beforePayeeBankgiro(Node $node): void
{
if (!$this->payeeBg) {
$this->payeeBg = (string)$node->getValueFrom('Number');
}
if ($node->getValueFrom('Number') != $this->payeeBg) {
$this->getErrorObject()->addError(
"Non-matching payee bankgiro numbers (expecting: | php | {
"resource": ""
} |
q10944 | PayeeVisitor.beforePayeeBgcNumber | train | public function beforePayeeBgcNumber(Node $node): void
{
if (!$this->payeeBgcNr) {
$this->payeeBgcNr = (string)$node->getValue();
}
if ($node->getValue() != $this->payeeBgcNr) {
$this->getErrorObject()->addError(
"Non-matching payee BGC customer numbers (expecting: | php | {
"resource": ""
} |
q10945 | Transactions.all | train | public static function all(array $arg_params)
{
//validate params
$data = self::getParams($arg_params);
$url = '/ecommerce/transactions';
$filters = '';
if(!empty($data['page'])&&ctype_digit($data['page'])){
$filters .= 'page='.$data['page'];
}
if(!empty($filters))$filters='?'.$filters;
| php | {
"resource": ""
} |
q10946 | ModuleFactory.httpDigestParse | train | private static function httpDigestParse($txt)
{
// protect against missing data
$needed_parts = array('nonce'=>1, 'nc'=>1, 'cnonce'=>1, 'qop'=>1, 'username'=>1, 'uri'=>1, 'response'=>1);
$data = array();
| php | {
"resource": ""
} |
q10947 | Series.setOption | train | public function setOption( $name, $value )
{
$this->jsWriter->setSeriesOption( | php | {
"resource": ""
} |
q10948 | Series.setLineWidth | train | public function setLineWidth( $val )
{
if ( $this->jsWriter instanceof \Altamira\JsWriter\Ability\Lineable ) {
| php | {
"resource": ""
} |
q10949 | SummaryField.Field | train | public function Field($properties = array())
{
$context = $this;
$properties['Editable'] = $this->editable;
$properties['Reservation'] = $this->getReservation();
$properties['Attendees'] = $this->editable
? $this->getEditableAttendees()
: $this->getReservation()->Attendees();
| php | {
"resource": ""
} |
q10950 | TcPdfFactory.create | train | public function create(array $options = array())
{
$reflClass = $this->getReflectionClass($options);
$options = array_merge(array(
'orientation' => 'P',
'unit' => 'mm',
'format' => 'USLETTER',
'unicode' => true,
'encoding' => 'UTF-8',
'diskcache' => true,
'pdfa' => false,
'printHeader' => false,
'printFooter' => false,
'margins' => array(15, 27, 15),
'autoPageBreak' => array(true, 25),
), $options);
$pdf = $reflClass->newInstanceArgs($this->getConstructorOptions($options));
foreach ($options as $option => $arguments) {
if (is_callable(array($pdf, 'set' | php | {
"resource": ""
} |
q10951 | TcPdfFactory.getConstructorOptions | train | protected function getConstructorOptions(array &$options)
{
$ctorOptions = array(
'orientation' => isset($options['orientation']) ? $options['orientation'] : 'P',
'unit' => isset($options['unit']) ? $options['unit'] : 'mm',
'format' => isset($options['format']) ? $options['format'] : 'A4',
'unicode' => isset($options['unicode']) ? $options['unicode'] : true,
'encoding' => isset($options['encoding']) ? $options['encoding'] : 'UTF-8',
// Diskcache actually defaults to false, but caching is a good thing, so we will default to true
'diskcache' => isset($options['diskcache']) ? | php | {
"resource": ""
} |
q10952 | ReservationSession.start | train | public static function start(CalendarEvent $event)
{
$reservation = Reservation::create();
$reservation->EventID = $event->ID;
| php | {
"resource": ""
} |
q10953 | ReservationSession.end | train | public static function end()
{
// If the session is ended while in cart or pending state, remove the reservation.
// The session is only ended in these states when iffy business is going on.
if | php | {
"resource": ""
} |
q10954 | Record.setPlayer | train | public function setPlayer(Player $v = null)
{
if ($v === null) {
$this->setPlayerId(NULL);
} else {
$this->setPlayerId($v->getId());
}
$this->aPlayer = $v;
// Add binding for other direction of this n:n relationship.
// If this object | php | {
"resource": ""
} |
q10955 | Record.getPlayer | train | public function getPlayer(ConnectionInterface $con = null)
{
if ($this->aPlayer === null && ($this->player_id !== null)) {
$this->aPlayer = PlayerQuery::create()->findPk($this->player_id, $con);
/* The following can be used additionally to
| php | {
"resource": ""
} |
q10956 | TicketExtension.createDefaultFields | train | public function createDefaultFields()
{
$fields = Attendee::config()->get('default_fields');
if (!$this->owner->Fields()->exists()) {
foreach ($fields as $fieldName => $config) {
| php | {
"resource": ""
} |
q10957 | TicketExtension.updateCMSActions | train | public function updateCMSActions(FieldList $actions)
{
$checkInButton = new LiteralField('StartCheckIn',
"<a class='action ss-ui-button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only'
| php | {
"resource": ""
} |
q10958 | TicketExtension.getTicketSaleStartDate | train | public function getTicketSaleStartDate()
{
$saleStart = null;
if (($tickets = $this->owner->Tickets())) {
/** @var Ticket $ticket */
foreach ($tickets as $ticket) {
| php | {
"resource": ""
} |
q10959 | TicketExtension.getEventExpired | train | public function getEventExpired()
{
$expired = false;
if (($tickets = $this->owner->Tickets()) && $expired = $tickets->exists()) {
/** @var Ticket $ticket */
foreach ($tickets as $ticket) {
| php | {
"resource": ""
} |
q10960 | TicketExtension.getGuestList | train | public function getGuestList()
{
$reservationClass = Reservation::singleton()->getClassName();
$attendeeClass = Attendee::singleton()->getClassName();
return Attendee::get()
->leftJoin($reservationClass, "`$attendeeClass`.`ReservationID` = | php | {
"resource": ""
} |
q10961 | TicketExtension.getSuccessContent | train | public function getSuccessContent()
{
if (!empty($this->owner->SuccessMessage)) {
return $this->owner->dbObject('SuccessMessage');
} else {
| php | {
"resource": ""
} |
q10962 | TicketExtension.getMailContent | train | public function getMailContent()
{
if (!empty($this->owner->SuccessMessageMail)) {
return $this->owner->dbObject('SuccessMessageMail');
} else {
| php | {
"resource": ""
} |
q10963 | TicketExtension.canCreateTickets | train | public function canCreateTickets()
{
$currentDate = $this->owner->getController()->CurrentDate();
if ($currentDate && $currentDate->exists()) {
| php | {
"resource": ""
} |
q10964 | TicketExtension.getController | train | public function getController()
{
return $this->controller
? $this->controller
| php | {
"resource": ""
} |
q10965 | CachedObjectHandler.getDataCacheKey | train | public static function getDataCacheKey($data, Context $context)
{
$group = $context->hasAttribute('groups') ? $context->getAttribute('groups') : '*';
$version = $context->hasAttribute('version') ? $context->getAttribute('version') : '*';
| php | {
"resource": ""
} |
q10966 | MapQuery.filterByFilename | train | public function filterByFilename($filename = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($filename)) {
$comparison = Criteria::IN;
}
| php | {
"resource": ""
} |
q10967 | MapQuery.filterByEnvironment | train | public function filterByEnvironment($environment = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($environment)) {
$comparison = Criteria::IN;
}
| php | {
"resource": ""
} |
q10968 | MapQuery.filterByMood | train | public function filterByMood($mood = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($mood)) {
$comparison = Criteria::IN;
}
| php | {
"resource": ""
} |
q10969 | MapQuery.filterByBronzetime | train | public function filterByBronzetime($bronzetime = null, $comparison = null)
{
if (is_array($bronzetime)) {
$useMinMax = false;
if (isset($bronzetime['min'])) {
$this->addUsingAlias(MapTableMap::COL_BRONZETIME, $bronzetime['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($bronzetime['max'])) {
$this->addUsingAlias(MapTableMap::COL_BRONZETIME, $bronzetime['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
| php | {
"resource": ""
} |
q10970 | MapQuery.filterBySilvertime | train | public function filterBySilvertime($silvertime = null, $comparison = null)
{
if (is_array($silvertime)) {
$useMinMax = false;
if (isset($silvertime['min'])) {
$this->addUsingAlias(MapTableMap::COL_SILVERTIME, $silvertime['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($silvertime['max'])) {
$this->addUsingAlias(MapTableMap::COL_SILVERTIME, $silvertime['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
| php | {
"resource": ""
} |
q10971 | MapQuery.filterByGoldtime | train | public function filterByGoldtime($goldtime = null, $comparison = null)
{
if (is_array($goldtime)) {
$useMinMax = false;
if (isset($goldtime['min'])) {
$this->addUsingAlias(MapTableMap::COL_GOLDTIME, $goldtime['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($goldtime['max'])) {
$this->addUsingAlias(MapTableMap::COL_GOLDTIME, $goldtime['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
| php | {
"resource": ""
} |
q10972 | MapQuery.filterByAuthortime | train | public function filterByAuthortime($authortime = null, $comparison = null)
{
if (is_array($authortime)) {
$useMinMax = false;
if (isset($authortime['min'])) {
$this->addUsingAlias(MapTableMap::COL_AUTHORTIME, $authortime['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($authortime['max'])) {
$this->addUsingAlias(MapTableMap::COL_AUTHORTIME, $authortime['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
| php | {
"resource": ""
} |
q10973 | MapQuery.filterByCopperprice | train | public function filterByCopperprice($copperprice = null, $comparison = null)
{
if (is_array($copperprice)) {
$useMinMax = false;
if (isset($copperprice['min'])) {
$this->addUsingAlias(MapTableMap::COL_COPPERPRICE, $copperprice['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($copperprice['max'])) {
$this->addUsingAlias(MapTableMap::COL_COPPERPRICE, $copperprice['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
| php | {
"resource": ""
} |
q10974 | MapQuery.filterByLaprace | train | public function filterByLaprace($laprace = null, $comparison = null)
{
if (is_string($laprace)) {
$laprace = in_array(strtolower($laprace), | php | {
"resource": ""
} |
q10975 | MapQuery.filterByNblaps | train | public function filterByNblaps($nblaps = null, $comparison = null)
{
if (is_array($nblaps)) {
$useMinMax = false;
if (isset($nblaps['min'])) {
$this->addUsingAlias(MapTableMap::COL_NBLAPS, $nblaps['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($nblaps['max'])) {
$this->addUsingAlias(MapTableMap::COL_NBLAPS, $nblaps['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
| php | {
"resource": ""
} |
q10976 | MapQuery.filterByNpcheckpoints | train | public function filterByNpcheckpoints($npcheckpoints = null, $comparison = null)
{
if (is_array($npcheckpoints)) {
$useMinMax = false;
if (isset($npcheckpoints['min'])) {
$this->addUsingAlias(MapTableMap::COL_NPCHECKPOINTS, $npcheckpoints['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($npcheckpoints['max'])) {
$this->addUsingAlias(MapTableMap::COL_NPCHECKPOINTS, $npcheckpoints['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
| php | {
"resource": ""
} |
q10977 | MapQuery.filterByMapstyle | train | public function filterByMapstyle($mapstyle = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($mapstyle)) {
$comparison = Criteria::IN;
}
| php | {
"resource": ""
} |
q10978 | MapQuery.filterByMxmap | train | public function filterByMxmap($mxmap, $comparison = null)
{
if ($mxmap instanceof \eXpansion\Bundle\Maps\Model\Mxmap) {
return $this
->addUsingAlias(MapTableMap::COL_MAPUID, $mxmap->getTrackuid(), $comparison);
| php | {
"resource": ""
} |
q10979 | MapQuery.useMxmapQuery | train | public function useMxmapQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinMxmap($relationAlias, $joinType)
| php | {
"resource": ""
} |
q10980 | CommandHandlerResolver.resolveHandlingMethod | train | protected function resolveHandlingMethod($commandType)
{
// Remove namespace
$pos = strrpos($commandType, '\\');
if ($pos !== false) {
$commandType = substr($commandType, $pos + 1);
}
// Remove "Command" suffix
| php | {
"resource": ""
} |
q10981 | LogWrapper.getLogger | train | public static function getLogger($logName = 'default')
{
$filename = new LogConfigFilenameProcessor('log4php');
if (!$filename->Exists())
| php | {
"resource": ""
} |
q10982 | ChartDatumAbstract.offsetGet | train | public function offsetGet ($offset)
{
return isset($this->datumData[$offset]) ? | php | {
"resource": ""
} |
q10983 | AccessCheckFactory.create | train | public function create(array $data = array())
{
if (!isset($data["configPathPrefix"])) {
$data["configPathPrefix"] = $this->configPathPrefix;
| php | {
"resource": ""
} |
q10984 | GameDataStorage.getServerOs | train | public function getServerOs()
{
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
return self::OS_WINDOWS;
} else {
if (strtoupper(substr(PHP_OS, 0, 3)) === 'MAC') {
| php | {
"resource": ""
} |
q10985 | SummaryController.SummaryForm | train | public function SummaryForm()
{
$summary = new SummaryForm($this, 'SummaryForm', ReservationSession::get());
| php | {
"resource": ""
} |
q10986 | Collection.offsetExists | train | public function offsetExists($offset)
{
if (!is_int($offset) && !is_string($offset)) {
throw new | php | {
"resource": ""
} |
q10987 | Collection.getItems | train | public function getItems(array $keys = [])
{
$items = [];
foreach ($keys as $key) {
| php | {
"resource": ""
} |
q10988 | Collection.removeItem | train | public function removeItem($item)
{
$key = $this->getKey($item);
if ($key !== false) {
| php | {
"resource": ""
} |
q10989 | Collection.addListener | train | public function addListener(ListenerInterface $listener)
{
if (!in_array($listener, $this->collection_listeners, true)) {
| php | {
"resource": ""
} |
q10990 | Collection.removeListener | train | public function removeListener(ListenerInterface $listener)
{
if (false !== ($pos = array_search($listener, $this->collection_listeners, true))) {
| php | {
"resource": ""
} |
q10991 | Collection.toArray | train | public function toArray()
{
$data = [];
foreach ($this->items as $key => $value) {
if ($value instanceof BaseObjectInterface) {
| php | {
"resource": ""
} |
q10992 | Collection.propagateCollectionChangedEvent | train | protected function propagateCollectionChangedEvent(CollectionChangedEvent $event)
{
| php | {
"resource": ""
} |
q10993 | EloquentJournalVoucherGridRepository.numToLetter | train | protected function numToLetter($num, $uppercase = FALSE)
{
$num -= 1;
$letter = chr(($num % 26) + 97);
$letter .= (floor($num/26) > | php | {
"resource": ""
} |
q10994 | EloquentJournalVoucherGridRepository.utf8ize | train | protected function utf8ize($mixed)
{
if (is_array($mixed))
{
foreach ($mixed as $key => $value)
{
$mixed[$key] = self::utf8ize($value);
}
} | php | {
"resource": ""
} |
q10995 | OAuthClient20.handle | train | public function handle()
{
// Get Var Elements
$accessToken = $this->getAccessToken();
$state = $this->getVar("state");
// Initiate OAuth Client with Specific server configuration
$to = new $this->_className();
// Try to Handle the Authentication Process
if ($accessToken == "")
{
$code = $this->_context->get("code");
// If not received the "Code" Parameter, initiate the autorization request
if ($code == "")
{
$state = md5(uniqid(rand(), TRUE)); //CSRF protection
$this->setVar("state", $state);
$params = array(
"client_id" => $this->_client_id,
"redirect_uri" => $this->_redirect_uri,
"state" => $state,
"scope" => $this->_scope
);
if (count($this->_extraArgs) > 0)
{
$params = array_merge($params, $this->_extraArgs);
}
$req = new WebRequest($to->authorizationURL());
$req->redirect($params, $this->_window_top);
}
// Request the Access Token
if ($this->_context->get("state") | php | {
"resource": ""
} |
q10996 | ChatCommands.registerPlugin | train | public function registerPlugin($pluginId, ChatCommandPluginInterface $pluginService)
{
$commands = $pluginService->getChatCommands();
foreach ($commands as $command) | php | {
"resource": ""
} |
q10997 | ChatCommands.deletePlugin | train | public function deletePlugin($pluginId)
{
if (!isset($this->commandPlugin[$pluginId])) {
return;
| php | {
"resource": ""
} |
q10998 | ChatCommands.getChatCommands | train | public function getChatCommands()
{
$chatCommands = [];
foreach ($this->commands as | php | {
"resource": ""
} |
q10999 | ChatCommands.findChatCommand | train | protected function findChatCommand($cmdAndArgs, $depth, $orig = null)
{
if ($depth == 0) {
return [null, []];
}
if ($orig == null) {
$orig = $cmdAndArgs;
}
$cmdAndArgs = array_splice($cmdAndArgs, 0, $depth);
$parameters = array_diff($orig, $cmdAndArgs);
$command = implode(' ', $cmdAndArgs);
| php | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.