id int32 0 241k | repo stringlengths 6 63 | path stringlengths 5 140 | func_name stringlengths 3 151 | original_string stringlengths 84 13k | language stringclasses 1
value | code stringlengths 84 13k | code_tokens list | docstring stringlengths 3 47.2k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 91 247 |
|---|---|---|---|---|---|---|---|---|---|---|---|
223,100 | rpayonline/rpayonline-lite-php | lib/Util/Options.php | Options.parse | public static function parse($opts)
{
if ($opts instanceof self) {
return $opts;
}
if (is_null($opts)) {
return new Options(null, array());
}
if (is_array($opts)) {
$key = null;
if (array_key_exists('api_key', $opts)) {
... | php | public static function parse($opts)
{
if ($opts instanceof self) {
return $opts;
}
if (is_null($opts)) {
return new Options(null, array());
}
if (is_array($opts)) {
$key = null;
if (array_key_exists('api_key', $opts)) {
... | [
"public",
"static",
"function",
"parse",
"(",
"$",
"opts",
")",
"{",
"if",
"(",
"$",
"opts",
"instanceof",
"self",
")",
"{",
"return",
"$",
"opts",
";",
"}",
"if",
"(",
"is_null",
"(",
"$",
"opts",
")",
")",
"{",
"return",
"new",
"Options",
"(",
... | Load options from array.
@param array $opts Request header.
@return Options New instance having the given configuration.
@throws Error\InvalidOption | [
"Load",
"options",
"from",
"array",
"."
] | eed6fc6259668f98a08b31217b4bb5ba5bac09d8 | https://github.com/rpayonline/rpayonline-lite-php/blob/eed6fc6259668f98a08b31217b4bb5ba5bac09d8/lib/Util/Options.php#L59-L77 |
223,101 | emilio/php-router | src/Router/Router.php | Router.add | public function add($expr, $callback, $methods = null)
{
$this->all($expr, $callback, $methods);
} | php | public function add($expr, $callback, $methods = null)
{
$this->all($expr, $callback, $methods);
} | [
"public",
"function",
"add",
"(",
"$",
"expr",
",",
"$",
"callback",
",",
"$",
"methods",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"all",
"(",
"$",
"expr",
",",
"$",
"callback",
",",
"$",
"methods",
")",
";",
"}"
] | Alias for all
@param string $expr
@param callable $callback
@param null|array $methods | [
"Alias",
"for",
"all"
] | 55ae2f3a6417a2327715402edb7b404001c5a04f | https://github.com/emilio/php-router/blob/55ae2f3a6417a2327715402edb7b404001c5a04f/src/Router/Router.php#L53-L56 |
223,102 | emilio/php-router | src/Router/Router.php | Router.route | public function route()
{
foreach ($this->routes as $route) {
if ($route->matches($this->path)) {
return $route->exec();
}
}
throw new RouteNotFoundException("No routes matching {$this->path}");
} | php | public function route()
{
foreach ($this->routes as $route) {
if ($route->matches($this->path)) {
return $route->exec();
}
}
throw new RouteNotFoundException("No routes matching {$this->path}");
} | [
"public",
"function",
"route",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"routes",
"as",
"$",
"route",
")",
"{",
"if",
"(",
"$",
"route",
"->",
"matches",
"(",
"$",
"this",
"->",
"path",
")",
")",
"{",
"return",
"$",
"route",
"->",
"exec"... | Test all routes until any of them matches
@throws RouteNotFoundException if the route doesn't match with any of the registered routes | [
"Test",
"all",
"routes",
"until",
"any",
"of",
"them",
"matches"
] | 55ae2f3a6417a2327715402edb7b404001c5a04f | https://github.com/emilio/php-router/blob/55ae2f3a6417a2327715402edb7b404001c5a04f/src/Router/Router.php#L118-L127 |
223,103 | emilio/php-router | src/Router/Router.php | Router.url | public function url($path = null)
{
if ($path === null) {
$path = $this->path;
}
return $this->base_path . $path;
} | php | public function url($path = null)
{
if ($path === null) {
$path = $this->path;
}
return $this->base_path . $path;
} | [
"public",
"function",
"url",
"(",
"$",
"path",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"path",
"===",
"null",
")",
"{",
"$",
"path",
"=",
"$",
"this",
"->",
"path",
";",
"}",
"return",
"$",
"this",
"->",
"base_path",
".",
"$",
"path",
";",
"}"
] | Get the current url or the url to a path
@param string $path
@return string | [
"Get",
"the",
"current",
"url",
"or",
"the",
"url",
"to",
"a",
"path"
] | 55ae2f3a6417a2327715402edb7b404001c5a04f | https://github.com/emilio/php-router/blob/55ae2f3a6417a2327715402edb7b404001c5a04f/src/Router/Router.php#L135-L142 |
223,104 | emilio/php-router | src/Router/Router.php | Router.redirect | public function redirect($from_path, $to_path, $code = 302)
{
$this->all($from_path, function () use ($to_path, $code) {
http_response_code($code);
header("Location: {$to_path}");
});
} | php | public function redirect($from_path, $to_path, $code = 302)
{
$this->all($from_path, function () use ($to_path, $code) {
http_response_code($code);
header("Location: {$to_path}");
});
} | [
"public",
"function",
"redirect",
"(",
"$",
"from_path",
",",
"$",
"to_path",
",",
"$",
"code",
"=",
"302",
")",
"{",
"$",
"this",
"->",
"all",
"(",
"$",
"from_path",
",",
"function",
"(",
")",
"use",
"(",
"$",
"to_path",
",",
"$",
"code",
")",
"... | Redirect from one url to another
@param string $from_path
@param string $to_path
@param int $code | [
"Redirect",
"from",
"one",
"url",
"to",
"another"
] | 55ae2f3a6417a2327715402edb7b404001c5a04f | https://github.com/emilio/php-router/blob/55ae2f3a6417a2327715402edb7b404001c5a04f/src/Router/Router.php#L151-L157 |
223,105 | mwr/magedeploy2 | src/Robo/RoboTasks.php | RoboTasks.initEnvironment | protected function initEnvironment()
{
$path = getcwd();
if (!is_file("$path/.env")) {
return;
}
$dotenv = new \Dotenv\Dotenv($path);
if ($this->dotEnvOverload) {
$dotenv->overload();
} else {
$dotenv->load();
}
} | php | protected function initEnvironment()
{
$path = getcwd();
if (!is_file("$path/.env")) {
return;
}
$dotenv = new \Dotenv\Dotenv($path);
if ($this->dotEnvOverload) {
$dotenv->overload();
} else {
$dotenv->load();
}
} | [
"protected",
"function",
"initEnvironment",
"(",
")",
"{",
"$",
"path",
"=",
"getcwd",
"(",
")",
";",
"if",
"(",
"!",
"is_file",
"(",
"\"$path/.env\"",
")",
")",
"{",
"return",
";",
"}",
"$",
"dotenv",
"=",
"new",
"\\",
"Dotenv",
"\\",
"Dotenv",
"(",... | Initialize Environment variables by .env file
Overload can be activated by setting $this->dotEnvOverload = true; in your RoboFile | [
"Initialize",
"Environment",
"variables",
"by",
".",
"env",
"file"
] | 8252f61ee4810f5aa2448090a51cb2d3916d6421 | https://github.com/mwr/magedeploy2/blob/8252f61ee4810f5aa2448090a51cb2d3916d6421/src/Robo/RoboTasks.php#L70-L82 |
223,106 | mwr/magedeploy2 | src/Robo/RoboTasks.php | RoboTasks.taskMagentoCleanVarDirs | protected function taskMagentoCleanVarDirs()
{
$magentoDir = $this->config(Config::KEY_DEPLOY . '/' . Config::KEY_APP_DIR);
$varDirs = $this->config(Config::KEY_DEPLOY . '/' . Config::KEY_CLEAN_DIRS);
$dirs = [];
foreach ($varDirs as $dir) {
$dirPath = $dir;
... | php | protected function taskMagentoCleanVarDirs()
{
$magentoDir = $this->config(Config::KEY_DEPLOY . '/' . Config::KEY_APP_DIR);
$varDirs = $this->config(Config::KEY_DEPLOY . '/' . Config::KEY_CLEAN_DIRS);
$dirs = [];
foreach ($varDirs as $dir) {
$dirPath = $dir;
... | [
"protected",
"function",
"taskMagentoCleanVarDirs",
"(",
")",
"{",
"$",
"magentoDir",
"=",
"$",
"this",
"->",
"config",
"(",
"Config",
"::",
"KEY_DEPLOY",
".",
"'/'",
".",
"Config",
"::",
"KEY_APP_DIR",
")",
";",
"$",
"varDirs",
"=",
"$",
"this",
"->",
"... | Build Task to clean all var dirs
@return \Robo\Task\Filesystem\CleanDir | [
"Build",
"Task",
"to",
"clean",
"all",
"var",
"dirs"
] | 8252f61ee4810f5aa2448090a51cb2d3916d6421 | https://github.com/mwr/magedeploy2/blob/8252f61ee4810f5aa2448090a51cb2d3916d6421/src/Robo/RoboTasks.php#L158-L177 |
223,107 | mwr/magedeploy2 | src/Robo/RoboTasks.php | RoboTasks.taskMysqlCreateDatabase | protected function taskMysqlCreateDatabase($dropDatabase = false)
{
$dbName = $this->config(CONFIG::KEY_BUILD . '/' . Config::KEY_DB . '/db-name');
$sqlDropDb = "DROP DATABASE `{$dbName}`";
$sqlCreateDb = "CREATE DATABASE IF NOT EXISTS `{$dbName}`";
/** @var RoboFile|CollectionBu... | php | protected function taskMysqlCreateDatabase($dropDatabase = false)
{
$dbName = $this->config(CONFIG::KEY_BUILD . '/' . Config::KEY_DB . '/db-name');
$sqlDropDb = "DROP DATABASE `{$dbName}`";
$sqlCreateDb = "CREATE DATABASE IF NOT EXISTS `{$dbName}`";
/** @var RoboFile|CollectionBu... | [
"protected",
"function",
"taskMysqlCreateDatabase",
"(",
"$",
"dropDatabase",
"=",
"false",
")",
"{",
"$",
"dbName",
"=",
"$",
"this",
"->",
"config",
"(",
"CONFIG",
"::",
"KEY_BUILD",
".",
"'/'",
".",
"Config",
"::",
"KEY_DB",
".",
"'/db-name'",
")",
";",... | Build Task to create database
@param bool $dropDatabase
@return \Robo\Collection\CollectionBuilder | [
"Build",
"Task",
"to",
"create",
"database"
] | 8252f61ee4810f5aa2448090a51cb2d3916d6421 | https://github.com/mwr/magedeploy2/blob/8252f61ee4810f5aa2448090a51cb2d3916d6421/src/Robo/RoboTasks.php#L214-L249 |
223,108 | mwr/magedeploy2 | src/Robo/RoboTasks.php | RoboTasks.taskMagentoSetProductionMode | protected function taskMagentoSetProductionMode()
{
$magentoDir = $this->config(Config::KEY_DEPLOY . '/' . Config::KEY_APP_DIR);
$task = $this->taskMagentoDeploySetModeTask();
$task->modeProduction();
$task->skipCompilation();
$task->dir($magentoDir);
return $task;
... | php | protected function taskMagentoSetProductionMode()
{
$magentoDir = $this->config(Config::KEY_DEPLOY . '/' . Config::KEY_APP_DIR);
$task = $this->taskMagentoDeploySetModeTask();
$task->modeProduction();
$task->skipCompilation();
$task->dir($magentoDir);
return $task;
... | [
"protected",
"function",
"taskMagentoSetProductionMode",
"(",
")",
"{",
"$",
"magentoDir",
"=",
"$",
"this",
"->",
"config",
"(",
"Config",
"::",
"KEY_DEPLOY",
".",
"'/'",
".",
"Config",
"::",
"KEY_APP_DIR",
")",
";",
"$",
"task",
"=",
"$",
"this",
"->",
... | Build Task to set magento to production mode
@return \Mwltr\Robo\Magento2\Task\DeploySetModeTask | [
"Build",
"Task",
"to",
"set",
"magento",
"to",
"production",
"mode"
] | 8252f61ee4810f5aa2448090a51cb2d3916d6421 | https://github.com/mwr/magedeploy2/blob/8252f61ee4810f5aa2448090a51cb2d3916d6421/src/Robo/RoboTasks.php#L297-L307 |
223,109 | mwr/magedeploy2 | src/Robo/RoboTasks.php | RoboTasks.taskMagentoSetupDiCompile | protected function taskMagentoSetupDiCompile()
{
$magentoDir = $this->config(Config::KEY_DEPLOY . '/' . Config::KEY_APP_DIR);
$task = $this->taskMagentoSetupDiCompileTask();
$task->dir($magentoDir);
return $task;
} | php | protected function taskMagentoSetupDiCompile()
{
$magentoDir = $this->config(Config::KEY_DEPLOY . '/' . Config::KEY_APP_DIR);
$task = $this->taskMagentoSetupDiCompileTask();
$task->dir($magentoDir);
return $task;
} | [
"protected",
"function",
"taskMagentoSetupDiCompile",
"(",
")",
"{",
"$",
"magentoDir",
"=",
"$",
"this",
"->",
"config",
"(",
"Config",
"::",
"KEY_DEPLOY",
".",
"'/'",
".",
"Config",
"::",
"KEY_APP_DIR",
")",
";",
"$",
"task",
"=",
"$",
"this",
"->",
"t... | Build Task to run magento setup di compile
@return \Mwltr\Robo\Magento2\Task\SetupDiCompileTask | [
"Build",
"Task",
"to",
"run",
"magento",
"setup",
"di",
"compile"
] | 8252f61ee4810f5aa2448090a51cb2d3916d6421 | https://github.com/mwr/magedeploy2/blob/8252f61ee4810f5aa2448090a51cb2d3916d6421/src/Robo/RoboTasks.php#L314-L322 |
223,110 | mwr/magedeploy2 | src/Robo/RoboTasks.php | RoboTasks.taskMagentoSetupStaticContentDeploy | protected function taskMagentoSetupStaticContentDeploy()
{
/** @var array $themes */
$themes = $this->config(Config::KEY_DEPLOY . '/' . Config::KEY_THEMES);
$magentoDir = $this->config(Config::KEY_DEPLOY . '/' . Config::KEY_APP_DIR);
/** @var RoboFile|CollectionBuilder $collecti... | php | protected function taskMagentoSetupStaticContentDeploy()
{
/** @var array $themes */
$themes = $this->config(Config::KEY_DEPLOY . '/' . Config::KEY_THEMES);
$magentoDir = $this->config(Config::KEY_DEPLOY . '/' . Config::KEY_APP_DIR);
/** @var RoboFile|CollectionBuilder $collecti... | [
"protected",
"function",
"taskMagentoSetupStaticContentDeploy",
"(",
")",
"{",
"/** @var array $themes */",
"$",
"themes",
"=",
"$",
"this",
"->",
"config",
"(",
"Config",
"::",
"KEY_DEPLOY",
".",
"'/'",
".",
"Config",
"::",
"KEY_THEMES",
")",
";",
"$",
"magento... | Build Task to run magento setup static content deploy
@return \Robo\Collection\CollectionBuilder
@throws \RuntimeException | [
"Build",
"Task",
"to",
"run",
"magento",
"setup",
"static",
"content",
"deploy"
] | 8252f61ee4810f5aa2448090a51cb2d3916d6421 | https://github.com/mwr/magedeploy2/blob/8252f61ee4810f5aa2448090a51cb2d3916d6421/src/Robo/RoboTasks.php#L355-L376 |
223,111 | mwr/magedeploy2 | src/Robo/RoboTasks.php | RoboTasks.taskArtifactCreatePackages | protected function taskArtifactCreatePackages()
{
$rootDir = getcwd();
$tarBin = $this->config(Config::KEY_ENV . '/' . Config::KEY_TAR_BIN);
$gitDir = $this->config(Config::KEY_DEPLOY . '/' . Config::KEY_GIT_DIR);
$artifactsDir = $this->config(Config::KEY_DEPLOY . '/... | php | protected function taskArtifactCreatePackages()
{
$rootDir = getcwd();
$tarBin = $this->config(Config::KEY_ENV . '/' . Config::KEY_TAR_BIN);
$gitDir = $this->config(Config::KEY_DEPLOY . '/' . Config::KEY_GIT_DIR);
$artifactsDir = $this->config(Config::KEY_DEPLOY . '/... | [
"protected",
"function",
"taskArtifactCreatePackages",
"(",
")",
"{",
"$",
"rootDir",
"=",
"getcwd",
"(",
")",
";",
"$",
"tarBin",
"=",
"$",
"this",
"->",
"config",
"(",
"Config",
"::",
"KEY_ENV",
".",
"'/'",
".",
"Config",
"::",
"KEY_TAR_BIN",
")",
";",... | Build Task for artifact creation
@return \Robo\Collection\CollectionBuilder | [
"Build",
"Task",
"for",
"artifact",
"creation"
] | 8252f61ee4810f5aa2448090a51cb2d3916d6421 | https://github.com/mwr/magedeploy2/blob/8252f61ee4810f5aa2448090a51cb2d3916d6421/src/Robo/RoboTasks.php#L383-L427 |
223,112 | mwr/magedeploy2 | src/Robo/RoboTasks.php | RoboTasks.taskDeployerDeploy | protected function taskDeployerDeploy($stage, $branch)
{
$deployerBin = $this->config(Config::KEY_ENV . '/' . Config::KEY_DEPLOYER_BIN);
$task = $this->taskDeployerDeployTask($deployerBin);
if ($this->isTag($branch)) {
$task->tag($branch);
} else {
$task->br... | php | protected function taskDeployerDeploy($stage, $branch)
{
$deployerBin = $this->config(Config::KEY_ENV . '/' . Config::KEY_DEPLOYER_BIN);
$task = $this->taskDeployerDeployTask($deployerBin);
if ($this->isTag($branch)) {
$task->tag($branch);
} else {
$task->br... | [
"protected",
"function",
"taskDeployerDeploy",
"(",
"$",
"stage",
",",
"$",
"branch",
")",
"{",
"$",
"deployerBin",
"=",
"$",
"this",
"->",
"config",
"(",
"Config",
"::",
"KEY_ENV",
".",
"'/'",
".",
"Config",
"::",
"KEY_DEPLOYER_BIN",
")",
";",
"$",
"tas... | Build Task for deployer deploy
@param string $stage
@param string $branch
@return \Mwltr\Robo\Deployer\Task\DeployTask | [
"Build",
"Task",
"for",
"deployer",
"deploy"
] | 8252f61ee4810f5aa2448090a51cb2d3916d6421 | https://github.com/mwr/magedeploy2/blob/8252f61ee4810f5aa2448090a51cb2d3916d6421/src/Robo/RoboTasks.php#L437-L464 |
223,113 | mwr/magedeploy2 | src/Robo/RoboTasks.php | RoboTasks.taskMysqlCommand | protected function taskMysqlCommand()
{
$mysqlBin = $this->config(Config::KEY_ENV . '/' . Config::KEY_MYSQL_BIN);
$dbHost = $this->config(CONFIG::KEY_BUILD . '/' . Config::KEY_DB . '/db-host');
$dbUser = $this->config(CONFIG::KEY_BUILD . '/' . Config::KEY_DB . '/db-user');
$dbPas... | php | protected function taskMysqlCommand()
{
$mysqlBin = $this->config(Config::KEY_ENV . '/' . Config::KEY_MYSQL_BIN);
$dbHost = $this->config(CONFIG::KEY_BUILD . '/' . Config::KEY_DB . '/db-host');
$dbUser = $this->config(CONFIG::KEY_BUILD . '/' . Config::KEY_DB . '/db-user');
$dbPas... | [
"protected",
"function",
"taskMysqlCommand",
"(",
")",
"{",
"$",
"mysqlBin",
"=",
"$",
"this",
"->",
"config",
"(",
"Config",
"::",
"KEY_ENV",
".",
"'/'",
".",
"Config",
"::",
"KEY_MYSQL_BIN",
")",
";",
"$",
"dbHost",
"=",
"$",
"this",
"->",
"config",
... | Create a mysql Command
@return \Robo\Task\Base\Exec | [
"Create",
"a",
"mysql",
"Command"
] | 8252f61ee4810f5aa2448090a51cb2d3916d6421 | https://github.com/mwr/magedeploy2/blob/8252f61ee4810f5aa2448090a51cb2d3916d6421/src/Robo/RoboTasks.php#L471-L498 |
223,114 | mwr/magedeploy2 | src/Robo/RoboTasks.php | RoboTasks.createTask | protected function createTask()
{
$task = \call_user_func_array(['parent', 'task'], \func_get_args());
$task->setInput($this->input());
$task->setOutput($this->output());
return $task;
} | php | protected function createTask()
{
$task = \call_user_func_array(['parent', 'task'], \func_get_args());
$task->setInput($this->input());
$task->setOutput($this->output());
return $task;
} | [
"protected",
"function",
"createTask",
"(",
")",
"{",
"$",
"task",
"=",
"\\",
"call_user_func_array",
"(",
"[",
"'parent'",
",",
"'task'",
"]",
",",
"\\",
"func_get_args",
"(",
")",
")",
";",
"$",
"task",
"->",
"setInput",
"(",
"$",
"this",
"->",
"inpu... | Create a Task and transfer input and output instances
This is needed if you have task that needs the current input / output
@return \Robo\Contract\TaskInterface | [
"Create",
"a",
"Task",
"and",
"transfer",
"input",
"and",
"output",
"instances"
] | 8252f61ee4810f5aa2448090a51cb2d3916d6421 | https://github.com/mwr/magedeploy2/blob/8252f61ee4810f5aa2448090a51cb2d3916d6421/src/Robo/RoboTasks.php#L541-L548 |
223,115 | StyleCI/SDK | src/Client.php | Client.get | protected function get(string $uri, array $query = [])
{
$response = $this->client->request('GET', $uri, $query ? ['query' => $query] : []);
return json_decode((string) $response->getBody(), true);
} | php | protected function get(string $uri, array $query = [])
{
$response = $this->client->request('GET', $uri, $query ? ['query' => $query] : []);
return json_decode((string) $response->getBody(), true);
} | [
"protected",
"function",
"get",
"(",
"string",
"$",
"uri",
",",
"array",
"$",
"query",
"=",
"[",
"]",
")",
"{",
"$",
"response",
"=",
"$",
"this",
"->",
"client",
"->",
"request",
"(",
"'GET'",
",",
"$",
"uri",
",",
"$",
"query",
"?",
"[",
"'quer... | Send a get request, and parse the result as json.
@param string $uri
@param array $query
@return array | [
"Send",
"a",
"get",
"request",
"and",
"parse",
"the",
"result",
"as",
"json",
"."
] | efa64d0aef64522cb8f504a94c828ba68f8edd55 | https://github.com/StyleCI/SDK/blob/efa64d0aef64522cb8f504a94c828ba68f8edd55/src/Client.php#L114-L119 |
223,116 | mwr/magedeploy2 | src/Config/ConfigWriter.php | ConfigWriter.write | public function write(Config $config)
{
$pathBuildDb = Config::KEY_BUILD . '/' . Config::KEY_DB . '/';
/** @var array $artifacts */
$artifacts = $config->get(Config::KEY_DEPLOY . '/' . Config::KEY_ARTIFACTS);
$artifactsExport = '';
foreach ($artifacts as $artifactName => $ar... | php | public function write(Config $config)
{
$pathBuildDb = Config::KEY_BUILD . '/' . Config::KEY_DB . '/';
/** @var array $artifacts */
$artifacts = $config->get(Config::KEY_DEPLOY . '/' . Config::KEY_ARTIFACTS);
$artifactsExport = '';
foreach ($artifacts as $artifactName => $ar... | [
"public",
"function",
"write",
"(",
"Config",
"$",
"config",
")",
"{",
"$",
"pathBuildDb",
"=",
"Config",
"::",
"KEY_BUILD",
".",
"'/'",
".",
"Config",
"::",
"KEY_DB",
".",
"'/'",
";",
"/** @var array $artifacts */",
"$",
"artifacts",
"=",
"$",
"config",
"... | Write Config to file from Config object
@return void | [
"Write",
"Config",
"to",
"file",
"from",
"Config",
"object"
] | 8252f61ee4810f5aa2448090a51cb2d3916d6421 | https://github.com/mwr/magedeploy2/blob/8252f61ee4810f5aa2448090a51cb2d3916d6421/src/Config/ConfigWriter.php#L20-L64 |
223,117 | symlex/doctrine-active-record | src/Model/Model.php | Model.getModelName | public function getModelName(): string
{
$className = get_class($this);
$postfix = $this->getFactory()->getFactoryPostfix();
$namespace = $this->getFactory()->getFactoryNamespace();
if ($postfix != '') {
$result = substr($className, strlen($namespace), strlen($postfix) ... | php | public function getModelName(): string
{
$className = get_class($this);
$postfix = $this->getFactory()->getFactoryPostfix();
$namespace = $this->getFactory()->getFactoryNamespace();
if ($postfix != '') {
$result = substr($className, strlen($namespace), strlen($postfix) ... | [
"public",
"function",
"getModelName",
"(",
")",
":",
"string",
"{",
"$",
"className",
"=",
"get_class",
"(",
"$",
"this",
")",
";",
"$",
"postfix",
"=",
"$",
"this",
"->",
"getFactory",
"(",
")",
"->",
"getFactoryPostfix",
"(",
")",
";",
"$",
"namespac... | Returns the model name without prefix and postfix
@return string | [
"Returns",
"the",
"model",
"name",
"without",
"prefix",
"and",
"postfix"
] | 918dbdf73a0acf32a0d70a3d5c39e290ac3e3b8d | https://github.com/symlex/doctrine-active-record/blob/918dbdf73a0acf32a0d70a3d5c39e290ac3e3b8d/src/Model/Model.php#L194-L208 |
223,118 | DevGroup-ru/yii2-tag-dependency-helper | src/CacheableActiveRecord.php | CacheableActiveRecord.events | public function events()
{
return [
ActiveRecord::EVENT_AFTER_DELETE => [$this->owner, 'invalidateTags'],
ActiveRecord::EVENT_AFTER_INSERT => [$this->owner, 'invalidateTags'],
ActiveRecord::EVENT_AFTER_UPDATE => [$this->owner, 'invalidateTags'],
];
} | php | public function events()
{
return [
ActiveRecord::EVENT_AFTER_DELETE => [$this->owner, 'invalidateTags'],
ActiveRecord::EVENT_AFTER_INSERT => [$this->owner, 'invalidateTags'],
ActiveRecord::EVENT_AFTER_UPDATE => [$this->owner, 'invalidateTags'],
];
} | [
"public",
"function",
"events",
"(",
")",
"{",
"return",
"[",
"ActiveRecord",
"::",
"EVENT_AFTER_DELETE",
"=>",
"[",
"$",
"this",
"->",
"owner",
",",
"'invalidateTags'",
"]",
",",
"ActiveRecord",
"::",
"EVENT_AFTER_INSERT",
"=>",
"[",
"$",
"this",
"->",
"own... | Get events list.
@return array | [
"Get",
"events",
"list",
"."
] | 23e7d26df35fc9605aa674f03cd701f46909214a | https://github.com/DevGroup-ru/yii2-tag-dependency-helper/blob/23e7d26df35fc9605aa674f03cd701f46909214a/src/CacheableActiveRecord.php#L23-L30 |
223,119 | tabacitu/menumanager | src/Models/MenuItem.php | MenuItem.getTree | public static function getTree()
{
$menu = MenuItem::orderBy('lft')->get();
if ($menu->count())
{
foreach ($menu as $k => $menu_item) {
$menu_item->children = collect([]);
foreach ($menu as $i => $menu_subitem) {
if ($menu_sub... | php | public static function getTree()
{
$menu = MenuItem::orderBy('lft')->get();
if ($menu->count())
{
foreach ($menu as $k => $menu_item) {
$menu_item->children = collect([]);
foreach ($menu as $i => $menu_subitem) {
if ($menu_sub... | [
"public",
"static",
"function",
"getTree",
"(",
")",
"{",
"$",
"menu",
"=",
"MenuItem",
"::",
"orderBy",
"(",
"'lft'",
")",
"->",
"get",
"(",
")",
";",
"if",
"(",
"$",
"menu",
"->",
"count",
"(",
")",
")",
"{",
"foreach",
"(",
"$",
"menu",
"as",
... | Get all menu items, in a hierarchical collection.
Only supports 2 levels of indentation. | [
"Get",
"all",
"menu",
"items",
"in",
"a",
"hierarchical",
"collection",
".",
"Only",
"supports",
"2",
"levels",
"of",
"indentation",
"."
] | 3152c7f7263f226c4225cf661978569ccbb7fa89 | https://github.com/tabacitu/menumanager/blob/3152c7f7263f226c4225cf661978569ccbb7fa89/src/Models/MenuItem.php#L32-L55 |
223,120 | shopsys/doctrine-orm | lib/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php | AbstractExporter.export | public function export()
{
if ( ! is_dir($this->_outputDir)) {
mkdir($this->_outputDir, 0775, true);
}
foreach ($this->_metadata as $metadata) {
// In case output is returned, write it to a file, skip otherwise
if($output = $this->exportClassMetadata($met... | php | public function export()
{
if ( ! is_dir($this->_outputDir)) {
mkdir($this->_outputDir, 0775, true);
}
foreach ($this->_metadata as $metadata) {
// In case output is returned, write it to a file, skip otherwise
if($output = $this->exportClassMetadata($met... | [
"public",
"function",
"export",
"(",
")",
"{",
"if",
"(",
"!",
"is_dir",
"(",
"$",
"this",
"->",
"_outputDir",
")",
")",
"{",
"mkdir",
"(",
"$",
"this",
"->",
"_outputDir",
",",
"0775",
",",
"true",
")",
";",
"}",
"foreach",
"(",
"$",
"this",
"->... | Exports each ClassMetadata instance to a single Doctrine Mapping file
named after the entity.
@return void
@throws \Doctrine\ORM\Tools\Export\ExportException | [
"Exports",
"each",
"ClassMetadata",
"instance",
"to",
"a",
"single",
"Doctrine",
"Mapping",
"file",
"named",
"after",
"the",
"entity",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php#L130-L151 |
223,121 | shopsys/doctrine-orm | lib/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php | AbstractExporter._generateOutputPath | protected function _generateOutputPath(ClassMetadataInfo $metadata)
{
return $this->_outputDir . '/' . str_replace('\\', '.', $metadata->name) . $this->_extension;
} | php | protected function _generateOutputPath(ClassMetadataInfo $metadata)
{
return $this->_outputDir . '/' . str_replace('\\', '.', $metadata->name) . $this->_extension;
} | [
"protected",
"function",
"_generateOutputPath",
"(",
"ClassMetadataInfo",
"$",
"metadata",
")",
"{",
"return",
"$",
"this",
"->",
"_outputDir",
".",
"'/'",
".",
"str_replace",
"(",
"'\\\\'",
",",
"'.'",
",",
"$",
"metadata",
"->",
"name",
")",
".",
"$",
"t... | Generates the path to write the class for the given ClassMetadataInfo instance.
@param ClassMetadataInfo $metadata
@return string | [
"Generates",
"the",
"path",
"to",
"write",
"the",
"class",
"for",
"the",
"given",
"ClassMetadataInfo",
"instance",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php#L160-L163 |
223,122 | mespronos/mespronos | src/Controller/BetController.php | BetController.updateBetsFromGame | public static function updateBetsFromGame(Game $game) {
$bets = $game->getBets();
$points = $game->getLeague()->getPoints();
foreach ($bets as $bet) {
self::updateBetFromGame($bet, $game, $points);
}
} | php | public static function updateBetsFromGame(Game $game) {
$bets = $game->getBets();
$points = $game->getLeague()->getPoints();
foreach ($bets as $bet) {
self::updateBetFromGame($bet, $game, $points);
}
} | [
"public",
"static",
"function",
"updateBetsFromGame",
"(",
"Game",
"$",
"game",
")",
"{",
"$",
"bets",
"=",
"$",
"game",
"->",
"getBets",
"(",
")",
";",
"$",
"points",
"=",
"$",
"game",
"->",
"getLeague",
"(",
")",
"->",
"getPoints",
"(",
")",
";",
... | Define bets scores for a given game
@param \Drupal\mespronos\Entity\Game $game
@return boolean | [
"Define",
"bets",
"scores",
"for",
"a",
"given",
"game"
] | 73757663581ed9040944768073d1d9abc761196b | https://github.com/mespronos/mespronos/blob/73757663581ed9040944768073d1d9abc761196b/src/Controller/BetController.php#L33-L39 |
223,123 | mespronos/mespronos | src/Controller/BetController.php | BetController.betsLeft | public static function betsLeft(\Drupal\user\Entity\User $user, Day $day) {
$now_date = new \DateTime();
$now_date->setTimezone(new \DateTimeZone('GMT'));
$injected_database = Database::getConnection();
$subquery = $injected_database->select('mespronos__bet', 'b');
$subquery->leftJoin('mespronos__... | php | public static function betsLeft(\Drupal\user\Entity\User $user, Day $day) {
$now_date = new \DateTime();
$now_date->setTimezone(new \DateTimeZone('GMT'));
$injected_database = Database::getConnection();
$subquery = $injected_database->select('mespronos__bet', 'b');
$subquery->leftJoin('mespronos__... | [
"public",
"static",
"function",
"betsLeft",
"(",
"\\",
"Drupal",
"\\",
"user",
"\\",
"Entity",
"\\",
"User",
"$",
"user",
",",
"Day",
"$",
"day",
")",
"{",
"$",
"now_date",
"=",
"new",
"\\",
"DateTime",
"(",
")",
";",
"$",
"now_date",
"->",
"setTimez... | Determine number of games left to bet for a given user on a given day
@param \Drupal\user\Entity\User $user
@param \Drupal\mespronos\Entity\Day $day
@return integer number of game left to bet | [
"Determine",
"number",
"of",
"games",
"left",
"to",
"bet",
"for",
"a",
"given",
"user",
"on",
"a",
"given",
"day"
] | 73757663581ed9040944768073d1d9abc761196b | https://github.com/mespronos/mespronos/blob/73757663581ed9040944768073d1d9abc761196b/src/Controller/BetController.php#L149-L169 |
223,124 | shopsys/doctrine-orm | lib/Doctrine/ORM/Tools/SchemaValidator.php | SchemaValidator.validateMapping | public function validateMapping()
{
$errors = array();
$cmf = $this->em->getMetadataFactory();
$classes = $cmf->getAllMetadata();
foreach ($classes as $class) {
if ($ce = $this->validateClass($class)) {
$errors[$class->name] = $ce;
}
}... | php | public function validateMapping()
{
$errors = array();
$cmf = $this->em->getMetadataFactory();
$classes = $cmf->getAllMetadata();
foreach ($classes as $class) {
if ($ce = $this->validateClass($class)) {
$errors[$class->name] = $ce;
}
}... | [
"public",
"function",
"validateMapping",
"(",
")",
"{",
"$",
"errors",
"=",
"array",
"(",
")",
";",
"$",
"cmf",
"=",
"$",
"this",
"->",
"em",
"->",
"getMetadataFactory",
"(",
")",
";",
"$",
"classes",
"=",
"$",
"cmf",
"->",
"getAllMetadata",
"(",
")"... | Checks the internal consistency of all mapping files.
There are several checks that can't be done at runtime or are too expensive, which can be verified
with this command. For example:
1. Check if a relation with "mappedBy" is actually connected to that specified field.
2. Check if "mappedBy" and "inversedBy" are con... | [
"Checks",
"the",
"internal",
"consistency",
"of",
"all",
"mapping",
"files",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Tools/SchemaValidator.php#L64-L77 |
223,125 | shopsys/doctrine-orm | lib/Doctrine/ORM/Tools/SchemaValidator.php | SchemaValidator.schemaInSyncWithMetadata | public function schemaInSyncWithMetadata()
{
$schemaTool = new SchemaTool($this->em);
$allMetadata = $this->em->getMetadataFactory()->getAllMetadata();
return count($schemaTool->getUpdateSchemaSql($allMetadata, true)) == 0;
} | php | public function schemaInSyncWithMetadata()
{
$schemaTool = new SchemaTool($this->em);
$allMetadata = $this->em->getMetadataFactory()->getAllMetadata();
return count($schemaTool->getUpdateSchemaSql($allMetadata, true)) == 0;
} | [
"public",
"function",
"schemaInSyncWithMetadata",
"(",
")",
"{",
"$",
"schemaTool",
"=",
"new",
"SchemaTool",
"(",
"$",
"this",
"->",
"em",
")",
";",
"$",
"allMetadata",
"=",
"$",
"this",
"->",
"em",
"->",
"getMetadataFactory",
"(",
")",
"->",
"getAllMetad... | Checks if the Database Schema is in sync with the current metadata state.
@return bool | [
"Checks",
"if",
"the",
"Database",
"Schema",
"is",
"in",
"sync",
"with",
"the",
"current",
"metadata",
"state",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Tools/SchemaValidator.php#L264-L271 |
223,126 | imanee/imanee | src/ImageResource/GDResource.php | GDResource.getExtensionByFileName | public function getExtensionByFileName($filepath)
{
$path = pathinfo($filepath);
// check if the file has the extenison and we need
// to lower down the extension (caused unknown extension for uppercased extension)
if (isset($path['extension'])) {
return strtolower($path... | php | public function getExtensionByFileName($filepath)
{
$path = pathinfo($filepath);
// check if the file has the extenison and we need
// to lower down the extension (caused unknown extension for uppercased extension)
if (isset($path['extension'])) {
return strtolower($path... | [
"public",
"function",
"getExtensionByFileName",
"(",
"$",
"filepath",
")",
"{",
"$",
"path",
"=",
"pathinfo",
"(",
"$",
"filepath",
")",
";",
"// check if the file has the extenison and we need",
"// to lower down the extension (caused unknown extension for uppercased extension)"... | A workaround to keep compatibility with Imagick when writing images to disk.
@param string $filepath
@return string | [
"A",
"workaround",
"to",
"keep",
"compatibility",
"with",
"Imagick",
"when",
"writing",
"images",
"to",
"disk",
"."
] | cf390b5e7f92ca21d6e388abe51433e9ed671b1b | https://github.com/imanee/imanee/blob/cf390b5e7f92ca21d6e388abe51433e9ed671b1b/src/ImageResource/GDResource.php#L362-L378 |
223,127 | imanee/imanee | src/ImageResource/GDResource.php | GDResource.createBlank | private function createBlank($width, $height)
{
$blank = imagecreatetruecolor($width, $height);
/**
* This is not ideal when converting png to jpeg as instead of a default
* black background we end up with a white one.
* This is alleviated by additional use of imagecopyre... | php | private function createBlank($width, $height)
{
$blank = imagecreatetruecolor($width, $height);
/**
* This is not ideal when converting png to jpeg as instead of a default
* black background we end up with a white one.
* This is alleviated by additional use of imagecopyre... | [
"private",
"function",
"createBlank",
"(",
"$",
"width",
",",
"$",
"height",
")",
"{",
"$",
"blank",
"=",
"imagecreatetruecolor",
"(",
"$",
"width",
",",
"$",
"height",
")",
";",
"/**\n * This is not ideal when converting png to jpeg as instead of a default\n ... | Helper method which returns a blank GD resource.
Retains alpha for PNGs
@param int $width width required
@param int $height height required
@return resource (GD) | [
"Helper",
"method",
"which",
"returns",
"a",
"blank",
"GD",
"resource",
".",
"Retains",
"alpha",
"for",
"PNGs"
] | cf390b5e7f92ca21d6e388abe51433e9ed671b1b | https://github.com/imanee/imanee/blob/cf390b5e7f92ca21d6e388abe51433e9ed671b1b/src/ImageResource/GDResource.php#L490-L506 |
223,128 | imanee/imanee | src/ImageResource/GDResource.php | GDResource.fixTransparency | private function fixTransparency($transparency)
{
$transparency = 100 - $transparency;
$transparency /= 100;
$image = $this->getResource();
// Get image width and height
$width = $this->getWidth();
$height = $this->getHeight();
// Turn alpha blending off
... | php | private function fixTransparency($transparency)
{
$transparency = 100 - $transparency;
$transparency /= 100;
$image = $this->getResource();
// Get image width and height
$width = $this->getWidth();
$height = $this->getHeight();
// Turn alpha blending off
... | [
"private",
"function",
"fixTransparency",
"(",
"$",
"transparency",
")",
"{",
"$",
"transparency",
"=",
"100",
"-",
"$",
"transparency",
";",
"$",
"transparency",
"/=",
"100",
";",
"$",
"image",
"=",
"$",
"this",
"->",
"getResource",
"(",
")",
";",
"// G... | Helper method in order to preserve transparency
@param int $transparency Transparency in percentage - 0 (opaque) to 100 (transparent).
@return bool true on success or false on failure. | [
"Helper",
"method",
"in",
"order",
"to",
"preserve",
"transparency"
] | cf390b5e7f92ca21d6e388abe51433e9ed671b1b | https://github.com/imanee/imanee/blob/cf390b5e7f92ca21d6e388abe51433e9ed671b1b/src/ImageResource/GDResource.php#L546-L586 |
223,129 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php | XmlDriver.columnToArray | private function columnToArray(SimpleXMLElement $fieldMapping)
{
$mapping = array(
'fieldName' => (string) $fieldMapping['name'],
);
if (isset($fieldMapping['type'])) {
$mapping['type'] = (string) $fieldMapping['type'];
}
if (isset($fieldMapping['col... | php | private function columnToArray(SimpleXMLElement $fieldMapping)
{
$mapping = array(
'fieldName' => (string) $fieldMapping['name'],
);
if (isset($fieldMapping['type'])) {
$mapping['type'] = (string) $fieldMapping['type'];
}
if (isset($fieldMapping['col... | [
"private",
"function",
"columnToArray",
"(",
"SimpleXMLElement",
"$",
"fieldMapping",
")",
"{",
"$",
"mapping",
"=",
"array",
"(",
"'fieldName'",
"=>",
"(",
"string",
")",
"$",
"fieldMapping",
"[",
"'name'",
"]",
",",
")",
";",
"if",
"(",
"isset",
"(",
"... | Parses the given field as array.
@param SimpleXMLElement $fieldMapping
@return array | [
"Parses",
"the",
"given",
"field",
"as",
"array",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php#L712-L759 |
223,130 | kenhyuwa/blade-minify | src/Middleware/Minify.php | Minify.shouldReplaceSpecial | private function shouldReplaceSpecial($buffer)
{
return strpos($buffer, '<pre') !== false
|| strpos($buffer, '<pre') !== false
|| strpos($buffer, '//') !== false;
} | php | private function shouldReplaceSpecial($buffer)
{
return strpos($buffer, '<pre') !== false
|| strpos($buffer, '<pre') !== false
|| strpos($buffer, '//') !== false;
} | [
"private",
"function",
"shouldReplaceSpecial",
"(",
"$",
"buffer",
")",
"{",
"return",
"strpos",
"(",
"$",
"buffer",
",",
"'<pre'",
")",
"!==",
"false",
"||",
"strpos",
"(",
"$",
"buffer",
",",
"'<pre'",
")",
"!==",
"false",
"||",
"strpos",
"(",
"$",
... | Check should special RegEx rules be applied
@param string $buffer
@return bool | [
"Check",
"should",
"special",
"RegEx",
"rules",
"be",
"applied"
] | 1fa3e943470656d98ea1bfe6ade044d20f731a3b | https://github.com/kenhyuwa/blade-minify/blob/1fa3e943470656d98ea1bfe6ade044d20f731a3b/src/Middleware/Minify.php#L66-L71 |
223,131 | shopsys/doctrine-orm | lib/Doctrine/ORM/Query.php | Query.setLockMode | public function setLockMode($lockMode)
{
if (in_array($lockMode, array(LockMode::NONE, LockMode::PESSIMISTIC_READ, LockMode::PESSIMISTIC_WRITE), true)) {
if ( ! $this->_em->getConnection()->isTransactionActive()) {
throw TransactionRequiredException::transactionRequired();
... | php | public function setLockMode($lockMode)
{
if (in_array($lockMode, array(LockMode::NONE, LockMode::PESSIMISTIC_READ, LockMode::PESSIMISTIC_WRITE), true)) {
if ( ! $this->_em->getConnection()->isTransactionActive()) {
throw TransactionRequiredException::transactionRequired();
... | [
"public",
"function",
"setLockMode",
"(",
"$",
"lockMode",
")",
"{",
"if",
"(",
"in_array",
"(",
"$",
"lockMode",
",",
"array",
"(",
"LockMode",
"::",
"NONE",
",",
"LockMode",
"::",
"PESSIMISTIC_READ",
",",
"LockMode",
"::",
"PESSIMISTIC_WRITE",
")",
",",
... | Set the lock mode for this Query.
@see \Doctrine\DBAL\LockMode
@param int $lockMode
@return Query
@throws TransactionRequiredException | [
"Set",
"the",
"lock",
"mode",
"for",
"this",
"Query",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Query.php#L664-L675 |
223,132 | mmerian/phpcrawl | libs/PHPCrawlerURLFilter.class.php | PHPCrawlerURLFilter.keepRedirectUrls | public static function keepRedirectUrls(PHPCrawlerDocumentInfo $DocumentInfo, $decrease_link_depths = false)
{
$cnt = count($DocumentInfo->links_found_url_descriptors);
for ($x=0; $x<$cnt; $x++)
{
if ($DocumentInfo->links_found_url_descriptors[$x]->is_redirect_url == false)
{
$D... | php | public static function keepRedirectUrls(PHPCrawlerDocumentInfo $DocumentInfo, $decrease_link_depths = false)
{
$cnt = count($DocumentInfo->links_found_url_descriptors);
for ($x=0; $x<$cnt; $x++)
{
if ($DocumentInfo->links_found_url_descriptors[$x]->is_redirect_url == false)
{
$D... | [
"public",
"static",
"function",
"keepRedirectUrls",
"(",
"PHPCrawlerDocumentInfo",
"$",
"DocumentInfo",
",",
"$",
"decrease_link_depths",
"=",
"false",
")",
"{",
"$",
"cnt",
"=",
"count",
"(",
"$",
"DocumentInfo",
"->",
"links_found_url_descriptors",
")",
";",
"fo... | Filters out all non-redirect-URLs from the URLs given in the PHPCrawlerDocumentInfo-object
@param PHPCrawlerDocumentInfo $DocumentInfo PHPCrawlerDocumentInfo-object containing all found links of the current document.
@param bool $decrease_link_depths | [
"Filters",
"out",
"all",
"non",
"-",
"redirect",
"-",
"URLs",
"from",
"the",
"URLs",
"given",
"in",
"the",
"PHPCrawlerDocumentInfo",
"-",
"object"
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/PHPCrawlerURLFilter.class.php#L117-L131 |
223,133 | shopsys/doctrine-orm | lib/Doctrine/ORM/Tools/Setup.php | Setup.registerAutoloadDirectory | public static function registerAutoloadDirectory($directory)
{
if (!class_exists('Doctrine\Common\ClassLoader', false)) {
require_once $directory . "/Doctrine/Common/ClassLoader.php";
}
$loader = new ClassLoader("Doctrine", $directory);
$loader->register();
$loa... | php | public static function registerAutoloadDirectory($directory)
{
if (!class_exists('Doctrine\Common\ClassLoader', false)) {
require_once $directory . "/Doctrine/Common/ClassLoader.php";
}
$loader = new ClassLoader("Doctrine", $directory);
$loader->register();
$loa... | [
"public",
"static",
"function",
"registerAutoloadDirectory",
"(",
"$",
"directory",
")",
"{",
"if",
"(",
"!",
"class_exists",
"(",
"'Doctrine\\Common\\ClassLoader'",
",",
"false",
")",
")",
"{",
"require_once",
"$",
"directory",
".",
"\"/Doctrine/Common/ClassLoader.ph... | Use this method to register all autoloads for a downloaded Doctrine library.
Pick the directory the library was uncompressed into.
@param string $directory
@return void | [
"Use",
"this",
"method",
"to",
"register",
"all",
"autoloads",
"for",
"a",
"downloaded",
"Doctrine",
"library",
".",
"Pick",
"the",
"directory",
"the",
"library",
"was",
"uncompressed",
"into",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Tools/Setup.php#L45-L56 |
223,134 | shopsys/doctrine-orm | lib/Doctrine/ORM/Tools/Setup.php | Setup.createAnnotationMetadataConfiguration | public static function createAnnotationMetadataConfiguration(array $paths, $isDevMode = false, $proxyDir = null, Cache $cache = null, $useSimpleAnnotationReader = true)
{
$config = self::createConfiguration($isDevMode, $proxyDir, $cache);
$config->setMetadataDriverImpl($config->newDefaultAnnotationD... | php | public static function createAnnotationMetadataConfiguration(array $paths, $isDevMode = false, $proxyDir = null, Cache $cache = null, $useSimpleAnnotationReader = true)
{
$config = self::createConfiguration($isDevMode, $proxyDir, $cache);
$config->setMetadataDriverImpl($config->newDefaultAnnotationD... | [
"public",
"static",
"function",
"createAnnotationMetadataConfiguration",
"(",
"array",
"$",
"paths",
",",
"$",
"isDevMode",
"=",
"false",
",",
"$",
"proxyDir",
"=",
"null",
",",
"Cache",
"$",
"cache",
"=",
"null",
",",
"$",
"useSimpleAnnotationReader",
"=",
"t... | Creates a configuration with an annotation metadata driver.
@param array $paths
@param boolean $isDevMode
@param string $proxyDir
@param Cache $cache
@param bool $useSimpleAnnotationReader
@return Configuration | [
"Creates",
"a",
"configuration",
"with",
"an",
"annotation",
"metadata",
"driver",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Tools/Setup.php#L69-L75 |
223,135 | shopsys/doctrine-orm | lib/Doctrine/ORM/Tools/Setup.php | Setup.createYAMLMetadataConfiguration | public static function createYAMLMetadataConfiguration(array $paths, $isDevMode = false, $proxyDir = null, Cache $cache = null)
{
$config = self::createConfiguration($isDevMode, $proxyDir, $cache);
$config->setMetadataDriverImpl(new YamlDriver($paths));
return $config;
} | php | public static function createYAMLMetadataConfiguration(array $paths, $isDevMode = false, $proxyDir = null, Cache $cache = null)
{
$config = self::createConfiguration($isDevMode, $proxyDir, $cache);
$config->setMetadataDriverImpl(new YamlDriver($paths));
return $config;
} | [
"public",
"static",
"function",
"createYAMLMetadataConfiguration",
"(",
"array",
"$",
"paths",
",",
"$",
"isDevMode",
"=",
"false",
",",
"$",
"proxyDir",
"=",
"null",
",",
"Cache",
"$",
"cache",
"=",
"null",
")",
"{",
"$",
"config",
"=",
"self",
"::",
"c... | Creates a configuration with a yaml metadata driver.
@param array $paths
@param boolean $isDevMode
@param string $proxyDir
@param Cache $cache
@return Configuration | [
"Creates",
"a",
"configuration",
"with",
"a",
"yaml",
"metadata",
"driver",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Tools/Setup.php#L105-L111 |
223,136 | tequilarapido/socialite-okta | src/SocialiteManager.php | SocialiteManager.createOktaDriver | public function createOktaDriver()
{
$config = $this->app['config']['services.okta'];
$provider = $this->buildProvider(OktaProvider::class, $config);
$provider->setOktaUrl($config['url']);
return $provider;
} | php | public function createOktaDriver()
{
$config = $this->app['config']['services.okta'];
$provider = $this->buildProvider(OktaProvider::class, $config);
$provider->setOktaUrl($config['url']);
return $provider;
} | [
"public",
"function",
"createOktaDriver",
"(",
")",
"{",
"$",
"config",
"=",
"$",
"this",
"->",
"app",
"[",
"'config'",
"]",
"[",
"'services.okta'",
"]",
";",
"$",
"provider",
"=",
"$",
"this",
"->",
"buildProvider",
"(",
"OktaProvider",
"::",
"class",
"... | Creates Okta provider and bind it to Laravel Socialite.
@return \Laravel\Socialite\Two\AbstractProvider | [
"Creates",
"Okta",
"provider",
"and",
"bind",
"it",
"to",
"Laravel",
"Socialite",
"."
] | 0ca5ba3012f7e7671d6cd5b4df53cf16ad86a8d9 | https://github.com/tequilarapido/socialite-okta/blob/0ca5ba3012f7e7671d6cd5b4df53cf16ad86a8d9/src/SocialiteManager.php#L12-L21 |
223,137 | imanee/imanee | src/ImageResource/ImagickResource.php | ImagickResource.getImagickDraw | public function getImagickDraw(Drawer $drawer)
{
$imdraw = new ImagickDraw();
$imdraw->setFont($drawer->getFont());
$imdraw->setFillColor($drawer->getFontColor());
$imdraw->setFontSize($drawer->getFontSize());
$imdraw->setTextAlignment($drawer->getTextAlign());
retu... | php | public function getImagickDraw(Drawer $drawer)
{
$imdraw = new ImagickDraw();
$imdraw->setFont($drawer->getFont());
$imdraw->setFillColor($drawer->getFontColor());
$imdraw->setFontSize($drawer->getFontSize());
$imdraw->setTextAlignment($drawer->getTextAlign());
retu... | [
"public",
"function",
"getImagickDraw",
"(",
"Drawer",
"$",
"drawer",
")",
"{",
"$",
"imdraw",
"=",
"new",
"ImagickDraw",
"(",
")",
";",
"$",
"imdraw",
"->",
"setFont",
"(",
"$",
"drawer",
"->",
"getFont",
"(",
")",
")",
";",
"$",
"imdraw",
"->",
"se... | Translates the Drawer object to a ImagickDraw.
@param Drawer $drawer
@return ImagickDraw | [
"Translates",
"the",
"Drawer",
"object",
"to",
"a",
"ImagickDraw",
"."
] | cf390b5e7f92ca21d6e388abe51433e9ed671b1b | https://github.com/imanee/imanee/blob/cf390b5e7f92ca21d6e388abe51433e9ed671b1b/src/ImageResource/ImagickResource.php#L337-L347 |
223,138 | imanee/imanee | src/ImageResource/ImagickResource.php | ImagickResource.setOpacity | public function setOpacity(Imagick $resource, $transparency)
{
$alpha = $transparency / 100;
if ($alpha >= 1) {
return true;
}
$rows = $resource->getPixelIterator();
foreach ($rows as $cols) {
foreach ($cols as $pixel) {
/** @var Im... | php | public function setOpacity(Imagick $resource, $transparency)
{
$alpha = $transparency / 100;
if ($alpha >= 1) {
return true;
}
$rows = $resource->getPixelIterator();
foreach ($rows as $cols) {
foreach ($cols as $pixel) {
/** @var Im... | [
"public",
"function",
"setOpacity",
"(",
"Imagick",
"$",
"resource",
",",
"$",
"transparency",
")",
"{",
"$",
"alpha",
"=",
"$",
"transparency",
"/",
"100",
";",
"if",
"(",
"$",
"alpha",
">=",
"1",
")",
"{",
"return",
"true",
";",
"}",
"$",
"rows",
... | Manually sets the transparency pixel per pixel.
This method properly sets the opacity on a png with transparency, by iterating pixel per
pixel. It's a substitute for the Imagick::setImageOpacity, since it doesn't handle well
transparent backgrounds.
@param Imagick $resource The imagick resource to set opacity
@p... | [
"Manually",
"sets",
"the",
"transparency",
"pixel",
"per",
"pixel",
"."
] | cf390b5e7f92ca21d6e388abe51433e9ed671b1b | https://github.com/imanee/imanee/blob/cf390b5e7f92ca21d6e388abe51433e9ed671b1b/src/ImageResource/ImagickResource.php#L400-L423 |
223,139 | mespronos/mespronos | src/Controller/DayController.php | DayController.getlastDays | public static function getlastDays($nb = 5, League $league = null, $include_archived = false) {
$day_storage = \Drupal::entityTypeManager()->getStorage('day');
$injected_database = Database::getConnection();
$now = new \DateTime(null, new \DateTimeZone("UTC"));
$query = $injected_database->select('mesp... | php | public static function getlastDays($nb = 5, League $league = null, $include_archived = false) {
$day_storage = \Drupal::entityTypeManager()->getStorage('day');
$injected_database = Database::getConnection();
$now = new \DateTime(null, new \DateTimeZone("UTC"));
$query = $injected_database->select('mesp... | [
"public",
"static",
"function",
"getlastDays",
"(",
"$",
"nb",
"=",
"5",
",",
"League",
"$",
"league",
"=",
"null",
",",
"$",
"include_archived",
"=",
"false",
")",
"{",
"$",
"day_storage",
"=",
"\\",
"Drupal",
"::",
"entityTypeManager",
"(",
")",
"->",
... | Return past days
@param int $nb number of days to return
@param \Drupal\mespronos\Entity\League|NULL $league
@return mixed | [
"Return",
"past",
"days"
] | 73757663581ed9040944768073d1d9abc761196b | https://github.com/mespronos/mespronos/blob/73757663581ed9040944768073d1d9abc761196b/src/Controller/DayController.php#L187-L220 |
223,140 | shopsys/doctrine-orm | lib/Doctrine/ORM/EntityRepository.php | EntityRepository.createNativeNamedQuery | public function createNativeNamedQuery($queryName)
{
$queryMapping = $this->_class->getNamedNativeQuery($queryName);
$rsm = new Query\ResultSetMappingBuilder($this->_em);
$rsm->addNamedNativeQueryMapping($this->_class, $queryMapping);
return $this->_em->createNativeQuer... | php | public function createNativeNamedQuery($queryName)
{
$queryMapping = $this->_class->getNamedNativeQuery($queryName);
$rsm = new Query\ResultSetMappingBuilder($this->_em);
$rsm->addNamedNativeQueryMapping($this->_class, $queryMapping);
return $this->_em->createNativeQuer... | [
"public",
"function",
"createNativeNamedQuery",
"(",
"$",
"queryName",
")",
"{",
"$",
"queryMapping",
"=",
"$",
"this",
"->",
"_class",
"->",
"getNamedNativeQuery",
"(",
"$",
"queryName",
")",
";",
"$",
"rsm",
"=",
"new",
"Query",
"\\",
"ResultSetMappingBuilde... | Creates a native SQL query.
@param string $queryName
@return NativeQuery | [
"Creates",
"a",
"native",
"SQL",
"query",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/EntityRepository.php#L123-L130 |
223,141 | imanee/imanee | src/Imanee.php | Imanee.newImage | public function newImage($width, $height, $background = 'white')
{
$this->resource->createNew($width, $height, $background);
return $this;
} | php | public function newImage($width, $height, $background = 'white')
{
$this->resource->createNew($width, $height, $background);
return $this;
} | [
"public",
"function",
"newImage",
"(",
"$",
"width",
",",
"$",
"height",
",",
"$",
"background",
"=",
"'white'",
")",
"{",
"$",
"this",
"->",
"resource",
"->",
"createNew",
"(",
"$",
"width",
",",
"$",
"height",
",",
"$",
"background",
")",
";",
"ret... | Creates a new "blank" image.
@param int $width The width of the image.
@param int $height The height of the image.
@param string $background The image background.
@return $this | [
"Creates",
"a",
"new",
"blank",
"image",
"."
] | cf390b5e7f92ca21d6e388abe51433e9ed671b1b | https://github.com/imanee/imanee/blob/cf390b5e7f92ca21d6e388abe51433e9ed671b1b/src/Imanee.php#L121-L126 |
223,142 | imanee/imanee | src/Imanee.php | Imanee.resize | public function resize($width, $height, $bestfit = true, $stretch = true)
{
if (!$stretch and (($width >= $this->getWidth()) and ($height >= $this->getHeight()))) {
return $this;
}
$this->resource->resize($width, $height, $bestfit, $stretch);
return $this;
} | php | public function resize($width, $height, $bestfit = true, $stretch = true)
{
if (!$stretch and (($width >= $this->getWidth()) and ($height >= $this->getHeight()))) {
return $this;
}
$this->resource->resize($width, $height, $bestfit, $stretch);
return $this;
} | [
"public",
"function",
"resize",
"(",
"$",
"width",
",",
"$",
"height",
",",
"$",
"bestfit",
"=",
"true",
",",
"$",
"stretch",
"=",
"true",
")",
"{",
"if",
"(",
"!",
"$",
"stretch",
"and",
"(",
"(",
"$",
"width",
">=",
"$",
"this",
"->",
"getWidth... | Resizes the current image resource.
@param int $width The new width.
@param int $height The new height.
@param bool $bestfit When set to true, will fit the image inside the provided box dimensions.
When set to false, will force resize to the specified dimensions, which
may cause the resulting image to be out of p... | [
"Resizes",
"the",
"current",
"image",
"resource",
"."
] | cf390b5e7f92ca21d6e388abe51433e9ed671b1b | https://github.com/imanee/imanee/blob/cf390b5e7f92ca21d6e388abe51433e9ed671b1b/src/Imanee.php#L175-L184 |
223,143 | imanee/imanee | src/Imanee.php | Imanee.crop | public function crop($width, $height, $coordX, $coordY)
{
$this->resource->crop($width, $height, $coordX, $coordY);
return $this;
} | php | public function crop($width, $height, $coordX, $coordY)
{
$this->resource->crop($width, $height, $coordX, $coordY);
return $this;
} | [
"public",
"function",
"crop",
"(",
"$",
"width",
",",
"$",
"height",
",",
"$",
"coordX",
",",
"$",
"coordY",
")",
"{",
"$",
"this",
"->",
"resource",
"->",
"crop",
"(",
"$",
"width",
",",
"$",
"height",
",",
"$",
"coordX",
",",
"$",
"coordY",
")"... | Crops a portion of the image.
@param int $width The width.
@param int $height The height.
@param int $coordX The X coordinate.
@param int $coordY The Y coordinate.
@return $this | [
"Crops",
"a",
"portion",
"of",
"the",
"image",
"."
] | cf390b5e7f92ca21d6e388abe51433e9ed671b1b | https://github.com/imanee/imanee/blob/cf390b5e7f92ca21d6e388abe51433e9ed671b1b/src/Imanee.php#L213-L218 |
223,144 | imanee/imanee | src/Imanee.php | Imanee.thumbnail | public function thumbnail($width, $height, $crop = false, $stretch = true)
{
if (!$stretch and (($width >= $this->getWidth()) and ($height >= $this->getHeight()))) {
return $this;
}
$this->resource->thumbnail($width, $height, $crop);
return $this;
} | php | public function thumbnail($width, $height, $crop = false, $stretch = true)
{
if (!$stretch and (($width >= $this->getWidth()) and ($height >= $this->getHeight()))) {
return $this;
}
$this->resource->thumbnail($width, $height, $crop);
return $this;
} | [
"public",
"function",
"thumbnail",
"(",
"$",
"width",
",",
"$",
"height",
",",
"$",
"crop",
"=",
"false",
",",
"$",
"stretch",
"=",
"true",
")",
"{",
"if",
"(",
"!",
"$",
"stretch",
"and",
"(",
"(",
"$",
"width",
">=",
"$",
"this",
"->",
"getWidt... | Creates a thumbnail of the current resource. If crop is true, the result will be a perfect
fit thumbnail with the given dimensions, cropped by the center. If crop is false, the
thumbnail will use the best fit for the dimensions.
@param int $width Width of the thumbnail.
@param int $height Height of the thumbnail.... | [
"Creates",
"a",
"thumbnail",
"of",
"the",
"current",
"resource",
".",
"If",
"crop",
"is",
"true",
"the",
"result",
"will",
"be",
"a",
"perfect",
"fit",
"thumbnail",
"with",
"the",
"given",
"dimensions",
"cropped",
"by",
"the",
"center",
".",
"If",
"crop",
... | cf390b5e7f92ca21d6e388abe51433e9ed671b1b | https://github.com/imanee/imanee/blob/cf390b5e7f92ca21d6e388abe51433e9ed671b1b/src/Imanee.php#L234-L243 |
223,145 | imanee/imanee | src/Imanee.php | Imanee.write | public function write($path, $jpeg_quality = null)
{
$this->resource->write($path, $jpeg_quality);
return $this;
} | php | public function write($path, $jpeg_quality = null)
{
$this->resource->write($path, $jpeg_quality);
return $this;
} | [
"public",
"function",
"write",
"(",
"$",
"path",
",",
"$",
"jpeg_quality",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"resource",
"->",
"write",
"(",
"$",
"path",
",",
"$",
"jpeg_quality",
")",
";",
"return",
"$",
"this",
";",
"}"
] | Saves the image to disk. If the second param is provided, will try to compress the image
using JPEG compression.
The format will be decided based on the extension used for the filename. If, for instance,
a "img.png" is provided, the image will be saved as PNG and the compression will not take
affect.
@param string $p... | [
"Saves",
"the",
"image",
"to",
"disk",
".",
"If",
"the",
"second",
"param",
"is",
"provided",
"will",
"try",
"to",
"compress",
"the",
"image",
"using",
"JPEG",
"compression",
"."
] | cf390b5e7f92ca21d6e388abe51433e9ed671b1b | https://github.com/imanee/imanee/blob/cf390b5e7f92ca21d6e388abe51433e9ed671b1b/src/Imanee.php#L309-L314 |
223,146 | imanee/imanee | src/Imanee.php | Imanee.setResource | public function setResource(ImageResourceInterface $resource)
{
$this->resource = $resource;
if ($this->resource instanceof ImageFilterableInterface) {
$this->filterResolver = new FilterResolver($this->resource->loadFilters());
}
} | php | public function setResource(ImageResourceInterface $resource)
{
$this->resource = $resource;
if ($this->resource instanceof ImageFilterableInterface) {
$this->filterResolver = new FilterResolver($this->resource->loadFilters());
}
} | [
"public",
"function",
"setResource",
"(",
"ImageResourceInterface",
"$",
"resource",
")",
"{",
"$",
"this",
"->",
"resource",
"=",
"$",
"resource",
";",
"if",
"(",
"$",
"this",
"->",
"resource",
"instanceof",
"ImageFilterableInterface",
")",
"{",
"$",
"this",
... | Sets the current Image Resource.
@param ImageResourceInterface $resource | [
"Sets",
"the",
"current",
"Image",
"Resource",
"."
] | cf390b5e7f92ca21d6e388abe51433e9ed671b1b | https://github.com/imanee/imanee/blob/cf390b5e7f92ca21d6e388abe51433e9ed671b1b/src/Imanee.php#L331-L338 |
223,147 | imanee/imanee | src/Imanee.php | Imanee.adjustFontSize | public function adjustFontSize($text, Drawer $drawer, $width)
{
if (! ($this->resource instanceof ImageWritableInterface)) {
throw new UnsupportedMethodException("This method is not supported by the ImageResource in use.");
}
$fontSize = 0;
$metrics['width'] = 0;
... | php | public function adjustFontSize($text, Drawer $drawer, $width)
{
if (! ($this->resource instanceof ImageWritableInterface)) {
throw new UnsupportedMethodException("This method is not supported by the ImageResource in use.");
}
$fontSize = 0;
$metrics['width'] = 0;
... | [
"public",
"function",
"adjustFontSize",
"(",
"$",
"text",
",",
"Drawer",
"$",
"drawer",
",",
"$",
"width",
")",
"{",
"if",
"(",
"!",
"(",
"$",
"this",
"->",
"resource",
"instanceof",
"ImageWritableInterface",
")",
")",
"{",
"throw",
"new",
"UnsupportedMeth... | Adjusts the font size of the Drawer object to fit a text in the desired width.
@param string $text
@param Drawer $drawer
@param int $width
@return Drawer
@throws UnsupportedMethodException | [
"Adjusts",
"the",
"font",
"size",
"of",
"the",
"Drawer",
"object",
"to",
"fit",
"a",
"text",
"in",
"the",
"desired",
"width",
"."
] | cf390b5e7f92ca21d6e388abe51433e9ed671b1b | https://github.com/imanee/imanee/blob/cf390b5e7f92ca21d6e388abe51433e9ed671b1b/src/Imanee.php#L359-L375 |
223,148 | imanee/imanee | src/Imanee.php | Imanee.annotate | public function annotate($text, $coordX, $coordY, $size = null, $angle = 0)
{
if (! ($this->resource instanceof ImageWritableInterface)) {
throw new UnsupportedMethodException("This method is not supported by the ImageResource in use.");
}
$drawer = $this->getDrawer();
... | php | public function annotate($text, $coordX, $coordY, $size = null, $angle = 0)
{
if (! ($this->resource instanceof ImageWritableInterface)) {
throw new UnsupportedMethodException("This method is not supported by the ImageResource in use.");
}
$drawer = $this->getDrawer();
... | [
"public",
"function",
"annotate",
"(",
"$",
"text",
",",
"$",
"coordX",
",",
"$",
"coordY",
",",
"$",
"size",
"=",
"null",
",",
"$",
"angle",
"=",
"0",
")",
"{",
"if",
"(",
"!",
"(",
"$",
"this",
"->",
"resource",
"instanceof",
"ImageWritableInterfac... | Writes text to an image.
@param string $text The text to be written.
@param int $coordX The X coordinate for text placement.
@param int $coordY The Y coordinate for text placement.
@param int $size The font size.
@param int $angle The angle.
@return $this
@throws UnsupportedMethodException | [
"Writes",
"text",
"to",
"an",
"image",
"."
] | cf390b5e7f92ca21d6e388abe51433e9ed671b1b | https://github.com/imanee/imanee/blob/cf390b5e7f92ca21d6e388abe51433e9ed671b1b/src/Imanee.php#L436-L450 |
223,149 | imanee/imanee | src/Imanee.php | Imanee.placeImage | public function placeImage(
$image,
$place_constant = Imanee::IM_POS_TOP_LEFT,
$width = null,
$height = null,
$transparency = 0
) {
if (! ($this->resource instanceof ImageComposableInterface)) {
throw new UnsupportedMethodException("This method is not supp... | php | public function placeImage(
$image,
$place_constant = Imanee::IM_POS_TOP_LEFT,
$width = null,
$height = null,
$transparency = 0
) {
if (! ($this->resource instanceof ImageComposableInterface)) {
throw new UnsupportedMethodException("This method is not supp... | [
"public",
"function",
"placeImage",
"(",
"$",
"image",
",",
"$",
"place_constant",
"=",
"Imanee",
"::",
"IM_POS_TOP_LEFT",
",",
"$",
"width",
"=",
"null",
",",
"$",
"height",
"=",
"null",
",",
"$",
"transparency",
"=",
"0",
")",
"{",
"if",
"(",
"!",
... | Places an image on top of the current resource. If the width and height are supplied, will
perform a resize before placing the image.
@param mixed $image Path to an image on filesystem or an Imanee Object.
@param int $place_constant One of the Imanee::IM_POS constants, defaults to
IM_POS_TOP_LEFT (top left ... | [
"Places",
"an",
"image",
"on",
"top",
"of",
"the",
"current",
"resource",
".",
"If",
"the",
"width",
"and",
"height",
"are",
"supplied",
"will",
"perform",
"a",
"resize",
"before",
"placing",
"the",
"image",
"."
] | cf390b5e7f92ca21d6e388abe51433e9ed671b1b | https://github.com/imanee/imanee/blob/cf390b5e7f92ca21d6e388abe51433e9ed671b1b/src/Imanee.php#L516-L550 |
223,150 | imanee/imanee | src/Imanee.php | Imanee.watermark | public function watermark($image, $place_constant = Imanee::IM_POS_BOTTOM_RIGHT, $transparency = 0)
{
$this->placeImage($image, $place_constant, 0, 0, $transparency);
return $this;
} | php | public function watermark($image, $place_constant = Imanee::IM_POS_BOTTOM_RIGHT, $transparency = 0)
{
$this->placeImage($image, $place_constant, 0, 0, $transparency);
return $this;
} | [
"public",
"function",
"watermark",
"(",
"$",
"image",
",",
"$",
"place_constant",
"=",
"Imanee",
"::",
"IM_POS_BOTTOM_RIGHT",
",",
"$",
"transparency",
"=",
"0",
")",
"{",
"$",
"this",
"->",
"placeImage",
"(",
"$",
"image",
",",
"$",
"place_constant",
",",... | Convenient method to place a watermark image on top of the current resource.
@param mixed $image The path to the watermark image file or an Imanee object.
@param int $place_constant One of the Imanee::IM_POS constants
@param int $transparency Watermark transparency percentage.
@return $this | [
"Convenient",
"method",
"to",
"place",
"a",
"watermark",
"image",
"on",
"top",
"of",
"the",
"current",
"resource",
"."
] | cf390b5e7f92ca21d6e388abe51433e9ed671b1b | https://github.com/imanee/imanee/blob/cf390b5e7f92ca21d6e388abe51433e9ed671b1b/src/Imanee.php#L561-L566 |
223,151 | imanee/imanee | src/Imanee.php | Imanee.addFilter | public function addFilter(FilterInterface $filter)
{
if (! ($this->resource instanceof ImageFilterableInterface)) {
throw new UnsupportedMethodException("This method is not supported by the ImageResource in use.");
}
$this->getFilterResolver()->addFilter($filter);
retur... | php | public function addFilter(FilterInterface $filter)
{
if (! ($this->resource instanceof ImageFilterableInterface)) {
throw new UnsupportedMethodException("This method is not supported by the ImageResource in use.");
}
$this->getFilterResolver()->addFilter($filter);
retur... | [
"public",
"function",
"addFilter",
"(",
"FilterInterface",
"$",
"filter",
")",
"{",
"if",
"(",
"!",
"(",
"$",
"this",
"->",
"resource",
"instanceof",
"ImageFilterableInterface",
")",
")",
"{",
"throw",
"new",
"UnsupportedMethodException",
"(",
"\"This method is no... | Adds a custom filter to the FilterResolver.
@param FilterInterface $filter The Filter
@return $this
@throws UnsupportedMethodException | [
"Adds",
"a",
"custom",
"filter",
"to",
"the",
"FilterResolver",
"."
] | cf390b5e7f92ca21d6e388abe51433e9ed671b1b | https://github.com/imanee/imanee/blob/cf390b5e7f92ca21d6e388abe51433e9ed671b1b/src/Imanee.php#L593-L602 |
223,152 | imanee/imanee | src/Imanee.php | Imanee.applyFilter | public function applyFilter($filter, array $options = [])
{
if (! ($this->resource instanceof ImageFilterableInterface)) {
throw new UnsupportedMethodException("This method is not supported by the ImageResource in use.");
}
$filter = $this->getFilterResolver()->resolve($filter);... | php | public function applyFilter($filter, array $options = [])
{
if (! ($this->resource instanceof ImageFilterableInterface)) {
throw new UnsupportedMethodException("This method is not supported by the ImageResource in use.");
}
$filter = $this->getFilterResolver()->resolve($filter);... | [
"public",
"function",
"applyFilter",
"(",
"$",
"filter",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"!",
"(",
"$",
"this",
"->",
"resource",
"instanceof",
"ImageFilterableInterface",
")",
")",
"{",
"throw",
"new",
"UnsupportedMethodE... | Tries to apply the specified filter to the current resource.
@param string $filter The filter identifier, e.g. "filter_bw".
@param array $options
@return $this
@throws FilterNotFoundException
@throws UnsupportedMethodException | [
"Tries",
"to",
"apply",
"the",
"specified",
"filter",
"to",
"the",
"current",
"resource",
"."
] | cf390b5e7f92ca21d6e388abe51433e9ed671b1b | https://github.com/imanee/imanee/blob/cf390b5e7f92ca21d6e388abe51433e9ed671b1b/src/Imanee.php#L615-L630 |
223,153 | imanee/imanee | src/Imanee.php | Imanee.removeFrame | public function removeFrame($offset)
{
if (!isset($this->frames[$offset])) {
throw new \InvalidArgumentException('Offset does not exist.');
}
unset($this->frames[$offset]);
return $this;
} | php | public function removeFrame($offset)
{
if (!isset($this->frames[$offset])) {
throw new \InvalidArgumentException('Offset does not exist.');
}
unset($this->frames[$offset]);
return $this;
} | [
"public",
"function",
"removeFrame",
"(",
"$",
"offset",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"frames",
"[",
"$",
"offset",
"]",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'Offset does not exist.'",
")",
... | Removes a frame from a list used for generating animated Gifs.
@param int $offset
@throws \InvalidArgumentException
@return Imanee | [
"Removes",
"a",
"frame",
"from",
"a",
"list",
"used",
"for",
"generating",
"animated",
"Gifs",
"."
] | cf390b5e7f92ca21d6e388abe51433e9ed671b1b | https://github.com/imanee/imanee/blob/cf390b5e7f92ca21d6e388abe51433e9ed671b1b/src/Imanee.php#L677-L686 |
223,154 | imanee/imanee | src/Imanee.php | Imanee.textGen | public static function textGen(
$text,
Drawer $drawer = null,
$format = 'png',
$background = 'transparent',
ImageResourceInterface $resource = null
) {
$imanee = new Imanee(null, $resource);
if ($drawer !== null) {
$imanee->setDrawer($drawer);
... | php | public static function textGen(
$text,
Drawer $drawer = null,
$format = 'png',
$background = 'transparent',
ImageResourceInterface $resource = null
) {
$imanee = new Imanee(null, $resource);
if ($drawer !== null) {
$imanee->setDrawer($drawer);
... | [
"public",
"static",
"function",
"textGen",
"(",
"$",
"text",
",",
"Drawer",
"$",
"drawer",
"=",
"null",
",",
"$",
"format",
"=",
"'png'",
",",
"$",
"background",
"=",
"'transparent'",
",",
"ImageResourceInterface",
"$",
"resource",
"=",
"null",
")",
"{",
... | Generates text-only images.
@param string $text
@param Drawer $drawer
@param string $format
@param string $background
@return Imanee | [
"Generates",
"text",
"-",
"only",
"images",
"."
] | cf390b5e7f92ca21d6e388abe51433e9ed671b1b | https://github.com/imanee/imanee/blob/cf390b5e7f92ca21d6e388abe51433e9ed671b1b/src/Imanee.php#L723-L743 |
223,155 | imanee/imanee | src/Imanee.php | Imanee.arrayAnimate | public static function arrayAnimate(array $images, $delay = 20)
{
$imanee = new Imanee();
if (! ($imanee->resource instanceof ImageAnimatableInterface)) {
throw new UnsupportedMethodException("This method is not supported by the ImageResource in use.");
}
return $imanee... | php | public static function arrayAnimate(array $images, $delay = 20)
{
$imanee = new Imanee();
if (! ($imanee->resource instanceof ImageAnimatableInterface)) {
throw new UnsupportedMethodException("This method is not supported by the ImageResource in use.");
}
return $imanee... | [
"public",
"static",
"function",
"arrayAnimate",
"(",
"array",
"$",
"images",
",",
"$",
"delay",
"=",
"20",
")",
"{",
"$",
"imanee",
"=",
"new",
"Imanee",
"(",
")",
";",
"if",
"(",
"!",
"(",
"$",
"imanee",
"->",
"resource",
"instanceof",
"ImageAnimatabl... | Generates an animated gif from an array of images.
@param array $images Array containing paths to the images that should be used as frames.
@param int $delay
@return string
@throws UnsupportedMethodException | [
"Generates",
"an",
"animated",
"gif",
"from",
"an",
"array",
"of",
"images",
"."
] | cf390b5e7f92ca21d6e388abe51433e9ed671b1b | https://github.com/imanee/imanee/blob/cf390b5e7f92ca21d6e388abe51433e9ed671b1b/src/Imanee.php#L755-L766 |
223,156 | imanee/imanee | src/Imanee.php | Imanee.globAnimate | public static function globAnimate($pattern, $delay = 20)
{
$imanee = new Imanee();
if (! ($imanee->resource instanceof ImageAnimatableInterface)) {
throw new UnsupportedMethodException("This method is not supported by the ImageResource in use.");
}
$frames = [];
... | php | public static function globAnimate($pattern, $delay = 20)
{
$imanee = new Imanee();
if (! ($imanee->resource instanceof ImageAnimatableInterface)) {
throw new UnsupportedMethodException("This method is not supported by the ImageResource in use.");
}
$frames = [];
... | [
"public",
"static",
"function",
"globAnimate",
"(",
"$",
"pattern",
",",
"$",
"delay",
"=",
"20",
")",
"{",
"$",
"imanee",
"=",
"new",
"Imanee",
"(",
")",
";",
"if",
"(",
"!",
"(",
"$",
"imanee",
"->",
"resource",
"instanceof",
"ImageAnimatableInterface"... | Generates an animated gif from image files in a directory.
@param string $pattern
@param int $delay
@return string
@throws UnsupportedMethodException | [
"Generates",
"an",
"animated",
"gif",
"from",
"image",
"files",
"in",
"a",
"directory",
"."
] | cf390b5e7f92ca21d6e388abe51433e9ed671b1b | https://github.com/imanee/imanee/blob/cf390b5e7f92ca21d6e388abe51433e9ed671b1b/src/Imanee.php#L778-L795 |
223,157 | imanee/imanee | src/Imanee.php | Imanee.getImageInfo | public static function getImageInfo($imagePath)
{
if (!is_file($imagePath)) {
throw new ImageNotFoundException(
sprintf("File '%s' not found. Are you sure this is the right path?", $imagePath)
);
}
$info = getimagesize($imagePath);
return [
... | php | public static function getImageInfo($imagePath)
{
if (!is_file($imagePath)) {
throw new ImageNotFoundException(
sprintf("File '%s' not found. Are you sure this is the right path?", $imagePath)
);
}
$info = getimagesize($imagePath);
return [
... | [
"public",
"static",
"function",
"getImageInfo",
"(",
"$",
"imagePath",
")",
"{",
"if",
"(",
"!",
"is_file",
"(",
"$",
"imagePath",
")",
")",
"{",
"throw",
"new",
"ImageNotFoundException",
"(",
"sprintf",
"(",
"\"File '%s' not found. Are you sure this is the right pa... | Get info about an image saved in disk.
@param string $imagePath
@return array Array containing the keys 'mime', 'width' and 'height'.
@throws ImageNotFoundException | [
"Get",
"info",
"about",
"an",
"image",
"saved",
"in",
"disk",
"."
] | cf390b5e7f92ca21d6e388abe51433e9ed671b1b | https://github.com/imanee/imanee/blob/cf390b5e7f92ca21d6e388abe51433e9ed671b1b/src/Imanee.php#L806-L821 |
223,158 | shopsys/doctrine-orm | lib/Doctrine/ORM/AbstractQuery.php | AbstractQuery.setResultSetMapping | public function setResultSetMapping(Query\ResultSetMapping $rsm)
{
$this->translateNamespaces($rsm);
$this->_resultSetMapping = $rsm;
return $this;
} | php | public function setResultSetMapping(Query\ResultSetMapping $rsm)
{
$this->translateNamespaces($rsm);
$this->_resultSetMapping = $rsm;
return $this;
} | [
"public",
"function",
"setResultSetMapping",
"(",
"Query",
"\\",
"ResultSetMapping",
"$",
"rsm",
")",
"{",
"$",
"this",
"->",
"translateNamespaces",
"(",
"$",
"rsm",
")",
";",
"$",
"this",
"->",
"_resultSetMapping",
"=",
"$",
"rsm",
";",
"return",
"$",
"th... | Sets the ResultSetMapping that should be used for hydration.
@param \Doctrine\ORM\Query\ResultSetMapping $rsm
@return static This query instance. | [
"Sets",
"the",
"ResultSetMapping",
"that",
"should",
"be",
"used",
"for",
"hydration",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/AbstractQuery.php#L446-L452 |
223,159 | shopsys/doctrine-orm | lib/Doctrine/ORM/AbstractQuery.php | AbstractQuery.translateNamespaces | private function translateNamespaces(Query\ResultSetMapping $rsm)
{
$translate = function ($alias) {
return $this->_em->getClassMetadata($alias)->getName();
};
$rsm->aliasMap = array_map($translate, $rsm->aliasMap);
$rsm->declaringClasses = array_map($translate, $rsm->de... | php | private function translateNamespaces(Query\ResultSetMapping $rsm)
{
$translate = function ($alias) {
return $this->_em->getClassMetadata($alias)->getName();
};
$rsm->aliasMap = array_map($translate, $rsm->aliasMap);
$rsm->declaringClasses = array_map($translate, $rsm->de... | [
"private",
"function",
"translateNamespaces",
"(",
"Query",
"\\",
"ResultSetMapping",
"$",
"rsm",
")",
"{",
"$",
"translate",
"=",
"function",
"(",
"$",
"alias",
")",
"{",
"return",
"$",
"this",
"->",
"_em",
"->",
"getClassMetadata",
"(",
"$",
"alias",
")"... | Allows to translate entity namespaces to full qualified names.
@param Query\ResultSetMapping $rsm
@return void | [
"Allows",
"to",
"translate",
"entity",
"namespaces",
"to",
"full",
"qualified",
"names",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/AbstractQuery.php#L471-L479 |
223,160 | shopsys/doctrine-orm | lib/Doctrine/ORM/AbstractQuery.php | AbstractQuery.getHint | public function getHint($name)
{
return isset($this->_hints[$name]) ? $this->_hints[$name] : false;
} | php | public function getHint($name)
{
return isset($this->_hints[$name]) ? $this->_hints[$name] : false;
} | [
"public",
"function",
"getHint",
"(",
"$",
"name",
")",
"{",
"return",
"isset",
"(",
"$",
"this",
"->",
"_hints",
"[",
"$",
"name",
"]",
")",
"?",
"$",
"this",
"->",
"_hints",
"[",
"$",
"name",
"]",
":",
"false",
";",
"}"
] | Gets the value of a query hint. If the hint name is not recognized, FALSE is returned.
@param string $name The name of the hint.
@return mixed The value of the hint or FALSE, if the hint name is not recognized. | [
"Gets",
"the",
"value",
"of",
"a",
"query",
"hint",
".",
"If",
"the",
"hint",
"name",
"is",
"not",
"recognized",
"FALSE",
"is",
"returned",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/AbstractQuery.php#L858-L861 |
223,161 | shopsys/doctrine-orm | lib/Doctrine/ORM/AbstractQuery.php | AbstractQuery.executeUsingQueryCache | private function executeUsingQueryCache($parameters = null, $hydrationMode = null)
{
$rsm = $this->getResultSetMapping();
$querykey = new QueryCacheKey($this->getHash(), $this->lifetime, $this->cacheMode ?: Cache::MODE_NORMAL);
$queryCache = $this->_em->getCache()->getQueryCache($th... | php | private function executeUsingQueryCache($parameters = null, $hydrationMode = null)
{
$rsm = $this->getResultSetMapping();
$querykey = new QueryCacheKey($this->getHash(), $this->lifetime, $this->cacheMode ?: Cache::MODE_NORMAL);
$queryCache = $this->_em->getCache()->getQueryCache($th... | [
"private",
"function",
"executeUsingQueryCache",
"(",
"$",
"parameters",
"=",
"null",
",",
"$",
"hydrationMode",
"=",
"null",
")",
"{",
"$",
"rsm",
"=",
"$",
"this",
"->",
"getResultSetMapping",
"(",
")",
";",
"$",
"querykey",
"=",
"new",
"QueryCacheKey",
... | Load from second level cache or executes the query and put into cache.
@param ArrayCollection|array|null $parameters
@param integer|null $hydrationMode
@return mixed | [
"Load",
"from",
"second",
"level",
"cache",
"or",
"executes",
"the",
"query",
"and",
"put",
"into",
"cache",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/AbstractQuery.php#L993-L1020 |
223,162 | shopsys/doctrine-orm | lib/Doctrine/ORM/AbstractQuery.php | AbstractQuery.getHydrationCacheId | protected function getHydrationCacheId()
{
$parameters = array();
foreach ($this->getParameters() as $parameter) {
$parameters[$parameter->getName()] = $this->processParameterValue($parameter->getValue());
}
$sql = $this->getSQL();
$queryCache... | php | protected function getHydrationCacheId()
{
$parameters = array();
foreach ($this->getParameters() as $parameter) {
$parameters[$parameter->getName()] = $this->processParameterValue($parameter->getValue());
}
$sql = $this->getSQL();
$queryCache... | [
"protected",
"function",
"getHydrationCacheId",
"(",
")",
"{",
"$",
"parameters",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"getParameters",
"(",
")",
"as",
"$",
"parameter",
")",
"{",
"$",
"parameters",
"[",
"$",
"parameter",
"->",... | Get the result cache id to use to store the result set cache entry.
Will return the configured id if it exists otherwise a hash will be
automatically generated for you.
@return array ($key, $hash) | [
"Get",
"the",
"result",
"cache",
"id",
"to",
"use",
"to",
"store",
"the",
"result",
"set",
"cache",
"entry",
".",
"Will",
"return",
"the",
"configured",
"id",
"if",
"it",
"exists",
"otherwise",
"a",
"hash",
"will",
"be",
"automatically",
"generated",
"for"... | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/AbstractQuery.php#L1029-L1045 |
223,163 | shopsys/doctrine-orm | lib/Doctrine/ORM/AbstractQuery.php | AbstractQuery.getHash | protected function getHash()
{
$query = $this->getSQL();
$hints = $this->getHints();
$params = array_map(function(Parameter $parameter) {
// Small optimization
// Does not invoke processParameterValue for scalar values
if (is_scalar($value = $parameter->... | php | protected function getHash()
{
$query = $this->getSQL();
$hints = $this->getHints();
$params = array_map(function(Parameter $parameter) {
// Small optimization
// Does not invoke processParameterValue for scalar values
if (is_scalar($value = $parameter->... | [
"protected",
"function",
"getHash",
"(",
")",
"{",
"$",
"query",
"=",
"$",
"this",
"->",
"getSQL",
"(",
")",
";",
"$",
"hints",
"=",
"$",
"this",
"->",
"getHints",
"(",
")",
";",
"$",
"params",
"=",
"array_map",
"(",
"function",
"(",
"Parameter",
"... | Generates a string of currently query to use for the cache second level cache.
@return string | [
"Generates",
"a",
"string",
"of",
"currently",
"query",
"to",
"use",
"for",
"the",
"cache",
"second",
"level",
"cache",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/AbstractQuery.php#L1102-L1119 |
223,164 | mespronos/mespronos | mespronos_group/src/EventSubscriber/MespronosGroupSubscriber.php | MespronosGroupSubscriber.onKernelException | public function onKernelException(GetResponseEvent $event) {
$exception = $event->getException();
if (!($exception instanceof AccessDeniedHttpException)) {
return;
}
if ($this->route_match->getRouteName() != 'entity.group.canonical') {
return;
}
drupal_set_message(t('You are not a me... | php | public function onKernelException(GetResponseEvent $event) {
$exception = $event->getException();
if (!($exception instanceof AccessDeniedHttpException)) {
return;
}
if ($this->route_match->getRouteName() != 'entity.group.canonical') {
return;
}
drupal_set_message(t('You are not a me... | [
"public",
"function",
"onKernelException",
"(",
"GetResponseEvent",
"$",
"event",
")",
"{",
"$",
"exception",
"=",
"$",
"event",
"->",
"getException",
"(",
")",
";",
"if",
"(",
"!",
"(",
"$",
"exception",
"instanceof",
"AccessDeniedHttpException",
")",
")",
... | Redirects on 403 Access Denied kernel exceptions.
@param \Symfony\Component\HttpKernel\Event\GetResponseEvent $event
The Event to process.
@throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
Thrown when the access is denied and redirects to user login page. | [
"Redirects",
"on",
"403",
"Access",
"Denied",
"kernel",
"exceptions",
"."
] | 73757663581ed9040944768073d1d9abc761196b | https://github.com/mespronos/mespronos/blob/73757663581ed9040944768073d1d9abc761196b/mespronos_group/src/EventSubscriber/MespronosGroupSubscriber.php#L49-L61 |
223,165 | mmerian/phpcrawl | libs/UrlCache/PHPCrawlerSQLiteURLCache.class.php | PHPCrawlerSQLiteURLCache.addURLs | public function addURLs($urls)
{
PHPCrawlerBenchmark::start("adding_urls_to_sqlitecache");
$this->PDO->exec("BEGIN EXCLUSIVE TRANSACTION;");
$cnt = count($urls);
for ($x=0; $x<$cnt; $x++)
{
if ($urls[$x] != null)
{
$this->addURL($urls[$x]);
}
// Com... | php | public function addURLs($urls)
{
PHPCrawlerBenchmark::start("adding_urls_to_sqlitecache");
$this->PDO->exec("BEGIN EXCLUSIVE TRANSACTION;");
$cnt = count($urls);
for ($x=0; $x<$cnt; $x++)
{
if ($urls[$x] != null)
{
$this->addURL($urls[$x]);
}
// Com... | [
"public",
"function",
"addURLs",
"(",
"$",
"urls",
")",
"{",
"PHPCrawlerBenchmark",
"::",
"start",
"(",
"\"adding_urls_to_sqlitecache\"",
")",
";",
"$",
"this",
"->",
"PDO",
"->",
"exec",
"(",
"\"BEGIN EXCLUSIVE TRANSACTION;\"",
")",
";",
"$",
"cnt",
"=",
"cou... | Adds an bunch of URLs to the url-cache
@param array $urls A numeric array containing the URLs as PHPCrawlerURLDescriptor-objects | [
"Adds",
"an",
"bunch",
"of",
"URLs",
"to",
"the",
"url",
"-",
"cache"
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/UrlCache/PHPCrawlerSQLiteURLCache.class.php#L144-L176 |
223,166 | mmerian/phpcrawl | libs/UrlCache/PHPCrawlerSQLiteURLCache.class.php | PHPCrawlerSQLiteURLCache.cleanup | public function cleanup()
{
// Has to be done, otherwise sqlite-file is locked on Windows-OS
$this->PDO = null;
$this->PreparedInsertStatement = null;
unlink($this->sqlite_db_file);
} | php | public function cleanup()
{
// Has to be done, otherwise sqlite-file is locked on Windows-OS
$this->PDO = null;
$this->PreparedInsertStatement = null;
unlink($this->sqlite_db_file);
} | [
"public",
"function",
"cleanup",
"(",
")",
"{",
"// Has to be done, otherwise sqlite-file is locked on Windows-OS\r",
"$",
"this",
"->",
"PDO",
"=",
"null",
";",
"$",
"this",
"->",
"PreparedInsertStatement",
"=",
"null",
";",
"unlink",
"(",
"$",
"this",
"->",
"sql... | Cleans up the cache after is it not needed anymore. | [
"Cleans",
"up",
"the",
"cache",
"after",
"is",
"it",
"not",
"needed",
"anymore",
"."
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/UrlCache/PHPCrawlerSQLiteURLCache.class.php#L302-L309 |
223,167 | shopsys/doctrine-orm | lib/Doctrine/ORM/Query/QueryExpressionVisitor.php | QueryExpressionVisitor.convertComparisonOperator | private static function convertComparisonOperator($criteriaOperator)
{
return isset(self::$operatorMap[$criteriaOperator]) ? self::$operatorMap[$criteriaOperator] : null;
} | php | private static function convertComparisonOperator($criteriaOperator)
{
return isset(self::$operatorMap[$criteriaOperator]) ? self::$operatorMap[$criteriaOperator] : null;
} | [
"private",
"static",
"function",
"convertComparisonOperator",
"(",
"$",
"criteriaOperator",
")",
"{",
"return",
"isset",
"(",
"self",
"::",
"$",
"operatorMap",
"[",
"$",
"criteriaOperator",
"]",
")",
"?",
"self",
"::",
"$",
"operatorMap",
"[",
"$",
"criteriaOp... | Converts Criteria expression to Query one based on static map.
@param string $criteriaOperator
@return string|null | [
"Converts",
"Criteria",
"expression",
"to",
"Query",
"one",
"based",
"on",
"static",
"map",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Query/QueryExpressionVisitor.php#L101-L104 |
223,168 | stuttter/wp-event-calendar | wp-event-calendar/includes/common/event.php | WP_Event_Calendar_Event.event_status_to_rfc | protected function event_status_to_rfc() {
// Make sure the EventStatus is to spec
if ( ! empty( $this->event_status_mapping[ $this->event_status ] ) ) {
return $this->event_status_mapping[ $this->event_status ];
}
// Returning EventScheduled/CONFIRMED if spec does not match
return $this->event_status_ma... | php | protected function event_status_to_rfc() {
// Make sure the EventStatus is to spec
if ( ! empty( $this->event_status_mapping[ $this->event_status ] ) ) {
return $this->event_status_mapping[ $this->event_status ];
}
// Returning EventScheduled/CONFIRMED if spec does not match
return $this->event_status_ma... | [
"protected",
"function",
"event_status_to_rfc",
"(",
")",
"{",
"// Make sure the EventStatus is to spec",
"if",
"(",
"!",
"empty",
"(",
"$",
"this",
"->",
"event_status_mapping",
"[",
"$",
"this",
"->",
"event_status",
"]",
")",
")",
"{",
"return",
"$",
"this",
... | This converts the Schema.org enumeration to the RFC spec
@see https://tools.ietf.org/html/rfc5545#section-3.8.1.11
@see http://schema.org/EventStatusType
@return string Event Status according to RFC5545 | [
"This",
"converts",
"the",
"Schema",
".",
"org",
"enumeration",
"to",
"the",
"RFC",
"spec"
] | e2221b52f0683c105c64fca056daa63763ea8665 | https://github.com/stuttter/wp-event-calendar/blob/e2221b52f0683c105c64fca056daa63763ea8665/wp-event-calendar/includes/common/event.php#L143-L152 |
223,169 | stuttter/wp-event-calendar | wp-event-calendar/includes/common/event.php | WP_Event_Calendar_Event.event_recurrance_to_rfc | protected function event_recurrance_to_rfc() {
// No recurrance by default
$frequency = '';
// Check how our event repeats
switch ( $this->repeat ) {
case 10:
$frequency = 'FREQ=WEEKLY';
break;
case 100:
$frequency = 'FREQ=MONTHLY';
break;
case 1000:
$frequency = 'FREQ=YEARLY';
... | php | protected function event_recurrance_to_rfc() {
// No recurrance by default
$frequency = '';
// Check how our event repeats
switch ( $this->repeat ) {
case 10:
$frequency = 'FREQ=WEEKLY';
break;
case 100:
$frequency = 'FREQ=MONTHLY';
break;
case 1000:
$frequency = 'FREQ=YEARLY';
... | [
"protected",
"function",
"event_recurrance_to_rfc",
"(",
")",
"{",
"// No recurrance by default",
"$",
"frequency",
"=",
"''",
";",
"// Check how our event repeats",
"switch",
"(",
"$",
"this",
"->",
"repeat",
")",
"{",
"case",
"10",
":",
"$",
"frequency",
"=",
... | Returns the event recurrence in accordance with the RFC
@see https://tools.ietf.org/html/rfc5545#section-3.3.10
@return string Frequency of repeated event | [
"Returns",
"the",
"event",
"recurrence",
"in",
"accordance",
"with",
"the",
"RFC"
] | e2221b52f0683c105c64fca056daa63763ea8665 | https://github.com/stuttter/wp-event-calendar/blob/e2221b52f0683c105c64fca056daa63763ea8665/wp-event-calendar/includes/common/event.php#L181-L205 |
223,170 | shopsys/doctrine-orm | lib/Doctrine/ORM/UnitOfWork.php | UnitOfWork.computeSingleEntityChangeSet | private function computeSingleEntityChangeSet($entity)
{
$state = $this->getEntityState($entity);
if ($state !== self::STATE_MANAGED && $state !== self::STATE_REMOVED) {
throw new \InvalidArgumentException("Entity has to be managed or scheduled for removal for single computation " . sel... | php | private function computeSingleEntityChangeSet($entity)
{
$state = $this->getEntityState($entity);
if ($state !== self::STATE_MANAGED && $state !== self::STATE_REMOVED) {
throw new \InvalidArgumentException("Entity has to be managed or scheduled for removal for single computation " . sel... | [
"private",
"function",
"computeSingleEntityChangeSet",
"(",
"$",
"entity",
")",
"{",
"$",
"state",
"=",
"$",
"this",
"->",
"getEntityState",
"(",
"$",
"entity",
")",
";",
"if",
"(",
"$",
"state",
"!==",
"self",
"::",
"STATE_MANAGED",
"&&",
"$",
"state",
... | Only flushes the given entity according to a ruleset that keeps the UoW consistent.
1. All entities scheduled for insertion, (orphan) removals and changes in collections are processed as well!
2. Read Only entities are skipped.
3. Proxies are skipped.
4. Only if entity is properly managed.
@param object $entity
@ret... | [
"Only",
"flushes",
"the",
"given",
"entity",
"according",
"to",
"a",
"ruleset",
"that",
"keeps",
"the",
"UoW",
"consistent",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/UnitOfWork.php#L470-L502 |
223,171 | shopsys/doctrine-orm | lib/Doctrine/ORM/UnitOfWork.php | UnitOfWork.getCommitOrderCalculator | public function getCommitOrderCalculator()
{
if ($this->commitOrderCalculator === null) {
$this->commitOrderCalculator = new Internal\CommitOrderCalculator;
}
return $this->commitOrderCalculator;
} | php | public function getCommitOrderCalculator()
{
if ($this->commitOrderCalculator === null) {
$this->commitOrderCalculator = new Internal\CommitOrderCalculator;
}
return $this->commitOrderCalculator;
} | [
"public",
"function",
"getCommitOrderCalculator",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"commitOrderCalculator",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"commitOrderCalculator",
"=",
"new",
"Internal",
"\\",
"CommitOrderCalculator",
";",
"}",
"return"... | Gets the CommitOrderCalculator used by the UnitOfWork to order commits.
@return \Doctrine\ORM\Internal\CommitOrderCalculator | [
"Gets",
"the",
"CommitOrderCalculator",
"used",
"by",
"the",
"UnitOfWork",
"to",
"order",
"commits",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/UnitOfWork.php#L2359-L2366 |
223,172 | shopsys/doctrine-orm | lib/Doctrine/ORM/UnitOfWork.php | UnitOfWork.getOriginalEntityData | public function getOriginalEntityData($entity)
{
$oid = spl_object_hash($entity);
if (isset($this->originalEntityData[$oid])) {
return $this->originalEntityData[$oid];
}
return array();
} | php | public function getOriginalEntityData($entity)
{
$oid = spl_object_hash($entity);
if (isset($this->originalEntityData[$oid])) {
return $this->originalEntityData[$oid];
}
return array();
} | [
"public",
"function",
"getOriginalEntityData",
"(",
"$",
"entity",
")",
"{",
"$",
"oid",
"=",
"spl_object_hash",
"(",
"$",
"entity",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"originalEntityData",
"[",
"$",
"oid",
"]",
")",
")",
"{",
"retur... | Gets the original data of an entity. The original data is the data that was
present at the time the entity was reconstituted from the database.
@param object $entity
@return array | [
"Gets",
"the",
"original",
"data",
"of",
"an",
"entity",
".",
"The",
"original",
"data",
"is",
"the",
"data",
"that",
"was",
"present",
"at",
"the",
"time",
"the",
"entity",
"was",
"reconstituted",
"from",
"the",
"database",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/UnitOfWork.php#L2867-L2876 |
223,173 | shopsys/doctrine-orm | lib/Doctrine/ORM/UnitOfWork.php | UnitOfWork.size | public function size()
{
$countArray = array_map(function ($item) { return count($item); }, $this->identityMap);
return array_sum($countArray);
} | php | public function size()
{
$countArray = array_map(function ($item) { return count($item); }, $this->identityMap);
return array_sum($countArray);
} | [
"public",
"function",
"size",
"(",
")",
"{",
"$",
"countArray",
"=",
"array_map",
"(",
"function",
"(",
"$",
"item",
")",
"{",
"return",
"count",
"(",
"$",
"item",
")",
";",
"}",
",",
"$",
"this",
"->",
"identityMap",
")",
";",
"return",
"array_sum",... | Calculates the size of the UnitOfWork. The size of the UnitOfWork is the
number of entities in the identity map.
@return integer | [
"Calculates",
"the",
"size",
"of",
"the",
"UnitOfWork",
".",
"The",
"size",
"of",
"the",
"UnitOfWork",
"is",
"the",
"number",
"of",
"entities",
"in",
"the",
"identity",
"map",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/UnitOfWork.php#L3000-L3005 |
223,174 | shopsys/doctrine-orm | lib/Doctrine/ORM/UnitOfWork.php | UnitOfWork.isReadOnly | public function isReadOnly($object)
{
if ( ! is_object($object)) {
throw ORMInvalidArgumentException::readOnlyRequiresManagedEntity($object);
}
return isset($this->readOnlyObjects[spl_object_hash($object)]);
} | php | public function isReadOnly($object)
{
if ( ! is_object($object)) {
throw ORMInvalidArgumentException::readOnlyRequiresManagedEntity($object);
}
return isset($this->readOnlyObjects[spl_object_hash($object)]);
} | [
"public",
"function",
"isReadOnly",
"(",
"$",
"object",
")",
"{",
"if",
"(",
"!",
"is_object",
"(",
"$",
"object",
")",
")",
"{",
"throw",
"ORMInvalidArgumentException",
"::",
"readOnlyRequiresManagedEntity",
"(",
"$",
"object",
")",
";",
"}",
"return",
"iss... | Is this entity read only?
@param object $object
@return bool
@throws ORMInvalidArgumentException | [
"Is",
"this",
"entity",
"read",
"only?"
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/UnitOfWork.php#L3265-L3272 |
223,175 | shopsys/doctrine-orm | lib/Doctrine/ORM/UnitOfWork.php | UnitOfWork.afterTransactionComplete | private function afterTransactionComplete()
{
if ( ! $this->hasCache) {
return;
}
foreach ($this->persisters as $persister) {
if ($persister instanceof CachedPersister) {
$persister->afterTransactionComplete();
}
}
foreach... | php | private function afterTransactionComplete()
{
if ( ! $this->hasCache) {
return;
}
foreach ($this->persisters as $persister) {
if ($persister instanceof CachedPersister) {
$persister->afterTransactionComplete();
}
}
foreach... | [
"private",
"function",
"afterTransactionComplete",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"hasCache",
")",
"{",
"return",
";",
"}",
"foreach",
"(",
"$",
"this",
"->",
"persisters",
"as",
"$",
"persister",
")",
"{",
"if",
"(",
"$",
"persister... | Perform whatever processing is encapsulated here after completion of the transaction. | [
"Perform",
"whatever",
"processing",
"is",
"encapsulated",
"here",
"after",
"completion",
"of",
"the",
"transaction",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/UnitOfWork.php#L3277-L3294 |
223,176 | shopsys/doctrine-orm | lib/Doctrine/ORM/UnitOfWork.php | UnitOfWork.afterTransactionRolledBack | private function afterTransactionRolledBack()
{
if ( ! $this->hasCache) {
return;
}
foreach ($this->persisters as $persister) {
if ($persister instanceof CachedPersister) {
$persister->afterTransactionRolledBack();
}
}
for... | php | private function afterTransactionRolledBack()
{
if ( ! $this->hasCache) {
return;
}
foreach ($this->persisters as $persister) {
if ($persister instanceof CachedPersister) {
$persister->afterTransactionRolledBack();
}
}
for... | [
"private",
"function",
"afterTransactionRolledBack",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"hasCache",
")",
"{",
"return",
";",
"}",
"foreach",
"(",
"$",
"this",
"->",
"persisters",
"as",
"$",
"persister",
")",
"{",
"if",
"(",
"$",
"persist... | Perform whatever processing is encapsulated here after completion of the rolled-back. | [
"Perform",
"whatever",
"processing",
"is",
"encapsulated",
"here",
"after",
"completion",
"of",
"the",
"rolled",
"-",
"back",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/UnitOfWork.php#L3299-L3316 |
223,177 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php | DatabaseDriver.buildIndexes | private function buildIndexes(ClassMetadataInfo $metadata)
{
$tableName = $metadata->table['name'];
$indexes = $this->tables[$tableName]->getIndexes();
foreach($indexes as $index){
if ($index->isPrimary()) {
continue;
}
$indexName ... | php | private function buildIndexes(ClassMetadataInfo $metadata)
{
$tableName = $metadata->table['name'];
$indexes = $this->tables[$tableName]->getIndexes();
foreach($indexes as $index){
if ($index->isPrimary()) {
continue;
}
$indexName ... | [
"private",
"function",
"buildIndexes",
"(",
"ClassMetadataInfo",
"$",
"metadata",
")",
"{",
"$",
"tableName",
"=",
"$",
"metadata",
"->",
"table",
"[",
"'name'",
"]",
";",
"$",
"indexes",
"=",
"$",
"this",
"->",
"tables",
"[",
"$",
"tableName",
"]",
"->"... | Build indexes from a class metadata.
@param \Doctrine\ORM\Mapping\ClassMetadataInfo $metadata | [
"Build",
"indexes",
"from",
"a",
"class",
"metadata",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php#L317-L335 |
223,178 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php | DatabaseDriver.buildFieldMapping | private function buildFieldMapping($tableName, Column $column)
{
$fieldMapping = array(
'fieldName' => $this->getFieldNameForColumn($tableName, $column->getName(), false),
'columnName' => $column->getName(),
'type' => $column->getType()->getName(),
'nul... | php | private function buildFieldMapping($tableName, Column $column)
{
$fieldMapping = array(
'fieldName' => $this->getFieldNameForColumn($tableName, $column->getName(), false),
'columnName' => $column->getName(),
'type' => $column->getType()->getName(),
'nul... | [
"private",
"function",
"buildFieldMapping",
"(",
"$",
"tableName",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"fieldMapping",
"=",
"array",
"(",
"'fieldName'",
"=>",
"$",
"this",
"->",
"getFieldNameForColumn",
"(",
"$",
"tableName",
",",
"$",
"column",
"->... | Build field mapping from a schema column definition
@param string $tableName
@param \Doctrine\DBAL\Schema\Column $column
@return array | [
"Build",
"field",
"mapping",
"from",
"a",
"schema",
"column",
"definition"
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php#L390-L437 |
223,179 | shopsys/doctrine-orm | lib/Doctrine/ORM/Configuration.php | Configuration.getNamedQuery | public function getNamedQuery($name)
{
if ( ! isset($this->_attributes['namedQueries'][$name])) {
throw ORMException::namedQueryNotFound($name);
}
return $this->_attributes['namedQueries'][$name];
} | php | public function getNamedQuery($name)
{
if ( ! isset($this->_attributes['namedQueries'][$name])) {
throw ORMException::namedQueryNotFound($name);
}
return $this->_attributes['namedQueries'][$name];
} | [
"public",
"function",
"getNamedQuery",
"(",
"$",
"name",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"_attributes",
"[",
"'namedQueries'",
"]",
"[",
"$",
"name",
"]",
")",
")",
"{",
"throw",
"ORMException",
"::",
"namedQueryNotFound",
"(",... | Gets a previously registered named DQL query.
@param string $name The name of the query.
@return string The DQL query.
@throws ORMException | [
"Gets",
"a",
"previously",
"registered",
"named",
"DQL",
"query",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Configuration.php#L332-L339 |
223,180 | shopsys/doctrine-orm | lib/Doctrine/ORM/Configuration.php | Configuration.addNamedNativeQuery | public function addNamedNativeQuery($name, $sql, Query\ResultSetMapping $rsm)
{
$this->_attributes['namedNativeQueries'][$name] = array($sql, $rsm);
} | php | public function addNamedNativeQuery($name, $sql, Query\ResultSetMapping $rsm)
{
$this->_attributes['namedNativeQueries'][$name] = array($sql, $rsm);
} | [
"public",
"function",
"addNamedNativeQuery",
"(",
"$",
"name",
",",
"$",
"sql",
",",
"Query",
"\\",
"ResultSetMapping",
"$",
"rsm",
")",
"{",
"$",
"this",
"->",
"_attributes",
"[",
"'namedNativeQueries'",
"]",
"[",
"$",
"name",
"]",
"=",
"array",
"(",
"$... | Adds a named native query to the configuration.
@param string $name The name of the query.
@param string $sql The native SQL query string.
@param Query\ResultSetMapping $rsm The ResultSetMapping used for the results of the SQL query.
@return void | [
"Adds",
"a",
"named",
"native",
"query",
"to",
"the",
"configuration",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Configuration.php#L350-L353 |
223,181 | shopsys/doctrine-orm | lib/Doctrine/ORM/Configuration.php | Configuration.getNamedNativeQuery | public function getNamedNativeQuery($name)
{
if ( ! isset($this->_attributes['namedNativeQueries'][$name])) {
throw ORMException::namedNativeQueryNotFound($name);
}
return $this->_attributes['namedNativeQueries'][$name];
} | php | public function getNamedNativeQuery($name)
{
if ( ! isset($this->_attributes['namedNativeQueries'][$name])) {
throw ORMException::namedNativeQueryNotFound($name);
}
return $this->_attributes['namedNativeQueries'][$name];
} | [
"public",
"function",
"getNamedNativeQuery",
"(",
"$",
"name",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"_attributes",
"[",
"'namedNativeQueries'",
"]",
"[",
"$",
"name",
"]",
")",
")",
"{",
"throw",
"ORMException",
"::",
"namedNativeQuer... | Gets the components of a previously registered named native query.
@param string $name The name of the query.
@return array A tuple with the first element being the SQL string and the second
element being the ResultSetMapping.
@throws ORMException | [
"Gets",
"the",
"components",
"of",
"a",
"previously",
"registered",
"named",
"native",
"query",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Configuration.php#L365-L372 |
223,182 | shopsys/doctrine-orm | lib/Doctrine/ORM/Configuration.php | Configuration.getCustomStringFunction | public function getCustomStringFunction($name)
{
$name = strtolower($name);
return isset($this->_attributes['customStringFunctions'][$name])
? $this->_attributes['customStringFunctions'][$name]
: null;
} | php | public function getCustomStringFunction($name)
{
$name = strtolower($name);
return isset($this->_attributes['customStringFunctions'][$name])
? $this->_attributes['customStringFunctions'][$name]
: null;
} | [
"public",
"function",
"getCustomStringFunction",
"(",
"$",
"name",
")",
"{",
"$",
"name",
"=",
"strtolower",
"(",
"$",
"name",
")",
";",
"return",
"isset",
"(",
"$",
"this",
"->",
"_attributes",
"[",
"'customStringFunctions'",
"]",
"[",
"$",
"name",
"]",
... | Gets the implementation class name of a registered custom string DQL function.
@param string $name
@return string|null | [
"Gets",
"the",
"implementation",
"class",
"name",
"of",
"a",
"registered",
"custom",
"string",
"DQL",
"function",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Configuration.php#L440-L447 |
223,183 | shopsys/doctrine-orm | lib/Doctrine/ORM/Configuration.php | Configuration.getCustomNumericFunction | public function getCustomNumericFunction($name)
{
$name = strtolower($name);
return isset($this->_attributes['customNumericFunctions'][$name])
? $this->_attributes['customNumericFunctions'][$name]
: null;
} | php | public function getCustomNumericFunction($name)
{
$name = strtolower($name);
return isset($this->_attributes['customNumericFunctions'][$name])
? $this->_attributes['customNumericFunctions'][$name]
: null;
} | [
"public",
"function",
"getCustomNumericFunction",
"(",
"$",
"name",
")",
"{",
"$",
"name",
"=",
"strtolower",
"(",
"$",
"name",
")",
";",
"return",
"isset",
"(",
"$",
"this",
"->",
"_attributes",
"[",
"'customNumericFunctions'",
"]",
"[",
"$",
"name",
"]",... | Gets the implementation class name of a registered custom numeric DQL function.
@param string $name
@return string|null | [
"Gets",
"the",
"implementation",
"class",
"name",
"of",
"a",
"registered",
"custom",
"numeric",
"DQL",
"function",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Configuration.php#L498-L505 |
223,184 | shopsys/doctrine-orm | lib/Doctrine/ORM/Configuration.php | Configuration.getCustomHydrationMode | public function getCustomHydrationMode($modeName)
{
return isset($this->_attributes['customHydrationModes'][$modeName])
? $this->_attributes['customHydrationModes'][$modeName]
: null;
} | php | public function getCustomHydrationMode($modeName)
{
return isset($this->_attributes['customHydrationModes'][$modeName])
? $this->_attributes['customHydrationModes'][$modeName]
: null;
} | [
"public",
"function",
"getCustomHydrationMode",
"(",
"$",
"modeName",
")",
"{",
"return",
"isset",
"(",
"$",
"this",
"->",
"_attributes",
"[",
"'customHydrationModes'",
"]",
"[",
"$",
"modeName",
"]",
")",
"?",
"$",
"this",
"->",
"_attributes",
"[",
"'custom... | Gets the hydrator class for the given hydration mode name.
@param string $modeName The hydration mode name.
@return string|null The hydrator class name. | [
"Gets",
"the",
"hydrator",
"class",
"for",
"the",
"given",
"hydration",
"mode",
"name",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Configuration.php#L607-L612 |
223,185 | shopsys/doctrine-orm | lib/Doctrine/ORM/Configuration.php | Configuration.getDefaultQueryHint | public function getDefaultQueryHint($name)
{
return isset($this->_attributes['defaultQueryHints'][$name])
? $this->_attributes['defaultQueryHints'][$name]
: false;
} | php | public function getDefaultQueryHint($name)
{
return isset($this->_attributes['defaultQueryHints'][$name])
? $this->_attributes['defaultQueryHints'][$name]
: false;
} | [
"public",
"function",
"getDefaultQueryHint",
"(",
"$",
"name",
")",
"{",
"return",
"isset",
"(",
"$",
"this",
"->",
"_attributes",
"[",
"'defaultQueryHints'",
"]",
"[",
"$",
"name",
"]",
")",
"?",
"$",
"this",
"->",
"_attributes",
"[",
"'defaultQueryHints'",... | Gets the value of a default query hint. If the hint name is not recognized, FALSE is returned.
@since 2.5
@param string $name The name of the hint.
@return mixed The value of the hint or FALSE, if the hint name is not recognized. | [
"Gets",
"the",
"value",
"of",
"a",
"default",
"query",
"hint",
".",
"If",
"the",
"hint",
"name",
"is",
"not",
"recognized",
"FALSE",
"is",
"returned",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Configuration.php#L908-L913 |
223,186 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/Builder/EmbeddedBuilder.php | EmbeddedBuilder.build | public function build()
{
$cm = $this->builder->getClassMetadata();
$cm->mapEmbedded($this->mapping);
return $this->builder;
} | php | public function build()
{
$cm = $this->builder->getClassMetadata();
$cm->mapEmbedded($this->mapping);
return $this->builder;
} | [
"public",
"function",
"build",
"(",
")",
"{",
"$",
"cm",
"=",
"$",
"this",
"->",
"builder",
"->",
"getClassMetadata",
"(",
")",
";",
"$",
"cm",
"->",
"mapEmbedded",
"(",
"$",
"this",
"->",
"mapping",
")",
";",
"return",
"$",
"this",
"->",
"builder",
... | Finalizes this embeddable and attach it to the ClassMetadata.
Without this call an EmbeddedBuilder has no effect on the ClassMetadata.
@return ClassMetadataBuilder | [
"Finalizes",
"this",
"embeddable",
"and",
"attach",
"it",
"to",
"the",
"ClassMetadata",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/Builder/EmbeddedBuilder.php#L72-L79 |
223,187 | shopsys/doctrine-orm | lib/Doctrine/ORM/Query/ResultSetMapping.php | ResultSetMapping.addScalarResult | public function addScalarResult($columnName, $alias, $type = 'string')
{
$this->scalarMappings[$columnName] = $alias;
$this->typeMappings[$columnName] = $type;
if ( ! $this->isMixed && $this->fieldMappings) {
$this->isMixed = true;
}
return $this;
} | php | public function addScalarResult($columnName, $alias, $type = 'string')
{
$this->scalarMappings[$columnName] = $alias;
$this->typeMappings[$columnName] = $type;
if ( ! $this->isMixed && $this->fieldMappings) {
$this->isMixed = true;
}
return $this;
} | [
"public",
"function",
"addScalarResult",
"(",
"$",
"columnName",
",",
"$",
"alias",
",",
"$",
"type",
"=",
"'string'",
")",
"{",
"$",
"this",
"->",
"scalarMappings",
"[",
"$",
"columnName",
"]",
"=",
"$",
"alias",
";",
"$",
"this",
"->",
"typeMappings",
... | Adds a scalar result mapping.
@param string $columnName The name of the column in the SQL result set.
@param string $alias The result alias with which the scalar result should be placed in the result structure.
@param string $type The column type
@return ResultSetMapping This ResultSetMapping instance.
@t... | [
"Adds",
"a",
"scalar",
"result",
"mapping",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Query/ResultSetMapping.php#L377-L387 |
223,188 | mmerian/phpcrawl | libs/ProcessCommunication/PHPCrawlerStatusHandler.class.php | PHPCrawlerStatusHandler.updateCrawlerStatus | public function updateCrawlerStatus($PageInfo, $abort_reason = null, $first_content_url = null, $last_request_time = null)
{
PHPCrawlerBenchmark::start("updating_crawler_status");
// Set semaphore/lock if
if ($this->lock_status_updates == true)
{
$sem_key = sem_get($this->crawler_uni... | php | public function updateCrawlerStatus($PageInfo, $abort_reason = null, $first_content_url = null, $last_request_time = null)
{
PHPCrawlerBenchmark::start("updating_crawler_status");
// Set semaphore/lock if
if ($this->lock_status_updates == true)
{
$sem_key = sem_get($this->crawler_uni... | [
"public",
"function",
"updateCrawlerStatus",
"(",
"$",
"PageInfo",
",",
"$",
"abort_reason",
"=",
"null",
",",
"$",
"first_content_url",
"=",
"null",
",",
"$",
"last_request_time",
"=",
"null",
")",
"{",
"PHPCrawlerBenchmark",
"::",
"start",
"(",
"\"updating_cra... | Updates the status of the crawler
@param PHPCrawlerDocumentInfo $PageInfo The PHPCrawlerDocumentInfo-object of the last received document
or NULL if no document was received.
@param int $abort_reason One of the PHPCrawlerAbortReasons::ABORTREASON-constants if the crawling-process
shoul... | [
"Updates",
"the",
"status",
"of",
"the",
"crawler"
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/ProcessCommunication/PHPCrawlerStatusHandler.class.php#L79-L143 |
223,189 | mespronos/mespronos | src/Entity/Day.php | Day.postSave | public function postSave(EntityStorageInterface $storage, $update = TRUE) {
parent::postSave($storage, $update);
if (\Drupal::moduleHandler()->moduleExists('pathauto')) {
\Drupal::service('pathauto.generator')->updateEntityAlias($this, 'update');
$trans = \Drupal::service('transliteration');
... | php | public function postSave(EntityStorageInterface $storage, $update = TRUE) {
parent::postSave($storage, $update);
if (\Drupal::moduleHandler()->moduleExists('pathauto')) {
\Drupal::service('pathauto.generator')->updateEntityAlias($this, 'update');
$trans = \Drupal::service('transliteration');
... | [
"public",
"function",
"postSave",
"(",
"EntityStorageInterface",
"$",
"storage",
",",
"$",
"update",
"=",
"TRUE",
")",
"{",
"parent",
"::",
"postSave",
"(",
"$",
"storage",
",",
"$",
"update",
")",
";",
"if",
"(",
"\\",
"Drupal",
"::",
"moduleHandler",
"... | Create pathauto aliases for the day
@param \Drupal\Core\Entity\EntityStorageInterface $storage
@param bool $update | [
"Create",
"pathauto",
"aliases",
"for",
"the",
"day"
] | 73757663581ed9040944768073d1d9abc761196b | https://github.com/mespronos/mespronos/blob/73757663581ed9040944768073d1d9abc761196b/src/Entity/Day.php#L72-L100 |
223,190 | shopsys/doctrine-orm | lib/Doctrine/ORM/Query/SqlWalker.php | SqlWalker.getSQLColumnAlias | public function getSQLColumnAlias($columnName)
{
return $this->quoteStrategy->getColumnAlias($columnName, $this->aliasCounter++, $this->platform);
} | php | public function getSQLColumnAlias($columnName)
{
return $this->quoteStrategy->getColumnAlias($columnName, $this->aliasCounter++, $this->platform);
} | [
"public",
"function",
"getSQLColumnAlias",
"(",
"$",
"columnName",
")",
"{",
"return",
"$",
"this",
"->",
"quoteStrategy",
"->",
"getColumnAlias",
"(",
"$",
"columnName",
",",
"$",
"this",
"->",
"aliasCounter",
"++",
",",
"$",
"this",
"->",
"platform",
")",
... | Gets an SQL column alias for a column name.
@param string $columnName
@return string | [
"Gets",
"an",
"SQL",
"column",
"alias",
"for",
"a",
"column",
"name",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Query/SqlWalker.php#L327-L330 |
223,191 | shopsys/doctrine-orm | lib/Doctrine/ORM/Query/SqlWalker.php | SqlWalker.walkRangeVariableDeclaration | public function walkRangeVariableDeclaration($rangeVariableDeclaration)
{
$class = $this->em->getClassMetadata($rangeVariableDeclaration->abstractSchemaName);
$dqlAlias = $rangeVariableDeclaration->aliasIdentificationVariable;
if ($rangeVariableDeclaration->isRoot) {
$this->r... | php | public function walkRangeVariableDeclaration($rangeVariableDeclaration)
{
$class = $this->em->getClassMetadata($rangeVariableDeclaration->abstractSchemaName);
$dqlAlias = $rangeVariableDeclaration->aliasIdentificationVariable;
if ($rangeVariableDeclaration->isRoot) {
$this->r... | [
"public",
"function",
"walkRangeVariableDeclaration",
"(",
"$",
"rangeVariableDeclaration",
")",
"{",
"$",
"class",
"=",
"$",
"this",
"->",
"em",
"->",
"getClassMetadata",
"(",
"$",
"rangeVariableDeclaration",
"->",
"abstractSchemaName",
")",
";",
"$",
"dqlAlias",
... | Walks down a RangeVariableDeclaration AST node, thereby generating the appropriate SQL.
@param AST\RangeVariableDeclaration $rangeVariableDeclaration
@return string | [
"Walks",
"down",
"a",
"RangeVariableDeclaration",
"AST",
"node",
"thereby",
"generating",
"the",
"appropriate",
"SQL",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Query/SqlWalker.php#L872-L892 |
223,192 | shopsys/doctrine-orm | lib/Doctrine/ORM/Query/SqlWalker.php | SqlWalker.walkCaseExpression | public function walkCaseExpression($expression)
{
switch (true) {
case ($expression instanceof AST\CoalesceExpression):
return $this->walkCoalesceExpression($expression);
case ($expression instanceof AST\NullIfExpression):
return $this->walkNullIfExpr... | php | public function walkCaseExpression($expression)
{
switch (true) {
case ($expression instanceof AST\CoalesceExpression):
return $this->walkCoalesceExpression($expression);
case ($expression instanceof AST\NullIfExpression):
return $this->walkNullIfExpr... | [
"public",
"function",
"walkCaseExpression",
"(",
"$",
"expression",
")",
"{",
"switch",
"(",
"true",
")",
"{",
"case",
"(",
"$",
"expression",
"instanceof",
"AST",
"\\",
"CoalesceExpression",
")",
":",
"return",
"$",
"this",
"->",
"walkCoalesceExpression",
"("... | Walks down a CaseExpression AST node and generates the corresponding SQL.
@param AST\CoalesceExpression|AST\NullIfExpression|AST\GeneralCaseExpression|AST\SimpleCaseExpression $expression
@return string The SQL. | [
"Walks",
"down",
"a",
"CaseExpression",
"AST",
"node",
"and",
"generates",
"the",
"corresponding",
"SQL",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Query/SqlWalker.php#L1169-L1187 |
223,193 | shopsys/doctrine-orm | lib/Doctrine/ORM/Tools/AttachEntityListenersListener.php | AttachEntityListenersListener.addEntityListener | public function addEntityListener($entityClass, $listenerClass, $eventName, $listenerCallback = null)
{
$this->entityListeners[ltrim($entityClass, '\\')][] = array(
'event' => $eventName,
'class' => $listenerClass,
'method' => $listenerCallback ?: $eventName
);
... | php | public function addEntityListener($entityClass, $listenerClass, $eventName, $listenerCallback = null)
{
$this->entityListeners[ltrim($entityClass, '\\')][] = array(
'event' => $eventName,
'class' => $listenerClass,
'method' => $listenerCallback ?: $eventName
);
... | [
"public",
"function",
"addEntityListener",
"(",
"$",
"entityClass",
",",
"$",
"listenerClass",
",",
"$",
"eventName",
",",
"$",
"listenerCallback",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"entityListeners",
"[",
"ltrim",
"(",
"$",
"entityClass",
",",
"'\\\... | Adds a entity listener for a specific entity.
@param string $entityClass The entity to attach the listener.
@param string $listenerClass The listener class.
@param string $eventName The entity lifecycle event.
@param string $listenerCallback|null The listener callback method or NULL to us... | [
"Adds",
"a",
"entity",
"listener",
"for",
"a",
"specific",
"entity",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Tools/AttachEntityListenersListener.php#L48-L55 |
223,194 | shopsys/doctrine-orm | lib/Doctrine/ORM/Persisters/Entity/JoinedSubclassPersister.php | JoinedSubclassPersister.getVersionedClassMetadata | private function getVersionedClassMetadata()
{
if (isset($this->class->fieldMappings[$this->class->versionField]['inherited'])) {
$definingClassName = $this->class->fieldMappings[$this->class->versionField]['inherited'];
return $this->em->getClassMetadata($definingClassName);
... | php | private function getVersionedClassMetadata()
{
if (isset($this->class->fieldMappings[$this->class->versionField]['inherited'])) {
$definingClassName = $this->class->fieldMappings[$this->class->versionField]['inherited'];
return $this->em->getClassMetadata($definingClassName);
... | [
"private",
"function",
"getVersionedClassMetadata",
"(",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"class",
"->",
"fieldMappings",
"[",
"$",
"this",
"->",
"class",
"->",
"versionField",
"]",
"[",
"'inherited'",
"]",
")",
")",
"{",
"$",
"defin... | This function finds the ClassMetadata instance in an inheritance hierarchy
that is responsible for enabling versioning.
@return \Doctrine\ORM\Mapping\ClassMetadata | [
"This",
"function",
"finds",
"the",
"ClassMetadata",
"instance",
"in",
"an",
"inheritance",
"hierarchy",
"that",
"is",
"responsible",
"for",
"enabling",
"versioning",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Persisters/Entity/JoinedSubclassPersister.php#L76-L85 |
223,195 | shopsys/doctrine-orm | lib/Doctrine/ORM/Persisters/Entity/JoinedSubclassPersister.php | JoinedSubclassPersister.getOwningTable | public function getOwningTable($fieldName)
{
if (isset($this->owningTableMap[$fieldName])) {
return $this->owningTableMap[$fieldName];
}
switch (true) {
case isset($this->class->associationMappings[$fieldName]['inherited']):
$cm = $this->em->getClassM... | php | public function getOwningTable($fieldName)
{
if (isset($this->owningTableMap[$fieldName])) {
return $this->owningTableMap[$fieldName];
}
switch (true) {
case isset($this->class->associationMappings[$fieldName]['inherited']):
$cm = $this->em->getClassM... | [
"public",
"function",
"getOwningTable",
"(",
"$",
"fieldName",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"owningTableMap",
"[",
"$",
"fieldName",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"owningTableMap",
"[",
"$",
"fieldName",
"]",
... | Gets the name of the table that owns the column the given field is mapped to.
@param string $fieldName
@return string
@override | [
"Gets",
"the",
"name",
"of",
"the",
"table",
"that",
"owns",
"the",
"column",
"the",
"given",
"field",
"is",
"mapped",
"to",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Persisters/Entity/JoinedSubclassPersister.php#L96-L123 |
223,196 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php | ClassMetadataFactory.addDefaultDiscriminatorMap | private function addDefaultDiscriminatorMap(ClassMetadata $class)
{
$allClasses = $this->driver->getAllClassNames();
$fqcn = $class->getName();
$map = array($this->getShortName($class->name) => $fqcn);
$duplicates = array();
foreach ($allClasses as $subClassCandidate) {
... | php | private function addDefaultDiscriminatorMap(ClassMetadata $class)
{
$allClasses = $this->driver->getAllClassNames();
$fqcn = $class->getName();
$map = array($this->getShortName($class->name) => $fqcn);
$duplicates = array();
foreach ($allClasses as $subClassCandidate) {
... | [
"private",
"function",
"addDefaultDiscriminatorMap",
"(",
"ClassMetadata",
"$",
"class",
")",
"{",
"$",
"allClasses",
"=",
"$",
"this",
"->",
"driver",
"->",
"getAllClassNames",
"(",
")",
";",
"$",
"fqcn",
"=",
"$",
"class",
"->",
"getName",
"(",
")",
";",... | Adds a default discriminator map if no one is given
If an entity is of any inheritance type and does not contain a
discriminator map, then the map is generated automatically. This process
is expensive computation wise.
The automatically generated discriminator map contains the lowercase short name of
each class as ke... | [
"Adds",
"a",
"default",
"discriminator",
"map",
"if",
"no",
"one",
"is",
"given"
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php#L355-L379 |
223,197 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php | ClassMetadataFactory.getShortName | private function getShortName($className)
{
if (strpos($className, "\\") === false) {
return strtolower($className);
}
$parts = explode("\\", $className);
return strtolower(end($parts));
} | php | private function getShortName($className)
{
if (strpos($className, "\\") === false) {
return strtolower($className);
}
$parts = explode("\\", $className);
return strtolower(end($parts));
} | [
"private",
"function",
"getShortName",
"(",
"$",
"className",
")",
"{",
"if",
"(",
"strpos",
"(",
"$",
"className",
",",
"\"\\\\\"",
")",
"===",
"false",
")",
"{",
"return",
"strtolower",
"(",
"$",
"className",
")",
";",
"}",
"$",
"parts",
"=",
"explod... | Gets the lower-case short name of a class.
@param string $className
@return string | [
"Gets",
"the",
"lower",
"-",
"case",
"short",
"name",
"of",
"a",
"class",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php#L388-L396 |
223,198 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php | ClassMetadataFactory.addNestedEmbeddedClasses | private function addNestedEmbeddedClasses(ClassMetadata $subClass, ClassMetadata $parentClass, $prefix)
{
foreach ($subClass->embeddedClasses as $property => $embeddableClass) {
if (isset($embeddableClass['inherited'])) {
continue;
}
$embeddableMetadata =... | php | private function addNestedEmbeddedClasses(ClassMetadata $subClass, ClassMetadata $parentClass, $prefix)
{
foreach ($subClass->embeddedClasses as $property => $embeddableClass) {
if (isset($embeddableClass['inherited'])) {
continue;
}
$embeddableMetadata =... | [
"private",
"function",
"addNestedEmbeddedClasses",
"(",
"ClassMetadata",
"$",
"subClass",
",",
"ClassMetadata",
"$",
"parentClass",
",",
"$",
"prefix",
")",
"{",
"foreach",
"(",
"$",
"subClass",
"->",
"embeddedClasses",
"as",
"$",
"property",
"=>",
"$",
"embedda... | Adds nested embedded classes metadata to a parent class.
@param ClassMetadata $subClass Sub embedded class metadata to add nested embedded classes metadata from.
@param ClassMetadata $parentClass Parent class to add nested embedded classes metadata to.
@param string $prefix Embedded classes' prefix to u... | [
"Adds",
"nested",
"embedded",
"classes",
"metadata",
"to",
"a",
"parent",
"class",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php#L474-L493 |
223,199 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php | ClassMetadataFactory.addInheritedIndexes | private function addInheritedIndexes(ClassMetadata $subClass, ClassMetadata $parentClass)
{
if (! $parentClass->isMappedSuperclass) {
return;
}
foreach (array('uniqueConstraints', 'indexes') as $indexType) {
if (isset($parentClass->table[$indexType])) {
... | php | private function addInheritedIndexes(ClassMetadata $subClass, ClassMetadata $parentClass)
{
if (! $parentClass->isMappedSuperclass) {
return;
}
foreach (array('uniqueConstraints', 'indexes') as $indexType) {
if (isset($parentClass->table[$indexType])) {
... | [
"private",
"function",
"addInheritedIndexes",
"(",
"ClassMetadata",
"$",
"subClass",
",",
"ClassMetadata",
"$",
"parentClass",
")",
"{",
"if",
"(",
"!",
"$",
"parentClass",
"->",
"isMappedSuperclass",
")",
"{",
"return",
";",
"}",
"foreach",
"(",
"array",
"(",... | Copy the table indices from the parent class superclass to the child class
@param ClassMetadata $subClass
@param ClassMetadata $parentClass
@return void | [
"Copy",
"the",
"table",
"indices",
"from",
"the",
"parent",
"class",
"superclass",
"to",
"the",
"child",
"class"
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php#L503-L520 |
Subsets and Splits
Yii Code Samples
Gathers all records from test, train, and validation sets that contain the word 'yii', providing a basic filtered view of the dataset relevant to Yii-related content.