repository_name stringlengths 5 67 | func_path_in_repository stringlengths 4 234 | func_name stringlengths 0 314 | whole_func_string stringlengths 52 3.87M | language stringclasses 6
values | func_code_string stringlengths 52 3.87M | func_code_tokens listlengths 15 672k | func_documentation_string stringlengths 1 47.2k | func_documentation_tokens listlengths 1 3.92k | split_name stringclasses 1
value | func_code_url stringlengths 85 339 |
|---|---|---|---|---|---|---|---|---|---|---|
terion-name/package-installer | src/Terion/PackageInstaller/PackageInstallCommand.php | PackageInstallCommand.requirePackage | protected function requirePackage(Package $package)
{
$version = $this->chooseVersion($package);
passthru(sprintf(
'composer require %s:%s',
$package->getName(),
$version
));
$this->comment('Package ' . $package->getName() . ' installed');
... | php | protected function requirePackage(Package $package)
{
$version = $this->chooseVersion($package);
passthru(sprintf(
'composer require %s:%s',
$package->getName(),
$version
));
$this->comment('Package ' . $package->getName() . ' installed');
... | [
"protected",
"function",
"requirePackage",
"(",
"Package",
"$",
"package",
")",
"{",
"$",
"version",
"=",
"$",
"this",
"->",
"chooseVersion",
"(",
"$",
"package",
")",
";",
"passthru",
"(",
"sprintf",
"(",
"'composer require %s:%s'",
",",
"$",
"package",
"->... | Installs package.
@param Package $package | [
"Installs",
"package",
"."
] | train | https://github.com/terion-name/package-installer/blob/a1f53085b0b5dbbcc308476f61188103051bd201/src/Terion/PackageInstaller/PackageInstallCommand.php#L109-L127 |
terion-name/package-installer | src/Terion/PackageInstaller/PackageInstallCommand.php | PackageInstallCommand.chooseVersion | protected function chooseVersion(Package $package)
{
$versions = $package->getVersions();
if (count($versions) === 1) {
$v = current($versions)->getVersion();
$this->comment('Version to install: ' . $v);
return $v;
}
$default = 1;
$latest... | php | protected function chooseVersion(Package $package)
{
$versions = $package->getVersions();
if (count($versions) === 1) {
$v = current($versions)->getVersion();
$this->comment('Version to install: ' . $v);
return $v;
}
$default = 1;
$latest... | [
"protected",
"function",
"chooseVersion",
"(",
"Package",
"$",
"package",
")",
"{",
"$",
"versions",
"=",
"$",
"package",
"->",
"getVersions",
"(",
")",
";",
"if",
"(",
"count",
"(",
"$",
"versions",
")",
"===",
"1",
")",
"{",
"$",
"v",
"=",
"current... | Ask for package version to install (select from list).
@param Package $package
@return mixed | [
"Ask",
"for",
"package",
"version",
"to",
"install",
"(",
"select",
"from",
"list",
")",
"."
] | train | https://github.com/terion-name/package-installer/blob/a1f53085b0b5dbbcc308476f61188103051bd201/src/Terion/PackageInstaller/PackageInstallCommand.php#L136-L177 |
terion-name/package-installer | src/Terion/PackageInstaller/PackageInstallCommand.php | PackageInstallCommand.searchPackage | protected function searchPackage($packageName)
{
$this->comment('Searching for package...');
$packages = $this->packagist->search($packageName);
$total = count($packages);
if ($total === 0) {
$this->comment('No packages found');
exit;
}
$this-... | php | protected function searchPackage($packageName)
{
$this->comment('Searching for package...');
$packages = $this->packagist->search($packageName);
$total = count($packages);
if ($total === 0) {
$this->comment('No packages found');
exit;
}
$this-... | [
"protected",
"function",
"searchPackage",
"(",
"$",
"packageName",
")",
"{",
"$",
"this",
"->",
"comment",
"(",
"'Searching for package...'",
")",
";",
"$",
"packages",
"=",
"$",
"this",
"->",
"packagist",
"->",
"search",
"(",
"$",
"packageName",
")",
";",
... | Perform search on packagist and ask package select.
@param $packageName | [
"Perform",
"search",
"on",
"packagist",
"and",
"ask",
"package",
"select",
"."
] | train | https://github.com/terion-name/package-installer/blob/a1f53085b0b5dbbcc308476f61188103051bd201/src/Terion/PackageInstaller/PackageInstallCommand.php#L210-L232 |
terion-name/package-installer | src/Terion/PackageInstaller/PackageInstallCommand.php | PackageInstallCommand.choosePackage | protected function choosePackage($packages)
{
$choose = $this->ask('Select package by number [1]:', '1');
if (!is_numeric($choose) or !isset($packages[$choose - 1])) {
$this->error('Incorrect value given!');
$this->choosePackage($packages);
} else {
$index... | php | protected function choosePackage($packages)
{
$choose = $this->ask('Select package by number [1]:', '1');
if (!is_numeric($choose) or !isset($packages[$choose - 1])) {
$this->error('Incorrect value given!');
$this->choosePackage($packages);
} else {
$index... | [
"protected",
"function",
"choosePackage",
"(",
"$",
"packages",
")",
"{",
"$",
"choose",
"=",
"$",
"this",
"->",
"ask",
"(",
"'Select package by number [1]:'",
",",
"'1'",
")",
";",
"if",
"(",
"!",
"is_numeric",
"(",
"$",
"choose",
")",
"or",
"!",
"isset... | Ask package select from a list.
@param $packages | [
"Ask",
"package",
"select",
"from",
"a",
"list",
"."
] | train | https://github.com/terion-name/package-installer/blob/a1f53085b0b5dbbcc308476f61188103051bd201/src/Terion/PackageInstaller/PackageInstallCommand.php#L239-L251 |
SignpostMarv/daft-object | src/JsonTypeUtilities.php | JsonTypeUtilities.ThrowIfNotDaftJson | public static function ThrowIfNotDaftJson(string $class) : string
{
if ( ! is_a($class, DaftJson::class, self::IS_A_STRINGS)) {
throw Exceptions\Factory::DaftObjectNotDaftJsonBadMethodCallException($class);
}
return $class;
} | php | public static function ThrowIfNotDaftJson(string $class) : string
{
if ( ! is_a($class, DaftJson::class, self::IS_A_STRINGS)) {
throw Exceptions\Factory::DaftObjectNotDaftJsonBadMethodCallException($class);
}
return $class;
} | [
"public",
"static",
"function",
"ThrowIfNotDaftJson",
"(",
"string",
"$",
"class",
")",
":",
"string",
"{",
"if",
"(",
"!",
"is_a",
"(",
"$",
"class",
",",
"DaftJson",
"::",
"class",
",",
"self",
"::",
"IS_A_STRINGS",
")",
")",
"{",
"throw",
"Exceptions"... | @psalm-param class-string<DaftObject> $class
@psalm-return class-string<DaftJson> | [
"@psalm",
"-",
"param",
"class",
"-",
"string<DaftObject",
">",
"$class"
] | train | https://github.com/SignpostMarv/daft-object/blob/514886592b64986cc637040045f098335e27c037/src/JsonTypeUtilities.php#L22-L29 |
SignpostMarv/daft-object | src/JsonTypeUtilities.php | JsonTypeUtilities.DaftJsonFromJsonType | final public static function DaftJsonFromJsonType(
string $jsonType,
array $propVal,
bool $writeAll
) {
return JsonTypeUtilities::ArrayToJsonType($jsonType, $propVal, $writeAll);
} | php | final public static function DaftJsonFromJsonType(
string $jsonType,
array $propVal,
bool $writeAll
) {
return JsonTypeUtilities::ArrayToJsonType($jsonType, $propVal, $writeAll);
} | [
"final",
"public",
"static",
"function",
"DaftJsonFromJsonType",
"(",
"string",
"$",
"jsonType",
",",
"array",
"$",
"propVal",
",",
"bool",
"$",
"writeAll",
")",
"{",
"return",
"JsonTypeUtilities",
"::",
"ArrayToJsonType",
"(",
"$",
"jsonType",
",",
"$",
"prop... | @template T as DaftJson
@psalm-param class-string<T> $jsonType
@param array<int|string, scalar|(scalar|array|object|null)[]|object|null> $propVal
@return array<int, DaftJson>|DaftJson
@psalm-return array<int, T>|T | [
"@template",
"T",
"as",
"DaftJson"
] | train | https://github.com/SignpostMarv/daft-object/blob/514886592b64986cc637040045f098335e27c037/src/JsonTypeUtilities.php#L42-L48 |
SignpostMarv/daft-object | src/JsonTypeUtilities.php | JsonTypeUtilities.ThrowIfJsonDefNotValid | public static function ThrowIfJsonDefNotValid(string $type, array $array) : array
{
$jsonProps = $type::DaftObjectJsonPropertyNames();
$array = JsonTypeUtilities::FilterThrowIfJsonDefNotValid($type, $jsonProps, $array);
$jsonDef = $type::DaftObjectJsonProperties();
$keys = array_key... | php | public static function ThrowIfJsonDefNotValid(string $type, array $array) : array
{
$jsonProps = $type::DaftObjectJsonPropertyNames();
$array = JsonTypeUtilities::FilterThrowIfJsonDefNotValid($type, $jsonProps, $array);
$jsonDef = $type::DaftObjectJsonProperties();
$keys = array_key... | [
"public",
"static",
"function",
"ThrowIfJsonDefNotValid",
"(",
"string",
"$",
"type",
",",
"array",
"$",
"array",
")",
":",
"array",
"{",
"$",
"jsonProps",
"=",
"$",
"type",
"::",
"DaftObjectJsonPropertyNames",
"(",
")",
";",
"$",
"array",
"=",
"JsonTypeUtil... | @param array<int|string, scalar|(scalar|array|object|null)[]|object|null> $array
@psalm-param class-string<DaftJson> $type
@return array<int|string, scalar|(scalar|array|object|null)[]|object|null> | [
"@param",
"array<int|string",
"scalar|",
"(",
"scalar|array|object|null",
")",
"[]",
"|object|null",
">",
"$array"
] | train | https://github.com/SignpostMarv/daft-object/blob/514886592b64986cc637040045f098335e27c037/src/JsonTypeUtilities.php#L57-L74 |
SignpostMarv/daft-object | src/JsonTypeUtilities.php | JsonTypeUtilities.ThrowIfNotJsonType | public static function ThrowIfNotJsonType(string $jsonType) : string
{
if ( ! is_a($jsonType, DaftJson::class, DefinitionAssistant::IS_A_STRINGS)) {
throw Exceptions\Factory::ClassDoesNotImplementClassException($jsonType, DaftJson::class);
}
return $jsonType;
} | php | public static function ThrowIfNotJsonType(string $jsonType) : string
{
if ( ! is_a($jsonType, DaftJson::class, DefinitionAssistant::IS_A_STRINGS)) {
throw Exceptions\Factory::ClassDoesNotImplementClassException($jsonType, DaftJson::class);
}
return $jsonType;
} | [
"public",
"static",
"function",
"ThrowIfNotJsonType",
"(",
"string",
"$",
"jsonType",
")",
":",
"string",
"{",
"if",
"(",
"!",
"is_a",
"(",
"$",
"jsonType",
",",
"DaftJson",
"::",
"class",
",",
"DefinitionAssistant",
"::",
"IS_A_STRINGS",
")",
")",
"{",
"t... | @template T as DaftJson
@psalm-param class-string<DaftObject> $jsonType
@psalm-return class-string<T> | [
"@template",
"T",
"as",
"DaftJson"
] | train | https://github.com/SignpostMarv/daft-object/blob/514886592b64986cc637040045f098335e27c037/src/JsonTypeUtilities.php#L83-L90 |
SignpostMarv/daft-object | src/JsonTypeUtilities.php | JsonTypeUtilities.DaftObjectFromJsonTypeArray | public static function DaftObjectFromJsonTypeArray(
string $jsonType,
string $prop,
array $propVal,
bool $writeAll
) : array {
return array_map(
/**
* @param scalar|(scalar|(scalar|array|object|null)[]|object|null)[]|object|null $val
*
... | php | public static function DaftObjectFromJsonTypeArray(
string $jsonType,
string $prop,
array $propVal,
bool $writeAll
) : array {
return array_map(
/**
* @param scalar|(scalar|(scalar|array|object|null)[]|object|null)[]|object|null $val
*
... | [
"public",
"static",
"function",
"DaftObjectFromJsonTypeArray",
"(",
"string",
"$",
"jsonType",
",",
"string",
"$",
"prop",
",",
"array",
"$",
"propVal",
",",
"bool",
"$",
"writeAll",
")",
":",
"array",
"{",
"return",
"array_map",
"(",
"/**\n * @param ... | @template T as DaftJson
@psalm-param class-string<T> $jsonType
@param array<int|string, scalar|(scalar|(scalar|array|object|null)[]|object|null)[]|object|null> $propVal
@return array<int, DaftJson>
@psalm-return array<int, T> | [
"@template",
"T",
"as",
"DaftJson"
] | train | https://github.com/SignpostMarv/daft-object/blob/514886592b64986cc637040045f098335e27c037/src/JsonTypeUtilities.php#L103-L126 |
SignpostMarv/daft-object | src/JsonTypeUtilities.php | JsonTypeUtilities.DaftJsonClosure | public static function DaftJsonClosure(
array $array,
bool $writeAll,
string $class_name
) : Closure {
$jsonDef = $class_name::DaftObjectJsonProperties();
return
/**
* @return scalar|array|object|null
*/
function (string $prop)... | php | public static function DaftJsonClosure(
array $array,
bool $writeAll,
string $class_name
) : Closure {
$jsonDef = $class_name::DaftObjectJsonProperties();
return
/**
* @return scalar|array|object|null
*/
function (string $prop)... | [
"public",
"static",
"function",
"DaftJsonClosure",
"(",
"array",
"$",
"array",
",",
"bool",
"$",
"writeAll",
",",
"string",
"$",
"class_name",
")",
":",
"Closure",
"{",
"$",
"jsonDef",
"=",
"$",
"class_name",
"::",
"DaftObjectJsonProperties",
"(",
")",
";",
... | @param array<int|string, scalar|array|object|null> $array
@psalm-param class-string<DaftJson> $class_name | [
"@param",
"array<int|string",
"scalar|array|object|null",
">",
"$array"
] | train | https://github.com/SignpostMarv/daft-object/blob/514886592b64986cc637040045f098335e27c037/src/JsonTypeUtilities.php#L133-L184 |
SignpostMarv/daft-object | src/JsonTypeUtilities.php | JsonTypeUtilities.MakeMapperThrowIfJsonDefNotValid | private static function MakeMapperThrowIfJsonDefNotValid(
string $class,
array $jsonDef,
array $array
) : Closure {
$mapper =
/**
* @return scalar|array|object|null
*/
function (string $prop) use ($jsonDef, $array, $class) {
... | php | private static function MakeMapperThrowIfJsonDefNotValid(
string $class,
array $jsonDef,
array $array
) : Closure {
$mapper =
/**
* @return scalar|array|object|null
*/
function (string $prop) use ($jsonDef, $array, $class) {
... | [
"private",
"static",
"function",
"MakeMapperThrowIfJsonDefNotValid",
"(",
"string",
"$",
"class",
",",
"array",
"$",
"jsonDef",
",",
"array",
"$",
"array",
")",
":",
"Closure",
"{",
"$",
"mapper",
"=",
"/**\n * @return scalar|array|object|null\n */... | @param array<string|int, string> $jsonDef
@param (scalar|array|object|null)[] $array
@psalm-param class-string $class | [
"@param",
"array<string|int",
"string",
">",
"$jsonDef",
"@param",
"(",
"scalar|array|object|null",
")",
"[]",
"$array"
] | train | https://github.com/SignpostMarv/daft-object/blob/514886592b64986cc637040045f098335e27c037/src/JsonTypeUtilities.php#L192-L214 |
SignpostMarv/daft-object | src/JsonTypeUtilities.php | JsonTypeUtilities.FilterThrowIfJsonDefNotValid | private static function FilterThrowIfJsonDefNotValid(
string $class,
array $jsonProps,
array $array
) : array {
$filter = function (string $prop) use ($jsonProps, $array, $class) : bool {
if ( ! in_array($prop, $jsonProps, DefinitionAssistant::IN_ARRAY_STRICT_MODE)) {
... | php | private static function FilterThrowIfJsonDefNotValid(
string $class,
array $jsonProps,
array $array
) : array {
$filter = function (string $prop) use ($jsonProps, $array, $class) : bool {
if ( ! in_array($prop, $jsonProps, DefinitionAssistant::IN_ARRAY_STRICT_MODE)) {
... | [
"private",
"static",
"function",
"FilterThrowIfJsonDefNotValid",
"(",
"string",
"$",
"class",
",",
"array",
"$",
"jsonProps",
",",
"array",
"$",
"array",
")",
":",
"array",
"{",
"$",
"filter",
"=",
"function",
"(",
"string",
"$",
"prop",
")",
"use",
"(",
... | @psalm-param class-string<DaftJson> $class
@param (scalar|array|object|null)[] $array
@return (scalar|array|object|null)[] | [
"@psalm",
"-",
"param",
"class",
"-",
"string<DaftJson",
">",
"$class"
] | train | https://github.com/SignpostMarv/daft-object/blob/514886592b64986cc637040045f098335e27c037/src/JsonTypeUtilities.php#L223-L237 |
SignpostMarv/daft-object | src/JsonTypeUtilities.php | JsonTypeUtilities.ArrayToJsonType | private static function ArrayToJsonType(string $type, array $value, bool $writeAll) : DaftJson
{
return $type::DaftObjectFromJsonArray($value, $writeAll);
} | php | private static function ArrayToJsonType(string $type, array $value, bool $writeAll) : DaftJson
{
return $type::DaftObjectFromJsonArray($value, $writeAll);
} | [
"private",
"static",
"function",
"ArrayToJsonType",
"(",
"string",
"$",
"type",
",",
"array",
"$",
"value",
",",
"bool",
"$",
"writeAll",
")",
":",
"DaftJson",
"{",
"return",
"$",
"type",
"::",
"DaftObjectFromJsonArray",
"(",
"$",
"value",
",",
"$",
"write... | @template T as DaftJson
@psalm-param class-string<T> $type
@param array<int|string, scalar|(scalar|array|object|null)[]|object|null> $value
@psalm-return T | [
"@template",
"T",
"as",
"DaftJson"
] | train | https://github.com/SignpostMarv/daft-object/blob/514886592b64986cc637040045f098335e27c037/src/JsonTypeUtilities.php#L248-L251 |
slashworks/control-bundle | src/Slashworks/AppBundle/Command/SlashworksCommand.php | SlashworksCommand._printLogo | protected function _printLogo(&$output)
{
$output->writeLn('');
$output->writeLn('');
$output->writeLn('');
$output->writeLn('<sw> _ _ _ </sw>');
$output->writeLn('<sw> | | | | ... | php | protected function _printLogo(&$output)
{
$output->writeLn('');
$output->writeLn('');
$output->writeLn('');
$output->writeLn('<sw> _ _ _ </sw>');
$output->writeLn('<sw> | | | | ... | [
"protected",
"function",
"_printLogo",
"(",
"&",
"$",
"output",
")",
"{",
"$",
"output",
"->",
"writeLn",
"(",
"''",
")",
";",
"$",
"output",
"->",
"writeLn",
"(",
"''",
")",
";",
"$",
"output",
"->",
"writeLn",
"(",
"''",
")",
";",
"$",
"output",
... | Slashwors Logo in colored ASCII-Art :)
@param $output | [
"Slashwors",
"Logo",
"in",
"colored",
"ASCII",
"-",
"Art",
":",
")"
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Command/SlashworksCommand.php#L62-L82 |
slashworks/control-bundle | src/Slashworks/AppBundle/Command/RemoteAppCommand.php | RemoteAppCommand.execute | protected function execute(InputInterface $input, OutputInterface $output)
{
$aData = array();
// set colors and formats
$oErrStyle = new OutputFormatterStyle('red', null, array('bold'));
$oOkStyle = new OutputFormatterStyle('green', null, array('bold'));
... | php | protected function execute(InputInterface $input, OutputInterface $output)
{
$aData = array();
// set colors and formats
$oErrStyle = new OutputFormatterStyle('red', null, array('bold'));
$oOkStyle = new OutputFormatterStyle('green', null, array('bold'));
... | [
"protected",
"function",
"execute",
"(",
"InputInterface",
"$",
"input",
",",
"OutputInterface",
"$",
"output",
")",
"{",
"$",
"aData",
"=",
"array",
"(",
")",
";",
"// set colors and formats",
"$",
"oErrStyle",
"=",
"new",
"OutputFormatterStyle",
"(",
"'red'",
... | execute api command
@param \Symfony\Component\Console\Input\InputInterface $input
@param \Symfony\Component\Console\Output\OutputInterface $output
@return void | [
"execute",
"api",
"command"
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Command/RemoteAppCommand.php#L64-L104 |
fsi-open/data-indexer | lib/FSi/Component/DataIndexer/DoctrineDataIndexer.php | DoctrineDataIndexer.getIndex | public function getIndex($data)
{
$this->validateData($data);
return $this->joinIndexParts($this->getIndexParts($data));
} | php | public function getIndex($data)
{
$this->validateData($data);
return $this->joinIndexParts($this->getIndexParts($data));
} | [
"public",
"function",
"getIndex",
"(",
"$",
"data",
")",
"{",
"$",
"this",
"->",
"validateData",
"(",
"$",
"data",
")",
";",
"return",
"$",
"this",
"->",
"joinIndexParts",
"(",
"$",
"this",
"->",
"getIndexParts",
"(",
"$",
"data",
")",
")",
";",
"}"
... | {@inheritdoc} | [
"{"
] | train | https://github.com/fsi-open/data-indexer/blob/cec877f46e04d650d9f01e5fcc4019d4f73fdc1d/lib/FSi/Component/DataIndexer/DoctrineDataIndexer.php#L51-L56 |
fsi-open/data-indexer | lib/FSi/Component/DataIndexer/DoctrineDataIndexer.php | DoctrineDataIndexer.getDataSlice | public function getDataSlice($indexes)
{
$this->validateIndexes($indexes);
return $this->getRepository()
->findBy($this->buildMultipleSearchCriteria($indexes));
} | php | public function getDataSlice($indexes)
{
$this->validateIndexes($indexes);
return $this->getRepository()
->findBy($this->buildMultipleSearchCriteria($indexes));
} | [
"public",
"function",
"getDataSlice",
"(",
"$",
"indexes",
")",
"{",
"$",
"this",
"->",
"validateIndexes",
"(",
"$",
"indexes",
")",
";",
"return",
"$",
"this",
"->",
"getRepository",
"(",
")",
"->",
"findBy",
"(",
"$",
"this",
"->",
"buildMultipleSearchCr... | {@inheritdoc} | [
"{"
] | train | https://github.com/fsi-open/data-indexer/blob/cec877f46e04d650d9f01e5fcc4019d4f73fdc1d/lib/FSi/Component/DataIndexer/DoctrineDataIndexer.php#L69-L75 |
fsi-open/data-indexer | lib/FSi/Component/DataIndexer/DoctrineDataIndexer.php | DoctrineDataIndexer.validateData | public function validateData($data)
{
if (!is_object($data)) {
throw new InvalidArgumentException("DoctrineDataIndexer can index only objects.");
}
if (!is_a($data, $this->class)) {
throw new InvalidArgumentException(sprintf(
'DoctrineDataIndexer expe... | php | public function validateData($data)
{
if (!is_object($data)) {
throw new InvalidArgumentException("DoctrineDataIndexer can index only objects.");
}
if (!is_a($data, $this->class)) {
throw new InvalidArgumentException(sprintf(
'DoctrineDataIndexer expe... | [
"public",
"function",
"validateData",
"(",
"$",
"data",
")",
"{",
"if",
"(",
"!",
"is_object",
"(",
"$",
"data",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"\"DoctrineDataIndexer can index only objects.\"",
")",
";",
"}",
"if",
"(",
"!",
... | {@inheritdoc} | [
"{"
] | train | https://github.com/fsi-open/data-indexer/blob/cec877f46e04d650d9f01e5fcc4019d4f73fdc1d/lib/FSi/Component/DataIndexer/DoctrineDataIndexer.php#L80-L93 |
Ocramius/OcraDiCompiler | src/OcraDiCompiler/Generator/DiInstantiatorCompiler.php | DiInstantiatorCompiler.compile | public function compile()
{
$indent = ' ';
$getters = array();
$instances = $this->dumper->getAllInjectedDefinitions();
/* @var $instance GeneratorInstance */
foreach ($instances as $name => $instance) {
$constructor = $instance->getConstructor();
... | php | public function compile()
{
$indent = ' ';
$getters = array();
$instances = $this->dumper->getAllInjectedDefinitions();
/* @var $instance GeneratorInstance */
foreach ($instances as $name => $instance) {
$constructor = $instance->getConstructor();
... | [
"public",
"function",
"compile",
"(",
")",
"{",
"$",
"indent",
"=",
"' '",
";",
"$",
"getters",
"=",
"array",
"(",
")",
";",
"$",
"instances",
"=",
"$",
"this",
"->",
"dumper",
"->",
"getAllInjectedDefinitions",
"(",
")",
";",
"/* @var $instance Generat... | Compiles a Di Definitions to a in a service locator, that extends Zend\Di\Di and writes it to disk
It uses Zend\Code\Generator\FileGenerator
@return FileGenerator
@throws InvalidArgumentException | [
"Compiles",
"a",
"Di",
"Definitions",
"to",
"a",
"in",
"a",
"service",
"locator",
"that",
"extends",
"Zend",
"\\",
"Di",
"\\",
"Di",
"and",
"writes",
"it",
"to",
"disk"
] | train | https://github.com/Ocramius/OcraDiCompiler/blob/667f4b24771f27fb9c8d6c38ffaf72d9cd55ca4a/src/OcraDiCompiler/Generator/DiInstantiatorCompiler.php#L115-L223 |
Ocramius/OcraDiCompiler | src/OcraDiCompiler/Generator/DiInstantiatorCompiler.php | DiInstantiatorCompiler.reduceAlias | protected function reduceAlias($name)
{
$aliases = $this->dumper->getAliases();
if (isset($aliases[$name])) {
return $this->reduceAlias($aliases[$name]);
}
return $name;
} | php | protected function reduceAlias($name)
{
$aliases = $this->dumper->getAliases();
if (isset($aliases[$name])) {
return $this->reduceAlias($aliases[$name]);
}
return $name;
} | [
"protected",
"function",
"reduceAlias",
"(",
"$",
"name",
")",
"{",
"$",
"aliases",
"=",
"$",
"this",
"->",
"dumper",
"->",
"getAliases",
"(",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"aliases",
"[",
"$",
"name",
"]",
")",
")",
"{",
"return",
"$",
... | Reduce aliases
@param string $name
@return string | [
"Reduce",
"aliases"
] | train | https://github.com/Ocramius/OcraDiCompiler/blob/667f4b24771f27fb9c8d6c38ffaf72d9cd55ca4a/src/OcraDiCompiler/Generator/DiInstantiatorCompiler.php#L231-L240 |
Ocramius/OcraDiCompiler | src/OcraDiCompiler/Generator/DiInstantiatorCompiler.php | DiInstantiatorCompiler.buildParams | protected function buildParams(array $params)
{
$normalizedParameters = array();
foreach ($params as $parameter) {
if ($parameter instanceof GeneratorInstance) {
/* @var $parameter GeneratorInstance */
$normalizedParameters[] = sprintf('$di->get(%s)', '\'... | php | protected function buildParams(array $params)
{
$normalizedParameters = array();
foreach ($params as $parameter) {
if ($parameter instanceof GeneratorInstance) {
/* @var $parameter GeneratorInstance */
$normalizedParameters[] = sprintf('$di->get(%s)', '\'... | [
"protected",
"function",
"buildParams",
"(",
"array",
"$",
"params",
")",
"{",
"$",
"normalizedParameters",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"params",
"as",
"$",
"parameter",
")",
"{",
"if",
"(",
"$",
"parameter",
"instanceof",
"GeneratorI... | Generates parameter strings to be used as injections, replacing reference parameters with their respective
getters
@param array $params
@return array | [
"Generates",
"parameter",
"strings",
"to",
"be",
"used",
"as",
"injections",
"replacing",
"reference",
"parameters",
"with",
"their",
"respective",
"getters"
] | train | https://github.com/Ocramius/OcraDiCompiler/blob/667f4b24771f27fb9c8d6c38ffaf72d9cd55ca4a/src/OcraDiCompiler/Generator/DiInstantiatorCompiler.php#L249-L263 |
anime-db/app-bundle | src/Controller/CommandController.php | CommandController.execAction | public function execAction(Request $request)
{
ignore_user_abort(true);
set_time_limit(0);
$this->get('anime_db.command')->execute($request->get('command'), 0);
return new Response();
} | php | public function execAction(Request $request)
{
ignore_user_abort(true);
set_time_limit(0);
$this->get('anime_db.command')->execute($request->get('command'), 0);
return new Response();
} | [
"public",
"function",
"execAction",
"(",
"Request",
"$",
"request",
")",
"{",
"ignore_user_abort",
"(",
"true",
")",
";",
"set_time_limit",
"(",
"0",
")",
";",
"$",
"this",
"->",
"get",
"(",
"'anime_db.command'",
")",
"->",
"execute",
"(",
"$",
"request",
... | Execute command in background.
@param Request $request
@return Response | [
"Execute",
"command",
"in",
"background",
"."
] | train | https://github.com/anime-db/app-bundle/blob/ca3b342081719d41ba018792a75970cbb1f1fe22/src/Controller/CommandController.php#L24-L32 |
CakeCMS/Core | src/ORM/Table.php | Table.beforeMarshal | public function beforeMarshal(Event $event, \ArrayObject $data, \ArrayObject $options)
{
$this->_prepareParamsData($data);
} | php | public function beforeMarshal(Event $event, \ArrayObject $data, \ArrayObject $options)
{
$this->_prepareParamsData($data);
} | [
"public",
"function",
"beforeMarshal",
"(",
"Event",
"$",
"event",
",",
"\\",
"ArrayObject",
"$",
"data",
",",
"\\",
"ArrayObject",
"$",
"options",
")",
"{",
"$",
"this",
"->",
"_prepareParamsData",
"(",
"$",
"data",
")",
";",
"}"
] | Callback before request data is converted into entities.
@param Event $event
@param \ArrayObject $data
@param \ArrayObject $options
@return void
@SuppressWarnings("unused") | [
"Callback",
"before",
"request",
"data",
"is",
"converted",
"into",
"entities",
"."
] | train | https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/ORM/Table.php#L40-L43 |
CakeCMS/Core | src/ORM/Table.php | Table._prepareParamsData | protected function _prepareParamsData(\ArrayObject $data)
{
if (isset($data['params'])) {
$params = new JSON((array) $data['params']);
$data->offsetSet('params', $params);
}
} | php | protected function _prepareParamsData(\ArrayObject $data)
{
if (isset($data['params'])) {
$params = new JSON((array) $data['params']);
$data->offsetSet('params', $params);
}
} | [
"protected",
"function",
"_prepareParamsData",
"(",
"\\",
"ArrayObject",
"$",
"data",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"data",
"[",
"'params'",
"]",
")",
")",
"{",
"$",
"params",
"=",
"new",
"JSON",
"(",
"(",
"array",
")",
"$",
"data",
"[",
... | Prepare params data.
@param \ArrayObject $data
@return void | [
"Prepare",
"params",
"data",
"."
] | train | https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/ORM/Table.php#L51-L57 |
thecodingmachine/service-provider-bridge-bundle | src/InteropServiceProviderBridgeBundle.php | InteropServiceProviderBridgeBundle.boot | public function boot()
{
$registryServiceName = 'service_provider_registry_'.$this->id;
$this->container->set($registryServiceName, $this->getRegistry($this->container));
} | php | public function boot()
{
$registryServiceName = 'service_provider_registry_'.$this->id;
$this->container->set($registryServiceName, $this->getRegistry($this->container));
} | [
"public",
"function",
"boot",
"(",
")",
"{",
"$",
"registryServiceName",
"=",
"'service_provider_registry_'",
".",
"$",
"this",
"->",
"id",
";",
"$",
"this",
"->",
"container",
"->",
"set",
"(",
"$",
"registryServiceName",
",",
"$",
"this",
"->",
"getRegistr... | At boot time, let's fill the container with the registry. | [
"At",
"boot",
"time",
"let",
"s",
"fill",
"the",
"container",
"with",
"the",
"registry",
"."
] | train | https://github.com/thecodingmachine/service-provider-bridge-bundle/blob/7ac2d64c6aa7f093ad36fb1f3a4b86b397777c99/src/InteropServiceProviderBridgeBundle.php#L39-L43 |
PeekAndPoke/psi | src/Operation/Terminal/CollectToMapOperation.php | CollectToMapOperation.apply | public function apply(\Iterator $set)
{
$result = [];
$keyMapper = $this->keyMapper;
$valueMapper = $this->valueMapper;
foreach ($set as $key => $item) {
$result[$keyMapper($item, $key)] = $valueMapper($item, $key);
}
return $result;
} | php | public function apply(\Iterator $set)
{
$result = [];
$keyMapper = $this->keyMapper;
$valueMapper = $this->valueMapper;
foreach ($set as $key => $item) {
$result[$keyMapper($item, $key)] = $valueMapper($item, $key);
}
return $result;
} | [
"public",
"function",
"apply",
"(",
"\\",
"Iterator",
"$",
"set",
")",
"{",
"$",
"result",
"=",
"[",
"]",
";",
"$",
"keyMapper",
"=",
"$",
"this",
"->",
"keyMapper",
";",
"$",
"valueMapper",
"=",
"$",
"this",
"->",
"valueMapper",
";",
"foreach",
"(",... | {@inheritdoc} | [
"{"
] | train | https://github.com/PeekAndPoke/psi/blob/cfd45d995d3a2c2ea6ba5b1ce7b5fcc71179456f/src/Operation/Terminal/CollectToMapOperation.php#L40-L52 |
gnugat/marshaller | src/Gnugat/Marshaller/Marshaller.php | Marshaller.add | public function add(MarshallerStrategy $strategy, $priority = 0)
{
$this->prioritizedStrategies[$priority][] = $strategy;
$this->isSorted = false;
} | php | public function add(MarshallerStrategy $strategy, $priority = 0)
{
$this->prioritizedStrategies[$priority][] = $strategy;
$this->isSorted = false;
} | [
"public",
"function",
"add",
"(",
"MarshallerStrategy",
"$",
"strategy",
",",
"$",
"priority",
"=",
"0",
")",
"{",
"$",
"this",
"->",
"prioritizedStrategies",
"[",
"$",
"priority",
"]",
"[",
"]",
"=",
"$",
"strategy",
";",
"$",
"this",
"->",
"isSorted",
... | @param MarshallerStrategy $strategy
@param int $priority
@api | [
"@param",
"MarshallerStrategy",
"$strategy",
"@param",
"int",
"$priority"
] | train | https://github.com/gnugat/marshaller/blob/1238cc167b200ce9be5ae9e22890860c15e7f728/src/Gnugat/Marshaller/Marshaller.php#L37-L41 |
gnugat/marshaller | src/Gnugat/Marshaller/Marshaller.php | Marshaller.marshal | public function marshal($toMarshal, $category = null)
{
if (!$this->isSorted) {
$this->sortStrategies();
}
foreach ($this->prioritizedStrategies as $priority => $strategies) {
foreach ($strategies as $strategy) {
if ($strategy->supports($toMarshal, $ca... | php | public function marshal($toMarshal, $category = null)
{
if (!$this->isSorted) {
$this->sortStrategies();
}
foreach ($this->prioritizedStrategies as $priority => $strategies) {
foreach ($strategies as $strategy) {
if ($strategy->supports($toMarshal, $ca... | [
"public",
"function",
"marshal",
"(",
"$",
"toMarshal",
",",
"$",
"category",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isSorted",
")",
"{",
"$",
"this",
"->",
"sortStrategies",
"(",
")",
";",
"}",
"foreach",
"(",
"$",
"this",
"->"... | @param mixed $toMarshal
@param string $category
@return mixed
@throws NotSupportedException If the given $toMarshal isn't supported by any registered strategies
@api | [
"@param",
"mixed",
"$toMarshal",
"@param",
"string",
"$category"
] | train | https://github.com/gnugat/marshaller/blob/1238cc167b200ce9be5ae9e22890860c15e7f728/src/Gnugat/Marshaller/Marshaller.php#L53-L67 |
gnugat/marshaller | src/Gnugat/Marshaller/Marshaller.php | Marshaller.marshalCollection | public function marshalCollection(array $collection, $category = null)
{
if (!$this->isSorted) {
$this->sortStrategies();
}
$marshalledCollection = array();
foreach ($collection as $toMarshal) {
$marshalledCollection[] = $this->marshal($toMarshal, $category);
... | php | public function marshalCollection(array $collection, $category = null)
{
if (!$this->isSorted) {
$this->sortStrategies();
}
$marshalledCollection = array();
foreach ($collection as $toMarshal) {
$marshalledCollection[] = $this->marshal($toMarshal, $category);
... | [
"public",
"function",
"marshalCollection",
"(",
"array",
"$",
"collection",
",",
"$",
"category",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isSorted",
")",
"{",
"$",
"this",
"->",
"sortStrategies",
"(",
")",
";",
"}",
"$",
"marshalledC... | @param array $collection
@param string $category
@return mixed
@throws NotSupportedException If the given $toMarshal isn't supported by any registered strategies
@api | [
"@param",
"array",
"$collection",
"@param",
"string",
"$category"
] | train | https://github.com/gnugat/marshaller/blob/1238cc167b200ce9be5ae9e22890860c15e7f728/src/Gnugat/Marshaller/Marshaller.php#L79-L90 |
datasift/php_webdriver | src/php/DataSift/WebDriver/WebDriverClient.php | WebDriverClient.newSession | public function newSession($browser = 'chrome', $additional_capabilities = array())
{
// merge the browser name into any additional requested capabilities
$desired_capabilities = array_merge(
$additional_capabilities,
array('browserName' => $browser)
);
// te... | php | public function newSession($browser = 'chrome', $additional_capabilities = array())
{
// merge the browser name into any additional requested capabilities
$desired_capabilities = array_merge(
$additional_capabilities,
array('browserName' => $browser)
);
// te... | [
"public",
"function",
"newSession",
"(",
"$",
"browser",
"=",
"'chrome'",
",",
"$",
"additional_capabilities",
"=",
"array",
"(",
")",
")",
"{",
"// merge the browser name into any additional requested capabilities",
"$",
"desired_capabilities",
"=",
"array_merge",
"(",
... | create a new session / launch a new browser to control
@param string $browser
the name of the browser to use
@param array $additional_capabilities
a list of the capabilities that are needed for this test
@return WebDriverSession
the new WebDriverSession to use to control the browser | [
"create",
"a",
"new",
"session",
"/",
"launch",
"a",
"new",
"browser",
"to",
"control"
] | train | https://github.com/datasift/php_webdriver/blob/efca991198616b53c8f40b59ad05306e2b10e7f0/src/php/DataSift/WebDriver/WebDriverClient.php#L60-L86 |
datasift/php_webdriver | src/php/DataSift/WebDriver/WebDriverClient.php | WebDriverClient.getSessions | public function getSessions()
{
// our return value
$sessions = array();
// get a raw list of the current sessions
$result = $this->curl('GET', '/sessions');
// convert the raw list into an array of WebDriverSession objects
foreach ($result['value'] as $session) {
... | php | public function getSessions()
{
// our return value
$sessions = array();
// get a raw list of the current sessions
$result = $this->curl('GET', '/sessions');
// convert the raw list into an array of WebDriverSession objects
foreach ($result['value'] as $session) {
... | [
"public",
"function",
"getSessions",
"(",
")",
"{",
"// our return value",
"$",
"sessions",
"=",
"array",
"(",
")",
";",
"// get a raw list of the current sessions",
"$",
"result",
"=",
"$",
"this",
"->",
"curl",
"(",
"'GET'",
",",
"'/sessions'",
")",
";",
"//... | get a list of active sessions
@return array(WebDriverSession)
a list of the sessions that webdriver currently knows about | [
"get",
"a",
"list",
"of",
"active",
"sessions"
] | train | https://github.com/datasift/php_webdriver/blob/efca991198616b53c8f40b59ad05306e2b10e7f0/src/php/DataSift/WebDriver/WebDriverClient.php#L94-L109 |
yuncms/framework | src/filesystem/adapters/OssAdapter.php | OssAdapter.write | public function write($path, $contents, Config $config)
{
$location = $this->applyPathPrefix($path);
$options = $this->getOptionsFromConfig($config);
return $this->ossClient->putObject($this->bucket, $location, $contents, $options);
} | php | public function write($path, $contents, Config $config)
{
$location = $this->applyPathPrefix($path);
$options = $this->getOptionsFromConfig($config);
return $this->ossClient->putObject($this->bucket, $location, $contents, $options);
} | [
"public",
"function",
"write",
"(",
"$",
"path",
",",
"$",
"contents",
",",
"Config",
"$",
"config",
")",
"{",
"$",
"location",
"=",
"$",
"this",
"->",
"applyPathPrefix",
"(",
"$",
"path",
")",
";",
"$",
"options",
"=",
"$",
"this",
"->",
"getOptions... | Write a new file.
@param string $path
@param string $contents
@param Config $config Config object
@return array|false false on failure file meta data on success | [
"Write",
"a",
"new",
"file",
"."
] | train | https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/filesystem/adapters/OssAdapter.php#L82-L87 |
yuncms/framework | src/filesystem/adapters/OssAdapter.php | OssAdapter.writeStream | public function writeStream($path, $resource, Config $config)
{
$location = $this->applyPathPrefix($path);
$result = $this->write($location, stream_get_contents($resource), $config);
if (is_resource($resource)) {
fclose($resource);
}
return $result;
} | php | public function writeStream($path, $resource, Config $config)
{
$location = $this->applyPathPrefix($path);
$result = $this->write($location, stream_get_contents($resource), $config);
if (is_resource($resource)) {
fclose($resource);
}
return $result;
} | [
"public",
"function",
"writeStream",
"(",
"$",
"path",
",",
"$",
"resource",
",",
"Config",
"$",
"config",
")",
"{",
"$",
"location",
"=",
"$",
"this",
"->",
"applyPathPrefix",
"(",
"$",
"path",
")",
";",
"$",
"result",
"=",
"$",
"this",
"->",
"write... | Write a new file using a stream.
@param string $path
@param resource $resource
@param Config $config Config object
@return array|false false on failure file meta data on success | [
"Write",
"a",
"new",
"file",
"using",
"a",
"stream",
"."
] | train | https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/filesystem/adapters/OssAdapter.php#L98-L106 |
yuncms/framework | src/filesystem/adapters/OssAdapter.php | OssAdapter.rename | public function rename($path, $newpath)
{
$location = $this->applyPathPrefix($path);
$destination = $this->applyPathPrefix($newpath);
$this->ossClient->copyObject($this->bucket, $location, $this->bucket, $destination);
$this->ossClient->deleteObject($this->bucket, $location);
... | php | public function rename($path, $newpath)
{
$location = $this->applyPathPrefix($path);
$destination = $this->applyPathPrefix($newpath);
$this->ossClient->copyObject($this->bucket, $location, $this->bucket, $destination);
$this->ossClient->deleteObject($this->bucket, $location);
... | [
"public",
"function",
"rename",
"(",
"$",
"path",
",",
"$",
"newpath",
")",
"{",
"$",
"location",
"=",
"$",
"this",
"->",
"applyPathPrefix",
"(",
"$",
"path",
")",
";",
"$",
"destination",
"=",
"$",
"this",
"->",
"applyPathPrefix",
"(",
"$",
"newpath",... | Rename a file.
@param string $path
@param string $newpath
@return bool
@throws \OSS\Core\OssException | [
"Rename",
"a",
"file",
"."
] | train | https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/filesystem/adapters/OssAdapter.php#L152-L159 |
yuncms/framework | src/filesystem/adapters/OssAdapter.php | OssAdapter.copy | public function copy($path, $newpath)
{
$location = $this->applyPathPrefix($path);
$destination = $this->applyPathPrefix($newpath);
$this->ossClient->copyObject($this->bucket, $location, $this->bucket, $destination);
return true;
} | php | public function copy($path, $newpath)
{
$location = $this->applyPathPrefix($path);
$destination = $this->applyPathPrefix($newpath);
$this->ossClient->copyObject($this->bucket, $location, $this->bucket, $destination);
return true;
} | [
"public",
"function",
"copy",
"(",
"$",
"path",
",",
"$",
"newpath",
")",
"{",
"$",
"location",
"=",
"$",
"this",
"->",
"applyPathPrefix",
"(",
"$",
"path",
")",
";",
"$",
"destination",
"=",
"$",
"this",
"->",
"applyPathPrefix",
"(",
"$",
"newpath",
... | Copy a file.
@param string $path
@param string $newpath
@return bool
@throws \OSS\Core\OssException | [
"Copy",
"a",
"file",
"."
] | train | https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/filesystem/adapters/OssAdapter.php#L170-L176 |
yuncms/framework | src/filesystem/adapters/OssAdapter.php | OssAdapter.delete | public function delete($path)
{
$location = $this->applyPathPrefix($path);
$this->ossClient->deleteObject($this->bucket, $location);
return true;
} | php | public function delete($path)
{
$location = $this->applyPathPrefix($path);
$this->ossClient->deleteObject($this->bucket, $location);
return true;
} | [
"public",
"function",
"delete",
"(",
"$",
"path",
")",
"{",
"$",
"location",
"=",
"$",
"this",
"->",
"applyPathPrefix",
"(",
"$",
"path",
")",
";",
"$",
"this",
"->",
"ossClient",
"->",
"deleteObject",
"(",
"$",
"this",
"->",
"bucket",
",",
"$",
"loc... | Delete a file.
@param string $path
@return bool | [
"Delete",
"a",
"file",
"."
] | train | https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/filesystem/adapters/OssAdapter.php#L185-L190 |
yuncms/framework | src/filesystem/adapters/OssAdapter.php | OssAdapter.deleteDir | public function deleteDir($dirName)
{
$location = $this->applyPathPrefix($dirName);
$lists = $this->listContents($location, true);
if (!$lists) {
return false;
}
$objectList = [];
foreach ($lists as $value) {
$objectList[] = $value['path'];
... | php | public function deleteDir($dirName)
{
$location = $this->applyPathPrefix($dirName);
$lists = $this->listContents($location, true);
if (!$lists) {
return false;
}
$objectList = [];
foreach ($lists as $value) {
$objectList[] = $value['path'];
... | [
"public",
"function",
"deleteDir",
"(",
"$",
"dirName",
")",
"{",
"$",
"location",
"=",
"$",
"this",
"->",
"applyPathPrefix",
"(",
"$",
"dirName",
")",
";",
"$",
"lists",
"=",
"$",
"this",
"->",
"listContents",
"(",
"$",
"location",
",",
"true",
")",
... | Delete a directory.
@param string $dirName
@return bool
@throws \OSS\Core\OssException | [
"Delete",
"a",
"directory",
"."
] | train | https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/filesystem/adapters/OssAdapter.php#L200-L213 |
yuncms/framework | src/filesystem/adapters/OssAdapter.php | OssAdapter.createDir | public function createDir($dirname, Config $config)
{
$this->ossClient->createObjectDir($this->bucket, $dirname);
return true;
} | php | public function createDir($dirname, Config $config)
{
$this->ossClient->createObjectDir($this->bucket, $dirname);
return true;
} | [
"public",
"function",
"createDir",
"(",
"$",
"dirname",
",",
"Config",
"$",
"config",
")",
"{",
"$",
"this",
"->",
"ossClient",
"->",
"createObjectDir",
"(",
"$",
"this",
"->",
"bucket",
",",
"$",
"dirname",
")",
";",
"return",
"true",
";",
"}"
] | Create a directory.
@param string $dirname directory name
@param Config $config
@return array|false | [
"Create",
"a",
"directory",
"."
] | train | https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/filesystem/adapters/OssAdapter.php#L223-L227 |
yuncms/framework | src/filesystem/adapters/OssAdapter.php | OssAdapter.setVisibility | public function setVisibility($path, $visibility)
{
$location = $this->applyPathPrefix($path);
$this->ossClient->putObjectAcl(
$this->bucket,
$location,
($visibility == 'public') ? 'public-read' : 'private'
);
return true;
} | php | public function setVisibility($path, $visibility)
{
$location = $this->applyPathPrefix($path);
$this->ossClient->putObjectAcl(
$this->bucket,
$location,
($visibility == 'public') ? 'public-read' : 'private'
);
return true;
} | [
"public",
"function",
"setVisibility",
"(",
"$",
"path",
",",
"$",
"visibility",
")",
"{",
"$",
"location",
"=",
"$",
"this",
"->",
"applyPathPrefix",
"(",
"$",
"path",
")",
";",
"$",
"this",
"->",
"ossClient",
"->",
"putObjectAcl",
"(",
"$",
"this",
"... | Set the visibility for a file.
@param string $path
@param string $visibility
@return array|false file meta data
Aliyun OSS ACL value: 'default', 'private', 'public-read', 'public-read-write'
@throws \OSS\Core\OssException | [
"Set",
"the",
"visibility",
"for",
"a",
"file",
"."
] | train | https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/filesystem/adapters/OssAdapter.php#L240-L249 |
yuncms/framework | src/filesystem/adapters/OssAdapter.php | OssAdapter.has | public function has($path)
{
$location = $this->applyPathPrefix($path);
return $this->ossClient->doesObjectExist($this->bucket, $location);
} | php | public function has($path)
{
$location = $this->applyPathPrefix($path);
return $this->ossClient->doesObjectExist($this->bucket, $location);
} | [
"public",
"function",
"has",
"(",
"$",
"path",
")",
"{",
"$",
"location",
"=",
"$",
"this",
"->",
"applyPathPrefix",
"(",
"$",
"path",
")",
";",
"return",
"$",
"this",
"->",
"ossClient",
"->",
"doesObjectExist",
"(",
"$",
"this",
"->",
"bucket",
",",
... | Check whether a file exists.
@param string $path
@return array|bool|null | [
"Check",
"whether",
"a",
"file",
"exists",
"."
] | train | https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/filesystem/adapters/OssAdapter.php#L258-L262 |
yuncms/framework | src/filesystem/adapters/OssAdapter.php | OssAdapter.read | public function read($path)
{
$location = $this->applyPathPrefix($path);
return [
'contents' => $this->ossClient->getObject($this->bucket, $location)
];
} | php | public function read($path)
{
$location = $this->applyPathPrefix($path);
return [
'contents' => $this->ossClient->getObject($this->bucket, $location)
];
} | [
"public",
"function",
"read",
"(",
"$",
"path",
")",
"{",
"$",
"location",
"=",
"$",
"this",
"->",
"applyPathPrefix",
"(",
"$",
"path",
")",
";",
"return",
"[",
"'contents'",
"=>",
"$",
"this",
"->",
"ossClient",
"->",
"getObject",
"(",
"$",
"this",
... | Read a file.
@param string $path
@return array|false | [
"Read",
"a",
"file",
"."
] | train | https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/filesystem/adapters/OssAdapter.php#L271-L277 |
yuncms/framework | src/filesystem/adapters/OssAdapter.php | OssAdapter.readStream | public function readStream($path)
{
$location = $this->applyPathPrefix($path);
$resource = ($this->ossClient->isUseSSL() ? 'https://' : 'http://') . $this->bucket . '.' . $this->endpoint . '/' . $location;
return [
'stream' => $resource = fopen($resource, 'r')
];
} | php | public function readStream($path)
{
$location = $this->applyPathPrefix($path);
$resource = ($this->ossClient->isUseSSL() ? 'https://' : 'http://') . $this->bucket . '.' . $this->endpoint . '/' . $location;
return [
'stream' => $resource = fopen($resource, 'r')
];
} | [
"public",
"function",
"readStream",
"(",
"$",
"path",
")",
"{",
"$",
"location",
"=",
"$",
"this",
"->",
"applyPathPrefix",
"(",
"$",
"path",
")",
";",
"$",
"resource",
"=",
"(",
"$",
"this",
"->",
"ossClient",
"->",
"isUseSSL",
"(",
")",
"?",
"'http... | Read a file as a stream.
@param string $path
@return array|false | [
"Read",
"a",
"file",
"as",
"a",
"stream",
"."
] | train | https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/filesystem/adapters/OssAdapter.php#L286-L293 |
yuncms/framework | src/filesystem/adapters/OssAdapter.php | OssAdapter.getObjectUrl | public function getObjectUrl($path)
{
$location = $this->applyPathPrefix($path);
if (($this->ossClient->getObjectAcl($this->bucket, $location)) == 'private') {
throw new RuntimeException('This object does not support retrieving URLs.');
}
//SDK未提供获取 hostname的公开方法,这里变相获取
... | php | public function getObjectUrl($path)
{
$location = $this->applyPathPrefix($path);
if (($this->ossClient->getObjectAcl($this->bucket, $location)) == 'private') {
throw new RuntimeException('This object does not support retrieving URLs.');
}
//SDK未提供获取 hostname的公开方法,这里变相获取
... | [
"public",
"function",
"getObjectUrl",
"(",
"$",
"path",
")",
"{",
"$",
"location",
"=",
"$",
"this",
"->",
"applyPathPrefix",
"(",
"$",
"path",
")",
";",
"if",
"(",
"(",
"$",
"this",
"->",
"ossClient",
"->",
"getObjectAcl",
"(",
"$",
"this",
"->",
"b... | 获取对象访问Url
@param string $path
@return string
@throws \OSS\Core\OssException | [
"获取对象访问Url"
] | train | https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/filesystem/adapters/OssAdapter.php#L301-L311 |
yuncms/framework | src/filesystem/adapters/OssAdapter.php | OssAdapter.getTemporaryUrl | public function getTemporaryUrl($path, $expiration, $options)
{
$location = $this->applyPathPrefix($path);
$temporaryUrl = $this->ossClient->signUrl($this->bucket, $location, $expiration, OssClient::OSS_HTTP_GET, $options);
return $temporaryUrl;
} | php | public function getTemporaryUrl($path, $expiration, $options)
{
$location = $this->applyPathPrefix($path);
$temporaryUrl = $this->ossClient->signUrl($this->bucket, $location, $expiration, OssClient::OSS_HTTP_GET, $options);
return $temporaryUrl;
} | [
"public",
"function",
"getTemporaryUrl",
"(",
"$",
"path",
",",
"$",
"expiration",
",",
"$",
"options",
")",
"{",
"$",
"location",
"=",
"$",
"this",
"->",
"applyPathPrefix",
"(",
"$",
"path",
")",
";",
"$",
"temporaryUrl",
"=",
"$",
"this",
"->",
"ossC... | 获取文件临时访问路径
@param $path
@param $expiration
@param $options
@return string
@throws \OSS\Core\OssException | [
"获取文件临时访问路径"
] | train | https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/filesystem/adapters/OssAdapter.php#L321-L326 |
yuncms/framework | src/filesystem/adapters/OssAdapter.php | OssAdapter.listContents | public function listContents($directory = '', $recursive = false)
{
$directory = rtrim($directory, '\\/');
$result = [];
$nextMarker = '';
while (true) {
// max-keys 用于限定此次返回object的最大数,如果不设定,默认为100,max-keys取值不能大于1000。
// prefix 限定返回的object key必须以prefix作为前缀。... | php | public function listContents($directory = '', $recursive = false)
{
$directory = rtrim($directory, '\\/');
$result = [];
$nextMarker = '';
while (true) {
// max-keys 用于限定此次返回object的最大数,如果不设定,默认为100,max-keys取值不能大于1000。
// prefix 限定返回的object key必须以prefix作为前缀。... | [
"public",
"function",
"listContents",
"(",
"$",
"directory",
"=",
"''",
",",
"$",
"recursive",
"=",
"false",
")",
"{",
"$",
"directory",
"=",
"rtrim",
"(",
"$",
"directory",
",",
"'\\\\/'",
")",
";",
"$",
"result",
"=",
"[",
"]",
";",
"$",
"nextMarke... | List contents of a directory.
@param string $directory
@param bool $recursive
@return array
@throws \OSS\Core\OssException | [
"List",
"contents",
"of",
"a",
"directory",
"."
] | train | https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/filesystem/adapters/OssAdapter.php#L337-L390 |
yuncms/framework | src/filesystem/adapters/OssAdapter.php | OssAdapter.getMetadata | public function getMetadata($path)
{
$location = $this->applyPathPrefix($path);
return $this->ossClient->getObjectMeta($this->bucket, $location);
} | php | public function getMetadata($path)
{
$location = $this->applyPathPrefix($path);
return $this->ossClient->getObjectMeta($this->bucket, $location);
} | [
"public",
"function",
"getMetadata",
"(",
"$",
"path",
")",
"{",
"$",
"location",
"=",
"$",
"this",
"->",
"applyPathPrefix",
"(",
"$",
"path",
")",
";",
"return",
"$",
"this",
"->",
"ossClient",
"->",
"getObjectMeta",
"(",
"$",
"this",
"->",
"bucket",
... | Get all the meta data of a file or directory.
@param string $path
@return array|false | [
"Get",
"all",
"the",
"meta",
"data",
"of",
"a",
"file",
"or",
"directory",
"."
] | train | https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/filesystem/adapters/OssAdapter.php#L399-L403 |
yuncms/framework | src/filesystem/adapters/OssAdapter.php | OssAdapter.getSize | public function getSize($path)
{
$location = $this->applyPathPrefix($path);
$response = $this->ossClient->getObjectMeta($this->bucket, $location);
return [
'size' => $response['content-length']
];
} | php | public function getSize($path)
{
$location = $this->applyPathPrefix($path);
$response = $this->ossClient->getObjectMeta($this->bucket, $location);
return [
'size' => $response['content-length']
];
} | [
"public",
"function",
"getSize",
"(",
"$",
"path",
")",
"{",
"$",
"location",
"=",
"$",
"this",
"->",
"applyPathPrefix",
"(",
"$",
"path",
")",
";",
"$",
"response",
"=",
"$",
"this",
"->",
"ossClient",
"->",
"getObjectMeta",
"(",
"$",
"this",
"->",
... | Get the size of a file.
@param string $path
@return array|false | [
"Get",
"the",
"size",
"of",
"a",
"file",
"."
] | train | https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/filesystem/adapters/OssAdapter.php#L412-L419 |
yuncms/framework | src/filesystem/adapters/OssAdapter.php | OssAdapter.getVisibility | public function getVisibility($path)
{
$location = $this->applyPathPrefix($path);
$response = $this->ossClient->getObjectAcl($this->bucket, $location);
return [
'visibility' => $response,
];
} | php | public function getVisibility($path)
{
$location = $this->applyPathPrefix($path);
$response = $this->ossClient->getObjectAcl($this->bucket, $location);
return [
'visibility' => $response,
];
} | [
"public",
"function",
"getVisibility",
"(",
"$",
"path",
")",
"{",
"$",
"location",
"=",
"$",
"this",
"->",
"applyPathPrefix",
"(",
"$",
"path",
")",
";",
"$",
"response",
"=",
"$",
"this",
"->",
"ossClient",
"->",
"getObjectAcl",
"(",
"$",
"this",
"->... | Get the visibility of a file.
@param string $path
@return array|false
@throws \OSS\Core\OssException | [
"Get",
"the",
"visibility",
"of",
"a",
"file",
"."
] | train | https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/filesystem/adapters/OssAdapter.php#L461-L468 |
zodream/thirdparty | src/API/Common.php | Common.exchange | public function exchange($from, $to, $amount = 1) {
return $this->getExchange()->setHeader([
'apikey' => $this->get('apikey')
])->parameters([
'fromCurrency' => $from,
'toCurrency' => $to,
'amount' => $amount
])->json();
} | php | public function exchange($from, $to, $amount = 1) {
return $this->getExchange()->setHeader([
'apikey' => $this->get('apikey')
])->parameters([
'fromCurrency' => $from,
'toCurrency' => $to,
'amount' => $amount
])->json();
} | [
"public",
"function",
"exchange",
"(",
"$",
"from",
",",
"$",
"to",
",",
"$",
"amount",
"=",
"1",
")",
"{",
"return",
"$",
"this",
"->",
"getExchange",
"(",
")",
"->",
"setHeader",
"(",
"[",
"'apikey'",
"=>",
"$",
"this",
"->",
"get",
"(",
"'apikey... | 汇率查询
@param string $from
@param string $to
@param int $amount
@return array
@throws \Exception | [
"汇率查询"
] | train | https://github.com/zodream/thirdparty/blob/b9d39087913850f1c5c7c9165105fec22a128f8f/src/API/Common.php#L108-L116 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.applyDefaultValues | public function applyDefaultValues()
{
$this->config_displayerrors = 'Off';
$this->config_bypasscache = 'Off';
$this->config_minifymarkup = 'Off';
$this->config_debugmode = 'Off';
$this->config_maintenancemode = 'Off';
$this->config_gzipscripts = 'Off';
$this-... | php | public function applyDefaultValues()
{
$this->config_displayerrors = 'Off';
$this->config_bypasscache = 'Off';
$this->config_minifymarkup = 'Off';
$this->config_debugmode = 'Off';
$this->config_maintenancemode = 'Off';
$this->config_gzipscripts = 'Off';
$this-... | [
"public",
"function",
"applyDefaultValues",
"(",
")",
"{",
"$",
"this",
"->",
"config_displayerrors",
"=",
"'Off'",
";",
"$",
"this",
"->",
"config_bypasscache",
"=",
"'Off'",
";",
"$",
"this",
"->",
"config_minifymarkup",
"=",
"'Off'",
";",
"$",
"this",
"->... | Applies default values to this object.
This method should be called from the object's constructor (or
equivalent initialization method).
@see __construct() | [
"Applies",
"default",
"values",
"to",
"this",
"object",
".",
"This",
"method",
"should",
"be",
"called",
"from",
"the",
"object",
"s",
"constructor",
"(",
"or",
"equivalent",
"initialization",
"method",
")",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L221-L230 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.getExtensions | public function getExtensions()
{
if (null == $this->extensions_unserialized && null !== $this->extensions) {
$this->extensions_unserialized = unserialize($this->extensions);
}
return $this->extensions_unserialized;
} | php | public function getExtensions()
{
if (null == $this->extensions_unserialized && null !== $this->extensions) {
$this->extensions_unserialized = unserialize($this->extensions);
}
return $this->extensions_unserialized;
} | [
"public",
"function",
"getExtensions",
"(",
")",
"{",
"if",
"(",
"null",
"==",
"$",
"this",
"->",
"extensions_unserialized",
"&&",
"null",
"!==",
"$",
"this",
"->",
"extensions",
")",
"{",
"$",
"this",
"->",
"extensions_unserialized",
"=",
"unserialize",
"("... | Get the [extensions] column value.
@return | [
"Get",
"the",
"[",
"extensions",
"]",
"column",
"value",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L412-L419 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.getLog | public function getLog()
{
if (null == $this->log_unserialized && null !== $this->log) {
$this->log_unserialized = unserialize($this->log);
}
return $this->log_unserialized;
} | php | public function getLog()
{
if (null == $this->log_unserialized && null !== $this->log) {
$this->log_unserialized = unserialize($this->log);
}
return $this->log_unserialized;
} | [
"public",
"function",
"getLog",
"(",
")",
"{",
"if",
"(",
"null",
"==",
"$",
"this",
"->",
"log_unserialized",
"&&",
"null",
"!==",
"$",
"this",
"->",
"log",
")",
"{",
"$",
"this",
"->",
"log_unserialized",
"=",
"unserialize",
"(",
"$",
"this",
"->",
... | Get the [log] column value.
@return | [
"Get",
"the",
"[",
"log",
"]",
"column",
"value",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L426-L433 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.getPHP | public function getPHP()
{
if (null == $this->php_unserialized && null !== $this->php) {
$this->php_unserialized = unserialize($this->php);
}
return $this->php_unserialized;
} | php | public function getPHP()
{
if (null == $this->php_unserialized && null !== $this->php) {
$this->php_unserialized = unserialize($this->php);
}
return $this->php_unserialized;
} | [
"public",
"function",
"getPHP",
"(",
")",
"{",
"if",
"(",
"null",
"==",
"$",
"this",
"->",
"php_unserialized",
"&&",
"null",
"!==",
"$",
"this",
"->",
"php",
")",
"{",
"$",
"this",
"->",
"php_unserialized",
"=",
"unserialize",
"(",
"$",
"this",
"->",
... | Get the [php] column value.
@return | [
"Get",
"the",
"[",
"php",
"]",
"column",
"value",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L440-L447 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.getMySQL | public function getMySQL()
{
if (null == $this->mysql_unserialized && null !== $this->mysql) {
$this->mysql_unserialized = unserialize($this->mysql);
}
return $this->mysql_unserialized;
} | php | public function getMySQL()
{
if (null == $this->mysql_unserialized && null !== $this->mysql) {
$this->mysql_unserialized = unserialize($this->mysql);
}
return $this->mysql_unserialized;
} | [
"public",
"function",
"getMySQL",
"(",
")",
"{",
"if",
"(",
"null",
"==",
"$",
"this",
"->",
"mysql_unserialized",
"&&",
"null",
"!==",
"$",
"this",
"->",
"mysql",
")",
"{",
"$",
"this",
"->",
"mysql_unserialized",
"=",
"unserialize",
"(",
"$",
"this",
... | Get the [mysql] column value.
@return | [
"Get",
"the",
"[",
"mysql",
"]",
"column",
"value",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L454-L461 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.setRemoteAppId | public function setRemoteAppId($v)
{
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
if ($this->remote_app_id !== $v) {
$this->remote_app_id = $v;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::REMOTE_APP_ID;
}
if ($this->aRemo... | php | public function setRemoteAppId($v)
{
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
if ($this->remote_app_id !== $v) {
$this->remote_app_id = $v;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::REMOTE_APP_ID;
}
if ($this->aRemo... | [
"public",
"function",
"setRemoteAppId",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
"&&",
"is_numeric",
"(",
"$",
"v",
")",
")",
"{",
"$",
"v",
"=",
"(",
"int",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"remote_a... | Set the value of [remote_app_id] column.
@param int $v new value
@return RemoteHistoryContao The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"remote_app_id",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L490-L507 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.setApiversion | public function setApiversion($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->apiversion !== $v) {
$this->apiversion = $v;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::APIVERSION;
}
return $this;
} | php | public function setApiversion($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->apiversion !== $v) {
$this->apiversion = $v;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::APIVERSION;
}
return $this;
} | [
"public",
"function",
"setApiversion",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"apiversion",
"!==",
"$",
"v",
")",
"{",
"$",
... | Set the value of [apiversion] column.
@param string $v new value
@return RemoteHistoryContao The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"apiversion",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L515-L528 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.setVersion | public function setVersion($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->version !== $v) {
$this->version = $v;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::VERSION;
}
return $this;
} | php | public function setVersion($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->version !== $v) {
$this->version = $v;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::VERSION;
}
return $this;
} | [
"public",
"function",
"setVersion",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"version",
"!==",
"$",
"v",
")",
"{",
"$",
"this... | Set the value of [version] column.
@param string $v new value
@return RemoteHistoryContao The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"version",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L557-L570 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.setConfigDisplayerrors | public function setConfigDisplayerrors($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->config_displayerrors !== $v) {
$this->config_displayerrors = $v;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::CONFIG_DISPLAYERRORS;
}
r... | php | public function setConfigDisplayerrors($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->config_displayerrors !== $v) {
$this->config_displayerrors = $v;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::CONFIG_DISPLAYERRORS;
}
r... | [
"public",
"function",
"setConfigDisplayerrors",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"config_displayerrors",
"!==",
"$",
"v",
"... | Set the value of [config_displayerrors] column.
@param string $v new value
@return RemoteHistoryContao The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"config_displayerrors",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L578-L591 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.setConfigBypasscache | public function setConfigBypasscache($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->config_bypasscache !== $v) {
$this->config_bypasscache = $v;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::CONFIG_BYPASSCACHE;
}
return $t... | php | public function setConfigBypasscache($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->config_bypasscache !== $v) {
$this->config_bypasscache = $v;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::CONFIG_BYPASSCACHE;
}
return $t... | [
"public",
"function",
"setConfigBypasscache",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"config_bypasscache",
"!==",
"$",
"v",
")",
... | Set the value of [config_bypasscache] column.
@param string $v new value
@return RemoteHistoryContao The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"config_bypasscache",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L599-L612 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.setConfigMinifymarkup | public function setConfigMinifymarkup($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->config_minifymarkup !== $v) {
$this->config_minifymarkup = $v;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::CONFIG_MINIFYMARKUP;
}
retur... | php | public function setConfigMinifymarkup($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->config_minifymarkup !== $v) {
$this->config_minifymarkup = $v;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::CONFIG_MINIFYMARKUP;
}
retur... | [
"public",
"function",
"setConfigMinifymarkup",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"config_minifymarkup",
"!==",
"$",
"v",
")"... | Set the value of [config_minifymarkup] column.
@param string $v new value
@return RemoteHistoryContao The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"config_minifymarkup",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L620-L633 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.setConfigDebugmode | public function setConfigDebugmode($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->config_debugmode !== $v) {
$this->config_debugmode = $v;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::CONFIG_DEBUGMODE;
}
return $this;
... | php | public function setConfigDebugmode($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->config_debugmode !== $v) {
$this->config_debugmode = $v;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::CONFIG_DEBUGMODE;
}
return $this;
... | [
"public",
"function",
"setConfigDebugmode",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"config_debugmode",
"!==",
"$",
"v",
")",
"{... | Set the value of [config_debugmode] column.
@param string $v new value
@return RemoteHistoryContao The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"config_debugmode",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L641-L654 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.setConfigMaintenancemode | public function setConfigMaintenancemode($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->config_maintenancemode !== $v) {
$this->config_maintenancemode = $v;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::CONFIG_MAINTENANCEMODE;
}
... | php | public function setConfigMaintenancemode($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->config_maintenancemode !== $v) {
$this->config_maintenancemode = $v;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::CONFIG_MAINTENANCEMODE;
}
... | [
"public",
"function",
"setConfigMaintenancemode",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"config_maintenancemode",
"!==",
"$",
"v",... | Set the value of [config_maintenancemode] column.
@param string $v new value
@return RemoteHistoryContao The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"config_maintenancemode",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L662-L675 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.setConfigGzipscripts | public function setConfigGzipscripts($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->config_gzipscripts !== $v) {
$this->config_gzipscripts = $v;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::CONFIG_GZIPSCRIPTS;
}
return $t... | php | public function setConfigGzipscripts($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->config_gzipscripts !== $v) {
$this->config_gzipscripts = $v;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::CONFIG_GZIPSCRIPTS;
}
return $t... | [
"public",
"function",
"setConfigGzipscripts",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"config_gzipscripts",
"!==",
"$",
"v",
")",
... | Set the value of [config_gzipscripts] column.
@param string $v new value
@return RemoteHistoryContao The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"config_gzipscripts",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L683-L696 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.setConfigRewriteurl | public function setConfigRewriteurl($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->config_rewriteurl !== $v) {
$this->config_rewriteurl = $v;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::CONFIG_REWRITEURL;
}
return $this;... | php | public function setConfigRewriteurl($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->config_rewriteurl !== $v) {
$this->config_rewriteurl = $v;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::CONFIG_REWRITEURL;
}
return $this;... | [
"public",
"function",
"setConfigRewriteurl",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"config_rewriteurl",
"!==",
"$",
"v",
")",
... | Set the value of [config_rewriteurl] column.
@param string $v new value
@return RemoteHistoryContao The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"config_rewriteurl",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L704-L717 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.setConfigAdminemail | public function setConfigAdminemail($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->config_adminemail !== $v) {
$this->config_adminemail = $v;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::CONFIG_ADMINEMAIL;
}
return $this;... | php | public function setConfigAdminemail($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->config_adminemail !== $v) {
$this->config_adminemail = $v;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::CONFIG_ADMINEMAIL;
}
return $this;... | [
"public",
"function",
"setConfigAdminemail",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"config_adminemail",
"!==",
"$",
"v",
")",
... | Set the value of [config_adminemail] column.
@param string $v new value
@return RemoteHistoryContao The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"config_adminemail",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L725-L738 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.setConfigCachemode | public function setConfigCachemode($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->config_cachemode !== $v) {
$this->config_cachemode = $v;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::CONFIG_CACHEMODE;
}
return $this;
... | php | public function setConfigCachemode($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->config_cachemode !== $v) {
$this->config_cachemode = $v;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::CONFIG_CACHEMODE;
}
return $this;
... | [
"public",
"function",
"setConfigCachemode",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"config_cachemode",
"!==",
"$",
"v",
")",
"{... | Set the value of [config_cachemode] column.
@param string $v new value
@return RemoteHistoryContao The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"config_cachemode",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L746-L759 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.setStatuscode | public function setStatuscode($v)
{
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
if ($this->statuscode !== $v) {
$this->statuscode = $v;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::STATUSCODE;
}
return $this;
} | php | public function setStatuscode($v)
{
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
if ($this->statuscode !== $v) {
$this->statuscode = $v;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::STATUSCODE;
}
return $this;
} | [
"public",
"function",
"setStatuscode",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
"&&",
"is_numeric",
"(",
"$",
"v",
")",
")",
"{",
"$",
"v",
"=",
"(",
"int",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"statuscod... | Set the value of [statuscode] column.
@param int $v new value
@return RemoteHistoryContao The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"statuscode",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L767-L780 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.setExtensions | public function setExtensions($v)
{
if ($this->extensions_unserialized !== $v) {
$this->extensions_unserialized = $v;
$this->extensions = serialize($v);
$this->modifiedColumns[] = RemoteHistoryContaoPeer::EXTENSIONS;
}
return $this;
} | php | public function setExtensions($v)
{
if ($this->extensions_unserialized !== $v) {
$this->extensions_unserialized = $v;
$this->extensions = serialize($v);
$this->modifiedColumns[] = RemoteHistoryContaoPeer::EXTENSIONS;
}
return $this;
} | [
"public",
"function",
"setExtensions",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"extensions_unserialized",
"!==",
"$",
"v",
")",
"{",
"$",
"this",
"->",
"extensions_unserialized",
"=",
"$",
"v",
";",
"$",
"this",
"->",
"extensions",
"=",
... | Set the value of [extensions] column.
@param $v new value
@return RemoteHistoryContao The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"extensions",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L788-L798 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.setLog | public function setLog($v)
{
if ($this->log_unserialized !== $v) {
$this->log_unserialized = $v;
$this->log = serialize($v);
$this->modifiedColumns[] = RemoteHistoryContaoPeer::LOG;
}
return $this;
} | php | public function setLog($v)
{
if ($this->log_unserialized !== $v) {
$this->log_unserialized = $v;
$this->log = serialize($v);
$this->modifiedColumns[] = RemoteHistoryContaoPeer::LOG;
}
return $this;
} | [
"public",
"function",
"setLog",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"log_unserialized",
"!==",
"$",
"v",
")",
"{",
"$",
"this",
"->",
"log_unserialized",
"=",
"$",
"v",
";",
"$",
"this",
"->",
"log",
"=",
"serialize",
"(",
"$",
... | Set the value of [log] column.
@param $v new value
@return RemoteHistoryContao The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"log",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L806-L816 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.setPHP | public function setPHP($v)
{
if ($this->php_unserialized !== $v) {
$this->php_unserialized = $v;
$this->php = serialize($v);
$this->modifiedColumns[] = RemoteHistoryContaoPeer::PHP;
}
return $this;
} | php | public function setPHP($v)
{
if ($this->php_unserialized !== $v) {
$this->php_unserialized = $v;
$this->php = serialize($v);
$this->modifiedColumns[] = RemoteHistoryContaoPeer::PHP;
}
return $this;
} | [
"public",
"function",
"setPHP",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"php_unserialized",
"!==",
"$",
"v",
")",
"{",
"$",
"this",
"->",
"php_unserialized",
"=",
"$",
"v",
";",
"$",
"this",
"->",
"php",
"=",
"serialize",
"(",
"$",
... | Set the value of [php] column.
@param $v new value
@return RemoteHistoryContao The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"php",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L824-L834 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.setMySQL | public function setMySQL($v)
{
if ($this->mysql_unserialized !== $v) {
$this->mysql_unserialized = $v;
$this->mysql = serialize($v);
$this->modifiedColumns[] = RemoteHistoryContaoPeer::MYSQL;
}
return $this;
} | php | public function setMySQL($v)
{
if ($this->mysql_unserialized !== $v) {
$this->mysql_unserialized = $v;
$this->mysql = serialize($v);
$this->modifiedColumns[] = RemoteHistoryContaoPeer::MYSQL;
}
return $this;
} | [
"public",
"function",
"setMySQL",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"mysql_unserialized",
"!==",
"$",
"v",
")",
"{",
"$",
"this",
"->",
"mysql_unserialized",
"=",
"$",
"v",
";",
"$",
"this",
"->",
"mysql",
"=",
"serialize",
"(",
... | Set the value of [mysql] column.
@param $v new value
@return RemoteHistoryContao The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"mysql",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L842-L852 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.hasOnlyDefaultValues | public function hasOnlyDefaultValues()
{
if ($this->config_displayerrors !== 'Off') {
return false;
}
if ($this->config_bypasscache !== 'Off') {
return false;
}
if ($this->config_minifymarkup !== 'Off') {
r... | php | public function hasOnlyDefaultValues()
{
if ($this->config_displayerrors !== 'Off') {
return false;
}
if ($this->config_bypasscache !== 'Off') {
return false;
}
if ($this->config_minifymarkup !== 'Off') {
r... | [
"public",
"function",
"hasOnlyDefaultValues",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"config_displayerrors",
"!==",
"'Off'",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"config_bypasscache",
"!==",
"'Off'",
")",
"{",
"return"... | Indicates whether the columns in this object are only set to default values.
This method can be used in conjunction with isModified() to indicate whether an object is both
modified _and_ has some values set which are non-default.
@return boolean Whether the columns in this object are only been set with default values... | [
"Indicates",
"whether",
"the",
"columns",
"in",
"this",
"object",
"are",
"only",
"set",
"to",
"default",
"values",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L862-L894 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.hydrate | public function hydrate($row, $startcol = 0, $rehydrate = false)
{
try {
$this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
$this->remote_app_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null;
$this->apiversion = ($row[$st... | php | public function hydrate($row, $startcol = 0, $rehydrate = false)
{
try {
$this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
$this->remote_app_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null;
$this->apiversion = ($row[$st... | [
"public",
"function",
"hydrate",
"(",
"$",
"row",
",",
"$",
"startcol",
"=",
"0",
",",
"$",
"rehydrate",
"=",
"false",
")",
"{",
"try",
"{",
"$",
"this",
"->",
"id",
"=",
"(",
"$",
"row",
"[",
"$",
"startcol",
"+",
"0",
"]",
"!==",
"null",
")",... | Hydrates (populates) the object variables with values from the database resultset.
An offset (0-based "start column") is specified so that objects can be hydrated
with a subset of the columns in the resultset rows. This is needed, for example,
for results of JOIN queries where the resultset row includes columns from ... | [
"Hydrates",
"(",
"populates",
")",
"the",
"object",
"variables",
"with",
"values",
"from",
"the",
"database",
"resultset",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L910-L947 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.ensureConsistency | public function ensureConsistency()
{
if ($this->aRemoteApp !== null && $this->remote_app_id !== $this->aRemoteApp->getId()) {
$this->aRemoteApp = null;
}
} | php | public function ensureConsistency()
{
if ($this->aRemoteApp !== null && $this->remote_app_id !== $this->aRemoteApp->getId()) {
$this->aRemoteApp = null;
}
} | [
"public",
"function",
"ensureConsistency",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"aRemoteApp",
"!==",
"null",
"&&",
"$",
"this",
"->",
"remote_app_id",
"!==",
"$",
"this",
"->",
"aRemoteApp",
"->",
"getId",
"(",
")",
")",
"{",
"$",
"this",
"->",... | Checks and repairs the internal consistency of the object.
This method is executed after an already-instantiated object is re-hydrated
from the database. It exists to check any foreign keys to make sure that
the objects related to the current object are correct based on foreign key.
You can override this method in t... | [
"Checks",
"and",
"repairs",
"the",
"internal",
"consistency",
"of",
"the",
"object",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L962-L968 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.doSave | protected function doSave(PropelPDO $con)
{
$affectedRows = 0; // initialize var to track total num of affected rows
if (!$this->alreadyInSave) {
$this->alreadyInSave = true;
// We call the save method on the following object(s) if they
// were passed to this obj... | php | protected function doSave(PropelPDO $con)
{
$affectedRows = 0; // initialize var to track total num of affected rows
if (!$this->alreadyInSave) {
$this->alreadyInSave = true;
// We call the save method on the following object(s) if they
// were passed to this obj... | [
"protected",
"function",
"doSave",
"(",
"PropelPDO",
"$",
"con",
")",
"{",
"$",
"affectedRows",
"=",
"0",
";",
"// initialize var to track total num of affected rows",
"if",
"(",
"!",
"$",
"this",
"->",
"alreadyInSave",
")",
"{",
"$",
"this",
"->",
"alreadyInSav... | Performs the work of inserting or updating the row in the database.
If the object is new, it inserts it; otherwise an update is performed.
All related objects are also updated in this method.
@param PropelPDO $con
@return int The number of rows affected by this insert/update and any referring fk objects' ... | [
"Performs",
"the",
"work",
"of",
"inserting",
"or",
"updating",
"the",
"row",
"in",
"the",
"database",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L1115-L1149 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.doInsert | protected function doInsert(PropelPDO $con)
{
$modifiedColumns = array();
$index = 0;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::ID;
if (null !== $this->id) {
throw new PropelException('Cannot insert a value for auto-increment primary key (' . RemoteHistoryConta... | php | protected function doInsert(PropelPDO $con)
{
$modifiedColumns = array();
$index = 0;
$this->modifiedColumns[] = RemoteHistoryContaoPeer::ID;
if (null !== $this->id) {
throw new PropelException('Cannot insert a value for auto-increment primary key (' . RemoteHistoryConta... | [
"protected",
"function",
"doInsert",
"(",
"PropelPDO",
"$",
"con",
")",
"{",
"$",
"modifiedColumns",
"=",
"array",
"(",
")",
";",
"$",
"index",
"=",
"0",
";",
"$",
"this",
"->",
"modifiedColumns",
"[",
"]",
"=",
"RemoteHistoryContaoPeer",
"::",
"ID",
";"... | Insert the row in the database.
@param PropelPDO $con
@throws PropelException
@see doSave() | [
"Insert",
"the",
"row",
"in",
"the",
"database",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L1159-L1311 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.getByPosition | public function getByPosition($pos)
{
switch ($pos) {
case 0:
return $this->getId();
break;
case 1:
return $this->getRemoteAppId();
break;
case 2:
return $this->getApiversion();
... | php | public function getByPosition($pos)
{
switch ($pos) {
case 0:
return $this->getId();
break;
case 1:
return $this->getRemoteAppId();
break;
case 2:
return $this->getApiversion();
... | [
"public",
"function",
"getByPosition",
"(",
"$",
"pos",
")",
"{",
"switch",
"(",
"$",
"pos",
")",
"{",
"case",
"0",
":",
"return",
"$",
"this",
"->",
"getId",
"(",
")",
";",
"break",
";",
"case",
"1",
":",
"return",
"$",
"this",
"->",
"getRemoteApp... | Retrieves a field from the object by Position as specified in the xml schema.
Zero-based.
@param int $pos position in xml schema
@return mixed Value of field at $pos | [
"Retrieves",
"a",
"field",
"from",
"the",
"object",
"by",
"Position",
"as",
"specified",
"in",
"the",
"xml",
"schema",
".",
"Zero",
"-",
"based",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L1438-L1502 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.toArray | public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
{
if (isset($alreadyDumpedObjects['RemoteHistoryContao'][$this->getPrimaryKey()])) {
return '*RECURSION*';
}
$alreadyDumpedO... | php | public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
{
if (isset($alreadyDumpedObjects['RemoteHistoryContao'][$this->getPrimaryKey()])) {
return '*RECURSION*';
}
$alreadyDumpedO... | [
"public",
"function",
"toArray",
"(",
"$",
"keyType",
"=",
"BasePeer",
"::",
"TYPE_PHPNAME",
",",
"$",
"includeLazyLoadColumns",
"=",
"true",
",",
"$",
"alreadyDumpedObjects",
"=",
"array",
"(",
")",
",",
"$",
"includeForeignObjects",
"=",
"false",
")",
"{",
... | Exports the object as an array.
You can specify the key type of the array by passing one of the class
type constants.
@param string $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME,
BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
Defau... | [
"Exports",
"the",
"object",
"as",
"an",
"array",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L1519-L1559 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.setByPosition | public function setByPosition($pos, $value)
{
switch ($pos) {
case 0:
$this->setId($value);
break;
case 1:
$this->setRemoteAppId($value);
break;
case 2:
$this->setApiversion($value);
... | php | public function setByPosition($pos, $value)
{
switch ($pos) {
case 0:
$this->setId($value);
break;
case 1:
$this->setRemoteAppId($value);
break;
case 2:
$this->setApiversion($value);
... | [
"public",
"function",
"setByPosition",
"(",
"$",
"pos",
",",
"$",
"value",
")",
"{",
"switch",
"(",
"$",
"pos",
")",
"{",
"case",
"0",
":",
"$",
"this",
"->",
"setId",
"(",
"$",
"value",
")",
";",
"break",
";",
"case",
"1",
":",
"$",
"this",
"-... | Sets a field from the object by Position as specified in the xml schema.
Zero-based.
@param int $pos position in xml schema
@param mixed $value field value
@return void | [
"Sets",
"a",
"field",
"from",
"the",
"object",
"by",
"Position",
"as",
"specified",
"in",
"the",
"xml",
"schema",
".",
"Zero",
"-",
"based",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L1587-L1648 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.fromArray | public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
{
$keys = RemoteHistoryContaoPeer::getFieldNames($keyType);
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
if (array_key_exists($keys[1], $arr)) $this->setRemoteAppId($arr[$keys[1]]);
if (array_k... | php | public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
{
$keys = RemoteHistoryContaoPeer::getFieldNames($keyType);
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
if (array_key_exists($keys[1], $arr)) $this->setRemoteAppId($arr[$keys[1]]);
if (array_k... | [
"public",
"function",
"fromArray",
"(",
"$",
"arr",
",",
"$",
"keyType",
"=",
"BasePeer",
"::",
"TYPE_PHPNAME",
")",
"{",
"$",
"keys",
"=",
"RemoteHistoryContaoPeer",
"::",
"getFieldNames",
"(",
"$",
"keyType",
")",
";",
"if",
"(",
"array_key_exists",
"(",
... | Populates the object using an array.
This is particularly useful when populating an object from one of the
request arrays (e.g. $_POST). This method goes through the column
names, checking to see whether a matching key exists in populated
array. If so the setByName() method is called for that column.
You can specify... | [
"Populates",
"the",
"object",
"using",
"an",
"array",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L1667-L1690 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.buildCriteria | public function buildCriteria()
{
$criteria = new Criteria(RemoteHistoryContaoPeer::DATABASE_NAME);
if ($this->isColumnModified(RemoteHistoryContaoPeer::ID)) $criteria->add(RemoteHistoryContaoPeer::ID, $this->id);
if ($this->isColumnModified(RemoteHistoryContaoPeer::REMOTE_APP_ID)) $criteri... | php | public function buildCriteria()
{
$criteria = new Criteria(RemoteHistoryContaoPeer::DATABASE_NAME);
if ($this->isColumnModified(RemoteHistoryContaoPeer::ID)) $criteria->add(RemoteHistoryContaoPeer::ID, $this->id);
if ($this->isColumnModified(RemoteHistoryContaoPeer::REMOTE_APP_ID)) $criteri... | [
"public",
"function",
"buildCriteria",
"(",
")",
"{",
"$",
"criteria",
"=",
"new",
"Criteria",
"(",
"RemoteHistoryContaoPeer",
"::",
"DATABASE_NAME",
")",
";",
"if",
"(",
"$",
"this",
"->",
"isColumnModified",
"(",
"RemoteHistoryContaoPeer",
"::",
"ID",
")",
"... | Build a Criteria object containing the values of all modified columns in this object.
@return Criteria The Criteria object containing all modified values. | [
"Build",
"a",
"Criteria",
"object",
"containing",
"the",
"values",
"of",
"all",
"modified",
"columns",
"in",
"this",
"object",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L1697-L1722 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.copyInto | public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
{
$copyObj->setRemoteAppId($this->getRemoteAppId());
$copyObj->setApiversion($this->getApiversion());
$copyObj->setName($this->getName());
$copyObj->setVersion($this->getVersion());
$copyObj->setConfigDisp... | php | public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
{
$copyObj->setRemoteAppId($this->getRemoteAppId());
$copyObj->setApiversion($this->getApiversion());
$copyObj->setName($this->getName());
$copyObj->setVersion($this->getVersion());
$copyObj->setConfigDisp... | [
"public",
"function",
"copyInto",
"(",
"$",
"copyObj",
",",
"$",
"deepCopy",
"=",
"false",
",",
"$",
"makeNew",
"=",
"true",
")",
"{",
"$",
"copyObj",
"->",
"setRemoteAppId",
"(",
"$",
"this",
"->",
"getRemoteAppId",
"(",
")",
")",
";",
"$",
"copyObj",... | Sets contents of passed object to values from current object.
If desired, this method can also make copies of all associated (fkey referrers)
objects.
@param object $copyObj An object of RemoteHistoryContao (or compatible) type.
@param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the curren... | [
"Sets",
"contents",
"of",
"passed",
"object",
"to",
"values",
"from",
"current",
"object",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L1781-L1817 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.clear | public function clear()
{
$this->id = null;
$this->remote_app_id = null;
$this->apiversion = null;
$this->name = null;
$this->version = null;
$this->config_displayerrors = null;
$this->config_bypasscache = null;
$this->config_minifymarkup = null;
... | php | public function clear()
{
$this->id = null;
$this->remote_app_id = null;
$this->apiversion = null;
$this->name = null;
$this->version = null;
$this->config_displayerrors = null;
$this->config_bypasscache = null;
$this->config_minifymarkup = null;
... | [
"public",
"function",
"clear",
"(",
")",
"{",
"$",
"this",
"->",
"id",
"=",
"null",
";",
"$",
"this",
"->",
"remote_app_id",
"=",
"null",
";",
"$",
"this",
"->",
"apiversion",
"=",
"null",
";",
"$",
"this",
"->",
"name",
"=",
"null",
";",
"$",
"t... | Clears the current object and sets all attributes to their default values | [
"Clears",
"the",
"current",
"object",
"and",
"sets",
"all",
"attributes",
"to",
"their",
"default",
"values"
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L1914-L1947 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php | BaseRemoteHistoryContao.clearAllReferences | public function clearAllReferences($deep = false)
{
if ($deep && !$this->alreadyInClearAllReferencesDeep) {
$this->alreadyInClearAllReferencesDeep = true;
if ($this->aRemoteApp instanceof Persistent) {
$this->aRemoteApp->clearAllReferences($deep);
}
... | php | public function clearAllReferences($deep = false)
{
if ($deep && !$this->alreadyInClearAllReferencesDeep) {
$this->alreadyInClearAllReferencesDeep = true;
if ($this->aRemoteApp instanceof Persistent) {
$this->aRemoteApp->clearAllReferences($deep);
}
... | [
"public",
"function",
"clearAllReferences",
"(",
"$",
"deep",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"deep",
"&&",
"!",
"$",
"this",
"->",
"alreadyInClearAllReferencesDeep",
")",
"{",
"$",
"this",
"->",
"alreadyInClearAllReferencesDeep",
"=",
"true",
";",
"... | Resets all references to other model objects or collections of model objects.
This method is a user-space workaround for PHP's inability to garbage collect
objects with circular references (even in PHP 5.3). This is currently necessary
when using Propel in certain daemon or large-volume/high-memory operations.
@param... | [
"Resets",
"all",
"references",
"to",
"other",
"model",
"objects",
"or",
"collections",
"of",
"model",
"objects",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContao.php#L1958-L1970 |
ClanCats/Core | src/classes/CCStr.php | CCStr.charset | public static function charset( $charset = null )
{
switch( $charset )
{
case 'pass':
case 'secure':
case 'password':
return static::SECURE;
break;
case 'key':
return static::KEY;
break;
case 'alphanum':
return static::ALPHA_NUM;
break;
case 'alpha':
return static:... | php | public static function charset( $charset = null )
{
switch( $charset )
{
case 'pass':
case 'secure':
case 'password':
return static::SECURE;
break;
case 'key':
return static::KEY;
break;
case 'alphanum':
return static::ALPHA_NUM;
break;
case 'alpha':
return static:... | [
"public",
"static",
"function",
"charset",
"(",
"$",
"charset",
"=",
"null",
")",
"{",
"switch",
"(",
"$",
"charset",
")",
"{",
"case",
"'pass'",
":",
"case",
"'secure'",
":",
"case",
"'password'",
":",
"return",
"static",
"::",
"SECURE",
";",
"break",
... | Get a charset, a string containing a set of characters.
There are some predefined charsets like:
pass
secure
password
key
alphanum
alpha
alpha_low
lowercase
alpha_up
uppercase
numeric
num
hex
bin
Everything else gets returned as its own charset.
@param string $charset use predefined charset or your own
@return str... | [
"Get",
"a",
"charset",
"a",
"string",
"containing",
"a",
"set",
"of",
"characters",
"."
] | train | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCStr.php#L51-L104 |
ClanCats/Core | src/classes/CCStr.php | CCStr.random | public static function random( $length = 25, $charset = null )
{
$charset = static::charset( $charset );
$count = strlen( $charset ); $string = '';
while ( $length-- )
{
$string .= $charset[mt_rand(0, $count-1)];
}
return $string;
} | php | public static function random( $length = 25, $charset = null )
{
$charset = static::charset( $charset );
$count = strlen( $charset ); $string = '';
while ( $length-- )
{
$string .= $charset[mt_rand(0, $count-1)];
}
return $string;
} | [
"public",
"static",
"function",
"random",
"(",
"$",
"length",
"=",
"25",
",",
"$",
"charset",
"=",
"null",
")",
"{",
"$",
"charset",
"=",
"static",
"::",
"charset",
"(",
"$",
"charset",
")",
";",
"$",
"count",
"=",
"strlen",
"(",
"$",
"charset",
")... | Generate a random string with the given length and charset.
CCStr::random( 8, 'hex' ); // 56F6AE10
CCStr::random( 4, 'password' ); // ?F%7
@param int $length Default is 25
@param string $charset This parameter uses the CCStr::charset function
@return string | [
"Generate",
"a",
"random",
"string",
"with",
"the",
"given",
"length",
"and",
"charset",
"."
] | train | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCStr.php#L116-L128 |
ClanCats/Core | src/classes/CCStr.php | CCStr.capture | public static function capture( $callback, $params = array() )
{
if ( is_string( $callback ) )
{
return $callback;
}
if ( !is_closure( $callback ) )
{
return "";
}
if ( !is_array( $params ) )
{
$params = array( $params );
}
ob_start();
$return = call_user_func_array( $callback, $par... | php | public static function capture( $callback, $params = array() )
{
if ( is_string( $callback ) )
{
return $callback;
}
if ( !is_closure( $callback ) )
{
return "";
}
if ( !is_array( $params ) )
{
$params = array( $params );
}
ob_start();
$return = call_user_func_array( $callback, $par... | [
"public",
"static",
"function",
"capture",
"(",
"$",
"callback",
",",
"$",
"params",
"=",
"array",
"(",
")",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"callback",
")",
")",
"{",
"return",
"$",
"callback",
";",
"}",
"if",
"(",
"!",
"is_closure",
"... | Try to get a string from a callback reading the output buffer
@param mixed $callback
@param array $params
@return string | [
"Try",
"to",
"get",
"a",
"string",
"from",
"a",
"callback",
"reading",
"the",
"output",
"buffer"
] | train | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCStr.php#L137-L164 |
ClanCats/Core | src/classes/CCStr.php | CCStr.htmlentities | public static function htmlentities( $string, $recursive = false )
{
if ( is_array( $string ) )
{
foreach( $string as $key => $item )
{
if ( $recursive )
{
if ( is_array( $item ) )
{
$string[$key] = static::htmlentities( $item, $recursive );
}
}
if ( is_string( $... | php | public static function htmlentities( $string, $recursive = false )
{
if ( is_array( $string ) )
{
foreach( $string as $key => $item )
{
if ( $recursive )
{
if ( is_array( $item ) )
{
$string[$key] = static::htmlentities( $item, $recursive );
}
}
if ( is_string( $... | [
"public",
"static",
"function",
"htmlentities",
"(",
"$",
"string",
",",
"$",
"recursive",
"=",
"false",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"string",
")",
")",
"{",
"foreach",
"(",
"$",
"string",
"as",
"$",
"key",
"=>",
"$",
"item",
")",
"{... | Does the same as the PHP native htmlentities function but you can pass arrays.
@param string|array $string
@param bool $recursive
@return string|array | [
"Does",
"the",
"same",
"as",
"the",
"PHP",
"native",
"htmlentities",
"function",
"but",
"you",
"can",
"pass",
"arrays",
"."
] | train | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCStr.php#L173-L197 |
ClanCats/Core | src/classes/CCStr.php | CCStr.suffix | public static function suffix( $string, $sep = '-' )
{
return substr( $string, strrpos( $string, $sep )+strlen( $sep ) );
} | php | public static function suffix( $string, $sep = '-' )
{
return substr( $string, strrpos( $string, $sep )+strlen( $sep ) );
} | [
"public",
"static",
"function",
"suffix",
"(",
"$",
"string",
",",
"$",
"sep",
"=",
"'-'",
")",
"{",
"return",
"substr",
"(",
"$",
"string",
",",
"strrpos",
"(",
"$",
"string",
",",
"$",
"sep",
")",
"+",
"strlen",
"(",
"$",
"sep",
")",
")",
";",
... | Get the last part of a string
CCStr::suffix( 'some-strange-file-name-2014' ); // 2014
CCStr::suffix( '/path/to/my/file.xml', '/' ); // file.xml
@param string $string
@param string $sep The seperator string.
@return string | [
"Get",
"the",
"last",
"part",
"of",
"a",
"string"
] | train | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCStr.php#L209-L212 |
ClanCats/Core | src/classes/CCStr.php | CCStr.hash | public static function hash( $string )
{
if (is_numeric( $algo = ClanCats::$config->get( 'security.hash', 'md5') ))
{
return password_hash( $string, $algo );
}
return call_user_func( $algo, $string );
} | php | public static function hash( $string )
{
if (is_numeric( $algo = ClanCats::$config->get( 'security.hash', 'md5') ))
{
return password_hash( $string, $algo );
}
return call_user_func( $algo, $string );
} | [
"public",
"static",
"function",
"hash",
"(",
"$",
"string",
")",
"{",
"if",
"(",
"is_numeric",
"(",
"$",
"algo",
"=",
"ClanCats",
"::",
"$",
"config",
"->",
"get",
"(",
"'security.hash'",
",",
"'md5'",
")",
")",
")",
"{",
"return",
"password_hash",
"("... | Hashs a string using the configurable method. ( main.config -> security.hash )
@param string $string
@return string | [
"Hashs",
"a",
"string",
"using",
"the",
"configurable",
"method",
".",
"(",
"main",
".",
"config",
"-",
">",
"security",
".",
"hash",
")"
] | train | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCStr.php#L247-L254 |
ClanCats/Core | src/classes/CCStr.php | CCStr.verify_hash | public static function verify_hash( $string, $hash )
{
if (is_numeric( $algo = ClanCats::$config->get( 'security.hash', 'md5') ))
{
return password_verify( $string, $hash );
}
return ($hash === call_user_func( $algo, $string ));
} | php | public static function verify_hash( $string, $hash )
{
if (is_numeric( $algo = ClanCats::$config->get( 'security.hash', 'md5') ))
{
return password_verify( $string, $hash );
}
return ($hash === call_user_func( $algo, $string ));
} | [
"public",
"static",
"function",
"verify_hash",
"(",
"$",
"string",
",",
"$",
"hash",
")",
"{",
"if",
"(",
"is_numeric",
"(",
"$",
"algo",
"=",
"ClanCats",
"::",
"$",
"config",
"->",
"get",
"(",
"'security.hash'",
",",
"'md5'",
")",
")",
")",
"{",
"re... | Verifies a hash with a plaintext string using the configurable method. ( main.config -> security.hash )
@param string $string
@param string $hash
@return bool | [
"Verifies",
"a",
"hash",
"with",
"a",
"plaintext",
"string",
"using",
"the",
"configurable",
"method",
".",
"(",
"main",
".",
"config",
"-",
">",
"security",
".",
"hash",
")"
] | train | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCStr.php#L263-L270 |
ClanCats/Core | src/classes/CCStr.php | CCStr.clean_url | public static function clean_url( $string, $sep = null )
{
// basic clean
$string = strtolower( static::replace_accents( trim( $string ) ) );
// these characters get replaced with our seperator
$string = str_replace( array( ' ', '&', '\r\n', '\n', '+', ',', '.', '_' ) , '-', $string );
$string = preg_repl... | php | public static function clean_url( $string, $sep = null )
{
// basic clean
$string = strtolower( static::replace_accents( trim( $string ) ) );
// these characters get replaced with our seperator
$string = str_replace( array( ' ', '&', '\r\n', '\n', '+', ',', '.', '_' ) , '-', $string );
$string = preg_repl... | [
"public",
"static",
"function",
"clean_url",
"(",
"$",
"string",
",",
"$",
"sep",
"=",
"null",
")",
"{",
"// basic clean",
"$",
"string",
"=",
"strtolower",
"(",
"static",
"::",
"replace_accents",
"(",
"trim",
"(",
"$",
"string",
")",
")",
")",
";",
"/... | Try to form a string to url valid segment. It will remove all special characters replace
accents characters remove and replace whitespaces breaks etc..
@param string $string
@param string $sep You can define another seperator default is "-"
@return string | [
"Try",
"to",
"form",
"a",
"string",
"to",
"url",
"valid",
"segment",
".",
"It",
"will",
"remove",
"all",
"special",
"characters",
"replace",
"accents",
"characters",
"remove",
"and",
"replace",
"whitespaces",
"breaks",
"etc",
".."
] | train | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCStr.php#L299-L319 |
ClanCats/Core | src/classes/CCStr.php | CCStr.replace | public static function replace( $string, $arr, $count = null )
{
return str_replace( array_keys( $arr ), array_values( $arr ), $string, $count );
} | php | public static function replace( $string, $arr, $count = null )
{
return str_replace( array_keys( $arr ), array_values( $arr ), $string, $count );
} | [
"public",
"static",
"function",
"replace",
"(",
"$",
"string",
",",
"$",
"arr",
",",
"$",
"count",
"=",
"null",
")",
"{",
"return",
"str_replace",
"(",
"array_keys",
"(",
"$",
"arr",
")",
",",
"array_values",
"(",
"$",
"arr",
")",
",",
"$",
"string",... | str_replace using key => value of an array
@param string $string
@param array $arr
@param int $count
@return string | [
"str_replace",
"using",
"key",
"=",
">",
"value",
"of",
"an",
"array"
] | train | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCStr.php#L329-L332 |
ClanCats/Core | src/classes/CCStr.php | CCStr.preg_replace | public static function preg_replace( $arr, $string, $count = null )
{
return preg_replace( array_keys( $arr ), array_values( $arr ), $string, $count );
} | php | public static function preg_replace( $arr, $string, $count = null )
{
return preg_replace( array_keys( $arr ), array_values( $arr ), $string, $count );
} | [
"public",
"static",
"function",
"preg_replace",
"(",
"$",
"arr",
",",
"$",
"string",
",",
"$",
"count",
"=",
"null",
")",
"{",
"return",
"preg_replace",
"(",
"array_keys",
"(",
"$",
"arr",
")",
",",
"array_values",
"(",
"$",
"arr",
")",
",",
"$",
"st... | preg replace using key => value of an array
@param string $string
@param array $arr
@param int $count
@return string | [
"preg",
"replace",
"using",
"key",
"=",
">",
"value",
"of",
"an",
"array"
] | train | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCStr.php#L342-L345 |
ClanCats/Core | src/classes/CCStr.php | CCStr.lower | public static function lower( $string, $encoding = null )
{
if ( is_null( $encoding ) )
{
$encoding = ClanCats::$config->charset;
}
return mb_strtolower( $string, $encoding );
} | php | public static function lower( $string, $encoding = null )
{
if ( is_null( $encoding ) )
{
$encoding = ClanCats::$config->charset;
}
return mb_strtolower( $string, $encoding );
} | [
"public",
"static",
"function",
"lower",
"(",
"$",
"string",
",",
"$",
"encoding",
"=",
"null",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"encoding",
")",
")",
"{",
"$",
"encoding",
"=",
"ClanCats",
"::",
"$",
"config",
"->",
"charset",
";",
"}",
"... | Converts an string to lowercase using the system encoding
@param string $string
@param string $encoding
@return string | [
"Converts",
"an",
"string",
"to",
"lowercase",
"using",
"the",
"system",
"encoding"
] | train | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCStr.php#L354-L361 |
ClanCats/Core | src/classes/CCStr.php | CCStr.upper | public static function upper( $string, $encoding = null )
{
if ( is_null( $encoding ) )
{
$encoding = ClanCats::$config->charset;
}
return mb_strtoupper( $string, $encoding );
} | php | public static function upper( $string, $encoding = null )
{
if ( is_null( $encoding ) )
{
$encoding = ClanCats::$config->charset;
}
return mb_strtoupper( $string, $encoding );
} | [
"public",
"static",
"function",
"upper",
"(",
"$",
"string",
",",
"$",
"encoding",
"=",
"null",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"encoding",
")",
")",
"{",
"$",
"encoding",
"=",
"ClanCats",
"::",
"$",
"config",
"->",
"charset",
";",
"}",
"... | Converts an string to uppercase using the system encoding
@param string $string
@param string $encoding
@return string | [
"Converts",
"an",
"string",
"to",
"uppercase",
"using",
"the",
"system",
"encoding"
] | train | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCStr.php#L370-L377 |
ClanCats/Core | src/classes/CCStr.php | CCStr.cut | public static function cut( $string, $key, $cut_key = true, $last = false )
{
if ( $last )
{
$pos = strrpos( $string, $key );
}
else
{
$pos = strpos( $string, $key );
}
if ( $pos === false )
{
return $string;
}
if ( !$cut_key )
{
$pos += strlen( $key );
}
return substr( $stri... | php | public static function cut( $string, $key, $cut_key = true, $last = false )
{
if ( $last )
{
$pos = strrpos( $string, $key );
}
else
{
$pos = strpos( $string, $key );
}
if ( $pos === false )
{
return $string;
}
if ( !$cut_key )
{
$pos += strlen( $key );
}
return substr( $stri... | [
"public",
"static",
"function",
"cut",
"(",
"$",
"string",
",",
"$",
"key",
",",
"$",
"cut_key",
"=",
"true",
",",
"$",
"last",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"last",
")",
"{",
"$",
"pos",
"=",
"strrpos",
"(",
"$",
"string",
",",
"$",
... | Cuts a string after another string.
CCStr::cut( 'some/path/to/user.config.xml', '.' ); // some/path/to/user
CCStr::cut( 'some/path/to/user.config.xml', '/', false ); // some/
CCStr::cut( 'some/path/to/user.config.xml', '/', true, true ); // some/path/to
@param string $string
@param string $key The string that af... | [
"Cuts",
"a",
"string",
"after",
"another",
"string",
"."
] | train | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCStr.php#L422-L442 |
ClanCats/Core | src/classes/CCStr.php | CCStr.bytes | public static function bytes( $size, $round = 2 )
{
$unit = array( 'b', 'kb', 'mb', 'gb', 'tb', 'pb' );
return @round( $size / pow( 1024, ( $i = floor( log( $size, 1024 ) ) ) ), $round ).$unit[$i];
} | php | public static function bytes( $size, $round = 2 )
{
$unit = array( 'b', 'kb', 'mb', 'gb', 'tb', 'pb' );
return @round( $size / pow( 1024, ( $i = floor( log( $size, 1024 ) ) ) ), $round ).$unit[$i];
} | [
"public",
"static",
"function",
"bytes",
"(",
"$",
"size",
",",
"$",
"round",
"=",
"2",
")",
"{",
"$",
"unit",
"=",
"array",
"(",
"'b'",
",",
"'kb'",
",",
"'mb'",
",",
"'gb'",
",",
"'tb'",
",",
"'pb'",
")",
";",
"return",
"@",
"round",
"(",
"$"... | Convert bytes to a human readable format
CCStr::bytes( 39247293 ); // 37.43mb
@param int $size
@return string | [
"Convert",
"bytes",
"to",
"a",
"human",
"readable",
"format"
] | train | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCStr.php#L484-L488 |
Chill-project/Main | Templating/TranslatableStringHelper.php | TranslatableStringHelper.localize | public function localize(array $translatableStrings)
{
if (NULL === $translatableStrings) {
return NULL;
}
$language = $this->requestStack->getCurrentRequest()->getLocale();
if (isset($translatableStrings[$language])) {
return $... | php | public function localize(array $translatableStrings)
{
if (NULL === $translatableStrings) {
return NULL;
}
$language = $this->requestStack->getCurrentRequest()->getLocale();
if (isset($translatableStrings[$language])) {
return $... | [
"public",
"function",
"localize",
"(",
"array",
"$",
"translatableStrings",
")",
"{",
"if",
"(",
"NULL",
"===",
"$",
"translatableStrings",
")",
"{",
"return",
"NULL",
";",
"}",
"$",
"language",
"=",
"$",
"this",
"->",
"requestStack",
"->",
"getCurrentReques... | return the string in current locale if it exists.
If it does not exists; return the name in the first language available.
Return a blank string if any strings are available.
Return NULL if $translatableString is NULL
@param array $translatableStrings
@return string | [
"return",
"the",
"string",
"in",
"current",
"locale",
"if",
"it",
"exists",
"."
] | train | https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Templating/TranslatableStringHelper.php#L60-L84 |
OwlyCode/StreamingBird | src/Location/Circle.php | Circle.getBoundingBox | public function getBoundingBox()
{
// Calc bounding boxes
$maxLat = round($this->latitude + rad2deg($this->radius / self::EARTH_RADIUS_KM), 2);
$minLat = round($this->latitude - rad2deg($this->radius / self::EARTH_RADIUS_KM), 2);
// Compensate for degrees longitude getting smaller w... | php | public function getBoundingBox()
{
// Calc bounding boxes
$maxLat = round($this->latitude + rad2deg($this->radius / self::EARTH_RADIUS_KM), 2);
$minLat = round($this->latitude - rad2deg($this->radius / self::EARTH_RADIUS_KM), 2);
// Compensate for degrees longitude getting smaller w... | [
"public",
"function",
"getBoundingBox",
"(",
")",
"{",
"// Calc bounding boxes",
"$",
"maxLat",
"=",
"round",
"(",
"$",
"this",
"->",
"latitude",
"+",
"rad2deg",
"(",
"$",
"this",
"->",
"radius",
"/",
"self",
"::",
"EARTH_RADIUS_KM",
")",
",",
"2",
")",
... | {@inheritDoc} | [
"{"
] | train | https://github.com/OwlyCode/StreamingBird/blob/177fc8a9dc8f911865a5abd9ac8d4ef85cef4003/src/Location/Circle.php#L39-L50 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.