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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
194,700 | dms-org/common.structure | src/DateTime/TimeOfDay.php | TimeOfDay.fromString | public static function fromString(string $timeString) : TimeOfDay
{
$parts = array_map('intval', explode(':', $timeString)) + [1 => 0, 2 => 0];
return new self($parts[0], $parts[1], $parts[2]);
} | php | public static function fromString(string $timeString) : TimeOfDay
{
$parts = array_map('intval', explode(':', $timeString)) + [1 => 0, 2 => 0];
return new self($parts[0], $parts[1], $parts[2]);
} | [
"public",
"static",
"function",
"fromString",
"(",
"string",
"$",
"timeString",
")",
":",
"TimeOfDay",
"{",
"$",
"parts",
"=",
"array_map",
"(",
"'intval'",
",",
"explode",
"(",
"':'",
",",
"$",
"timeString",
")",
")",
"+",
"[",
"1",
"=>",
"0",
",",
... | Creates a time object from the supplied 24 hour time string
Expected format: HH[:MM[:SS]]
@param string $timeString
@return TimeOfDay | [
"Creates",
"a",
"time",
"object",
"from",
"the",
"supplied",
"24",
"hour",
"time",
"string"
] | 23f122182f60df5ec847047a81a39c8aab019ff1 | https://github.com/dms-org/common.structure/blob/23f122182f60df5ec847047a81a39c8aab019ff1/src/DateTime/TimeOfDay.php#L75-L79 |
194,701 | dms-org/common.structure | src/DateTime/TimeOfDay.php | TimeOfDay.secondsBetween | public function secondsBetween(TimeOfDay $other) : int
{
return abs($this->dateTime->getTimestamp() - $other->dateTime->getTimestamp());
} | php | public function secondsBetween(TimeOfDay $other) : int
{
return abs($this->dateTime->getTimestamp() - $other->dateTime->getTimestamp());
} | [
"public",
"function",
"secondsBetween",
"(",
"TimeOfDay",
"$",
"other",
")",
":",
"int",
"{",
"return",
"abs",
"(",
"$",
"this",
"->",
"dateTime",
"->",
"getTimestamp",
"(",
")",
"-",
"$",
"other",
"->",
"dateTime",
"->",
"getTimestamp",
"(",
")",
")",
... | Returns the amount of seconds between the supplied times.
@param TimeOfDay $other
@return int | [
"Returns",
"the",
"amount",
"of",
"seconds",
"between",
"the",
"supplied",
"times",
"."
] | 23f122182f60df5ec847047a81a39c8aab019ff1 | https://github.com/dms-org/common.structure/blob/23f122182f60df5ec847047a81a39c8aab019ff1/src/DateTime/TimeOfDay.php#L180-L183 |
194,702 | hamlet-framework/http | src/Requests/RequestTrait.php | RequestTrait.matchTokens | protected function matchTokens(array $pathTokens, array $patternTokens)
{
$matches = [];
for ($i = 1; $i < count($patternTokens); $i++) {
$pathToken = $pathTokens[$i];
$patternToken = $patternTokens[$i];
if ($pathToken == '' && $patternToken != '') {
... | php | protected function matchTokens(array $pathTokens, array $patternTokens)
{
$matches = [];
for ($i = 1; $i < count($patternTokens); $i++) {
$pathToken = $pathTokens[$i];
$patternToken = $patternTokens[$i];
if ($pathToken == '' && $patternToken != '') {
... | [
"protected",
"function",
"matchTokens",
"(",
"array",
"$",
"pathTokens",
",",
"array",
"$",
"patternTokens",
")",
"{",
"$",
"matches",
"=",
"[",
"]",
";",
"for",
"(",
"$",
"i",
"=",
"1",
";",
"$",
"i",
"<",
"count",
"(",
"$",
"patternTokens",
")",
... | Compare path tokens side by side. Returns false if no match, true if match without capture,
and array with matched tokens if used with capturing pattern
@param string[] $pathTokens
@param string[] $patternTokens
@return array<string,string>|bool | [
"Compare",
"path",
"tokens",
"side",
"by",
"side",
".",
"Returns",
"false",
"if",
"no",
"match",
"true",
"if",
"match",
"without",
"capture",
"and",
"array",
"with",
"matched",
"tokens",
"if",
"used",
"with",
"capturing",
"pattern"
] | 1d3f2a05d2914b678bf05bb53effccace82787c1 | https://github.com/hamlet-framework/http/blob/1d3f2a05d2914b678bf05bb53effccace82787c1/src/Requests/RequestTrait.php#L94-L116 |
194,703 | donbidon/lib-fs | src/Logger.php | Logger.setDefaults | public function setDefaults(array $options, bool $override = FALSE): void
{
$this->defaults = $options +
($override ? [] : [
'path' => null,
'maxSize' => self::DEFAULT_MAX_SIZE,
'rotation' => 0,
'rights' => null,
... | php | public function setDefaults(array $options, bool $override = FALSE): void
{
$this->defaults = $options +
($override ? [] : [
'path' => null,
'maxSize' => self::DEFAULT_MAX_SIZE,
'rotation' => 0,
'rights' => null,
... | [
"public",
"function",
"setDefaults",
"(",
"array",
"$",
"options",
",",
"bool",
"$",
"override",
"=",
"FALSE",
")",
":",
"void",
"{",
"$",
"this",
"->",
"defaults",
"=",
"$",
"options",
"+",
"(",
"$",
"override",
"?",
"[",
"]",
":",
"[",
"'path'",
... | Sets default options.
@param array $options
@param bool $override Flag specifying do override whole defaults
@return void
@see self::__construct() $options parameter description | [
"Sets",
"default",
"options",
"."
] | f0f131f2b0c1c4c7fdf075869242619fe1dcaa51 | https://github.com/donbidon/lib-fs/blob/f0f131f2b0c1c4c7fdf075869242619fe1dcaa51/src/Logger.php#L76-L85 |
194,704 | donbidon/lib-fs | src/Logger.php | Logger.log | public function log(string $message, string $path = null, array $options = []): void
{
$options =
$options +
(is_null($path) ? [] : ['path' => $path]) +
$this->defaults;
$path = $options['path'];
if (is_null($path)) {
throw new \Runtime... | php | public function log(string $message, string $path = null, array $options = []): void
{
$options =
$options +
(is_null($path) ? [] : ['path' => $path]) +
$this->defaults;
$path = $options['path'];
if (is_null($path)) {
throw new \Runtime... | [
"public",
"function",
"log",
"(",
"string",
"$",
"message",
",",
"string",
"$",
"path",
"=",
"null",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
":",
"void",
"{",
"$",
"options",
"=",
"$",
"options",
"+",
"(",
"is_null",
"(",
"$",
"path",
"... | Rotate log files and logs message.
@param string $message
@param string $path If null passed will be used from options
@param array $options
@return void
@throws \RuntimeException If path taken from args and options are missing.
@throws \RuntimeException If directory from path is invalid.
@see self::__constr... | [
"Rotate",
"log",
"files",
"and",
"logs",
"message",
"."
] | f0f131f2b0c1c4c7fdf075869242619fe1dcaa51 | https://github.com/donbidon/lib-fs/blob/f0f131f2b0c1c4c7fdf075869242619fe1dcaa51/src/Logger.php#L101-L143 |
194,705 | mossphp/moss-storage | Moss/Storage/Model/ModelBag.php | ModelBag.all | public function all($array = [])
{
if (!empty($array)) {
foreach ($array as $key => $model) {
$this->set($model, is_numeric($key) ? null : $key);
}
}
return $this->byAlias;
} | php | public function all($array = [])
{
if (!empty($array)) {
foreach ($array as $key => $model) {
$this->set($model, is_numeric($key) ? null : $key);
}
}
return $this->byAlias;
} | [
"public",
"function",
"all",
"(",
"$",
"array",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"array",
")",
")",
"{",
"foreach",
"(",
"$",
"array",
"as",
"$",
"key",
"=>",
"$",
"model",
")",
"{",
"$",
"this",
"->",
"set",
"(",
... | Returns all options
If array passed, becomes bag content
@param array $array overwrites values
@return ModelInterface[] | [
"Returns",
"all",
"options",
"If",
"array",
"passed",
"becomes",
"bag",
"content"
] | 0d123e7ae6bbfce1e2a18e73bf70997277b430c1 | https://github.com/mossphp/moss-storage/blob/0d123e7ae6bbfce1e2a18e73bf70997277b430c1/Moss/Storage/Model/ModelBag.php#L123-L132 |
194,706 | FuzeWorks/Core | src/FuzeWorks/Logger.php | Logger.errorHandler | public static function errorHandler($type = E_USER_NOTICE, $error = 'Undefined Error', $errFile = null, $errLine = null, $context = null)
{
// Check type
$thisType = self::getType($type);
$LOG = array('type' => (!is_null($thisType) ? $thisType : 'ERROR'),
'message' => (!is_null(... | php | public static function errorHandler($type = E_USER_NOTICE, $error = 'Undefined Error', $errFile = null, $errLine = null, $context = null)
{
// Check type
$thisType = self::getType($type);
$LOG = array('type' => (!is_null($thisType) ? $thisType : 'ERROR'),
'message' => (!is_null(... | [
"public",
"static",
"function",
"errorHandler",
"(",
"$",
"type",
"=",
"E_USER_NOTICE",
",",
"$",
"error",
"=",
"'Undefined Error'",
",",
"$",
"errFile",
"=",
"null",
",",
"$",
"errLine",
"=",
"null",
",",
"$",
"context",
"=",
"null",
")",
"{",
"// Check... | System that redirects the errors to the appropriate logging method.
@param int $type Error-type, Pre defined PHP Constant
@param string error. The error itself
@param string File. The absolute path of the file
@param int Line. The line on which the error occured.
@param array context. Some of the error's relevant vari... | [
"System",
"that",
"redirects",
"the",
"errors",
"to",
"the",
"appropriate",
"logging",
"method",
"."
] | 051c64fdaa3a648174cbd54557d05ad553dd826b | https://github.com/FuzeWorks/Core/blob/051c64fdaa3a648174cbd54557d05ad553dd826b/src/FuzeWorks/Logger.php#L195-L206 |
194,707 | FuzeWorks/Core | src/FuzeWorks/Logger.php | Logger.exceptionHandler | public static function exceptionHandler($exception)
{
$message = $exception->getMessage();
$code = $exception->getCode();
$file = $exception->getFile();
$line = $exception->getLine();
$context = $exception->getTraceAsString();
self::logError('Exception thrown: ' . $... | php | public static function exceptionHandler($exception)
{
$message = $exception->getMessage();
$code = $exception->getCode();
$file = $exception->getFile();
$line = $exception->getLine();
$context = $exception->getTraceAsString();
self::logError('Exception thrown: ' . $... | [
"public",
"static",
"function",
"exceptionHandler",
"(",
"$",
"exception",
")",
"{",
"$",
"message",
"=",
"$",
"exception",
"->",
"getMessage",
"(",
")",
";",
"$",
"code",
"=",
"$",
"exception",
"->",
"getCode",
"(",
")",
";",
"$",
"file",
"=",
"$",
... | Exception handler
Will be triggered when an uncaught exception occures. This function shows the error-message, and shuts down the script.
Please note that most of the user-defined exceptions will be caught in the router, and handled with the error-controller.
@param Exception $exception The occured exception. | [
"Exception",
"handler",
"Will",
"be",
"triggered",
"when",
"an",
"uncaught",
"exception",
"occures",
".",
"This",
"function",
"shows",
"the",
"error",
"-",
"message",
"and",
"shuts",
"down",
"the",
"script",
".",
"Please",
"note",
"that",
"most",
"of",
"the"... | 051c64fdaa3a648174cbd54557d05ad553dd826b | https://github.com/FuzeWorks/Core/blob/051c64fdaa3a648174cbd54557d05ad553dd826b/src/FuzeWorks/Logger.php#L215-L227 |
194,708 | FuzeWorks/Core | src/FuzeWorks/Logger.php | Logger.logToScreen | public static function logToScreen()
{
// Send a screenLogEvent, allows for new screen log designs
$event = Events::fireEvent('screenLogEvent');
if ($event->isCancelled()) {
return false;
}
$logs = self::$Logs;
require(dirname(__DIR__) . DS . 'Layout' . D... | php | public static function logToScreen()
{
// Send a screenLogEvent, allows for new screen log designs
$event = Events::fireEvent('screenLogEvent');
if ($event->isCancelled()) {
return false;
}
$logs = self::$Logs;
require(dirname(__DIR__) . DS . 'Layout' . D... | [
"public",
"static",
"function",
"logToScreen",
"(",
")",
"{",
"// Send a screenLogEvent, allows for new screen log designs",
"$",
"event",
"=",
"Events",
"::",
"fireEvent",
"(",
"'screenLogEvent'",
")",
";",
"if",
"(",
"$",
"event",
"->",
"isCancelled",
"(",
")",
... | Output the entire log to the screen. Used for debugging problems with your code.
@codeCoverageIgnore | [
"Output",
"the",
"entire",
"log",
"to",
"the",
"screen",
".",
"Used",
"for",
"debugging",
"problems",
"with",
"your",
"code",
"."
] | 051c64fdaa3a648174cbd54557d05ad553dd826b | https://github.com/FuzeWorks/Core/blob/051c64fdaa3a648174cbd54557d05ad553dd826b/src/FuzeWorks/Logger.php#L245-L255 |
194,709 | FuzeWorks/Core | src/FuzeWorks/Logger.php | Logger.logToFile | public static function logToFile()
{
ob_start(function () {});
$logs = self::$Logs;
require(dirname(__DIR__) . DS . 'Layout' . DS . 'layout.logger_cli.php');
$contents = ob_get_clean();
$file = Core::$logDir . DS . 'Logs' . DS . 'log_latest.php';
if (is_writable($file... | php | public static function logToFile()
{
ob_start(function () {});
$logs = self::$Logs;
require(dirname(__DIR__) . DS . 'Layout' . DS . 'layout.logger_cli.php');
$contents = ob_get_clean();
$file = Core::$logDir . DS . 'Logs' . DS . 'log_latest.php';
if (is_writable($file... | [
"public",
"static",
"function",
"logToFile",
"(",
")",
"{",
"ob_start",
"(",
"function",
"(",
")",
"{",
"}",
")",
";",
"$",
"logs",
"=",
"self",
"::",
"$",
"Logs",
";",
"require",
"(",
"dirname",
"(",
"__DIR__",
")",
".",
"DS",
".",
"'Layout'",
"."... | Output the entire log to a file. Used for debugging problems with your code.
@codeCoverageIgnore | [
"Output",
"the",
"entire",
"log",
"to",
"a",
"file",
".",
"Used",
"for",
"debugging",
"problems",
"with",
"your",
"code",
"."
] | 051c64fdaa3a648174cbd54557d05ad553dd826b | https://github.com/FuzeWorks/Core/blob/051c64fdaa3a648174cbd54557d05ad553dd826b/src/FuzeWorks/Logger.php#L261-L272 |
194,710 | FuzeWorks/Core | src/FuzeWorks/Logger.php | Logger.mark | public static function mark($name)
{
$LOG = array('type' => 'BMARK',
'message' => (!is_null($name) ? $name : ''),
'logFile' => '',
'logLine' => '',
'context' => '',
'runtime' => round(self::getRelativeTime(), 4),);
self::$Logs[] = $LOG;
... | php | public static function mark($name)
{
$LOG = array('type' => 'BMARK',
'message' => (!is_null($name) ? $name : ''),
'logFile' => '',
'logLine' => '',
'context' => '',
'runtime' => round(self::getRelativeTime(), 4),);
self::$Logs[] = $LOG;
... | [
"public",
"static",
"function",
"mark",
"(",
"$",
"name",
")",
"{",
"$",
"LOG",
"=",
"array",
"(",
"'type'",
"=>",
"'BMARK'",
",",
"'message'",
"=>",
"(",
"!",
"is_null",
"(",
"$",
"name",
")",
"?",
"$",
"name",
":",
"''",
")",
",",
"'logFile'",
... | Set a benchmark markpoint.
Multiple calls to this function can be made so that several
execution points can be timed.
@param string $name Marker name
@return void | [
"Set",
"a",
"benchmark",
"markpoint",
"."
] | 051c64fdaa3a648174cbd54557d05ad553dd826b | https://github.com/FuzeWorks/Core/blob/051c64fdaa3a648174cbd54557d05ad553dd826b/src/FuzeWorks/Logger.php#L285-L295 |
194,711 | FuzeWorks/Core | src/FuzeWorks/Logger.php | Logger.http_error | public static function http_error($errno = 500, $message = '', $layout = true): bool
{
$http_codes = array(
400 => 'Bad Request',
401 => 'Unauthorized',
402 => 'Payment Required',
403 => 'Forbidden',
404 => 'Not Found',
405 => 'Method N... | php | public static function http_error($errno = 500, $message = '', $layout = true): bool
{
$http_codes = array(
400 => 'Bad Request',
401 => 'Unauthorized',
402 => 'Payment Required',
403 => 'Forbidden',
404 => 'Not Found',
405 => 'Method N... | [
"public",
"static",
"function",
"http_error",
"(",
"$",
"errno",
"=",
"500",
",",
"$",
"message",
"=",
"''",
",",
"$",
"layout",
"=",
"true",
")",
":",
"bool",
"{",
"$",
"http_codes",
"=",
"array",
"(",
"400",
"=>",
"'Bad Request'",
",",
"401",
"=>",... | Calls an HTTP error, sends it as a header, and loads a template if required to do so.
@param int $errno HTTP error code
@param string $message Message describing the reason for the HTTP error
@param bool $layout true to layout error on website | [
"Calls",
"an",
"HTTP",
"error",
"sends",
"it",
"as",
"a",
"header",
"and",
"loads",
"a",
"template",
"if",
"required",
"to",
"do",
"so",
"."
] | 051c64fdaa3a648174cbd54557d05ad553dd826b | https://github.com/FuzeWorks/Core/blob/051c64fdaa3a648174cbd54557d05ad553dd826b/src/FuzeWorks/Logger.php#L485-L551 |
194,712 | gilbertsoft/typo3-gswarranty | Classes/Utility/Adapter.php | Adapter.getTypo3Version | protected static function getTypo3Version()
{
if (is_null(static::$version)) {
static::$version = \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3_branch);
}
return static::$version;
} | php | protected static function getTypo3Version()
{
if (is_null(static::$version)) {
static::$version = \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3_branch);
}
return static::$version;
} | [
"protected",
"static",
"function",
"getTypo3Version",
"(",
")",
"{",
"if",
"(",
"is_null",
"(",
"static",
"::",
"$",
"version",
")",
")",
"{",
"static",
"::",
"$",
"version",
"=",
"\\",
"TYPO3",
"\\",
"CMS",
"\\",
"Core",
"\\",
"Utility",
"\\",
"Versio... | Returns the TYPO3 version as integer
@return integer
@api | [
"Returns",
"the",
"TYPO3",
"version",
"as",
"integer"
] | 2026dd04e6df9db61b56df3860e1f3462db54c69 | https://github.com/gilbertsoft/typo3-gswarranty/blob/2026dd04e6df9db61b56df3860e1f3462db54c69/Classes/Utility/Adapter.php#L51-L57 |
194,713 | gilbertsoft/typo3-gswarranty | Classes/Utility/Adapter.php | Adapter.adaptLogos | protected static function adaptLogos($extKey)
{
// Configure TBE_STYLES (TYPO3 = 7.6)
if (static::isVersion('7.6')) {
$GLOBALS['TBE_STYLES']['logo'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($extKey) . 'Resources/Public/Images/Backend/gilbertsoft-t3-topbar@2x.p... | php | protected static function adaptLogos($extKey)
{
// Configure TBE_STYLES (TYPO3 = 7.6)
if (static::isVersion('7.6')) {
$GLOBALS['TBE_STYLES']['logo'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($extKey) . 'Resources/Public/Images/Backend/gilbertsoft-t3-topbar@2x.p... | [
"protected",
"static",
"function",
"adaptLogos",
"(",
"$",
"extKey",
")",
"{",
"// Configure TBE_STYLES (TYPO3 = 7.6)\r",
"if",
"(",
"static",
"::",
"isVersion",
"(",
"'7.6'",
")",
")",
"{",
"$",
"GLOBALS",
"[",
"'TBE_STYLES'",
"]",
"[",
"'logo'",
"]",
"=",
... | Adapt Backend Styling
@param string $extKey Extension Key
@return void | [
"Adapt",
"Backend",
"Styling"
] | 2026dd04e6df9db61b56df3860e1f3462db54c69 | https://github.com/gilbertsoft/typo3-gswarranty/blob/2026dd04e6df9db61b56df3860e1f3462db54c69/Classes/Utility/Adapter.php#L103-L130 |
194,714 | gilbertsoft/typo3-gswarranty | Classes/Utility/Adapter.php | Adapter.tables | public static function tables($extKey)
{
if ((TYPO3_MODE === 'BE') && Provider::isGilbertsoft())
{
static::registerIcons($extKey);
static::adaptWarranty($extKey);
static::adaptLogos($extKey);
}
} | php | public static function tables($extKey)
{
if ((TYPO3_MODE === 'BE') && Provider::isGilbertsoft())
{
static::registerIcons($extKey);
static::adaptWarranty($extKey);
static::adaptLogos($extKey);
}
} | [
"public",
"static",
"function",
"tables",
"(",
"$",
"extKey",
")",
"{",
"if",
"(",
"(",
"TYPO3_MODE",
"===",
"'BE'",
")",
"&&",
"Provider",
"::",
"isGilbertsoft",
"(",
")",
")",
"{",
"static",
"::",
"registerIcons",
"(",
"$",
"extKey",
")",
";",
"stati... | Adapts the backend
@return void
@api | [
"Adapts",
"the",
"backend"
] | 2026dd04e6df9db61b56df3860e1f3462db54c69 | https://github.com/gilbertsoft/typo3-gswarranty/blob/2026dd04e6df9db61b56df3860e1f3462db54c69/Classes/Utility/Adapter.php#L167-L175 |
194,715 | covex-nn/JooS_Stream | src/JooS/Stream/Wrapper.php | Wrapper.unregister | public static function unregister($protocol)
{
$wrappers = stream_get_wrappers();
if (!in_array($protocol, $wrappers)) {
throw new Wrapper_Exception(
"Protocol '$protocol' has not been registered yet"
);
}
return stream_wrapper_unregister($protocol);
} | php | public static function unregister($protocol)
{
$wrappers = stream_get_wrappers();
if (!in_array($protocol, $wrappers)) {
throw new Wrapper_Exception(
"Protocol '$protocol' has not been registered yet"
);
}
return stream_wrapper_unregister($protocol);
} | [
"public",
"static",
"function",
"unregister",
"(",
"$",
"protocol",
")",
"{",
"$",
"wrappers",
"=",
"stream_get_wrappers",
"(",
")",
";",
"if",
"(",
"!",
"in_array",
"(",
"$",
"protocol",
",",
"$",
"wrappers",
")",
")",
"{",
"throw",
"new",
"Wrapper_Exce... | Unregister stream wrapper
@param string $protocol Protocol name
@throws Wrapper_Exception
@return boolean | [
"Unregister",
"stream",
"wrapper"
] | e9841b804190a9f624b9e44caa0af7a18f3816d1 | https://github.com/covex-nn/JooS_Stream/blob/e9841b804190a9f624b9e44caa0af7a18f3816d1/src/JooS/Stream/Wrapper.php#L52-L62 |
194,716 | Sectorr/Core | Sectorr/Core/Database/Model.php | Model._find | protected function _find($id)
{
$data = $this->db->get($this->table, '*', ['id' => $id]);
if (empty($data)) {
return false;
}
return $this->setProperties($data);
} | php | protected function _find($id)
{
$data = $this->db->get($this->table, '*', ['id' => $id]);
if (empty($data)) {
return false;
}
return $this->setProperties($data);
} | [
"protected",
"function",
"_find",
"(",
"$",
"id",
")",
"{",
"$",
"data",
"=",
"$",
"this",
"->",
"db",
"->",
"get",
"(",
"$",
"this",
"->",
"table",
",",
"'*'",
",",
"[",
"'id'",
"=>",
"$",
"id",
"]",
")",
";",
"if",
"(",
"empty",
"(",
"$",
... | Find item by ID.
@param $id
@return mixed | [
"Find",
"item",
"by",
"ID",
"."
] | 31df852dc6cc61642b0b87d9f0ae56c8e7da5a27 | https://github.com/Sectorr/Core/blob/31df852dc6cc61642b0b87d9f0ae56c8e7da5a27/Sectorr/Core/Database/Model.php#L32-L41 |
194,717 | Sectorr/Core | Sectorr/Core/Database/Model.php | Model._first | protected function _first($columns = '*')
{
$data = $this->db->get($this->table, $columns, $this->where);
if (empty($data)) {
return false;
}
return $this->setProperties($data);
} | php | protected function _first($columns = '*')
{
$data = $this->db->get($this->table, $columns, $this->where);
if (empty($data)) {
return false;
}
return $this->setProperties($data);
} | [
"protected",
"function",
"_first",
"(",
"$",
"columns",
"=",
"'*'",
")",
"{",
"$",
"data",
"=",
"$",
"this",
"->",
"db",
"->",
"get",
"(",
"$",
"this",
"->",
"table",
",",
"$",
"columns",
",",
"$",
"this",
"->",
"where",
")",
";",
"if",
"(",
"e... | Get's the first result.
@param string $columns
@return bool | [
"Get",
"s",
"the",
"first",
"result",
"."
] | 31df852dc6cc61642b0b87d9f0ae56c8e7da5a27 | https://github.com/Sectorr/Core/blob/31df852dc6cc61642b0b87d9f0ae56c8e7da5a27/Sectorr/Core/Database/Model.php#L63-L72 |
194,718 | Sectorr/Core | Sectorr/Core/Database/Model.php | Model._get | protected function _get($columns = '*')
{
$data = $this->db->select($this->table, $columns, $this->where);
if (empty($data)) {
return false;
}
return $this->getModelObjects($data);
} | php | protected function _get($columns = '*')
{
$data = $this->db->select($this->table, $columns, $this->where);
if (empty($data)) {
return false;
}
return $this->getModelObjects($data);
} | [
"protected",
"function",
"_get",
"(",
"$",
"columns",
"=",
"'*'",
")",
"{",
"$",
"data",
"=",
"$",
"this",
"->",
"db",
"->",
"select",
"(",
"$",
"this",
"->",
"table",
",",
"$",
"columns",
",",
"$",
"this",
"->",
"where",
")",
";",
"if",
"(",
"... | Get all results filtered on set where.
@param string $columns
@return array|bool | [
"Get",
"all",
"results",
"filtered",
"on",
"set",
"where",
"."
] | 31df852dc6cc61642b0b87d9f0ae56c8e7da5a27 | https://github.com/Sectorr/Core/blob/31df852dc6cc61642b0b87d9f0ae56c8e7da5a27/Sectorr/Core/Database/Model.php#L80-L89 |
194,719 | Sectorr/Core | Sectorr/Core/Database/Model.php | Model._all | protected function _all($columns = '*')
{
$data = $this->db->select($this->table, $columns);
if (empty($data)) {
return false;
}
return $this->getModelObjects($data);
} | php | protected function _all($columns = '*')
{
$data = $this->db->select($this->table, $columns);
if (empty($data)) {
return false;
}
return $this->getModelObjects($data);
} | [
"protected",
"function",
"_all",
"(",
"$",
"columns",
"=",
"'*'",
")",
"{",
"$",
"data",
"=",
"$",
"this",
"->",
"db",
"->",
"select",
"(",
"$",
"this",
"->",
"table",
",",
"$",
"columns",
")",
";",
"if",
"(",
"empty",
"(",
"$",
"data",
")",
")... | Get all results from table.
@param string $columns
@return array|bool | [
"Get",
"all",
"results",
"from",
"table",
"."
] | 31df852dc6cc61642b0b87d9f0ae56c8e7da5a27 | https://github.com/Sectorr/Core/blob/31df852dc6cc61642b0b87d9f0ae56c8e7da5a27/Sectorr/Core/Database/Model.php#L97-L106 |
194,720 | Sectorr/Core | Sectorr/Core/Database/Model.php | Model._update | protected function _update($id, array $data)
{
return $this->db->update($this->table, $data, ['id' => $id]);
} | php | protected function _update($id, array $data)
{
return $this->db->update($this->table, $data, ['id' => $id]);
} | [
"protected",
"function",
"_update",
"(",
"$",
"id",
",",
"array",
"$",
"data",
")",
"{",
"return",
"$",
"this",
"->",
"db",
"->",
"update",
"(",
"$",
"this",
"->",
"table",
",",
"$",
"data",
",",
"[",
"'id'",
"=>",
"$",
"id",
"]",
")",
";",
"}"... | Updates item in table.
@param $id
@param array $data
@return bool|int | [
"Updates",
"item",
"in",
"table",
"."
] | 31df852dc6cc61642b0b87d9f0ae56c8e7da5a27 | https://github.com/Sectorr/Core/blob/31df852dc6cc61642b0b87d9f0ae56c8e7da5a27/Sectorr/Core/Database/Model.php#L126-L129 |
194,721 | Sectorr/Core | Sectorr/Core/Database/Model.php | Model.getProperty | private function getProperty($key)
{
return array_key_exists($key, $this->fields) ? $this->fields[$key] : null;
} | php | private function getProperty($key)
{
return array_key_exists($key, $this->fields) ? $this->fields[$key] : null;
} | [
"private",
"function",
"getProperty",
"(",
"$",
"key",
")",
"{",
"return",
"array_key_exists",
"(",
"$",
"key",
",",
"$",
"this",
"->",
"fields",
")",
"?",
"$",
"this",
"->",
"fields",
"[",
"$",
"key",
"]",
":",
"null",
";",
"}"
] | Get dynamic property.
@param $key
@return null | [
"Get",
"dynamic",
"property",
"."
] | 31df852dc6cc61642b0b87d9f0ae56c8e7da5a27 | https://github.com/Sectorr/Core/blob/31df852dc6cc61642b0b87d9f0ae56c8e7da5a27/Sectorr/Core/Database/Model.php#L175-L178 |
194,722 | Sectorr/Core | Sectorr/Core/Database/Model.php | Model.setProperties | private function setProperties(array $data)
{
foreach ($data as $key => $value) {
$this->setProperty($key, $value);
}
return $this;
} | php | private function setProperties(array $data)
{
foreach ($data as $key => $value) {
$this->setProperty($key, $value);
}
return $this;
} | [
"private",
"function",
"setProperties",
"(",
"array",
"$",
"data",
")",
"{",
"foreach",
"(",
"$",
"data",
"as",
"$",
"key",
"=>",
"$",
"value",
")",
"{",
"$",
"this",
"->",
"setProperty",
"(",
"$",
"key",
",",
"$",
"value",
")",
";",
"}",
"return",... | Go through array and set all dynamic properties.
@param $data
@return $this | [
"Go",
"through",
"array",
"and",
"set",
"all",
"dynamic",
"properties",
"."
] | 31df852dc6cc61642b0b87d9f0ae56c8e7da5a27 | https://github.com/Sectorr/Core/blob/31df852dc6cc61642b0b87d9f0ae56c8e7da5a27/Sectorr/Core/Database/Model.php#L200-L207 |
194,723 | PascalKleindienst/simple-api-client | src/Endpoint.php | Endpoint.getEndpointUrl | public function getEndpointUrl($path, $withTrailingSlash)
{
$url = $this->endpoint . '/' . $path;
if ($withTrailingSlash) {
$url = $url . '/';
}
return $url;
} | php | public function getEndpointUrl($path, $withTrailingSlash)
{
$url = $this->endpoint . '/' . $path;
if ($withTrailingSlash) {
$url = $url . '/';
}
return $url;
} | [
"public",
"function",
"getEndpointUrl",
"(",
"$",
"path",
",",
"$",
"withTrailingSlash",
")",
"{",
"$",
"url",
"=",
"$",
"this",
"->",
"endpoint",
".",
"'/'",
".",
"$",
"path",
";",
"if",
"(",
"$",
"withTrailingSlash",
")",
"{",
"$",
"url",
"=",
"$",... | Get the endpoint url for the request
@param string $path
@param bool $withTrailingSlash
@return string | [
"Get",
"the",
"endpoint",
"url",
"for",
"the",
"request"
] | f4e20aa65bb9c340b8aff78acaede7dc62cd2105 | https://github.com/PascalKleindienst/simple-api-client/blob/f4e20aa65bb9c340b8aff78acaede7dc62cd2105/src/Endpoint.php#L51-L60 |
194,724 | rtens/mockster | src/Stub.php | Stub.will | public function will(Behaviour $behaviour = null) {
if ($behaviour) {
$this->behaviour = $behaviour;
return $behaviour;
}
return new BehaviourFactory(function (Behaviour $behaviour) {
$this->setStubbed(true);
$this->behaviour = $behaviour;
... | php | public function will(Behaviour $behaviour = null) {
if ($behaviour) {
$this->behaviour = $behaviour;
return $behaviour;
}
return new BehaviourFactory(function (Behaviour $behaviour) {
$this->setStubbed(true);
$this->behaviour = $behaviour;
... | [
"public",
"function",
"will",
"(",
"Behaviour",
"$",
"behaviour",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"behaviour",
")",
"{",
"$",
"this",
"->",
"behaviour",
"=",
"$",
"behaviour",
";",
"return",
"$",
"behaviour",
";",
"}",
"return",
"new",
"Behaviou... | Sets the given Behaviour or returns a BehaviourFactory if non given
@param behaviour\Behaviour $behaviour
@return BehaviourFactory|Behaviour | [
"Sets",
"the",
"given",
"Behaviour",
"or",
"returns",
"a",
"BehaviourFactory",
"if",
"non",
"given"
] | 712a8a8384d7bda03ca5dea2b82d7a7a47b131fe | https://github.com/rtens/mockster/blob/712a8a8384d7bda03ca5dea2b82d7a7a47b131fe/src/Stub.php#L75-L84 |
194,725 | rtens/mockster | src/Stub.php | Stub.record | public function record($arguments, $returnValue, \Exception $thrown = null) {
$this->history->add(new Call($this->named($arguments), $returnValue, $thrown));
if (!$this->checkReturnType) {
return;
}
if ($thrown) {
$this->checkException($thrown);
} else {... | php | public function record($arguments, $returnValue, \Exception $thrown = null) {
$this->history->add(new Call($this->named($arguments), $returnValue, $thrown));
if (!$this->checkReturnType) {
return;
}
if ($thrown) {
$this->checkException($thrown);
} else {... | [
"public",
"function",
"record",
"(",
"$",
"arguments",
",",
"$",
"returnValue",
",",
"\\",
"Exception",
"$",
"thrown",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"history",
"->",
"add",
"(",
"new",
"Call",
"(",
"$",
"this",
"->",
"named",
"(",
"$",
... | Records the invocation of the method.
@param array $arguments
@param mixed $returnValue
@param \Exception $thrown
@throws \ReflectionException | [
"Records",
"the",
"invocation",
"of",
"the",
"method",
"."
] | 712a8a8384d7bda03ca5dea2b82d7a7a47b131fe | https://github.com/rtens/mockster/blob/712a8a8384d7bda03ca5dea2b82d7a7a47b131fe/src/Stub.php#L175-L187 |
194,726 | SagittariusX/Beluga.Core | src/Beluga/ArrayHelper.php | ArrayHelper.Remove | public static function Remove( array $array, int $index ) : array
{
if ( $index < 0 || $index >= \count( $array ) )
{
return $array;
}
if ( $index == 0 )
{
return \array_slice( $array, 1 );
}
if ( $index + 1 == \count( $array ) )
{
return ... | php | public static function Remove( array $array, int $index ) : array
{
if ( $index < 0 || $index >= \count( $array ) )
{
return $array;
}
if ( $index == 0 )
{
return \array_slice( $array, 1 );
}
if ( $index + 1 == \count( $array ) )
{
return ... | [
"public",
"static",
"function",
"Remove",
"(",
"array",
"$",
"array",
",",
"int",
"$",
"index",
")",
":",
"array",
"{",
"if",
"(",
"$",
"index",
"<",
"0",
"||",
"$",
"index",
">=",
"\\",
"count",
"(",
"$",
"array",
")",
")",
"{",
"return",
"$",
... | Removes the element with defined index from array and reset the array element index after the removed element.
@param array $array THe array.
@param integer $index The index of the element to remove.
@return array | [
"Removes",
"the",
"element",
"with",
"defined",
"index",
"from",
"array",
"and",
"reset",
"the",
"array",
"element",
"index",
"after",
"the",
"removed",
"element",
"."
] | 51057b362707157a4b075df42bb49f397e2d310b | https://github.com/SagittariusX/Beluga.Core/blob/51057b362707157a4b075df42bb49f397e2d310b/src/Beluga/ArrayHelper.php#L287-L309 |
194,727 | SagittariusX/Beluga.Core | src/Beluga/ArrayHelper.php | ArrayHelper.GetMaxDepth | public static function GetMaxDepth( array $array ) : int
{
if ( \count( $array ) < 1 )
{
return 0;
}
$c = 1;
foreach ( $array as $v )
{
if ( \is_array( $v ) )
{
$x = 1 + static::GetMaxDepth( $v );
if ( $x > $c )
{
... | php | public static function GetMaxDepth( array $array ) : int
{
if ( \count( $array ) < 1 )
{
return 0;
}
$c = 1;
foreach ( $array as $v )
{
if ( \is_array( $v ) )
{
$x = 1 + static::GetMaxDepth( $v );
if ( $x > $c )
{
... | [
"public",
"static",
"function",
"GetMaxDepth",
"(",
"array",
"$",
"array",
")",
":",
"int",
"{",
"if",
"(",
"\\",
"count",
"(",
"$",
"array",
")",
"<",
"1",
")",
"{",
"return",
"0",
";",
"}",
"$",
"c",
"=",
"1",
";",
"foreach",
"(",
"$",
"array... | Returns the depth of permitted array.
@param array $array The array to check
@return integer Returns the depth. | [
"Returns",
"the",
"depth",
"of",
"permitted",
"array",
"."
] | 51057b362707157a4b075df42bb49f397e2d310b | https://github.com/SagittariusX/Beluga.Core/blob/51057b362707157a4b075df42bb49f397e2d310b/src/Beluga/ArrayHelper.php#L360-L385 |
194,728 | Waryway/PhpTraitsLibrary | src/Hydrator.php | Hydrator.hydrate | public function hydrate(stdClass $input, $strict = false) {
$this->strict = $strict;
$failedStrict = [];
foreach($input as $name => $value) {
if ($this->strict && !property_exists($this,$name)){
$failedStrict[$name] = $value;
} else {
... | php | public function hydrate(stdClass $input, $strict = false) {
$this->strict = $strict;
$failedStrict = [];
foreach($input as $name => $value) {
if ($this->strict && !property_exists($this,$name)){
$failedStrict[$name] = $value;
} else {
... | [
"public",
"function",
"hydrate",
"(",
"stdClass",
"$",
"input",
",",
"$",
"strict",
"=",
"false",
")",
"{",
"$",
"this",
"->",
"strict",
"=",
"$",
"strict",
";",
"$",
"failedStrict",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"input",
"as",
"$",
"nam... | Given a class object, hydrate it from a provided stdClass data object.
@param $input stdClass - the data to dump into the class being hydrated.
@param $strict bool - what to do if the data provided isn't an option in the class being hydrated. | [
"Given",
"a",
"class",
"object",
"hydrate",
"it",
"from",
"a",
"provided",
"stdClass",
"data",
"object",
"."
] | 90c02e09b92e94664669b020b47a20a1590c4a4a | https://github.com/Waryway/PhpTraitsLibrary/blob/90c02e09b92e94664669b020b47a20a1590c4a4a/src/Hydrator.php#L46-L60 |
194,729 | Wedeto/FileFormats | src/CSV/Writer.php | Writer.format | protected function format($data, $file_handle)
{
$header = false;
foreach ($data as $idx => $row)
{
$row = WF::cast_array($row);
$this->validateRow($row);
if ($this->write_bom && ftell($file_handle) === 0)
fwrite($file_handle, Encoding::ge... | php | protected function format($data, $file_handle)
{
$header = false;
foreach ($data as $idx => $row)
{
$row = WF::cast_array($row);
$this->validateRow($row);
if ($this->write_bom && ftell($file_handle) === 0)
fwrite($file_handle, Encoding::ge... | [
"protected",
"function",
"format",
"(",
"$",
"data",
",",
"$",
"file_handle",
")",
"{",
"$",
"header",
"=",
"false",
";",
"foreach",
"(",
"$",
"data",
"as",
"$",
"idx",
"=>",
"$",
"row",
")",
"{",
"$",
"row",
"=",
"WF",
"::",
"cast_array",
"(",
"... | Format the data into CSV
@param mixed $data Traversable data | [
"Format",
"the",
"data",
"into",
"CSV"
] | 65b71fbd38a2ee6b504622aca4f4047ce9d31e9f | https://github.com/Wedeto/FileFormats/blob/65b71fbd38a2ee6b504622aca4f4047ce9d31e9f/src/CSV/Writer.php#L146-L165 |
194,730 | Wedeto/FileFormats | src/CSV/Writer.php | Writer.validateRow | protected function validateRow(array $row)
{
foreach ($row as $k => $v)
{
if (WF::is_array_like($v))
throw new InvalidArgumentException("CSVWriter does not support nested arrays");
}
} | php | protected function validateRow(array $row)
{
foreach ($row as $k => $v)
{
if (WF::is_array_like($v))
throw new InvalidArgumentException("CSVWriter does not support nested arrays");
}
} | [
"protected",
"function",
"validateRow",
"(",
"array",
"$",
"row",
")",
"{",
"foreach",
"(",
"$",
"row",
"as",
"$",
"k",
"=>",
"$",
"v",
")",
"{",
"if",
"(",
"WF",
"::",
"is_array_like",
"(",
"$",
"v",
")",
")",
"throw",
"new",
"InvalidArgumentExcepti... | Make sure that the data is not nested more than 1 level deep as CSV does not support that.
@param array $row The row to validate
@throws InvalidArgumentException When the array contains arrays | [
"Make",
"sure",
"that",
"the",
"data",
"is",
"not",
"nested",
"more",
"than",
"1",
"level",
"deep",
"as",
"CSV",
"does",
"not",
"support",
"that",
"."
] | 65b71fbd38a2ee6b504622aca4f4047ce9d31e9f | https://github.com/Wedeto/FileFormats/blob/65b71fbd38a2ee6b504622aca4f4047ce9d31e9f/src/CSV/Writer.php#L172-L179 |
194,731 | codeblanche/Depend | src/Depend/Descriptor.php | Descriptor.addAction | public function addAction($action)
{
if (!$action instanceof ActionInterface) {
return $this;
}
$name = $action->getIdentifier();
if (empty($name)) {
return $this;
}
$this->actions[] = $action;
return $this;
} | php | public function addAction($action)
{
if (!$action instanceof ActionInterface) {
return $this;
}
$name = $action->getIdentifier();
if (empty($name)) {
return $this;
}
$this->actions[] = $action;
return $this;
} | [
"public",
"function",
"addAction",
"(",
"$",
"action",
")",
"{",
"if",
"(",
"!",
"$",
"action",
"instanceof",
"ActionInterface",
")",
"{",
"return",
"$",
"this",
";",
"}",
"$",
"name",
"=",
"$",
"action",
"->",
"getIdentifier",
"(",
")",
";",
"if",
"... | Execute the given callback after class instance is created.
@param ActionInterface $action
@return Descriptor | [
"Execute",
"the",
"given",
"callback",
"after",
"class",
"instance",
"is",
"created",
"."
] | 6520d010ec71f5b2ea0d622b8abae2e029ef7f16 | https://github.com/codeblanche/Depend/blob/6520d010ec71f5b2ea0d622b8abae2e029ef7f16/src/Depend/Descriptor.php#L93-L108 |
194,732 | codeblanche/Depend | src/Depend/Descriptor.php | Descriptor.load | public function load(ReflectionClass $class)
{
$this->reset();
$this->reflectionClass = $class;
$this->name = $this->reflectionClass->getName();
if (!$this->reflectionClass->isInstantiable()) {
return $this;
}
$this->interfaces = $... | php | public function load(ReflectionClass $class)
{
$this->reset();
$this->reflectionClass = $class;
$this->name = $this->reflectionClass->getName();
if (!$this->reflectionClass->isInstantiable()) {
return $this;
}
$this->interfaces = $... | [
"public",
"function",
"load",
"(",
"ReflectionClass",
"$",
"class",
")",
"{",
"$",
"this",
"->",
"reset",
"(",
")",
";",
"$",
"this",
"->",
"reflectionClass",
"=",
"$",
"class",
";",
"$",
"this",
"->",
"name",
"=",
"$",
"this",
"->",
"reflectionClass",... | Load a class using its ReflectionClass object.
@param ReflectionClass $class
@throws \Exception|\ReflectionException
@return Descriptor | [
"Load",
"a",
"class",
"using",
"its",
"ReflectionClass",
"object",
"."
] | 6520d010ec71f5b2ea0d622b8abae2e029ef7f16 | https://github.com/codeblanche/Depend/blob/6520d010ec71f5b2ea0d622b8abae2e029ef7f16/src/Depend/Descriptor.php#L255-L290 |
194,733 | codeblanche/Depend | src/Depend/Descriptor.php | Descriptor.resolveParamName | public function resolveParamName($identifier)
{
if (!isset($this->paramNames[$identifier])) {
return $identifier;
}
return $this->paramNames[$identifier];
} | php | public function resolveParamName($identifier)
{
if (!isset($this->paramNames[$identifier])) {
return $identifier;
}
return $this->paramNames[$identifier];
} | [
"public",
"function",
"resolveParamName",
"(",
"$",
"identifier",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"paramNames",
"[",
"$",
"identifier",
"]",
")",
")",
"{",
"return",
"$",
"identifier",
";",
"}",
"return",
"$",
"this",
"->",
... | Resolve the parameter name
@param int|string $identifier
@return string|int | [
"Resolve",
"the",
"parameter",
"name"
] | 6520d010ec71f5b2ea0d622b8abae2e029ef7f16 | https://github.com/codeblanche/Depend/blob/6520d010ec71f5b2ea0d622b8abae2e029ef7f16/src/Depend/Descriptor.php#L408-L415 |
194,734 | MindyPHP/OrmNestedSet | TreeManager.php | TreeManager.descendants | public function descendants($includeSelf = false, $depth = null)
{
$this
->getQuerySet()
->descendants($includeSelf, $depth);
return $this;
} | php | public function descendants($includeSelf = false, $depth = null)
{
$this
->getQuerySet()
->descendants($includeSelf, $depth);
return $this;
} | [
"public",
"function",
"descendants",
"(",
"$",
"includeSelf",
"=",
"false",
",",
"$",
"depth",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"getQuerySet",
"(",
")",
"->",
"descendants",
"(",
"$",
"includeSelf",
",",
"$",
"depth",
")",
";",
"return",
"$",
... | Named scope. Gets descendants for node.
@param bool $includeSelf
@param int $depth the depth
@return $this | [
"Named",
"scope",
".",
"Gets",
"descendants",
"for",
"node",
"."
] | 8231c55f9b95314789983c0b0ec83a9eb70adf79 | https://github.com/MindyPHP/OrmNestedSet/blob/8231c55f9b95314789983c0b0ec83a9eb70adf79/TreeManager.php#L51-L58 |
194,735 | MindyPHP/OrmNestedSet | TreeManager.php | TreeManager.ancestors | public function ancestors($includeSelf = false, $depth = null)
{
$this
->getQuerySet()
->ancestors($includeSelf, $depth);
return $this;
} | php | public function ancestors($includeSelf = false, $depth = null)
{
$this
->getQuerySet()
->ancestors($includeSelf, $depth);
return $this;
} | [
"public",
"function",
"ancestors",
"(",
"$",
"includeSelf",
"=",
"false",
",",
"$",
"depth",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"getQuerySet",
"(",
")",
"->",
"ancestors",
"(",
"$",
"includeSelf",
",",
"$",
"depth",
")",
";",
"return",
"$",
"t... | Named scope. Gets ancestors for node.
@param bool $includeSelf
@param int $depth the depth
@return $this | [
"Named",
"scope",
".",
"Gets",
"ancestors",
"for",
"node",
"."
] | 8231c55f9b95314789983c0b0ec83a9eb70adf79 | https://github.com/MindyPHP/OrmNestedSet/blob/8231c55f9b95314789983c0b0ec83a9eb70adf79/TreeManager.php#L84-L91 |
194,736 | MindyPHP/OrmNestedSet | TreeManager.php | TreeManager.rebuild | public function rebuild()
{
$i = 0;
$skip = [];
while (0 != $this->filter(['lft__isnull' => true])->count()) {
++$i;
$fixed = 0;
echo 'Iteration: '.$i.PHP_EOL;
$clone = clone $this;
/** @var TreeModel[] $models */
$mode... | php | public function rebuild()
{
$i = 0;
$skip = [];
while (0 != $this->filter(['lft__isnull' => true])->count()) {
++$i;
$fixed = 0;
echo 'Iteration: '.$i.PHP_EOL;
$clone = clone $this;
/** @var TreeModel[] $models */
$mode... | [
"public",
"function",
"rebuild",
"(",
")",
"{",
"$",
"i",
"=",
"0",
";",
"$",
"skip",
"=",
"[",
"]",
";",
"while",
"(",
"0",
"!=",
"$",
"this",
"->",
"filter",
"(",
"[",
"'lft__isnull'",
"=>",
"true",
"]",
")",
"->",
"count",
"(",
")",
")",
"... | Completely rebuild broken tree | [
"Completely",
"rebuild",
"broken",
"tree"
] | 8231c55f9b95314789983c0b0ec83a9eb70adf79 | https://github.com/MindyPHP/OrmNestedSet/blob/8231c55f9b95314789983c0b0ec83a9eb70adf79/TreeManager.php#L180-L208 |
194,737 | rapisarda/event-manager | src/EventManager.php | EventManager.detach | public function detach(string $event, $callback){
if(isset($this->listeners[$event])){
return $this->listeners[$event]->remove($callback);
}
return false;
} | php | public function detach(string $event, $callback){
if(isset($this->listeners[$event])){
return $this->listeners[$event]->remove($callback);
}
return false;
} | [
"public",
"function",
"detach",
"(",
"string",
"$",
"event",
",",
"$",
"callback",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"listeners",
"[",
"$",
"event",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"listeners",
"[",
"$",
"event"... | Detaches a listener from an event
@param string $event the event to attach too
@param callable $callback a callable function
@return bool true on success false on failure | [
"Detaches",
"a",
"listener",
"from",
"an",
"event"
] | bfe99f425b884abd4b357ec1e9a3753de2946ef3 | https://github.com/rapisarda/event-manager/blob/bfe99f425b884abd4b357ec1e9a3753de2946ef3/src/EventManager.php#L48-L53 |
194,738 | translationexchange/tml-php-clientsdk | library/Tr8n/TranslationKey.php | TranslationKey.decorationTokens | public function decorationTokens() {
if ($this->decoration_tokens == null) {
$dt = new DecorationTokenizer($this->label);
$dt->parse();
$this->decoration_tokens = $dt->tokens;
}
return $this->decoration_tokens;
} | php | public function decorationTokens() {
if ($this->decoration_tokens == null) {
$dt = new DecorationTokenizer($this->label);
$dt->parse();
$this->decoration_tokens = $dt->tokens;
}
return $this->decoration_tokens;
} | [
"public",
"function",
"decorationTokens",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"decoration_tokens",
"==",
"null",
")",
"{",
"$",
"dt",
"=",
"new",
"DecorationTokenizer",
"(",
"$",
"this",
"->",
"label",
")",
";",
"$",
"dt",
"->",
"parse",
"(",
... | Returns an array of decoration tokens from the translation key
@return \string[] | [
"Returns",
"an",
"array",
"of",
"decoration",
"tokens",
"from",
"the",
"translation",
"key"
] | fe51473824e62cfd883c6aa0c6a3783a16ce8425 | https://github.com/translationexchange/tml-php-clientsdk/blob/fe51473824e62cfd883c6aa0c6a3783a16ce8425/library/Tr8n/TranslationKey.php#L321-L329 |
194,739 | translationexchange/tml-php-clientsdk | library/Tr8n/TranslationKey.php | TranslationKey.dataTokens | public function dataTokens() {
if ($this->data_tokens == null) {
$dt = new DataTokenizer($this->label);
$this->data_tokens = $dt->tokens;
}
return $this->data_tokens;
} | php | public function dataTokens() {
if ($this->data_tokens == null) {
$dt = new DataTokenizer($this->label);
$this->data_tokens = $dt->tokens;
}
return $this->data_tokens;
} | [
"public",
"function",
"dataTokens",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"data_tokens",
"==",
"null",
")",
"{",
"$",
"dt",
"=",
"new",
"DataTokenizer",
"(",
"$",
"this",
"->",
"label",
")",
";",
"$",
"this",
"->",
"data_tokens",
"=",
"$",
"... | Returns an array of data tokens from the translation key
@return \mixed[] | [
"Returns",
"an",
"array",
"of",
"data",
"tokens",
"from",
"the",
"translation",
"key"
] | fe51473824e62cfd883c6aa0c6a3783a16ce8425 | https://github.com/translationexchange/tml-php-clientsdk/blob/fe51473824e62cfd883c6aa0c6a3783a16ce8425/library/Tr8n/TranslationKey.php#L336-L343 |
194,740 | WellCommerce/ReportBundle | Provider/AbstractReportProvider.php | AbstractReportProvider.convertAmount | protected function convertAmount(OrderInterface $order)
{
$amount = $order->getSummary()->getGrossAmount();
$baseCurrency = $order->getCurrency();
return $this->getCurrencyHelper()->convert($amount, $baseCurrency);
} | php | protected function convertAmount(OrderInterface $order)
{
$amount = $order->getSummary()->getGrossAmount();
$baseCurrency = $order->getCurrency();
return $this->getCurrencyHelper()->convert($amount, $baseCurrency);
} | [
"protected",
"function",
"convertAmount",
"(",
"OrderInterface",
"$",
"order",
")",
"{",
"$",
"amount",
"=",
"$",
"order",
"->",
"getSummary",
"(",
")",
"->",
"getGrossAmount",
"(",
")",
";",
"$",
"baseCurrency",
"=",
"$",
"order",
"->",
"getCurrency",
"("... | Converts the order's gross total to target currency
@param OrderInterface $order
@return float | [
"Converts",
"the",
"order",
"s",
"gross",
"total",
"to",
"target",
"currency"
] | 863d1f1fbb3030711bf13da2a07921317bd60f03 | https://github.com/WellCommerce/ReportBundle/blob/863d1f1fbb3030711bf13da2a07921317bd60f03/Provider/AbstractReportProvider.php#L48-L54 |
194,741 | translationexchange/tml-php-clientsdk | library/Tr8n/Cache/Generators/ChdbGenerator.php | ChdbGenerator.cacheTranslations | private function cacheTranslations() {
$this->log("Downloading translations...");
stream_wrapper_register("chdb", '\Tr8n\Cache\Generators\ChdbStream') or die("Failed to register Chdb protocol for streaming Tr8n translation keys");
$fp = fopen("chdb://ChdbInMemory", "r+");
$ch = curl_in... | php | private function cacheTranslations() {
$this->log("Downloading translations...");
stream_wrapper_register("chdb", '\Tr8n\Cache\Generators\ChdbStream') or die("Failed to register Chdb protocol for streaming Tr8n translation keys");
$fp = fopen("chdb://ChdbInMemory", "r+");
$ch = curl_in... | [
"private",
"function",
"cacheTranslations",
"(",
")",
"{",
"$",
"this",
"->",
"log",
"(",
"\"Downloading translations...\"",
")",
";",
"stream_wrapper_register",
"(",
"\"chdb\"",
",",
"'\\Tr8n\\Cache\\Generators\\ChdbStream'",
")",
"or",
"die",
"(",
"\"Failed to registe... | Caches translation keys | [
"Caches",
"translation",
"keys"
] | fe51473824e62cfd883c6aa0c6a3783a16ce8425 | https://github.com/translationexchange/tml-php-clientsdk/blob/fe51473824e62cfd883c6aa0c6a3783a16ce8425/library/Tr8n/Cache/Generators/ChdbGenerator.php#L103-L122 |
194,742 | translationexchange/tml-php-clientsdk | library/Tr8n/Cache/Generators/ChdbGenerator.php | ChdbGenerator.generateChdb | public function generateChdb() {
$this->extracted_at = new \DateTime();
$this->log("Writing chdb file...");
$this->log("File: " . $this->chdb_path);
$success = chdb_create($this->chdb_path, $this->cache);
if (!$success) {
fprintf(STDERR, "Failed to create chdb file... | php | public function generateChdb() {
$this->extracted_at = new \DateTime();
$this->log("Writing chdb file...");
$this->log("File: " . $this->chdb_path);
$success = chdb_create($this->chdb_path, $this->cache);
if (!$success) {
fprintf(STDERR, "Failed to create chdb file... | [
"public",
"function",
"generateChdb",
"(",
")",
"{",
"$",
"this",
"->",
"extracted_at",
"=",
"new",
"\\",
"DateTime",
"(",
")",
";",
"$",
"this",
"->",
"log",
"(",
"\"Writing chdb file...\"",
")",
";",
"$",
"this",
"->",
"log",
"(",
"\"File: \"",
".",
... | Generates chdb database | [
"Generates",
"chdb",
"database"
] | fe51473824e62cfd883c6aa0c6a3783a16ce8425 | https://github.com/translationexchange/tml-php-clientsdk/blob/fe51473824e62cfd883c6aa0c6a3783a16ce8425/library/Tr8n/Cache/Generators/ChdbGenerator.php#L127-L139 |
194,743 | Linkvalue-Interne/MajoraFrameworkExtraBundle | src/Majora/Framework/Model/EntityCollection.php | EntityCollection.search | public function search(array $filters)
{
return $this->filter(function (CollectionableInterface $entity) use ($filters) {
$res = true;
foreach ($filters as $key => $value) {
$current = $this->getPropertyAccessor()->getValue($entity, $key);
$res = $res ... | php | public function search(array $filters)
{
return $this->filter(function (CollectionableInterface $entity) use ($filters) {
$res = true;
foreach ($filters as $key => $value) {
$current = $this->getPropertyAccessor()->getValue($entity, $key);
$res = $res ... | [
"public",
"function",
"search",
"(",
"array",
"$",
"filters",
")",
"{",
"return",
"$",
"this",
"->",
"filter",
"(",
"function",
"(",
"CollectionableInterface",
"$",
"entity",
")",
"use",
"(",
"$",
"filters",
")",
"{",
"$",
"res",
"=",
"true",
";",
"for... | filter given collection on given fields.
@param array $filters
@return EntityCollection | [
"filter",
"given",
"collection",
"on",
"given",
"fields",
"."
] | 6f368380cfc39d27fafb0844e9a53b4d86d7c034 | https://github.com/Linkvalue-Interne/MajoraFrameworkExtraBundle/blob/6f368380cfc39d27fafb0844e9a53b4d86d7c034/src/Majora/Framework/Model/EntityCollection.php#L109-L123 |
194,744 | Linkvalue-Interne/MajoraFrameworkExtraBundle | src/Majora/Framework/Model/EntityCollection.php | EntityCollection.sort | public function sort(\Closure $p)
{
$elements = $this->toArray();
if (!uasort($elements, $p)) {
throw new \InvalidArgumentException('Sort failed.');
}
return new static(array_values($elements));
} | php | public function sort(\Closure $p)
{
$elements = $this->toArray();
if (!uasort($elements, $p)) {
throw new \InvalidArgumentException('Sort failed.');
}
return new static(array_values($elements));
} | [
"public",
"function",
"sort",
"(",
"\\",
"Closure",
"$",
"p",
")",
"{",
"$",
"elements",
"=",
"$",
"this",
"->",
"toArray",
"(",
")",
";",
"if",
"(",
"!",
"uasort",
"(",
"$",
"elements",
",",
"$",
"p",
")",
")",
"{",
"throw",
"new",
"\\",
"Inva... | Sort collection with given closure.
@param \Closure $p
@return EntityCollection | [
"Sort",
"collection",
"with",
"given",
"closure",
"."
] | 6f368380cfc39d27fafb0844e9a53b4d86d7c034 | https://github.com/Linkvalue-Interne/MajoraFrameworkExtraBundle/blob/6f368380cfc39d27fafb0844e9a53b4d86d7c034/src/Majora/Framework/Model/EntityCollection.php#L156-L165 |
194,745 | Linkvalue-Interne/MajoraFrameworkExtraBundle | src/Majora/Framework/Model/EntityCollection.php | EntityCollection.reduce | public function reduce(\Closure $p, $initialValue = null)
{
return array_reduce($this->toArray(), $p, $initialValue);
} | php | public function reduce(\Closure $p, $initialValue = null)
{
return array_reduce($this->toArray(), $p, $initialValue);
} | [
"public",
"function",
"reduce",
"(",
"\\",
"Closure",
"$",
"p",
",",
"$",
"initialValue",
"=",
"null",
")",
"{",
"return",
"array_reduce",
"(",
"$",
"this",
"->",
"toArray",
"(",
")",
",",
"$",
"p",
",",
"$",
"initialValue",
")",
";",
"}"
] | Reduce collection with given closure.
@link http://php.net/manual/en/function.array-reduce.php
@param \Closure $p
@param mixed $initialValue
@return mixed | [
"Reduce",
"collection",
"with",
"given",
"closure",
"."
] | 6f368380cfc39d27fafb0844e9a53b4d86d7c034 | https://github.com/Linkvalue-Interne/MajoraFrameworkExtraBundle/blob/6f368380cfc39d27fafb0844e9a53b4d86d7c034/src/Majora/Framework/Model/EntityCollection.php#L177-L180 |
194,746 | Linkvalue-Interne/MajoraFrameworkExtraBundle | src/Majora/Framework/Model/EntityCollection.php | EntityCollection.indexBy | public function indexBy($field)
{
$elements = $this->toArray();
$this->clear();
foreach ($elements as $element) {
$this->set(
$this->getFieldValue($element, $field),
$element
);
}
return $this;
} | php | public function indexBy($field)
{
$elements = $this->toArray();
$this->clear();
foreach ($elements as $element) {
$this->set(
$this->getFieldValue($element, $field),
$element
);
}
return $this;
} | [
"public",
"function",
"indexBy",
"(",
"$",
"field",
")",
"{",
"$",
"elements",
"=",
"$",
"this",
"->",
"toArray",
"(",
")",
";",
"$",
"this",
"->",
"clear",
"(",
")",
";",
"foreach",
"(",
"$",
"elements",
"as",
"$",
"element",
")",
"{",
"$",
"thi... | index collection by given object field.
@param string $field
@return EntityCollection | [
"index",
"collection",
"by",
"given",
"object",
"field",
"."
] | 6f368380cfc39d27fafb0844e9a53b4d86d7c034 | https://github.com/Linkvalue-Interne/MajoraFrameworkExtraBundle/blob/6f368380cfc39d27fafb0844e9a53b4d86d7c034/src/Majora/Framework/Model/EntityCollection.php#L202-L215 |
194,747 | Linkvalue-Interne/MajoraFrameworkExtraBundle | src/Majora/Framework/Model/EntityCollection.php | EntityCollection.column | public function column($column)
{
return $this
->map(function (CollectionableInterface $entity) use ($column) {
return $this->getFieldValue($entity, $column);
})
->toArray()
;
} | php | public function column($column)
{
return $this
->map(function (CollectionableInterface $entity) use ($column) {
return $this->getFieldValue($entity, $column);
})
->toArray()
;
} | [
"public",
"function",
"column",
"(",
"$",
"column",
")",
"{",
"return",
"$",
"this",
"->",
"map",
"(",
"function",
"(",
"CollectionableInterface",
"$",
"entity",
")",
"use",
"(",
"$",
"column",
")",
"{",
"return",
"$",
"this",
"->",
"getFieldValue",
"(",... | Return value of inner objects given property as an array.
This is an object version of array_column() method.
@link http://php.net/manual/fr/function.array-column.php
@param string $column
@return array | [
"Return",
"value",
"of",
"inner",
"objects",
"given",
"property",
"as",
"an",
"array",
"."
] | 6f368380cfc39d27fafb0844e9a53b4d86d7c034 | https://github.com/Linkvalue-Interne/MajoraFrameworkExtraBundle/blob/6f368380cfc39d27fafb0844e9a53b4d86d7c034/src/Majora/Framework/Model/EntityCollection.php#L227-L235 |
194,748 | Linkvalue-Interne/MajoraFrameworkExtraBundle | src/Majora/Framework/Model/EntityCollection.php | EntityCollection.flatten | public function flatten($indexColumn, $valueColumn)
{
return $this->reduce(
function ($carry, CollectionableInterface $entity) use ($indexColumn, $valueColumn) {
$carry[$this->getFieldValue($entity, $indexColumn)] = $this->getFieldValue($entity, $valueColumn);
re... | php | public function flatten($indexColumn, $valueColumn)
{
return $this->reduce(
function ($carry, CollectionableInterface $entity) use ($indexColumn, $valueColumn) {
$carry[$this->getFieldValue($entity, $indexColumn)] = $this->getFieldValue($entity, $valueColumn);
re... | [
"public",
"function",
"flatten",
"(",
"$",
"indexColumn",
",",
"$",
"valueColumn",
")",
"{",
"return",
"$",
"this",
"->",
"reduce",
"(",
"function",
"(",
"$",
"carry",
",",
"CollectionableInterface",
"$",
"entity",
")",
"use",
"(",
"$",
"indexColumn",
",",... | Create a flattened view of collection as a key value array.
@param string $indexColumn
@param string $valueColumn
@return array | [
"Create",
"a",
"flattened",
"view",
"of",
"collection",
"as",
"a",
"key",
"value",
"array",
"."
] | 6f368380cfc39d27fafb0844e9a53b4d86d7c034 | https://github.com/Linkvalue-Interne/MajoraFrameworkExtraBundle/blob/6f368380cfc39d27fafb0844e9a53b4d86d7c034/src/Majora/Framework/Model/EntityCollection.php#L245-L255 |
194,749 | Linkvalue-Interne/MajoraFrameworkExtraBundle | src/Majora/Framework/Model/EntityCollection.php | EntityCollection.display | public function display($column, $slug = '", "', $format = '["%s"]')
{
return sprintf($format, implode($slug, $this
->column($column)
));
} | php | public function display($column, $slug = '", "', $format = '["%s"]')
{
return sprintf($format, implode($slug, $this
->column($column)
));
} | [
"public",
"function",
"display",
"(",
"$",
"column",
",",
"$",
"slug",
"=",
"'\", \"'",
",",
"$",
"format",
"=",
"'[\"%s\"]'",
")",
"{",
"return",
"sprintf",
"(",
"$",
"format",
",",
"implode",
"(",
"$",
"slug",
",",
"$",
"this",
"->",
"column",
"(",... | Returns a string representation of given column values.
@param string $column
@param string $slug
@return string | [
"Returns",
"a",
"string",
"representation",
"of",
"given",
"column",
"values",
"."
] | 6f368380cfc39d27fafb0844e9a53b4d86d7c034 | https://github.com/Linkvalue-Interne/MajoraFrameworkExtraBundle/blob/6f368380cfc39d27fafb0844e9a53b4d86d7c034/src/Majora/Framework/Model/EntityCollection.php#L265-L270 |
194,750 | wb-crowdfusion/crowdfusion | system/core/classes/mvc/filters/PagingFilterer.php | PagingFilterer.totalPages | public function totalPages()
{
$maxrows = (($m = $this->getParameter('RowsPerPage')) !== null)?$m:$this->getLocal('MaxRows');
$totalrecords = (($m = $this->getParameter('TotalRecords')) !== null)?$m:$this->getLocal('TotalRecords');
if (empty($totalrecords))
return 0;
... | php | public function totalPages()
{
$maxrows = (($m = $this->getParameter('RowsPerPage')) !== null)?$m:$this->getLocal('MaxRows');
$totalrecords = (($m = $this->getParameter('TotalRecords')) !== null)?$m:$this->getLocal('TotalRecords');
if (empty($totalrecords))
return 0;
... | [
"public",
"function",
"totalPages",
"(",
")",
"{",
"$",
"maxrows",
"=",
"(",
"(",
"$",
"m",
"=",
"$",
"this",
"->",
"getParameter",
"(",
"'RowsPerPage'",
")",
")",
"!==",
"null",
")",
"?",
"$",
"m",
":",
"$",
"this",
"->",
"getLocal",
"(",
"'MaxRow... | Returns the total number of pages
Expected Params (These will be looked for in Locals if the Param doesn't exist):
RowsPerPage integer
TotalRecords integer
@throws FiltererException
@return int | [
"Returns",
"the",
"total",
"number",
"of",
"pages"
] | 8cad7988f046a6fefbed07d026cb4ae6706c1217 | https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/mvc/filters/PagingFilterer.php#L252-L265 |
194,751 | MayMeow/may-encrypt | src/Factory/CertificateFactory.php | CertificateFactory._setCertConfigure | protected function _setCertConfigure()
{
$this->certConfigure = [
'config' => $this->typeConfigurations[$this->type],
'x509_extensions' => $this->_getConfig('x509_extensions'),
'private_key_bits' => $this->config['default']['private_key_bits']
];
} | php | protected function _setCertConfigure()
{
$this->certConfigure = [
'config' => $this->typeConfigurations[$this->type],
'x509_extensions' => $this->_getConfig('x509_extensions'),
'private_key_bits' => $this->config['default']['private_key_bits']
];
} | [
"protected",
"function",
"_setCertConfigure",
"(",
")",
"{",
"$",
"this",
"->",
"certConfigure",
"=",
"[",
"'config'",
"=>",
"$",
"this",
"->",
"typeConfigurations",
"[",
"$",
"this",
"->",
"type",
"]",
",",
"'x509_extensions'",
"=>",
"$",
"this",
"->",
"_... | Load Default Configuration | [
"Load",
"Default",
"Configuration"
] | d67122e240037e6cc31e1c0742911e87cda93a86 | https://github.com/MayMeow/may-encrypt/blob/d67122e240037e6cc31e1c0742911e87cda93a86/src/Factory/CertificateFactory.php#L151-L158 |
194,752 | MayMeow/may-encrypt | src/Factory/CertificateFactory.php | CertificateFactory.getKeyPair | public function getKeyPair($file = false)
{
$pk = $this->_generatePK();
openssl_pkey_export($pk, $privKey, null, $this->certConfigure);
$pubKey = openssl_pkey_get_details($pk);
$keys = new KeyPair();
$keys->setPrivateKey($privKey)->setPublicKey($pubKey['key']);
if ... | php | public function getKeyPair($file = false)
{
$pk = $this->_generatePK();
openssl_pkey_export($pk, $privKey, null, $this->certConfigure);
$pubKey = openssl_pkey_get_details($pk);
$keys = new KeyPair();
$keys->setPrivateKey($privKey)->setPublicKey($pubKey['key']);
if ... | [
"public",
"function",
"getKeyPair",
"(",
"$",
"file",
"=",
"false",
")",
"{",
"$",
"pk",
"=",
"$",
"this",
"->",
"_generatePK",
"(",
")",
";",
"openssl_pkey_export",
"(",
"$",
"pk",
",",
"$",
"privKey",
",",
"null",
",",
"$",
"this",
"->",
"certConfi... | Returns key pair | [
"Returns",
"key",
"pair"
] | d67122e240037e6cc31e1c0742911e87cda93a86 | https://github.com/MayMeow/may-encrypt/blob/d67122e240037e6cc31e1c0742911e87cda93a86/src/Factory/CertificateFactory.php#L229-L245 |
194,753 | MayMeow/may-encrypt | src/Factory/CertificateFactory.php | CertificateFactory.setType | public function setType($type, $options = null)
{
$this->type = $type;
$this->_setCertConfigure();
return $this;
} | php | public function setType($type, $options = null)
{
$this->type = $type;
$this->_setCertConfigure();
return $this;
} | [
"public",
"function",
"setType",
"(",
"$",
"type",
",",
"$",
"options",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"type",
"=",
"$",
"type",
";",
"$",
"this",
"->",
"_setCertConfigure",
"(",
")",
";",
"return",
"$",
"this",
";",
"}"
] | Sets type of certificate
@param $type
@param null $options
@return $this | [
"Sets",
"type",
"of",
"certificate"
] | d67122e240037e6cc31e1c0742911e87cda93a86 | https://github.com/MayMeow/may-encrypt/blob/d67122e240037e6cc31e1c0742911e87cda93a86/src/Factory/CertificateFactory.php#L276-L282 |
194,754 | MayMeow/may-encrypt | src/Factory/CertificateFactory.php | CertificateFactory.setCa | public function setCa($name = null, $password = null)
{
$this->caName = $name;
$this->caPassword = $password;
return $this;
} | php | public function setCa($name = null, $password = null)
{
$this->caName = $name;
$this->caPassword = $password;
return $this;
} | [
"public",
"function",
"setCa",
"(",
"$",
"name",
"=",
"null",
",",
"$",
"password",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"caName",
"=",
"$",
"name",
";",
"$",
"this",
"->",
"caPassword",
"=",
"$",
"password",
";",
"return",
"$",
"this",
";",
... | Function SetCa
Functions to set CA name to use for signing certificate
@param null $name
@param null $password
@return $this | [
"Function",
"SetCa",
"Functions",
"to",
"set",
"CA",
"name",
"to",
"use",
"for",
"signing",
"certificate"
] | d67122e240037e6cc31e1c0742911e87cda93a86 | https://github.com/MayMeow/may-encrypt/blob/d67122e240037e6cc31e1c0742911e87cda93a86/src/Factory/CertificateFactory.php#L292-L298 |
194,755 | MayMeow/may-encrypt | src/Factory/CertificateFactory.php | CertificateFactory.setName | public function setName($name = null)
{
$this->fileName = $this->caDataRoot . $name . DS;
// Create folder for future certificate
if(!file_exists($this->fileName))
{
mkdir($this->fileName, 0777, true);
}
return $this;
} | php | public function setName($name = null)
{
$this->fileName = $this->caDataRoot . $name . DS;
// Create folder for future certificate
if(!file_exists($this->fileName))
{
mkdir($this->fileName, 0777, true);
}
return $this;
} | [
"public",
"function",
"setName",
"(",
"$",
"name",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"fileName",
"=",
"$",
"this",
"->",
"caDataRoot",
".",
"$",
"name",
".",
"DS",
";",
"// Create folder for future certificate",
"if",
"(",
"!",
"file_exists",
"(",
... | Function SetName
Set name of certificate file
@param null $name
@return $this | [
"Function",
"SetName",
"Set",
"name",
"of",
"certificate",
"file"
] | d67122e240037e6cc31e1c0742911e87cda93a86 | https://github.com/MayMeow/may-encrypt/blob/d67122e240037e6cc31e1c0742911e87cda93a86/src/Factory/CertificateFactory.php#L348-L359 |
194,756 | MayMeow/may-encrypt | src/Factory/CertificateFactory.php | CertificateFactory.sign | public function sign()
{
$this->crt = new SignedCertificate();
$this->_altConfiguration();
//print_r($this->altNames);
/*
print_r([
$this->certConfigure, $this->domainName()->get()
]);
*/
$this->crt->setPrivateKey($this->_generatePK());... | php | public function sign()
{
$this->crt = new SignedCertificate();
$this->_altConfiguration();
//print_r($this->altNames);
/*
print_r([
$this->certConfigure, $this->domainName()->get()
]);
*/
$this->crt->setPrivateKey($this->_generatePK());... | [
"public",
"function",
"sign",
"(",
")",
"{",
"$",
"this",
"->",
"crt",
"=",
"new",
"SignedCertificate",
"(",
")",
";",
"$",
"this",
"->",
"_altConfiguration",
"(",
")",
";",
"//print_r($this->altNames);",
"/*\n print_r([\n $this->certConfigure, $this... | Sign certificate file and export tem to disk | [
"Sign",
"certificate",
"file",
"and",
"export",
"tem",
"to",
"disk"
] | d67122e240037e6cc31e1c0742911e87cda93a86 | https://github.com/MayMeow/may-encrypt/blob/d67122e240037e6cc31e1c0742911e87cda93a86/src/Factory/CertificateFactory.php#L364-L400 |
194,757 | MayMeow/may-encrypt | src/Factory/CertificateFactory.php | CertificateFactory.createRequest | public function createRequest()
{
$this->crt = new SignedCertificate();
$this->crt->setPrivateKey(openssl_pkey_new($this->certConfigure));
$privKey = $this->crt->getPrivateKey();
$this->crt->setCsr(openssl_csr_new($this->domainName()->get(), $privKey, $this->certConfigure));
... | php | public function createRequest()
{
$this->crt = new SignedCertificate();
$this->crt->setPrivateKey(openssl_pkey_new($this->certConfigure));
$privKey = $this->crt->getPrivateKey();
$this->crt->setCsr(openssl_csr_new($this->domainName()->get(), $privKey, $this->certConfigure));
... | [
"public",
"function",
"createRequest",
"(",
")",
"{",
"$",
"this",
"->",
"crt",
"=",
"new",
"SignedCertificate",
"(",
")",
";",
"$",
"this",
"->",
"crt",
"->",
"setPrivateKey",
"(",
"openssl_pkey_new",
"(",
"$",
"this",
"->",
"certConfigure",
")",
")",
"... | Create request for server signing
For Client App
@return string | [
"Create",
"request",
"for",
"server",
"signing",
"For",
"Client",
"App"
] | d67122e240037e6cc31e1c0742911e87cda93a86 | https://github.com/MayMeow/may-encrypt/blob/d67122e240037e6cc31e1c0742911e87cda93a86/src/Factory/CertificateFactory.php#L408-L426 |
194,758 | MayMeow/may-encrypt | src/Factory/CertificateFactory.php | CertificateFactory.signWithServer | public function signWithServer($request)
{
//server
$clientRequest = json_decode($request);
$this->crt->setSignedCert(openssl_csr_sign($clientRequest->csr, $this->_getCaCert(), $this->_getCaKey(), $this->_getConfig('daysvalid'), $this->certConfigure, time()));
// return signed file ... | php | public function signWithServer($request)
{
//server
$clientRequest = json_decode($request);
$this->crt->setSignedCert(openssl_csr_sign($clientRequest->csr, $this->_getCaCert(), $this->_getCaKey(), $this->_getConfig('daysvalid'), $this->certConfigure, time()));
// return signed file ... | [
"public",
"function",
"signWithServer",
"(",
"$",
"request",
")",
"{",
"//server",
"$",
"clientRequest",
"=",
"json_decode",
"(",
"$",
"request",
")",
";",
"$",
"this",
"->",
"crt",
"->",
"setSignedCert",
"(",
"openssl_csr_sign",
"(",
"$",
"clientRequest",
"... | Sign certificate from client request
For Server app
@return $this | [
"Sign",
"certificate",
"from",
"client",
"request",
"For",
"Server",
"app"
] | d67122e240037e6cc31e1c0742911e87cda93a86 | https://github.com/MayMeow/may-encrypt/blob/d67122e240037e6cc31e1c0742911e87cda93a86/src/Factory/CertificateFactory.php#L454-L464 |
194,759 | MayMeow/may-encrypt | src/Factory/CertificateFactory.php | CertificateFactory.getPrivateKey | public function getPrivateKey($caName = null, $caPassword = null)
{
// if password is set
if ($caPassword !== null) {
return [
file_get_contents($this->caDataRoot . $caName . DS . static::PRIV_KEY_FILENAME),
$caPassword
];
}
re... | php | public function getPrivateKey($caName = null, $caPassword = null)
{
// if password is set
if ($caPassword !== null) {
return [
file_get_contents($this->caDataRoot . $caName . DS . static::PRIV_KEY_FILENAME),
$caPassword
];
}
re... | [
"public",
"function",
"getPrivateKey",
"(",
"$",
"caName",
"=",
"null",
",",
"$",
"caPassword",
"=",
"null",
")",
"{",
"// if password is set",
"if",
"(",
"$",
"caPassword",
"!==",
"null",
")",
"{",
"return",
"[",
"file_get_contents",
"(",
"$",
"this",
"->... | Method getCaKey
Returns array for encrypted keys and string othervise
@param $caName
@param $caPassword
@return array|string | [
"Method",
"getCaKey",
"Returns",
"array",
"for",
"encrypted",
"keys",
"and",
"string",
"othervise"
] | d67122e240037e6cc31e1c0742911e87cda93a86 | https://github.com/MayMeow/may-encrypt/blob/d67122e240037e6cc31e1c0742911e87cda93a86/src/Factory/CertificateFactory.php#L474-L485 |
194,760 | stubbles/stubbles-peer | src/main/php/http/HttpVersion.php | HttpVersion.fromString | public static function fromString($httpVersion): self
{
if (empty($httpVersion)) {
throw new \InvalidArgumentException('Given HTTP version is empty');
}
$major = null;
$minor = null;
if (2 != sscanf($httpVersion, 'HTTP/%d.%d', $major, $minor)) {
throw... | php | public static function fromString($httpVersion): self
{
if (empty($httpVersion)) {
throw new \InvalidArgumentException('Given HTTP version is empty');
}
$major = null;
$minor = null;
if (2 != sscanf($httpVersion, 'HTTP/%d.%d', $major, $minor)) {
throw... | [
"public",
"static",
"function",
"fromString",
"(",
"$",
"httpVersion",
")",
":",
"self",
"{",
"if",
"(",
"empty",
"(",
"$",
"httpVersion",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'Given HTTP version is empty'",
")",
";",
"}",
"... | parses http version from given string
@param string $httpVersion a http version string like "HTTP/1.1"
@return HttpVersion
@throws \InvalidArgumentException in case string can not be parsed successfully | [
"parses",
"http",
"version",
"from",
"given",
"string"
] | dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc | https://github.com/stubbles/stubbles-peer/blob/dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc/src/main/php/http/HttpVersion.php#L48-L63 |
194,761 | stubbles/stubbles-peer | src/main/php/http/HttpVersion.php | HttpVersion.equals | public function equals($httpVersion): bool
{
if (empty($httpVersion)) {
return false;
}
try {
$other = self::castFrom($httpVersion);
} catch (\InvalidArgumentException $iae) {
return false;
}
return $this->major() === $other->majo... | php | public function equals($httpVersion): bool
{
if (empty($httpVersion)) {
return false;
}
try {
$other = self::castFrom($httpVersion);
} catch (\InvalidArgumentException $iae) {
return false;
}
return $this->major() === $other->majo... | [
"public",
"function",
"equals",
"(",
"$",
"httpVersion",
")",
":",
"bool",
"{",
"if",
"(",
"empty",
"(",
"$",
"httpVersion",
")",
")",
"{",
"return",
"false",
";",
"}",
"try",
"{",
"$",
"other",
"=",
"self",
"::",
"castFrom",
"(",
"$",
"httpVersion",... | checks if given http version is equal to this http version
@param string|\stubbles\peer\http\HttpVersion $httpVersion
@return bool | [
"checks",
"if",
"given",
"http",
"version",
"is",
"equal",
"to",
"this",
"http",
"version"
] | dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc | https://github.com/stubbles/stubbles-peer/blob/dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc/src/main/php/http/HttpVersion.php#L151-L164 |
194,762 | yvoyer/collection | lib/Star/Component/Collection/TypedCollection.php | TypedCollection.map | public function map(Closure $func)
{
$this->guardAgainstInvalidGivenType();
$elements = $this->collection->map($func)->toArray();
$newCollection = $this->create();
foreach ($elements as $key => $element) {
try {
$newCollection->set($key, $element);
... | php | public function map(Closure $func)
{
$this->guardAgainstInvalidGivenType();
$elements = $this->collection->map($func)->toArray();
$newCollection = $this->create();
foreach ($elements as $key => $element) {
try {
$newCollection->set($key, $element);
... | [
"public",
"function",
"map",
"(",
"Closure",
"$",
"func",
")",
"{",
"$",
"this",
"->",
"guardAgainstInvalidGivenType",
"(",
")",
";",
"$",
"elements",
"=",
"$",
"this",
"->",
"collection",
"->",
"map",
"(",
"$",
"func",
")",
"->",
"toArray",
"(",
")",
... | Applies the given public function to each element in the collection and returns
a new collection with the elements returned by the function.
@param Closure $func
@return Collection | [
"Applies",
"the",
"given",
"public",
"function",
"to",
"each",
"element",
"in",
"the",
"collection",
"and",
"returns",
"a",
"new",
"collection",
"with",
"the",
"elements",
"returned",
"by",
"the",
"function",
"."
] | 08babb9996bece44e01aaa4d3b244bf48139c3ea | https://github.com/yvoyer/collection/blob/08babb9996bece44e01aaa4d3b244bf48139c3ea/lib/Star/Component/Collection/TypedCollection.php#L351-L365 |
194,763 | squareproton/Bond | src/Bond/Entity/Types/Hstore.php | Hstore.isSameAs | public function isSameAs( Hstore $compStore )
{
$thisArray = $this->jsonSerialize();
ksort( $thisArray );
$compStore = $compStore->jsonSerialize();
ksort( $compStore );
return json_encode( $thisArray ) == json_encode( $compStore );
} | php | public function isSameAs( Hstore $compStore )
{
$thisArray = $this->jsonSerialize();
ksort( $thisArray );
$compStore = $compStore->jsonSerialize();
ksort( $compStore );
return json_encode( $thisArray ) == json_encode( $compStore );
} | [
"public",
"function",
"isSameAs",
"(",
"Hstore",
"$",
"compStore",
")",
"{",
"$",
"thisArray",
"=",
"$",
"this",
"->",
"jsonSerialize",
"(",
")",
";",
"ksort",
"(",
"$",
"thisArray",
")",
";",
"$",
"compStore",
"=",
"$",
"compStore",
"->",
"jsonSerialize... | Compare two hstores | [
"Compare",
"two",
"hstores"
] | a04ad9dd1a35adeaec98237716c2a41ce02b4f1a | https://github.com/squareproton/Bond/blob/a04ad9dd1a35adeaec98237716c2a41ce02b4f1a/src/Bond/Entity/Types/Hstore.php#L67-L78 |
194,764 | squareproton/Bond | src/Bond/Entity/Types/Hstore.php | Hstore.fromStringToArray | private function fromStringToArray( $str )
{
$p = 0;
// Leading spaces.
$c = $this->charAfterSpaces( $str, $p );
if( $c === false ) {
return array();
}
$result = [];
while (true) {
$c = $this->charAfterSpaces($str, $p);
... | php | private function fromStringToArray( $str )
{
$p = 0;
// Leading spaces.
$c = $this->charAfterSpaces( $str, $p );
if( $c === false ) {
return array();
}
$result = [];
while (true) {
$c = $this->charAfterSpaces($str, $p);
... | [
"private",
"function",
"fromStringToArray",
"(",
"$",
"str",
")",
"{",
"$",
"p",
"=",
"0",
";",
"// Leading spaces.",
"$",
"c",
"=",
"$",
"this",
"->",
"charAfterSpaces",
"(",
"$",
"str",
",",
"$",
"p",
")",
";",
"if",
"(",
"$",
"c",
"===",
"false"... | Build a array from a postgres' hstore string representation
@param string
@return array | [
"Build",
"a",
"array",
"from",
"a",
"postgres",
"hstore",
"string",
"representation"
] | a04ad9dd1a35adeaec98237716c2a41ce02b4f1a | https://github.com/squareproton/Bond/blob/a04ad9dd1a35adeaec98237716c2a41ce02b4f1a/src/Bond/Entity/Types/Hstore.php#L114-L164 |
194,765 | squareproton/Bond | src/Bond/Entity/Types/Hstore.php | Hstore.readKeyValue | private function readKeyValue($str, &$p)
{
$c = substr($str, $p, 1);
// Unquoted string.
if ($c != '"') {
$len = strcspn($str, " \r\n\t,=>", $p);
$value = substr($str, $p, $len);
$p += $len;
// $value = stripcslashes($value)
$valu... | php | private function readKeyValue($str, &$p)
{
$c = substr($str, $p, 1);
// Unquoted string.
if ($c != '"') {
$len = strcspn($str, " \r\n\t,=>", $p);
$value = substr($str, $p, $len);
$p += $len;
// $value = stripcslashes($value)
$valu... | [
"private",
"function",
"readKeyValue",
"(",
"$",
"str",
",",
"&",
"$",
"p",
")",
"{",
"$",
"c",
"=",
"substr",
"(",
"$",
"str",
",",
"$",
"p",
",",
"1",
")",
";",
"// Unquoted string.",
"if",
"(",
"$",
"c",
"!=",
"'\"'",
")",
"{",
"$",
"len",
... | Read a 'key' or 'value' component from a hstore's string representation
@param string $str
@param int $p
@return string | [
"Read",
"a",
"key",
"or",
"value",
"component",
"from",
"a",
"hstore",
"s",
"string",
"representation"
] | a04ad9dd1a35adeaec98237716c2a41ce02b4f1a | https://github.com/squareproton/Bond/blob/a04ad9dd1a35adeaec98237716c2a41ce02b4f1a/src/Bond/Entity/Types/Hstore.php#L188-L217 |
194,766 | Soneritics/Database | Soneritics/Database/Table.php | Table.reloadTableSchema | public function reloadTableSchema()
{
$this->columns = [];
$described = $this->describe()->execute();
while ($column = $described->get()) {
$this->columns[] = $column['COLUMNS']['Field'];
}
return $this;
} | php | public function reloadTableSchema()
{
$this->columns = [];
$described = $this->describe()->execute();
while ($column = $described->get()) {
$this->columns[] = $column['COLUMNS']['Field'];
}
return $this;
} | [
"public",
"function",
"reloadTableSchema",
"(",
")",
"{",
"$",
"this",
"->",
"columns",
"=",
"[",
"]",
";",
"$",
"described",
"=",
"$",
"this",
"->",
"describe",
"(",
")",
"->",
"execute",
"(",
")",
";",
"while",
"(",
"$",
"column",
"=",
"$",
"desc... | Reload the table schema.
@return $this | [
"Reload",
"the",
"table",
"schema",
"."
] | 20cb74f2a2ee8d9161d3144b5c061a6da11cd066 | https://github.com/Soneritics/Database/blob/20cb74f2a2ee8d9161d3144b5c061a6da11cd066/Soneritics/Database/Table.php#L182-L192 |
194,767 | Soneritics/Database | Soneritics/Database/Table.php | Table.select | public function select($fields = null)
{
$select = new Select($this);
if ($fields !== null) {
$select->fields($fields);
}
return $select;
} | php | public function select($fields = null)
{
$select = new Select($this);
if ($fields !== null) {
$select->fields($fields);
}
return $select;
} | [
"public",
"function",
"select",
"(",
"$",
"fields",
"=",
"null",
")",
"{",
"$",
"select",
"=",
"new",
"Select",
"(",
"$",
"this",
")",
";",
"if",
"(",
"$",
"fields",
"!==",
"null",
")",
"{",
"$",
"select",
"->",
"fields",
"(",
"$",
"fields",
")",... | Get a select object for the current table.
@param null $fields
@return Select | [
"Get",
"a",
"select",
"object",
"for",
"the",
"current",
"table",
"."
] | 20cb74f2a2ee8d9161d3144b5c061a6da11cd066 | https://github.com/Soneritics/Database/blob/20cb74f2a2ee8d9161d3144b5c061a6da11cd066/Soneritics/Database/Table.php#L222-L231 |
194,768 | Soneritics/Database | Soneritics/Database/Table.php | Table.exists | public function exists()
{
$quotedTable = \Database\DatabaseConnectionFactory::get()->quote($this->getTable());
$record = \Database\DatabaseConnectionFactory::get()->query("show tables like {$quotedTable}");
return !is_a($record, 'Database\DatabaseRecord\EmptyDatabaseRecord') && count($recor... | php | public function exists()
{
$quotedTable = \Database\DatabaseConnectionFactory::get()->quote($this->getTable());
$record = \Database\DatabaseConnectionFactory::get()->query("show tables like {$quotedTable}");
return !is_a($record, 'Database\DatabaseRecord\EmptyDatabaseRecord') && count($recor... | [
"public",
"function",
"exists",
"(",
")",
"{",
"$",
"quotedTable",
"=",
"\\",
"Database",
"\\",
"DatabaseConnectionFactory",
"::",
"get",
"(",
")",
"->",
"quote",
"(",
"$",
"this",
"->",
"getTable",
"(",
")",
")",
";",
"$",
"record",
"=",
"\\",
"Databa... | Check if the table exists in the database.
@return bool | [
"Check",
"if",
"the",
"table",
"exists",
"in",
"the",
"database",
"."
] | 20cb74f2a2ee8d9161d3144b5c061a6da11cd066 | https://github.com/Soneritics/Database/blob/20cb74f2a2ee8d9161d3144b5c061a6da11cd066/Soneritics/Database/Table.php#L282-L287 |
194,769 | cloudtek/dynamodm | lib/Cloudtek/DynamoDM/Expression/RootExpr.php | RootExpr.put | public function put(array $values = [])
{
$this->qb->setQueryClass(PutItem::class);
foreach ($values as $attributeName => $value) {
$value = $this->value($value);
if ($attributeName !== $this->qb->class->discriminatorAttribute) {
$attribute = $this->attr... | php | public function put(array $values = [])
{
$this->qb->setQueryClass(PutItem::class);
foreach ($values as $attributeName => $value) {
$value = $this->value($value);
if ($attributeName !== $this->qb->class->discriminatorAttribute) {
$attribute = $this->attr... | [
"public",
"function",
"put",
"(",
"array",
"$",
"values",
"=",
"[",
"]",
")",
"{",
"$",
"this",
"->",
"qb",
"->",
"setQueryClass",
"(",
"PutItem",
"::",
"class",
")",
";",
"foreach",
"(",
"$",
"values",
"as",
"$",
"attributeName",
"=>",
"$",
"value",... | Sets the query operation to 'put' and optionally specifies an array of data
to add to the put command.
@param Value[]|mixed[] $values Indexed by attribute name
@return QueryBuilder | [
"Sets",
"the",
"query",
"operation",
"to",
"put",
"and",
"optionally",
"specifies",
"an",
"array",
"of",
"data",
"to",
"add",
"to",
"the",
"put",
"command",
"."
] | 119d355e2c5cbaef1f867970349b4432f5704fcd | https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Expression/RootExpr.php#L159-L180 |
194,770 | lasallecms/lasallecms-l5-lasallecmsadmin-pkg | src/Http/Controllers/AdminPostController.php | AdminPostController.publishPostEvent | public function publishPostEvent(Request $request) {
// Laravel's Mail::send second "data" param must be an array, not an object.
$post = $this->model->FindOrFail($request->input('postID'))->toArray();
$post['listID'] = $request->input('listID');
$post['eve... | php | public function publishPostEvent(Request $request) {
// Laravel's Mail::send second "data" param must be an array, not an object.
$post = $this->model->FindOrFail($request->input('postID'))->toArray();
$post['listID'] = $request->input('listID');
$post['eve... | [
"public",
"function",
"publishPostEvent",
"(",
"Request",
"$",
"request",
")",
"{",
"// Laravel's Mail::send second \"data\" param must be an array, not an object.",
"$",
"post",
"=",
"$",
"this",
"->",
"model",
"->",
"FindOrFail",
"(",
"$",
"request",
"->",
"input",
... | Fire the SendPostToLaSalleCRMemailList event.
This method is called from the confirmation view in the LaSalle List Management package.
@param Request $request
@return mixed | [
"Fire",
"the",
"SendPostToLaSalleCRMemailList",
"event",
"."
] | 5a4b3375e449273a98e84a566bcf60fd2172cb2d | https://github.com/lasallecms/lasallecms-l5-lasallecmsadmin-pkg/blob/5a4b3375e449273a98e84a566bcf60fd2172cb2d/src/Http/Controllers/AdminPostController.php#L90-L104 |
194,771 | PenoaksDev/Milky-Framework | src/Milky/Database/Connection.php | Connection.setFetchMode | public function setFetchMode( $fetchMode, $fetchArgument = null, array $fetchConstructorArgument = [] )
{
$this->fetchMode = $fetchMode;
$this->fetchArgument = $fetchArgument;
$this->fetchConstructorArgument = $fetchConstructorArgument;
} | php | public function setFetchMode( $fetchMode, $fetchArgument = null, array $fetchConstructorArgument = [] )
{
$this->fetchMode = $fetchMode;
$this->fetchArgument = $fetchArgument;
$this->fetchConstructorArgument = $fetchConstructorArgument;
} | [
"public",
"function",
"setFetchMode",
"(",
"$",
"fetchMode",
",",
"$",
"fetchArgument",
"=",
"null",
",",
"array",
"$",
"fetchConstructorArgument",
"=",
"[",
"]",
")",
"{",
"$",
"this",
"->",
"fetchMode",
"=",
"$",
"fetchMode",
";",
"$",
"this",
"->",
"f... | Set the default fetch mode for the connection, and optional arguments for the given fetch mode.
@param int $fetchMode
@param mixed $fetchArgument
@param array $fetchConstructorArgument
@return int | [
"Set",
"the",
"default",
"fetch",
"mode",
"for",
"the",
"connection",
"and",
"optional",
"arguments",
"for",
"the",
"given",
"fetch",
"mode",
"."
] | 8afd7156610a70371aa5b1df50b8a212bf7b142c | https://github.com/PenoaksDev/Milky-Framework/blob/8afd7156610a70371aa5b1df50b8a212bf7b142c/src/Milky/Database/Connection.php#L1183-L1188 |
194,772 | libreworks/caridea-validate | src/Validator.php | Validator.access | protected function access($values, string $field)
{
return isset($values[$field]) ? $values[$field] : null;
} | php | protected function access($values, string $field)
{
return isset($values[$field]) ? $values[$field] : null;
} | [
"protected",
"function",
"access",
"(",
"$",
"values",
",",
"string",
"$",
"field",
")",
"{",
"return",
"isset",
"(",
"$",
"values",
"[",
"$",
"field",
"]",
")",
"?",
"$",
"values",
"[",
"$",
"field",
"]",
":",
"null",
";",
"}"
] | Gets a field from the values.
This can be overridden to access by other means (e.g. object properties,
getter methods).
@param mixed $values The values
@param string $field The field to access
@return mixed The accessed value | [
"Gets",
"a",
"field",
"from",
"the",
"values",
"."
] | 625835694d34591bfb1e3b2ce60c2cc28a28d006 | https://github.com/libreworks/caridea-validate/blob/625835694d34591bfb1e3b2ce60c2cc28a28d006/src/Validator.php#L56-L59 |
194,773 | libreworks/caridea-validate | src/Validator.php | Validator.assert | public function assert($values)
{
$errors = $this->iterate($values);
if (!empty($errors)) {
throw new Exception\Invalid($errors);
}
} | php | public function assert($values)
{
$errors = $this->iterate($values);
if (!empty($errors)) {
throw new Exception\Invalid($errors);
}
} | [
"public",
"function",
"assert",
"(",
"$",
"values",
")",
"{",
"$",
"errors",
"=",
"$",
"this",
"->",
"iterate",
"(",
"$",
"values",
")",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"errors",
")",
")",
"{",
"throw",
"new",
"Exception",
"\\",
"Invalid",
... | Validates the provided value, throwing an exception upon failure.
@param object|array $values An object or associative array to validate
@throws \Caridea\Validate\Exception\Invalid if validation fails
@throws \InvalidArgumentException if `$values` is null | [
"Validates",
"the",
"provided",
"value",
"throwing",
"an",
"exception",
"upon",
"failure",
"."
] | 625835694d34591bfb1e3b2ce60c2cc28a28d006 | https://github.com/libreworks/caridea-validate/blob/625835694d34591bfb1e3b2ce60c2cc28a28d006/src/Validator.php#L104-L110 |
194,774 | sil-project/VarietyBundle | src/Entity/Variety.php | Variety.getLatinName | public function getLatinName()
{
if ($this->hasParent() && !$this->latin_name) {
return $this->getParent()->getLatinName();
}
return $this->latin_name;
} | php | public function getLatinName()
{
if ($this->hasParent() && !$this->latin_name) {
return $this->getParent()->getLatinName();
}
return $this->latin_name;
} | [
"public",
"function",
"getLatinName",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"hasParent",
"(",
")",
"&&",
"!",
"$",
"this",
"->",
"latin_name",
")",
"{",
"return",
"$",
"this",
"->",
"getParent",
"(",
")",
"->",
"getLatinName",
"(",
")",
";",
... | Get latinName.
@return string | [
"Get",
"latinName",
"."
] | e9508ce13a4bb277d10bdcd925fdb84bc01f453f | https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Variety.php#L327-L334 |
194,775 | sil-project/VarietyBundle | src/Entity/Variety.php | Variety.getAlias | public function getAlias()
{
if ($this->hasParent() && !$this->alias) {
return $this->getParent()->getAlias();
}
return $this->alias;
} | php | public function getAlias()
{
if ($this->hasParent() && !$this->alias) {
return $this->getParent()->getAlias();
}
return $this->alias;
} | [
"public",
"function",
"getAlias",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"hasParent",
"(",
")",
"&&",
"!",
"$",
"this",
"->",
"alias",
")",
"{",
"return",
"$",
"this",
"->",
"getParent",
"(",
")",
"->",
"getAlias",
"(",
")",
";",
"}",
"retu... | Get alias.
@return string | [
"Get",
"alias",
"."
] | e9508ce13a4bb277d10bdcd925fdb84bc01f453f | https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Variety.php#L379-L386 |
194,776 | sil-project/VarietyBundle | src/Entity/Variety.php | Variety.getLifeCycle | public function getLifeCycle()
{
if ($this->hasParent() && !$this->life_cycle) {
return $this->getParent()->getLifeCycle();
}
if (!$this->life_cycle && $this->getSpecies()) {
return $this->getSpecies()->getLifeCycle();
}
return $this->life_cycle;
... | php | public function getLifeCycle()
{
if ($this->hasParent() && !$this->life_cycle) {
return $this->getParent()->getLifeCycle();
}
if (!$this->life_cycle && $this->getSpecies()) {
return $this->getSpecies()->getLifeCycle();
}
return $this->life_cycle;
... | [
"public",
"function",
"getLifeCycle",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"hasParent",
"(",
")",
"&&",
"!",
"$",
"this",
"->",
"life_cycle",
")",
"{",
"return",
"$",
"this",
"->",
"getParent",
"(",
")",
"->",
"getLifeCycle",
"(",
")",
";",
... | Get lifeCycle.
@return string | [
"Get",
"lifeCycle",
"."
] | e9508ce13a4bb277d10bdcd925fdb84bc01f453f | https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Variety.php#L431-L442 |
194,777 | sil-project/VarietyBundle | src/Entity/Variety.php | Variety.getLegalGerminationRate | public function getLegalGerminationRate()
{
if (!$this->legal_germination_rate && $this->getSpecies()) {
return $this->getSpecies()->getLegalGerminationRate();
}
return $this->legal_germination_rate;
} | php | public function getLegalGerminationRate()
{
if (!$this->legal_germination_rate && $this->getSpecies()) {
return $this->getSpecies()->getLegalGerminationRate();
}
return $this->legal_germination_rate;
} | [
"public",
"function",
"getLegalGerminationRate",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"legal_germination_rate",
"&&",
"$",
"this",
"->",
"getSpecies",
"(",
")",
")",
"{",
"return",
"$",
"this",
"->",
"getSpecies",
"(",
")",
"->",
"getLegalGerm... | Get legalGerminationRate.
@return int | [
"Get",
"legalGerminationRate",
"."
] | e9508ce13a4bb277d10bdcd925fdb84bc01f453f | https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Variety.php#L583-L590 |
194,778 | sil-project/VarietyBundle | src/Entity/Variety.php | Variety.setSpecies | public function setSpecies(\Librinfo\VarietiesBundle\Entity\Species $species = null)
{
$this->species = $species;
return $this;
} | php | public function setSpecies(\Librinfo\VarietiesBundle\Entity\Species $species = null)
{
$this->species = $species;
return $this;
} | [
"public",
"function",
"setSpecies",
"(",
"\\",
"Librinfo",
"\\",
"VarietiesBundle",
"\\",
"Entity",
"\\",
"Species",
"$",
"species",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"species",
"=",
"$",
"species",
";",
"return",
"$",
"this",
";",
"}"
] | Set species.
@param \Librinfo\VarietiesBundle\Entity\Species $species
@return Variety | [
"Set",
"species",
"."
] | e9508ce13a4bb277d10bdcd925fdb84bc01f453f | https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Variety.php#L707-L712 |
194,779 | sil-project/VarietyBundle | src/Entity/Variety.php | Variety.getSpecies | public function getSpecies()
{
if ($this->hasParent() && !$this->species) {
return $this->getParent()->getSpecies();
}
return $this->species;
} | php | public function getSpecies()
{
if ($this->hasParent() && !$this->species) {
return $this->getParent()->getSpecies();
}
return $this->species;
} | [
"public",
"function",
"getSpecies",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"hasParent",
"(",
")",
"&&",
"!",
"$",
"this",
"->",
"species",
")",
"{",
"return",
"$",
"this",
"->",
"getParent",
"(",
")",
"->",
"getSpecies",
"(",
")",
";",
"}",
... | Get species.
@return \Librinfo\VarietiesBundle\Entity\Species | [
"Get",
"species",
"."
] | e9508ce13a4bb277d10bdcd925fdb84bc01f453f | https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Variety.php#L719-L726 |
194,780 | sil-project/VarietyBundle | src/Entity/Variety.php | Variety.addPlantCategory | public function addPlantCategory(\Librinfo\VarietiesBundle\Entity\PlantCategory $plantCategory)
{
$this->plant_categories[] = $plantCategory;
return $this;
} | php | public function addPlantCategory(\Librinfo\VarietiesBundle\Entity\PlantCategory $plantCategory)
{
$this->plant_categories[] = $plantCategory;
return $this;
} | [
"public",
"function",
"addPlantCategory",
"(",
"\\",
"Librinfo",
"\\",
"VarietiesBundle",
"\\",
"Entity",
"\\",
"PlantCategory",
"$",
"plantCategory",
")",
"{",
"$",
"this",
"->",
"plant_categories",
"[",
"]",
"=",
"$",
"plantCategory",
";",
"return",
"$",
"th... | Add plantCategory.
@param \Librinfo\VarietiesBundle\Entity\PlantCategory $plantCategory
@return Variety | [
"Add",
"plantCategory",
"."
] | e9508ce13a4bb277d10bdcd925fdb84bc01f453f | https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Variety.php#L735-L740 |
194,781 | sil-project/VarietyBundle | src/Entity/Variety.php | Variety.removePlantCategory | public function removePlantCategory(\Librinfo\VarietiesBundle\Entity\PlantCategory $plantCategory)
{
return $this->plant_categories->removeElement($plantCategory);
} | php | public function removePlantCategory(\Librinfo\VarietiesBundle\Entity\PlantCategory $plantCategory)
{
return $this->plant_categories->removeElement($plantCategory);
} | [
"public",
"function",
"removePlantCategory",
"(",
"\\",
"Librinfo",
"\\",
"VarietiesBundle",
"\\",
"Entity",
"\\",
"PlantCategory",
"$",
"plantCategory",
")",
"{",
"return",
"$",
"this",
"->",
"plant_categories",
"->",
"removeElement",
"(",
"$",
"plantCategory",
"... | Remove plantCategory.
@param \Librinfo\VarietiesBundle\Entity\PlantCategory $plantCategory
@return bool tRUE if this collection contained the specified element, FALSE otherwise | [
"Remove",
"plantCategory",
"."
] | e9508ce13a4bb277d10bdcd925fdb84bc01f453f | https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Variety.php#L749-L752 |
194,782 | sil-project/VarietyBundle | src/Entity/Variety.php | Variety.getPlantCategories | public function getPlantCategories()
{
if (!$this->plant_categories && $this->getSpecies()) {
return $this->getSpecies()->getPlantCategories();
}
return $this->plant_categories;
} | php | public function getPlantCategories()
{
if (!$this->plant_categories && $this->getSpecies()) {
return $this->getSpecies()->getPlantCategories();
}
return $this->plant_categories;
} | [
"public",
"function",
"getPlantCategories",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"plant_categories",
"&&",
"$",
"this",
"->",
"getSpecies",
"(",
")",
")",
"{",
"return",
"$",
"this",
"->",
"getSpecies",
"(",
")",
"->",
"getPlantCategories",
... | Get plantCategories.
@return \Doctrine\Common\Collections\Collection | [
"Get",
"plantCategories",
"."
] | e9508ce13a4bb277d10bdcd925fdb84bc01f453f | https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Variety.php#L759-L766 |
194,783 | sil-project/VarietyBundle | src/Entity/Variety.php | Variety.getTkw | public function getTkw()
{
if (!$this->tkw && $this->getSpecies()) {
return $this->getSpecies()->getTkw();
}
return $this->tkw;
} | php | public function getTkw()
{
if (!$this->tkw && $this->getSpecies()) {
return $this->getSpecies()->getTkw();
}
return $this->tkw;
} | [
"public",
"function",
"getTkw",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"tkw",
"&&",
"$",
"this",
"->",
"getSpecies",
"(",
")",
")",
"{",
"return",
"$",
"this",
"->",
"getSpecies",
"(",
")",
"->",
"getTkw",
"(",
")",
";",
"}",
"return",... | Get tkw.
@return float | [
"Get",
"tkw",
"."
] | e9508ce13a4bb277d10bdcd925fdb84bc01f453f | https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Variety.php#L867-L874 |
194,784 | sil-project/VarietyBundle | src/Entity/Variety.php | Variety.getSeedLifespan | public function getSeedLifespan()
{
if (!$this->seed_lifespan && $this->getSpecies()) {
return $this->getSpecies()->getSeedLifeSpan();
}
return $this->seed_lifespan;
} | php | public function getSeedLifespan()
{
if (!$this->seed_lifespan && $this->getSpecies()) {
return $this->getSpecies()->getSeedLifeSpan();
}
return $this->seed_lifespan;
} | [
"public",
"function",
"getSeedLifespan",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"seed_lifespan",
"&&",
"$",
"this",
"->",
"getSpecies",
"(",
")",
")",
"{",
"return",
"$",
"this",
"->",
"getSpecies",
"(",
")",
"->",
"getSeedLifeSpan",
"(",
")... | Get seedLifespan.
@return int | [
"Get",
"seedLifespan",
"."
] | e9508ce13a4bb277d10bdcd925fdb84bc01f453f | https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Variety.php#L895-L902 |
194,785 | sil-project/VarietyBundle | src/Entity/Variety.php | Variety.getRaiseDuration | public function getRaiseDuration()
{
if (!$this->raise_duration && $this->getSpecies()) {
return $this->getSpecies()->getRaiseDuration();
}
return $this->raise_duration;
} | php | public function getRaiseDuration()
{
if (!$this->raise_duration && $this->getSpecies()) {
return $this->getSpecies()->getRaiseDuration();
}
return $this->raise_duration;
} | [
"public",
"function",
"getRaiseDuration",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"raise_duration",
"&&",
"$",
"this",
"->",
"getSpecies",
"(",
")",
")",
"{",
"return",
"$",
"this",
"->",
"getSpecies",
"(",
")",
"->",
"getRaiseDuration",
"(",
... | Get raiseDuration.
@return int | [
"Get",
"raiseDuration",
"."
] | e9508ce13a4bb277d10bdcd925fdb84bc01f453f | https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Variety.php#L923-L930 |
194,786 | sil-project/VarietyBundle | src/Entity/Variety.php | Variety.setVariety | public function setVariety(\Librinfo\VarietiesBundle\Entity\Variety $variety = null)
{
$this->variety = $variety;
return $this;
} | php | public function setVariety(\Librinfo\VarietiesBundle\Entity\Variety $variety = null)
{
$this->variety = $variety;
return $this;
} | [
"public",
"function",
"setVariety",
"(",
"\\",
"Librinfo",
"\\",
"VarietiesBundle",
"\\",
"Entity",
"\\",
"Variety",
"$",
"variety",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"variety",
"=",
"$",
"variety",
";",
"return",
"$",
"this",
";",
"}"
] | Set variety.
@param \Librinfo\VarietiesBundle\Entity\Variety $variety
@return Strain | [
"Set",
"variety",
"."
] | e9508ce13a4bb277d10bdcd925fdb84bc01f453f | https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Variety.php#L1155-L1160 |
194,787 | sil-project/VarietyBundle | src/Entity/Variety.php | Variety.addProfessionalDescription | public function addProfessionalDescription(\Librinfo\VarietiesBundle\Entity\VarietyDescriptionProfessional $professionalDescription)
{
$this->professional_descriptions[] = $professionalDescription;
return $this;
} | php | public function addProfessionalDescription(\Librinfo\VarietiesBundle\Entity\VarietyDescriptionProfessional $professionalDescription)
{
$this->professional_descriptions[] = $professionalDescription;
return $this;
} | [
"public",
"function",
"addProfessionalDescription",
"(",
"\\",
"Librinfo",
"\\",
"VarietiesBundle",
"\\",
"Entity",
"\\",
"VarietyDescriptionProfessional",
"$",
"professionalDescription",
")",
"{",
"$",
"this",
"->",
"professional_descriptions",
"[",
"]",
"=",
"$",
"p... | Add professionalDescription.
@param \Librinfo\VarietiesBundle\Entity\VarietyDescriptionProfessional $professionalDescription
@return Variety | [
"Add",
"professionalDescription",
"."
] | e9508ce13a4bb277d10bdcd925fdb84bc01f453f | https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Variety.php#L1179-L1184 |
194,788 | sil-project/VarietyBundle | src/Entity/Variety.php | Variety.removeProfessionalDescription | public function removeProfessionalDescription(\Librinfo\VarietiesBundle\Entity\VarietyDescriptionProfessional $professionalDescription)
{
return $this->professional_descriptions->removeElement($professionalDescription);
} | php | public function removeProfessionalDescription(\Librinfo\VarietiesBundle\Entity\VarietyDescriptionProfessional $professionalDescription)
{
return $this->professional_descriptions->removeElement($professionalDescription);
} | [
"public",
"function",
"removeProfessionalDescription",
"(",
"\\",
"Librinfo",
"\\",
"VarietiesBundle",
"\\",
"Entity",
"\\",
"VarietyDescriptionProfessional",
"$",
"professionalDescription",
")",
"{",
"return",
"$",
"this",
"->",
"professional_descriptions",
"->",
"remove... | Remove professionalDescription.
@param \Librinfo\VarietiesBundle\Entity\VarietyDescriptionProfessional $professionalDescription
@return bool tRUE if this collection contained the specified element, FALSE otherwise | [
"Remove",
"professionalDescription",
"."
] | e9508ce13a4bb277d10bdcd925fdb84bc01f453f | https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Variety.php#L1193-L1196 |
194,789 | sil-project/VarietyBundle | src/Entity/Variety.php | Variety.setProfessionalDescriptions | public function setProfessionalDescriptions($descriptions)
{
foreach ($descriptions as $description) {
$description->setVariety($this);
}
$this->professional_descriptions = $descriptions;
return $this;
} | php | public function setProfessionalDescriptions($descriptions)
{
foreach ($descriptions as $description) {
$description->setVariety($this);
}
$this->professional_descriptions = $descriptions;
return $this;
} | [
"public",
"function",
"setProfessionalDescriptions",
"(",
"$",
"descriptions",
")",
"{",
"foreach",
"(",
"$",
"descriptions",
"as",
"$",
"description",
")",
"{",
"$",
"description",
"->",
"setVariety",
"(",
"$",
"this",
")",
";",
"}",
"$",
"this",
"->",
"p... | Set professional descriptions.
@param \Doctrine\Common\Collections\Collection $descriptions
@return Variety | [
"Set",
"professional",
"descriptions",
"."
] | e9508ce13a4bb277d10bdcd925fdb84bc01f453f | https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Variety.php#L1225-L1233 |
194,790 | sil-project/VarietyBundle | src/Entity/Variety.php | Variety.addAmateurDescription | public function addAmateurDescription(\Librinfo\VarietiesBundle\Entity\VarietyDescriptionAmateur $amateurDescription)
{
$this->amateur_descriptions[] = $amateurDescription;
return $this;
} | php | public function addAmateurDescription(\Librinfo\VarietiesBundle\Entity\VarietyDescriptionAmateur $amateurDescription)
{
$this->amateur_descriptions[] = $amateurDescription;
return $this;
} | [
"public",
"function",
"addAmateurDescription",
"(",
"\\",
"Librinfo",
"\\",
"VarietiesBundle",
"\\",
"Entity",
"\\",
"VarietyDescriptionAmateur",
"$",
"amateurDescription",
")",
"{",
"$",
"this",
"->",
"amateur_descriptions",
"[",
"]",
"=",
"$",
"amateurDescription",
... | Add amateurDescription.
@param \Librinfo\VarietiesBundle\Entity\VarietyDescriptionAmateur amateurDescription
@return Variety | [
"Add",
"amateurDescription",
"."
] | e9508ce13a4bb277d10bdcd925fdb84bc01f453f | https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Variety.php#L1242-L1247 |
194,791 | sil-project/VarietyBundle | src/Entity/Variety.php | Variety.removeAmateurDescription | public function removeAmateurDescription(\Librinfo\VarietiesBundle\Entity\VarietyDescriptionAmateur $amateurDescription)
{
return $this->amateur_descriptions->removeElement($amateurDescription);
} | php | public function removeAmateurDescription(\Librinfo\VarietiesBundle\Entity\VarietyDescriptionAmateur $amateurDescription)
{
return $this->amateur_descriptions->removeElement($amateurDescription);
} | [
"public",
"function",
"removeAmateurDescription",
"(",
"\\",
"Librinfo",
"\\",
"VarietiesBundle",
"\\",
"Entity",
"\\",
"VarietyDescriptionAmateur",
"$",
"amateurDescription",
")",
"{",
"return",
"$",
"this",
"->",
"amateur_descriptions",
"->",
"removeElement",
"(",
"... | Remove amateurDescription.
@param \Librinfo\VarietiesBundle\Entity\VarietyDescriptionAmateur $amateurDescription
@return bool tRUE if this collection contained the specified element, FALSE otherwise | [
"Remove",
"amateurDescription",
"."
] | e9508ce13a4bb277d10bdcd925fdb84bc01f453f | https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Variety.php#L1256-L1259 |
194,792 | sil-project/VarietyBundle | src/Entity/Variety.php | Variety.setAmateurDescriptions | public function setAmateurDescriptions($descriptions)
{
foreach ($descriptions as $description) {
$description->setVariety($this);
}
$this->amateur_descriptions = $descriptions;
return $this;
} | php | public function setAmateurDescriptions($descriptions)
{
foreach ($descriptions as $description) {
$description->setVariety($this);
}
$this->amateur_descriptions = $descriptions;
return $this;
} | [
"public",
"function",
"setAmateurDescriptions",
"(",
"$",
"descriptions",
")",
"{",
"foreach",
"(",
"$",
"descriptions",
"as",
"$",
"description",
")",
"{",
"$",
"description",
"->",
"setVariety",
"(",
"$",
"this",
")",
";",
"}",
"$",
"this",
"->",
"amateu... | Set amateur descriptions.
@param \Doctrine\Common\Collections\Collection $descriptions
@return Variety | [
"Set",
"amateur",
"descriptions",
"."
] | e9508ce13a4bb277d10bdcd925fdb84bc01f453f | https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Variety.php#L1288-L1296 |
194,793 | sil-project/VarietyBundle | src/Entity/Variety.php | Variety.addProductionDescription | public function addProductionDescription(\Librinfo\VarietiesBundle\Entity\VarietyDescriptionProduction $productionDescription)
{
$this->production_descriptions[] = $productionDescription;
return $this;
} | php | public function addProductionDescription(\Librinfo\VarietiesBundle\Entity\VarietyDescriptionProduction $productionDescription)
{
$this->production_descriptions[] = $productionDescription;
return $this;
} | [
"public",
"function",
"addProductionDescription",
"(",
"\\",
"Librinfo",
"\\",
"VarietiesBundle",
"\\",
"Entity",
"\\",
"VarietyDescriptionProduction",
"$",
"productionDescription",
")",
"{",
"$",
"this",
"->",
"production_descriptions",
"[",
"]",
"=",
"$",
"productio... | Add productionDescription.
@param \Librinfo\VarietiesBundle\Entity\VarietyDescriptionProduction $productionDescription
@return Variety | [
"Add",
"productionDescription",
"."
] | e9508ce13a4bb277d10bdcd925fdb84bc01f453f | https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Variety.php#L1305-L1310 |
194,794 | sil-project/VarietyBundle | src/Entity/Variety.php | Variety.removeProductionDescription | public function removeProductionDescription(\Librinfo\VarietiesBundle\Entity\VarietyDescriptionProduction $productionDescription)
{
return $this->production_descriptions->removeElement($productionDescription);
} | php | public function removeProductionDescription(\Librinfo\VarietiesBundle\Entity\VarietyDescriptionProduction $productionDescription)
{
return $this->production_descriptions->removeElement($productionDescription);
} | [
"public",
"function",
"removeProductionDescription",
"(",
"\\",
"Librinfo",
"\\",
"VarietiesBundle",
"\\",
"Entity",
"\\",
"VarietyDescriptionProduction",
"$",
"productionDescription",
")",
"{",
"return",
"$",
"this",
"->",
"production_descriptions",
"->",
"removeElement"... | Remove productionDescription.
@param \Librinfo\VarietiesBundle\Entity\VarietyDescriptionProduction $productionDescription
@return bool tRUE if this collection contained the specified element, FALSE otherwise | [
"Remove",
"productionDescription",
"."
] | e9508ce13a4bb277d10bdcd925fdb84bc01f453f | https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Variety.php#L1319-L1322 |
194,795 | sil-project/VarietyBundle | src/Entity/Variety.php | Variety.setProductionDescriptions | public function setProductionDescriptions($descriptions)
{
foreach ($descriptions as $description) {
$description->setVariety($this);
}
$this->production_descriptions = $descriptions;
return $this;
} | php | public function setProductionDescriptions($descriptions)
{
foreach ($descriptions as $description) {
$description->setVariety($this);
}
$this->production_descriptions = $descriptions;
return $this;
} | [
"public",
"function",
"setProductionDescriptions",
"(",
"$",
"descriptions",
")",
"{",
"foreach",
"(",
"$",
"descriptions",
"as",
"$",
"description",
")",
"{",
"$",
"description",
"->",
"setVariety",
"(",
"$",
"this",
")",
";",
"}",
"$",
"this",
"->",
"pro... | Set production descriptions.
@param \Doctrine\Common\Collections\Collection $descriptions
@return Variety | [
"Set",
"production",
"descriptions",
"."
] | e9508ce13a4bb277d10bdcd925fdb84bc01f453f | https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Variety.php#L1351-L1359 |
194,796 | sil-project/VarietyBundle | src/Entity/Variety.php | Variety.addCommercialDescription | public function addCommercialDescription(\Librinfo\VarietiesBundle\Entity\VarietyDescriptionCommercial $commercialDescription)
{
$this->commercial_descriptions[] = $commercialDescription;
return $this;
} | php | public function addCommercialDescription(\Librinfo\VarietiesBundle\Entity\VarietyDescriptionCommercial $commercialDescription)
{
$this->commercial_descriptions[] = $commercialDescription;
return $this;
} | [
"public",
"function",
"addCommercialDescription",
"(",
"\\",
"Librinfo",
"\\",
"VarietiesBundle",
"\\",
"Entity",
"\\",
"VarietyDescriptionCommercial",
"$",
"commercialDescription",
")",
"{",
"$",
"this",
"->",
"commercial_descriptions",
"[",
"]",
"=",
"$",
"commercia... | Add commercialDescription.
@param \Librinfo\VarietiesBundle\Entity\VarietyDescriptionCommercial $commercialDescription
@return Variety | [
"Add",
"commercialDescription",
"."
] | e9508ce13a4bb277d10bdcd925fdb84bc01f453f | https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Variety.php#L1368-L1373 |
194,797 | sil-project/VarietyBundle | src/Entity/Variety.php | Variety.removeCommercialDescription | public function removeCommercialDescription(\Librinfo\VarietiesBundle\Entity\VarietyDescriptionCommercial $commercialDescription)
{
return $this->commercial_descriptions->removeElement($commercialDescription);
} | php | public function removeCommercialDescription(\Librinfo\VarietiesBundle\Entity\VarietyDescriptionCommercial $commercialDescription)
{
return $this->commercial_descriptions->removeElement($commercialDescription);
} | [
"public",
"function",
"removeCommercialDescription",
"(",
"\\",
"Librinfo",
"\\",
"VarietiesBundle",
"\\",
"Entity",
"\\",
"VarietyDescriptionCommercial",
"$",
"commercialDescription",
")",
"{",
"return",
"$",
"this",
"->",
"commercial_descriptions",
"->",
"removeElement"... | Remove commercialDescription.
@param \Librinfo\VarietiesBundle\Entity\VarietyDescriptionCommercial $commercialDescription
@return bool tRUE if this collection contained the specified element, FALSE otherwise | [
"Remove",
"commercialDescription",
"."
] | e9508ce13a4bb277d10bdcd925fdb84bc01f453f | https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Variety.php#L1382-L1385 |
194,798 | sil-project/VarietyBundle | src/Entity/Variety.php | Variety.setCommercialDescriptions | public function setCommercialDescriptions($descriptions)
{
foreach ($descriptions as $description) {
$description->setVariety($this);
}
$this->commercial_descriptions = $descriptions;
return $this;
} | php | public function setCommercialDescriptions($descriptions)
{
foreach ($descriptions as $description) {
$description->setVariety($this);
}
$this->commercial_descriptions = $descriptions;
return $this;
} | [
"public",
"function",
"setCommercialDescriptions",
"(",
"$",
"descriptions",
")",
"{",
"foreach",
"(",
"$",
"descriptions",
"as",
"$",
"description",
")",
"{",
"$",
"description",
"->",
"setVariety",
"(",
"$",
"this",
")",
";",
"}",
"$",
"this",
"->",
"com... | Set commercial descriptions.
@param \Doctrine\Common\Collections\Collection $descriptions
@return Variety | [
"Set",
"commercial",
"descriptions",
"."
] | e9508ce13a4bb277d10bdcd925fdb84bc01f453f | https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Variety.php#L1414-L1422 |
194,799 | sil-project/VarietyBundle | src/Entity/Variety.php | Variety.addPlantDescription | public function addPlantDescription(\Librinfo\VarietiesBundle\Entity\VarietyDescriptionPlant $plantDescription)
{
$this->plant_descriptions[] = $plantDescription;
return $this;
} | php | public function addPlantDescription(\Librinfo\VarietiesBundle\Entity\VarietyDescriptionPlant $plantDescription)
{
$this->plant_descriptions[] = $plantDescription;
return $this;
} | [
"public",
"function",
"addPlantDescription",
"(",
"\\",
"Librinfo",
"\\",
"VarietiesBundle",
"\\",
"Entity",
"\\",
"VarietyDescriptionPlant",
"$",
"plantDescription",
")",
"{",
"$",
"this",
"->",
"plant_descriptions",
"[",
"]",
"=",
"$",
"plantDescription",
";",
"... | Add plantDescription.
@param \Librinfo\VarietiesBundle\Entity\VarietyDescriptionPlant $plantDescription
@return Variety | [
"Add",
"plantDescription",
"."
] | e9508ce13a4bb277d10bdcd925fdb84bc01f453f | https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Variety.php#L1431-L1436 |
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.