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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
187,100 | AStateOfCode/AsseticAngularJsBundle | Angular/SymfonyTemplateNameFormatter.php | SymfonyTemplateNameFormatter.getForAsset | public function getForAsset(AssetInterface $asset)
{
$sourceRoot = $asset->getSourceRoot();
if (!isset($this->bundleMap[$sourceRoot])) {
throw new \Exception('Could not map the asset to a bundle');
}
// get the relative path
$templateName = $asset->getSourcePath(... | php | public function getForAsset(AssetInterface $asset)
{
$sourceRoot = $asset->getSourceRoot();
if (!isset($this->bundleMap[$sourceRoot])) {
throw new \Exception('Could not map the asset to a bundle');
}
// get the relative path
$templateName = $asset->getSourcePath(... | [
"public",
"function",
"getForAsset",
"(",
"AssetInterface",
"$",
"asset",
")",
"{",
"$",
"sourceRoot",
"=",
"$",
"asset",
"->",
"getSourceRoot",
"(",
")",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"bundleMap",
"[",
"$",
"sourceRoot",
"]",
"... | Create template name for asset.
@param AssetInterface $asset
@return string | [
"Create",
"template",
"name",
"for",
"asset",
"."
] | e1158f4bd2c70d0f15b5cb51afad7024ccabde86 | https://github.com/AStateOfCode/AsseticAngularJsBundle/blob/e1158f4bd2c70d0f15b5cb51afad7024ccabde86/Angular/SymfonyTemplateNameFormatter.php#L63-L81 |
187,101 | netzmacht-archive/contao-bootstrap | src/Netzmacht/Bootstrap/ContentElement/AccordionGroup.php | AccordionGroup.compile | protected function compile()
{
if($this->objWrapper->getType() == ContentWrapper\Model::TYPE_START)
{
$GLOBALS['accordionGroup'] = 'accordion-group-' . $this->id;
$GLOBALS['accordionGroupFirst'] = true;
$this->Template->groupId = $GLOBALS['accordionGroup'];
}
else
{
$GLOBALS['accordionGroup'] = n... | php | protected function compile()
{
if($this->objWrapper->getType() == ContentWrapper\Model::TYPE_START)
{
$GLOBALS['accordionGroup'] = 'accordion-group-' . $this->id;
$GLOBALS['accordionGroupFirst'] = true;
$this->Template->groupId = $GLOBALS['accordionGroup'];
}
else
{
$GLOBALS['accordionGroup'] = n... | [
"protected",
"function",
"compile",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"objWrapper",
"->",
"getType",
"(",
")",
"==",
"ContentWrapper",
"\\",
"Model",
"::",
"TYPE_START",
")",
"{",
"$",
"GLOBALS",
"[",
"'accordionGroup'",
"]",
"=",
"'accordion-gr... | compile accordion group | [
"compile",
"accordion",
"group"
] | 6468ab614e67a6c31c4ea5ace0837737c855f85c | https://github.com/netzmacht-archive/contao-bootstrap/blob/6468ab614e67a6c31c4ea5ace0837737c855f85c/src/Netzmacht/Bootstrap/ContentElement/AccordionGroup.php#L30-L43 |
187,102 | orchestral/facile | src/Factory.php | Factory.make | public function make($name, array $data = [], $format = null)
{
return new Facile($this, $name, $data, $format);
} | php | public function make($name, array $data = [], $format = null)
{
return new Facile($this, $name, $data, $format);
} | [
"public",
"function",
"make",
"(",
"$",
"name",
",",
"array",
"$",
"data",
"=",
"[",
"]",
",",
"$",
"format",
"=",
"null",
")",
"{",
"return",
"new",
"Facile",
"(",
"$",
"this",
",",
"$",
"name",
",",
"$",
"data",
",",
"$",
"format",
")",
";",
... | Create a new Facile instance.
@param string $name Name of template
@param array $data
@param string $format
@return \Orchestra\Facile\Facile | [
"Create",
"a",
"new",
"Facile",
"instance",
"."
] | 1e4d6b9cd9bd1023bcd39047a4b44179380ee17a | https://github.com/orchestral/facile/blob/1e4d6b9cd9bd1023bcd39047a4b44179380ee17a/src/Factory.php#L54-L57 |
187,103 | orchestral/facile | src/Factory.php | Factory.name | public function name(string $name, $parser): void
{
if (\is_string($parser) && (\class_exists($parser, false) || $this->app->bound($parser))) {
$parser = $this->app->make($parser);
}
$this->parsers[$name] = $parser;
} | php | public function name(string $name, $parser): void
{
if (\is_string($parser) && (\class_exists($parser, false) || $this->app->bound($parser))) {
$parser = $this->app->make($parser);
}
$this->parsers[$name] = $parser;
} | [
"public",
"function",
"name",
"(",
"string",
"$",
"name",
",",
"$",
"parser",
")",
":",
"void",
"{",
"if",
"(",
"\\",
"is_string",
"(",
"$",
"parser",
")",
"&&",
"(",
"\\",
"class_exists",
"(",
"$",
"parser",
",",
"false",
")",
"||",
"$",
"this",
... | Register a named parser.
@param string $name
@param string|\Orchestra\Facile\Template\Parser $parser
@return void | [
"Register",
"a",
"named",
"parser",
"."
] | 1e4d6b9cd9bd1023bcd39047a4b44179380ee17a | https://github.com/orchestral/facile/blob/1e4d6b9cd9bd1023bcd39047a4b44179380ee17a/src/Factory.php#L92-L99 |
187,104 | orchestral/facile | src/Factory.php | Factory.getPrefersFor | protected function getPrefersFor(Template\Parser $parser): ?string
{
return $this->request->prefers(
$parser->getSupportedFormats()
);
} | php | protected function getPrefersFor(Template\Parser $parser): ?string
{
return $this->request->prefers(
$parser->getSupportedFormats()
);
} | [
"protected",
"function",
"getPrefersFor",
"(",
"Template",
"\\",
"Parser",
"$",
"parser",
")",
":",
"?",
"string",
"{",
"return",
"$",
"this",
"->",
"request",
"->",
"prefers",
"(",
"$",
"parser",
"->",
"getSupportedFormats",
"(",
")",
")",
";",
"}"
] | Get request format.
@param \Orchestra\Facile\Template\Parser $parser
@return string|null | [
"Get",
"request",
"format",
"."
] | 1e4d6b9cd9bd1023bcd39047a4b44179380ee17a | https://github.com/orchestral/facile/blob/1e4d6b9cd9bd1023bcd39047a4b44179380ee17a/src/Factory.php#L108-L113 |
187,105 | orchestral/facile | src/Factory.php | Factory.resolve | public function resolve($name, $format, array $data, $method = 'compose')
{
$parser = $this->parse($name);
$format = $format ?? $this->getPrefersFor($parser);
return $parser->compose($format, $data, $method);
} | php | public function resolve($name, $format, array $data, $method = 'compose')
{
$parser = $this->parse($name);
$format = $format ?? $this->getPrefersFor($parser);
return $parser->compose($format, $data, $method);
} | [
"public",
"function",
"resolve",
"(",
"$",
"name",
",",
"$",
"format",
",",
"array",
"$",
"data",
",",
"$",
"method",
"=",
"'compose'",
")",
"{",
"$",
"parser",
"=",
"$",
"this",
"->",
"parse",
"(",
"$",
"name",
")",
";",
"$",
"format",
"=",
"$",... | Resolve parser from factory.
@param string $name
@param string|null $format
@param array $data
@param string $method
@return mixed | [
"Resolve",
"parser",
"from",
"factory",
"."
] | 1e4d6b9cd9bd1023bcd39047a4b44179380ee17a | https://github.com/orchestral/facile/blob/1e4d6b9cd9bd1023bcd39047a4b44179380ee17a/src/Factory.php#L125-L131 |
187,106 | mikemirten/ZExt | library/ZExt/Html/Table/TablePart.php | TablePart.addElement | public function addElement($row, $name = null, $attrs = null) {
if (is_array($row)) {
$row = new TableRow($row, $attrs, $this->_headPart);
}
else if (! $row instanceof TableRow) {
throw new Exception('Element must be an instance of the TableRow or an array');
}
return parent::addElement($row, $name);... | php | public function addElement($row, $name = null, $attrs = null) {
if (is_array($row)) {
$row = new TableRow($row, $attrs, $this->_headPart);
}
else if (! $row instanceof TableRow) {
throw new Exception('Element must be an instance of the TableRow or an array');
}
return parent::addElement($row, $name);... | [
"public",
"function",
"addElement",
"(",
"$",
"row",
",",
"$",
"name",
"=",
"null",
",",
"$",
"attrs",
"=",
"null",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"row",
")",
")",
"{",
"$",
"row",
"=",
"new",
"TableRow",
"(",
"$",
"row",
",",
"$",
... | Add a row to a table
@param array | TableRow $element
@param string $name
@return Table
@throws Exception | [
"Add",
"a",
"row",
"to",
"a",
"table"
] | 284956f5b85ba10571f64aaa651169e00f05ae56 | https://github.com/mikemirten/ZExt/blob/284956f5b85ba10571f64aaa651169e00f05ae56/library/ZExt/Html/Table/TablePart.php#L87-L96 |
187,107 | aidantwoods/BetterOptions | src/Text/HelpFormatter.php | HelpFormatter.generate | public static function generate(
array $options,
int $descriptionLength
) : string
{
$lines = array();
$nameCols = array();
$maxLineLength = 0;
# make sure keys are ordered
$options = array_values($options);
foreach ($options as $option)
... | php | public static function generate(
array $options,
int $descriptionLength
) : string
{
$lines = array();
$nameCols = array();
$maxLineLength = 0;
# make sure keys are ordered
$options = array_values($options);
foreach ($options as $option)
... | [
"public",
"static",
"function",
"generate",
"(",
"array",
"$",
"options",
",",
"int",
"$",
"descriptionLength",
")",
":",
"string",
"{",
"$",
"lines",
"=",
"array",
"(",
")",
";",
"$",
"nameCols",
"=",
"array",
"(",
")",
";",
"$",
"maxLineLength",
"=",... | Generate help text given an array of options
@param Option[] $options
@return string; | [
"Generate",
"help",
"text",
"given",
"an",
"array",
"of",
"options"
] | c306f2fcd00e499d78097c4e1019b88a1123c13b | https://github.com/aidantwoods/BetterOptions/blob/c306f2fcd00e499d78097c4e1019b88a1123c13b/src/Text/HelpFormatter.php#L16-L79 |
187,108 | aidantwoods/BetterOptions | src/Text/HelpFormatter.php | HelpFormatter.formatLineWithDescription | private static function formatLineWithDescription(
string $line,
string $description,
int $desciptionCharStart,
int $descriptionLength,
array &$lines
) {
$description = preg_replace('/\n|\r/', '', $description);
$spaceRepeat = $desciptionCharStart - strlen($l... | php | private static function formatLineWithDescription(
string $line,
string $description,
int $desciptionCharStart,
int $descriptionLength,
array &$lines
) {
$description = preg_replace('/\n|\r/', '', $description);
$spaceRepeat = $desciptionCharStart - strlen($l... | [
"private",
"static",
"function",
"formatLineWithDescription",
"(",
"string",
"$",
"line",
",",
"string",
"$",
"description",
",",
"int",
"$",
"desciptionCharStart",
",",
"int",
"$",
"descriptionLength",
",",
"array",
"&",
"$",
"lines",
")",
"{",
"$",
"descript... | Format lines that have a description
@param string $line
the line to format
@param string $description
the description text
@param int $desciptionCharStart
the number of chars past a newline that the description column starts
@param int $descriptionLength
the hard-wrap length of the description
@param array &$lines
a ... | [
"Format",
"lines",
"that",
"have",
"a",
"description"
] | c306f2fcd00e499d78097c4e1019b88a1123c13b | https://github.com/aidantwoods/BetterOptions/blob/c306f2fcd00e499d78097c4e1019b88a1123c13b/src/Text/HelpFormatter.php#L95-L126 |
187,109 | aidantwoods/BetterOptions | src/Text/HelpFormatter.php | HelpFormatter.descriptionTrimmer | private static function descriptionTrimmer(
string $description,
int $desciptionCharStart,
int $descriptionLength
) {
$remainder = $description;
$firstLine = true;
while (strlen($remainder) > 0)
{
$space = '';
if ( ! $firstLine)
... | php | private static function descriptionTrimmer(
string $description,
int $desciptionCharStart,
int $descriptionLength
) {
$remainder = $description;
$firstLine = true;
while (strlen($remainder) > 0)
{
$space = '';
if ( ! $firstLine)
... | [
"private",
"static",
"function",
"descriptionTrimmer",
"(",
"string",
"$",
"description",
",",
"int",
"$",
"desciptionCharStart",
",",
"int",
"$",
"descriptionLength",
")",
"{",
"$",
"remainder",
"=",
"$",
"description",
";",
"$",
"firstLine",
"=",
"true",
";"... | Load options from a .json file
@param string $description
the description to trim
@param string $desciptionCharStart
the number of chars past a newline that the description column starts
@param int $descriptionLength
the hard-wrap length of the description
@return \Generator|string[]
yields a single line until the gi... | [
"Load",
"options",
"from",
"a",
".",
"json",
"file"
] | c306f2fcd00e499d78097c4e1019b88a1123c13b | https://github.com/aidantwoods/BetterOptions/blob/c306f2fcd00e499d78097c4e1019b88a1123c13b/src/Text/HelpFormatter.php#L141-L191 |
187,110 | volodymyr-volynets/framework | Object/Table.php | Table.processWhoColumns | public function processWhoColumns($types, & $row, $timestamp = null) {
if ($types === 'all') $types = array_keys($this->who);
if (!is_array($types)) $types = [$types];
if (empty($timestamp)) $timestamp = \Format::now('timestamp');
foreach ($types as $type) {
if (!empty($this->who[$type])) {
// timestamp
... | php | public function processWhoColumns($types, & $row, $timestamp = null) {
if ($types === 'all') $types = array_keys($this->who);
if (!is_array($types)) $types = [$types];
if (empty($timestamp)) $timestamp = \Format::now('timestamp');
foreach ($types as $type) {
if (!empty($this->who[$type])) {
// timestamp
... | [
"public",
"function",
"processWhoColumns",
"(",
"$",
"types",
",",
"&",
"$",
"row",
",",
"$",
"timestamp",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"types",
"===",
"'all'",
")",
"$",
"types",
"=",
"array_keys",
"(",
"$",
"this",
"->",
"who",
")",
";"... | Process who columns
@param mixed $types
@param array $row | [
"Process",
"who",
"columns"
] | 975a49d7ac1697ed13e82e445908e7886ee62fb8 | https://github.com/volodymyr-volynets/framework/blob/975a49d7ac1697ed13e82e445908e7886ee62fb8/Object/Table.php#L481-L497 |
187,111 | volodymyr-volynets/framework | Object/Table.php | Table.processColumns | public function processColumns(& $data, $options = []) {
$save = [];
// we need to determine columns that have overrides like ;;bytea
$data_columns = [];
foreach ($data as $k => $v) {
if (strpos($k, ';') !== false) {
$k2 = explode(';', $k)[0];
if (!empty($this->columns[$k2])) {
$data_columns[$k2... | php | public function processColumns(& $data, $options = []) {
$save = [];
// we need to determine columns that have overrides like ;;bytea
$data_columns = [];
foreach ($data as $k => $v) {
if (strpos($k, ';') !== false) {
$k2 = explode(';', $k)[0];
if (!empty($this->columns[$k2])) {
$data_columns[$k2... | [
"public",
"function",
"processColumns",
"(",
"&",
"$",
"data",
",",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"save",
"=",
"[",
"]",
";",
"// we need to determine columns that have overrides like ;;bytea",
"$",
"data_columns",
"=",
"[",
"]",
";",
"foreach"... | Process columns
removes not existing columns
processes column types
@param array $data
@param array $options
boolean ignore_not_set_fields
boolean skip_type_validation
@return array | [
"Process",
"columns",
"removes",
"not",
"existing",
"columns",
"processes",
"column",
"types"
] | 975a49d7ac1697ed13e82e445908e7886ee62fb8 | https://github.com/volodymyr-volynets/framework/blob/975a49d7ac1697ed13e82e445908e7886ee62fb8/Object/Table.php#L550-L578 |
187,112 | volodymyr-volynets/framework | Object/Table.php | Table.sequence | public function sequence(string $column, string $type = 'nextval', $tenant = null, $module = null) : int {
// add tenant
if (empty($tenant) && $this->tenant) {
$tenant = \Tenant::id();
}
$temp = $this->db_object->sequence($this->full_table_name . '_' . $column . '_seq', $type, $tenant, $module);
return $te... | php | public function sequence(string $column, string $type = 'nextval', $tenant = null, $module = null) : int {
// add tenant
if (empty($tenant) && $this->tenant) {
$tenant = \Tenant::id();
}
$temp = $this->db_object->sequence($this->full_table_name . '_' . $column . '_seq', $type, $tenant, $module);
return $te... | [
"public",
"function",
"sequence",
"(",
"string",
"$",
"column",
",",
"string",
"$",
"type",
"=",
"'nextval'",
",",
"$",
"tenant",
"=",
"null",
",",
"$",
"module",
"=",
"null",
")",
":",
"int",
"{",
"// add tenant",
"if",
"(",
"empty",
"(",
"$",
"tena... | Generate a sequence
@param string $column
@param string $type
@param int|null $tenant
@param int|null $module
@return int | [
"Generate",
"a",
"sequence"
] | 975a49d7ac1697ed13e82e445908e7886ee62fb8 | https://github.com/volodymyr-volynets/framework/blob/975a49d7ac1697ed13e82e445908e7886ee62fb8/Object/Table.php#L589-L596 |
187,113 | volodymyr-volynets/framework | Object/Table.php | Table.resetCache | public function resetCache() {
// only reset caches if cache link is present
if (!empty($this->db_object->object->options['cache_link'])) {
$tags = array_unique($this->cache_tags);
sort($tags, SORT_STRING);
$hash = sha1(serialize($tags));
\Cache::$reset_caches[$this->db_object->object->options['cache_li... | php | public function resetCache() {
// only reset caches if cache link is present
if (!empty($this->db_object->object->options['cache_link'])) {
$tags = array_unique($this->cache_tags);
sort($tags, SORT_STRING);
$hash = sha1(serialize($tags));
\Cache::$reset_caches[$this->db_object->object->options['cache_li... | [
"public",
"function",
"resetCache",
"(",
")",
"{",
"// only reset caches if cache link is present",
"if",
"(",
"!",
"empty",
"(",
"$",
"this",
"->",
"db_object",
"->",
"object",
"->",
"options",
"[",
"'cache_link'",
"]",
")",
")",
"{",
"$",
"tags",
"=",
"arr... | Reset caches on exit | [
"Reset",
"caches",
"on",
"exit"
] | 975a49d7ac1697ed13e82e445908e7886ee62fb8 | https://github.com/volodymyr-volynets/framework/blob/975a49d7ac1697ed13e82e445908e7886ee62fb8/Object/Table.php#L615-L623 |
187,114 | volodymyr-volynets/framework | Object/Table.php | Table.collection | public function collection(array $options = []) : \Object\Collection {
if (!empty($this->virtual_class_name)) {
$options['model'] = $this->virtual_class_name;
return \Object\Collection::collectionToModel($options);
} else {
return self::collectionStatic($options);
}
} | php | public function collection(array $options = []) : \Object\Collection {
if (!empty($this->virtual_class_name)) {
$options['model'] = $this->virtual_class_name;
return \Object\Collection::collectionToModel($options);
} else {
return self::collectionStatic($options);
}
} | [
"public",
"function",
"collection",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
":",
"\\",
"Object",
"\\",
"Collection",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"this",
"->",
"virtual_class_name",
")",
")",
"{",
"$",
"options",
"[",
"'model'",
... | Create collection object
@param array $options
@return object | [
"Create",
"collection",
"object"
] | 975a49d7ac1697ed13e82e445908e7886ee62fb8 | https://github.com/volodymyr-volynets/framework/blob/975a49d7ac1697ed13e82e445908e7886ee62fb8/Object/Table.php#L631-L638 |
187,115 | volodymyr-volynets/framework | Object/Table.php | Table.checkUniqueConstraint | public function checkUniqueConstraint(string $name, array $pk, array $values) : bool {
// create a query bulder
$query = $this->queryBuilder(['alias' => 'a'])->select()->columns($pk);
foreach ($this->unique[$name] as $v2) {
if ($v2 == $this->tenant_column) {
$values[$v2] = \Tenant::id();
continue;
}... | php | public function checkUniqueConstraint(string $name, array $pk, array $values) : bool {
// create a query bulder
$query = $this->queryBuilder(['alias' => 'a'])->select()->columns($pk);
foreach ($this->unique[$name] as $v2) {
if ($v2 == $this->tenant_column) {
$values[$v2] = \Tenant::id();
continue;
}... | [
"public",
"function",
"checkUniqueConstraint",
"(",
"string",
"$",
"name",
",",
"array",
"$",
"pk",
",",
"array",
"$",
"values",
")",
":",
"bool",
"{",
"// create a query bulder",
"$",
"query",
"=",
"$",
"this",
"->",
"queryBuilder",
"(",
"[",
"'alias'",
"... | Check unique constraint
@param string $name
@param array $pk
@param array $values
@return bool | [
"Check",
"unique",
"constraint"
] | 975a49d7ac1697ed13e82e445908e7886ee62fb8 | https://github.com/volodymyr-volynets/framework/blob/975a49d7ac1697ed13e82e445908e7886ee62fb8/Object/Table.php#L730-L753 |
187,116 | RockPhp/PhpWsdl | src/Rock/PhpWsdl/class.phpwsdlformatter.php | PhpWsdlFormatter._cbElementStart | protected function _cbElementStart($parser, $name, Array $attributes)
{
$idx = xml_get_current_byte_index($this->_parser);
$this->_empty = $this->_buffer[$idx - $this->_offset] == '/';
$attrs = "";
foreach ($attributes as $key => $val) {
$attrs .= " " . $key . "=\"" . $val . "\"";
}
... | php | protected function _cbElementStart($parser, $name, Array $attributes)
{
$idx = xml_get_current_byte_index($this->_parser);
$this->_empty = $this->_buffer[$idx - $this->_offset] == '/';
$attrs = "";
foreach ($attributes as $key => $val) {
$attrs .= " " . $key . "=\"" . $val . "\"";
}
... | [
"protected",
"function",
"_cbElementStart",
"(",
"$",
"parser",
",",
"$",
"name",
",",
"Array",
"$",
"attributes",
")",
"{",
"$",
"idx",
"=",
"xml_get_current_byte_index",
"(",
"$",
"this",
"->",
"_parser",
")",
";",
"$",
"this",
"->",
"_empty",
"=",
"$"... | Element start callback
@param resource $parser xml parser
@param string $name element name
@param array $attributes element attributes
@return void | [
"Element",
"start",
"callback"
] | b2f9da7a8c3ce50b26032ff2fd9cfe081dee9f73 | https://github.com/RockPhp/PhpWsdl/blob/b2f9da7a8c3ce50b26032ff2fd9cfe081dee9f73/src/Rock/PhpWsdl/class.phpwsdlformatter.php#L154-L168 |
187,117 | RockPhp/PhpWsdl | src/Rock/PhpWsdl/class.phpwsdlformatter.php | PhpWsdlFormatter._cbElementEnd | protected function _cbElementEnd($parser, $name)
{
if (!$this->_empty) {
--$this->_depth;
fwrite($this->_output, $this->_getPaddingStr() . "</" . $name . ">" . "\n");
} else {
$this->_empty = false;
}
} | php | protected function _cbElementEnd($parser, $name)
{
if (!$this->_empty) {
--$this->_depth;
fwrite($this->_output, $this->_getPaddingStr() . "</" . $name . ">" . "\n");
} else {
$this->_empty = false;
}
} | [
"protected",
"function",
"_cbElementEnd",
"(",
"$",
"parser",
",",
"$",
"name",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_empty",
")",
"{",
"--",
"$",
"this",
"->",
"_depth",
";",
"fwrite",
"(",
"$",
"this",
"->",
"_output",
",",
"$",
"this",
... | Element end callback
@param resource $parser xml parser
@param string $name element name
@return void | [
"Element",
"end",
"callback"
] | b2f9da7a8c3ce50b26032ff2fd9cfe081dee9f73 | https://github.com/RockPhp/PhpWsdl/blob/b2f9da7a8c3ce50b26032ff2fd9cfe081dee9f73/src/Rock/PhpWsdl/class.phpwsdlformatter.php#L177-L186 |
187,118 | RockPhp/PhpWsdl | src/Rock/PhpWsdl/class.phpwsdlformatter.php | PhpWsdlFormatter._cbCharacterData | protected function _cbCharacterData($parser, $data)
{
if (!$this->_options["formatCData"]) {
return;
}
$data = trim($data);
if (strlen($data)) {
$pad = $this->_getPaddingStr();
if ($this->_options["multipleLineCData"]) {
// remove all tabs
$data = str_replace("\t"... | php | protected function _cbCharacterData($parser, $data)
{
if (!$this->_options["formatCData"]) {
return;
}
$data = trim($data);
if (strlen($data)) {
$pad = $this->_getPaddingStr();
if ($this->_options["multipleLineCData"]) {
// remove all tabs
$data = str_replace("\t"... | [
"protected",
"function",
"_cbCharacterData",
"(",
"$",
"parser",
",",
"$",
"data",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_options",
"[",
"\"formatCData\"",
"]",
")",
"{",
"return",
";",
"}",
"$",
"data",
"=",
"trim",
"(",
"$",
"data",
")",
... | Character data callback
@param resource $parser xml parser
@param string $data character data
@return void | [
"Character",
"data",
"callback"
] | b2f9da7a8c3ce50b26032ff2fd9cfe081dee9f73 | https://github.com/RockPhp/PhpWsdl/blob/b2f9da7a8c3ce50b26032ff2fd9cfe081dee9f73/src/Rock/PhpWsdl/class.phpwsdlformatter.php#L195-L221 |
187,119 | RockPhp/PhpWsdl | src/Rock/PhpWsdl/class.phpwsdlformatter.php | PhpWsdlFormatter.format | public function format()
{
while ($this->_buffer = fread($this->_input, $this->_options["bufferSize"])) {
if (!xml_parse($this->_parser, $this->_buffer, feof($this->_input))) {
throw new Exception(sprintf("XML error: %s at line %d",
xml_error_string(xml_get_error_code($this->_parser))... | php | public function format()
{
while ($this->_buffer = fread($this->_input, $this->_options["bufferSize"])) {
if (!xml_parse($this->_parser, $this->_buffer, feof($this->_input))) {
throw new Exception(sprintf("XML error: %s at line %d",
xml_error_string(xml_get_error_code($this->_parser))... | [
"public",
"function",
"format",
"(",
")",
"{",
"while",
"(",
"$",
"this",
"->",
"_buffer",
"=",
"fread",
"(",
"$",
"this",
"->",
"_input",
",",
"$",
"this",
"->",
"_options",
"[",
"\"bufferSize\"",
"]",
")",
")",
"{",
"if",
"(",
"!",
"xml_parse",
"... | Main format method
@param void
@throws Exception
@return void | [
"Main",
"format",
"method"
] | b2f9da7a8c3ce50b26032ff2fd9cfe081dee9f73 | https://github.com/RockPhp/PhpWsdl/blob/b2f9da7a8c3ce50b26032ff2fd9cfe081dee9f73/src/Rock/PhpWsdl/class.phpwsdlformatter.php#L230-L244 |
187,120 | james481/MicroCMS | src/MicroCMS/DependencyInjection/Modules/MonologFactory.php | MonologFactory.getServiceClass | public function getServiceClass()
{
$this->checkFilePermissions();
$logger_name = 'MicroCMS_' . $this->env;
$logger = new Logger($logger_name);
$logger->pushHandler(
new StreamHandler($this->logFile, $this->getHandlerLevel())
);
return($logger);
} | php | public function getServiceClass()
{
$this->checkFilePermissions();
$logger_name = 'MicroCMS_' . $this->env;
$logger = new Logger($logger_name);
$logger->pushHandler(
new StreamHandler($this->logFile, $this->getHandlerLevel())
);
return($logger);
} | [
"public",
"function",
"getServiceClass",
"(",
")",
"{",
"$",
"this",
"->",
"checkFilePermissions",
"(",
")",
";",
"$",
"logger_name",
"=",
"'MicroCMS_'",
".",
"$",
"this",
"->",
"env",
";",
"$",
"logger",
"=",
"new",
"Logger",
"(",
"$",
"logger_name",
")... | getServiceClass
Build the Monolog logger for use in the container.
@return Monolog\Logger $logger | [
"getServiceClass",
"Build",
"the",
"Monolog",
"logger",
"for",
"use",
"in",
"the",
"container",
"."
] | d1b562c45ba52ab5b236467b285e659ae707e0de | https://github.com/james481/MicroCMS/blob/d1b562c45ba52ab5b236467b285e659ae707e0de/src/MicroCMS/DependencyInjection/Modules/MonologFactory.php#L62-L72 |
187,121 | GetOlympus/Zeus-Core | src/Zeus/Configuration/Controller/Configuration.php | Configuration.getFunctions | public function getFunctions($prepend, $available)
{
// Check filepath
if (empty($this->filepath)) {
return [];
}
// Get configurations
$configs = include $this->filepath;
// Check
if (empty($configs)) {
return [];
}
... | php | public function getFunctions($prepend, $available)
{
// Check filepath
if (empty($this->filepath)) {
return [];
}
// Get configurations
$configs = include $this->filepath;
// Check
if (empty($configs)) {
return [];
}
... | [
"public",
"function",
"getFunctions",
"(",
"$",
"prepend",
",",
"$",
"available",
")",
"{",
"// Check filepath",
"if",
"(",
"empty",
"(",
"$",
"this",
"->",
"filepath",
")",
")",
"{",
"return",
"[",
"]",
";",
"}",
"// Get configurations",
"$",
"configs",
... | Initialize filepath with configs.
@param string $prepend
@param array $available
@return array $functions | [
"Initialize",
"filepath",
"with",
"configs",
"."
] | 2bdee751e8fcf8ed082080ddcd198855631720ff | https://github.com/GetOlympus/Zeus-Core/blob/2bdee751e8fcf8ed082080ddcd198855631720ff/src/Zeus/Configuration/Controller/Configuration.php#L36-L63 |
187,122 | praxigento/mobi_mod_bonus_referral | Helper/Config.php | Config.getBonusEnabled | public function getBonusEnabled()
{
$result = $this->scopeConfig->getValue('praxigento_downline/referral_bonus/enabled', AScope::SCOPE_STORE);
$result = filter_var($result, FILTER_VALIDATE_BOOLEAN);
return $result;
} | php | public function getBonusEnabled()
{
$result = $this->scopeConfig->getValue('praxigento_downline/referral_bonus/enabled', AScope::SCOPE_STORE);
$result = filter_var($result, FILTER_VALIDATE_BOOLEAN);
return $result;
} | [
"public",
"function",
"getBonusEnabled",
"(",
")",
"{",
"$",
"result",
"=",
"$",
"this",
"->",
"scopeConfig",
"->",
"getValue",
"(",
"'praxigento_downline/referral_bonus/enabled'",
",",
"AScope",
"::",
"SCOPE_STORE",
")",
";",
"$",
"result",
"=",
"filter_var",
"... | Return 'true' if Referral Bonus is enabled.
@return bool | [
"Return",
"true",
"if",
"Referral",
"Bonus",
"is",
"enabled",
"."
] | 584559d2c096ad2a7631c747d8f0ef506af93a1a | https://github.com/praxigento/mobi_mod_bonus_referral/blob/584559d2c096ad2a7631c747d8f0ef506af93a1a/Helper/Config.php#L30-L35 |
187,123 | praxigento/mobi_mod_bonus_referral | Helper/Config.php | Config.getBonusFeeMax | public function getBonusFeeMax()
{
$result = $this->scopeConfig->getValue('praxigento_downline/referral_bonus/fee_max', AScope::SCOPE_STORE);
$result = filter_var($result, FILTER_VALIDATE_FLOAT);
if ($result < 0) $result = 0;
return $result;
} | php | public function getBonusFeeMax()
{
$result = $this->scopeConfig->getValue('praxigento_downline/referral_bonus/fee_max', AScope::SCOPE_STORE);
$result = filter_var($result, FILTER_VALIDATE_FLOAT);
if ($result < 0) $result = 0;
return $result;
} | [
"public",
"function",
"getBonusFeeMax",
"(",
")",
"{",
"$",
"result",
"=",
"$",
"this",
"->",
"scopeConfig",
"->",
"getValue",
"(",
"'praxigento_downline/referral_bonus/fee_max'",
",",
"AScope",
"::",
"SCOPE_STORE",
")",
";",
"$",
"result",
"=",
"filter_var",
"(... | Get maximal amount of the referral bonus fee.
@return float | [
"Get",
"maximal",
"amount",
"of",
"the",
"referral",
"bonus",
"fee",
"."
] | 584559d2c096ad2a7631c747d8f0ef506af93a1a | https://github.com/praxigento/mobi_mod_bonus_referral/blob/584559d2c096ad2a7631c747d8f0ef506af93a1a/Helper/Config.php#L55-L61 |
187,124 | praxigento/mobi_mod_bonus_referral | Helper/Config.php | Config.getBonusPayoutDelay | public function getBonusPayoutDelay()
{
$result = $this->scopeConfig->getValue('praxigento_downline/referral_bonus/delay_days', AScope::SCOPE_STORE);
if (is_null($result)) $result = 7; // default value for delay
$result = filter_var($result, FILTER_VALIDATE_INT);
if ($result < 0) $re... | php | public function getBonusPayoutDelay()
{
$result = $this->scopeConfig->getValue('praxigento_downline/referral_bonus/delay_days', AScope::SCOPE_STORE);
if (is_null($result)) $result = 7; // default value for delay
$result = filter_var($result, FILTER_VALIDATE_INT);
if ($result < 0) $re... | [
"public",
"function",
"getBonusPayoutDelay",
"(",
")",
"{",
"$",
"result",
"=",
"$",
"this",
"->",
"scopeConfig",
"->",
"getValue",
"(",
"'praxigento_downline/referral_bonus/delay_days'",
",",
"AScope",
"::",
"SCOPE_STORE",
")",
";",
"if",
"(",
"is_null",
"(",
"... | Days delay before payout will be made.
@return int | [
"Days",
"delay",
"before",
"payout",
"will",
"be",
"made",
"."
] | 584559d2c096ad2a7631c747d8f0ef506af93a1a | https://github.com/praxigento/mobi_mod_bonus_referral/blob/584559d2c096ad2a7631c747d8f0ef506af93a1a/Helper/Config.php#L95-L102 |
187,125 | mikemirten/ZExt | library/ZExt/Datagate/PhalconTable.php | PhalconTable.getPaginator | public function getPaginator(Criteria $criteria = null) {
if ($criteria === null) {
$criteria = $this->query();
}
return new Paginator(new AdapterCriteria($criteria));
} | php | public function getPaginator(Criteria $criteria = null) {
if ($criteria === null) {
$criteria = $this->query();
}
return new Paginator(new AdapterCriteria($criteria));
} | [
"public",
"function",
"getPaginator",
"(",
"Criteria",
"$",
"criteria",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"criteria",
"===",
"null",
")",
"{",
"$",
"criteria",
"=",
"$",
"this",
"->",
"query",
"(",
")",
";",
"}",
"return",
"new",
"Paginator",
"(... | Get the paginator
@param Criteria $criteria
@return Paginator | [
"Get",
"the",
"paginator"
] | 284956f5b85ba10571f64aaa651169e00f05ae56 | https://github.com/mikemirten/ZExt/blob/284956f5b85ba10571f64aaa651169e00f05ae56/library/ZExt/Datagate/PhalconTable.php#L358-L364 |
187,126 | mikemirten/ZExt | library/ZExt/Datagate/PhalconTable.php | PhalconTable.getPrimaryName | protected function getPrimaryName() {
if ($this->primary === null) {
$tableModel = $this->getTableModel();
$this->primary = $tableModel->getModelsMetaData()->getPrimaryKeyAttributes($tableModel);
if (empty($this->primary)) {
$this->primary = false;
}
if (count($this->primary) === 1) {
... | php | protected function getPrimaryName() {
if ($this->primary === null) {
$tableModel = $this->getTableModel();
$this->primary = $tableModel->getModelsMetaData()->getPrimaryKeyAttributes($tableModel);
if (empty($this->primary)) {
$this->primary = false;
}
if (count($this->primary) === 1) {
... | [
"protected",
"function",
"getPrimaryName",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"primary",
"===",
"null",
")",
"{",
"$",
"tableModel",
"=",
"$",
"this",
"->",
"getTableModel",
"(",
")",
";",
"$",
"this",
"->",
"primary",
"=",
"$",
"tableModel",... | Get the name of the primary identity
@return string | array | null | [
"Get",
"the",
"name",
"of",
"the",
"primary",
"identity"
] | 284956f5b85ba10571f64aaa651169e00f05ae56 | https://github.com/mikemirten/ZExt/blob/284956f5b85ba10571f64aaa651169e00f05ae56/library/ZExt/Datagate/PhalconTable.php#L391-L410 |
187,127 | mikemirten/ZExt | library/ZExt/Datagate/PhalconTable.php | PhalconTable.getTransactionsManager | public function getTransactionsManager() {
if ($this->_transactionsManager === null) {
if ($this->hasLocator()) {
$locator = $this->getLocator();
if ($locator->has(self::PHSRV_TRANSACTIONS)) {
$this->_transactionsManager = $locator->get(self::PHSRV_TRANSACTIONS);
}
}
if ($this->_transac... | php | public function getTransactionsManager() {
if ($this->_transactionsManager === null) {
if ($this->hasLocator()) {
$locator = $this->getLocator();
if ($locator->has(self::PHSRV_TRANSACTIONS)) {
$this->_transactionsManager = $locator->get(self::PHSRV_TRANSACTIONS);
}
}
if ($this->_transac... | [
"public",
"function",
"getTransactionsManager",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_transactionsManager",
"===",
"null",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"hasLocator",
"(",
")",
")",
"{",
"$",
"locator",
"=",
"$",
"this",
"->",
"getLo... | Get the transactions manager
@return TransactionsManager | [
"Get",
"the",
"transactions",
"manager"
] | 284956f5b85ba10571f64aaa651169e00f05ae56 | https://github.com/mikemirten/ZExt/blob/284956f5b85ba10571f64aaa651169e00f05ae56/library/ZExt/Datagate/PhalconTable.php#L453-L471 |
187,128 | mikemirten/ZExt | library/ZExt/Datagate/PhalconTable.php | PhalconTable.getTableModel | protected function getTableModel() {
if ($this->_model === null) {
$this->_model = $this->createTableModel();
}
return $this->_model;
} | php | protected function getTableModel() {
if ($this->_model === null) {
$this->_model = $this->createTableModel();
}
return $this->_model;
} | [
"protected",
"function",
"getTableModel",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_model",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"_model",
"=",
"$",
"this",
"->",
"createTableModel",
"(",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_mode... | Get the phalcon model instance
@return PhalconModel | [
"Get",
"the",
"phalcon",
"model",
"instance"
] | 284956f5b85ba10571f64aaa651169e00f05ae56 | https://github.com/mikemirten/ZExt/blob/284956f5b85ba10571f64aaa651169e00f05ae56/library/ZExt/Datagate/PhalconTable.php#L478-L484 |
187,129 | mikemirten/ZExt | library/ZExt/Datagate/PhalconTable.php | PhalconTable.createTableModel | protected function createTableModel(Model $model = null) {
$phalconModel = new PhalconModel($this->getTableModelDi());
$phalconModel->setDatagate($this);
if ($model !== null) {
$phalconModel->assign($model->getData());
}
return $phalconModel;
} | php | protected function createTableModel(Model $model = null) {
$phalconModel = new PhalconModel($this->getTableModelDi());
$phalconModel->setDatagate($this);
if ($model !== null) {
$phalconModel->assign($model->getData());
}
return $phalconModel;
} | [
"protected",
"function",
"createTableModel",
"(",
"Model",
"$",
"model",
"=",
"null",
")",
"{",
"$",
"phalconModel",
"=",
"new",
"PhalconModel",
"(",
"$",
"this",
"->",
"getTableModelDi",
"(",
")",
")",
";",
"$",
"phalconModel",
"->",
"setDatagate",
"(",
"... | Create the phalcon model instance
@param Model $model
@return PhalconModel | [
"Create",
"the",
"phalcon",
"model",
"instance"
] | 284956f5b85ba10571f64aaa651169e00f05ae56 | https://github.com/mikemirten/ZExt/blob/284956f5b85ba10571f64aaa651169e00f05ae56/library/ZExt/Datagate/PhalconTable.php#L492-L501 |
187,130 | mikemirten/ZExt | library/ZExt/Datagate/PhalconTable.php | PhalconTable.getTableModelDi | public function getTableModelDi() {
if ($this->_modelDi !== null) {
return $this->_modelDi;
}
if (self::$_allowSharedModelDi && self::$_sharedModelsDi !== null) {
return self::$_sharedModelsDi;
}
// If has a locator, try to using it
if ($this->hasLocator()) {
$locator = $this->getLocator();
... | php | public function getTableModelDi() {
if ($this->_modelDi !== null) {
return $this->_modelDi;
}
if (self::$_allowSharedModelDi && self::$_sharedModelsDi !== null) {
return self::$_sharedModelsDi;
}
// If has a locator, try to using it
if ($this->hasLocator()) {
$locator = $this->getLocator();
... | [
"public",
"function",
"getTableModelDi",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_modelDi",
"!==",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"_modelDi",
";",
"}",
"if",
"(",
"self",
"::",
"$",
"_allowSharedModelDi",
"&&",
"self",
"::",
"$",
... | Get the dependency injector for the phalcon table model
If has not been supplied, trying to create the our own
@return DiInterface | [
"Get",
"the",
"dependency",
"injector",
"for",
"the",
"phalcon",
"table",
"model",
"If",
"has",
"not",
"been",
"supplied",
"trying",
"to",
"create",
"the",
"our",
"own"
] | 284956f5b85ba10571f64aaa651169e00f05ae56 | https://github.com/mikemirten/ZExt/blob/284956f5b85ba10571f64aaa651169e00f05ae56/library/ZExt/Datagate/PhalconTable.php#L518-L595 |
187,131 | bkstg/core-bundle | EventSubscriber/MainMenuSubscriber.php | MainMenuSubscriber.addAdminMenuItem | public function addAdminMenuItem(MenuCollectionEvent $event): void
{
if (!$this->auth->isGranted('ROLE_ADMIN')) {
return;
}
$menu = $event->getMenu();
// Create admin menu item.
$admin = $this->factory->createItem('menu_item.admin', [
'route' => 'bks... | php | public function addAdminMenuItem(MenuCollectionEvent $event): void
{
if (!$this->auth->isGranted('ROLE_ADMIN')) {
return;
}
$menu = $event->getMenu();
// Create admin menu item.
$admin = $this->factory->createItem('menu_item.admin', [
'route' => 'bks... | [
"public",
"function",
"addAdminMenuItem",
"(",
"MenuCollectionEvent",
"$",
"event",
")",
":",
"void",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"auth",
"->",
"isGranted",
"(",
"'ROLE_ADMIN'",
")",
")",
"{",
"return",
";",
"}",
"$",
"menu",
"=",
"$",
"eve... | Add the admin menu item.
@param MenuCollectionEvent $event The menu collection event.
@return void | [
"Add",
"the",
"admin",
"menu",
"item",
"."
] | 5868101b8596c0e67783b620a4c0ffcbfb8dba28 | https://github.com/bkstg/core-bundle/blob/5868101b8596c0e67783b620a4c0ffcbfb8dba28/EventSubscriber/MainMenuSubscriber.php#L74-L91 |
187,132 | corex/filesystem | src/Path.php | Path.root | public static function root($segments = null): string
{
$path = __DIR__;
for ($c1 = 0; $c1 < 4; $c1++) {
$path = dirname($path);
}
$path = str_replace('\\', '/', $path);
$path = self::addSegmentsToPath($path, $segments);
return $path;
} | php | public static function root($segments = null): string
{
$path = __DIR__;
for ($c1 = 0; $c1 < 4; $c1++) {
$path = dirname($path);
}
$path = str_replace('\\', '/', $path);
$path = self::addSegmentsToPath($path, $segments);
return $path;
} | [
"public",
"static",
"function",
"root",
"(",
"$",
"segments",
"=",
"null",
")",
":",
"string",
"{",
"$",
"path",
"=",
"__DIR__",
";",
"for",
"(",
"$",
"c1",
"=",
"0",
";",
"$",
"c1",
"<",
"4",
";",
"$",
"c1",
"++",
")",
"{",
"$",
"path",
"=",... | Get path to root of site.
@param string|string[] $segments Dot notation is supported in string. Default null.
@return string | [
"Get",
"path",
"to",
"root",
"of",
"site",
"."
] | 813fd9d77fb8bc56b97533f1c6ff0b4c2bb89143 | https://github.com/corex/filesystem/blob/813fd9d77fb8bc56b97533f1c6ff0b4c2bb89143/src/Path.php#L17-L26 |
187,133 | SCLInternet/SclWhois | src/SclWhois/DomainLookup.php | DomainLookup.addServer | public function addServer($tld, $server)
{
$this->server[(string) $tld] = (string)$server;
return $this;
} | php | public function addServer($tld, $server)
{
$this->server[(string) $tld] = (string)$server;
return $this;
} | [
"public",
"function",
"addServer",
"(",
"$",
"tld",
",",
"$",
"server",
")",
"{",
"$",
"this",
"->",
"server",
"[",
"(",
"string",
")",
"$",
"tld",
"]",
"=",
"(",
"string",
")",
"$",
"server",
";",
"return",
"$",
"this",
";",
"}"
] | Can be used to add a server for a given TLD.
@param string $tld
@param string $server
@return Whois | [
"Can",
"be",
"used",
"to",
"add",
"a",
"server",
"for",
"a",
"given",
"TLD",
"."
] | dd22ff13f96b68ab6f80ec18a6500120f0f3af8b | https://github.com/SCLInternet/SclWhois/blob/dd22ff13f96b68ab6f80ec18a6500120f0f3af8b/src/SclWhois/DomainLookup.php#L54-L58 |
187,134 | SCLInternet/SclWhois | src/SclWhois/DomainLookup.php | DomainLookup.getWhoisServer | public function getWhoisServer($domain)
{
$domain = strtolower($domain);
$tld = $this->getTld($domain);
if (!isset($this->server[$tld])) {
throw new UnknownTldException("$tld is not in the list of servers.");
}
return $this->server[$tld];
} | php | public function getWhoisServer($domain)
{
$domain = strtolower($domain);
$tld = $this->getTld($domain);
if (!isset($this->server[$tld])) {
throw new UnknownTldException("$tld is not in the list of servers.");
}
return $this->server[$tld];
} | [
"public",
"function",
"getWhoisServer",
"(",
"$",
"domain",
")",
"{",
"$",
"domain",
"=",
"strtolower",
"(",
"$",
"domain",
")",
";",
"$",
"tld",
"=",
"$",
"this",
"->",
"getTld",
"(",
"$",
"domain",
")",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"... | Returns the whois server for the given domain name.
@param string $domain
@return string
@throws UnknownTldException | [
"Returns",
"the",
"whois",
"server",
"for",
"the",
"given",
"domain",
"name",
"."
] | dd22ff13f96b68ab6f80ec18a6500120f0f3af8b | https://github.com/SCLInternet/SclWhois/blob/dd22ff13f96b68ab6f80ec18a6500120f0f3af8b/src/SclWhois/DomainLookup.php#L82-L93 |
187,135 | SCLInternet/SclWhois | src/SclWhois/DomainLookup.php | DomainLookup.lookup | public function lookup($domain)
{
$result = $this->queryServer($domain);
while (preg_match_all('/.*Whois Server: (.*)/', $result, $matches)) {
$server = array_pop($matches[1]);
if ($server) {
$result = $this->queryServer($domain, $server);
}
... | php | public function lookup($domain)
{
$result = $this->queryServer($domain);
while (preg_match_all('/.*Whois Server: (.*)/', $result, $matches)) {
$server = array_pop($matches[1]);
if ($server) {
$result = $this->queryServer($domain, $server);
}
... | [
"public",
"function",
"lookup",
"(",
"$",
"domain",
")",
"{",
"$",
"result",
"=",
"$",
"this",
"->",
"queryServer",
"(",
"$",
"domain",
")",
";",
"while",
"(",
"preg_match_all",
"(",
"'/.*Whois Server: (.*)/'",
",",
"$",
"result",
",",
"$",
"matches",
")... | Recursively lookups up a domain name.
@param string $domain
@return string
@throws UnknownTldException | [
"Recursively",
"lookups",
"up",
"a",
"domain",
"name",
"."
] | dd22ff13f96b68ab6f80ec18a6500120f0f3af8b | https://github.com/SCLInternet/SclWhois/blob/dd22ff13f96b68ab6f80ec18a6500120f0f3af8b/src/SclWhois/DomainLookup.php#L104-L117 |
187,136 | SCLInternet/SclWhois | src/SclWhois/DomainLookup.php | DomainLookup.queryServer | public function queryServer($domain, $server = false)
{
$domain = strtolower($domain);
if (!$server) {
$server = $this->getWhoisServer($domain);
}
if (!$this->socket->connect($server, self::WHOIS_PORT)) {
return false;
}
// @todo This should... | php | public function queryServer($domain, $server = false)
{
$domain = strtolower($domain);
if (!$server) {
$server = $this->getWhoisServer($domain);
}
if (!$this->socket->connect($server, self::WHOIS_PORT)) {
return false;
}
// @todo This should... | [
"public",
"function",
"queryServer",
"(",
"$",
"domain",
",",
"$",
"server",
"=",
"false",
")",
"{",
"$",
"domain",
"=",
"strtolower",
"(",
"$",
"domain",
")",
";",
"if",
"(",
"!",
"$",
"server",
")",
"{",
"$",
"server",
"=",
"$",
"this",
"->",
"... | Performs a single lookup to a given whois server.
@param string $domain
@param string|false $server | [
"Performs",
"a",
"single",
"lookup",
"to",
"a",
"given",
"whois",
"server",
"."
] | dd22ff13f96b68ab6f80ec18a6500120f0f3af8b | https://github.com/SCLInternet/SclWhois/blob/dd22ff13f96b68ab6f80ec18a6500120f0f3af8b/src/SclWhois/DomainLookup.php#L125-L153 |
187,137 | AmericanCouncils/Transcoding | Adapter/AbstractCliAdapter.php | AbstractCliAdapter.getProcessBuilder | protected function getProcessBuilder(array $builderArguments = null)
{
$builder = new ProcessBuilder($builderArguments);
//check for options
if (isset($this->config['options'])) {
foreach ($this->config['options'] as $key => $val) {
$builder->setOption($key, $val);... | php | protected function getProcessBuilder(array $builderArguments = null)
{
$builder = new ProcessBuilder($builderArguments);
//check for options
if (isset($this->config['options'])) {
foreach ($this->config['options'] as $key => $val) {
$builder->setOption($key, $val);... | [
"protected",
"function",
"getProcessBuilder",
"(",
"array",
"$",
"builderArguments",
"=",
"null",
")",
"{",
"$",
"builder",
"=",
"new",
"ProcessBuilder",
"(",
"$",
"builderArguments",
")",
";",
"//check for options",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",... | Return a new instance of a pre-configured process builder.
@param array $builderArguments - array of arguments to pass to ProcessBuilder when it's instantiated
@return ProcessBuilder | [
"Return",
"a",
"new",
"instance",
"of",
"a",
"pre",
"-",
"configured",
"process",
"builder",
"."
] | 8008fc06d0737b4cb7cad238b835911f588ed220 | https://github.com/AmericanCouncils/Transcoding/blob/8008fc06d0737b4cb7cad238b835911f588ed220/Adapter/AbstractCliAdapter.php#L58-L72 |
187,138 | AmericanCouncils/Transcoding | Adapter/AbstractCliAdapter.php | AbstractCliAdapter.transcodeFile | public function transcodeFile(File $inFile, Preset $preset, $outFilePath)
{
//get assembled process instance from extending class
$builder = $this->buildProcess($inFile, $preset, $outFilePath);
//check the return
if (!$builder instanceof ProcessBuilder) {
throw new \Inva... | php | public function transcodeFile(File $inFile, Preset $preset, $outFilePath)
{
//get assembled process instance from extending class
$builder = $this->buildProcess($inFile, $preset, $outFilePath);
//check the return
if (!$builder instanceof ProcessBuilder) {
throw new \Inva... | [
"public",
"function",
"transcodeFile",
"(",
"File",
"$",
"inFile",
",",
"Preset",
"$",
"preset",
",",
"$",
"outFilePath",
")",
"{",
"//get assembled process instance from extending class",
"$",
"builder",
"=",
"$",
"this",
"->",
"buildProcess",
"(",
"$",
"inFile",... | Runs a transcode process by wrapping a command-line process.
{@inheritdoc} | [
"Runs",
"a",
"transcode",
"process",
"by",
"wrapping",
"a",
"command",
"-",
"line",
"process",
"."
] | 8008fc06d0737b4cb7cad238b835911f588ed220 | https://github.com/AmericanCouncils/Transcoding/blob/8008fc06d0737b4cb7cad238b835911f588ed220/Adapter/AbstractCliAdapter.php#L93-L127 |
187,139 | sndsgd/util | src/Func.php | Func.exists | public static function exists(string $func): bool
{
if (strpos($func, "::") !== false) {
list($class, $method) = explode("::", $func);
return method_exists($class, $method);
}
return function_exists($func);
} | php | public static function exists(string $func): bool
{
if (strpos($func, "::") !== false) {
list($class, $method) = explode("::", $func);
return method_exists($class, $method);
}
return function_exists($func);
} | [
"public",
"static",
"function",
"exists",
"(",
"string",
"$",
"func",
")",
":",
"bool",
"{",
"if",
"(",
"strpos",
"(",
"$",
"func",
",",
"\"::\"",
")",
"!==",
"false",
")",
"{",
"list",
"(",
"$",
"class",
",",
"$",
"method",
")",
"=",
"explode",
... | Verify a callable provided as a string
@param string $func The callable to verify
@return bool | [
"Verify",
"a",
"callable",
"provided",
"as",
"a",
"string"
] | 17156301515d0747d34ccb802729f8a2cdf0e4ea | https://github.com/sndsgd/util/blob/17156301515d0747d34ccb802729f8a2cdf0e4ea/src/Func.php#L16-L23 |
187,140 | sndsgd/util | src/Func.php | Func.getReflection | public static function getReflection(callable $func): \ReflectionFunctionAbstract
{
if (is_string($func) && strpos($func, "::") !== false) {
list($classname, $method) = explode("::", $func, 2);
$rc = new \ReflectionClass($classname);
return $rc->getMethod($method);
... | php | public static function getReflection(callable $func): \ReflectionFunctionAbstract
{
if (is_string($func) && strpos($func, "::") !== false) {
list($classname, $method) = explode("::", $func, 2);
$rc = new \ReflectionClass($classname);
return $rc->getMethod($method);
... | [
"public",
"static",
"function",
"getReflection",
"(",
"callable",
"$",
"func",
")",
":",
"\\",
"ReflectionFunctionAbstract",
"{",
"if",
"(",
"is_string",
"(",
"$",
"func",
")",
"&&",
"strpos",
"(",
"$",
"func",
",",
"\"::\"",
")",
"!==",
"false",
")",
"{... | Get a reflection object for a function or static method
@param callable $func The function to reflect
@return \ReflectionFunctionAbstract
@throws \ReflectionException If `$func` does not exist | [
"Get",
"a",
"reflection",
"object",
"for",
"a",
"function",
"or",
"static",
"method"
] | 17156301515d0747d34ccb802729f8a2cdf0e4ea | https://github.com/sndsgd/util/blob/17156301515d0747d34ccb802729f8a2cdf0e4ea/src/Func.php#L32-L40 |
187,141 | faraweilyas/whitegold-framework | src/Database/Database.php | Database.openConnection | final public function openConnection ()
{
$this->connection = mysqli_connect(
getConstant('DB_HOST', TRUE),
getConstant('DB_USERNAME', TRUE),
getConstant('DB_PASSWORD', TRUE),
getConstant('DB_NAME', TRUE)
);
$errorMessage = "Database connection failed: ".mysqli_connect_error();
$errorMessage .= "... | php | final public function openConnection ()
{
$this->connection = mysqli_connect(
getConstant('DB_HOST', TRUE),
getConstant('DB_USERNAME', TRUE),
getConstant('DB_PASSWORD', TRUE),
getConstant('DB_NAME', TRUE)
);
$errorMessage = "Database connection failed: ".mysqli_connect_error();
$errorMessage .= "... | [
"final",
"public",
"function",
"openConnection",
"(",
")",
"{",
"$",
"this",
"->",
"connection",
"=",
"mysqli_connect",
"(",
"getConstant",
"(",
"'DB_HOST'",
",",
"TRUE",
")",
",",
"getConstant",
"(",
"'DB_USERNAME'",
",",
"TRUE",
")",
",",
"getConstant",
"(... | Opens Database connection. | [
"Opens",
"Database",
"connection",
"."
] | f0e5fecea1a30abad595fdfc4c3821abc2831594 | https://github.com/faraweilyas/whitegold-framework/blob/f0e5fecea1a30abad595fdfc4c3821abc2831594/src/Database/Database.php#L38-L49 |
187,142 | faraweilyas/whitegold-framework | src/Database/Database.php | Database.query | final public function query (string $sql)
{
static::$lastQuery = $sql;
$result = mysqli_query($this->connection, $sql);
$this->confirmQuery($result);
return $result;
} | php | final public function query (string $sql)
{
static::$lastQuery = $sql;
$result = mysqli_query($this->connection, $sql);
$this->confirmQuery($result);
return $result;
} | [
"final",
"public",
"function",
"query",
"(",
"string",
"$",
"sql",
")",
"{",
"static",
"::",
"$",
"lastQuery",
"=",
"$",
"sql",
";",
"$",
"result",
"=",
"mysqli_query",
"(",
"$",
"this",
"->",
"connection",
",",
"$",
"sql",
")",
";",
"$",
"this",
"... | Querys the database with provided sql.
@param string $sql
@return mixed | [
"Querys",
"the",
"database",
"with",
"provided",
"sql",
"."
] | f0e5fecea1a30abad595fdfc4c3821abc2831594 | https://github.com/faraweilyas/whitegold-framework/blob/f0e5fecea1a30abad595fdfc4c3821abc2831594/src/Database/Database.php#L86-L92 |
187,143 | faraweilyas/whitegold-framework | src/Database/Database.php | Database.escapeValues | final public function escapeValues (array $values) : array
{
$sanitizedValues = [];
foreach ($values as $key => $value):
$key = $this->escapeValue($key);
$sanitizedValues[$key] = (is_array($value)) ? $this->escapeValues($value) : $this->escapeValue($value);
endforeach;
return $sanitizedValues;
} | php | final public function escapeValues (array $values) : array
{
$sanitizedValues = [];
foreach ($values as $key => $value):
$key = $this->escapeValue($key);
$sanitizedValues[$key] = (is_array($value)) ? $this->escapeValues($value) : $this->escapeValue($value);
endforeach;
return $sanitizedValues;
} | [
"final",
"public",
"function",
"escapeValues",
"(",
"array",
"$",
"values",
")",
":",
"array",
"{",
"$",
"sanitizedValues",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"values",
"as",
"$",
"key",
"=>",
"$",
"value",
")",
":",
"$",
"key",
"=",
"$",
"th... | Escapes values for database query
@param array $values
@return array | [
"Escapes",
"values",
"for",
"database",
"query"
] | f0e5fecea1a30abad595fdfc4c3821abc2831594 | https://github.com/faraweilyas/whitegold-framework/blob/f0e5fecea1a30abad595fdfc4c3821abc2831594/src/Database/Database.php#L109-L117 |
187,144 | faraweilyas/whitegold-framework | src/Database/Database.php | Database.confirmQuery | private function confirmQuery ($result)
{
if ($result) return;
$outputMessage = "";
if (DEPLOYMENT_STATE == "local"):
$outputMessage = "Database query failed: ".mysqli_error($this->connection)."<br /><br />";
$outputMessage .= "Last SQL query: ".static::lastQuery();
else:
$outputMessage... | php | private function confirmQuery ($result)
{
if ($result) return;
$outputMessage = "";
if (DEPLOYMENT_STATE == "local"):
$outputMessage = "Database query failed: ".mysqli_error($this->connection)."<br /><br />";
$outputMessage .= "Last SQL query: ".static::lastQuery();
else:
$outputMessage... | [
"private",
"function",
"confirmQuery",
"(",
"$",
"result",
")",
"{",
"if",
"(",
"$",
"result",
")",
"return",
";",
"$",
"outputMessage",
"=",
"\"\"",
";",
"if",
"(",
"DEPLOYMENT_STATE",
"==",
"\"local\"",
")",
":",
"$",
"outputMessage",
"=",
"\"Database qu... | Confirms result from database query
@param mixed | [
"Confirms",
"result",
"from",
"database",
"query"
] | f0e5fecea1a30abad595fdfc4c3821abc2831594 | https://github.com/faraweilyas/whitegold-framework/blob/f0e5fecea1a30abad595fdfc4c3821abc2831594/src/Database/Database.php#L170-L183 |
187,145 | samanix/laranix | src/Laranix/Support/Settings.php | Settings.assignPropertyValues | protected function assignPropertyValues(array $values)
{
foreach ($values as $property => $value) {
if (property_exists($this, $property)) {
$this->{$property} = $value;
}
}
} | php | protected function assignPropertyValues(array $values)
{
foreach ($values as $property => $value) {
if (property_exists($this, $property)) {
$this->{$property} = $value;
}
}
} | [
"protected",
"function",
"assignPropertyValues",
"(",
"array",
"$",
"values",
")",
"{",
"foreach",
"(",
"$",
"values",
"as",
"$",
"property",
"=>",
"$",
"value",
")",
"{",
"if",
"(",
"property_exists",
"(",
"$",
"this",
",",
"$",
"property",
")",
")",
... | Assign values to properties
@param array $values | [
"Assign",
"values",
"to",
"properties"
] | 6dfc0b341657e0429f2629e91a469bc6203af3a1 | https://github.com/samanix/laranix/blob/6dfc0b341657e0429f2629e91a469bc6203af3a1/src/Laranix/Support/Settings.php#L62-L69 |
187,146 | samanix/laranix | src/Laranix/Support/Settings.php | Settings.hasRequiredSettings | public function hasRequiredSettings(bool $refresh = false): bool
{
$required = $this->getParsedRequiredProperties($refresh);
if (!$this->allRequired && (empty($required) || $required === null)) {
return true;
}
return $this->validateProperties($required);
} | php | public function hasRequiredSettings(bool $refresh = false): bool
{
$required = $this->getParsedRequiredProperties($refresh);
if (!$this->allRequired && (empty($required) || $required === null)) {
return true;
}
return $this->validateProperties($required);
} | [
"public",
"function",
"hasRequiredSettings",
"(",
"bool",
"$",
"refresh",
"=",
"false",
")",
":",
"bool",
"{",
"$",
"required",
"=",
"$",
"this",
"->",
"getParsedRequiredProperties",
"(",
"$",
"refresh",
")",
";",
"if",
"(",
"!",
"$",
"this",
"->",
"allR... | Check the settings have all required settings with valid types
@param bool $refresh
@return bool
@throws \Laranix\Support\Exception\InvalidTypeException | [
"Check",
"the",
"settings",
"have",
"all",
"required",
"settings",
"with",
"valid",
"types"
] | 6dfc0b341657e0429f2629e91a469bc6203af3a1 | https://github.com/samanix/laranix/blob/6dfc0b341657e0429f2629e91a469bc6203af3a1/src/Laranix/Support/Settings.php#L78-L87 |
187,147 | samanix/laranix | src/Laranix/Support/Settings.php | Settings.parseRequiredProperties | protected function parseRequiredProperties(bool $refresh = false)
{
if ($this->requiredParsed !== null && !$refresh) {
return $this->requiredParsed;
}
foreach ($this->required as $index => $item) {
$property = is_int($index) ? $item : $index;
$type = 'any... | php | protected function parseRequiredProperties(bool $refresh = false)
{
if ($this->requiredParsed !== null && !$refresh) {
return $this->requiredParsed;
}
foreach ($this->required as $index => $item) {
$property = is_int($index) ? $item : $index;
$type = 'any... | [
"protected",
"function",
"parseRequiredProperties",
"(",
"bool",
"$",
"refresh",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"requiredParsed",
"!==",
"null",
"&&",
"!",
"$",
"refresh",
")",
"{",
"return",
"$",
"this",
"->",
"requiredParsed",
";",... | Parse required properties + types
@param bool $refresh
@return array | [
"Parse",
"required",
"properties",
"+",
"types"
] | 6dfc0b341657e0429f2629e91a469bc6203af3a1 | https://github.com/samanix/laranix/blob/6dfc0b341657e0429f2629e91a469bc6203af3a1/src/Laranix/Support/Settings.php#L95-L119 |
187,148 | samanix/laranix | src/Laranix/Support/Settings.php | Settings.setRequiredProperties | public function setRequiredProperties(array $required)
{
if (empty($required)) {
return $this;
}
if (isset($required[0]) && $required[0] === '*') {
$this->required = get_object_vars($this);
$this->allRequired = true;
} else {
$this->re... | php | public function setRequiredProperties(array $required)
{
if (empty($required)) {
return $this;
}
if (isset($required[0]) && $required[0] === '*') {
$this->required = get_object_vars($this);
$this->allRequired = true;
} else {
$this->re... | [
"public",
"function",
"setRequiredProperties",
"(",
"array",
"$",
"required",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"required",
")",
")",
"{",
"return",
"$",
"this",
";",
"}",
"if",
"(",
"isset",
"(",
"$",
"required",
"[",
"0",
"]",
")",
"&&",
"$... | Set required properties
@param array $required
@return $this | [
"Set",
"required",
"properties"
] | 6dfc0b341657e0429f2629e91a469bc6203af3a1 | https://github.com/samanix/laranix/blob/6dfc0b341657e0429f2629e91a469bc6203af3a1/src/Laranix/Support/Settings.php#L148-L168 |
187,149 | samanix/laranix | src/Laranix/Support/Settings.php | Settings.setRequiredTypes | public function setRequiredTypes(array $types)
{
$this->required = array_merge($this->required, $types);
$this->requiredTypes = $types;
return $this;
} | php | public function setRequiredTypes(array $types)
{
$this->required = array_merge($this->required, $types);
$this->requiredTypes = $types;
return $this;
} | [
"public",
"function",
"setRequiredTypes",
"(",
"array",
"$",
"types",
")",
"{",
"$",
"this",
"->",
"required",
"=",
"array_merge",
"(",
"$",
"this",
"->",
"required",
",",
"$",
"types",
")",
";",
"$",
"this",
"->",
"requiredTypes",
"=",
"$",
"types",
"... | Set required types
@param array $types
@return $this | [
"Set",
"required",
"types"
] | 6dfc0b341657e0429f2629e91a469bc6203af3a1 | https://github.com/samanix/laranix/blob/6dfc0b341657e0429f2629e91a469bc6203af3a1/src/Laranix/Support/Settings.php#L210-L216 |
187,150 | samanix/laranix | src/Laranix/Support/Settings.php | Settings.setRequiredPropertyTypes | public function setRequiredPropertyTypes(string $property, $types)
{
$this->required[$property] = $types;
$this->requiredTypes[$property] = $types;
return $this;
} | php | public function setRequiredPropertyTypes(string $property, $types)
{
$this->required[$property] = $types;
$this->requiredTypes[$property] = $types;
return $this;
} | [
"public",
"function",
"setRequiredPropertyTypes",
"(",
"string",
"$",
"property",
",",
"$",
"types",
")",
"{",
"$",
"this",
"->",
"required",
"[",
"$",
"property",
"]",
"=",
"$",
"types",
";",
"$",
"this",
"->",
"requiredTypes",
"[",
"$",
"property",
"]"... | Set required types for property
@param string $property
@param $types
@return $this | [
"Set",
"required",
"types",
"for",
"property"
] | 6dfc0b341657e0429f2629e91a469bc6203af3a1 | https://github.com/samanix/laranix/blob/6dfc0b341657e0429f2629e91a469bc6203af3a1/src/Laranix/Support/Settings.php#L225-L231 |
187,151 | cyberspectrum/contao-toolbox | src/CyberSpectrum/Translation/Contao/ContaoFile.php | ContaoFile.getHead | protected function getHead()
{
$data = $this->head;
if (preg_match('#last-updated: (.*)#', $data, $match)) {
$data = str_replace($match[1], date('c', $this->lastchange), $data);
}
if ($this->transifexProject
&& preg_match_all(
'#https://www.t... | php | protected function getHead()
{
$data = $this->head;
if (preg_match('#last-updated: (.*)#', $data, $match)) {
$data = str_replace($match[1], date('c', $this->lastchange), $data);
}
if ($this->transifexProject
&& preg_match_all(
'#https://www.t... | [
"protected",
"function",
"getHead",
"(",
")",
"{",
"$",
"data",
"=",
"$",
"this",
"->",
"head",
";",
"if",
"(",
"preg_match",
"(",
"'#last-updated: (.*)#'",
",",
"$",
"data",
",",
"$",
"match",
")",
")",
"{",
"$",
"data",
"=",
"str_replace",
"(",
"$"... | Retrieve the file heading.
@return mixed | [
"Retrieve",
"the",
"file",
"heading",
"."
] | cc5a62958e2b757c527ab5d5b543ff71a90c5a18 | https://github.com/cyberspectrum/contao-toolbox/blob/cc5a62958e2b757c527ab5d5b543ff71a90c5a18/src/CyberSpectrum/Translation/Contao/ContaoFile.php#L161-L190 |
187,152 | cyberspectrum/contao-toolbox | src/CyberSpectrum/Translation/Contao/ContaoFile.php | ContaoFile.getValue | public function getValue($key)
{
return isset($this->langstrings[$key]) ? $this->langstrings[$key] : null;
} | php | public function getValue($key)
{
return isset($this->langstrings[$key]) ? $this->langstrings[$key] : null;
} | [
"public",
"function",
"getValue",
"(",
"$",
"key",
")",
"{",
"return",
"isset",
"(",
"$",
"this",
"->",
"langstrings",
"[",
"$",
"key",
"]",
")",
"?",
"$",
"this",
"->",
"langstrings",
"[",
"$",
"key",
"]",
":",
"null",
";",
"}"
] | Retrieve a language value.
@param string $key The language key.
@return null|string | [
"Retrieve",
"a",
"language",
"value",
"."
] | cc5a62958e2b757c527ab5d5b543ff71a90c5a18 | https://github.com/cyberspectrum/contao-toolbox/blob/cc5a62958e2b757c527ab5d5b543ff71a90c5a18/src/CyberSpectrum/Translation/Contao/ContaoFile.php#L225-L228 |
187,153 | cyberspectrum/contao-toolbox | src/CyberSpectrum/Translation/Contao/ContaoFile.php | ContaoFile.load | protected function load()
{
$data = file_get_contents($this->filename);
// Ok, here comes the dirty work.
// We take everything at the beginning of the file until the closing of the first doc comment.
preg_match('#^(.+\*/)#sU', $data, $matches);
if ($matches && count($matche... | php | protected function load()
{
$data = file_get_contents($this->filename);
// Ok, here comes the dirty work.
// We take everything at the beginning of the file until the closing of the first doc comment.
preg_match('#^(.+\*/)#sU', $data, $matches);
if ($matches && count($matche... | [
"protected",
"function",
"load",
"(",
")",
"{",
"$",
"data",
"=",
"file_get_contents",
"(",
"$",
"this",
"->",
"filename",
")",
";",
"// Ok, here comes the dirty work.",
"// We take everything at the beginning of the file until the closing of the first doc comment.",
"preg_matc... | Parse a language file into language strings.
@return void | [
"Parse",
"a",
"language",
"file",
"into",
"language",
"strings",
"."
] | cc5a62958e2b757c527ab5d5b543ff71a90c5a18 | https://github.com/cyberspectrum/contao-toolbox/blob/cc5a62958e2b757c527ab5d5b543ff71a90c5a18/src/CyberSpectrum/Translation/Contao/ContaoFile.php#L255-L281 |
187,154 | cyberspectrum/contao-toolbox | src/CyberSpectrum/Translation/Contao/ContaoFile.php | ContaoFile.save | public function save()
{
$keys = array_keys($this->langstrings);
sort($keys);
$maxlen = 0;
$langPrefixes = array();
foreach ($keys as $key) {
$tokens = explode('.', $key);
if (preg_match('/tl_layout\.[a-z]+\.css\./', $key)) {
$to... | php | public function save()
{
$keys = array_keys($this->langstrings);
sort($keys);
$maxlen = 0;
$langPrefixes = array();
foreach ($keys as $key) {
$tokens = explode('.', $key);
if (preg_match('/tl_layout\.[a-z]+\.css\./', $key)) {
$to... | [
"public",
"function",
"save",
"(",
")",
"{",
"$",
"keys",
"=",
"array_keys",
"(",
"$",
"this",
"->",
"langstrings",
")",
";",
"sort",
"(",
"$",
"keys",
")",
";",
"$",
"maxlen",
"=",
"0",
";",
"$",
"langPrefixes",
"=",
"array",
"(",
")",
";",
"for... | Save the file to disk.
@return void | [
"Save",
"the",
"file",
"to",
"disk",
"."
] | cc5a62958e2b757c527ab5d5b543ff71a90c5a18 | https://github.com/cyberspectrum/contao-toolbox/blob/cc5a62958e2b757c527ab5d5b543ff71a90c5a18/src/CyberSpectrum/Translation/Contao/ContaoFile.php#L288-L326 |
187,155 | xmlsquad/xml-authoring-library | src/Command/AbstractGSheetProcessingCommand.php | AbstractGSheetProcessingCommand.findFullCredentialsPath | protected function findFullCredentialsPath($credentialsPathOption){
if (!$this->isFullCredentialsPathFindable($this->fileOptionToFullPath($credentialsPathOption))){
return NULL;
}
return $this->fileOptionToFullPath($credentialsPathOption);
} | php | protected function findFullCredentialsPath($credentialsPathOption){
if (!$this->isFullCredentialsPathFindable($this->fileOptionToFullPath($credentialsPathOption))){
return NULL;
}
return $this->fileOptionToFullPath($credentialsPathOption);
} | [
"protected",
"function",
"findFullCredentialsPath",
"(",
"$",
"credentialsPathOption",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isFullCredentialsPathFindable",
"(",
"$",
"this",
"->",
"fileOptionToFullPath",
"(",
"$",
"credentialsPathOption",
")",
")",
")",
"... | Finds the full path to the credentials file.
@param $credentialsPathOption
@return string|null string if found, null if not found. | [
"Finds",
"the",
"full",
"path",
"to",
"the",
"credentials",
"file",
"."
] | 803ca7e3387159bed87cb13d5782305eff3343e4 | https://github.com/xmlsquad/xml-authoring-library/blob/803ca7e3387159bed87cb13d5782305eff3343e4/src/Command/AbstractGSheetProcessingCommand.php#L174-L180 |
187,156 | mkremer/emphloyer | library/Emphloyer/Workshop.php | Workshop.stopNow | public function stopNow()
{
$this->run = false;
$this->boss->stopEmployees();
$this->boss->updateProgress();
} | php | public function stopNow()
{
$this->run = false;
$this->boss->stopEmployees();
$this->boss->updateProgress();
} | [
"public",
"function",
"stopNow",
"(",
")",
"{",
"$",
"this",
"->",
"run",
"=",
"false",
";",
"$",
"this",
"->",
"boss",
"->",
"stopEmployees",
"(",
")",
";",
"$",
"this",
"->",
"boss",
"->",
"updateProgress",
"(",
")",
";",
"}"
] | Stop the process immediately, this kills jobs mid-process. | [
"Stop",
"the",
"process",
"immediately",
"this",
"kills",
"jobs",
"mid",
"-",
"process",
"."
] | db7f35bd6f8e49d10f7001ddfe5285cdcd00761b | https://github.com/mkremer/emphloyer/blob/db7f35bd6f8e49d10f7001ddfe5285cdcd00761b/library/Emphloyer/Workshop.php#L58-L63 |
187,157 | devp-eu/tmcms-core | src/Admin/Updater.php | Updater.updateSourceCode | public function updateSourceCode($branch = CFG_GIT_BRANCH)
{
// Check that name is not any other command
if (!FileSystem::checkFileName($branch)) {
return $this;
}
// To use this command owner of folder and git repository must be the same as web user
exec('git re... | php | public function updateSourceCode($branch = CFG_GIT_BRANCH)
{
// Check that name is not any other command
if (!FileSystem::checkFileName($branch)) {
return $this;
}
// To use this command owner of folder and git repository must be the same as web user
exec('git re... | [
"public",
"function",
"updateSourceCode",
"(",
"$",
"branch",
"=",
"CFG_GIT_BRANCH",
")",
"{",
"// Check that name is not any other command",
"if",
"(",
"!",
"FileSystem",
"::",
"checkFileName",
"(",
"$",
"branch",
")",
")",
"{",
"return",
"$",
"this",
";",
"}",... | Updates files from git repository
Make sure user have access to repository and command is run as this user
@param string $branch
@return $this | [
"Updates",
"files",
"from",
"git",
"repository",
"Make",
"sure",
"user",
"have",
"access",
"to",
"repository",
"and",
"command",
"is",
"run",
"as",
"this",
"user"
] | b031af5643b6dc641539847784875137c8979cdd | https://github.com/devp-eu/tmcms-core/blob/b031af5643b6dc641539847784875137c8979cdd/src/Admin/Updater.php#L45-L72 |
187,158 | devp-eu/tmcms-core | src/Admin/Updater.php | Updater.updateComposerVendors | public function updateComposerVendors()
{
chdir(DIR_BASE);
exec('COMPOSER_HOME="' . substr(DIR_BASE, 0, -1) . '" composer -v update 2>&1', $out);
if ($out) {
$this->result_message[] = $out;
}
// Clear all caches - may be required to show fresh data
Cache... | php | public function updateComposerVendors()
{
chdir(DIR_BASE);
exec('COMPOSER_HOME="' . substr(DIR_BASE, 0, -1) . '" composer -v update 2>&1', $out);
if ($out) {
$this->result_message[] = $out;
}
// Clear all caches - may be required to show fresh data
Cache... | [
"public",
"function",
"updateComposerVendors",
"(",
")",
"{",
"chdir",
"(",
"DIR_BASE",
")",
";",
"exec",
"(",
"'COMPOSER_HOME=\"'",
".",
"substr",
"(",
"DIR_BASE",
",",
"0",
",",
"-",
"1",
")",
".",
"'\" composer -v update 2>&1'",
",",
"$",
"out",
")",
";... | Updates files from composer | [
"Updates",
"files",
"from",
"composer"
] | b031af5643b6dc641539847784875137c8979cdd | https://github.com/devp-eu/tmcms-core/blob/b031af5643b6dc641539847784875137c8979cdd/src/Admin/Updater.php#L77-L90 |
187,159 | devp-eu/tmcms-core | src/Admin/Updater.php | Updater.runMigrations | public function runMigrations()
{
// Check we havy any
if (!file_exists(DIR_MIGRATIONS)) {
return 0;
}
// Have DB already?
new MigrationEntityRepository;
// Check we have DB structure and any migration applied
$migrated_files = [];
if (SQ... | php | public function runMigrations()
{
// Check we havy any
if (!file_exists(DIR_MIGRATIONS)) {
return 0;
}
// Have DB already?
new MigrationEntityRepository;
// Check we have DB structure and any migration applied
$migrated_files = [];
if (SQ... | [
"public",
"function",
"runMigrations",
"(",
")",
"{",
"// Check we havy any",
"if",
"(",
"!",
"file_exists",
"(",
"DIR_MIGRATIONS",
")",
")",
"{",
"return",
"0",
";",
"}",
"// Have DB already?",
"new",
"MigrationEntityRepository",
";",
"// Check we have DB structure a... | Run DB migrations from migration .sql files
@return int count of applied migrations | [
"Run",
"DB",
"migrations",
"from",
"migration",
".",
"sql",
"files"
] | b031af5643b6dc641539847784875137c8979cdd | https://github.com/devp-eu/tmcms-core/blob/b031af5643b6dc641539847784875137c8979cdd/src/Admin/Updater.php#L96-L135 |
187,160 | devp-eu/tmcms-core | src/Admin/Updater.php | Updater.runMigrationFile | public function runMigrationFile($filename)
{
SQL::startTransaction();
// Force SQL run without errors
@q(file_get_contents(DIR_MIGRATIONS . $filename));
SQL::confirmTransaction();
return $this;
} | php | public function runMigrationFile($filename)
{
SQL::startTransaction();
// Force SQL run without errors
@q(file_get_contents(DIR_MIGRATIONS . $filename));
SQL::confirmTransaction();
return $this;
} | [
"public",
"function",
"runMigrationFile",
"(",
"$",
"filename",
")",
"{",
"SQL",
"::",
"startTransaction",
"(",
")",
";",
"// Force SQL run without errors",
"@",
"q",
"(",
"file_get_contents",
"(",
"DIR_MIGRATIONS",
".",
"$",
"filename",
")",
")",
";",
"SQL",
... | Run one migration .sql file
@param string $filename
@return $this | [
"Run",
"one",
"migration",
".",
"sql",
"file"
] | b031af5643b6dc641539847784875137c8979cdd | https://github.com/devp-eu/tmcms-core/blob/b031af5643b6dc641539847784875137c8979cdd/src/Admin/Updater.php#L142-L152 |
187,161 | devp-eu/tmcms-core | src/Admin/Updater.php | Updater.setMigrationFileAsCompleted | private function setMigrationFileAsCompleted($filename)
{
$migration = new MigrationEntity();
$migration->setFilename(sql_prepare($filename));
@$migration->save();
return $this;
} | php | private function setMigrationFileAsCompleted($filename)
{
$migration = new MigrationEntity();
$migration->setFilename(sql_prepare($filename));
@$migration->save();
return $this;
} | [
"private",
"function",
"setMigrationFileAsCompleted",
"(",
"$",
"filename",
")",
"{",
"$",
"migration",
"=",
"new",
"MigrationEntity",
"(",
")",
";",
"$",
"migration",
"->",
"setFilename",
"(",
"sql_prepare",
"(",
"$",
"filename",
")",
")",
";",
"@",
"$",
... | Set migration .sql file as already finished
@param string $filename
@return $this | [
"Set",
"migration",
".",
"sql",
"file",
"as",
"already",
"finished"
] | b031af5643b6dc641539847784875137c8979cdd | https://github.com/devp-eu/tmcms-core/blob/b031af5643b6dc641539847784875137c8979cdd/src/Admin/Updater.php#L159-L166 |
187,162 | snapwp/snap-core | src/Http/Request/File_Bag.php | File_Bag.count | public function count($key)
{
if ($this->has($key)) {
if (\is_array($this->get($key))) {
return \count($this->get($key));
}
return 1;
}
return 0;
} | php | public function count($key)
{
if ($this->has($key)) {
if (\is_array($this->get($key))) {
return \count($this->get($key));
}
return 1;
}
return 0;
} | [
"public",
"function",
"count",
"(",
"$",
"key",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"has",
"(",
"$",
"key",
")",
")",
"{",
"if",
"(",
"\\",
"is_array",
"(",
"$",
"this",
"->",
"get",
"(",
"$",
"key",
")",
")",
")",
"{",
"return",
"\\",
... | Return how many files were uploaded for a given key.
@since 1.0.0
@param string $key Item key to check.
@return int | [
"Return",
"how",
"many",
"files",
"were",
"uploaded",
"for",
"a",
"given",
"key",
"."
] | 43ff5da68e7f28017a21c7e33c770baf6f13d5cb | https://github.com/snapwp/snap-core/blob/43ff5da68e7f28017a21c7e33c770baf6f13d5cb/src/Http/Request/File_Bag.php#L65-L76 |
187,163 | snapwp/snap-core | src/Http/Request/File_Bag.php | File_Bag.set_data | protected function set_data(array $contents = [])
{
foreach ($contents as $key => $file) {
$this->data[ $key ] = $this->add_file($file);
}
} | php | protected function set_data(array $contents = [])
{
foreach ($contents as $key => $file) {
$this->data[ $key ] = $this->add_file($file);
}
} | [
"protected",
"function",
"set_data",
"(",
"array",
"$",
"contents",
"=",
"[",
"]",
")",
"{",
"foreach",
"(",
"$",
"contents",
"as",
"$",
"key",
"=>",
"$",
"file",
")",
"{",
"$",
"this",
"->",
"data",
"[",
"$",
"key",
"]",
"=",
"$",
"this",
"->",
... | Add the individual files to the bag.
@since 1.0.0
@param array $contents | [
"Add",
"the",
"individual",
"files",
"to",
"the",
"bag",
"."
] | 43ff5da68e7f28017a21c7e33c770baf6f13d5cb | https://github.com/snapwp/snap-core/blob/43ff5da68e7f28017a21c7e33c770baf6f13d5cb/src/Http/Request/File_Bag.php#L85-L90 |
187,164 | mikemirten/ZExt | library/ZExt/Debug/Collectors/Files.php | Files.setGroup | public function setGroup($title, $path) {
$path = rtrim(realpath($path), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
$this->groups[(string) $title] = $path;
} | php | public function setGroup($title, $path) {
$path = rtrim(realpath($path), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
$this->groups[(string) $title] = $path;
} | [
"public",
"function",
"setGroup",
"(",
"$",
"title",
",",
"$",
"path",
")",
"{",
"$",
"path",
"=",
"rtrim",
"(",
"realpath",
"(",
"$",
"path",
")",
",",
"DIRECTORY_SEPARATOR",
")",
".",
"DIRECTORY_SEPARATOR",
";",
"$",
"this",
"->",
"groups",
"[",
"(",... | Set the group of the files by the path
@param string $path
@param string $title | [
"Set",
"the",
"group",
"of",
"the",
"files",
"by",
"the",
"path"
] | 284956f5b85ba10571f64aaa651169e00f05ae56 | https://github.com/mikemirten/ZExt/blob/284956f5b85ba10571f64aaa651169e00f05ae56/library/ZExt/Debug/Collectors/Files.php#L79-L83 |
187,165 | mikemirten/ZExt | library/ZExt/Debug/Collectors/Files.php | Files.includePathInfo | protected function includePathInfo(Infoset $info) {
$list = $this->createList();
$list->setTitle('Include path');
$include = explode(PATH_SEPARATOR, get_include_path());
foreach ($include as $path) {
$list[] = $path;
}
$info[] = $list;
} | php | protected function includePathInfo(Infoset $info) {
$list = $this->createList();
$list->setTitle('Include path');
$include = explode(PATH_SEPARATOR, get_include_path());
foreach ($include as $path) {
$list[] = $path;
}
$info[] = $list;
} | [
"protected",
"function",
"includePathInfo",
"(",
"Infoset",
"$",
"info",
")",
"{",
"$",
"list",
"=",
"$",
"this",
"->",
"createList",
"(",
")",
";",
"$",
"list",
"->",
"setTitle",
"(",
"'Include path'",
")",
";",
"$",
"include",
"=",
"explode",
"(",
"P... | Create the include path information
@param Infoset $info | [
"Create",
"the",
"include",
"path",
"information"
] | 284956f5b85ba10571f64aaa651169e00f05ae56 | https://github.com/mikemirten/ZExt/blob/284956f5b85ba10571f64aaa651169e00f05ae56/library/ZExt/Debug/Collectors/Files.php#L148-L159 |
187,166 | mikemirten/ZExt | library/ZExt/Debug/Collectors/Files.php | Files.includedFilesInfo | protected function includedFilesInfo(array $apcFiles = null) {
foreach ($this->getIncludedFiles() as $file) {
if ($apcFiles !== null && isset($apcFiles[$file])) {
$apcMem = $this->formatMemory($apcFiles[$file]['mem_size']);
$apcHits = $apcFiles[$file]['num_hits'];
$fileInfo = sprintf(self::$apcInfo,... | php | protected function includedFilesInfo(array $apcFiles = null) {
foreach ($this->getIncludedFiles() as $file) {
if ($apcFiles !== null && isset($apcFiles[$file])) {
$apcMem = $this->formatMemory($apcFiles[$file]['mem_size']);
$apcHits = $apcFiles[$file]['num_hits'];
$fileInfo = sprintf(self::$apcInfo,... | [
"protected",
"function",
"includedFilesInfo",
"(",
"array",
"$",
"apcFiles",
"=",
"null",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"getIncludedFiles",
"(",
")",
"as",
"$",
"file",
")",
"{",
"if",
"(",
"$",
"apcFiles",
"!==",
"null",
"&&",
"isset",
... | Create groups with information about the included files
@param array $apcFiles
@return array | [
"Create",
"groups",
"with",
"information",
"about",
"the",
"included",
"files"
] | 284956f5b85ba10571f64aaa651169e00f05ae56 | https://github.com/mikemirten/ZExt/blob/284956f5b85ba10571f64aaa651169e00f05ae56/library/ZExt/Debug/Collectors/Files.php#L167-L200 |
187,167 | mikemirten/ZExt | library/ZExt/Debug/Collectors/Files.php | Files.apcInfo | protected function apcInfo(Infoset $infoset, array $apcInfo) {
$info = $this->createTable()
->setColsWidths([50, 50])
->setTitle('APC Info')
->enableBbCodes();
$infoset[] = $info;
$info[] = ['Memory:', '[info]' . $this->formatMemory($apcInfo['mem_size']) . '[/info]'];
if (isset($apcInfo['num_ent... | php | protected function apcInfo(Infoset $infoset, array $apcInfo) {
$info = $this->createTable()
->setColsWidths([50, 50])
->setTitle('APC Info')
->enableBbCodes();
$infoset[] = $info;
$info[] = ['Memory:', '[info]' . $this->formatMemory($apcInfo['mem_size']) . '[/info]'];
if (isset($apcInfo['num_ent... | [
"protected",
"function",
"apcInfo",
"(",
"Infoset",
"$",
"infoset",
",",
"array",
"$",
"apcInfo",
")",
"{",
"$",
"info",
"=",
"$",
"this",
"->",
"createTable",
"(",
")",
"->",
"setColsWidths",
"(",
"[",
"50",
",",
"50",
"]",
")",
"->",
"setTitle",
"(... | Collect the APC info
@param Infoset $infoset
@param array $apcInfo | [
"Collect",
"the",
"APC",
"info"
] | 284956f5b85ba10571f64aaa651169e00f05ae56 | https://github.com/mikemirten/ZExt/blob/284956f5b85ba10571f64aaa651169e00f05ae56/library/ZExt/Debug/Collectors/Files.php#L208-L238 |
187,168 | mikemirten/ZExt | library/ZExt/I18n/Cache/StrategyLocaleDomain.php | StrategyLocaleDomain.prepareCacheId | protected function prepareCacheId($locale, $domain) {
if (is_array($locale)) {
$list = [];
// many locales to many domains
if (is_array($domain)) {
foreach ($locale as $part1) {
foreach ($domain as $part2) {
$list[] = $part1 . '_' . $part2;
}
}
return $list;
}
/... | php | protected function prepareCacheId($locale, $domain) {
if (is_array($locale)) {
$list = [];
// many locales to many domains
if (is_array($domain)) {
foreach ($locale as $part1) {
foreach ($domain as $part2) {
$list[] = $part1 . '_' . $part2;
}
}
return $list;
}
/... | [
"protected",
"function",
"prepareCacheId",
"(",
"$",
"locale",
",",
"$",
"domain",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"locale",
")",
")",
"{",
"$",
"list",
"=",
"[",
"]",
";",
"// many locales to many domains",
"if",
"(",
"is_array",
"(",
"$",
... | Prepare the cahce IDs list
@param string | array $locale
@param string | array $domain
@return string | [
"Prepare",
"the",
"cahce",
"IDs",
"list"
] | 284956f5b85ba10571f64aaa651169e00f05ae56 | https://github.com/mikemirten/ZExt/blob/284956f5b85ba10571f64aaa651169e00f05ae56/library/ZExt/I18n/Cache/StrategyLocaleDomain.php#L103-L139 |
187,169 | orchestral/facile | src/Template/Composers/Html.php | Html.composeHtml | public function composeHtml(array $data = [], int $status = 200, array $config = []): SymfonyResponse
{
if (\is_null($view = $config['view'])) {
throw new InvalidArgumentException('Missing [$view].');
}
return Response::make($this->convertToViewable($view, $data, $config), $stat... | php | public function composeHtml(array $data = [], int $status = 200, array $config = []): SymfonyResponse
{
if (\is_null($view = $config['view'])) {
throw new InvalidArgumentException('Missing [$view].');
}
return Response::make($this->convertToViewable($view, $data, $config), $stat... | [
"public",
"function",
"composeHtml",
"(",
"array",
"$",
"data",
"=",
"[",
"]",
",",
"int",
"$",
"status",
"=",
"200",
",",
"array",
"$",
"config",
"=",
"[",
"]",
")",
":",
"SymfonyResponse",
"{",
"if",
"(",
"\\",
"is_null",
"(",
"$",
"view",
"=",
... | Compose HTML.
@param array $data
@param int $status
@param array $config
@throws \InvalidArgumentException
@return \Symfony\Component\HttpFoundation\Response | [
"Compose",
"HTML",
"."
] | 1e4d6b9cd9bd1023bcd39047a4b44179380ee17a | https://github.com/orchestral/facile/blob/1e4d6b9cd9bd1023bcd39047a4b44179380ee17a/src/Template/Composers/Html.php#L23-L30 |
187,170 | PayUMEA/payu-mea-sdk-php | lib/PayU/Model/ResourceModel.php | ResourceModel.executeCall | protected static function executeCall(
$method,
$payLoad,
$headers = array(),
$apiContext = null,
$soapCall = null,
$handlers = array('PayU\Handler\BasicAuthHandler'),
$path = ''
)
{
//Initialize the context and rest call object if not provided exp... | php | protected static function executeCall(
$method,
$payLoad,
$headers = array(),
$apiContext = null,
$soapCall = null,
$handlers = array('PayU\Handler\BasicAuthHandler'),
$path = ''
)
{
//Initialize the context and rest call object if not provided exp... | [
"protected",
"static",
"function",
"executeCall",
"(",
"$",
"method",
",",
"$",
"payLoad",
",",
"$",
"headers",
"=",
"array",
"(",
")",
",",
"$",
"apiContext",
"=",
"null",
",",
"$",
"soapCall",
"=",
"null",
",",
"$",
"handlers",
"=",
"array",
"(",
"... | Execute SDK Call to PayU services
@param string $method
@param string $payLoad
@param array $headers
@param ApiContext $apiContext
@param SoapCall $restCall
@param array $handlers
@return string json response of the object | [
"Execute",
"SDK",
"Call",
"to",
"PayU",
"services"
] | ebfcd99303cc424458732da8e1771edff843e437 | https://github.com/PayUMEA/payu-mea-sdk-php/blob/ebfcd99303cc424458732da8e1771edff843e437/lib/PayU/Model/ResourceModel.php#L338-L356 |
187,171 | PayUMEA/payu-mea-sdk-php | lib/PayU/Model/ResourceModel.php | ResourceModel.get | public static function get($reference, $apiContext = null, $soapCall = null)
{
$methodName = 'getTransaction';
ArgumentValidator::validate($reference, 'PayUReference');
$payload = array(
'AdditionalInformation' => array(
'payUReference' => $reference
)... | php | public static function get($reference, $apiContext = null, $soapCall = null)
{
$methodName = 'getTransaction';
ArgumentValidator::validate($reference, 'PayUReference');
$payload = array(
'AdditionalInformation' => array(
'payUReference' => $reference
)... | [
"public",
"static",
"function",
"get",
"(",
"$",
"reference",
",",
"$",
"apiContext",
"=",
"null",
",",
"$",
"soapCall",
"=",
"null",
")",
"{",
"$",
"methodName",
"=",
"'getTransaction'",
";",
"ArgumentValidator",
"::",
"validate",
"(",
"$",
"reference",
"... | Shows details a of payment or redirect resource.
@param string $reference
@param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
@param SoapCall $soapCall is the SOAP Call Service that is used to make API calls
@return ResourceModel resource object | [
"Shows",
"details",
"a",
"of",
"payment",
"or",
"redirect",
"resource",
"."
] | ebfcd99303cc424458732da8e1771edff843e437 | https://github.com/PayUMEA/payu-mea-sdk-php/blob/ebfcd99303cc424458732da8e1771edff843e437/lib/PayU/Model/ResourceModel.php#L366-L387 |
187,172 | PayUMEA/payu-mea-sdk-php | lib/PayU/Model/ResourceModel.php | ResourceModel.create | public function create($apiContext = null, $soapCall = null)
{
$methodName = 'doTransaction';
$payload = $this->request->parseForEnterpriseAPI($this);
$json = self::executeCall(
$methodName,
$payload,
null,
$apiContext,
$soapCall
... | php | public function create($apiContext = null, $soapCall = null)
{
$methodName = 'doTransaction';
$payload = $this->request->parseForEnterpriseAPI($this);
$json = self::executeCall(
$methodName,
$payload,
null,
$apiContext,
$soapCall
... | [
"public",
"function",
"create",
"(",
"$",
"apiContext",
"=",
"null",
",",
"$",
"soapCall",
"=",
"null",
")",
"{",
"$",
"methodName",
"=",
"'doTransaction'",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"request",
"->",
"parseForEnterpriseAPI",
"(",
"$",
... | Executes, or completes direct payment processing. In the JSON request body, include a `payment` object with the intent,
customer, fundingInstrument, transaction etc. Also include return, notify, and cancel URLs in the `payment` object.
@param ApiContext $apiContext is the APIContext for this call. It can be used to pa... | [
"Executes",
"or",
"completes",
"direct",
"payment",
"processing",
".",
"In",
"the",
"JSON",
"request",
"body",
"include",
"a",
"payment",
"object",
"with",
"the",
"intent",
"customer",
"fundingInstrument",
"transaction",
"etc",
".",
"Also",
"include",
"return",
... | ebfcd99303cc424458732da8e1771edff843e437 | https://github.com/PayUMEA/payu-mea-sdk-php/blob/ebfcd99303cc424458732da8e1771edff843e437/lib/PayU/Model/ResourceModel.php#L424-L439 |
187,173 | PayUMEA/payu-mea-sdk-php | lib/PayU/Model/ResourceModel.php | ResourceModel.refund | public function refund($apiContext = null, $soapCall = null)
{
$methodName = 'doTransaction';
ArgumentValidator::validate($this->return->payUReference, "payUReference");
ArgumentValidator::validate($this->return->merchantReference, 'merchantReference');
$payLoad = $this->request->par... | php | public function refund($apiContext = null, $soapCall = null)
{
$methodName = 'doTransaction';
ArgumentValidator::validate($this->return->payUReference, "payUReference");
ArgumentValidator::validate($this->return->merchantReference, 'merchantReference');
$payLoad = $this->request->par... | [
"public",
"function",
"refund",
"(",
"$",
"apiContext",
"=",
"null",
",",
"$",
"soapCall",
"=",
"null",
")",
"{",
"$",
"methodName",
"=",
"'doTransaction'",
";",
"ArgumentValidator",
"::",
"validate",
"(",
"$",
"this",
"->",
"return",
"->",
"payUReference",
... | Refund a captured payment.
In addition, include an amount object in the body of the request JSON.
@param ApiContext $apiContext is the APIContext for this call.
It can be used to pass dynamic configuration and credentials.
@param SoapCall $soapCall is the SOAP Call Service that is used to make calls
@return ResourceM... | [
"Refund",
"a",
"captured",
"payment",
".",
"In",
"addition",
"include",
"an",
"amount",
"object",
"in",
"the",
"body",
"of",
"the",
"request",
"JSON",
"."
] | ebfcd99303cc424458732da8e1771edff843e437 | https://github.com/PayUMEA/payu-mea-sdk-php/blob/ebfcd99303cc424458732da8e1771edff843e437/lib/PayU/Model/ResourceModel.php#L451-L469 |
187,174 | PayUMEA/payu-mea-sdk-php | lib/PayU/Model/ResourceModel.php | ResourceModel.capture | public function capture($apiContext = null, $soapCall = null)
{
$methodName = 'doTransaction';
ArgumentValidator::validate($this->payu_reference, "payUReference");
ArgumentValidator::validate($this->merchant_reference, "merchantReference");
$payLoad = $this->request->parseReserveReso... | php | public function capture($apiContext = null, $soapCall = null)
{
$methodName = 'doTransaction';
ArgumentValidator::validate($this->payu_reference, "payUReference");
ArgumentValidator::validate($this->merchant_reference, "merchantReference");
$payLoad = $this->request->parseReserveReso... | [
"public",
"function",
"capture",
"(",
"$",
"apiContext",
"=",
"null",
",",
"$",
"soapCall",
"=",
"null",
")",
"{",
"$",
"methodName",
"=",
"'doTransaction'",
";",
"ArgumentValidator",
"::",
"validate",
"(",
"$",
"this",
"->",
"payu_reference",
",",
"\"payURe... | Captures and processes an authorization, by ID. To use this call, the original payment call must specify an
intent of `reserve`.
@param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
@param SoapCall $soapCall is the SOAP Call Service that is used t... | [
"Captures",
"and",
"processes",
"an",
"authorization",
"by",
"ID",
".",
"To",
"use",
"this",
"call",
"the",
"original",
"payment",
"call",
"must",
"specify",
"an",
"intent",
"of",
"reserve",
"."
] | ebfcd99303cc424458732da8e1771edff843e437 | https://github.com/PayUMEA/payu-mea-sdk-php/blob/ebfcd99303cc424458732da8e1771edff843e437/lib/PayU/Model/ResourceModel.php#L480-L497 |
187,175 | PayUMEA/payu-mea-sdk-php | lib/PayU/Model/ResourceModel.php | ResourceModel.void | public function void($apiContext = null, $soapCall = null)
{
$methodName = 'doTransaction';
ArgumentValidator::validate($this->getReturn()->getPayUReference(), "payUReference");
ArgumentValidator::validate($this->getReturn()->getMerchantReference(), "merchantReference");
$payLoad = $... | php | public function void($apiContext = null, $soapCall = null)
{
$methodName = 'doTransaction';
ArgumentValidator::validate($this->getReturn()->getPayUReference(), "payUReference");
ArgumentValidator::validate($this->getReturn()->getMerchantReference(), "merchantReference");
$payLoad = $... | [
"public",
"function",
"void",
"(",
"$",
"apiContext",
"=",
"null",
",",
"$",
"soapCall",
"=",
"null",
")",
"{",
"$",
"methodName",
"=",
"'doTransaction'",
";",
"ArgumentValidator",
"::",
"validate",
"(",
"$",
"this",
"->",
"getReturn",
"(",
")",
"->",
"g... | Voids, or cancels, an authorization, by ID. You cannot void a fully captured authorization.
@param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration
and credentials.
@param SoapCall $soapCall is the SOAP Call Service that is used to calls
@return ResourceModel | [
"Voids",
"or",
"cancels",
"an",
"authorization",
"by",
"ID",
".",
"You",
"cannot",
"void",
"a",
"fully",
"captured",
"authorization",
"."
] | ebfcd99303cc424458732da8e1771edff843e437 | https://github.com/PayUMEA/payu-mea-sdk-php/blob/ebfcd99303cc424458732da8e1771edff843e437/lib/PayU/Model/ResourceModel.php#L508-L523 |
187,176 | beryllium/cache | Client/APCClient.php | APCClient.set | public function set($key, $value, $ttl)
{
if (!$this->safe) {
return false;
}
return apc_store($key, $value, $ttl);
} | php | public function set($key, $value, $ttl)
{
if (!$this->safe) {
return false;
}
return apc_store($key, $value, $ttl);
} | [
"public",
"function",
"set",
"(",
"$",
"key",
",",
"$",
"value",
",",
"$",
"ttl",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"safe",
")",
"{",
"return",
"false",
";",
"}",
"return",
"apc_store",
"(",
"$",
"key",
",",
"$",
"value",
",",
"$",
... | Add a value to the cache under a unique key
@param string $key Unique key to identify the data
@param mixed $value Data to store in the cache
@param int $ttl Lifetime for stored data (in seconds)
@return boolean | [
"Add",
"a",
"value",
"to",
"the",
"cache",
"under",
"a",
"unique",
"key"
] | b51068afe0ac2bc2ee31fdc43a31827abe668e08 | https://github.com/beryllium/cache/blob/b51068afe0ac2bc2ee31fdc43a31827abe668e08/Client/APCClient.php#L47-L54 |
187,177 | peg-org/peg-src | src/Settings.php | Settings.Load | public static function Load($directory, $file)
{
self::CheckBackend();
self::$backend->Load($directory, $file);
} | php | public static function Load($directory, $file)
{
self::CheckBackend();
self::$backend->Load($directory, $file);
} | [
"public",
"static",
"function",
"Load",
"(",
"$",
"directory",
",",
"$",
"file",
")",
"{",
"self",
"::",
"CheckBackend",
"(",
")",
";",
"self",
"::",
"$",
"backend",
"->",
"Load",
"(",
"$",
"directory",
",",
"$",
"file",
")",
";",
"}"
] | Loads the configuration file on the given directory.
@param string $directory
@param string $file | [
"Loads",
"the",
"configuration",
"file",
"on",
"the",
"given",
"directory",
"."
] | c95907b91f35f3358c1a7ac8f62ad263138ff75e | https://github.com/peg-org/peg-src/blob/c95907b91f35f3358c1a7ac8f62ad263138ff75e/src/Settings.php#L41-L46 |
187,178 | peg-org/peg-src | src/Settings.php | Settings.GetGroupValue | public static function GetGroupValue($group, $option)
{
self::CheckBackend();
return self::$backend->GetGroupValue($group, $option);
} | php | public static function GetGroupValue($group, $option)
{
self::CheckBackend();
return self::$backend->GetGroupValue($group, $option);
} | [
"public",
"static",
"function",
"GetGroupValue",
"(",
"$",
"group",
",",
"$",
"option",
")",
"{",
"self",
"::",
"CheckBackend",
"(",
")",
";",
"return",
"self",
"::",
"$",
"backend",
"->",
"GetGroupValue",
"(",
"$",
"group",
",",
"$",
"option",
")",
";... | Gets the value of a specific option inside a group.
@param string $group Eg: parser
@param string $option Eg: input_format
@return string|bool | [
"Gets",
"the",
"value",
"of",
"a",
"specific",
"option",
"inside",
"a",
"group",
"."
] | c95907b91f35f3358c1a7ac8f62ad263138ff75e | https://github.com/peg-org/peg-src/blob/c95907b91f35f3358c1a7ac8f62ad263138ff75e/src/Settings.php#L66-L71 |
187,179 | peg-org/peg-src | src/Settings.php | Settings.GetExtensionName | public static function GetExtensionName()
{
self::CheckBackend();
$name = self::$backend->Get("name");
if(strlen($name) <= 0)
{
$dir_parts = explode(
"/",
str_replace("\\", "/", self::$backend->directory)
);
$name... | php | public static function GetExtensionName()
{
self::CheckBackend();
$name = self::$backend->Get("name");
if(strlen($name) <= 0)
{
$dir_parts = explode(
"/",
str_replace("\\", "/", self::$backend->directory)
);
$name... | [
"public",
"static",
"function",
"GetExtensionName",
"(",
")",
"{",
"self",
"::",
"CheckBackend",
"(",
")",
";",
"$",
"name",
"=",
"self",
"::",
"$",
"backend",
"->",
"Get",
"(",
"\"name\"",
")",
";",
"if",
"(",
"strlen",
"(",
"$",
"name",
")",
"<=",
... | Get the current extension name.
@return string | [
"Get",
"the",
"current",
"extension",
"name",
"."
] | c95907b91f35f3358c1a7ac8f62ad263138ff75e | https://github.com/peg-org/peg-src/blob/c95907b91f35f3358c1a7ac8f62ad263138ff75e/src/Settings.php#L99-L116 |
187,180 | peg-org/peg-src | src/Settings.php | Settings.Set | public static function Set($option, $value)
{
self::CheckBackend();
self::$backend->Set($option, $value);
} | php | public static function Set($option, $value)
{
self::CheckBackend();
self::$backend->Set($option, $value);
} | [
"public",
"static",
"function",
"Set",
"(",
"$",
"option",
",",
"$",
"value",
")",
"{",
"self",
"::",
"CheckBackend",
"(",
")",
";",
"self",
"::",
"$",
"backend",
"->",
"Set",
"(",
"$",
"option",
",",
"$",
"value",
")",
";",
"}"
] | Modify or add a new option.
@param string $option Option to add or modify.
@param string $value Value of the option. | [
"Modify",
"or",
"add",
"a",
"new",
"option",
"."
] | c95907b91f35f3358c1a7ac8f62ad263138ff75e | https://github.com/peg-org/peg-src/blob/c95907b91f35f3358c1a7ac8f62ad263138ff75e/src/Settings.php#L134-L139 |
187,181 | peg-org/peg-src | src/Settings.php | Settings.SetGroupValue | public static function SetGroupValue($group, $option, $value)
{
self::CheckBackend();
self::$backend->SetGroupValue($group, $option, $value);
} | php | public static function SetGroupValue($group, $option, $value)
{
self::CheckBackend();
self::$backend->SetGroupValue($group, $option, $value);
} | [
"public",
"static",
"function",
"SetGroupValue",
"(",
"$",
"group",
",",
"$",
"option",
",",
"$",
"value",
")",
"{",
"self",
"::",
"CheckBackend",
"(",
")",
";",
"self",
"::",
"$",
"backend",
"->",
"SetGroupValue",
"(",
"$",
"group",
",",
"$",
"option"... | Modify or add a new group with an option.
@param string $group Name of group to modify or create.
@param string $option Name of option to add or modify in the group.
@param string $value Value of the option. | [
"Modify",
"or",
"add",
"a",
"new",
"group",
"with",
"an",
"option",
"."
] | c95907b91f35f3358c1a7ac8f62ad263138ff75e | https://github.com/peg-org/peg-src/blob/c95907b91f35f3358c1a7ac8f62ad263138ff75e/src/Settings.php#L147-L152 |
187,182 | peg-org/peg-src | src/Settings.php | Settings.SetAuthors | public static function SetAuthors($authors)
{
self::CheckBackend();
$authors = trim($authors);
$authors = trim($authors, ",");
self::$backend->Set("authors", $authors);
} | php | public static function SetAuthors($authors)
{
self::CheckBackend();
$authors = trim($authors);
$authors = trim($authors, ",");
self::$backend->Set("authors", $authors);
} | [
"public",
"static",
"function",
"SetAuthors",
"(",
"$",
"authors",
")",
"{",
"self",
"::",
"CheckBackend",
"(",
")",
";",
"$",
"authors",
"=",
"trim",
"(",
"$",
"authors",
")",
";",
"$",
"authors",
"=",
"trim",
"(",
"$",
"authors",
",",
"\",\"",
")",... | Set the authors of the extension. This should be a comma
seperated list with the names of the authors.
@param string $authors | [
"Set",
"the",
"authors",
"of",
"the",
"extension",
".",
"This",
"should",
"be",
"a",
"comma",
"seperated",
"list",
"with",
"the",
"names",
"of",
"the",
"authors",
"."
] | c95907b91f35f3358c1a7ac8f62ad263138ff75e | https://github.com/peg-org/peg-src/blob/c95907b91f35f3358c1a7ac8f62ad263138ff75e/src/Settings.php#L159-L167 |
187,183 | peg-org/peg-src | src/Settings.php | Settings.SetContributors | public static function SetContributors($contributors)
{
self::CheckBackend();
$contributors = trim($contributors);
$contributors = trim($contributors, ",");
self::$backend->Set("contributors", $contributors);
} | php | public static function SetContributors($contributors)
{
self::CheckBackend();
$contributors = trim($contributors);
$contributors = trim($contributors, ",");
self::$backend->Set("contributors", $contributors);
} | [
"public",
"static",
"function",
"SetContributors",
"(",
"$",
"contributors",
")",
"{",
"self",
"::",
"CheckBackend",
"(",
")",
";",
"$",
"contributors",
"=",
"trim",
"(",
"$",
"contributors",
")",
";",
"$",
"contributors",
"=",
"trim",
"(",
"$",
"contribut... | Set the contributors of the extension. This should be a comma
seperated list with the names of the contributors.
@param string $contributors | [
"Set",
"the",
"contributors",
"of",
"the",
"extension",
".",
"This",
"should",
"be",
"a",
"comma",
"seperated",
"list",
"with",
"the",
"names",
"of",
"the",
"contributors",
"."
] | c95907b91f35f3358c1a7ac8f62ad263138ff75e | https://github.com/peg-org/peg-src/blob/c95907b91f35f3358c1a7ac8f62ad263138ff75e/src/Settings.php#L174-L182 |
187,184 | peg-org/peg-src | src/Settings.php | Settings.SetExtensionName | public static function SetExtensionName($name)
{
self::CheckBackend();
$name = trim($name);
self::$backend->Set("name", $name);
} | php | public static function SetExtensionName($name)
{
self::CheckBackend();
$name = trim($name);
self::$backend->Set("name", $name);
} | [
"public",
"static",
"function",
"SetExtensionName",
"(",
"$",
"name",
")",
"{",
"self",
"::",
"CheckBackend",
"(",
")",
";",
"$",
"name",
"=",
"trim",
"(",
"$",
"name",
")",
";",
"self",
"::",
"$",
"backend",
"->",
"Set",
"(",
"\"name\"",
",",
"$",
... | Set the extension name, which is used in some important parts of the
code generator.
@param string $name | [
"Set",
"the",
"extension",
"name",
"which",
"is",
"used",
"in",
"some",
"important",
"parts",
"of",
"the",
"code",
"generator",
"."
] | c95907b91f35f3358c1a7ac8f62ad263138ff75e | https://github.com/peg-org/peg-src/blob/c95907b91f35f3358c1a7ac8f62ad263138ff75e/src/Settings.php#L189-L196 |
187,185 | peg-org/peg-src | src/Settings.php | Settings.SetVersion | public static function SetVersion($number)
{
self::CheckBackend();
$number = trim($number);
self::$backend->Set("version", $number);
} | php | public static function SetVersion($number)
{
self::CheckBackend();
$number = trim($number);
self::$backend->Set("version", $number);
} | [
"public",
"static",
"function",
"SetVersion",
"(",
"$",
"number",
")",
"{",
"self",
"::",
"CheckBackend",
"(",
")",
";",
"$",
"number",
"=",
"trim",
"(",
"$",
"number",
")",
";",
"self",
"::",
"$",
"backend",
"->",
"Set",
"(",
"\"version\"",
",",
"$"... | Sets the version of the extension which is used in some important
parts of the code generator.
@param string $number | [
"Sets",
"the",
"version",
"of",
"the",
"extension",
"which",
"is",
"used",
"in",
"some",
"important",
"parts",
"of",
"the",
"code",
"generator",
"."
] | c95907b91f35f3358c1a7ac8f62ad263138ff75e | https://github.com/peg-org/peg-src/blob/c95907b91f35f3358c1a7ac8f62ad263138ff75e/src/Settings.php#L203-L210 |
187,186 | JumpGateio/Users | src/JumpGate/Users/Services/SocialLogin.php | SocialLogin.redirect | public function redirect($provider)
{
$this->getProviderDetails($provider);
return Socialite::driver($this->provider->driver)
->scopes($this->provider->scopes)
->with($this->provider->extras)
->redirect();
} | php | public function redirect($provider)
{
$this->getProviderDetails($provider);
return Socialite::driver($this->provider->driver)
->scopes($this->provider->scopes)
->with($this->provider->extras)
->redirect();
} | [
"public",
"function",
"redirect",
"(",
"$",
"provider",
")",
"{",
"$",
"this",
"->",
"getProviderDetails",
"(",
"$",
"provider",
")",
";",
"return",
"Socialite",
"::",
"driver",
"(",
"$",
"this",
"->",
"provider",
"->",
"driver",
")",
"->",
"scopes",
"("... | Redirect the user based on the social provider being used.
@param string $provider The provider being logged in through.
@return mixed
@throws \Exception | [
"Redirect",
"the",
"user",
"based",
"on",
"the",
"social",
"provider",
"being",
"used",
"."
] | 2a63b9088b4fb385a1888918ede98be53e733f56 | https://github.com/JumpGateio/Users/blob/2a63b9088b4fb385a1888918ede98be53e733f56/src/JumpGate/Users/Services/SocialLogin.php#L46-L54 |
187,187 | JumpGateio/Users | src/JumpGate/Users/Services/SocialLogin.php | SocialLogin.socialUpdate | public function socialUpdate($provider, User $user)
{
$this->getProviderDetails($provider);
// Get the users.
$socialUser = $this->getSocialUser();
// Update or create provider details.
$this->updateFromProvider($user, $socialUser);
return $socialUser;
} | php | public function socialUpdate($provider, User $user)
{
$this->getProviderDetails($provider);
// Get the users.
$socialUser = $this->getSocialUser();
// Update or create provider details.
$this->updateFromProvider($user, $socialUser);
return $socialUser;
} | [
"public",
"function",
"socialUpdate",
"(",
"$",
"provider",
",",
"User",
"$",
"user",
")",
"{",
"$",
"this",
"->",
"getProviderDetails",
"(",
"$",
"provider",
")",
";",
"// Get the users.",
"$",
"socialUser",
"=",
"$",
"this",
"->",
"getSocialUser",
"(",
"... | Update a user's social details fore a given provider.
@param string $provider The provider being logged in through.
@param User $user The user these details are for.
@return \Laravel\Socialite\AbstractUser|null
@throws \Exception | [
"Update",
"a",
"user",
"s",
"social",
"details",
"fore",
"a",
"given",
"provider",
"."
] | 2a63b9088b4fb385a1888918ede98be53e733f56 | https://github.com/JumpGateio/Users/blob/2a63b9088b4fb385a1888918ede98be53e733f56/src/JumpGate/Users/Services/SocialLogin.php#L98-L109 |
187,188 | JumpGateio/Users | src/JumpGate/Users/Services/SocialLogin.php | SocialLogin.getUser | protected function getUser($socialUser)
{
$user = $this->users
->where('email', $socialUser->getEmail())
->orWhereHas('socials', function ($query) use ($socialUser) {
$query->where('email', $socialUser->getEmail())
->where('provider', $this->provid... | php | protected function getUser($socialUser)
{
$user = $this->users
->where('email', $socialUser->getEmail())
->orWhereHas('socials', function ($query) use ($socialUser) {
$query->where('email', $socialUser->getEmail())
->where('provider', $this->provid... | [
"protected",
"function",
"getUser",
"(",
"$",
"socialUser",
")",
"{",
"$",
"user",
"=",
"$",
"this",
"->",
"users",
"->",
"where",
"(",
"'email'",
",",
"$",
"socialUser",
"->",
"getEmail",
"(",
")",
")",
"->",
"orWhereHas",
"(",
"'socials'",
",",
"func... | Make sure that we have a valid user to work with.
@param null|\Laravel\Socialite\AbstractUser $socialUser
@return \App\Models\User | [
"Make",
"sure",
"that",
"we",
"have",
"a",
"valid",
"user",
"to",
"work",
"with",
"."
] | 2a63b9088b4fb385a1888918ede98be53e733f56 | https://github.com/JumpGateio/Users/blob/2a63b9088b4fb385a1888918ede98be53e733f56/src/JumpGate/Users/Services/SocialLogin.php#L128-L143 |
187,189 | JumpGateio/Users | src/JumpGate/Users/Services/SocialLogin.php | SocialLogin.updateFromProvider | protected function updateFromProvider($user, $socialUser)
{
if (! $user->hasProvider($this->provider->driver)) {
return $user->addSocial($socialUser, $this->provider->driver);
}
return $user->getProvider($this->provider->driver)
->updateFromProvider($socialUser, $thi... | php | protected function updateFromProvider($user, $socialUser)
{
if (! $user->hasProvider($this->provider->driver)) {
return $user->addSocial($socialUser, $this->provider->driver);
}
return $user->getProvider($this->provider->driver)
->updateFromProvider($socialUser, $thi... | [
"protected",
"function",
"updateFromProvider",
"(",
"$",
"user",
",",
"$",
"socialUser",
")",
"{",
"if",
"(",
"!",
"$",
"user",
"->",
"hasProvider",
"(",
"$",
"this",
"->",
"provider",
"->",
"driver",
")",
")",
"{",
"return",
"$",
"user",
"->",
"addSoc... | Either update an existing provider record with the newest details
or add this provider to the user.
@param null|\App\Models\User $user
@param null|\Laravel\Socialite\AbstractUser $socialUser
@return mixed | [
"Either",
"update",
"an",
"existing",
"provider",
"record",
"with",
"the",
"newest",
"details",
"or",
"add",
"this",
"provider",
"to",
"the",
"user",
"."
] | 2a63b9088b4fb385a1888918ede98be53e733f56 | https://github.com/JumpGateio/Users/blob/2a63b9088b4fb385a1888918ede98be53e733f56/src/JumpGate/Users/Services/SocialLogin.php#L154-L162 |
187,190 | JumpGateio/Users | src/JumpGate/Users/Services/SocialLogin.php | SocialLogin.getProvider | private function getProvider($providerName)
{
$provider = is_null($providerName)
? $this->providers->first()
: $this->providers->get($providerName);
return $this->provider = new Provider($provider);
} | php | private function getProvider($providerName)
{
$provider = is_null($providerName)
? $this->providers->first()
: $this->providers->get($providerName);
return $this->provider = new Provider($provider);
} | [
"private",
"function",
"getProvider",
"(",
"$",
"providerName",
")",
"{",
"$",
"provider",
"=",
"is_null",
"(",
"$",
"providerName",
")",
"?",
"$",
"this",
"->",
"providers",
"->",
"first",
"(",
")",
":",
"$",
"this",
"->",
"providers",
"->",
"get",
"(... | Get the provider from the supplied name.
@param string $providerName The name of the provider.
@return \JumpGate\Users\Models\Social\Provider | [
"Get",
"the",
"provider",
"from",
"the",
"supplied",
"name",
"."
] | 2a63b9088b4fb385a1888918ede98be53e733f56 | https://github.com/JumpGateio/Users/blob/2a63b9088b4fb385a1888918ede98be53e733f56/src/JumpGate/Users/Services/SocialLogin.php#L203-L210 |
187,191 | cyberspectrum/contao-toolbox | src/CyberSpectrum/Translation/Contao/StringValue.php | StringValue.isEndToken | private function isEndToken()
{
return $this->tokenIs(';')
|| $this->tokenIs(',')
|| $this->tokenIs(')')
|| $this->tokenIs(']')
|| $this->tokenIs(T_DOUBLE_ARROW);
} | php | private function isEndToken()
{
return $this->tokenIs(';')
|| $this->tokenIs(',')
|| $this->tokenIs(')')
|| $this->tokenIs(']')
|| $this->tokenIs(T_DOUBLE_ARROW);
} | [
"private",
"function",
"isEndToken",
"(",
")",
"{",
"return",
"$",
"this",
"->",
"tokenIs",
"(",
"';'",
")",
"||",
"$",
"this",
"->",
"tokenIs",
"(",
"','",
")",
"||",
"$",
"this",
"->",
"tokenIs",
"(",
"')'",
")",
"||",
"$",
"this",
"->",
"tokenIs... | Check if the current token is a ending token.
@return bool | [
"Check",
"if",
"the",
"current",
"token",
"is",
"a",
"ending",
"token",
"."
] | cc5a62958e2b757c527ab5d5b543ff71a90c5a18 | https://github.com/cyberspectrum/contao-toolbox/blob/cc5a62958e2b757c527ab5d5b543ff71a90c5a18/src/CyberSpectrum/Translation/Contao/StringValue.php#L83-L90 |
187,192 | cyberspectrum/contao-toolbox | src/CyberSpectrum/Translation/Contao/StringValue.php | StringValue.getValue | public function getValue()
{
if (!(is_array($this->data) && count($this->data))) {
return null;
}
return implode('', $this->data);
} | php | public function getValue()
{
if (!(is_array($this->data) && count($this->data))) {
return null;
}
return implode('', $this->data);
} | [
"public",
"function",
"getValue",
"(",
")",
"{",
"if",
"(",
"!",
"(",
"is_array",
"(",
"$",
"this",
"->",
"data",
")",
"&&",
"count",
"(",
"$",
"this",
"->",
"data",
")",
")",
")",
"{",
"return",
"null",
";",
"}",
"return",
"implode",
"(",
"''",
... | Retrieve the value of the string parser.
@return null|string | [
"Retrieve",
"the",
"value",
"of",
"the",
"string",
"parser",
"."
] | cc5a62958e2b757c527ab5d5b543ff71a90c5a18 | https://github.com/cyberspectrum/contao-toolbox/blob/cc5a62958e2b757c527ab5d5b543ff71a90c5a18/src/CyberSpectrum/Translation/Contao/StringValue.php#L97-L104 |
187,193 | devp-eu/tmcms-core | src/HTML/Element.php | Element.getAttributesString | public function getAttributesString(array $skip = []): string
{
$skip = array_map('strtolower', $skip);
$res = [];
// Id can be set
if ($this->id) {
$res[] = 'id="' . htmlspecialchars((string)$this->getId(), ENT_QUOTES) . '"';
}
foreach ($this->attribut... | php | public function getAttributesString(array $skip = []): string
{
$skip = array_map('strtolower', $skip);
$res = [];
// Id can be set
if ($this->id) {
$res[] = 'id="' . htmlspecialchars((string)$this->getId(), ENT_QUOTES) . '"';
}
foreach ($this->attribut... | [
"public",
"function",
"getAttributesString",
"(",
"array",
"$",
"skip",
"=",
"[",
"]",
")",
":",
"string",
"{",
"$",
"skip",
"=",
"array_map",
"(",
"'strtolower'",
",",
"$",
"skip",
")",
";",
"$",
"res",
"=",
"[",
"]",
";",
"// Id can be set",
"if",
... | Return string consisting from all html element attributes
@param array $skip
@return string | [
"Return",
"string",
"consisting",
"from",
"all",
"html",
"element",
"attributes"
] | b031af5643b6dc641539847784875137c8979cdd | https://github.com/devp-eu/tmcms-core/blob/b031af5643b6dc641539847784875137c8979cdd/src/HTML/Element.php#L673-L718 |
187,194 | devp-eu/tmcms-core | src/HTML/Element.php | Element.setWidget | public function setWidget(Widget $widget)
{
$this->widget = $widget;
$this->widget->setOwner($this);
return $this;
} | php | public function setWidget(Widget $widget)
{
$this->widget = $widget;
$this->widget->setOwner($this);
return $this;
} | [
"public",
"function",
"setWidget",
"(",
"Widget",
"$",
"widget",
")",
"{",
"$",
"this",
"->",
"widget",
"=",
"$",
"widget",
";",
"$",
"this",
"->",
"widget",
"->",
"setOwner",
"(",
"$",
"this",
")",
";",
"return",
"$",
"this",
";",
"}"
] | Set Widget button near element field
@param Widget $widget
@return $this | [
"Set",
"Widget",
"button",
"near",
"element",
"field"
] | b031af5643b6dc641539847784875137c8979cdd | https://github.com/devp-eu/tmcms-core/blob/b031af5643b6dc641539847784875137c8979cdd/src/HTML/Element.php#L736-L743 |
187,195 | devp-eu/tmcms-core | src/HTML/Element.php | Element.enableGoogleMap | public function enableGoogleMap($options = [])
{
$widget = GoogleMap::getInstance();
$widget->options = $options;
$this->setWidget($widget);
PageHead::getInstance()
->addJsUrl('https://maps.googleapis.com/maps/api/js?key=' . Settings::get('google_api_key'));
re... | php | public function enableGoogleMap($options = [])
{
$widget = GoogleMap::getInstance();
$widget->options = $options;
$this->setWidget($widget);
PageHead::getInstance()
->addJsUrl('https://maps.googleapis.com/maps/api/js?key=' . Settings::get('google_api_key'));
re... | [
"public",
"function",
"enableGoogleMap",
"(",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"widget",
"=",
"GoogleMap",
"::",
"getInstance",
"(",
")",
";",
"$",
"widget",
"->",
"options",
"=",
"$",
"options",
";",
"$",
"this",
"->",
"setWidget",
"(",
... | Enables google map place picker
@param array $options
@return $this | [
"Enables",
"google",
"map",
"place",
"picker"
] | b031af5643b6dc641539847784875137c8979cdd | https://github.com/devp-eu/tmcms-core/blob/b031af5643b6dc641539847784875137c8979cdd/src/HTML/Element.php#L783-L794 |
187,196 | devp-eu/tmcms-core | src/HTML/Element.php | Element.enableCalendarDatepicker | public function enableCalendarDatepicker()
{
if (!$this->isEnabledCalendarDatepicker()) {
// First time enabling
PageTail::getInstance()
->addCssUrl('plugins/datepicker/datepicker.css')
->addJsUrl('plugins/datepicker/bootstrap-datepicker.js');
... | php | public function enableCalendarDatepicker()
{
if (!$this->isEnabledCalendarDatepicker()) {
// First time enabling
PageTail::getInstance()
->addCssUrl('plugins/datepicker/datepicker.css')
->addJsUrl('plugins/datepicker/bootstrap-datepicker.js');
... | [
"public",
"function",
"enableCalendarDatepicker",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isEnabledCalendarDatepicker",
"(",
")",
")",
"{",
"// First time enabling",
"PageTail",
"::",
"getInstance",
"(",
")",
"->",
"addCssUrl",
"(",
"'plugins/datepicker... | Enables simple datepicker for input
@return $this | [
"Enables",
"simple",
"datepicker",
"for",
"input"
] | b031af5643b6dc641539847784875137c8979cdd | https://github.com/devp-eu/tmcms-core/blob/b031af5643b6dc641539847784875137c8979cdd/src/HTML/Element.php#L823-L837 |
187,197 | devp-eu/tmcms-core | src/HTML/Element.php | Element.enableDateTimePicker | public function enableDateTimePicker($options = [])
{
if (!$this->isEnabledDateTimePicker()) {
PageTail::getInstance()
->addCssUrl('plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css')
->addJsUrl('plugins/moment/js/moment.min.js')
... | php | public function enableDateTimePicker($options = [])
{
if (!$this->isEnabledDateTimePicker()) {
PageTail::getInstance()
->addCssUrl('plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css')
->addJsUrl('plugins/moment/js/moment.min.js')
... | [
"public",
"function",
"enableDateTimePicker",
"(",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isEnabledDateTimePicker",
"(",
")",
")",
"{",
"PageTail",
"::",
"getInstance",
"(",
")",
"->",
"addCssUrl",
"(",
"'plugins/boots... | Enable Bootstrap DateTimePicker on input
@param array $options
@return $this | [
"Enable",
"Bootstrap",
"DateTimePicker",
"on",
"input"
] | b031af5643b6dc641539847784875137c8979cdd | https://github.com/devp-eu/tmcms-core/blob/b031af5643b6dc641539847784875137c8979cdd/src/HTML/Element.php#L866-L888 |
187,198 | devp-eu/tmcms-core | src/HTML/Element.php | Element.enableMiniColors | public function enableMiniColors($options = [])
{
if (!$this->isEnabledMiniColors()) {
PageTail::getInstance()
->addCssUrl('plugins/minicolors/jquery.minicolors.css')
->addJsUrl('plugins/minicolors/jquery.minicolors.min.js');
}
// Default format i... | php | public function enableMiniColors($options = [])
{
if (!$this->isEnabledMiniColors()) {
PageTail::getInstance()
->addCssUrl('plugins/minicolors/jquery.minicolors.css')
->addJsUrl('plugins/minicolors/jquery.minicolors.min.js');
}
// Default format i... | [
"public",
"function",
"enableMiniColors",
"(",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isEnabledMiniColors",
"(",
")",
")",
"{",
"PageTail",
"::",
"getInstance",
"(",
")",
"->",
"addCssUrl",
"(",
"'plugins/minicolors/jq... | Enable MiniColors on input
@param array $options
@return $this | [
"Enable",
"MiniColors",
"on",
"input"
] | b031af5643b6dc641539847784875137c8979cdd | https://github.com/devp-eu/tmcms-core/blob/b031af5643b6dc641539847784875137c8979cdd/src/HTML/Element.php#L906-L926 |
187,199 | devp-eu/tmcms-core | src/HTML/Element.php | Element.validateRequired | public function validateRequired()
{
$this->validator_attributes[] = 'data-parsley-required';
$this->field_required = true;
$this->validator_checks['required'] = true;
return $this;
} | php | public function validateRequired()
{
$this->validator_attributes[] = 'data-parsley-required';
$this->field_required = true;
$this->validator_checks['required'] = true;
return $this;
} | [
"public",
"function",
"validateRequired",
"(",
")",
"{",
"$",
"this",
"->",
"validator_attributes",
"[",
"]",
"=",
"'data-parsley-required'",
";",
"$",
"this",
"->",
"field_required",
"=",
"true",
";",
"$",
"this",
"->",
"validator_checks",
"[",
"'required'",
... | Validate that a required field has been filled with a non blank value
Set field as required to fill
@return $this | [
"Validate",
"that",
"a",
"required",
"field",
"has",
"been",
"filled",
"with",
"a",
"non",
"blank",
"value",
"Set",
"field",
"as",
"required",
"to",
"fill"
] | b031af5643b6dc641539847784875137c8979cdd | https://github.com/devp-eu/tmcms-core/blob/b031af5643b6dc641539847784875137c8979cdd/src/HTML/Element.php#L963-L972 |
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.