_id stringlengths 2 7 | title stringlengths 3 151 | partition stringclasses 3
values | text stringlengths 83 13k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q8000 | SystemSetting.setCoreResourceTreeNodeNameFallback | train | public function setCoreResourceTreeNodeNameFallback($value)
{
$this->setFieldName('resource_tree_node_name_fallback');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8001 | SystemSetting.setCoreResourceTreeNodeTooltip | train | public function setCoreResourceTreeNodeTooltip($value)
{
$this->setFieldName('resource_tree_node_tooltip');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8002 | SystemSetting.setCoreRichtextDefault | train | public function setCoreRichtextDefault($value)
{
$this->setFieldName('richtext_default');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8003 | SystemSetting.setCoreSearchDefault | train | public function setCoreSearchDefault($value)
{
$this->setFieldName('search_default');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8004 | SystemSetting.setCoreSendPoweredbyHeader | train | public function setCoreSendPoweredbyHeader($value)
{
$this->setFieldName('send_poweredby_header');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8005 | SystemSetting.setCoreServerOffsetTime | train | public function setCoreServerOffsetTime($value)
{
$this->setFieldName('server_offset_time');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8006 | SystemSetting.setCoreServerProtocol | train | public function setCoreServerProtocol($value)
{
$this->setFieldName('server_protocol');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8007 | SystemSetting.setCoreSessionCookieDomain | train | public function setCoreSessionCookieDomain($value)
{
$this->setFieldName('session_cookie_domain');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8008 | SystemSetting.setCoreSessionCookieHttponly | train | public function setCoreSessionCookieHttponly($value)
{
$this->setFieldName('session_cookie_httponly');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8009 | SystemSetting.setCoreSessionCookieLifetime | train | public function setCoreSessionCookieLifetime($value)
{
$this->setFieldName('session_cookie_lifetime');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8010 | SystemSetting.setCoreSessionCookiePath | train | public function setCoreSessionCookiePath($value)
{
$this->setFieldName('session_cookie_path');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8011 | SystemSetting.setCoreSessionGcMaxlifetime | train | public function setCoreSessionGcMaxlifetime($value)
{
$this->setFieldName('session_gc_maxlifetime');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8012 | SystemSetting.setCoreSessionHandlerClass | train | public function setCoreSessionHandlerClass($value)
{
$this->setFieldName('session_handler_class');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8013 | SystemSetting.setCoreSessionName | train | public function setCoreSessionName($value)
{
$this->setFieldName('session_name');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8014 | SystemSetting.setCoreSetHeader | train | public function setCoreSetHeader($value)
{
$this->setFieldName('set_header');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8015 | SystemSetting.setCoreSettingsDistro | train | public function setCoreSettingsDistro($value)
{
$this->setFieldName('settings_distro');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8016 | SystemSetting.setCoreSettingsVersion | train | public function setCoreSettingsVersion($value)
{
$this->setFieldName('settings_version');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8017 | SystemSetting.setCoreShowTvCategoriesHeader | train | public function setCoreShowTvCategoriesHeader($value)
{
$this->setFieldName('show_tv_categories_header');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8018 | SystemSetting.setCoreSiteName | train | public function setCoreSiteName($value)
{
$this->setFieldName('site_name');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8019 | SystemSetting.setCoreSiteStatus | train | public function setCoreSiteStatus($value)
{
$this->setFieldName('site_status');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8020 | SystemSetting.setCoreSymlinkMergeFields | train | public function setCoreSymlinkMergeFields($value)
{
$this->setFieldName('symlink_merge_fields');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8021 | SystemSetting.setCoreSyncsiteDefault | train | public function setCoreSyncsiteDefault($value)
{
$this->setFieldName('syncsite_default');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8022 | SystemSetting.setCoreTopmenuShowDescriptions | train | public function setCoreTopmenuShowDescriptions($value)
{
$this->setFieldName('topmenu_show_descriptions');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8023 | SystemSetting.setCoreTreeDefaultSort | train | public function setCoreTreeDefaultSort($value)
{
$this->setFieldName('tree_default_sort');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8024 | SystemSetting.setCoreTreeRootId | train | public function setCoreTreeRootId($value)
{
$this->setFieldName('tree_root_id');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8025 | SystemSetting.setCoreTvsBelowContent | train | public function setCoreTvsBelowContent($value)
{
$this->setFieldName('tvs_below_content');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8026 | SystemSetting.setCoreUdpermsAllowroot | train | public function setCoreUdpermsAllowroot($value)
{
$this->setFieldName('udperms_allowroot');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8027 | SystemSetting.setCoreUseBrowser | train | public function setCoreUseBrowser($value)
{
$this->setFieldName('use_browser');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8028 | SystemSetting.setCoreUseContextResourceTable | train | public function setCoreUseContextResourceTable($value)
{
$this->setFieldName('use_context_resource_table');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8029 | SystemSetting.setCoreUseEditor | train | public function setCoreUseEditor($value)
{
$this->setFieldName('use_editor');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8030 | SystemSetting.setCoreUseFrozenParentUris | train | public function setCoreUseFrozenParentUris($value)
{
$this->setFieldName('use_frozen_parent_uris');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8031 | SystemSetting.setCoreUseMultibyte | train | public function setCoreUseMultibyte($value)
{
$this->setFieldName('use_multibyte');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8032 | SystemSetting.setCoreUserNavParent | train | public function setCoreUserNavParent($value)
{
$this->setFieldName('user_nav_parent');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8033 | SystemSetting.setCoreWelcomeAction | train | public function setCoreWelcomeAction($value)
{
$this->setFieldName('welcome_action');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8034 | SystemSetting.setCoreWelcomeNamespace | train | public function setCoreWelcomeNamespace($value)
{
$this->setFieldName('welcome_namespace');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8035 | SystemSetting.setCoreWelcomeScreen | train | public function setCoreWelcomeScreen($value)
{
$this->setFieldName('welcome_screen');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8036 | SystemSetting.setCoreWelcomeScreenUrl | train | public function setCoreWelcomeScreenUrl($value)
{
$this->setFieldName('welcome_screen_url');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8037 | SystemSetting.setCoreWhichEditor | train | public function setCoreWhichEditor($value)
{
$this->setFieldName('which_editor');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8038 | SystemSetting.setCoreWhichElementEditor | train | public function setCoreWhichElementEditor($value)
{
$this->setFieldName('which_element_editor');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8039 | SystemSetting.setCoreXhtmlUrls | train | public function setCoreXhtmlUrls($value)
{
$this->setFieldName('xhtml_urls');
$this->loadObject(true);
$this->setFieldValue($value);
return $this;
} | php | {
"resource": ""
} |
q8040 | Sql.connect | train | public function connect()
{
if ($this->connected) {
return $this;
}
# Set that we are connected here, because queries can be run as part of the below code, which would cause an infinite loop
$this->connected = true;
switch ($this->mode) {
case "mysq... | php | {
"resource": ""
} |
q8041 | Sql.attachDatabase | train | public function attachDatabase($filename, $database = null)
{
if ($this->mode != "sqlite") {
throw new \Exception("You can only attach databases when in sqlite mode");
}
if (!$database) {
$database = pathinfo($filename, PATHINFO_FILENAME);
}
$query =... | php | {
"resource": ""
} |
q8042 | Sql.getTableDatabase | train | protected function getTableDatabase($table)
{
if (!array_key_exists($table, $this->tables)) {
return false;
}
$database = $this->tables[$table];
# If this table's database depends on the mode
if (is_array($database)) {
if (array_key_exists($this->mod... | php | {
"resource": ""
} |
q8043 | Sql.getTableName | train | protected function getTableName($table)
{
$database = $this->getTableDatabase($table);
# If we found a database for this table then include it in the return value
if ($database) {
$database = $this->quoteField($database);
if (substr($this->mode, 0, 5) === "mssql") {... | php | {
"resource": ""
} |
q8044 | Sql.quoteChars | train | protected function quoteChars(&$query)
{
$checked = [];
$chars = $this->quoteChars[$this->mode];
if (is_array($chars)) {
$newFrom = $chars[0];
$newTo = $chars[1];
} else {
$newFrom = $chars;
$newTo = $chars;
}
foreach ... | php | {
"resource": ""
} |
q8045 | Sql.functions | train | protected function functions(&$query)
{
switch ($this->mode) {
case "mysql":
case "odbc":
case "sqlite":
$query = preg_replace("/\bISNULL\(/", "IFNULL(", $query);
break;
case "postgres":
case "redshift":
... | php | {
"resource": ""
} |
q8046 | Sql.limit | train | protected function limit(&$query)
{
switch ($this->mode) {
case "mysql":
case "postgres":
case "redshift":
case "sqlite":
$query = preg_replace("/\bFETCH\s+FIRST\s+([0-9]+)\s+ROW(S?)\s+ONLY\b/i", "\nLIMIT $1\n", $query);
break;... | php | {
"resource": ""
} |
q8047 | Sql.paramArrays | train | protected function paramArrays(&$query, &$params)
{
if (!is_array($params)) {
return;
}
$newParams = [];
$this->modifyQuery($query, function ($part) use (&$params, &$newParams) {
$newPart = "";
$tmpPart = $part;
while (count($params)... | php | {
"resource": ""
} |
q8048 | Sql.namedParams | train | protected function namedParams(&$query, &$params)
{
if (!is_array($params)) {
return;
}
$pattern = "a-zA-Z0-9_";
if (!preg_match("/\?([" . $pattern . "]+)/", $query)) {
return;
}
$oldParams = $params;
$params = [];
reset($ol... | php | {
"resource": ""
} |
q8049 | Sql.cache | train | public function cache($query, array $params = null, $timeout = null)
{
$options = array_merge($this->cacheOptions, [
"sql" => $this,
"query" => $query,
"params" => $params,
]);
if ($timeout) {
$options["timeout"] = $timeout;
... | php | {
"resource": ""
} |
q8050 | Sql.where | train | public function where($where, &$params)
{
if (!is_array($where)) {
throw new \Exception("Invalid where clause specified, must be an array");
}
$params = Helper::toArray($params);
$query = "";
$andFlag = false;
foreach ($where as $field => $value) {
... | php | {
"resource": ""
} |
q8051 | Sql.fieldSelect | train | public function fieldSelect($table, $fields, $where, $orderBy = null)
{
$table = $this->getTableName($table);
$query = "SELECT ";
if (substr($this->mode, 0, 5) === "mssql") {
$query .= "TOP 1 ";
}
$query .= $this->selectFields($fields);
$query .= " FRO... | php | {
"resource": ""
} |
q8052 | Sql.fieldSelectAll | train | public function fieldSelectAll($table, $fields, $where, $orderBy = null)
{
$table = $this->getTableName($table);
$query = "SELECT ";
$query .= $this->selectFields($fields);
$query .= " FROM " . $table . " ";
$params = null;
if ($where !== self::NO_WHERE_CLAUSE) {
... | php | {
"resource": ""
} |
q8053 | Sql.insertOrUpdate | train | public function insertOrUpdate($table, array $set, array $where)
{
if ($this->select($table, $where)) {
$result = $this->update($table, $set, $where);
} else {
$params = array_merge($where, $set);
$result = $this->insert($table, $params);
}
return... | php | {
"resource": ""
} |
q8054 | Sql.orderBy | train | public function orderBy($fields)
{
if (!is_array($fields)) {
$fields = explode(",", $fields);
}
$orderBy = "";
foreach ($fields as $field) {
if (!$field = trim($field)) {
continue;
}
if (!$orderBy) {
$o... | php | {
"resource": ""
} |
q8055 | Sql.quoteField | train | protected function quoteField($field)
{
# The odbc sql only uses it's quote strings for renaming fields, not for quoting table/field names
if ($this->mode == "odbc") {
return $field;
}
$field = trim($field);
$chars = $this->quoteChars[$this->mode];
if (... | php | {
"resource": ""
} |
q8056 | Sql.quoteTable | train | protected function quoteTable($table)
{
# The odbc sql only uses it's quote strings for renaming fields, not for quoting table/field names
if ($this->mode == "odbc") {
return $table;
}
$table = trim($table);
# There is a standard function for quoting postgres ta... | php | {
"resource": ""
} |
q8057 | Sql.startTransaction | train | public function startTransaction()
{
# Ensure we have a connection to start the transaction on
$this->connect();
switch ($this->mode) {
case "mysql":
$result = $this->server->autocommit(false);
break;
case "postgres":
... | php | {
"resource": ""
} |
q8058 | Sql.endTransaction | train | public function endTransaction($commit)
{
if ($commit) {
$result = $this->commit();
} else {
$result = $this->rollback();
}
switch ($this->mode) {
case "mysql":
if (!$this->server->autocommit(true)) {
$result =... | php | {
"resource": ""
} |
q8059 | Sql.commit | train | public function commit()
{
switch ($this->mode) {
case "mysql":
$result = $this->server->commit();
break;
case "postgres":
case "redshift":
$result = $this->query("COMMIT");
break;
case "odbc":... | php | {
"resource": ""
} |
q8060 | Sql.rollback | train | public function rollback()
{
switch ($this->mode) {
case "mysql":
$result = $this->server->rollback();
break;
case "postgres":
case "redshift":
$result = $this->query("ROLLBACK");
break;
case "... | php | {
"resource": ""
} |
q8061 | Sql.lockTables | train | public function lockTables($tables)
{
/**
* Unlock any previously locked tables
* This is done to provide consistency across different modes, as mysql only allows one single lock over multiple tables
* Also the odbc only allows all locks to be released, not individual tables. So i... | php | {
"resource": ""
} |
q8062 | Sql.unlockTables | train | public function unlockTables()
{
switch ($this->mode) {
case "mysql":
$query = "UNLOCK TABLES";
break;
case "postgres":
case "redshift":
case "odbc":
$query = "COMMIT";
break;
defau... | php | {
"resource": ""
} |
q8063 | Sql.disconnect | train | public function disconnect()
{
if (!$this->connected || !$this->server || ($this->mode == "mysql" && $this->server->connect_error)) {
return false;
}
$result = false;
switch ($this->mode) {
case "mysql":
case "sqlite":
$result =... | php | {
"resource": ""
} |
q8064 | VerifierControlTrait.redirectVerified | train | public function redirectVerified($code, $destination = null, $parameters = []): void
{
// first parameter is optional
if (!is_numeric($code)) {
$parameters = is_array($destination) ? $destination : array_slice(func_get_args(), 1);
$destination = $code;
$code = nul... | php | {
"resource": ""
} |
q8065 | VerifierControlTrait.linkVerified | train | public function linkVerified(string $destination, array $args = []): ?string
{
$link = $this->link($destination, $args);
/** @var Presenter $presenter */
$presenter = $this->getPresenter();
return $presenter->getVerifier()->isLinkVerified($presenter->getLastCreatedRequest(), $this)... | php | {
"resource": ""
} |
q8066 | VerifierControlTrait.getComponentVerified | train | public function getComponentVerified(string $name): ?IComponent
{
/** @var Presenter $presenter */
$presenter = $this->getPresenter();
return $presenter->getVerifier()->isComponentVerified($name, $presenter->getRequest(), $this) ? $this->getComponent($name) : null;
} | php | {
"resource": ""
} |
q8067 | VerifierControlTrait.attached | train | protected function attached($component): void
{
if ($component instanceof Presenter) {
$this->onPresenter($component);
}
parent::attached($component);
} | php | {
"resource": ""
} |
q8068 | Verifier.getRules | train | public function getRules(Reflector $reflection): array
{
if ($reflection instanceof ReflectionMethod) {
$key = $reflection->getDeclaringClass()->getName().'::'.$reflection->getName();
} elseif ($reflection instanceof ReflectionClass) {
$key = $reflection->getName();
}... | php | {
"resource": ""
} |
q8069 | Verifier.checkRules | train | public function checkRules(array $rules, Request $request, ?string $component = null): void
{
foreach ($rules as $rule) {
$class = get_class($rule);
$handler = ($this->handlerResolver)($class);
if (!$handler instanceof RuleHandlerInterface) {
throw new Une... | php | {
"resource": ""
} |
q8070 | Verifier.checkReflection | train | public function checkReflection(Reflector $reflection, Request $request, ?string $component = null): void
{
$rules = $this->getRules($reflection);
$this->checkRules($rules, $request, $component);
} | php | {
"resource": ""
} |
q8071 | Verifier.isLinkVerified | train | public function isLinkVerified(Request $request, Component $component): bool
{
try {
$parameters = $request->getParameters();
if (isset($parameters[Presenter::SIGNAL_KEY])) {
// No need to check anything else, the requirements for presenter,
// action ... | php | {
"resource": ""
} |
q8072 | Verifier.isComponentVerified | train | public function isComponentVerified(string $name, Request $request, Component $parent): bool
{
$reflection = new ComponentReflection($parent);
$method = 'createComponent'.ucfirst($name);
if ($reflection->hasMethod($method)) {
$factory = $reflection->getMethod($method);
... | php | {
"resource": ""
} |
q8073 | RouteMethods.addRouteToGroup | train | protected function addRouteToGroup (\MvcCore\IRoute & $route, $routeName, $groupName, $prepend) {
if ($groupName === NULL) {
$routesGroupsKey = '';
} else {
$routesGroupsKey = $groupName;
$route->SetGroupName($groupName);
}
if (isset($this->routesGroups[$routesGroupsKey])) {
$groupRoutes = & $this->... | php | {
"resource": ""
} |
q8074 | RouteMethods.HasRoute | train | public function HasRoute ($routeOrRouteName) {
if (is_string($routeOrRouteName)) {
return isset($this->routes[$routeOrRouteName]);
} else /*if ($routeOrRouteName instance of \MvcCore\IRoute)*/ {
return (
isset($this->routes[$routeOrRouteName->GetName()]) ||
isset($this->routes[$routeOrRouteName->GetC... | php | {
"resource": ""
} |
q8075 | RouteMethods.RemoveRoute | train | public function RemoveRoute ($routeName) {
$result = NULL;
if (isset($this->routes[$routeName])) {
$result = $this->routes[$routeName];
unset($this->routes[$routeName]);
$this->removeRouteFromGroup($result, $routeName);
$controllerAction = $result->GetControllerAction();
if (isset($this->urlRoutes[$r... | php | {
"resource": ""
} |
q8076 | RouteMethods.& | train | public function & GetRoute ($routeName) {
if (isset($this->routes[$routeName]))
return $this->routes[$routeName];
return NULL;
} | php | {
"resource": ""
} |
q8077 | Yaml.addFile | train | public function addFile($file, $resource = null)
{
if (!file_exists($file) || !is_file($file)) {
throw new \Exception('The configuration file ' . $file . ' does not exist.');
} else {
if ($resource === null) {
$resource = $file;
}
if (... | php | {
"resource": ""
} |
q8078 | Yaml.addDirectory | train | public function addDirectory($directory)
{
if (!file_exists($directory) || !is_dir($directory)) {
throw new \Exception('The configuration directory does not exist.');
} else {
if (substr($directory, -1) != DIRECTORY_SEPARATOR) {
$directory .= DIRECTORY_SEPARAT... | php | {
"resource": ""
} |
q8079 | Yaml.addParameters | train | public function addParameters(array $parameters)
{
self::$global_parameters = array_merge(self::$global_parameters, $parameters);
return self::getInstance();
} | php | {
"resource": ""
} |
q8080 | Yaml.addConfig | train | protected function addConfig(array $content, $resource)
{
foreach ($content as $key => $value) {
$parameterBag = self::$parameters[$resource];
$value = $parameterBag->unescapeValue($parameterBag->resolveValue($value));
if (is_array($value) && !is_numeric($key)) {
... | php | {
"resource": ""
} |
q8081 | Yaml.parseImports | train | protected function parseImports(array $content, $resource)
{
if (isset($content['imports'])) {
$chdir = dirname($resource);
foreach ($content['imports'] as $import) {
self::addFile($chdir . DIRECTORY_SEPARATOR . $import['resource'], $resource);
}
... | php | {
"resource": ""
} |
q8082 | RateAjaxController.ratingAction | train | public function ratingAction(Request $request)
{
$arrData = $request->request->get('data');
$fltValue = $request->request->get('rating');
if (!($arrData && $arrData['id'] && $arrData['pid'] && $arrData['item'])) {
$this->bail('Invalid request.');
}
$objMetaMode... | php | {
"resource": ""
} |
q8083 | KeywordsMetaElement.withAddedKeywords | train | public function withAddedKeywords(array $keywords = []) : self
{
$existing = array_map('trim', explode(',', $this->getAttribute('content') ?: ''));
$new = array_merge($existing, $keywords);
return $this->withAttribute('content', implode(', ', $new));
} | php | {
"resource": ""
} |
q8084 | DataMethods.GetValues | train | public function GetValues ($getNullValues = FALSE, $includeInheritProperties = TRUE, $publicOnly = TRUE) {
$data = [];
$modelClassName = get_class($this);
$classReflector = new \ReflectionClass($modelClassName);
$properties = $publicOnly ? $classReflector->getProperties(\ReflectionProperty::IS_PUBLIC) : $classR... | php | {
"resource": ""
} |
q8085 | PropsGettersSetters.& | train | public function & SetCode ($code, $codeMessage = NULL) {
/** @var $this \MvcCore\Response */
$this->code = $code;
if ($codeMessage !== NULL) $this->codeMessage = $codeMessage;
http_response_code($code);
return $this;
} | php | {
"resource": ""
} |
q8086 | PropsGettersSetters.GetCode | train | public function GetCode () {
if ($this->code === NULL) {
$phpCode = http_response_code();
$this->code = $phpCode === FALSE ? static::OK : $phpCode;
}
return $this->code;
} | php | {
"resource": ""
} |
q8087 | VendorDirectoryFixer.getLocation | train | public function getLocation($component_name, $path_within_component)
{
if ($this->complete_symfony_checkout) {
$component_location = $this->vendor_directory . 'symfony/symfony/src';
} else {
$component_location = $this->vendor_directory . 'symfony/' . $component_name;
... | php | {
"resource": ""
} |
q8088 | MelisEngineLangService.getAvailableLanguages | train | public function getAvailableLanguages()
{
// Event parameters prepare
$arrayParameters = $this->makeArrayFromParameters(__METHOD__, func_get_args());
// Sending service start event
$arrayParameters = $this->sendEvent('melisengine_service_get_available_languages_start', $arrayParamet... | php | {
"resource": ""
} |
q8089 | MelisEngineLangService.getSiteLanguage | train | public function getSiteLanguage()
{
// Event parameters prepare
$arrayParameters = $this->makeArrayFromParameters(__METHOD__, func_get_args());
// Sending service start event
$arrayParameters = $this->sendEvent('melisengine_service_get_site_lang_start', $arrayParameters);
/... | php | {
"resource": ""
} |
q8090 | Inspector.isEmpty | train | public static function isEmpty($value)
{
if (!isset($value)) {
return true;
} elseif (is_bool($value)) {
return false;
} elseif ($value === 0) {
return false;
} elseif (empty($value)) {
return true;
} elseif (is_object($value) &... | php | {
"resource": ""
} |
q8091 | Inspector.isTraversable | train | public static function isTraversable($value)
{
return is_array($value) || (is_object($value) && (get_class($value) == 'stdClass' || $value instanceof \Traversable));
} | php | {
"resource": ""
} |
q8092 | Closing.GetSessionMaxTime | train | public static function GetSessionMaxTime () {
static::$sessionMaxTime = static::$sessionStartTime;
if (static::$meta->expirations) {
foreach (static::$meta->expirations as /*$sessionNamespaceName => */$expiration) {
if ($expiration > static::$sessionMaxTime)
static::$sessionMaxTime = $expiration;
}
... | php | {
"resource": ""
} |
q8093 | AliasAssertTrait.assertArray | train | public static function assertArray($actual, string $message = '')
{
self::assertTypeOfScalar($actual, $message, 'assertArray', new ScalarConstraint(ScalarConstraint::TYPE_ARRAY));
} | php | {
"resource": ""
} |
q8094 | AliasAssertTrait.assertScalar | train | public static function assertScalar($actual, string $message = '')
{
self::assertTypeOfScalar($actual, $message, 'assertScalar', new ScalarConstraint(ScalarConstraint::TYPE_SCALAR));
} | php | {
"resource": ""
} |
q8095 | AliasAssertTrait.assertString | train | public static function assertString($actual, string $message = '')
{
self::assertTypeOfScalar($actual, $message, 'assertString', new ScalarConstraint(ScalarConstraint::TYPE_STRING));
} | php | {
"resource": ""
} |
q8096 | AliasAssertTrait.assertNotArray | train | public static function assertNotArray($actual, string $message = '')
{
self::assertTypeOfScalar($actual, $message, 'assertNotArray', new LogicalNot(new ScalarConstraint(ScalarConstraint::TYPE_ARRAY)));
} | php | {
"resource": ""
} |
q8097 | AliasAssertTrait.assertNotScalar | train | public static function assertNotScalar($actual, string $message = '')
{
self::assertTypeOfScalar($actual, $message, 'assertNotScalar', new LogicalNot(new ScalarConstraint(ScalarConstraint::TYPE_SCALAR)));
} | php | {
"resource": ""
} |
q8098 | AliasAssertTrait.assertNotString | train | public static function assertNotString($actual, string $message = '')
{
self::assertTypeOfScalar($actual, $message, 'assertNotString', new LogicalNot(new ScalarConstraint(ScalarConstraint::TYPE_STRING)));
} | php | {
"resource": ""
} |
q8099 | ViewHelpers.& | train | public function & SetHelper ($helperName, & $instance, $forAllTemplates = TRUE) {
/** @var $this \MvcCore\View */
$implementsIHelper = FALSE;
if ($forAllTemplates) {
if (self::$_toolClass === NULL)
self::$_toolClass = \MvcCore\Application::GetInstance()->GetToolClass();
$toolClass = self::$_toolClass;
... | php | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.