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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
196,300 | DoSomething/mb-toolbox | src/MB_Toolbox_cURL.php | MB_Toolbox_cURL.curlPOSTauth | public function curlPOSTauth($curlUrl, $post)
{
// Remove authentication until POST to /api/v1/auth/login is resolved
if (!isset($this->auth)) {
$this->authenticate();
}
$results = $this->curlPOST($curlUrl, $post, true);
$this->statHat->ezCount('MB_Toolbox: MB_Toolbox_cURL: curlPOSTauth'... | php | public function curlPOSTauth($curlUrl, $post)
{
// Remove authentication until POST to /api/v1/auth/login is resolved
if (!isset($this->auth)) {
$this->authenticate();
}
$results = $this->curlPOST($curlUrl, $post, true);
$this->statHat->ezCount('MB_Toolbox: MB_Toolbox_cURL: curlPOSTauth'... | [
"public",
"function",
"curlPOSTauth",
"(",
"$",
"curlUrl",
",",
"$",
"post",
")",
"{",
"// Remove authentication until POST to /api/v1/auth/login is resolved",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"auth",
")",
")",
"{",
"$",
"this",
"->",
"authentica... | cURL POSTs with authentication
@param string $curlUrl
The URL to POST to. Include domain and path.
@param array $post
The values to POST.
@return object $result
The results returned from the cURL call. | [
"cURL",
"POSTs",
"with",
"authentication"
] | ceec5fc594bae137d1ab1f447344800343b62ac6 | https://github.com/DoSomething/mb-toolbox/blob/ceec5fc594bae137d1ab1f447344800343b62ac6/src/MB_Toolbox_cURL.php#L272-L285 |
196,301 | DoSomething/mb-toolbox | src/MB_Toolbox_cURL.php | MB_Toolbox_cURL.curlDELETEauth | public function curlDELETEauth($curlUrl)
{
// Remove authentication until POST to /api/v1/auth/login is resolved
if (!isset($this->auth)) {
$this->authenticate();
}
$results = $this->curlDELETE($curlUrl, true);
$this->statHat->ezCount('MB_Toolbox: MB_Toolbox_cURL: curlDELETEauth', 1);
... | php | public function curlDELETEauth($curlUrl)
{
// Remove authentication until POST to /api/v1/auth/login is resolved
if (!isset($this->auth)) {
$this->authenticate();
}
$results = $this->curlDELETE($curlUrl, true);
$this->statHat->ezCount('MB_Toolbox: MB_Toolbox_cURL: curlDELETEauth', 1);
... | [
"public",
"function",
"curlDELETEauth",
"(",
"$",
"curlUrl",
")",
"{",
"// Remove authentication until POST to /api/v1/auth/login is resolved",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"auth",
")",
")",
"{",
"$",
"this",
"->",
"authenticate",
"(",
")",
"... | cURL DELETE with authentication
@param string $curlUrl
The URL to DELETE to. Include domain and path.
@return object $result
The results returned from the cURL call. | [
"cURL",
"DELETE",
"with",
"authentication"
] | ceec5fc594bae137d1ab1f447344800343b62ac6 | https://github.com/DoSomething/mb-toolbox/blob/ceec5fc594bae137d1ab1f447344800343b62ac6/src/MB_Toolbox_cURL.php#L330-L343 |
196,302 | DoSomething/mb-toolbox | src/MB_Toolbox_cURL.php | MB_Toolbox_cURL.authenticate | private function authenticate()
{
$dsDrupalAPIConfig = $this->mbConfig->getProperty('ds_drupal_api_config');
if (!empty($dsDrupalAPIConfig['username']) && !empty($dsDrupalAPIConfig['password'])) {
$post = [
'username' => $dsDrupalAPIConfig['username'],
'password' => $dsDrupalAPIConfig[... | php | private function authenticate()
{
$dsDrupalAPIConfig = $this->mbConfig->getProperty('ds_drupal_api_config');
if (!empty($dsDrupalAPIConfig['username']) && !empty($dsDrupalAPIConfig['password'])) {
$post = [
'username' => $dsDrupalAPIConfig['username'],
'password' => $dsDrupalAPIConfig[... | [
"private",
"function",
"authenticate",
"(",
")",
"{",
"$",
"dsDrupalAPIConfig",
"=",
"$",
"this",
"->",
"mbConfig",
"->",
"getProperty",
"(",
"'ds_drupal_api_config'",
")",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"dsDrupalAPIConfig",
"[",
"'username'",
"]",
... | Authenticate for Drupal API access | [
"Authenticate",
"for",
"Drupal",
"API",
"access"
] | ceec5fc594bae137d1ab1f447344800343b62ac6 | https://github.com/DoSomething/mb-toolbox/blob/ceec5fc594bae137d1ab1f447344800343b62ac6/src/MB_Toolbox_cURL.php#L348-L378 |
196,303 | DoSomething/mb-toolbox | src/MB_Toolbox_cURL.php | MB_Toolbox_cURL.buildcURL | public function buildcURL($settings)
{
if (isset($settings['host'])) {
$curlUrl = $settings['host'];
$port = $settings['port'];
if ($port > 0 && is_numeric($port)) {
$curlUrl .= ':' . (int) $port;
}
$this->statHat->ezCount('MB_Toolbox: MB_Toolbox_cURL: buildcURL', 1);
... | php | public function buildcURL($settings)
{
if (isset($settings['host'])) {
$curlUrl = $settings['host'];
$port = $settings['port'];
if ($port > 0 && is_numeric($port)) {
$curlUrl .= ':' . (int) $port;
}
$this->statHat->ezCount('MB_Toolbox: MB_Toolbox_cURL: buildcURL', 1);
... | [
"public",
"function",
"buildcURL",
"(",
"$",
"settings",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"settings",
"[",
"'host'",
"]",
")",
")",
"{",
"$",
"curlUrl",
"=",
"$",
"settings",
"[",
"'host'",
"]",
";",
"$",
"port",
"=",
"$",
"settings",
"[",
... | buildURL - Common construction utility for URLs of API paths.
@todo: Move to MB_Toolbox_cURL class.
@param array $settings "host" and "port" setting
@return null
@throws Exception | [
"buildURL",
"-",
"Common",
"construction",
"utility",
"for",
"URLs",
"of",
"API",
"paths",
"."
] | ceec5fc594bae137d1ab1f447344800343b62ac6 | https://github.com/DoSomething/mb-toolbox/blob/ceec5fc594bae137d1ab1f447344800343b62ac6/src/MB_Toolbox_cURL.php#L390-L404 |
196,304 | DoSomething/mb-toolbox | src/MB_Toolbox_cURL.php | MB_Toolbox_cURL.isNorthstar | private function isNorthstar($northstarConfig, $curlUrl)
{
// Confirm each of the required config settings are available
if (empty($northstarConfig['host'])) {
$this->statHat->ezCount('MB_Toolbox: MB_Toolbox_cURL: isNorthstar false', 1);
return false;
}
if (empty($northstarConfig['id'])) ... | php | private function isNorthstar($northstarConfig, $curlUrl)
{
// Confirm each of the required config settings are available
if (empty($northstarConfig['host'])) {
$this->statHat->ezCount('MB_Toolbox: MB_Toolbox_cURL: isNorthstar false', 1);
return false;
}
if (empty($northstarConfig['id'])) ... | [
"private",
"function",
"isNorthstar",
"(",
"$",
"northstarConfig",
",",
"$",
"curlUrl",
")",
"{",
"// Confirm each of the required config settings are available",
"if",
"(",
"empty",
"(",
"$",
"northstarConfig",
"[",
"'host'",
"]",
")",
")",
"{",
"$",
"this",
"->"... | Test if the Northstar configuration settings are valid and the cURL is for Northstar.
@param array $northstarConfig
Configuration settings for connecting to Northstar API
@param string $curlUrl
A cURL path.
@return boolean | [
"Test",
"if",
"the",
"Northstar",
"configuration",
"settings",
"are",
"valid",
"and",
"the",
"cURL",
"is",
"for",
"Northstar",
"."
] | ceec5fc594bae137d1ab1f447344800343b62ac6 | https://github.com/DoSomething/mb-toolbox/blob/ceec5fc594bae137d1ab1f447344800343b62ac6/src/MB_Toolbox_cURL.php#L416-L441 |
196,305 | ScaraMVC/Framework | src/Scara/Database/Migration.php | Migration.create | public function create($table, Closure $closure)
{
$blueprint = $this->createBlueprint($table, $closure);
$blueprint->create();
} | php | public function create($table, Closure $closure)
{
$blueprint = $this->createBlueprint($table, $closure);
$blueprint->create();
} | [
"public",
"function",
"create",
"(",
"$",
"table",
",",
"Closure",
"$",
"closure",
")",
"{",
"$",
"blueprint",
"=",
"$",
"this",
"->",
"createBlueprint",
"(",
"$",
"table",
",",
"$",
"closure",
")",
";",
"$",
"blueprint",
"->",
"create",
"(",
")",
";... | Creates table from migration.
@param string $table
@param \Closure $closure
@return void | [
"Creates",
"table",
"from",
"migration",
"."
] | 199b08b45fadf5dae14ac4732af03b36e15bbef2 | https://github.com/ScaraMVC/Framework/blob/199b08b45fadf5dae14ac4732af03b36e15bbef2/src/Scara/Database/Migration.php#L20-L24 |
196,306 | ScaraMVC/Framework | src/Scara/Database/Migration.php | Migration.update | public function update($table, Closure $closure)
{
$blueprint = $this->createBlueprint($table, $closure);
$blueprint->update();
} | php | public function update($table, Closure $closure)
{
$blueprint = $this->createBlueprint($table, $closure);
$blueprint->update();
} | [
"public",
"function",
"update",
"(",
"$",
"table",
",",
"Closure",
"$",
"closure",
")",
"{",
"$",
"blueprint",
"=",
"$",
"this",
"->",
"createBlueprint",
"(",
"$",
"table",
",",
"$",
"closure",
")",
";",
"$",
"blueprint",
"->",
"update",
"(",
")",
";... | updates table from migration.
@param string $table
@param \Closure $closure
@return void | [
"updates",
"table",
"from",
"migration",
"."
] | 199b08b45fadf5dae14ac4732af03b36e15bbef2 | https://github.com/ScaraMVC/Framework/blob/199b08b45fadf5dae14ac4732af03b36e15bbef2/src/Scara/Database/Migration.php#L34-L38 |
196,307 | ARCANESOFT/Auth | src/Seeds/Foundation/UserTableSeeder.php | UserTableSeeder.seedAdminUser | private function seedAdminUser()
{
tap(new User($this->getAdminUserAttributes()), function (User $admin) {
$admin->save();
/** @var \Arcanesoft\Auth\Models\Role $adminRole */
$adminRole = Role::admin()->first();
$adminRole->attachUser($admin);
});
... | php | private function seedAdminUser()
{
tap(new User($this->getAdminUserAttributes()), function (User $admin) {
$admin->save();
/** @var \Arcanesoft\Auth\Models\Role $adminRole */
$adminRole = Role::admin()->first();
$adminRole->attachUser($admin);
});
... | [
"private",
"function",
"seedAdminUser",
"(",
")",
"{",
"tap",
"(",
"new",
"User",
"(",
"$",
"this",
"->",
"getAdminUserAttributes",
"(",
")",
")",
",",
"function",
"(",
"User",
"$",
"admin",
")",
"{",
"$",
"admin",
"->",
"save",
"(",
")",
";",
"/** @... | Seed the admin account. | [
"Seed",
"the",
"admin",
"account",
"."
] | b33ca82597a76b1e395071f71ae3e51f1ec67e62 | https://github.com/ARCANESOFT/Auth/blob/b33ca82597a76b1e395071f71ae3e51f1ec67e62/src/Seeds/Foundation/UserTableSeeder.php#L37-L46 |
196,308 | ARCANESOFT/Auth | src/Seeds/Foundation/UserTableSeeder.php | UserTableSeeder.getAdminUserAttributes | private function getAdminUserAttributes()
{
$attributes = [
'username' => 'admin',
'first_name' => 'Super',
'last_name' => 'ADMIN',
'email' => env('ADMIN_EMAIL', 'admin@example.com'),
'password' => env('ADMIN_PASSWORD', 'pass... | php | private function getAdminUserAttributes()
{
$attributes = [
'username' => 'admin',
'first_name' => 'Super',
'last_name' => 'ADMIN',
'email' => env('ADMIN_EMAIL', 'admin@example.com'),
'password' => env('ADMIN_PASSWORD', 'pass... | [
"private",
"function",
"getAdminUserAttributes",
"(",
")",
"{",
"$",
"attributes",
"=",
"[",
"'username'",
"=>",
"'admin'",
",",
"'first_name'",
"=>",
"'Super'",
",",
"'last_name'",
"=>",
"'ADMIN'",
",",
"'email'",
"=>",
"env",
"(",
"'ADMIN_EMAIL'",
",",
"'adm... | Get the admin user's attributes.
@return array | [
"Get",
"the",
"admin",
"user",
"s",
"attributes",
"."
] | b33ca82597a76b1e395071f71ae3e51f1ec67e62 | https://github.com/ARCANESOFT/Auth/blob/b33ca82597a76b1e395071f71ae3e51f1ec67e62/src/Seeds/Foundation/UserTableSeeder.php#L53-L69 |
196,309 | Tree6bee/framework | src/Foundation/Application.php | Application.sendThroughPipeline | protected function sendThroughPipeline(array $middleware, \Closure $then)
{
if (count($middleware) > 0) {
return (new Pipeline($this))
->send($this)
->through($middleware)
->then($then);
}
return $then();
} | php | protected function sendThroughPipeline(array $middleware, \Closure $then)
{
if (count($middleware) > 0) {
return (new Pipeline($this))
->send($this)
->through($middleware)
->then($then);
}
return $then();
} | [
"protected",
"function",
"sendThroughPipeline",
"(",
"array",
"$",
"middleware",
",",
"\\",
"Closure",
"$",
"then",
")",
"{",
"if",
"(",
"count",
"(",
"$",
"middleware",
")",
">",
"0",
")",
"{",
"return",
"(",
"new",
"Pipeline",
"(",
"$",
"this",
")",
... | Send the request through the pipeline with the given callback.
@param array $middleware
@param \Closure $then
@return mixed | [
"Send",
"the",
"request",
"through",
"the",
"pipeline",
"with",
"the",
"given",
"callback",
"."
] | 3feac0b44666068d26cbed740d7a41590c03ab7b | https://github.com/Tree6bee/framework/blob/3feac0b44666068d26cbed740d7a41590c03ab7b/src/Foundation/Application.php#L124-L134 |
196,310 | itcreator/custom-cmf | Module/System/src/Cmf/System/Request.php | Request.get | public function get($name, $type = self::TYPE_GET, $default = null)
{
return (isset($this->vars[$type]) && isset($this->vars[$type][$name])) ? $this->vars[$type][$name] : $default;
} | php | public function get($name, $type = self::TYPE_GET, $default = null)
{
return (isset($this->vars[$type]) && isset($this->vars[$type][$name])) ? $this->vars[$type][$name] : $default;
} | [
"public",
"function",
"get",
"(",
"$",
"name",
",",
"$",
"type",
"=",
"self",
"::",
"TYPE_GET",
",",
"$",
"default",
"=",
"null",
")",
"{",
"return",
"(",
"isset",
"(",
"$",
"this",
"->",
"vars",
"[",
"$",
"type",
"]",
")",
"&&",
"isset",
"(",
... | This method return request value
@param string $name
@param string $type
@param null $default
@return null|mixed | [
"This",
"method",
"return",
"request",
"value"
] | 42fc0535dfa0f641856f06673f6ab596b2020c40 | https://github.com/itcreator/custom-cmf/blob/42fc0535dfa0f641856f06673f6ab596b2020c40/Module/System/src/Cmf/System/Request.php#L68-L71 |
196,311 | nguyenanhung/requests | src/MyRequests.php | MyRequests.xmlRequest | public function xmlRequest($url = '', $data = '', $timeout = 60)
{
$this->debug->debug(__FUNCTION__, '/------------> ' . __FUNCTION__ . ' <------------\\');
$inputParams = [
'url' => $url,
'data' => $data,
'timeout' => $timeout,
];
$this->de... | php | public function xmlRequest($url = '', $data = '', $timeout = 60)
{
$this->debug->debug(__FUNCTION__, '/------------> ' . __FUNCTION__ . ' <------------\\');
$inputParams = [
'url' => $url,
'data' => $data,
'timeout' => $timeout,
];
$this->de... | [
"public",
"function",
"xmlRequest",
"(",
"$",
"url",
"=",
"''",
",",
"$",
"data",
"=",
"''",
",",
"$",
"timeout",
"=",
"60",
")",
"{",
"$",
"this",
"->",
"debug",
"->",
"debug",
"(",
"__FUNCTION__",
",",
"'/------------> '",
".",
"__FUNCTION__",
".",
... | Function xmlRequest
Send XML Request to Server
@author: 713uk13m <dev@nguyenanhung.com>
@time : 10/7/18 07:11
@param string $url URL Endpoint to be Request
@param string $data Data Content to be Request
@param int $timeout Timeout Request
@return array|null|string Response from Server | [
"Function",
"xmlRequest",
"Send",
"XML",
"Request",
"to",
"Server"
] | fae98614a256be6a3ff9bea34a273d182a3ae730 | https://github.com/nguyenanhung/requests/blob/fae98614a256be6a3ff9bea34a273d182a3ae730/src/MyRequests.php#L986-L1023 |
196,312 | ezra-obiwale/dSCore | src/Stdlib/Json.php | Json.decode | public function decode($assoc = false, $depth = 512, $options = 0) {
return json_decode($this->content, $assoc, $depth, $options);
} | php | public function decode($assoc = false, $depth = 512, $options = 0) {
return json_decode($this->content, $assoc, $depth, $options);
} | [
"public",
"function",
"decode",
"(",
"$",
"assoc",
"=",
"false",
",",
"$",
"depth",
"=",
"512",
",",
"$",
"options",
"=",
"0",
")",
"{",
"return",
"json_decode",
"(",
"$",
"this",
"->",
"content",
",",
"$",
"assoc",
",",
"$",
"depth",
",",
"$",
"... | Decodes the given JSON string
@see json_encode()
@param bool $assoc [optional] <p>
When <b>TRUE</b>, returned objects will be converted into
associative arrays.
</p>
@param int $depth [optional] <p>
User specified recursion depth.
</p>
@param int $options [optional] <p>
Bitmask of JSON decode options. Currently only
<... | [
"Decodes",
"the",
"given",
"JSON",
"string"
] | dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d | https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/Stdlib/Json.php#L87-L89 |
196,313 | CaliCastle/socialite | src/SocialiteManager.php | SocialiteManager.createBitbucketDriver | protected function createBitbucketDriver()
{
$config = $this->app['config']['services.bitbucket'];
return new BitbucketProvider(
$this->app['request'], new BitbucketServer($this->formatConfig($config))
);
} | php | protected function createBitbucketDriver()
{
$config = $this->app['config']['services.bitbucket'];
return new BitbucketProvider(
$this->app['request'], new BitbucketServer($this->formatConfig($config))
);
} | [
"protected",
"function",
"createBitbucketDriver",
"(",
")",
"{",
"$",
"config",
"=",
"$",
"this",
"->",
"app",
"[",
"'config'",
"]",
"[",
"'services.bitbucket'",
"]",
";",
"return",
"new",
"BitbucketProvider",
"(",
"$",
"this",
"->",
"app",
"[",
"'request'",... | Create an instance of Bitbucket driver.
@return One\AbstractProvider | [
"Create",
"an",
"instance",
"of",
"Bitbucket",
"driver",
"."
] | 68acdf290c7e3afbc3db08b3a197230a3f6b0370 | https://github.com/CaliCastle/socialite/blob/68acdf290c7e3afbc3db08b3a197230a3f6b0370/src/SocialiteManager.php#L255-L262 |
196,314 | bandama-framework/bandama-framework | src/foundation/translation/Translator.php | Translator.addFile | public function addFile($file) {
$baseName = basename($file, '.php');
$components = explode('.', $baseName);
$language = $components[1];
$data = require($file);
$this->add($data, $language);
} | php | public function addFile($file) {
$baseName = basename($file, '.php');
$components = explode('.', $baseName);
$language = $components[1];
$data = require($file);
$this->add($data, $language);
} | [
"public",
"function",
"addFile",
"(",
"$",
"file",
")",
"{",
"$",
"baseName",
"=",
"basename",
"(",
"$",
"file",
",",
"'.php'",
")",
";",
"$",
"components",
"=",
"explode",
"(",
"'.'",
",",
"$",
"baseName",
")",
";",
"$",
"language",
"=",
"$",
"com... | Add translation file content
@param string $file
@return void | [
"Add",
"translation",
"file",
"content"
] | 234ed703baf9e31268941c9d5f6d5e004cc53066 | https://github.com/bandama-framework/bandama-framework/blob/234ed703baf9e31268941c9d5f6d5e004cc53066/src/foundation/translation/Translator.php#L76-L85 |
196,315 | bandama-framework/bandama-framework | src/foundation/translation/Translator.php | Translator.add | private function add($data, $language) {
$parts = explode('-', $language); // To manage language with region (fr-CI, en-US, etc.)
foreach($data as $key => $translation) {
if (count($parts) == 1) {
$this->translations[$language][$key] = $translation;
} elseif (coun... | php | private function add($data, $language) {
$parts = explode('-', $language); // To manage language with region (fr-CI, en-US, etc.)
foreach($data as $key => $translation) {
if (count($parts) == 1) {
$this->translations[$language][$key] = $translation;
} elseif (coun... | [
"private",
"function",
"add",
"(",
"$",
"data",
",",
"$",
"language",
")",
"{",
"$",
"parts",
"=",
"explode",
"(",
"'-'",
",",
"$",
"language",
")",
";",
"// To manage language with region (fr-CI, en-US, etc.)",
"foreach",
"(",
"$",
"data",
"as",
"$",
"key",... | Add translation data for a language
@param array $data
@param string $language
@return void | [
"Add",
"translation",
"data",
"for",
"a",
"language"
] | 234ed703baf9e31268941c9d5f6d5e004cc53066 | https://github.com/bandama-framework/bandama-framework/blob/234ed703baf9e31268941c9d5f6d5e004cc53066/src/foundation/translation/Translator.php#L110-L121 |
196,316 | OxfordInfoLabs/kinikit-core | src/Template/TemplateParser.php | TemplateParser.getParserByKey | public static function getParserByKey($key) {
switch (strtolower($key)) {
case "twig":
return new TwigTemplateParser();
default:
if (isset(self::$customParsers[$key]))
return self::$customParsers[$key];
else
... | php | public static function getParserByKey($key) {
switch (strtolower($key)) {
case "twig":
return new TwigTemplateParser();
default:
if (isset(self::$customParsers[$key]))
return self::$customParsers[$key];
else
... | [
"public",
"static",
"function",
"getParserByKey",
"(",
"$",
"key",
")",
"{",
"switch",
"(",
"strtolower",
"(",
"$",
"key",
")",
")",
"{",
"case",
"\"twig\"",
":",
"return",
"new",
"TwigTemplateParser",
"(",
")",
";",
"default",
":",
"if",
"(",
"isset",
... | Get a view parser by key. | [
"Get",
"a",
"view",
"parser",
"by",
"key",
"."
] | edc1b2e6ffabd595c4c7d322279b3dd1e59ef359 | https://github.com/OxfordInfoLabs/kinikit-core/blob/edc1b2e6ffabd595c4c7d322279b3dd1e59ef359/src/Template/TemplateParser.php#L41-L51 |
196,317 | covex-nn/JooS | src/JooS/Config/Adapter/Transaction.php | Adapter_Transaction.start | public static function start()
{
if (is_null(self::$_transaction)) {
$object = self::$_transaction = new self();
$object->_stored = Config::getDataAdapter();
Config::setDataAdapter($object);
$result = true;
} else {
$result = false;
}
return $result;
... | php | public static function start()
{
if (is_null(self::$_transaction)) {
$object = self::$_transaction = new self();
$object->_stored = Config::getDataAdapter();
Config::setDataAdapter($object);
$result = true;
} else {
$result = false;
}
return $result;
... | [
"public",
"static",
"function",
"start",
"(",
")",
"{",
"if",
"(",
"is_null",
"(",
"self",
"::",
"$",
"_transaction",
")",
")",
"{",
"$",
"object",
"=",
"self",
"::",
"$",
"_transaction",
"=",
"new",
"self",
"(",
")",
";",
"$",
"object",
"->",
"_st... | Start transaction and save current config adapter
@return boolean | [
"Start",
"transaction",
"and",
"save",
"current",
"config",
"adapter"
] | 8dfb94edccecaf307787d4091ba7f20a674b7792 | https://github.com/covex-nn/JooS/blob/8dfb94edccecaf307787d4091ba7f20a674b7792/src/JooS/Config/Adapter/Transaction.php#L98-L112 |
196,318 | covex-nn/JooS | src/JooS/Config/Adapter/Transaction.php | Adapter_Transaction._stop | private static function _stop()
{
$adapter = self::$_transaction->_stored;
if (is_null($adapter)) {
Config::clearDataAdapter();
} else {
Config::setDataAdapter($adapter);
}
} | php | private static function _stop()
{
$adapter = self::$_transaction->_stored;
if (is_null($adapter)) {
Config::clearDataAdapter();
} else {
Config::setDataAdapter($adapter);
}
} | [
"private",
"static",
"function",
"_stop",
"(",
")",
"{",
"$",
"adapter",
"=",
"self",
"::",
"$",
"_transaction",
"->",
"_stored",
";",
"if",
"(",
"is_null",
"(",
"$",
"adapter",
")",
")",
"{",
"Config",
"::",
"clearDataAdapter",
"(",
")",
";",
"}",
"... | Restore old data adapter
@return null | [
"Restore",
"old",
"data",
"adapter"
] | 8dfb94edccecaf307787d4091ba7f20a674b7792 | https://github.com/covex-nn/JooS/blob/8dfb94edccecaf307787d4091ba7f20a674b7792/src/JooS/Config/Adapter/Transaction.php#L181-L190 |
196,319 | gplcart/cli | controllers/commands/Config.php | Config.cmdGetConfig | public function cmdGetConfig()
{
$result = $this->getListConfig();
$this->outputFormat($result);
$this->outputFormatTableConfig($result);
$this->output();
} | php | public function cmdGetConfig()
{
$result = $this->getListConfig();
$this->outputFormat($result);
$this->outputFormatTableConfig($result);
$this->output();
} | [
"public",
"function",
"cmdGetConfig",
"(",
")",
"{",
"$",
"result",
"=",
"$",
"this",
"->",
"getListConfig",
"(",
")",
";",
"$",
"this",
"->",
"outputFormat",
"(",
"$",
"result",
")",
";",
"$",
"this",
"->",
"outputFormatTableConfig",
"(",
"$",
"result",... | Callback for "config-get" command | [
"Callback",
"for",
"config",
"-",
"get",
"command"
] | e57dba53e291a225b4bff0c0d9b23d685dd1c125 | https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/Config.php#L22-L28 |
196,320 | gplcart/cli | controllers/commands/Config.php | Config.getListConfig | protected function getListConfig()
{
$name = $this->getParam(0);
if (isset($name)) {
$result = $this->config->get($name);
if (!isset($result)) {
$this->errorAndExit($this->text('Invalid argument'));
}
$list = array($name => $result);
... | php | protected function getListConfig()
{
$name = $this->getParam(0);
if (isset($name)) {
$result = $this->config->get($name);
if (!isset($result)) {
$this->errorAndExit($this->text('Invalid argument'));
}
$list = array($name => $result);
... | [
"protected",
"function",
"getListConfig",
"(",
")",
"{",
"$",
"name",
"=",
"$",
"this",
"->",
"getParam",
"(",
"0",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"name",
")",
")",
"{",
"$",
"result",
"=",
"$",
"this",
"->",
"config",
"->",
"get",
"(",
... | Returns an array of configurations
@return array | [
"Returns",
"an",
"array",
"of",
"configurations"
] | e57dba53e291a225b4bff0c0d9b23d685dd1c125 | https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/Config.php#L34-L61 |
196,321 | gplcart/cli | controllers/commands/Config.php | Config.cmdDeleteConfig | public function cmdDeleteConfig()
{
$id = $this->getParam(0);
if (!isset($id)) {
$this->errorAndExit($this->text('Invalid argument'));
}
if (!$this->config->reset($id)) {
$this->errorAndExit($this->text('Unexpected result'));
}
$this->output... | php | public function cmdDeleteConfig()
{
$id = $this->getParam(0);
if (!isset($id)) {
$this->errorAndExit($this->text('Invalid argument'));
}
if (!$this->config->reset($id)) {
$this->errorAndExit($this->text('Unexpected result'));
}
$this->output... | [
"public",
"function",
"cmdDeleteConfig",
"(",
")",
"{",
"$",
"id",
"=",
"$",
"this",
"->",
"getParam",
"(",
"0",
")",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"id",
")",
")",
"{",
"$",
"this",
"->",
"errorAndExit",
"(",
"$",
"this",
"->",
"text",
... | Callback for "config-delete" command | [
"Callback",
"for",
"config",
"-",
"delete",
"command"
] | e57dba53e291a225b4bff0c0d9b23d685dd1c125 | https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/Config.php#L66-L79 |
196,322 | gplcart/cli | controllers/commands/Config.php | Config.cmdSetConfig | public function cmdSetConfig()
{
$key = $this->getParam(0);
$value = $this->getParam(1);
if (!isset($key) || !isset($value)) {
$this->errorAndExit($this->text('Invalid command'));
}
if (!$this->config->set($key, $value)) {
$this->errorAndExit($this->... | php | public function cmdSetConfig()
{
$key = $this->getParam(0);
$value = $this->getParam(1);
if (!isset($key) || !isset($value)) {
$this->errorAndExit($this->text('Invalid command'));
}
if (!$this->config->set($key, $value)) {
$this->errorAndExit($this->... | [
"public",
"function",
"cmdSetConfig",
"(",
")",
"{",
"$",
"key",
"=",
"$",
"this",
"->",
"getParam",
"(",
"0",
")",
";",
"$",
"value",
"=",
"$",
"this",
"->",
"getParam",
"(",
"1",
")",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"key",
")",
"||",
... | Callback for "config-set" command | [
"Callback",
"for",
"config",
"-",
"set",
"command"
] | e57dba53e291a225b4bff0c0d9b23d685dd1c125 | https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/Config.php#L84-L98 |
196,323 | libreworks/caridea-dao | src/MongoDb.php | MongoDb.doExecute | protected function doExecute(\Closure $cb)
{
try {
return $cb($this->manager, $this->collection);
} catch (\Exception $e) {
throw Exception\Translator\MongoDb::translate($e);
}
} | php | protected function doExecute(\Closure $cb)
{
try {
return $cb($this->manager, $this->collection);
} catch (\Exception $e) {
throw Exception\Translator\MongoDb::translate($e);
}
} | [
"protected",
"function",
"doExecute",
"(",
"\\",
"Closure",
"$",
"cb",
")",
"{",
"try",
"{",
"return",
"$",
"cb",
"(",
"$",
"this",
"->",
"manager",
",",
"$",
"this",
"->",
"collection",
")",
";",
"}",
"catch",
"(",
"\\",
"Exception",
"$",
"e",
")"... | Executes something in the context of the collection.
Exceptions are caught and translated.
@param callable $cb The closure to execute, takes the entityManager and collection
@return mixed Whatever the function returns, this method also returns
@throws \Caridea\Dao\Exception If a database problem occurs
@see \Caridea\... | [
"Executes",
"something",
"in",
"the",
"context",
"of",
"the",
"collection",
"."
] | 22c2fc81f63050ad23f7b0c40e430ff026e1e767 | https://github.com/libreworks/caridea-dao/blob/22c2fc81f63050ad23f7b0c40e430ff026e1e767/src/MongoDb.php#L69-L76 |
196,324 | RetItaliaSpA/AuthenticationBundle | Entity/FunzioniUtente.php | FunzioniUtente.insertLog | public function insertLog($idObject="",$objJson="",$idFunzione="",$dettagli=""){
//Creo una nuova istanza di log
$intranetLogApp = new IntranetLogApp();
$intranetLogApp->setDettagli($dettagli);
if (!empty($idFunzione)) {
$repository = $this->em->getRepository('retItaliaAuth... | php | public function insertLog($idObject="",$objJson="",$idFunzione="",$dettagli=""){
//Creo una nuova istanza di log
$intranetLogApp = new IntranetLogApp();
$intranetLogApp->setDettagli($dettagli);
if (!empty($idFunzione)) {
$repository = $this->em->getRepository('retItaliaAuth... | [
"public",
"function",
"insertLog",
"(",
"$",
"idObject",
"=",
"\"\"",
",",
"$",
"objJson",
"=",
"\"\"",
",",
"$",
"idFunzione",
"=",
"\"\"",
",",
"$",
"dettagli",
"=",
"\"\"",
")",
"{",
"//Creo una nuova istanza di log",
"$",
"intranetLogApp",
"=",
"new",
... | Questa funzione inserisce una nuova occorrenza nel file di log
@param string $idObject
@param string $objJson
@param string $idFunzione
@param string $dettagli
@throws \Exception | [
"Questa",
"funzione",
"inserisce",
"una",
"nuova",
"occorrenza",
"nel",
"file",
"di",
"log"
] | 4c2b28d0d290a68ade9215f872c417749deea2cd | https://github.com/RetItaliaSpA/AuthenticationBundle/blob/4c2b28d0d290a68ade9215f872c417749deea2cd/Entity/FunzioniUtente.php#L163-L194 |
196,325 | attogram/shared-media-orm | src/Attogram/SharedMedia/Orm/Base/Category.php | Category.initC2Ms | public function initC2Ms($overrideExisting = true)
{
if (null !== $this->collC2Ms && !$overrideExisting) {
return;
}
$collectionClassName = C2MTableMap::getTableMap()->getCollectionClassName();
$this->collC2Ms = new $collectionClassName;
$this->collC2Ms->setMode... | php | public function initC2Ms($overrideExisting = true)
{
if (null !== $this->collC2Ms && !$overrideExisting) {
return;
}
$collectionClassName = C2MTableMap::getTableMap()->getCollectionClassName();
$this->collC2Ms = new $collectionClassName;
$this->collC2Ms->setMode... | [
"public",
"function",
"initC2Ms",
"(",
"$",
"overrideExisting",
"=",
"true",
")",
"{",
"if",
"(",
"null",
"!==",
"$",
"this",
"->",
"collC2Ms",
"&&",
"!",
"$",
"overrideExisting",
")",
"{",
"return",
";",
"}",
"$",
"collectionClassName",
"=",
"C2MTableMap"... | Initializes the collC2Ms collection.
By default this just sets the collC2Ms collection to an empty array (like clearcollC2Ms());
however, you may wish to override this method in your stub class to provide setting appropriate
to your application -- for example, setting the initial array to the values stored in database... | [
"Initializes",
"the",
"collC2Ms",
"collection",
"."
] | 81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8 | https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Category.php#L2093-L2103 |
196,326 | attogram/shared-media-orm | src/Attogram/SharedMedia/Orm/Base/Category.php | Category.countC2Ms | public function countC2Ms(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
{
$partial = $this->collC2MsPartial && !$this->isNew();
if (null === $this->collC2Ms || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collC2Ms) {
... | php | public function countC2Ms(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
{
$partial = $this->collC2MsPartial && !$this->isNew();
if (null === $this->collC2Ms || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collC2Ms) {
... | [
"public",
"function",
"countC2Ms",
"(",
"Criteria",
"$",
"criteria",
"=",
"null",
",",
"$",
"distinct",
"=",
"false",
",",
"ConnectionInterface",
"$",
"con",
"=",
"null",
")",
"{",
"$",
"partial",
"=",
"$",
"this",
"->",
"collC2MsPartial",
"&&",
"!",
"$"... | Returns the number of related C2M objects.
@param Criteria $criteria
@param boolean $distinct
@param ConnectionInterface $con
@return int Count of related C2M objects.
@throws PropelException | [
"Returns",
"the",
"number",
"of",
"related",
"C2M",
"objects",
"."
] | 81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8 | https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Category.php#L2208-L2231 |
196,327 | attogram/shared-media-orm | src/Attogram/SharedMedia/Orm/Base/Category.php | Category.addC2M | public function addC2M(ChildC2M $l)
{
if ($this->collC2Ms === null) {
$this->initC2Ms();
$this->collC2MsPartial = true;
}
if (!$this->collC2Ms->contains($l)) {
$this->doAddC2M($l);
if ($this->c2MsScheduledForDeletion and $this->c2MsScheduledF... | php | public function addC2M(ChildC2M $l)
{
if ($this->collC2Ms === null) {
$this->initC2Ms();
$this->collC2MsPartial = true;
}
if (!$this->collC2Ms->contains($l)) {
$this->doAddC2M($l);
if ($this->c2MsScheduledForDeletion and $this->c2MsScheduledF... | [
"public",
"function",
"addC2M",
"(",
"ChildC2M",
"$",
"l",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"collC2Ms",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"initC2Ms",
"(",
")",
";",
"$",
"this",
"->",
"collC2MsPartial",
"=",
"true",
";",
"}",
"if",... | Method called to associate a ChildC2M object to this object
through the ChildC2M foreign key attribute.
@param ChildC2M $l ChildC2M
@return $this|\Attogram\SharedMedia\Orm\Category The current object (for fluent API support) | [
"Method",
"called",
"to",
"associate",
"a",
"ChildC2M",
"object",
"to",
"this",
"object",
"through",
"the",
"ChildC2M",
"foreign",
"key",
"attribute",
"."
] | 81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8 | https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Category.php#L2240-L2256 |
196,328 | attogram/shared-media-orm | src/Attogram/SharedMedia/Orm/Base/Category.php | Category.getC2MsJoinMedia | public function getC2MsJoinMedia(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
{
$query = ChildC2MQuery::create(null, $criteria);
$query->joinWith('Media', $joinBehavior);
return $this->getC2Ms($query, $con);
} | php | public function getC2MsJoinMedia(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
{
$query = ChildC2MQuery::create(null, $criteria);
$query->joinWith('Media', $joinBehavior);
return $this->getC2Ms($query, $con);
} | [
"public",
"function",
"getC2MsJoinMedia",
"(",
"Criteria",
"$",
"criteria",
"=",
"null",
",",
"ConnectionInterface",
"$",
"con",
"=",
"null",
",",
"$",
"joinBehavior",
"=",
"Criteria",
"::",
"LEFT_JOIN",
")",
"{",
"$",
"query",
"=",
"ChildC2MQuery",
"::",
"c... | If this collection has already been initialized with
an identical criteria, it returns the collection.
Otherwise if this Category is new, it will return
an empty collection; or if this Category has previously
been saved, it will retrieve related C2Ms from storage.
This method is protected by default in order to keep t... | [
"If",
"this",
"collection",
"has",
"already",
"been",
"initialized",
"with",
"an",
"identical",
"criteria",
"it",
"returns",
"the",
"collection",
".",
"Otherwise",
"if",
"this",
"Category",
"is",
"new",
"it",
"will",
"return",
"an",
"empty",
"collection",
";",... | 81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8 | https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Category.php#L2304-L2310 |
196,329 | attogram/shared-media-orm | src/Attogram/SharedMedia/Orm/Base/Category.php | Category.countC2Ps | public function countC2Ps(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
{
$partial = $this->collC2PsPartial && !$this->isNew();
if (null === $this->collC2Ps || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collC2Ps) {
... | php | public function countC2Ps(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
{
$partial = $this->collC2PsPartial && !$this->isNew();
if (null === $this->collC2Ps || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collC2Ps) {
... | [
"public",
"function",
"countC2Ps",
"(",
"Criteria",
"$",
"criteria",
"=",
"null",
",",
"$",
"distinct",
"=",
"false",
",",
"ConnectionInterface",
"$",
"con",
"=",
"null",
")",
"{",
"$",
"partial",
"=",
"$",
"this",
"->",
"collC2PsPartial",
"&&",
"!",
"$"... | Returns the number of related C2P objects.
@param Criteria $criteria
@param boolean $distinct
@param ConnectionInterface $con
@return int Count of related C2P objects.
@throws PropelException | [
"Returns",
"the",
"number",
"of",
"related",
"C2P",
"objects",
"."
] | 81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8 | https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Category.php#L2461-L2484 |
196,330 | attogram/shared-media-orm | src/Attogram/SharedMedia/Orm/Base/Category.php | Category.getC2PsJoinPage | public function getC2PsJoinPage(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
{
$query = ChildC2PQuery::create(null, $criteria);
$query->joinWith('Page', $joinBehavior);
return $this->getC2Ps($query, $con);
} | php | public function getC2PsJoinPage(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
{
$query = ChildC2PQuery::create(null, $criteria);
$query->joinWith('Page', $joinBehavior);
return $this->getC2Ps($query, $con);
} | [
"public",
"function",
"getC2PsJoinPage",
"(",
"Criteria",
"$",
"criteria",
"=",
"null",
",",
"ConnectionInterface",
"$",
"con",
"=",
"null",
",",
"$",
"joinBehavior",
"=",
"Criteria",
"::",
"LEFT_JOIN",
")",
"{",
"$",
"query",
"=",
"ChildC2PQuery",
"::",
"cr... | If this collection has already been initialized with
an identical criteria, it returns the collection.
Otherwise if this Category is new, it will return
an empty collection; or if this Category has previously
been saved, it will retrieve related C2Ps from storage.
This method is protected by default in order to keep t... | [
"If",
"this",
"collection",
"has",
"already",
"been",
"initialized",
"with",
"an",
"identical",
"criteria",
"it",
"returns",
"the",
"collection",
".",
"Otherwise",
"if",
"this",
"Category",
"is",
"new",
"it",
"will",
"return",
"an",
"empty",
"collection",
";",... | 81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8 | https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Category.php#L2557-L2563 |
196,331 | attogram/shared-media-orm | src/Attogram/SharedMedia/Orm/Base/Category.php | Category.makeRoot | public function makeRoot()
{
if ($this->getLeftValue() || $this->getRightValue()) {
throw new PropelException('Cannot turn an existing node into a root node.');
}
$this->setLeftValue(1);
$this->setRightValue(2);
$this->setLevel(0);
return $this;
} | php | public function makeRoot()
{
if ($this->getLeftValue() || $this->getRightValue()) {
throw new PropelException('Cannot turn an existing node into a root node.');
}
$this->setLeftValue(1);
$this->setRightValue(2);
$this->setLevel(0);
return $this;
} | [
"public",
"function",
"makeRoot",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"getLeftValue",
"(",
")",
"||",
"$",
"this",
"->",
"getRightValue",
"(",
")",
")",
"{",
"throw",
"new",
"PropelException",
"(",
"'Cannot turn an existing node into a root node.'",
"... | Creates the supplied node as the root node.
@return $this|ChildCategory The current object (for fluent API support)
@throws PropelException | [
"Creates",
"the",
"supplied",
"node",
"as",
"the",
"root",
"node",
"."
] | 81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8 | https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Category.php#L2742-L2753 |
196,332 | attogram/shared-media-orm | src/Attogram/SharedMedia/Orm/Base/Category.php | Category.isDescendantOf | public function isDescendantOf(ChildCategory $parent)
{
return $this->isInTree() && $this->getLeftValue() > $parent->getLeftValue() && $this->getRightValue() < $parent->getRightValue();
} | php | public function isDescendantOf(ChildCategory $parent)
{
return $this->isInTree() && $this->getLeftValue() > $parent->getLeftValue() && $this->getRightValue() < $parent->getRightValue();
} | [
"public",
"function",
"isDescendantOf",
"(",
"ChildCategory",
"$",
"parent",
")",
"{",
"return",
"$",
"this",
"->",
"isInTree",
"(",
")",
"&&",
"$",
"this",
"->",
"getLeftValue",
"(",
")",
">",
"$",
"parent",
"->",
"getLeftValue",
"(",
")",
"&&",
"$",
... | Tests if node is a descendant of another node
@param ChildCategory $parent Propel node object
@return bool | [
"Tests",
"if",
"node",
"is",
"a",
"descendant",
"of",
"another",
"node"
] | 81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8 | https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Category.php#L2791-L2794 |
196,333 | attogram/shared-media-orm | src/Attogram/SharedMedia/Orm/Base/Category.php | Category.getParent | public function getParent(ConnectionInterface $con = null)
{
if (null === $this->aNestedSetParent && $this->hasParent()) {
$this->aNestedSetParent = ChildCategoryQuery::create()
->ancestorsOf($this)
->orderByLevel(true)
->findOne($con);
}
... | php | public function getParent(ConnectionInterface $con = null)
{
if (null === $this->aNestedSetParent && $this->hasParent()) {
$this->aNestedSetParent = ChildCategoryQuery::create()
->ancestorsOf($this)
->orderByLevel(true)
->findOne($con);
}
... | [
"public",
"function",
"getParent",
"(",
"ConnectionInterface",
"$",
"con",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"this",
"->",
"aNestedSetParent",
"&&",
"$",
"this",
"->",
"hasParent",
"(",
")",
")",
"{",
"$",
"this",
"->",
"aNestedSetPar... | Gets parent node for the current object if it exists
The result is cached so further calls to the same method don't issue any queries
@param ConnectionInterface $con Connection to use.
@return ChildCategory|null Propel object if exists else null | [
"Gets",
"parent",
"node",
"for",
"the",
"current",
"object",
"if",
"it",
"exists",
"The",
"result",
"is",
"cached",
"so",
"further",
"calls",
"to",
"the",
"same",
"method",
"don",
"t",
"issue",
"any",
"queries"
] | 81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8 | https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Category.php#L2839-L2849 |
196,334 | attogram/shared-media-orm | src/Attogram/SharedMedia/Orm/Base/Category.php | Category.hasPrevSibling | public function hasPrevSibling(ConnectionInterface $con = null)
{
if (!ChildCategoryQuery::isValid($this)) {
return false;
}
return ChildCategoryQuery::create()
->filterByTreeRight($this->getLeftValue() - 1)
->exists($con);
} | php | public function hasPrevSibling(ConnectionInterface $con = null)
{
if (!ChildCategoryQuery::isValid($this)) {
return false;
}
return ChildCategoryQuery::create()
->filterByTreeRight($this->getLeftValue() - 1)
->exists($con);
} | [
"public",
"function",
"hasPrevSibling",
"(",
"ConnectionInterface",
"$",
"con",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"ChildCategoryQuery",
"::",
"isValid",
"(",
"$",
"this",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"ChildCategoryQuery",
"::",
... | Determines if the node has previous sibling
@param ConnectionInterface $con Connection to use.
@return bool | [
"Determines",
"if",
"the",
"node",
"has",
"previous",
"sibling"
] | 81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8 | https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Category.php#L2857-L2866 |
196,335 | attogram/shared-media-orm | src/Attogram/SharedMedia/Orm/Base/Category.php | Category.getPrevSibling | public function getPrevSibling(ConnectionInterface $con = null)
{
return ChildCategoryQuery::create()
->filterByTreeRight($this->getLeftValue() - 1)
->findOne($con);
} | php | public function getPrevSibling(ConnectionInterface $con = null)
{
return ChildCategoryQuery::create()
->filterByTreeRight($this->getLeftValue() - 1)
->findOne($con);
} | [
"public",
"function",
"getPrevSibling",
"(",
"ConnectionInterface",
"$",
"con",
"=",
"null",
")",
"{",
"return",
"ChildCategoryQuery",
"::",
"create",
"(",
")",
"->",
"filterByTreeRight",
"(",
"$",
"this",
"->",
"getLeftValue",
"(",
")",
"-",
"1",
")",
"->",... | Gets previous sibling for the given node if it exists
@param ConnectionInterface $con Connection to use.
@return ChildCategory|null Propel object if exists else null | [
"Gets",
"previous",
"sibling",
"for",
"the",
"given",
"node",
"if",
"it",
"exists"
] | 81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8 | https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Category.php#L2874-L2879 |
196,336 | attogram/shared-media-orm | src/Attogram/SharedMedia/Orm/Base/Category.php | Category.hasNextSibling | public function hasNextSibling(ConnectionInterface $con = null)
{
if (!ChildCategoryQuery::isValid($this)) {
return false;
}
return ChildCategoryQuery::create()
->filterByTreeLeft($this->getRightValue() + 1)
->exists($con);
} | php | public function hasNextSibling(ConnectionInterface $con = null)
{
if (!ChildCategoryQuery::isValid($this)) {
return false;
}
return ChildCategoryQuery::create()
->filterByTreeLeft($this->getRightValue() + 1)
->exists($con);
} | [
"public",
"function",
"hasNextSibling",
"(",
"ConnectionInterface",
"$",
"con",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"ChildCategoryQuery",
"::",
"isValid",
"(",
"$",
"this",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"ChildCategoryQuery",
"::",
... | Determines if the node has next sibling
@param ConnectionInterface $con Connection to use.
@return bool | [
"Determines",
"if",
"the",
"node",
"has",
"next",
"sibling"
] | 81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8 | https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Category.php#L2887-L2896 |
196,337 | attogram/shared-media-orm | src/Attogram/SharedMedia/Orm/Base/Category.php | Category.getNextSibling | public function getNextSibling(ConnectionInterface $con = null)
{
return ChildCategoryQuery::create()
->filterByTreeLeft($this->getRightValue() + 1)
->findOne($con);
} | php | public function getNextSibling(ConnectionInterface $con = null)
{
return ChildCategoryQuery::create()
->filterByTreeLeft($this->getRightValue() + 1)
->findOne($con);
} | [
"public",
"function",
"getNextSibling",
"(",
"ConnectionInterface",
"$",
"con",
"=",
"null",
")",
"{",
"return",
"ChildCategoryQuery",
"::",
"create",
"(",
")",
"->",
"filterByTreeLeft",
"(",
"$",
"this",
"->",
"getRightValue",
"(",
")",
"+",
"1",
")",
"->",... | Gets next sibling for the given node if it exists
@param ConnectionInterface $con Connection to use.
@return ChildCategory|null Propel object if exists else null | [
"Gets",
"next",
"sibling",
"for",
"the",
"given",
"node",
"if",
"it",
"exists"
] | 81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8 | https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Category.php#L2904-L2909 |
196,338 | attogram/shared-media-orm | src/Attogram/SharedMedia/Orm/Base/Category.php | Category.getChildren | public function getChildren(Criteria $criteria = null, ConnectionInterface $con = null)
{
if (null === $this->collNestedSetChildren || null !== $criteria) {
if ($this->isLeaf() || ($this->isNew() && null === $this->collNestedSetChildren)) {
// return empty collection
... | php | public function getChildren(Criteria $criteria = null, ConnectionInterface $con = null)
{
if (null === $this->collNestedSetChildren || null !== $criteria) {
if ($this->isLeaf() || ($this->isNew() && null === $this->collNestedSetChildren)) {
// return empty collection
... | [
"public",
"function",
"getChildren",
"(",
"Criteria",
"$",
"criteria",
"=",
"null",
",",
"ConnectionInterface",
"$",
"con",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"this",
"->",
"collNestedSetChildren",
"||",
"null",
"!==",
"$",
"criteria",
"... | Gets the children of the given node
@param Criteria $criteria Criteria to filter results.
@param ConnectionInterface $con Connection to use.
@return ObjectCollection|ChildCategory[] List of ChildCategory objects | [
"Gets",
"the",
"children",
"of",
"the",
"given",
"node"
] | 81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8 | https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Category.php#L2974-L2993 |
196,339 | attogram/shared-media-orm | src/Attogram/SharedMedia/Orm/Base/Category.php | Category.countChildren | public function countChildren(Criteria $criteria = null, ConnectionInterface $con = null)
{
if (null === $this->collNestedSetChildren || null !== $criteria) {
if ($this->isLeaf() || ($this->isNew() && null === $this->collNestedSetChildren)) {
return 0;
} else {
... | php | public function countChildren(Criteria $criteria = null, ConnectionInterface $con = null)
{
if (null === $this->collNestedSetChildren || null !== $criteria) {
if ($this->isLeaf() || ($this->isNew() && null === $this->collNestedSetChildren)) {
return 0;
} else {
... | [
"public",
"function",
"countChildren",
"(",
"Criteria",
"$",
"criteria",
"=",
"null",
",",
"ConnectionInterface",
"$",
"con",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"this",
"->",
"collNestedSetChildren",
"||",
"null",
"!==",
"$",
"criteria",
... | Gets number of children for the given node
@param Criteria $criteria Criteria to filter results.
@param ConnectionInterface $con Connection to use.
@return int Number of children | [
"Gets",
"number",
"of",
"children",
"for",
"the",
"given",
"node"
] | 81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8 | https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Category.php#L3002-L3015 |
196,340 | attogram/shared-media-orm | src/Attogram/SharedMedia/Orm/Base/Category.php | Category.getFirstChild | public function getFirstChild(Criteria $criteria = null, ConnectionInterface $con = null)
{
if ($this->isLeaf()) {
return null;
} else {
return ChildCategoryQuery::create(null, $criteria)
->childrenOf($this)
->orderByBranch()
->... | php | public function getFirstChild(Criteria $criteria = null, ConnectionInterface $con = null)
{
if ($this->isLeaf()) {
return null;
} else {
return ChildCategoryQuery::create(null, $criteria)
->childrenOf($this)
->orderByBranch()
->... | [
"public",
"function",
"getFirstChild",
"(",
"Criteria",
"$",
"criteria",
"=",
"null",
",",
"ConnectionInterface",
"$",
"con",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isLeaf",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
... | Gets the first child of the given node
@param Criteria $criteria Criteria to filter results.
@param ConnectionInterface $con Connection to use.
@return ChildCategory|null First child or null if this is a leaf | [
"Gets",
"the",
"first",
"child",
"of",
"the",
"given",
"node"
] | 81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8 | https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Category.php#L3024-L3034 |
196,341 | attogram/shared-media-orm | src/Attogram/SharedMedia/Orm/Base/Category.php | Category.getSiblings | public function getSiblings($includeNode = false, Criteria $criteria = null, ConnectionInterface $con = null)
{
if ($this->isRoot()) {
return array();
} else {
$query = ChildCategoryQuery::create(null, $criteria)
->childrenOf($this->getParent($con))
... | php | public function getSiblings($includeNode = false, Criteria $criteria = null, ConnectionInterface $con = null)
{
if ($this->isRoot()) {
return array();
} else {
$query = ChildCategoryQuery::create(null, $criteria)
->childrenOf($this->getParent($con))
... | [
"public",
"function",
"getSiblings",
"(",
"$",
"includeNode",
"=",
"false",
",",
"Criteria",
"$",
"criteria",
"=",
"null",
",",
"ConnectionInterface",
"$",
"con",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isRoot",
"(",
")",
")",
"{",
"retur... | Gets the siblings of the given node
@param boolean $includeNode Whether to include the current node or not
@param Criteria $criteria Criteria to filter results.
@param ConnectionInterface $con Connection to use.
@return ObjectCollection|ChildCategory[] List of ChildCategory objects | [
"Gets",
"the",
"siblings",
"of",
"the",
"given",
"node"
] | 81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8 | https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Category.php#L3064-L3078 |
196,342 | attogram/shared-media-orm | src/Attogram/SharedMedia/Orm/Base/Category.php | Category.getDescendants | public function getDescendants(Criteria $criteria = null, ConnectionInterface $con = null)
{
if ($this->isLeaf()) {
return array();
} else {
return ChildCategoryQuery::create(null, $criteria)
->descendantsOf($this)
->orderByBranch()
... | php | public function getDescendants(Criteria $criteria = null, ConnectionInterface $con = null)
{
if ($this->isLeaf()) {
return array();
} else {
return ChildCategoryQuery::create(null, $criteria)
->descendantsOf($this)
->orderByBranch()
... | [
"public",
"function",
"getDescendants",
"(",
"Criteria",
"$",
"criteria",
"=",
"null",
",",
"ConnectionInterface",
"$",
"con",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isLeaf",
"(",
")",
")",
"{",
"return",
"array",
"(",
")",
";",
"}",
"... | Gets descendants for the given node
@param Criteria $criteria Criteria to filter results.
@param ConnectionInterface $con Connection to use.
@return ObjectCollection|ChildCategory[] List of ChildCategory objects | [
"Gets",
"descendants",
"for",
"the",
"given",
"node"
] | 81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8 | https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Category.php#L3087-L3097 |
196,343 | attogram/shared-media-orm | src/Attogram/SharedMedia/Orm/Base/Category.php | Category.countDescendants | public function countDescendants(Criteria $criteria = null, ConnectionInterface $con = null)
{
if ($this->isLeaf()) {
// save one query
return 0;
} else {
return ChildCategoryQuery::create(null, $criteria)
->descendantsOf($this)
->c... | php | public function countDescendants(Criteria $criteria = null, ConnectionInterface $con = null)
{
if ($this->isLeaf()) {
// save one query
return 0;
} else {
return ChildCategoryQuery::create(null, $criteria)
->descendantsOf($this)
->c... | [
"public",
"function",
"countDescendants",
"(",
"Criteria",
"$",
"criteria",
"=",
"null",
",",
"ConnectionInterface",
"$",
"con",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isLeaf",
"(",
")",
")",
"{",
"// save one query",
"return",
"0",
";",
"... | Gets number of descendants for the given node
@param Criteria $criteria Criteria to filter results.
@param ConnectionInterface $con Connection to use.
@return int Number of descendants | [
"Gets",
"number",
"of",
"descendants",
"for",
"the",
"given",
"node"
] | 81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8 | https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Category.php#L3106-L3116 |
196,344 | attogram/shared-media-orm | src/Attogram/SharedMedia/Orm/Base/Category.php | Category.getBranch | public function getBranch(Criteria $criteria = null, ConnectionInterface $con = null)
{
return ChildCategoryQuery::create(null, $criteria)
->branchOf($this)
->orderByBranch()
->find($con);
} | php | public function getBranch(Criteria $criteria = null, ConnectionInterface $con = null)
{
return ChildCategoryQuery::create(null, $criteria)
->branchOf($this)
->orderByBranch()
->find($con);
} | [
"public",
"function",
"getBranch",
"(",
"Criteria",
"$",
"criteria",
"=",
"null",
",",
"ConnectionInterface",
"$",
"con",
"=",
"null",
")",
"{",
"return",
"ChildCategoryQuery",
"::",
"create",
"(",
"null",
",",
"$",
"criteria",
")",
"->",
"branchOf",
"(",
... | Gets descendants for the given node, plus the current node
@param Criteria $criteria Criteria to filter results.
@param ConnectionInterface $con Connection to use.
@return ObjectCollection|ChildCategory[] List of ChildCategory objects | [
"Gets",
"descendants",
"for",
"the",
"given",
"node",
"plus",
"the",
"current",
"node"
] | 81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8 | https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Category.php#L3125-L3131 |
196,345 | attogram/shared-media-orm | src/Attogram/SharedMedia/Orm/Base/Category.php | Category.getAncestors | public function getAncestors(Criteria $criteria = null, ConnectionInterface $con = null)
{
if ($this->isRoot()) {
// save one query
return array();
} else {
return ChildCategoryQuery::create(null, $criteria)
->ancestorsOf($this)
->o... | php | public function getAncestors(Criteria $criteria = null, ConnectionInterface $con = null)
{
if ($this->isRoot()) {
// save one query
return array();
} else {
return ChildCategoryQuery::create(null, $criteria)
->ancestorsOf($this)
->o... | [
"public",
"function",
"getAncestors",
"(",
"Criteria",
"$",
"criteria",
"=",
"null",
",",
"ConnectionInterface",
"$",
"con",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isRoot",
"(",
")",
")",
"{",
"// save one query",
"return",
"array",
"(",
"... | Gets ancestors for the given node, starting with the root node
Use it for breadcrumb paths for instance
@param Criteria $criteria Criteria to filter results.
@param ConnectionInterface $con Connection to use.
@return ObjectCollection|ChildCategory[] List of ChildCategory objects | [
"Gets",
"ancestors",
"for",
"the",
"given",
"node",
"starting",
"with",
"the",
"root",
"node",
"Use",
"it",
"for",
"breadcrumb",
"paths",
"for",
"instance"
] | 81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8 | https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Category.php#L3141-L3152 |
196,346 | t3v/t3v_core | Classes/Controller/AbstractController.php | AbstractController.assignOriginalArguments | protected function assignOriginalArguments() {
$originalRequest = $this->request->getOriginalRequest();
if (!empty($originalRequest)) {
$originalArguments = $originalRequest->getArguments();
$this->view->assign('originalArguments', $originalArguments);
}
} | php | protected function assignOriginalArguments() {
$originalRequest = $this->request->getOriginalRequest();
if (!empty($originalRequest)) {
$originalArguments = $originalRequest->getArguments();
$this->view->assign('originalArguments', $originalArguments);
}
} | [
"protected",
"function",
"assignOriginalArguments",
"(",
")",
"{",
"$",
"originalRequest",
"=",
"$",
"this",
"->",
"request",
"->",
"getOriginalRequest",
"(",
")",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"originalRequest",
")",
")",
"{",
"$",
"originalArgume... | Assigns the arguments from the original request. | [
"Assigns",
"the",
"arguments",
"from",
"the",
"original",
"request",
"."
] | 8c04b7688cc2773f11fcc87fda3f7cd53d80a980 | https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Controller/AbstractController.php#L23-L31 |
196,347 | lanfisis/deflection | src/Deflection/Element/Docblock.php | Docblock.setDescription | public function setDescription($text, $length = 80)
{
$description = array();
$split = str_split($text, $length);
array_walk($split, function ($value) use (&$description) {
$description[] = $value;
});
$this->description = $description;
return $this;
} | php | public function setDescription($text, $length = 80)
{
$description = array();
$split = str_split($text, $length);
array_walk($split, function ($value) use (&$description) {
$description[] = $value;
});
$this->description = $description;
return $this;
} | [
"public",
"function",
"setDescription",
"(",
"$",
"text",
",",
"$",
"length",
"=",
"80",
")",
"{",
"$",
"description",
"=",
"array",
"(",
")",
";",
"$",
"split",
"=",
"str_split",
"(",
"$",
"text",
",",
"$",
"length",
")",
";",
"array_walk",
"(",
"... | Set description at top of docblock
@param string $text Description
@param int $length Length to split line
@return \Deflection\Element\Docblock | [
"Set",
"description",
"at",
"top",
"of",
"docblock"
] | 31deaf7f085d6456d8a323e7ac3cc9914fbe49a9 | https://github.com/lanfisis/deflection/blob/31deaf7f085d6456d8a323e7ac3cc9914fbe49a9/src/Deflection/Element/Docblock.php#L52-L61 |
196,348 | lanfisis/deflection | src/Deflection/Element/Docblock.php | Docblock.addVar | public function addVar($name, $type = '', $description = '')
{
$this->var_types[$name] = $type == '' ? $type : $type.' ';
$this->var_descriptions[$name] = $description;
return $this;
} | php | public function addVar($name, $type = '', $description = '')
{
$this->var_types[$name] = $type == '' ? $type : $type.' ';
$this->var_descriptions[$name] = $description;
return $this;
} | [
"public",
"function",
"addVar",
"(",
"$",
"name",
",",
"$",
"type",
"=",
"''",
",",
"$",
"description",
"=",
"''",
")",
"{",
"$",
"this",
"->",
"var_types",
"[",
"$",
"name",
"]",
"=",
"$",
"type",
"==",
"''",
"?",
"$",
"type",
":",
"$",
"type"... | Add a var on a docblock
@param string $name Var name
@param string $type Var type like string, boolean, ...
@param string $description Var description
@return \Deflection\Element\Docblock | [
"Add",
"a",
"var",
"on",
"a",
"docblock"
] | 31deaf7f085d6456d8a323e7ac3cc9914fbe49a9 | https://github.com/lanfisis/deflection/blob/31deaf7f085d6456d8a323e7ac3cc9914fbe49a9/src/Deflection/Element/Docblock.php#L72-L77 |
196,349 | OxfordInfoLabs/kinikit-core | src/Util/DateTimeUtils.php | DateTimeUtils.convertDate | public static function convertDate($sourceFormat, $targetFormat, $value) {
$dateObject = date_create_from_format($sourceFormat, $value);
if ($dateObject) {
return $dateObject->format($targetFormat);
} else {
return null;
}
} | php | public static function convertDate($sourceFormat, $targetFormat, $value) {
$dateObject = date_create_from_format($sourceFormat, $value);
if ($dateObject) {
return $dateObject->format($targetFormat);
} else {
return null;
}
} | [
"public",
"static",
"function",
"convertDate",
"(",
"$",
"sourceFormat",
",",
"$",
"targetFormat",
",",
"$",
"value",
")",
"{",
"$",
"dateObject",
"=",
"date_create_from_format",
"(",
"$",
"sourceFormat",
",",
"$",
"value",
")",
";",
"if",
"(",
"$",
"dateO... | Convert a date from one format to another
@param $sourceFormat
@param $targetFormat
@param $value | [
"Convert",
"a",
"date",
"from",
"one",
"format",
"to",
"another"
] | edc1b2e6ffabd595c4c7d322279b3dd1e59ef359 | https://github.com/OxfordInfoLabs/kinikit-core/blob/edc1b2e6ffabd595c4c7d322279b3dd1e59ef359/src/Util/DateTimeUtils.php#L19-L26 |
196,350 | OxfordInfoLabs/kinikit-core | src/Util/DateTimeUtils.php | DateTimeUtils.convertSecondsToElapsedTime | public static function convertSecondsToElapsedTime($seconds) {
// Hours component
$hours = floor($seconds / 3600);
// Minutes component
$remainder = $seconds - ($hours * 3600);
$minutes = floor($remainder / 60);
// Seconds component
$seconds = round($remainder ... | php | public static function convertSecondsToElapsedTime($seconds) {
// Hours component
$hours = floor($seconds / 3600);
// Minutes component
$remainder = $seconds - ($hours * 3600);
$minutes = floor($remainder / 60);
// Seconds component
$seconds = round($remainder ... | [
"public",
"static",
"function",
"convertSecondsToElapsedTime",
"(",
"$",
"seconds",
")",
"{",
"// Hours component",
"$",
"hours",
"=",
"floor",
"(",
"$",
"seconds",
"/",
"3600",
")",
";",
"// Minutes component",
"$",
"remainder",
"=",
"$",
"seconds",
"-",
"(",... | Convert seconds to an elapsed time value
@param $seconds | [
"Convert",
"seconds",
"to",
"an",
"elapsed",
"time",
"value"
] | edc1b2e6ffabd595c4c7d322279b3dd1e59ef359 | https://github.com/OxfordInfoLabs/kinikit-core/blob/edc1b2e6ffabd595c4c7d322279b3dd1e59ef359/src/Util/DateTimeUtils.php#L34-L49 |
196,351 | ringoteam/RingoPhpRedmonBundle | Controller/Controller.php | Controller.getCurrentInstance | protected function getCurrentInstance()
{
$instance = $this->getRequest()->getSession()->get('instance');
if($instance) {
// Update of instance to have last logs created
$instance = $this->getManager()->find($instance->getId());
}
return $instance;
... | php | protected function getCurrentInstance()
{
$instance = $this->getRequest()->getSession()->get('instance');
if($instance) {
// Update of instance to have last logs created
$instance = $this->getManager()->find($instance->getId());
}
return $instance;
... | [
"protected",
"function",
"getCurrentInstance",
"(",
")",
"{",
"$",
"instance",
"=",
"$",
"this",
"->",
"getRequest",
"(",
")",
"->",
"getSession",
"(",
")",
"->",
"get",
"(",
"'instance'",
")",
";",
"if",
"(",
"$",
"instance",
")",
"{",
"// Update of ins... | Get the current instance if exists
@return mixed | [
"Get",
"the",
"current",
"instance",
"if",
"exists"
] | 9aab989a9bee9e6152ec19f8a30bc24f3bde6012 | https://github.com/ringoteam/RingoPhpRedmonBundle/blob/9aab989a9bee9e6152ec19f8a30bc24f3bde6012/Controller/Controller.php#L39-L48 |
196,352 | ringoteam/RingoPhpRedmonBundle | Controller/Controller.php | Controller.getWorker | protected function getWorker()
{
$instance = $this->getCurrentInstance();
if($instance) {
// Initialized with the current instance
$worker = $this->get('ringo_php_redmon.instance_worker')->setInstance($instance);
// We return worker only if the server... | php | protected function getWorker()
{
$instance = $this->getCurrentInstance();
if($instance) {
// Initialized with the current instance
$worker = $this->get('ringo_php_redmon.instance_worker')->setInstance($instance);
// We return worker only if the server... | [
"protected",
"function",
"getWorker",
"(",
")",
"{",
"$",
"instance",
"=",
"$",
"this",
"->",
"getCurrentInstance",
"(",
")",
";",
"if",
"(",
"$",
"instance",
")",
"{",
"// Initialized with the current instance",
"$",
"worker",
"=",
"$",
"this",
"->",
"get",... | Get instance worker initialized with current instance
@return boolean | [
"Get",
"instance",
"worker",
"initialized",
"with",
"current",
"instance"
] | 9aab989a9bee9e6152ec19f8a30bc24f3bde6012 | https://github.com/ringoteam/RingoPhpRedmonBundle/blob/9aab989a9bee9e6152ec19f8a30bc24f3bde6012/Controller/Controller.php#L55-L72 |
196,353 | miaoxing/plugin | src/Service/Plugin.php | Plugin.getConfig | public function getConfig($refresh = false)
{
return $this->getCache('plugins-config', $refresh, function () {
return [
'wei' => [
'aliases' => $this->getWeiAliases(),
],
'app' => [
'controllerMap' => $this->... | php | public function getConfig($refresh = false)
{
return $this->getCache('plugins-config', $refresh, function () {
return [
'wei' => [
'aliases' => $this->getWeiAliases(),
],
'app' => [
'controllerMap' => $this->... | [
"public",
"function",
"getConfig",
"(",
"$",
"refresh",
"=",
"false",
")",
"{",
"return",
"$",
"this",
"->",
"getCache",
"(",
"'plugins-config'",
",",
"$",
"refresh",
",",
"function",
"(",
")",
"{",
"return",
"[",
"'wei'",
"=>",
"[",
"'aliases'",
"=>",
... | Receive plugin relatives service configs
@param bool $refresh
@return array | [
"Receive",
"plugin",
"relatives",
"service",
"configs"
] | f287a1e6c97abba6f06906255b8c26e8ab0afe61 | https://github.com/miaoxing/plugin/blob/f287a1e6c97abba6f06906255b8c26e8ab0afe61/src/Service/Plugin.php#L119-L134 |
196,354 | miaoxing/plugin | src/Service/Plugin.php | Plugin.getPluginClasses | protected function getPluginClasses($refresh = false)
{
if ($refresh || !$this->pluginClasses) {
$this->pluginClasses = [];
$files = $this->globByDirs($this->dirs, '/Plugin.php');
foreach ($files as $file) {
$class = $this->guessClassName($file);
... | php | protected function getPluginClasses($refresh = false)
{
if ($refresh || !$this->pluginClasses) {
$this->pluginClasses = [];
$files = $this->globByDirs($this->dirs, '/Plugin.php');
foreach ($files as $file) {
$class = $this->guessClassName($file);
... | [
"protected",
"function",
"getPluginClasses",
"(",
"$",
"refresh",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"refresh",
"||",
"!",
"$",
"this",
"->",
"pluginClasses",
")",
"{",
"$",
"this",
"->",
"pluginClasses",
"=",
"[",
"]",
";",
"$",
"files",
"=",
"... | Get all plugin classes
@param bool $refresh
@return array
@throws Exception | [
"Get",
"all",
"plugin",
"classes"
] | f287a1e6c97abba6f06906255b8c26e8ab0afe61 | https://github.com/miaoxing/plugin/blob/f287a1e6c97abba6f06906255b8c26e8ab0afe61/src/Service/Plugin.php#L163-L180 |
196,355 | miaoxing/plugin | src/Service/Plugin.php | Plugin.parseResource | public function parseResource($resource)
{
$pluginId = $file = null;
if (isset($resource[0]) && $resource[0] == '@') {
list($pluginId, $file) = explode('/', $resource, 2);
$pluginId = substr($pluginId, 1);
}
// @deprecated
if (strpos($resource, ':') !... | php | public function parseResource($resource)
{
$pluginId = $file = null;
if (isset($resource[0]) && $resource[0] == '@') {
list($pluginId, $file) = explode('/', $resource, 2);
$pluginId = substr($pluginId, 1);
}
// @deprecated
if (strpos($resource, ':') !... | [
"public",
"function",
"parseResource",
"(",
"$",
"resource",
")",
"{",
"$",
"pluginId",
"=",
"$",
"file",
"=",
"null",
";",
"if",
"(",
"isset",
"(",
"$",
"resource",
"[",
"0",
"]",
")",
"&&",
"$",
"resource",
"[",
"0",
"]",
"==",
"'@'",
")",
"{",... | Parse a resource and return the components contains path and file
@param string $resource
@return array|false Returns false when resource is not starts with @ | [
"Parse",
"a",
"resource",
"and",
"return",
"the",
"components",
"contains",
"path",
"and",
"file"
] | f287a1e6c97abba6f06906255b8c26e8ab0afe61 | https://github.com/miaoxing/plugin/blob/f287a1e6c97abba6f06906255b8c26e8ab0afe61/src/Service/Plugin.php#L206-L228 |
196,356 | miaoxing/plugin | src/Service/Plugin.php | Plugin.install | public function install($id)
{
$plugin = $this->getById($id);
if (!$plugin) {
return ['code' => -1, 'message' => 'Plugin not found'];
}
if ($this->isInstalled($id)) {
return ['code' => -2, 'message' => 'Plugin has been installed'];
}
$ret = $... | php | public function install($id)
{
$plugin = $this->getById($id);
if (!$plugin) {
return ['code' => -1, 'message' => 'Plugin not found'];
}
if ($this->isInstalled($id)) {
return ['code' => -2, 'message' => 'Plugin has been installed'];
}
$ret = $... | [
"public",
"function",
"install",
"(",
"$",
"id",
")",
"{",
"$",
"plugin",
"=",
"$",
"this",
"->",
"getById",
"(",
"$",
"id",
")",
";",
"if",
"(",
"!",
"$",
"plugin",
")",
"{",
"return",
"[",
"'code'",
"=>",
"-",
"1",
",",
"'message'",
"=>",
"'P... | Install a plugin by ID
@param string $id
@return array | [
"Install",
"a",
"plugin",
"by",
"ID"
] | f287a1e6c97abba6f06906255b8c26e8ab0afe61 | https://github.com/miaoxing/plugin/blob/f287a1e6c97abba6f06906255b8c26e8ab0afe61/src/Service/Plugin.php#L338-L361 |
196,357 | miaoxing/plugin | src/Service/Plugin.php | Plugin.uninstall | public function uninstall($id)
{
$plugin = $this->getById($id);
if (!$plugin) {
return ['code' => -3, 'message' => 'Plugin not found'];
}
if (!$this->isInstalled($id)) {
return ['code' => -4, 'message' => 'Plugin not installed'];
}
if ($this-... | php | public function uninstall($id)
{
$plugin = $this->getById($id);
if (!$plugin) {
return ['code' => -3, 'message' => 'Plugin not found'];
}
if (!$this->isInstalled($id)) {
return ['code' => -4, 'message' => 'Plugin not installed'];
}
if ($this-... | [
"public",
"function",
"uninstall",
"(",
"$",
"id",
")",
"{",
"$",
"plugin",
"=",
"$",
"this",
"->",
"getById",
"(",
"$",
"id",
")",
";",
"if",
"(",
"!",
"$",
"plugin",
")",
"{",
"return",
"[",
"'code'",
"=>",
"-",
"3",
",",
"'message'",
"=>",
"... | Uninstall a plugin by ID
@param string $id
@return array | [
"Uninstall",
"a",
"plugin",
"by",
"ID"
] | f287a1e6c97abba6f06906255b8c26e8ab0afe61 | https://github.com/miaoxing/plugin/blob/f287a1e6c97abba6f06906255b8c26e8ab0afe61/src/Service/Plugin.php#L369-L400 |
196,358 | miaoxing/plugin | src/Service/Plugin.php | Plugin.getPluginClass | protected function getPluginClass($id)
{
return isset($this->pluginClasses[$id]) ? $this->pluginClasses[$id] : null;
} | php | protected function getPluginClass($id)
{
return isset($this->pluginClasses[$id]) ? $this->pluginClasses[$id] : null;
} | [
"protected",
"function",
"getPluginClass",
"(",
"$",
"id",
")",
"{",
"return",
"isset",
"(",
"$",
"this",
"->",
"pluginClasses",
"[",
"$",
"id",
"]",
")",
"?",
"$",
"this",
"->",
"pluginClasses",
"[",
"$",
"id",
"]",
":",
"null",
";",
"}"
] | Returns the plugin class by plugin ID
@param string $id
@return string | [
"Returns",
"the",
"plugin",
"class",
"by",
"plugin",
"ID"
] | f287a1e6c97abba6f06906255b8c26e8ab0afe61 | https://github.com/miaoxing/plugin/blob/f287a1e6c97abba6f06906255b8c26e8ab0afe61/src/Service/Plugin.php#L441-L444 |
196,359 | miaoxing/plugin | src/Service/Plugin.php | Plugin.getEventsById | protected function getEventsById($id)
{
$events = [];
$methods = get_class_methods($this->getPluginClass($id));
foreach ($methods as $method) {
// The event naming is onName[Priority],eg onProductShowItem50
if (substr($method, 0, 2) != 'on') {
continue... | php | protected function getEventsById($id)
{
$events = [];
$methods = get_class_methods($this->getPluginClass($id));
foreach ($methods as $method) {
// The event naming is onName[Priority],eg onProductShowItem50
if (substr($method, 0, 2) != 'on') {
continue... | [
"protected",
"function",
"getEventsById",
"(",
"$",
"id",
")",
"{",
"$",
"events",
"=",
"[",
"]",
";",
"$",
"methods",
"=",
"get_class_methods",
"(",
"$",
"this",
"->",
"getPluginClass",
"(",
"$",
"id",
")",
")",
";",
"foreach",
"(",
"$",
"methods",
... | Returns the event definitions by plugin ID
@param string $id
@return array | [
"Returns",
"the",
"event",
"definitions",
"by",
"plugin",
"ID"
] | f287a1e6c97abba6f06906255b8c26e8ab0afe61 | https://github.com/miaoxing/plugin/blob/f287a1e6c97abba6f06906255b8c26e8ab0afe61/src/Service/Plugin.php#L487-L506 |
196,360 | miaoxing/plugin | src/Service/Plugin.php | Plugin.loadEvent | public function loadEvent($name)
{
// 1. Load event data only once
if (isset($this->loadedEvents[$name])) {
return;
}
$this->loadedEvents[$name] = true;
// 2. Get event handlers
$events = $this->getEvents();
if (!isset($events[$name])) {
... | php | public function loadEvent($name)
{
// 1. Load event data only once
if (isset($this->loadedEvents[$name])) {
return;
}
$this->loadedEvents[$name] = true;
// 2. Get event handlers
$events = $this->getEvents();
if (!isset($events[$name])) {
... | [
"public",
"function",
"loadEvent",
"(",
"$",
"name",
")",
"{",
"// 1. Load event data only once",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"loadedEvents",
"[",
"$",
"name",
"]",
")",
")",
"{",
"return",
";",
"}",
"$",
"this",
"->",
"loadedEvents",
"["... | Load plugin event by name
@param string $name | [
"Load",
"plugin",
"event",
"by",
"name"
] | f287a1e6c97abba6f06906255b8c26e8ab0afe61 | https://github.com/miaoxing/plugin/blob/f287a1e6c97abba6f06906255b8c26e8ab0afe61/src/Service/Plugin.php#L513-L543 |
196,361 | miaoxing/plugin | src/Service/Plugin.php | Plugin.generateClassMap | public function generateClassMap(array $dirs, $pattern, $type, $ignoreProject = true)
{
$patterns = (array) $pattern;
$types = (array) $type;
$map = [];
foreach ($patterns as $i => $pattern) {
$files = $this->globByDirs($dirs, $pattern);
foreach ($files as $f... | php | public function generateClassMap(array $dirs, $pattern, $type, $ignoreProject = true)
{
$patterns = (array) $pattern;
$types = (array) $type;
$map = [];
foreach ($patterns as $i => $pattern) {
$files = $this->globByDirs($dirs, $pattern);
foreach ($files as $f... | [
"public",
"function",
"generateClassMap",
"(",
"array",
"$",
"dirs",
",",
"$",
"pattern",
",",
"$",
"type",
",",
"$",
"ignoreProject",
"=",
"true",
")",
"{",
"$",
"patterns",
"=",
"(",
"array",
")",
"$",
"pattern",
";",
"$",
"types",
"=",
"(",
"array... | Generate class map
@param array $dirs
@param string|array $pattern
@param string|array $type
@param bool $ignoreProject
@return array
@throws Exception | [
"Generate",
"class",
"map"
] | f287a1e6c97abba6f06906255b8c26e8ab0afe61 | https://github.com/miaoxing/plugin/blob/f287a1e6c97abba6f06906255b8c26e8ab0afe61/src/Service/Plugin.php#L555-L580 |
196,362 | miaoxing/plugin | src/Service/Plugin.php | Plugin.guessClassName | protected function guessClassName($file, $ignoreProject = false)
{
// 假设为根目录
if ($file[0] === '.') {
$file = '\\' . ltrim($file, './');
}
list($dir, $className) = explode('src/', $file);
// TODO V2 处理V2的插件形式
if ($dir == '\\') {
$dir = '';
... | php | protected function guessClassName($file, $ignoreProject = false)
{
// 假设为根目录
if ($file[0] === '.') {
$file = '\\' . ltrim($file, './');
}
list($dir, $className) = explode('src/', $file);
// TODO V2 处理V2的插件形式
if ($dir == '\\') {
$dir = '';
... | [
"protected",
"function",
"guessClassName",
"(",
"$",
"file",
",",
"$",
"ignoreProject",
"=",
"false",
")",
"{",
"// 假设为根目录",
"if",
"(",
"$",
"file",
"[",
"0",
"]",
"===",
"'.'",
")",
"{",
"$",
"file",
"=",
"'\\\\'",
".",
"ltrim",
"(",
"$",
"file",
... | Guest class name by file name
@param string $file
@param bool $ignoreProject
@return string
@throws Exception | [
"Guest",
"class",
"name",
"by",
"file",
"name"
] | f287a1e6c97abba6f06906255b8c26e8ab0afe61 | https://github.com/miaoxing/plugin/blob/f287a1e6c97abba6f06906255b8c26e8ab0afe61/src/Service/Plugin.php#L599-L632 |
196,363 | miaoxing/plugin | src/Service/Plugin.php | Plugin.getShortName | protected function getShortName($class, $type)
{
// 获取类名中,类型之后的半段
// 如Miaoxing\User\Controller\Admins\User返回Admin\User
$name = explode('\\' . $type . '\\', $class, 2)[1];
// 将名称转换为小写
$pos = strrpos($name, '\\');
$pos = $pos === false ? 0 : $pos + 1;
$name[$po... | php | protected function getShortName($class, $type)
{
// 获取类名中,类型之后的半段
// 如Miaoxing\User\Controller\Admins\User返回Admin\User
$name = explode('\\' . $type . '\\', $class, 2)[1];
// 将名称转换为小写
$pos = strrpos($name, '\\');
$pos = $pos === false ? 0 : $pos + 1;
$name[$po... | [
"protected",
"function",
"getShortName",
"(",
"$",
"class",
",",
"$",
"type",
")",
"{",
"// 获取类名中,类型之后的半段",
"// 如Miaoxing\\User\\Controller\\Admins\\User返回Admin\\User",
"$",
"name",
"=",
"explode",
"(",
"'\\\\'",
".",
"$",
"type",
".",
"'\\\\'",
",",
"$",
"class",... | Return short name of class by specified type
@param string $class
@param string $type
@return string | [
"Return",
"short",
"name",
"of",
"class",
"by",
"specified",
"type"
] | f287a1e6c97abba6f06906255b8c26e8ab0afe61 | https://github.com/miaoxing/plugin/blob/f287a1e6c97abba6f06906255b8c26e8ab0afe61/src/Service/Plugin.php#L641-L654 |
196,364 | miaoxing/plugin | src/Service/Plugin.php | Plugin.globByDirs | protected function globByDirs(array $dirs, $pattern)
{
$dirs = implode(',', $dirs);
$pattern = '{' . $dirs . '}' . $pattern;
return glob($pattern, GLOB_BRACE | GLOB_NOSORT);
} | php | protected function globByDirs(array $dirs, $pattern)
{
$dirs = implode(',', $dirs);
$pattern = '{' . $dirs . '}' . $pattern;
return glob($pattern, GLOB_BRACE | GLOB_NOSORT);
} | [
"protected",
"function",
"globByDirs",
"(",
"array",
"$",
"dirs",
",",
"$",
"pattern",
")",
"{",
"$",
"dirs",
"=",
"implode",
"(",
"','",
",",
"$",
"dirs",
")",
";",
"$",
"pattern",
"=",
"'{'",
".",
"$",
"dirs",
".",
"'}'",
".",
"$",
"pattern",
"... | Find files matching a pattern in specified directories
@param array $dirs
@param string $pattern
@return array | [
"Find",
"files",
"matching",
"a",
"pattern",
"in",
"specified",
"directories"
] | f287a1e6c97abba6f06906255b8c26e8ab0afe61 | https://github.com/miaoxing/plugin/blob/f287a1e6c97abba6f06906255b8c26e8ab0afe61/src/Service/Plugin.php#L663-L669 |
196,365 | miaoxing/plugin | src/Service/Plugin.php | Plugin.setInstalledIds | protected function setInstalledIds(array $pluginIds)
{
$app = $this->app->getRecord();
$app['pluginIds'] = array_filter($pluginIds);
$app->save();
return $this;
} | php | protected function setInstalledIds(array $pluginIds)
{
$app = $this->app->getRecord();
$app['pluginIds'] = array_filter($pluginIds);
$app->save();
return $this;
} | [
"protected",
"function",
"setInstalledIds",
"(",
"array",
"$",
"pluginIds",
")",
"{",
"$",
"app",
"=",
"$",
"this",
"->",
"app",
"->",
"getRecord",
"(",
")",
";",
"$",
"app",
"[",
"'pluginIds'",
"]",
"=",
"array_filter",
"(",
"$",
"pluginIds",
")",
";"... | Stores installed plugin IDs
@param array $pluginIds
@return $this | [
"Stores",
"installed",
"plugin",
"IDs"
] | f287a1e6c97abba6f06906255b8c26e8ab0afe61 | https://github.com/miaoxing/plugin/blob/f287a1e6c97abba6f06906255b8c26e8ab0afe61/src/Service/Plugin.php#L746-L753 |
196,366 | shgysk8zer0/core_api | traits/files.php | Files.fclose | final protected function fclose()
{
$this->_fhandle = null;
$this->flocked = false;
$this->use_include_path = false;
} | php | final protected function fclose()
{
$this->_fhandle = null;
$this->flocked = false;
$this->use_include_path = false;
} | [
"final",
"protected",
"function",
"fclose",
"(",
")",
"{",
"$",
"this",
"->",
"_fhandle",
"=",
"null",
";",
"$",
"this",
"->",
"flocked",
"=",
"false",
";",
"$",
"this",
"->",
"use_include_path",
"=",
"false",
";",
"}"
] | "Closes" file. Only resets class variables
@return [type] [description] | [
"Closes",
"file",
".",
"Only",
"resets",
"class",
"variables"
] | 9e9b8baf761af874b95256ad2462e55fbb2b2e58 | https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/files.php#L66-L71 |
196,367 | shgysk8zer0/core_api | traits/files.php | Files.filesize | public function filesize()
{
if ($this->use_include_path) {
return filesize(stream_resolve_include_path($this->_fhandle));
} else {
return filesize($this->_fhandle);
}
} | php | public function filesize()
{
if ($this->use_include_path) {
return filesize(stream_resolve_include_path($this->_fhandle));
} else {
return filesize($this->_fhandle);
}
} | [
"public",
"function",
"filesize",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"use_include_path",
")",
"{",
"return",
"filesize",
"(",
"stream_resolve_include_path",
"(",
"$",
"this",
"->",
"_fhandle",
")",
")",
";",
"}",
"else",
"{",
"return",
"filesize"... | Gets file size
@param void
@return int The size of the file in bytes
@see https://php.net/manual/en/function.filesize.php | [
"Gets",
"file",
"size"
] | 9e9b8baf761af874b95256ad2462e55fbb2b2e58 | https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/files.php#L252-L259 |
196,368 | shgysk8zer0/core_api | traits/files.php | Files.fileinode | public function fileinode()
{
if ($this->use_include_path) {
return fileinode(stream_resolve_include_path($this->_fhandle));
} else {
return fileinode($this->_fhandle);
}
} | php | public function fileinode()
{
if ($this->use_include_path) {
return fileinode(stream_resolve_include_path($this->_fhandle));
} else {
return fileinode($this->_fhandle);
}
} | [
"public",
"function",
"fileinode",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"use_include_path",
")",
"{",
"return",
"fileinode",
"(",
"stream_resolve_include_path",
"(",
"$",
"this",
"->",
"_fhandle",
")",
")",
";",
"}",
"else",
"{",
"return",
"fileino... | Gets file inode
@param void
@return int inode number of the file
@see https://php.net/manual/en/function.fileinode.php | [
"Gets",
"file",
"inode"
] | 9e9b8baf761af874b95256ad2462e55fbb2b2e58 | https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/files.php#L268-L275 |
196,369 | shgysk8zer0/core_api | traits/files.php | Files.fileatime | public function fileatime()
{
if ($this->use_include_path) {
return fileatime(stream_resolve_include_path($this->_fhandle));
} else {
return fileatime($this->_fhandle);
}
} | php | public function fileatime()
{
if ($this->use_include_path) {
return fileatime(stream_resolve_include_path($this->_fhandle));
} else {
return fileatime($this->_fhandle);
}
} | [
"public",
"function",
"fileatime",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"use_include_path",
")",
"{",
"return",
"fileatime",
"(",
"stream_resolve_include_path",
"(",
"$",
"this",
"->",
"_fhandle",
")",
")",
";",
"}",
"else",
"{",
"return",
"fileati... | Gets last access time of file
@param void
@return int The time the file was last accessed | [
"Gets",
"last",
"access",
"time",
"of",
"file"
] | 9e9b8baf761af874b95256ad2462e55fbb2b2e58 | https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/files.php#L283-L290 |
196,370 | shgysk8zer0/core_api | traits/files.php | Files.filectime | public function filectime()
{
if ($this->use_include_path) {
return filectime(stream_resolve_include_path($this->_fhandle));
} else {
return filectime($this->_fhandle);
}
} | php | public function filectime()
{
if ($this->use_include_path) {
return filectime(stream_resolve_include_path($this->_fhandle));
} else {
return filectime($this->_fhandle);
}
} | [
"public",
"function",
"filectime",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"use_include_path",
")",
"{",
"return",
"filectime",
"(",
"stream_resolve_include_path",
"(",
"$",
"this",
"->",
"_fhandle",
")",
")",
";",
"}",
"else",
"{",
"return",
"filecti... | Gets inode change time of file
@param void
@return int The time the file was last changed | [
"Gets",
"inode",
"change",
"time",
"of",
"file"
] | 9e9b8baf761af874b95256ad2462e55fbb2b2e58 | https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/files.php#L298-L305 |
196,371 | shgysk8zer0/core_api | traits/files.php | Files.filemtime | public function filemtime()
{
if ($this->use_include_path) {
return filemtime(stream_resolve_include_path($this->_fhandle));
} else {
return filemtime($this->_fhandle);
}
} | php | public function filemtime()
{
if ($this->use_include_path) {
return filemtime(stream_resolve_include_path($this->_fhandle));
} else {
return filemtime($this->_fhandle);
}
} | [
"public",
"function",
"filemtime",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"use_include_path",
")",
"{",
"return",
"filemtime",
"(",
"stream_resolve_include_path",
"(",
"$",
"this",
"->",
"_fhandle",
")",
")",
";",
"}",
"else",
"{",
"return",
"filemti... | Gets file modification time
@param void
@return int The time the file was last modified | [
"Gets",
"file",
"modification",
"time"
] | 9e9b8baf761af874b95256ad2462e55fbb2b2e58 | https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/files.php#L313-L320 |
196,372 | shgysk8zer0/core_api | traits/files.php | Files.fileowner | public function fileowner()
{
if ($this->use_include_path) {
return fileowner(stream_resolve_include_path($this->_fhandle));
} else {
return fileowner($this->_fhandle);
}
} | php | public function fileowner()
{
if ($this->use_include_path) {
return fileowner(stream_resolve_include_path($this->_fhandle));
} else {
return fileowner($this->_fhandle);
}
} | [
"public",
"function",
"fileowner",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"use_include_path",
")",
"{",
"return",
"fileowner",
"(",
"stream_resolve_include_path",
"(",
"$",
"this",
"->",
"_fhandle",
")",
")",
";",
"}",
"else",
"{",
"return",
"fileown... | Gets file owner
@param void
@return int The user ID of the owner of the file | [
"Gets",
"file",
"owner"
] | 9e9b8baf761af874b95256ad2462e55fbb2b2e58 | https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/files.php#L328-L335 |
196,373 | shgysk8zer0/core_api | traits/files.php | Files.filegroup | public function filegroup()
{
if ($this->use_include_path) {
return filegroup(stream_resolve_include_path($this->_fhandle));
} else {
return filegroup($this->_fhandle);
}
} | php | public function filegroup()
{
if ($this->use_include_path) {
return filegroup(stream_resolve_include_path($this->_fhandle));
} else {
return filegroup($this->_fhandle);
}
} | [
"public",
"function",
"filegroup",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"use_include_path",
")",
"{",
"return",
"filegroup",
"(",
"stream_resolve_include_path",
"(",
"$",
"this",
"->",
"_fhandle",
")",
")",
";",
"}",
"else",
"{",
"return",
"filegro... | Gets file group
@param void
@return int The group ID of the file | [
"Gets",
"file",
"group"
] | 9e9b8baf761af874b95256ad2462e55fbb2b2e58 | https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/files.php#L343-L350 |
196,374 | shgysk8zer0/core_api | traits/files.php | Files.fileperms | public function fileperms()
{
if ($this->use_include_path) {
return fileperms(stream_resolve_include_path($this->_fhandle));
} else {
return fileperms($this->_fhandle);
}
} | php | public function fileperms()
{
if ($this->use_include_path) {
return fileperms(stream_resolve_include_path($this->_fhandle));
} else {
return fileperms($this->_fhandle);
}
} | [
"public",
"function",
"fileperms",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"use_include_path",
")",
"{",
"return",
"fileperms",
"(",
"stream_resolve_include_path",
"(",
"$",
"this",
"->",
"_fhandle",
")",
")",
";",
"}",
"else",
"{",
"return",
"fileper... | Gets file permissions
@param void
@return int The file's permissions as a numeric mode | [
"Gets",
"file",
"permissions"
] | 9e9b8baf761af874b95256ad2462e55fbb2b2e58 | https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/files.php#L358-L365 |
196,375 | anime-db/catalog-bundle | src/Entity/Storage.php | Storage.getTypeTitle | public function getTypeTitle()
{
return isset(self::$type_titles[$this->type]) ? self::$type_titles[$this->type] : '';
} | php | public function getTypeTitle()
{
return isset(self::$type_titles[$this->type]) ? self::$type_titles[$this->type] : '';
} | [
"public",
"function",
"getTypeTitle",
"(",
")",
"{",
"return",
"isset",
"(",
"self",
"::",
"$",
"type_titles",
"[",
"$",
"this",
"->",
"type",
"]",
")",
"?",
"self",
"::",
"$",
"type_titles",
"[",
"$",
"this",
"->",
"type",
"]",
":",
"''",
";",
"}"... | Get title for current type.
@return string | [
"Get",
"title",
"for",
"current",
"type",
"."
] | 631b6f92a654e91bee84f46218c52cf42bdb8606 | https://github.com/anime-db/catalog-bundle/blob/631b6f92a654e91bee84f46218c52cf42bdb8606/src/Entity/Storage.php#L315-L318 |
196,376 | CalderaWP/caldera-interop | src/Traits/Rest/ProvidesRestParams.php | ProvidesRestParams.getParam | public function getParam(string $paramName)
{
return $this->hasParam($paramName) ? $this->params[ $paramName ] : null;
} | php | public function getParam(string $paramName)
{
return $this->hasParam($paramName) ? $this->params[ $paramName ] : null;
} | [
"public",
"function",
"getParam",
"(",
"string",
"$",
"paramName",
")",
"{",
"return",
"$",
"this",
"->",
"hasParam",
"(",
"$",
"paramName",
")",
"?",
"$",
"this",
"->",
"params",
"[",
"$",
"paramName",
"]",
":",
"null",
";",
"}"
] | Get parameter from request
@param string $paramName
@return mixed | [
"Get",
"parameter",
"from",
"request"
] | d25c4bc930200b314fbd42d084080b5d85261c94 | https://github.com/CalderaWP/caldera-interop/blob/d25c4bc930200b314fbd42d084080b5d85261c94/src/Traits/Rest/ProvidesRestParams.php#L20-L23 |
196,377 | CalderaWP/caldera-interop | src/Traits/Rest/ProvidesRestParams.php | ProvidesRestParams.setParam | public function setParam(string $paramName, $paramValue): HttpRequestContract
{
$this->params[ $paramName ] = $paramValue;
return $this;
} | php | public function setParam(string $paramName, $paramValue): HttpRequestContract
{
$this->params[ $paramName ] = $paramValue;
return $this;
} | [
"public",
"function",
"setParam",
"(",
"string",
"$",
"paramName",
",",
"$",
"paramValue",
")",
":",
"HttpRequestContract",
"{",
"$",
"this",
"->",
"params",
"[",
"$",
"paramName",
"]",
"=",
"$",
"paramValue",
";",
"return",
"$",
"this",
";",
"}"
] | Set parameter in request
@param string $paramName
@param mixed $paramValue
@return $this | [
"Set",
"parameter",
"in",
"request"
] | d25c4bc930200b314fbd42d084080b5d85261c94 | https://github.com/CalderaWP/caldera-interop/blob/d25c4bc930200b314fbd42d084080b5d85261c94/src/Traits/Rest/ProvidesRestParams.php#L33-L37 |
196,378 | CismonX/ProcConnection | src/ProcConnection.php | ProcConnection.setArray | function setArray(array $options) {
foreach ($options as $key => $value) {
$this->set($key, $value);
}
return $this;
} | php | function setArray(array $options) {
foreach ($options as $key => $value) {
$this->set($key, $value);
}
return $this;
} | [
"function",
"setArray",
"(",
"array",
"$",
"options",
")",
"{",
"foreach",
"(",
"$",
"options",
"as",
"$",
"key",
"=>",
"$",
"value",
")",
"{",
"$",
"this",
"->",
"set",
"(",
"$",
"key",
",",
"$",
"value",
")",
";",
"}",
"return",
"$",
"this",
... | Multiple set options.
@param array $options
@return self | [
"Multiple",
"set",
"options",
"."
] | 497cd6f7261ce2fa5054648664049aadc07e1df2 | https://github.com/CismonX/ProcConnection/blob/497cd6f7261ce2fa5054648664049aadc07e1df2/src/ProcConnection.php#L119-L124 |
196,379 | CismonX/ProcConnection | src/ProcConnection.php | ProcConnection.run | function run(callable $callback = null) {
if (isset($this->res))
return null;
$this->res = proc_open($this->cmd, $this->descriptor_spec, $this->pipes, $this->cwd, $this->env);
if ($this->res) {
$this->stdout = new TcpConnection($this->pipes[1]);
if (is_callabl... | php | function run(callable $callback = null) {
if (isset($this->res))
return null;
$this->res = proc_open($this->cmd, $this->descriptor_spec, $this->pipes, $this->cwd, $this->env);
if ($this->res) {
$this->stdout = new TcpConnection($this->pipes[1]);
if (is_callabl... | [
"function",
"run",
"(",
"callable",
"$",
"callback",
"=",
"null",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"res",
")",
")",
"return",
"null",
";",
"$",
"this",
"->",
"res",
"=",
"proc_open",
"(",
"$",
"this",
"->",
"cmd",
",",
"$",
... | Execute command in a child process.
@param callable $callback
@return bool. | [
"Execute",
"command",
"in",
"a",
"child",
"process",
"."
] | 497cd6f7261ce2fa5054648664049aadc07e1df2 | https://github.com/CismonX/ProcConnection/blob/497cd6f7261ce2fa5054648664049aadc07e1df2/src/ProcConnection.php#L139-L160 |
196,380 | CismonX/ProcConnection | src/ProcConnection.php | ProcConnection.send | function send($data, $length = null) {
if (!isset($this->pipes[0]))
return 0;
if (!isset($length))
$length = strlen($data);
return intval(fwrite($this->pipes[0], $data, $length));
} | php | function send($data, $length = null) {
if (!isset($this->pipes[0]))
return 0;
if (!isset($length))
$length = strlen($data);
return intval(fwrite($this->pipes[0], $data, $length));
} | [
"function",
"send",
"(",
"$",
"data",
",",
"$",
"length",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"pipes",
"[",
"0",
"]",
")",
")",
"return",
"0",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"length",
")",
")",
"... | Write data to stdin pipe.
@param mixed $data
@param int|null $length
@return int : number of bytes written. | [
"Write",
"data",
"to",
"stdin",
"pipe",
"."
] | 497cd6f7261ce2fa5054648664049aadc07e1df2 | https://github.com/CismonX/ProcConnection/blob/497cd6f7261ce2fa5054648664049aadc07e1df2/src/ProcConnection.php#L168-L174 |
196,381 | CismonX/ProcConnection | src/ProcConnection.php | ProcConnection.close | function close() {
if (isset($this->res)) {
$this->stdout->close();
fclose($this->pipes[0]);
$status = $this->status();
$exit = $status['running'] ? proc_close($this->res) : $status['exitcode'];
unset($this->res, $this->pipes, $this->stdout);
... | php | function close() {
if (isset($this->res)) {
$this->stdout->close();
fclose($this->pipes[0]);
$status = $this->status();
$exit = $status['running'] ? proc_close($this->res) : $status['exitcode'];
unset($this->res, $this->pipes, $this->stdout);
... | [
"function",
"close",
"(",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"res",
")",
")",
"{",
"$",
"this",
"->",
"stdout",
"->",
"close",
"(",
")",
";",
"fclose",
"(",
"$",
"this",
"->",
"pipes",
"[",
"0",
"]",
")",
";",
"$",
"status"... | Terminate process.
@return int - exit code | [
"Terminate",
"process",
"."
] | 497cd6f7261ce2fa5054648664049aadc07e1df2 | https://github.com/CismonX/ProcConnection/blob/497cd6f7261ce2fa5054648664049aadc07e1df2/src/ProcConnection.php#L180-L190 |
196,382 | Kris-Kuiper/sFire-Framework | src/Validator/Form/Validator.php | Validator.validateAsArray | public function validateAsArray($bool = null) {
if(false === is_bool($bool) && null !== $bool) {
return trigger_error(sprintf('Argument 1 passed to %s() must be of the type boolean, "%s" given', __METHOD__, gettype($bool)), E_USER_ERROR);
}
if(null === $bool) {
$bool = true;
}
foreach($this... | php | public function validateAsArray($bool = null) {
if(false === is_bool($bool) && null !== $bool) {
return trigger_error(sprintf('Argument 1 passed to %s() must be of the type boolean, "%s" given', __METHOD__, gettype($bool)), E_USER_ERROR);
}
if(null === $bool) {
$bool = true;
}
foreach($this... | [
"public",
"function",
"validateAsArray",
"(",
"$",
"bool",
"=",
"null",
")",
"{",
"if",
"(",
"false",
"===",
"is_bool",
"(",
"$",
"bool",
")",
"&&",
"null",
"!==",
"$",
"bool",
")",
"{",
"return",
"trigger_error",
"(",
"sprintf",
"(",
"'Argument 1 passed... | Set a rule that a field value must be an array and all array items will be validated individual
@param boolean|null $bool
@return sFire\Validator | [
"Set",
"a",
"rule",
"that",
"a",
"field",
"value",
"must",
"be",
"an",
"array",
"and",
"all",
"array",
"items",
"will",
"be",
"validated",
"individual"
] | deefe1d9d2b40e7326381e8dcd4f01f9aa61885c | https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Validator/Form/Validator.php#L104-L119 |
196,383 | Kris-Kuiper/sFire-Framework | src/Validator/Form/Validator.php | Validator.combine | public function combine() {
$fieldnames = func_get_args();
$values = [];
foreach($fieldnames as $fieldname) {
if(false === is_string($fieldname)) {
return trigger_error(sprintf('All fieldnames used in "%s"() must be of the type string, "%s" given', __METHOD__, gettype($fieldname)), E_USER_ERROR... | php | public function combine() {
$fieldnames = func_get_args();
$values = [];
foreach($fieldnames as $fieldname) {
if(false === is_string($fieldname)) {
return trigger_error(sprintf('All fieldnames used in "%s"() must be of the type string, "%s" given', __METHOD__, gettype($fieldname)), E_USER_ERROR... | [
"public",
"function",
"combine",
"(",
")",
"{",
"$",
"fieldnames",
"=",
"func_get_args",
"(",
")",
";",
"$",
"values",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"fieldnames",
"as",
"$",
"fieldname",
")",
"{",
"if",
"(",
"false",
"===",
"is_string",
"(... | Combines multiple fields to be as one for validation
@return sFire\Validator\Combine | [
"Combines",
"multiple",
"fields",
"to",
"be",
"as",
"one",
"for",
"validation"
] | deefe1d9d2b40e7326381e8dcd4f01f9aa61885c | https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Validator/Form/Validator.php#L126-L147 |
196,384 | Kris-Kuiper/sFire-Framework | src/Validator/Form/Validator.php | Validator.token | public function token() {
$session = new Session();
$name = $this -> getValue('_token-name');
$value = $this -> getValue('_token-value');
if((null !== $name && null !== $value && $session -> pull(['_token', $name]) !== $value) || null === $name || null === $value) {
$instance = $this -> getM... | php | public function token() {
$session = new Session();
$name = $this -> getValue('_token-name');
$value = $this -> getValue('_token-value');
if((null !== $name && null !== $value && $session -> pull(['_token', $name]) !== $value) || null === $name || null === $value) {
$instance = $this -> getM... | [
"public",
"function",
"token",
"(",
")",
"{",
"$",
"session",
"=",
"new",
"Session",
"(",
")",
";",
"$",
"name",
"=",
"$",
"this",
"->",
"getValue",
"(",
"'_token-name'",
")",
";",
"$",
"value",
"=",
"$",
"this",
"->",
"getValue",
"(",
"'_token-value... | Validates token from input
@return array | [
"Validates",
"token",
"from",
"input"
] | deefe1d9d2b40e7326381e8dcd4f01f9aa61885c | https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Validator/Form/Validator.php#L154-L168 |
196,385 | Kris-Kuiper/sFire-Framework | src/Validator/Form/Validator.php | Validator.getMessageInstance | private function getMessageInstance() {
if(null === $this -> messageInstance) {
$this -> messageInstance = Message :: Instance();
}
return $this -> messageInstance;
} | php | private function getMessageInstance() {
if(null === $this -> messageInstance) {
$this -> messageInstance = Message :: Instance();
}
return $this -> messageInstance;
} | [
"private",
"function",
"getMessageInstance",
"(",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"this",
"->",
"messageInstance",
")",
"{",
"$",
"this",
"->",
"messageInstance",
"=",
"Message",
"::",
"Instance",
"(",
")",
";",
"}",
"return",
"$",
"this",
"->",... | Returns the instance for custom messsages
@return \sFire\Validator\Message | [
"Returns",
"the",
"instance",
"for",
"custom",
"messsages"
] | deefe1d9d2b40e7326381e8dcd4f01f9aa61885c | https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Validator/Form/Validator.php#L175-L182 |
196,386 | Kris-Kuiper/sFire-Framework | src/Validator/Form/Validator.php | Validator.isRequired | private function isRequired($field, $value) {
if(true === isset($this -> required[$field])) {
$empty = true;
if(true === is_array($value)) {
foreach($value as $val) {
if(strlen(trim($val)) > 0) {
$empty = false;
}
}
}
if(true === is_string($value) && strl... | php | private function isRequired($field, $value) {
if(true === isset($this -> required[$field])) {
$empty = true;
if(true === is_array($value)) {
foreach($value as $val) {
if(strlen(trim($val)) > 0) {
$empty = false;
}
}
}
if(true === is_string($value) && strl... | [
"private",
"function",
"isRequired",
"(",
"$",
"field",
",",
"$",
"value",
")",
"{",
"if",
"(",
"true",
"===",
"isset",
"(",
"$",
"this",
"->",
"required",
"[",
"$",
"field",
"]",
")",
")",
"{",
"$",
"empty",
"=",
"true",
";",
"if",
"(",
"true",
... | Evaluates if field value is required or not
@param $field string
@param $value string
@return boolean | [
"Evaluates",
"if",
"field",
"value",
"is",
"required",
"or",
"not"
] | deefe1d9d2b40e7326381e8dcd4f01f9aa61885c | https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Validator/Form/Validator.php#L266-L292 |
196,387 | Kris-Kuiper/sFire-Framework | src/Validator/Form/Validator.php | Validator.isValidateArray | private function isValidateArray($field) {
if(true === isset($this -> validateAsArray[$field])) {
return $this -> validateAsArray[$field];
}
return false;
} | php | private function isValidateArray($field) {
if(true === isset($this -> validateAsArray[$field])) {
return $this -> validateAsArray[$field];
}
return false;
} | [
"private",
"function",
"isValidateArray",
"(",
"$",
"field",
")",
"{",
"if",
"(",
"true",
"===",
"isset",
"(",
"$",
"this",
"->",
"validateAsArray",
"[",
"$",
"field",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"validateAsArray",
"[",
"$",
"field... | Evaluates if field value should be validated as an array
@param $field string
@return boolean | [
"Evaluates",
"if",
"field",
"value",
"should",
"be",
"validated",
"as",
"an",
"array"
] | deefe1d9d2b40e7326381e8dcd4f01f9aa61885c | https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Validator/Form/Validator.php#L300-L307 |
196,388 | Kris-Kuiper/sFire-Framework | src/Validator/Form/Validator.php | Validator.getRuleClass | private function getRuleClass($rule) {
if(false === is_string($rule)) {
return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($rule)), E_USER_ERROR);
}
if(true === isset($this -> custom[$rule])) {
return $this -> custom[$rule];
}
... | php | private function getRuleClass($rule) {
if(false === is_string($rule)) {
return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($rule)), E_USER_ERROR);
}
if(true === isset($this -> custom[$rule])) {
return $this -> custom[$rule];
}
... | [
"private",
"function",
"getRuleClass",
"(",
"$",
"rule",
")",
"{",
"if",
"(",
"false",
"===",
"is_string",
"(",
"$",
"rule",
")",
")",
"{",
"return",
"trigger_error",
"(",
"sprintf",
"(",
"'Argument 1 passed to %s() must be of the type string, \"%s\" given'",
",",
... | Returns the class of the rule
@param string $rule
@return string | [
"Returns",
"the",
"class",
"of",
"the",
"rule"
] | deefe1d9d2b40e7326381e8dcd4f01f9aa61885c | https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Validator/Form/Validator.php#L315-L326 |
196,389 | Kris-Kuiper/sFire-Framework | src/Validator/Form/Validator.php | Validator.setErrorMessage | private function setErrorMessage($rule, $class) {
$instance = $this -> getMessageInstance();
$message = $instance :: getMessage($rule -> field, $rule -> rule);
$message = null !== $message ? $message : $class -> getMessage();
$message = Translation :: translate($message, $rule -> parameters);
$mes... | php | private function setErrorMessage($rule, $class) {
$instance = $this -> getMessageInstance();
$message = $instance :: getMessage($rule -> field, $rule -> rule);
$message = null !== $message ? $message : $class -> getMessage();
$message = Translation :: translate($message, $rule -> parameters);
$mes... | [
"private",
"function",
"setErrorMessage",
"(",
"$",
"rule",
",",
"$",
"class",
")",
"{",
"$",
"instance",
"=",
"$",
"this",
"->",
"getMessageInstance",
"(",
")",
";",
"$",
"message",
"=",
"$",
"instance",
"::",
"getMessage",
"(",
"$",
"rule",
"->",
"fi... | Set the error message for particular rule
@param string $rule
@param object $class | [
"Set",
"the",
"error",
"message",
"for",
"particular",
"rule"
] | deefe1d9d2b40e7326381e8dcd4f01f9aa61885c | https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Validator/Form/Validator.php#L334-L347 |
196,390 | Kris-Kuiper/sFire-Framework | src/Validator/Form/Validator.php | Validator.getValue | private function getValue($field, $prefix = null) {
foreach($this -> combine as $combine) {
if($combine -> getName() === $field) {
return $combine -> combine();
}
}
//Prefix
if(null !== $prefix) {
$field = $prefix . '[' . $field . ']';
}
//Get the value
$helper = new Str... | php | private function getValue($field, $prefix = null) {
foreach($this -> combine as $combine) {
if($combine -> getName() === $field) {
return $combine -> combine();
}
}
//Prefix
if(null !== $prefix) {
$field = $prefix . '[' . $field . ']';
}
//Get the value
$helper = new Str... | [
"private",
"function",
"getValue",
"(",
"$",
"field",
",",
"$",
"prefix",
"=",
"null",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"combine",
"as",
"$",
"combine",
")",
"{",
"if",
"(",
"$",
"combine",
"->",
"getName",
"(",
")",
"===",
"$",
"field"... | Returns the value for a given field
@param string $field
@param string $prefix
@return mixed | [
"Returns",
"the",
"value",
"for",
"a",
"given",
"field"
] | deefe1d9d2b40e7326381e8dcd4f01f9aa61885c | https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Validator/Form/Validator.php#L370-L389 |
196,391 | fridge-project/dbal | src/Fridge/DBAL/Query/QueryBuilder.php | QueryBuilder.resetParts | public function resetParts(array $partNames = array())
{
if (empty($partNames)) {
$partNames = array_keys($this->parts);
}
foreach ($partNames as $partName) {
$this->resetPart($partName);
}
return $this;
} | php | public function resetParts(array $partNames = array())
{
if (empty($partNames)) {
$partNames = array_keys($this->parts);
}
foreach ($partNames as $partName) {
$this->resetPart($partName);
}
return $this;
} | [
"public",
"function",
"resetParts",
"(",
"array",
"$",
"partNames",
"=",
"array",
"(",
")",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"partNames",
")",
")",
"{",
"$",
"partNames",
"=",
"array_keys",
"(",
"$",
"this",
"->",
"parts",
")",
";",
"}",
"fo... | Resets query parts.
@param array $partNames The query part names to reset.
@return \Fridge\DBAL\Query\QueryBuilder The query builder. | [
"Resets",
"query",
"parts",
"."
] | d0b8c3551922d696836487aa0eb1bd74014edcd4 | https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Query/QueryBuilder.php#L169-L180 |
196,392 | fridge-project/dbal | src/Fridge/DBAL/Query/QueryBuilder.php | QueryBuilder.resetPart | public function resetPart($partName)
{
$this->parts[$partName] = is_array($this->parts[$partName]) ? array() : null;
return $this;
} | php | public function resetPart($partName)
{
$this->parts[$partName] = is_array($this->parts[$partName]) ? array() : null;
return $this;
} | [
"public",
"function",
"resetPart",
"(",
"$",
"partName",
")",
"{",
"$",
"this",
"->",
"parts",
"[",
"$",
"partName",
"]",
"=",
"is_array",
"(",
"$",
"this",
"->",
"parts",
"[",
"$",
"partName",
"]",
")",
"?",
"array",
"(",
")",
":",
"null",
";",
... | Resets a query part.
@param string $partName The query part name to reset.
@return \Fridge\DBAL\Query\QueryBuilder The query builder. | [
"Resets",
"a",
"query",
"part",
"."
] | d0b8c3551922d696836487aa0eb1bd74014edcd4 | https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Query/QueryBuilder.php#L189-L194 |
196,393 | fridge-project/dbal | src/Fridge/DBAL/Query/QueryBuilder.php | QueryBuilder.select | public function select($selects = array())
{
$this->type = self::SELECT;
if (!empty($selects)) {
$this->parts['select'] = array_merge($this->parts['select'], (array) $selects);
}
return $this;
} | php | public function select($selects = array())
{
$this->type = self::SELECT;
if (!empty($selects)) {
$this->parts['select'] = array_merge($this->parts['select'], (array) $selects);
}
return $this;
} | [
"public",
"function",
"select",
"(",
"$",
"selects",
"=",
"array",
"(",
")",
")",
"{",
"$",
"this",
"->",
"type",
"=",
"self",
"::",
"SELECT",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"selects",
")",
")",
"{",
"$",
"this",
"->",
"parts",
"[",
"'... | Sets the select query mode.
@param string|array $selects The fields to select.
@return \Fridge\DBAL\Query\QueryBuilder The query builder. | [
"Sets",
"the",
"select",
"query",
"mode",
"."
] | d0b8c3551922d696836487aa0eb1bd74014edcd4 | https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Query/QueryBuilder.php#L203-L212 |
196,394 | fridge-project/dbal | src/Fridge/DBAL/Query/QueryBuilder.php | QueryBuilder.insert | public function insert($insert)
{
$this->type = self::INSERT;
$this->from($insert);
return $this;
} | php | public function insert($insert)
{
$this->type = self::INSERT;
$this->from($insert);
return $this;
} | [
"public",
"function",
"insert",
"(",
"$",
"insert",
")",
"{",
"$",
"this",
"->",
"type",
"=",
"self",
"::",
"INSERT",
";",
"$",
"this",
"->",
"from",
"(",
"$",
"insert",
")",
";",
"return",
"$",
"this",
";",
"}"
] | Sets the insert query mode for a specific table.
@param string $insert The table name.
@return \Fridge\DBAL\Query\QueryBuilder The query builder. | [
"Sets",
"the",
"insert",
"query",
"mode",
"for",
"a",
"specific",
"table",
"."
] | d0b8c3551922d696836487aa0eb1bd74014edcd4 | https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Query/QueryBuilder.php#L221-L228 |
196,395 | fridge-project/dbal | src/Fridge/DBAL/Query/QueryBuilder.php | QueryBuilder.update | public function update($update, $alias = null)
{
$this->type = self::UPDATE;
$this->from($update, $alias);
return $this;
} | php | public function update($update, $alias = null)
{
$this->type = self::UPDATE;
$this->from($update, $alias);
return $this;
} | [
"public",
"function",
"update",
"(",
"$",
"update",
",",
"$",
"alias",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"type",
"=",
"self",
"::",
"UPDATE",
";",
"$",
"this",
"->",
"from",
"(",
"$",
"update",
",",
"$",
"alias",
")",
";",
"return",
"$",
... | Sets the update query mode for a specific table.
@param string $update The table name.
@param string $alias The table alias.
@return \Fridge\DBAL\Query\QueryBuilder The query builder. | [
"Sets",
"the",
"update",
"query",
"mode",
"for",
"a",
"specific",
"table",
"."
] | d0b8c3551922d696836487aa0eb1bd74014edcd4 | https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Query/QueryBuilder.php#L238-L245 |
196,396 | fridge-project/dbal | src/Fridge/DBAL/Query/QueryBuilder.php | QueryBuilder.delete | public function delete($delete, $alias = null)
{
$this->type = self::DELETE;
$this->from($delete, $alias);
return $this;
} | php | public function delete($delete, $alias = null)
{
$this->type = self::DELETE;
$this->from($delete, $alias);
return $this;
} | [
"public",
"function",
"delete",
"(",
"$",
"delete",
",",
"$",
"alias",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"type",
"=",
"self",
"::",
"DELETE",
";",
"$",
"this",
"->",
"from",
"(",
"$",
"delete",
",",
"$",
"alias",
")",
";",
"return",
"$",
... | Sets the delete query mode for a specific table.
@param string $delete The table name.
@param string $alias The table alias.
@return \Fridge\DBAL\Query\QueryBuilder The query builder. | [
"Sets",
"the",
"delete",
"query",
"mode",
"for",
"a",
"specific",
"table",
"."
] | d0b8c3551922d696836487aa0eb1bd74014edcd4 | https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Query/QueryBuilder.php#L255-L262 |
196,397 | fridge-project/dbal | src/Fridge/DBAL/Query/QueryBuilder.php | QueryBuilder.innerJoin | public function innerJoin($fromAlias, $join, $alias, $condition = null)
{
return $this->join($fromAlias, 'inner', $join, $alias, $condition);
} | php | public function innerJoin($fromAlias, $join, $alias, $condition = null)
{
return $this->join($fromAlias, 'inner', $join, $alias, $condition);
} | [
"public",
"function",
"innerJoin",
"(",
"$",
"fromAlias",
",",
"$",
"join",
",",
"$",
"alias",
",",
"$",
"condition",
"=",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"join",
"(",
"$",
"fromAlias",
",",
"'inner'",
",",
"$",
"join",
",",
"$",
"al... | Adds an "INNER JOIN" clause to the query.
@param string $fromAlias The from table alias.
@param string $join The join table name.
@param string $alias The join table alias.
@param string $condition The join condition.
@return \Fridge\DBAL\Query\QueryBuilder The query builder. | [
"Adds",
"an",
"INNER",
"JOIN",
"clause",
"to",
"the",
"query",
"."
] | d0b8c3551922d696836487aa0eb1bd74014edcd4 | https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Query/QueryBuilder.php#L292-L295 |
196,398 | fridge-project/dbal | src/Fridge/DBAL/Query/QueryBuilder.php | QueryBuilder.rightJoin | public function rightJoin($fromAlias, $join, $alias, $condition = null)
{
return $this->join($fromAlias, 'right', $join, $alias, $condition);
} | php | public function rightJoin($fromAlias, $join, $alias, $condition = null)
{
return $this->join($fromAlias, 'right', $join, $alias, $condition);
} | [
"public",
"function",
"rightJoin",
"(",
"$",
"fromAlias",
",",
"$",
"join",
",",
"$",
"alias",
",",
"$",
"condition",
"=",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"join",
"(",
"$",
"fromAlias",
",",
"'right'",
",",
"$",
"join",
",",
"$",
"al... | Adds a "RIGHT JOIN" clause to the query.
@param string $fromAlias The from table alias.
@param string $join The join table name.
@param string $alias The join table alias.
@param string $condition The join condition.
@return \Fridge\DBAL\Query\QueryBuilder The query builder. | [
"Adds",
"a",
"RIGHT",
"JOIN",
"clause",
"to",
"the",
"query",
"."
] | d0b8c3551922d696836487aa0eb1bd74014edcd4 | https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Query/QueryBuilder.php#L322-L325 |
196,399 | fridge-project/dbal | src/Fridge/DBAL/Query/QueryBuilder.php | QueryBuilder.where | public function where($expression, $type = Expression\Expression::TYPE_AND)
{
return $this->addExpression('where', $type, $expression);
} | php | public function where($expression, $type = Expression\Expression::TYPE_AND)
{
return $this->addExpression('where', $type, $expression);
} | [
"public",
"function",
"where",
"(",
"$",
"expression",
",",
"$",
"type",
"=",
"Expression",
"\\",
"Expression",
"::",
"TYPE_AND",
")",
"{",
"return",
"$",
"this",
"->",
"addExpression",
"(",
"'where'",
",",
"$",
"type",
",",
"$",
"expression",
")",
";",
... | Adds a "WHERE" clause to the query.
@param string|array|\Fridge\DBAL\Query\Expression\Expression $expression The expression.
@param string $type The expression type (AND, OR).
@return \Fridge\DBAL\Query\QueryBuilder The query builder. | [
"Adds",
"a",
"WHERE",
"clause",
"to",
"the",
"query",
"."
] | d0b8c3551922d696836487aa0eb1bd74014edcd4 | https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Query/QueryBuilder.php#L377-L380 |
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.