id int32 0 241k | repo stringlengths 6 63 | path stringlengths 5 140 | func_name stringlengths 3 151 | original_string stringlengths 84 13k | language stringclasses 1
value | code stringlengths 84 13k | code_tokens list | docstring stringlengths 3 47.2k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 91 247 |
|---|---|---|---|---|---|---|---|---|---|---|---|
19,300 | joomlatools/joomlatools-platform-legacy | code/exception/exception.php | JException.getProperties | public function getProperties($public = true)
{
JLog::add('JException::getProperties is deprecated.', JLog::WARNING, 'deprecated');
$vars = get_object_vars($this);
if ($public)
{
foreach ($vars as $key => $value)
{
if ('_' == substr($key, 0, 1))
{
unset($vars[$key]);
}
}
}
retu... | php | public function getProperties($public = true)
{
JLog::add('JException::getProperties is deprecated.', JLog::WARNING, 'deprecated');
$vars = get_object_vars($this);
if ($public)
{
foreach ($vars as $key => $value)
{
if ('_' == substr($key, 0, 1))
{
unset($vars[$key]);
}
}
}
retu... | [
"public",
"function",
"getProperties",
"(",
"$",
"public",
"=",
"true",
")",
"{",
"JLog",
"::",
"add",
"(",
"'JException::getProperties is deprecated.'",
",",
"JLog",
"::",
"WARNING",
",",
"'deprecated'",
")",
";",
"$",
"vars",
"=",
"get_object_vars",
"(",
"$"... | Returns an associative array of object properties
@param boolean $public If true, returns only the public properties
@return array Object properties
@deprecated 12.1
@see JException::get()
@since 11.1 | [
"Returns",
"an",
"associative",
"array",
"of",
"object",
"properties"
] | 3a76944e2f2c415faa6504754c75321a3b478c06 | https://github.com/joomlatools/joomlatools-platform-legacy/blob/3a76944e2f2c415faa6504754c75321a3b478c06/code/exception/exception.php#L242-L260 |
19,301 | ChadSikorra/php-simple-enum | src/Enums/EnumTrait.php | EnumTrait.isValidValue | public static function isValidValue($value, $strict = false)
{
static::initialize();
return (array_search($value, static::$constants, $strict) !== false);
} | php | public static function isValidValue($value, $strict = false)
{
static::initialize();
return (array_search($value, static::$constants, $strict) !== false);
} | [
"public",
"static",
"function",
"isValidValue",
"(",
"$",
"value",
",",
"$",
"strict",
"=",
"false",
")",
"{",
"static",
"::",
"initialize",
"(",
")",
";",
"return",
"(",
"array_search",
"(",
"$",
"value",
",",
"static",
"::",
"$",
"constants",
",",
"$... | Check if a specific enum exists by value.
@param $value
@param bool $strict
@return bool | [
"Check",
"if",
"a",
"specific",
"enum",
"exists",
"by",
"value",
"."
] | 781f87ae9f4cc75fb2edab6517c6471c0181e93b | https://github.com/ChadSikorra/php-simple-enum/blob/781f87ae9f4cc75fb2edab6517c6471c0181e93b/src/Enums/EnumTrait.php#L101-L106 |
19,302 | ChadSikorra/php-simple-enum | src/Enums/EnumTrait.php | EnumTrait.getValueName | public static function getValueName($value, $strict = false)
{
if (!static::isValidValue($value)) {
throw new \InvalidArgumentException('No enum name was found for the value supplied.');
}
return array_search($value, static::$constants, $strict);
} | php | public static function getValueName($value, $strict = false)
{
if (!static::isValidValue($value)) {
throw new \InvalidArgumentException('No enum name was found for the value supplied.');
}
return array_search($value, static::$constants, $strict);
} | [
"public",
"static",
"function",
"getValueName",
"(",
"$",
"value",
",",
"$",
"strict",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"static",
"::",
"isValidValue",
"(",
"$",
"value",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'No e... | Get the enum name from its value.
@param mixed $value
@param bool $strict
@return string | [
"Get",
"the",
"enum",
"name",
"from",
"its",
"value",
"."
] | 781f87ae9f4cc75fb2edab6517c6471c0181e93b | https://github.com/ChadSikorra/php-simple-enum/blob/781f87ae9f4cc75fb2edab6517c6471c0181e93b/src/Enums/EnumTrait.php#L115-L122 |
19,303 | ChadSikorra/php-simple-enum | src/Enums/EnumTrait.php | EnumTrait.getNameValue | public static function getNameValue($name)
{
static::initialize();
if (!static::isValidName($name)) {
throw new \InvalidArgumentException(sprintf(
'The enum name "%s" is not valid. Expected one of: %s',
$name,
implode(', ', static::names()... | php | public static function getNameValue($name)
{
static::initialize();
if (!static::isValidName($name)) {
throw new \InvalidArgumentException(sprintf(
'The enum name "%s" is not valid. Expected one of: %s',
$name,
implode(', ', static::names()... | [
"public",
"static",
"function",
"getNameValue",
"(",
"$",
"name",
")",
"{",
"static",
"::",
"initialize",
"(",
")",
";",
"if",
"(",
"!",
"static",
"::",
"isValidName",
"(",
"$",
"name",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"("... | Get the enum value from its name.
@param string $name
@return mixed | [
"Get",
"the",
"enum",
"value",
"from",
"its",
"name",
"."
] | 781f87ae9f4cc75fb2edab6517c6471c0181e93b | https://github.com/ChadSikorra/php-simple-enum/blob/781f87ae9f4cc75fb2edab6517c6471c0181e93b/src/Enums/EnumTrait.php#L130-L143 |
19,304 | ChadSikorra/php-simple-enum | src/Enums/EnumTrait.php | EnumTrait.initialize | protected static function initialize()
{
$class = static::class;
if (static::$constants === null) {
static::$constants = (new \ReflectionClass($class))->getConstants();
foreach (static::names() as $name) {
static::$lcKeyMap[strtolower($name)] = $name;
... | php | protected static function initialize()
{
$class = static::class;
if (static::$constants === null) {
static::$constants = (new \ReflectionClass($class))->getConstants();
foreach (static::names() as $name) {
static::$lcKeyMap[strtolower($name)] = $name;
... | [
"protected",
"static",
"function",
"initialize",
"(",
")",
"{",
"$",
"class",
"=",
"static",
"::",
"class",
";",
"if",
"(",
"static",
"::",
"$",
"constants",
"===",
"null",
")",
"{",
"static",
"::",
"$",
"constants",
"=",
"(",
"new",
"\\",
"ReflectionC... | Cache the enum array statically so we only have to do reflection a single time. | [
"Cache",
"the",
"enum",
"array",
"statically",
"so",
"we",
"only",
"have",
"to",
"do",
"reflection",
"a",
"single",
"time",
"."
] | 781f87ae9f4cc75fb2edab6517c6471c0181e93b | https://github.com/ChadSikorra/php-simple-enum/blob/781f87ae9f4cc75fb2edab6517c6471c0181e93b/src/Enums/EnumTrait.php#L148-L159 |
19,305 | barebone-php/barebone-core | lib/View.php | View.instance | public static function instance()
{
if (null === self::$_instance) {
self::$_instance = new Blade(
APP_ROOT . 'views',
PROJECT_ROOT . 'tmp' . DS . 'cache'
);
}
return self::$_instance;
} | php | public static function instance()
{
if (null === self::$_instance) {
self::$_instance = new Blade(
APP_ROOT . 'views',
PROJECT_ROOT . 'tmp' . DS . 'cache'
);
}
return self::$_instance;
} | [
"public",
"static",
"function",
"instance",
"(",
")",
"{",
"if",
"(",
"null",
"===",
"self",
"::",
"$",
"_instance",
")",
"{",
"self",
"::",
"$",
"_instance",
"=",
"new",
"Blade",
"(",
"APP_ROOT",
".",
"'views'",
",",
"PROJECT_ROOT",
".",
"'tmp'",
".",... | Instantiate Blade Renderer
@return Blade | [
"Instantiate",
"Blade",
"Renderer"
] | 7fda3a62d5fa103cdc4d2d34e1adf8f3ccbfe2bc | https://github.com/barebone-php/barebone-core/blob/7fda3a62d5fa103cdc4d2d34e1adf8f3ccbfe2bc/lib/View.php#L46-L55 |
19,306 | barebone-php/barebone-core | lib/View.php | View.render | public static function render($template, $data = [])
{
// @var \Illuminate\View\Factory $factory
$factory = self::instance()->view();
// @var \Illuminate\Contracts\View\View $view
$view = $factory->make($template, $data);
return $view->render();
} | php | public static function render($template, $data = [])
{
// @var \Illuminate\View\Factory $factory
$factory = self::instance()->view();
// @var \Illuminate\Contracts\View\View $view
$view = $factory->make($template, $data);
return $view->render();
} | [
"public",
"static",
"function",
"render",
"(",
"$",
"template",
",",
"$",
"data",
"=",
"[",
"]",
")",
"{",
"// @var \\Illuminate\\View\\Factory $factory",
"$",
"factory",
"=",
"self",
"::",
"instance",
"(",
")",
"->",
"view",
"(",
")",
";",
"// @var \\Illumi... | Render Blade template file with Data
@param string $template Relative path to a ".blade.php" file
@param array $data Associative array of variables names and values.
@return string HTML string | [
"Render",
"Blade",
"template",
"file",
"with",
"Data"
] | 7fda3a62d5fa103cdc4d2d34e1adf8f3ccbfe2bc | https://github.com/barebone-php/barebone-core/blob/7fda3a62d5fa103cdc4d2d34e1adf8f3ccbfe2bc/lib/View.php#L65-L74 |
19,307 | barebone-php/barebone-core | lib/View.php | View.renderJSON | public static function renderJSON($data = [], $flags = null)
{
if (is_null($flags)) {
$flags = JSON_HEX_TAG | JSON_HEX_APOS
| JSON_HEX_AMP | JSON_HEX_QUOT
| JSON_UNESCAPED_SLASHES;
}
json_encode(null); // clear json_last_error()
$result = ... | php | public static function renderJSON($data = [], $flags = null)
{
if (is_null($flags)) {
$flags = JSON_HEX_TAG | JSON_HEX_APOS
| JSON_HEX_AMP | JSON_HEX_QUOT
| JSON_UNESCAPED_SLASHES;
}
json_encode(null); // clear json_last_error()
$result = ... | [
"public",
"static",
"function",
"renderJSON",
"(",
"$",
"data",
"=",
"[",
"]",
",",
"$",
"flags",
"=",
"null",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"flags",
")",
")",
"{",
"$",
"flags",
"=",
"JSON_HEX_TAG",
"|",
"JSON_HEX_APOS",
"|",
"JSON_HEX_A... | Json Encode String with given flags
@param array $data Associative array of variables names and values.
@param integer $flags json_encode options
@throws InvalidArgumentException
@return string JSON string | [
"Json",
"Encode",
"String",
"with",
"given",
"flags"
] | 7fda3a62d5fa103cdc4d2d34e1adf8f3ccbfe2bc | https://github.com/barebone-php/barebone-core/blob/7fda3a62d5fa103cdc4d2d34e1adf8f3ccbfe2bc/lib/View.php#L85-L106 |
19,308 | PortaText/php-sdk | src/PortaText/Command/Api/Contacts.php | Contacts.setAll | public function setAll($variables)
{
$vars = array();
foreach ($variables as $k => $v) {
$vars[] = array('key' => $k, 'value' => $v);
}
return $this->setArgument("variables", $vars);
} | php | public function setAll($variables)
{
$vars = array();
foreach ($variables as $k => $v) {
$vars[] = array('key' => $k, 'value' => $v);
}
return $this->setArgument("variables", $vars);
} | [
"public",
"function",
"setAll",
"(",
"$",
"variables",
")",
"{",
"$",
"vars",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"variables",
"as",
"$",
"k",
"=>",
"$",
"v",
")",
"{",
"$",
"vars",
"[",
"]",
"=",
"array",
"(",
"'key'",
"=>",
"$",... | Sets all the given variables.
@param array $variables variables.
@return PortaText\Command\ICommand | [
"Sets",
"all",
"the",
"given",
"variables",
"."
] | dbe04ef043db5b251953f9de57aa4d0f1785dfcc | https://github.com/PortaText/php-sdk/blob/dbe04ef043db5b251953f9de57aa4d0f1785dfcc/src/PortaText/Command/Api/Contacts.php#L87-L94 |
19,309 | atkrad/data-tables | src/Extension/ColVis.php | ColVis.setStateChange | public function setStateChange($stateChange)
{
$hash = sha1($stateChange);
$this->properties['stateChange'] = $hash;
$this->callbacks[$hash] = $stateChange;
return $this;
} | php | public function setStateChange($stateChange)
{
$hash = sha1($stateChange);
$this->properties['stateChange'] = $hash;
$this->callbacks[$hash] = $stateChange;
return $this;
} | [
"public",
"function",
"setStateChange",
"(",
"$",
"stateChange",
")",
"{",
"$",
"hash",
"=",
"sha1",
"(",
"$",
"stateChange",
")",
";",
"$",
"this",
"->",
"properties",
"[",
"'stateChange'",
"]",
"=",
"$",
"hash",
";",
"$",
"this",
"->",
"callbacks",
"... | Set callback function to let you know when the state has changed.
@param callback $stateChange Callback function to let you know when the state has changed.
@return ColVis
@see http://datatables.net/extensions/colvis/options | [
"Set",
"callback",
"function",
"to",
"let",
"you",
"know",
"when",
"the",
"state",
"has",
"changed",
"."
] | 5afcc337ab624ca626e29d9674459c5105982b16 | https://github.com/atkrad/data-tables/blob/5afcc337ab624ca626e29d9674459c5105982b16/src/Extension/ColVis.php#L167-L174 |
19,310 | phug-php/formatter | src/Phug/Formatter/Element/AbstractMarkupElement.php | AbstractMarkupElement.belongsTo | public function belongsTo(array $tagList)
{
if (is_string($this->getName())) {
return in_array(strtolower($this->getName()), $tagList);
}
return false;
} | php | public function belongsTo(array $tagList)
{
if (is_string($this->getName())) {
return in_array(strtolower($this->getName()), $tagList);
}
return false;
} | [
"public",
"function",
"belongsTo",
"(",
"array",
"$",
"tagList",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"this",
"->",
"getName",
"(",
")",
")",
")",
"{",
"return",
"in_array",
"(",
"strtolower",
"(",
"$",
"this",
"->",
"getName",
"(",
")",
")",
... | Return true if the tag name is in the given list.
@param array $tagList
@return bool | [
"Return",
"true",
"if",
"the",
"tag",
"name",
"is",
"in",
"the",
"given",
"list",
"."
] | 3f9286a169a0d45b8b8acc1fae64e880ebdb567e | https://github.com/phug-php/formatter/blob/3f9286a169a0d45b8b8acc1fae64e880ebdb567e/src/Phug/Formatter/Element/AbstractMarkupElement.php#L19-L26 |
19,311 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseApiLog.php | BaseApiLog.setRemoteApp | public function setRemoteApp(RemoteApp $v = null)
{
if ($v === null) {
$this->setRemoteAppId(NULL);
} else {
$this->setRemoteAppId($v->getId());
}
$this->aRemoteApp = $v;
// Add binding for other direction of this n:n relationship.
// If this... | php | public function setRemoteApp(RemoteApp $v = null)
{
if ($v === null) {
$this->setRemoteAppId(NULL);
} else {
$this->setRemoteAppId($v->getId());
}
$this->aRemoteApp = $v;
// Add binding for other direction of this n:n relationship.
// If this... | [
"public",
"function",
"setRemoteApp",
"(",
"RemoteApp",
"$",
"v",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"v",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"setRemoteAppId",
"(",
"NULL",
")",
";",
"}",
"else",
"{",
"$",
"this",
"->",
"setRemoteAppId",
... | Declares an association between this object and a RemoteApp object.
@param RemoteApp $v
@return ApiLog The current object (for fluent API support)
@throws PropelException | [
"Declares",
"an",
"association",
"between",
"this",
"object",
"and",
"a",
"RemoteApp",
"object",
"."
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseApiLog.php#L1056-L1074 |
19,312 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseApiLog.php | BaseApiLog.getRemoteApp | public function getRemoteApp(PropelPDO $con = null, $doQuery = true)
{
if ($this->aRemoteApp === null && ($this->remote_app_id !== null) && $doQuery) {
$this->aRemoteApp = RemoteAppQuery::create()->findPk($this->remote_app_id, $con);
/* The following can be used additionally to
... | php | public function getRemoteApp(PropelPDO $con = null, $doQuery = true)
{
if ($this->aRemoteApp === null && ($this->remote_app_id !== null) && $doQuery) {
$this->aRemoteApp = RemoteAppQuery::create()->findPk($this->remote_app_id, $con);
/* The following can be used additionally to
... | [
"public",
"function",
"getRemoteApp",
"(",
"PropelPDO",
"$",
"con",
"=",
"null",
",",
"$",
"doQuery",
"=",
"true",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"aRemoteApp",
"===",
"null",
"&&",
"(",
"$",
"this",
"->",
"remote_app_id",
"!==",
"null",
")",
... | Get the associated RemoteApp object
@param PropelPDO $con Optional Connection object.
@param $doQuery Executes a query to get the object if required
@return RemoteApp The associated RemoteApp object.
@throws PropelException | [
"Get",
"the",
"associated",
"RemoteApp",
"object"
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseApiLog.php#L1085-L1099 |
19,313 | apioo/psx-sandbox | src/Parser.php | Parser.parse | public function parse($code)
{
$parser = $this->parserFactory->create($this->parserType);
try {
$ast = $parser->parse($code);
} catch (Error $error) {
throw new ParseException($error->getMessage(), 0, $error);
}
$printer = new Printer($this->security... | php | public function parse($code)
{
$parser = $this->parserFactory->create($this->parserType);
try {
$ast = $parser->parse($code);
} catch (Error $error) {
throw new ParseException($error->getMessage(), 0, $error);
}
$printer = new Printer($this->security... | [
"public",
"function",
"parse",
"(",
"$",
"code",
")",
"{",
"$",
"parser",
"=",
"$",
"this",
"->",
"parserFactory",
"->",
"create",
"(",
"$",
"this",
"->",
"parserType",
")",
";",
"try",
"{",
"$",
"ast",
"=",
"$",
"parser",
"->",
"parse",
"(",
"$",
... | Parses untrusted PHP code and returns a secure version which only
contains safe calls. Throws an exception in case the code contains
untrusted calls
@throws \PSX\Sandbox\SecurityException
@throws \PSX\Sandbox\ParseException
@param string $code
@return string | [
"Parses",
"untrusted",
"PHP",
"code",
"and",
"returns",
"a",
"secure",
"version",
"which",
"only",
"contains",
"safe",
"calls",
".",
"Throws",
"an",
"exception",
"in",
"case",
"the",
"code",
"contains",
"untrusted",
"calls"
] | 5d136a398da375056e6526bbbc85d7f5d3df9441 | https://github.com/apioo/psx-sandbox/blob/5d136a398da375056e6526bbbc85d7f5d3df9441/src/Parser.php#L67-L79 |
19,314 | fubhy/graphql-php | src/Language/Lexer.php | Lexer.positionAfterWhitespace | protected function positionAfterWhitespace($start)
{
$position = $start;
$length = $this->source->getLength();
while ($start < $length) {
$code = $this->charCodeAt($position);
// Skip whitespace.
if (
$code === 32 || // space
... | php | protected function positionAfterWhitespace($start)
{
$position = $start;
$length = $this->source->getLength();
while ($start < $length) {
$code = $this->charCodeAt($position);
// Skip whitespace.
if (
$code === 32 || // space
... | [
"protected",
"function",
"positionAfterWhitespace",
"(",
"$",
"start",
")",
"{",
"$",
"position",
"=",
"$",
"start",
";",
"$",
"length",
"=",
"$",
"this",
"->",
"source",
"->",
"getLength",
"(",
")",
";",
"while",
"(",
"$",
"start",
"<",
"$",
"length",... | Reads from body starting at startPosition until it finds a non-whitespace
or commented character, then returns the position of that character for
lexing.
@param int $start
@return int | [
"Reads",
"from",
"body",
"starting",
"at",
"startPosition",
"until",
"it",
"finds",
"a",
"non",
"-",
"whitespace",
"or",
"commented",
"character",
"then",
"returns",
"the",
"position",
"of",
"that",
"character",
"for",
"lexing",
"."
] | c1de2233c731ca29e5c5db4c43f3b9db36478c83 | https://github.com/fubhy/graphql-php/blob/c1de2233c731ca29e5c5db4c43f3b9db36478c83/src/Language/Lexer.php#L28-L63 |
19,315 | fubhy/graphql-php | src/Language/Lexer.php | Lexer.readNumber | protected function readNumber($start, $code)
{
$position = $start;
$type = Token::INT_TYPE;
if ($code === 45) { // -
$code = $this->charCodeAt(++$position);
}
if ($code === 48) { // 0
$code = $this->charCodeAt(++$position);
} elseif ($code >=... | php | protected function readNumber($start, $code)
{
$position = $start;
$type = Token::INT_TYPE;
if ($code === 45) { // -
$code = $this->charCodeAt(++$position);
}
if ($code === 48) { // 0
$code = $this->charCodeAt(++$position);
} elseif ($code >=... | [
"protected",
"function",
"readNumber",
"(",
"$",
"start",
",",
"$",
"code",
")",
"{",
"$",
"position",
"=",
"$",
"start",
";",
"$",
"type",
"=",
"Token",
"::",
"INT_TYPE",
";",
"if",
"(",
"$",
"code",
"===",
"45",
")",
"{",
"// -",
"$",
"code",
"... | Reads a number token from the source file, either a float or an int
depending on whether a decimal point appears.
Int: -?(0|[1-9][0-9]*)
Float: -?(0|[1-9][0-9]*)\.[0-9]+(e-?[0-9]+)?
@param int $start
@param int $code
@return \Fubhy\GraphQL\Language\Token
@throws \Exception | [
"Reads",
"a",
"number",
"token",
"from",
"the",
"source",
"file",
"either",
"a",
"float",
"or",
"an",
"int",
"depending",
"on",
"whether",
"a",
"decimal",
"point",
"appears",
"."
] | c1de2233c731ca29e5c5db4c43f3b9db36478c83 | https://github.com/fubhy/graphql-php/blob/c1de2233c731ca29e5c5db4c43f3b9db36478c83/src/Language/Lexer.php#L168-L220 |
19,316 | fubhy/graphql-php | src/Language/Lexer.php | Lexer.readName | protected function readName($position)
{
$end = $position + 1;
$length = $this->source->getLength();
$body = $this->source->getBody();
while (
$end < $length &&
($code = $this->charCodeAt($end)) &&
(
$code === 95 || // _
... | php | protected function readName($position)
{
$end = $position + 1;
$length = $this->source->getLength();
$body = $this->source->getBody();
while (
$end < $length &&
($code = $this->charCodeAt($end)) &&
(
$code === 95 || // _
... | [
"protected",
"function",
"readName",
"(",
"$",
"position",
")",
"{",
"$",
"end",
"=",
"$",
"position",
"+",
"1",
";",
"$",
"length",
"=",
"$",
"this",
"->",
"source",
"->",
"getLength",
"(",
")",
";",
"$",
"body",
"=",
"$",
"this",
"->",
"source",
... | Reads an alphanumeric + underscore name from the source.
[_A-Za-z][_0-9A-Za-z]*
@param int $position
@return \Fubhy\GraphQL\Language\Token | [
"Reads",
"an",
"alphanumeric",
"+",
"underscore",
"name",
"from",
"the",
"source",
"."
] | c1de2233c731ca29e5c5db4c43f3b9db36478c83 | https://github.com/fubhy/graphql-php/blob/c1de2233c731ca29e5c5db4c43f3b9db36478c83/src/Language/Lexer.php#L319-L340 |
19,317 | fubhy/graphql-php | src/Language/Lexer.php | Lexer.charCodeAt | protected function charCodeAt($index)
{
$body = $this->source->getBody();
$char = mb_substr($body, $index, 1, 'UTF-8');
if (mb_check_encoding($char, 'UTF-8')) {
return hexdec(bin2hex(mb_convert_encoding($char, 'UTF-32BE', 'UTF-8')));
} else {
return NULL;
... | php | protected function charCodeAt($index)
{
$body = $this->source->getBody();
$char = mb_substr($body, $index, 1, 'UTF-8');
if (mb_check_encoding($char, 'UTF-8')) {
return hexdec(bin2hex(mb_convert_encoding($char, 'UTF-32BE', 'UTF-8')));
} else {
return NULL;
... | [
"protected",
"function",
"charCodeAt",
"(",
"$",
"index",
")",
"{",
"$",
"body",
"=",
"$",
"this",
"->",
"source",
"->",
"getBody",
"(",
")",
";",
"$",
"char",
"=",
"mb_substr",
"(",
"$",
"body",
",",
"$",
"index",
",",
"1",
",",
"'UTF-8'",
")",
... | Implementation of JavaScript's String.prototype.charCodeAt function.
@param int $index
@return null|number | [
"Implementation",
"of",
"JavaScript",
"s",
"String",
".",
"prototype",
".",
"charCodeAt",
"function",
"."
] | c1de2233c731ca29e5c5db4c43f3b9db36478c83 | https://github.com/fubhy/graphql-php/blob/c1de2233c731ca29e5c5db4c43f3b9db36478c83/src/Language/Lexer.php#L349-L359 |
19,318 | fubhy/graphql-php | src/Language/Lexer.php | Lexer.char2hex | protected function char2hex($a)
{
return
$a >= 48 && $a <= 57 ? $a - 48 : // 0-9
($a >= 65 && $a <= 70 ? $a - 55 : // A-F
($a >= 97 && $a <= 102 ? $a - 87 : -1)); // a-f
} | php | protected function char2hex($a)
{
return
$a >= 48 && $a <= 57 ? $a - 48 : // 0-9
($a >= 65 && $a <= 70 ? $a - 55 : // A-F
($a >= 97 && $a <= 102 ? $a - 87 : -1)); // a-f
} | [
"protected",
"function",
"char2hex",
"(",
"$",
"a",
")",
"{",
"return",
"$",
"a",
">=",
"48",
"&&",
"$",
"a",
"<=",
"57",
"?",
"$",
"a",
"-",
"48",
":",
"// 0-9",
"(",
"$",
"a",
">=",
"65",
"&&",
"$",
"a",
"<=",
"70",
"?",
"$",
"a",
"-",
... | Converts a hex character to its integer value.
'0' becomes 0, '9' becomes 9
'A' becomes 10, 'F' becomes 15
'a' becomes 10, 'f' becomes 15
Returns -1 on error.
@param $a
@return int | [
"Converts",
"a",
"hex",
"character",
"to",
"its",
"integer",
"value",
".",
"0",
"becomes",
"0",
"9",
"becomes",
"9",
"A",
"becomes",
"10",
"F",
"becomes",
"15",
"a",
"becomes",
"10",
"f",
"becomes",
"15"
] | c1de2233c731ca29e5c5db4c43f3b9db36478c83 | https://github.com/fubhy/graphql-php/blob/c1de2233c731ca29e5c5db4c43f3b9db36478c83/src/Language/Lexer.php#L408-L414 |
19,319 | webforge-labs/psc-cms | lib/Psc/Doctrine/NestedSetFixture.php | NestedSetFixture.convertNodes | protected function convertNodes(Array $nodes, $em) {
// our test project (this) is defined to have only de as i18n but dont get confused, these are english wordings
$navigationNodes = array();
foreach ($nodes as $node) {
$node = (object) $node;
$navigationNode = $this->createNode(array('de'=>$n... | php | protected function convertNodes(Array $nodes, $em) {
// our test project (this) is defined to have only de as i18n but dont get confused, these are english wordings
$navigationNodes = array();
foreach ($nodes as $node) {
$node = (object) $node;
$navigationNode = $this->createNode(array('de'=>$n... | [
"protected",
"function",
"convertNodes",
"(",
"Array",
"$",
"nodes",
",",
"$",
"em",
")",
"{",
"// our test project (this) is defined to have only de as i18n but dont get confused, these are english wordings",
"$",
"navigationNodes",
"=",
"array",
"(",
")",
";",
"foreach",
... | we elevate every node to an entity and set parent pointers | [
"we",
"elevate",
"every",
"node",
"to",
"an",
"entity",
"and",
"set",
"parent",
"pointers"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/Doctrine/NestedSetFixture.php#L47-L75 |
19,320 | vorbind/influx-analytics | src/Mapper/AnalyticsMapper.php | AnalyticsMapper.getRpPoints | public function getRpPoints($rp, $metric, $tags, $granularity, $startDt = null, $endDt = null, $timezone = 'utc') {
if (null == $rp || null == $metric) {
return [];
}
$where = [];
$query = $this->db->getQueryBuilder()
->retentionPoli... | php | public function getRpPoints($rp, $metric, $tags, $granularity, $startDt = null, $endDt = null, $timezone = 'utc') {
if (null == $rp || null == $metric) {
return [];
}
$where = [];
$query = $this->db->getQueryBuilder()
->retentionPoli... | [
"public",
"function",
"getRpPoints",
"(",
"$",
"rp",
",",
"$",
"metric",
",",
"$",
"tags",
",",
"$",
"granularity",
",",
"$",
"startDt",
"=",
"null",
",",
"$",
"endDt",
"=",
"null",
",",
"$",
"timezone",
"=",
"'utc'",
")",
"{",
"if",
"(",
"null",
... | Get points from retention policy
@param string $rp
@param string $metric
@param array $tags
@param string $granularity
@param string $startDt
@param string $endDt
@param string $timezone
@return array | [
"Get",
"points",
"from",
"retention",
"policy"
] | 8c0c150351f045ccd3d57063f2b3b50a2c926e3e | https://github.com/vorbind/influx-analytics/blob/8c0c150351f045ccd3d57063f2b3b50a2c926e3e/src/Mapper/AnalyticsMapper.php#L57-L96 |
19,321 | vorbind/influx-analytics | src/Mapper/AnalyticsMapper.php | AnalyticsMapper.getPoints | public function getPoints($metric, $tags, $granularity, $endDt, $timezone = 'utc') {
if ( null == $metric ) {
return [];
}
$where = [];
$now = $this->normalizeUTC(date("Y-m-d H:i:s"));
$min = intval(date('i'));
$minutes = $min > 45 ? 45 : ( ... | php | public function getPoints($metric, $tags, $granularity, $endDt, $timezone = 'utc') {
if ( null == $metric ) {
return [];
}
$where = [];
$now = $this->normalizeUTC(date("Y-m-d H:i:s"));
$min = intval(date('i'));
$minutes = $min > 45 ? 45 : ( ... | [
"public",
"function",
"getPoints",
"(",
"$",
"metric",
",",
"$",
"tags",
",",
"$",
"granularity",
",",
"$",
"endDt",
",",
"$",
"timezone",
"=",
"'utc'",
")",
"{",
"if",
"(",
"null",
"==",
"$",
"metric",
")",
"{",
"return",
"[",
"]",
";",
"}",
"$"... | Get points from default retention policy
@param string $metric
@param array $tags
@param string $granularity
@param string $endDt
@param string $timezone
@return array | [
"Get",
"points",
"from",
"default",
"retention",
"policy"
] | 8c0c150351f045ccd3d57063f2b3b50a2c926e3e | https://github.com/vorbind/influx-analytics/blob/8c0c150351f045ccd3d57063f2b3b50a2c926e3e/src/Mapper/AnalyticsMapper.php#L108-L147 |
19,322 | vorbind/influx-analytics | src/Mapper/AnalyticsMapper.php | AnalyticsMapper.getRpSum | public function getRpSum($rp, $metric, $tags, $startDt = null, $endDt = null) {
if (null == $rp || null == $metric) {
return 0;
}
$where = [];
if (isset($startDt)) {
$where[] = "time >= '" . $startDt . "'";
}
if (!isset($... | php | public function getRpSum($rp, $metric, $tags, $startDt = null, $endDt = null) {
if (null == $rp || null == $metric) {
return 0;
}
$where = [];
if (isset($startDt)) {
$where[] = "time >= '" . $startDt . "'";
}
if (!isset($... | [
"public",
"function",
"getRpSum",
"(",
"$",
"rp",
",",
"$",
"metric",
",",
"$",
"tags",
",",
"$",
"startDt",
"=",
"null",
",",
"$",
"endDt",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"==",
"$",
"rp",
"||",
"null",
"==",
"$",
"metric",
")",
"{",... | Get total from retention policy
@param string $rp
@param string $metric
@param array $tags
@param string $startDt
@param string $endDt
@return int | [
"Get",
"total",
"from",
"retention",
"policy"
] | 8c0c150351f045ccd3d57063f2b3b50a2c926e3e | https://github.com/vorbind/influx-analytics/blob/8c0c150351f045ccd3d57063f2b3b50a2c926e3e/src/Mapper/AnalyticsMapper.php#L159-L188 |
19,323 | vorbind/influx-analytics | src/Mapper/AnalyticsMapper.php | AnalyticsMapper.getSum | public function getSum($metric, $tags, $endDt = null) {
if (null == $metric) {
return 0;
}
$min = intval(date('i'));
$minutes = $min > 45 ? 45 : ( $min > 30 ? 30 : ( $min > 15 ? 15 : '00') );
$lastHourDt = date("Y-m-d") . "T" . date('H') . ":$minutes:0... | php | public function getSum($metric, $tags, $endDt = null) {
if (null == $metric) {
return 0;
}
$min = intval(date('i'));
$minutes = $min > 45 ? 45 : ( $min > 30 ? 30 : ( $min > 15 ? 15 : '00') );
$lastHourDt = date("Y-m-d") . "T" . date('H') . ":$minutes:0... | [
"public",
"function",
"getSum",
"(",
"$",
"metric",
",",
"$",
"tags",
",",
"$",
"endDt",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"==",
"$",
"metric",
")",
"{",
"return",
"0",
";",
"}",
"$",
"min",
"=",
"intval",
"(",
"date",
"(",
"'i'",
")",
... | Get total from default retention policy
@param string $metric
@param array $tags
@param string $endDt
@return int | [
"Get",
"total",
"from",
"default",
"retention",
"policy"
] | 8c0c150351f045ccd3d57063f2b3b50a2c926e3e | https://github.com/vorbind/influx-analytics/blob/8c0c150351f045ccd3d57063f2b3b50a2c926e3e/src/Mapper/AnalyticsMapper.php#L198-L231 |
19,324 | ppetermann/king23 | src/Http/Application.php | Application.run | public function run()
{
/** @var ResponseInterface $response */
$response = $this->queue->handle($this->request);
// http status
$reasonPhrase = $response->getReasonPhrase();
$reasonPhrase = ($reasonPhrase ? ' '.$reasonPhrase : '');
header(sprintf('HTTP/%s %d%s', $re... | php | public function run()
{
/** @var ResponseInterface $response */
$response = $this->queue->handle($this->request);
// http status
$reasonPhrase = $response->getReasonPhrase();
$reasonPhrase = ($reasonPhrase ? ' '.$reasonPhrase : '');
header(sprintf('HTTP/%s %d%s', $re... | [
"public",
"function",
"run",
"(",
")",
"{",
"/** @var ResponseInterface $response */",
"$",
"response",
"=",
"$",
"this",
"->",
"queue",
"->",
"handle",
"(",
"$",
"this",
"->",
"request",
")",
";",
"// http status",
"$",
"reasonPhrase",
"=",
"$",
"response",
... | run a http based application | [
"run",
"a",
"http",
"based",
"application"
] | 603896083ec89f5ac4d744abd3b1b4db3e914c95 | https://github.com/ppetermann/king23/blob/603896083ec89f5ac4d744abd3b1b4db3e914c95/src/Http/Application.php#L66-L85 |
19,325 | RobinDumontChaponet/TransitiveCore | src/simple/View.php | View.cacheBust | public static function cacheBust(string $src): string
{
if(!file_exists($src))
return $src;
$path = pathinfo($src);
return $path['dirname'].'/'.$path['filename'].'.'.filemtime($src).'.'.$path['extension'];
} | php | public static function cacheBust(string $src): string
{
if(!file_exists($src))
return $src;
$path = pathinfo($src);
return $path['dirname'].'/'.$path['filename'].'.'.filemtime($src).'.'.$path['extension'];
} | [
"public",
"static",
"function",
"cacheBust",
"(",
"string",
"$",
"src",
")",
":",
"string",
"{",
"if",
"(",
"!",
"file_exists",
"(",
"$",
"src",
")",
")",
"return",
"$",
"src",
";",
"$",
"path",
"=",
"pathinfo",
"(",
"$",
"src",
")",
";",
"return",... | cacheBust function.
@param string $src
@return string | [
"cacheBust",
"function",
"."
] | b83dd6fe0e49b8773de0f60861e5a5c306e2a38d | https://github.com/RobinDumontChaponet/TransitiveCore/blob/b83dd6fe0e49b8773de0f60861e5a5c306e2a38d/src/simple/View.php#L37-L45 |
19,326 | RobinDumontChaponet/TransitiveCore | src/simple/View.php | View.getTitle | public function getTitle(string $prefix = '', string $separator = ' | ', string $sufix = ''): string
{
if(empty($this->getTitleValue()))
$separator = '';
return $prefix.$separator.$this->getTitleValue().$sufix;
} | php | public function getTitle(string $prefix = '', string $separator = ' | ', string $sufix = ''): string
{
if(empty($this->getTitleValue()))
$separator = '';
return $prefix.$separator.$this->getTitleValue().$sufix;
} | [
"public",
"function",
"getTitle",
"(",
"string",
"$",
"prefix",
"=",
"''",
",",
"string",
"$",
"separator",
"=",
"' | '",
",",
"string",
"$",
"sufix",
"=",
"''",
")",
":",
"string",
"{",
"if",
"(",
"empty",
"(",
"$",
"this",
"->",
"getTitleValue",
"(... | Get the view's title. | [
"Get",
"the",
"view",
"s",
"title",
"."
] | b83dd6fe0e49b8773de0f60861e5a5c306e2a38d | https://github.com/RobinDumontChaponet/TransitiveCore/blob/b83dd6fe0e49b8773de0f60861e5a5c306e2a38d/src/simple/View.php#L78-L84 |
19,327 | leedavis81/altr-ego | library/AltrEgo/Adapter/Php53.php | Php53.getReflectionProperty | protected function getReflectionProperty($name)
{
do
{
$reflClass = (!isset($reflClass)) ? new \ReflectionClass($this->getObject()) : $reflClass;
$property = $reflClass->getProperty($name);
if (isset($property))
{
break;
}
... | php | protected function getReflectionProperty($name)
{
do
{
$reflClass = (!isset($reflClass)) ? new \ReflectionClass($this->getObject()) : $reflClass;
$property = $reflClass->getProperty($name);
if (isset($property))
{
break;
}
... | [
"protected",
"function",
"getReflectionProperty",
"(",
"$",
"name",
")",
"{",
"do",
"{",
"$",
"reflClass",
"=",
"(",
"!",
"isset",
"(",
"$",
"reflClass",
")",
")",
"?",
"new",
"\\",
"ReflectionClass",
"(",
"$",
"this",
"->",
"getObject",
"(",
")",
")",... | Get a reflection property - may need to iterate through class parents
@param string $name | [
"Get",
"a",
"reflection",
"property",
"-",
"may",
"need",
"to",
"iterate",
"through",
"class",
"parents"
] | 1556556a33c2b6caddef94444522c5bbffc217c7 | https://github.com/leedavis81/altr-ego/blob/1556556a33c2b6caddef94444522c5bbffc217c7/library/AltrEgo/Adapter/Php53.php#L142-L162 |
19,328 | php-rise/rise | src/Template.php | Template.render | public function render($template = '', $data = []) {
if (!isset($this->blocks[$template])) {
$this->blocks[$template] = $this->blockFactory->create($template);
}
$block = $this->blocks[$template];
$block->setData($data);
return $block->render();
} | php | public function render($template = '', $data = []) {
if (!isset($this->blocks[$template])) {
$this->blocks[$template] = $this->blockFactory->create($template);
}
$block = $this->blocks[$template];
$block->setData($data);
return $block->render();
} | [
"public",
"function",
"render",
"(",
"$",
"template",
"=",
"''",
",",
"$",
"data",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"blocks",
"[",
"$",
"template",
"]",
")",
")",
"{",
"$",
"this",
"->",
"blocks",
"[",
... | Render a block.
@param string $template
@param array $data
@return string | [
"Render",
"a",
"block",
"."
] | cd14ef9956f1b6875b7bcd642545dcef6a9152b7 | https://github.com/php-rise/rise/blob/cd14ef9956f1b6875b7bcd642545dcef6a9152b7/src/Template.php#L32-L39 |
19,329 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseLicenseQuery.php | BaseLicenseQuery.create | public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof LicenseQuery) {
return $criteria;
}
$query = new LicenseQuery(null, null, $modelAlias);
if ($criteria instanceof Criteria) {
$query->mergeWith($criteria);
}... | php | public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof LicenseQuery) {
return $criteria;
}
$query = new LicenseQuery(null, null, $modelAlias);
if ($criteria instanceof Criteria) {
$query->mergeWith($criteria);
}... | [
"public",
"static",
"function",
"create",
"(",
"$",
"modelAlias",
"=",
"null",
",",
"$",
"criteria",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"criteria",
"instanceof",
"LicenseQuery",
")",
"{",
"return",
"$",
"criteria",
";",
"}",
"$",
"query",
"=",
"new... | Returns a new LicenseQuery object.
@param string $modelAlias The alias of a model in the query
@param LicenseQuery|Criteria $criteria Optional Criteria to build the query from
@return LicenseQuery | [
"Returns",
"a",
"new",
"LicenseQuery",
"object",
"."
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseLicenseQuery.php#L76-L88 |
19,330 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseLicenseQuery.php | BaseLicenseQuery.filterByMaxClients | public function filterByMaxClients($maxClients = null, $comparison = null)
{
if (is_array($maxClients)) {
$useMinMax = false;
if (isset($maxClients['min'])) {
$this->addUsingAlias(LicensePeer::MAX_CLIENTS, $maxClients['min'], Criteria::GREATER_EQUAL);
... | php | public function filterByMaxClients($maxClients = null, $comparison = null)
{
if (is_array($maxClients)) {
$useMinMax = false;
if (isset($maxClients['min'])) {
$this->addUsingAlias(LicensePeer::MAX_CLIENTS, $maxClients['min'], Criteria::GREATER_EQUAL);
... | [
"public",
"function",
"filterByMaxClients",
"(",
"$",
"maxClients",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"maxClients",
")",
")",
"{",
"$",
"useMinMax",
"=",
"false",
";",
"if",
"(",
"isset",
"(",
... | Filter the query on the max_clients column
Example usage:
<code>
$query->filterByMaxClients(1234); // WHERE max_clients = 1234
$query->filterByMaxClients(array(12, 34)); // WHERE max_clients IN (12, 34)
$query->filterByMaxClients(array('min' => 12)); // WHERE max_clients >= 12
$query->filterByMaxClients(array('max' =>... | [
"Filter",
"the",
"query",
"on",
"the",
"max_clients",
"column"
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseLicenseQuery.php#L302-L323 |
19,331 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseLicenseQuery.php | BaseLicenseQuery.filterByDomain | public function filterByDomain($domain = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($domain)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $domain)) {
$domain = str_replace('*', '%', $domain);
... | php | public function filterByDomain($domain = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($domain)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $domain)) {
$domain = str_replace('*', '%', $domain);
... | [
"public",
"function",
"filterByDomain",
"(",
"$",
"domain",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"comparison",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"domain",
")",
")",
"{",
"$",
"comparison"... | Filter the query on the domain column
Example usage:
<code>
$query->filterByDomain('fooValue'); // WHERE domain = 'fooValue'
$query->filterByDomain('%fooValue%'); // WHERE domain LIKE '%fooValue%'
</code>
@param string $domain The value to use as filter.
Accepts wildcards (* and % trigger a LIKE)
@param str... | [
"Filter",
"the",
"query",
"on",
"the",
"domain",
"column"
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseLicenseQuery.php#L340-L352 |
19,332 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseLicenseQuery.php | BaseLicenseQuery.filterByValidUntil | public function filterByValidUntil($validUntil = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($validUntil)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $validUntil)) {
$validUntil = str_replace('*', '%', $vali... | php | public function filterByValidUntil($validUntil = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($validUntil)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $validUntil)) {
$validUntil = str_replace('*', '%', $vali... | [
"public",
"function",
"filterByValidUntil",
"(",
"$",
"validUntil",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"comparison",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"validUntil",
")",
")",
"{",
"$",
... | Filter the query on the valid_until column
Example usage:
<code>
$query->filterByValidUntil('fooValue'); // WHERE valid_until = 'fooValue'
$query->filterByValidUntil('%fooValue%'); // WHERE valid_until LIKE '%fooValue%'
</code>
@param string $validUntil The value to use as filter.
Accepts wildcards (* and % tri... | [
"Filter",
"the",
"query",
"on",
"the",
"valid_until",
"column"
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseLicenseQuery.php#L369-L381 |
19,333 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseLicenseQuery.php | BaseLicenseQuery.filterBySerial | public function filterBySerial($serial = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($serial)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $serial)) {
$serial = str_replace('*', '%', $serial);
... | php | public function filterBySerial($serial = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($serial)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $serial)) {
$serial = str_replace('*', '%', $serial);
... | [
"public",
"function",
"filterBySerial",
"(",
"$",
"serial",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"comparison",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"serial",
")",
")",
"{",
"$",
"comparison"... | Filter the query on the serial column
Example usage:
<code>
$query->filterBySerial('fooValue'); // WHERE serial = 'fooValue'
$query->filterBySerial('%fooValue%'); // WHERE serial LIKE '%fooValue%'
</code>
@param string $serial The value to use as filter.
Accepts wildcards (* and % trigger a LIKE)
@param str... | [
"Filter",
"the",
"query",
"on",
"the",
"serial",
"column"
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseLicenseQuery.php#L398-L410 |
19,334 | nyeholt/silverstripe-external-content | thirdparty/Zend/Feed/Element.php | Zend_Feed_Element.setDOM | public function setDOM(DOMElement $element)
{
$this->_element = $this->_element->ownerDocument->importNode($element, true);
} | php | public function setDOM(DOMElement $element)
{
$this->_element = $this->_element->ownerDocument->importNode($element, true);
} | [
"public",
"function",
"setDOM",
"(",
"DOMElement",
"$",
"element",
")",
"{",
"$",
"this",
"->",
"_element",
"=",
"$",
"this",
"->",
"_element",
"->",
"ownerDocument",
"->",
"importNode",
"(",
"$",
"element",
",",
"true",
")",
";",
"}"
] | Update the object from a DOM element
Take a DOMElement object, which may be originally from a call
to getDOM() or may be custom created, and use it as the
DOM tree for this Zend_Feed_Element.
@param DOMElement $element
@return void | [
"Update",
"the",
"object",
"from",
"a",
"DOM",
"element"
] | 1c6da8c56ef717225ff904e1522aff94ed051601 | https://github.com/nyeholt/silverstripe-external-content/blob/1c6da8c56ef717225ff904e1522aff94ed051601/thirdparty/Zend/Feed/Element.php#L87-L90 |
19,335 | nyeholt/silverstripe-external-content | thirdparty/Zend/Feed/Element.php | Zend_Feed_Element.ensureAppended | protected function ensureAppended()
{
if (!$this->_appended) {
$this->_parentElement->getDOM()->appendChild($this->_element);
$this->_appended = true;
$this->_parentElement->ensureAppended();
}
} | php | protected function ensureAppended()
{
if (!$this->_appended) {
$this->_parentElement->getDOM()->appendChild($this->_element);
$this->_appended = true;
$this->_parentElement->ensureAppended();
}
} | [
"protected",
"function",
"ensureAppended",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_appended",
")",
"{",
"$",
"this",
"->",
"_parentElement",
"->",
"getDOM",
"(",
")",
"->",
"appendChild",
"(",
"$",
"this",
"->",
"_element",
")",
";",
"$",
... | Appends this element to its parent if necessary.
@return void | [
"Appends",
"this",
"element",
"to",
"its",
"parent",
"if",
"necessary",
"."
] | 1c6da8c56ef717225ff904e1522aff94ed051601 | https://github.com/nyeholt/silverstripe-external-content/blob/1c6da8c56ef717225ff904e1522aff94ed051601/thirdparty/Zend/Feed/Element.php#L111-L118 |
19,336 | nyeholt/silverstripe-external-content | thirdparty/Zend/Feed/Element.php | Zend_Feed_Element.__isset | public function __isset($var)
{
// Look for access of the form {ns:var}. We don't use
// _children() here because we can break out of the loop
// immediately once we find something.
if (strpos($var, ':') !== false) {
list($ns, $elt) = explode(':', $var, 2);
fo... | php | public function __isset($var)
{
// Look for access of the form {ns:var}. We don't use
// _children() here because we can break out of the loop
// immediately once we find something.
if (strpos($var, ':') !== false) {
list($ns, $elt) = explode(':', $var, 2);
fo... | [
"public",
"function",
"__isset",
"(",
"$",
"var",
")",
"{",
"// Look for access of the form {ns:var}. We don't use",
"// _children() here because we can break out of the loop",
"// immediately once we find something.",
"if",
"(",
"strpos",
"(",
"$",
"var",
",",
"':'",
")",
"!... | Map isset calls onto the underlying entry representation.
@param string $var
@return boolean | [
"Map",
"isset",
"calls",
"onto",
"the",
"underlying",
"entry",
"representation",
"."
] | 1c6da8c56ef717225ff904e1522aff94ed051601 | https://github.com/nyeholt/silverstripe-external-content/blob/1c6da8c56ef717225ff904e1522aff94ed051601/thirdparty/Zend/Feed/Element.php#L231-L250 |
19,337 | CakeCMS/Core | src/View/Widget/MaterializeCss/TextareaWidget.php | TextareaWidget.render | public function render(array $data, ContextInterface $context)
{
$data = array_merge(['class' => null], $data);
$data['class'] .= ' materialize-textarea';
$data['class'] = Str::trim($data['class']);
return parent::render($data, $context);
} | php | public function render(array $data, ContextInterface $context)
{
$data = array_merge(['class' => null], $data);
$data['class'] .= ' materialize-textarea';
$data['class'] = Str::trim($data['class']);
return parent::render($data, $context);
} | [
"public",
"function",
"render",
"(",
"array",
"$",
"data",
",",
"ContextInterface",
"$",
"context",
")",
"{",
"$",
"data",
"=",
"array_merge",
"(",
"[",
"'class'",
"=>",
"null",
"]",
",",
"$",
"data",
")",
";",
"$",
"data",
"[",
"'class'",
"]",
".=",... | Render a text area form widget.
Data supports the following keys:
- `name` - Set the input name.
- `val` - A string of the option to mark as selected.
- `escape` - Set to false to disable HTML escaping.
All other keys will be converted into HTML attributes.
@param array $data The data to build a textarea with.
@p... | [
"Render",
"a",
"text",
"area",
"form",
"widget",
"."
] | f9cba7aa0043a10e5c35bd45fbad158688a09a96 | https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/View/Widget/MaterializeCss/TextareaWidget.php#L45-L53 |
19,338 | CPSB/Validation-helper | src/Form.php | Form.input | public function input($name, $default = null)
{
$value = e($this->value($name, $default));
$name = e($name);
return "name=\"$name\" value=\"$value\"";
} | php | public function input($name, $default = null)
{
$value = e($this->value($name, $default));
$name = e($name);
return "name=\"$name\" value=\"$value\"";
} | [
"public",
"function",
"input",
"(",
"$",
"name",
",",
"$",
"default",
"=",
"null",
")",
"{",
"$",
"value",
"=",
"e",
"(",
"$",
"this",
"->",
"value",
"(",
"$",
"name",
",",
"$",
"default",
")",
")",
";",
"$",
"name",
"=",
"e",
"(",
"$",
"name... | Get the attributes for an input field.
@param string $name
@param mixed|null $default
@return string | [
"Get",
"the",
"attributes",
"for",
"an",
"input",
"field",
"."
] | adb91cb42b7e3c1f88be059a8b4f86de5aba64cc | https://github.com/CPSB/Validation-helper/blob/adb91cb42b7e3c1f88be059a8b4f86de5aba64cc/src/Form.php#L64-L69 |
19,339 | CPSB/Validation-helper | src/Form.php | Form.checkbox | public function checkbox($name, $inputValue = 1, $checkByDefault = false)
{
$value = $this->value($name);
// Define the state for the checkbox, when $value is null then we
// use the $checkByDefault value directly, otherwise the checkbox will
// be checked only if the $value is equal... | php | public function checkbox($name, $inputValue = 1, $checkByDefault = false)
{
$value = $this->value($name);
// Define the state for the checkbox, when $value is null then we
// use the $checkByDefault value directly, otherwise the checkbox will
// be checked only if the $value is equal... | [
"public",
"function",
"checkbox",
"(",
"$",
"name",
",",
"$",
"inputValue",
"=",
"1",
",",
"$",
"checkByDefault",
"=",
"false",
")",
"{",
"$",
"value",
"=",
"$",
"this",
"->",
"value",
"(",
"$",
"name",
")",
";",
"// Define the state for the checkbox, when... | Get the attributes for a checkbox.
@param string $name
@param mixed $inputValue
@param bool $checkByDefault
@return string | [
"Get",
"the",
"attributes",
"for",
"a",
"checkbox",
"."
] | adb91cb42b7e3c1f88be059a8b4f86de5aba64cc | https://github.com/CPSB/Validation-helper/blob/adb91cb42b7e3c1f88be059a8b4f86de5aba64cc/src/Form.php#L79-L95 |
19,340 | CPSB/Validation-helper | src/Form.php | Form.radio | public function radio($name, $inputValue = 1, $checkByDefault = false)
{
return $this->checkbox($name, $inputValue, $checkByDefault);
} | php | public function radio($name, $inputValue = 1, $checkByDefault = false)
{
return $this->checkbox($name, $inputValue, $checkByDefault);
} | [
"public",
"function",
"radio",
"(",
"$",
"name",
",",
"$",
"inputValue",
"=",
"1",
",",
"$",
"checkByDefault",
"=",
"false",
")",
"{",
"return",
"$",
"this",
"->",
"checkbox",
"(",
"$",
"name",
",",
"$",
"inputValue",
",",
"$",
"checkByDefault",
")",
... | Get the attributes for a radio.
@param string $name
@param mixed $inputValue
@param bool $checkByDefault
@return string | [
"Get",
"the",
"attributes",
"for",
"a",
"radio",
"."
] | adb91cb42b7e3c1f88be059a8b4f86de5aba64cc | https://github.com/CPSB/Validation-helper/blob/adb91cb42b7e3c1f88be059a8b4f86de5aba64cc/src/Form.php#L105-L108 |
19,341 | CPSB/Validation-helper | src/Form.php | Form.options | public function options($options, $name, $default = null, $placeholder = null)
{
$tags = [];
// Prepend the placeholder to the options list if needed.
if ($placeholder) {
$tags[] = '<option value="" selected disabled>'.e($placeholder).'</option>';
}
$value = $this... | php | public function options($options, $name, $default = null, $placeholder = null)
{
$tags = [];
// Prepend the placeholder to the options list if needed.
if ($placeholder) {
$tags[] = '<option value="" selected disabled>'.e($placeholder).'</option>';
}
$value = $this... | [
"public",
"function",
"options",
"(",
"$",
"options",
",",
"$",
"name",
",",
"$",
"default",
"=",
"null",
",",
"$",
"placeholder",
"=",
"null",
")",
"{",
"$",
"tags",
"=",
"[",
"]",
";",
"// Prepend the placeholder to the options list if needed.",
"if",
"(",... | Get the options for a select.
@param array $options
@param string $name
@param mixed|null $default
@param string|null $placeholder
@return string | [
"Get",
"the",
"options",
"for",
"a",
"select",
"."
] | adb91cb42b7e3c1f88be059a8b4f86de5aba64cc | https://github.com/CPSB/Validation-helper/blob/adb91cb42b7e3c1f88be059a8b4f86de5aba64cc/src/Form.php#L119-L140 |
19,342 | CPSB/Validation-helper | src/Form.php | Form.error | public function error($name, $template = null)
{
$errors = $this->session->get('errors');
// Default template is bootstrap friendly.
if (is_null($template)) {
$template = config('form-helpers.error_template');
}
if ($errors && $errors->has($name)) {
re... | php | public function error($name, $template = null)
{
$errors = $this->session->get('errors');
// Default template is bootstrap friendly.
if (is_null($template)) {
$template = config('form-helpers.error_template');
}
if ($errors && $errors->has($name)) {
re... | [
"public",
"function",
"error",
"(",
"$",
"name",
",",
"$",
"template",
"=",
"null",
")",
"{",
"$",
"errors",
"=",
"$",
"this",
"->",
"session",
"->",
"get",
"(",
"'errors'",
")",
";",
"// Default template is bootstrap friendly.",
"if",
"(",
"is_null",
"(",... | Get the error message if exists.
@param string $name
@param string|null $template
@return string|null | [
"Get",
"the",
"error",
"message",
"if",
"exists",
"."
] | adb91cb42b7e3c1f88be059a8b4f86de5aba64cc | https://github.com/CPSB/Validation-helper/blob/adb91cb42b7e3c1f88be059a8b4f86de5aba64cc/src/Form.php#L149-L159 |
19,343 | CPSB/Validation-helper | src/Form.php | Form.value | public function value($name, $default = null)
{
if (! is_null($value = $this->valueFromOld($name))) {
return $value;
}
if (! is_null($value = $this->valueFromModel($name))) {
return $value;
}
return $default;
} | php | public function value($name, $default = null)
{
if (! is_null($value = $this->valueFromOld($name))) {
return $value;
}
if (! is_null($value = $this->valueFromModel($name))) {
return $value;
}
return $default;
} | [
"public",
"function",
"value",
"(",
"$",
"name",
",",
"$",
"default",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"is_null",
"(",
"$",
"value",
"=",
"$",
"this",
"->",
"valueFromOld",
"(",
"$",
"name",
")",
")",
")",
"{",
"return",
"$",
"value",
";",
... | Get the value to use in an input field.
@param string $name
@param mixed|null $default
@return mixed|null | [
"Get",
"the",
"value",
"to",
"use",
"in",
"an",
"input",
"field",
"."
] | adb91cb42b7e3c1f88be059a8b4f86de5aba64cc | https://github.com/CPSB/Validation-helper/blob/adb91cb42b7e3c1f88be059a8b4f86de5aba64cc/src/Form.php#L168-L178 |
19,344 | jfusion/org.jfusion.framework | src/Framework.php | Framework.hasFeature | public static function hasFeature($jname, $feature) {
$return = false;
$admin = Factory::getAdmin($jname);
$user = Factory::getUser($jname);
switch ($feature) {
//Admin Features
case 'wizard':
$return = $admin->methodDefined('setupFromPath');
... | php | public static function hasFeature($jname, $feature) {
$return = false;
$admin = Factory::getAdmin($jname);
$user = Factory::getUser($jname);
switch ($feature) {
//Admin Features
case 'wizard':
$return = $admin->methodDefined('setupFromPath');
... | [
"public",
"static",
"function",
"hasFeature",
"(",
"$",
"jname",
",",
"$",
"feature",
")",
"{",
"$",
"return",
"=",
"false",
";",
"$",
"admin",
"=",
"Factory",
"::",
"getAdmin",
"(",
"$",
"jname",
")",
";",
"$",
"user",
"=",
"Factory",
"::",
"getUser... | Check if feature exists
@static
@param string $jname
@param string $feature feature
@return bool | [
"Check",
"if",
"feature",
"exists"
] | 65771963f23ccabcf1f867eb17c9452299cfe683 | https://github.com/jfusion/org.jfusion.framework/blob/65771963f23ccabcf1f867eb17c9452299cfe683/src/Framework.php#L75-L123 |
19,345 | jfusion/org.jfusion.framework | src/Framework.php | Framework.getXml | public static function getXml($data, $isFile = true)
{
// Disable libxml errors and allow to fetch error information as needed
libxml_use_internal_errors(true);
if ($isFile) {
// Try to load the XML file
$xml = simplexml_load_file($data);
} else {
// Try to load the XML string
$xml = simplexml_loa... | php | public static function getXml($data, $isFile = true)
{
// Disable libxml errors and allow to fetch error information as needed
libxml_use_internal_errors(true);
if ($isFile) {
// Try to load the XML file
$xml = simplexml_load_file($data);
} else {
// Try to load the XML string
$xml = simplexml_loa... | [
"public",
"static",
"function",
"getXml",
"(",
"$",
"data",
",",
"$",
"isFile",
"=",
"true",
")",
"{",
"// Disable libxml errors and allow to fetch error information as needed",
"libxml_use_internal_errors",
"(",
"true",
")",
";",
"if",
"(",
"$",
"isFile",
")",
"{",... | Checks to see if a JFusion plugin is properly configured
@param string $data file path or file content
@param boolean $isFile load from file
@throws \Symfony\Component\Yaml\Exception\RuntimeException
@return SimpleXMLElement returns true if plugin is correctly configured | [
"Checks",
"to",
"see",
"if",
"a",
"JFusion",
"plugin",
"is",
"properly",
"configured"
] | 65771963f23ccabcf1f867eb17c9452299cfe683 | https://github.com/jfusion/org.jfusion.framework/blob/65771963f23ccabcf1f867eb17c9452299cfe683/src/Framework.php#L134-L161 |
19,346 | jfusion/org.jfusion.framework | src/Framework.php | Framework.raise | public static function raise($type, $message, $jname = '') {
if (is_array($message)) {
foreach ($message as $msgtype => $msg) {
//if still an array implode for nicer display
if (is_numeric($msgtype)) {
$msgtype = $jname;
}
static::raise($type, $msg, $msgtype);
}
} else {
$app = Applica... | php | public static function raise($type, $message, $jname = '') {
if (is_array($message)) {
foreach ($message as $msgtype => $msg) {
//if still an array implode for nicer display
if (is_numeric($msgtype)) {
$msgtype = $jname;
}
static::raise($type, $msg, $msgtype);
}
} else {
$app = Applica... | [
"public",
"static",
"function",
"raise",
"(",
"$",
"type",
",",
"$",
"message",
",",
"$",
"jname",
"=",
"''",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"message",
")",
")",
"{",
"foreach",
"(",
"$",
"message",
"as",
"$",
"msgtype",
"=>",
"$",
"m... | Raise warning function that can handle arrays
@param $type
@param array|string|Exception $message message itself
@param string $jname
@return string nothing | [
"Raise",
"warning",
"function",
"that",
"can",
"handle",
"arrays"
] | 65771963f23ccabcf1f867eb17c9452299cfe683 | https://github.com/jfusion/org.jfusion.framework/blob/65771963f23ccabcf1f867eb17c9452299cfe683/src/Framework.php#L172-L191 |
19,347 | ClanCats/Core | src/bundles/Auth/CCAuth.php | CCAuth.validate | public static function validate( $identifier, $password, $name = null )
{
return Handler::create( $name )->validate( $identifier, $password );
} | php | public static function validate( $identifier, $password, $name = null )
{
return Handler::create( $name )->validate( $identifier, $password );
} | [
"public",
"static",
"function",
"validate",
"(",
"$",
"identifier",
",",
"$",
"password",
",",
"$",
"name",
"=",
"null",
")",
"{",
"return",
"Handler",
"::",
"create",
"(",
"$",
"name",
")",
"->",
"validate",
"(",
"$",
"identifier",
",",
"$",
"password... | Validate user credentials
@param mixed $identifier
@param string $password
@param string $name The auth instance
@return bool | [
"Validate",
"user",
"credentials"
] | 9f6ec72c1a439de4b253d0223f1029f7f85b6ef8 | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/bundles/Auth/CCAuth.php#L44-L47 |
19,348 | ClanCats/Core | src/bundles/Auth/CCAuth.php | CCAuth.sign_in | public static function sign_in( \Auth\User $user, $keep_loggedin = true, $name = null )
{
return Handler::create( $name )->sign_in( $user, $keep_loggedin );
} | php | public static function sign_in( \Auth\User $user, $keep_loggedin = true, $name = null )
{
return Handler::create( $name )->sign_in( $user, $keep_loggedin );
} | [
"public",
"static",
"function",
"sign_in",
"(",
"\\",
"Auth",
"\\",
"User",
"$",
"user",
",",
"$",
"keep_loggedin",
"=",
"true",
",",
"$",
"name",
"=",
"null",
")",
"{",
"return",
"Handler",
"::",
"create",
"(",
"$",
"name",
")",
"->",
"sign_in",
"("... | Sign in a user
@param Auth\User $user
@param string $keep_loggedin
@param string $name The auth instance
@return bool | [
"Sign",
"in",
"a",
"user"
] | 9f6ec72c1a439de4b253d0223f1029f7f85b6ef8 | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/bundles/Auth/CCAuth.php#L57-L60 |
19,349 | slashworks/control-bundle | src/Slashworks/BackendBundle/Model/om/BaseSystemSettingsPeer.php | BaseSystemSettingsPeer.doUpdate | public static function doUpdate($values, PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(SystemSettingsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$selectCriteria = new Criteria(SystemSettingsPeer::DATABASE_NAME);
if ($values instanceof ... | php | public static function doUpdate($values, PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(SystemSettingsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$selectCriteria = new Criteria(SystemSettingsPeer::DATABASE_NAME);
if ($values instanceof ... | [
"public",
"static",
"function",
"doUpdate",
"(",
"$",
"values",
",",
"PropelPDO",
"$",
"con",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"con",
"===",
"null",
")",
"{",
"$",
"con",
"=",
"Propel",
"::",
"getConnection",
"(",
"SystemSettingsPeer",
"::",
"DAT... | Performs an UPDATE on the database, given a SystemSettings or Criteria object.
@param mixed $values Criteria or SystemSettings object containing data that is used to create the UPDATE statement.
@param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transa... | [
"Performs",
"an",
"UPDATE",
"on",
"the",
"database",
"given",
"a",
"SystemSettings",
"or",
"Criteria",
"object",
"."
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/BackendBundle/Model/om/BaseSystemSettingsPeer.php#L555-L583 |
19,350 | neos/doctools | Classes/Domain/Service/EelHelperClassParser.php | EelHelperClassParser.parseTitle | protected function parseTitle()
{
if (($registeredName = array_search($this->className, $this->defaultContextSettings)) !== false) {
return $registeredName;
} elseif (preg_match('/\\\\([^\\\\]*)Helper$/', $this->className, $matches)) {
return $matches[1];
}
r... | php | protected function parseTitle()
{
if (($registeredName = array_search($this->className, $this->defaultContextSettings)) !== false) {
return $registeredName;
} elseif (preg_match('/\\\\([^\\\\]*)Helper$/', $this->className, $matches)) {
return $matches[1];
}
r... | [
"protected",
"function",
"parseTitle",
"(",
")",
"{",
"if",
"(",
"(",
"$",
"registeredName",
"=",
"array_search",
"(",
"$",
"this",
"->",
"className",
",",
"$",
"this",
"->",
"defaultContextSettings",
")",
")",
"!==",
"false",
")",
"{",
"return",
"$",
"r... | Get the title from the Eel helper class name
@return string | [
"Get",
"the",
"title",
"from",
"the",
"Eel",
"helper",
"class",
"name"
] | 726981245a8d59319ee594a582f80a30256df98b | https://github.com/neos/doctools/blob/726981245a8d59319ee594a582f80a30256df98b/Classes/Domain/Service/EelHelperClassParser.php#L34-L43 |
19,351 | neos/doctools | Classes/Domain/Service/EelHelperClassParser.php | EelHelperClassParser.parseDescription | protected function parseDescription()
{
$description = $this->classReflection->getDescription() . chr(10) . chr(10);
$description .= 'Implemented in: ``' . $this->className . '``' . chr(10) . chr(10);
$helperName = $this->parseTitle();
$helperInstance = new $this->className();
... | php | protected function parseDescription()
{
$description = $this->classReflection->getDescription() . chr(10) . chr(10);
$description .= 'Implemented in: ``' . $this->className . '``' . chr(10) . chr(10);
$helperName = $this->parseTitle();
$helperInstance = new $this->className();
... | [
"protected",
"function",
"parseDescription",
"(",
")",
"{",
"$",
"description",
"=",
"$",
"this",
"->",
"classReflection",
"->",
"getDescription",
"(",
")",
".",
"chr",
"(",
"10",
")",
".",
"chr",
"(",
"10",
")",
";",
"$",
"description",
".=",
"'Implemen... | Iterate over all methods in the helper class
@return string | [
"Iterate",
"over",
"all",
"methods",
"in",
"the",
"helper",
"class"
] | 726981245a8d59319ee594a582f80a30256df98b | https://github.com/neos/doctools/blob/726981245a8d59319ee594a582f80a30256df98b/Classes/Domain/Service/EelHelperClassParser.php#L50-L68 |
19,352 | xinix-technology/norm | src/Norm/Connection/OCIConnection.php | OCIConnection.prepareInit | protected function prepareInit()
{
$stid = oci_parse($this->raw, "ALTER SESSION SET NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS'");
oci_execute($stid);
oci_free_statement($stid);
$stid = oci_parse($this->raw, "ALTER SESSION SET NLS_SORT = BINARY_CI");
oci_execute($stid);
... | php | protected function prepareInit()
{
$stid = oci_parse($this->raw, "ALTER SESSION SET NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS'");
oci_execute($stid);
oci_free_statement($stid);
$stid = oci_parse($this->raw, "ALTER SESSION SET NLS_SORT = BINARY_CI");
oci_execute($stid);
... | [
"protected",
"function",
"prepareInit",
"(",
")",
"{",
"$",
"stid",
"=",
"oci_parse",
"(",
"$",
"this",
"->",
"raw",
",",
"\"ALTER SESSION SET NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS'\"",
")",
";",
"oci_execute",
"(",
"$",
"stid",
")",
";",
"oci_free_statement... | Preparing initialization of connection
@return void | [
"Preparing",
"initialization",
"of",
"connection"
] | c357f7d3a75d05324dd84b8f6a968a094c53d603 | https://github.com/xinix-technology/norm/blob/c357f7d3a75d05324dd84b8f6a968a094c53d603/src/Norm/Connection/OCIConnection.php#L72-L85 |
19,353 | xinix-technology/norm | src/Norm/Connection/OCIConnection.php | OCIConnection.persist | public function persist($collection, array $document)
{
if ($collection instanceof Collection) {
$collectionName = $collection->getName();
} else {
$collectionName = $collection;
$collection = static::factory($collection);
}
$dat... | php | public function persist($collection, array $document)
{
if ($collection instanceof Collection) {
$collectionName = $collection->getName();
} else {
$collectionName = $collection;
$collection = static::factory($collection);
}
$dat... | [
"public",
"function",
"persist",
"(",
"$",
"collection",
",",
"array",
"$",
"document",
")",
"{",
"if",
"(",
"$",
"collection",
"instanceof",
"Collection",
")",
"{",
"$",
"collectionName",
"=",
"$",
"collection",
"->",
"getName",
"(",
")",
";",
"}",
"els... | Sync data to database. If it's new data, we insert it as new document, otherwise, if the document exists, we just update it.
@param Collection $collection
@param Model $model
@return bool | [
"Sync",
"data",
"to",
"database",
".",
"If",
"it",
"s",
"new",
"data",
"we",
"insert",
"it",
"as",
"new",
"document",
"otherwise",
"if",
"the",
"document",
"exists",
"we",
"just",
"update",
"it",
"."
] | c357f7d3a75d05324dd84b8f6a968a094c53d603 | https://github.com/xinix-technology/norm/blob/c357f7d3a75d05324dd84b8f6a968a094c53d603/src/Norm/Connection/OCIConnection.php#L104-L136 |
19,354 | xinix-technology/norm | src/Norm/Connection/OCIConnection.php | OCIConnection.insert | public function insert($collectionName, $data)
{
$id = 0;
$sql = $this->dialect->grammarInsert($collectionName, $data);
$stid = oci_parse($this->raw, $sql);
//Fixme : problem from other oracle dialect on method insert
oci_bind_by_name($stid, ":id", $id,-1,SQLT_INT);
... | php | public function insert($collectionName, $data)
{
$id = 0;
$sql = $this->dialect->grammarInsert($collectionName, $data);
$stid = oci_parse($this->raw, $sql);
//Fixme : problem from other oracle dialect on method insert
oci_bind_by_name($stid, ":id", $id,-1,SQLT_INT);
... | [
"public",
"function",
"insert",
"(",
"$",
"collectionName",
",",
"$",
"data",
")",
"{",
"$",
"id",
"=",
"0",
";",
"$",
"sql",
"=",
"$",
"this",
"->",
"dialect",
"->",
"grammarInsert",
"(",
"$",
"collectionName",
",",
"$",
"data",
")",
";",
"$",
"st... | Perform insert new document to database.
@param string $collectionName
@param mixed $data
@return bool | [
"Perform",
"insert",
"new",
"document",
"to",
"database",
"."
] | c357f7d3a75d05324dd84b8f6a968a094c53d603 | https://github.com/xinix-technology/norm/blob/c357f7d3a75d05324dd84b8f6a968a094c53d603/src/Norm/Connection/OCIConnection.php#L174-L193 |
19,355 | xinix-technology/norm | src/Norm/Connection/OCIConnection.php | OCIConnection.update | public function update($collectionName, $data)
{
$sql = $this->dialect->grammarUpdate($collectionName, $data);
$stid = oci_parse($this->raw, $sql);
oci_bind_by_name($stid, ":id", $data['id']);
foreach ($data as $key => $value) {
oci_bind_by_name($stid, ":".$key, $data[... | php | public function update($collectionName, $data)
{
$sql = $this->dialect->grammarUpdate($collectionName, $data);
$stid = oci_parse($this->raw, $sql);
oci_bind_by_name($stid, ":id", $data['id']);
foreach ($data as $key => $value) {
oci_bind_by_name($stid, ":".$key, $data[... | [
"public",
"function",
"update",
"(",
"$",
"collectionName",
",",
"$",
"data",
")",
"{",
"$",
"sql",
"=",
"$",
"this",
"->",
"dialect",
"->",
"grammarUpdate",
"(",
"$",
"collectionName",
",",
"$",
"data",
")",
";",
"$",
"stid",
"=",
"oci_parse",
"(",
... | Perform update to a document.
@param string $collectionName
@param mixed $data
@return bool | [
"Perform",
"update",
"to",
"a",
"document",
"."
] | c357f7d3a75d05324dd84b8f6a968a094c53d603 | https://github.com/xinix-technology/norm/blob/c357f7d3a75d05324dd84b8f6a968a094c53d603/src/Norm/Connection/OCIConnection.php#L203-L220 |
19,356 | inpsyde/inpsyde-filter | src/AbstractFilter.php | AbstractFilter.set_options | protected function set_options( array $options = [ ] ) {
foreach ( $options as $key => $value ) {
if ( ! array_key_exists( $key, $this->options ) ) {
throw new \InvalidArgumentException(
sprintf( 'The option "%1$s" does not have a matching option[%1$s] array key', $key ),
1.0
);
continue;
... | php | protected function set_options( array $options = [ ] ) {
foreach ( $options as $key => $value ) {
if ( ! array_key_exists( $key, $this->options ) ) {
throw new \InvalidArgumentException(
sprintf( 'The option "%1$s" does not have a matching option[%1$s] array key', $key ),
1.0
);
continue;
... | [
"protected",
"function",
"set_options",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"foreach",
"(",
"$",
"options",
"as",
"$",
"key",
"=>",
"$",
"value",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"$",
"key",
",",
"$",
"this",
"-... | Setting the given options from constructor.
@param array $options
@throws \InvalidArgumentException if the given option is not available to overwrite. | [
"Setting",
"the",
"given",
"options",
"from",
"constructor",
"."
] | 777a6208ea4dfbeed89e6d0712a35dc25eab498b | https://github.com/inpsyde/inpsyde-filter/blob/777a6208ea4dfbeed89e6d0712a35dc25eab498b/src/AbstractFilter.php#L34-L47 |
19,357 | slashworks/control-bundle | src/Slashworks/AppBundle/Controller/AppController.php | AppController.check4Client | public function check4Client($iCustomerId)
{
if ($this->get('security.context')->isGranted('ROLE_ADMIN')) {
return true;
} else {
$oUser = $this->getUser();
if (empty($oUser)) {
return false;
}
... | php | public function check4Client($iCustomerId)
{
if ($this->get('security.context')->isGranted('ROLE_ADMIN')) {
return true;
} else {
$oUser = $this->getUser();
if (empty($oUser)) {
return false;
}
... | [
"public",
"function",
"check4Client",
"(",
"$",
"iCustomerId",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"get",
"(",
"'security.context'",
")",
"->",
"isGranted",
"(",
"'ROLE_ADMIN'",
")",
")",
"{",
"return",
"true",
";",
"}",
"else",
"{",
"$",
"oUser",
... | Check if user has access to customer
@param int $iCustomerId
@return bool | [
"Check",
"if",
"user",
"has",
"access",
"to",
"customer"
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Controller/AppController.php#L59-L75 |
19,358 | webtown-php/KunstmaanExtensionBundle | src/Translation/Extraction/File/KunstmaanExtractor.php | KunstmaanExtractor.visitFile | public function visitFile(\SplFileInfo $file, MessageCatalogue $catalogue)
{
if ($file->getExtension() != 'yml') {
return;
}
$path = strtr($file->getRealPath(), DIRECTORY_SEPARATOR, '/');
if (strpos($path, 'Resources/config/pageparts') === false) {
return;
... | php | public function visitFile(\SplFileInfo $file, MessageCatalogue $catalogue)
{
if ($file->getExtension() != 'yml') {
return;
}
$path = strtr($file->getRealPath(), DIRECTORY_SEPARATOR, '/');
if (strpos($path, 'Resources/config/pageparts') === false) {
return;
... | [
"public",
"function",
"visitFile",
"(",
"\\",
"SplFileInfo",
"$",
"file",
",",
"MessageCatalogue",
"$",
"catalogue",
")",
"{",
"if",
"(",
"$",
"file",
"->",
"getExtension",
"(",
")",
"!=",
"'yml'",
")",
"{",
"return",
";",
"}",
"$",
"path",
"=",
"strtr... | Collect the pagepart names!
@param \SplFileInfo $file
@param MessageCatalogue $catalogue | [
"Collect",
"the",
"pagepart",
"names!"
] | 86c656c131295fe1f3f7694fd4da1e5e454076b9 | https://github.com/webtown-php/KunstmaanExtensionBundle/blob/86c656c131295fe1f3f7694fd4da1e5e454076b9/src/Translation/Extraction/File/KunstmaanExtractor.php#L229-L249 |
19,359 | steeffeen/FancyManiaLinks | FML/XmlRpc/UIProperties.php | UIProperties.setChatOffset | public function setChatOffset($offsetX, $offsetY)
{
$offset = array((float)$offsetX, (float)$offsetY);
$this->setProperty($this->chatProperties, "offset", implode(" ", $offset));
return $this;
} | php | public function setChatOffset($offsetX, $offsetY)
{
$offset = array((float)$offsetX, (float)$offsetY);
$this->setProperty($this->chatProperties, "offset", implode(" ", $offset));
return $this;
} | [
"public",
"function",
"setChatOffset",
"(",
"$",
"offsetX",
",",
"$",
"offsetY",
")",
"{",
"$",
"offset",
"=",
"array",
"(",
"(",
"float",
")",
"$",
"offsetX",
",",
"(",
"float",
")",
"$",
"offsetY",
")",
";",
"$",
"this",
"->",
"setProperty",
"(",
... | Set the chat offset
@api
@param float $offsetX X offset
@param float $offsetY Y offset
@return static | [
"Set",
"the",
"chat",
"offset"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/XmlRpc/UIProperties.php#L104-L109 |
19,360 | steeffeen/FancyManiaLinks | FML/XmlRpc/UIProperties.php | UIProperties.setMapInfoPosition | public function setMapInfoPosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->mapInfoProperties, $positionX, $positionY, $positionZ);
return $this;
} | php | public function setMapInfoPosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->mapInfoProperties, $positionX, $positionY, $positionZ);
return $this;
} | [
"public",
"function",
"setMapInfoPosition",
"(",
"$",
"positionX",
",",
"$",
"positionY",
",",
"$",
"positionZ",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"setPositionProperty",
"(",
"$",
"this",
"->",
"mapInfoProperties",
",",
"$",
"positionX",
",",
"$",
... | Set the map info position
@api
@param float $positionX X position
@param float $positionY Y position
@param float $positionZ (optional) Z position (Z-index)
@return static | [
"Set",
"the",
"map",
"info",
"position"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/XmlRpc/UIProperties.php#L203-L207 |
19,361 | steeffeen/FancyManiaLinks | FML/XmlRpc/UIProperties.php | UIProperties.setCountdownPosition | public function setCountdownPosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->countdownProperties, $positionX, $positionY, $positionZ);
return $this;
} | php | public function setCountdownPosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->countdownProperties, $positionX, $positionY, $positionZ);
return $this;
} | [
"public",
"function",
"setCountdownPosition",
"(",
"$",
"positionX",
",",
"$",
"positionY",
",",
"$",
"positionZ",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"setPositionProperty",
"(",
"$",
"this",
"->",
"countdownProperties",
",",
"$",
"positionX",
",",
"$"... | Set the countdown position
@api
@param float $positionX X position
@param float $positionY Y position
@param float $positionZ (optional) Z position (Z-index)
@return static | [
"Set",
"the",
"countdown",
"position"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/XmlRpc/UIProperties.php#L253-L257 |
19,362 | steeffeen/FancyManiaLinks | FML/XmlRpc/UIProperties.php | UIProperties.renderStandalone | public function renderStandalone()
{
$domDocument = new \DOMDocument("1.0", "utf-8");
$domDocument->xmlStandalone = true;
$domElement = $domDocument->createElement("ui_properties");
$domDocument->appendChild($domElement);
$allProperties = $this->getProperties... | php | public function renderStandalone()
{
$domDocument = new \DOMDocument("1.0", "utf-8");
$domDocument->xmlStandalone = true;
$domElement = $domDocument->createElement("ui_properties");
$domDocument->appendChild($domElement);
$allProperties = $this->getProperties... | [
"public",
"function",
"renderStandalone",
"(",
")",
"{",
"$",
"domDocument",
"=",
"new",
"\\",
"DOMDocument",
"(",
"\"1.0\"",
",",
"\"utf-8\"",
")",
";",
"$",
"domDocument",
"->",
"xmlStandalone",
"=",
"true",
";",
"$",
"domElement",
"=",
"$",
"domDocument",... | Render the UI Properties standalone
@return \DOMDocument | [
"Render",
"the",
"UI",
"Properties",
"standalone"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/XmlRpc/UIProperties.php#L336-L360 |
19,363 | steeffeen/FancyManiaLinks | FML/XmlRpc/UIProperties.php | UIProperties.getProperties | protected function getProperties()
{
return array(
"chat" => $this->chatProperties,
"chat_avatar" => $this->chatAvatarProperties,
"map_info" => $this->mapInfoProperties,
"countdown" => $this->countdownProperties,
"go" => $this->goProperties,
... | php | protected function getProperties()
{
return array(
"chat" => $this->chatProperties,
"chat_avatar" => $this->chatAvatarProperties,
"map_info" => $this->mapInfoProperties,
"countdown" => $this->countdownProperties,
"go" => $this->goProperties,
... | [
"protected",
"function",
"getProperties",
"(",
")",
"{",
"return",
"array",
"(",
"\"chat\"",
"=>",
"$",
"this",
"->",
"chatProperties",
",",
"\"chat_avatar\"",
"=>",
"$",
"this",
"->",
"chatAvatarProperties",
",",
"\"map_info\"",
"=>",
"$",
"this",
"->",
"mapI... | Get associative array of all properties
@return array | [
"Get",
"associative",
"array",
"of",
"all",
"properties"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/XmlRpc/UIProperties.php#L378-L389 |
19,364 | steeffeen/FancyManiaLinks | FML/XmlRpc/UIProperties.php | UIProperties.setPositionProperty | protected function setPositionProperty(array &$properties, $positionX, $positionY, $positionZ = null)
{
$position = array((float)$positionX, (float)$positionY);
if ($positionZ) {
array_push($position, (float)$positionZ);
}
$this->setProperty($properties, "pos", implode(" ... | php | protected function setPositionProperty(array &$properties, $positionX, $positionY, $positionZ = null)
{
$position = array((float)$positionX, (float)$positionY);
if ($positionZ) {
array_push($position, (float)$positionZ);
}
$this->setProperty($properties, "pos", implode(" ... | [
"protected",
"function",
"setPositionProperty",
"(",
"array",
"&",
"$",
"properties",
",",
"$",
"positionX",
",",
"$",
"positionY",
",",
"$",
"positionZ",
"=",
"null",
")",
"{",
"$",
"position",
"=",
"array",
"(",
"(",
"float",
")",
"$",
"positionX",
","... | Set the Position property value
@param array $properties Properties array
@param float $positionX X position
@param float $positionY Y position
@param float $positionZ (optional) Z position (Z-index)
@return static | [
"Set",
"the",
"Position",
"property",
"value"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/XmlRpc/UIProperties.php#L461-L469 |
19,365 | php-rise/rise | src/Router/Scope.php | Scope.createScope | public function createScope($closure) {
$newScope = (new static($this->request, $this->result, $this->urlGenerator));
$newScope->setupParent(
$this->prefix,
$this->prefixMatched,
$this->requestPathOffset,
$this->params
);
$newScope->use($this->middlewares); // Must add middlewares before adding name... | php | public function createScope($closure) {
$newScope = (new static($this->request, $this->result, $this->urlGenerator));
$newScope->setupParent(
$this->prefix,
$this->prefixMatched,
$this->requestPathOffset,
$this->params
);
$newScope->use($this->middlewares); // Must add middlewares before adding name... | [
"public",
"function",
"createScope",
"(",
"$",
"closure",
")",
"{",
"$",
"newScope",
"=",
"(",
"new",
"static",
"(",
"$",
"this",
"->",
"request",
",",
"$",
"this",
"->",
"result",
",",
"$",
"this",
"->",
"urlGenerator",
")",
")",
";",
"$",
"newScope... | Create a child scope.
@param callable $closure | [
"Create",
"a",
"child",
"scope",
"."
] | cd14ef9956f1b6875b7bcd642545dcef6a9152b7 | https://github.com/php-rise/rise/blob/cd14ef9956f1b6875b7bcd642545dcef6a9152b7/src/Router/Scope.php#L88-L99 |
19,366 | php-rise/rise | src/Router/Scope.php | Scope.prefix | public function prefix($prefix) {
// Reset values before matching.
$this->prefix = $this->parentPrefix;
$this->requestPathOffset = $this->parentRequestPathOffset;
if ($this->parentPrefixMatched) {
$this->prefixMatched = $this->parentPrefixMatched;
}
if (!$this->result->hasHandler() && $this->prefixMatch... | php | public function prefix($prefix) {
// Reset values before matching.
$this->prefix = $this->parentPrefix;
$this->requestPathOffset = $this->parentRequestPathOffset;
if ($this->parentPrefixMatched) {
$this->prefixMatched = $this->parentPrefixMatched;
}
if (!$this->result->hasHandler() && $this->prefixMatch... | [
"public",
"function",
"prefix",
"(",
"$",
"prefix",
")",
"{",
"// Reset values before matching.",
"$",
"this",
"->",
"prefix",
"=",
"$",
"this",
"->",
"parentPrefix",
";",
"$",
"this",
"->",
"requestPathOffset",
"=",
"$",
"this",
"->",
"parentRequestPathOffset",... | Set a common path prefix for all routes.
@param string $prefix
@return self | [
"Set",
"a",
"common",
"path",
"prefix",
"for",
"all",
"routes",
"."
] | cd14ef9956f1b6875b7bcd642545dcef6a9152b7 | https://github.com/php-rise/rise/blob/cd14ef9956f1b6875b7bcd642545dcef6a9152b7/src/Router/Scope.php#L107-L122 |
19,367 | php-rise/rise | src/Router/Scope.php | Scope.use | public function use($middlewares) {
$middlewares = (array)$middlewares;
if ($this->namespace) {
foreach ($middlewares as &$middleware) {
$middleware = $this->namespace . $middleware;
}
}
$this->middlewares = array_merge($this->middlewares, (array)$middlewares);
return $this;
} | php | public function use($middlewares) {
$middlewares = (array)$middlewares;
if ($this->namespace) {
foreach ($middlewares as &$middleware) {
$middleware = $this->namespace . $middleware;
}
}
$this->middlewares = array_merge($this->middlewares, (array)$middlewares);
return $this;
} | [
"public",
"function",
"use",
"(",
"$",
"middlewares",
")",
"{",
"$",
"middlewares",
"=",
"(",
"array",
")",
"$",
"middlewares",
";",
"if",
"(",
"$",
"this",
"->",
"namespace",
")",
"{",
"foreach",
"(",
"$",
"middlewares",
"as",
"&",
"$",
"middleware",
... | Add middlewares.
@param string[]|string $middlewares
@return self | [
"Add",
"middlewares",
"."
] | cd14ef9956f1b6875b7bcd642545dcef6a9152b7 | https://github.com/php-rise/rise/blob/cd14ef9956f1b6875b7bcd642545dcef6a9152b7/src/Router/Scope.php#L145-L157 |
19,368 | php-rise/rise | src/Router/Scope.php | Scope.on | public function on($method, $path, $handler, $name = '') {
if (!$this->result->hasHandler()
&& $this->prefixMatched
&& $this->request->isMethod($method)
) {
if ($this->matchPartial($path, true)) {
$handlers = (array)$handler;
if ($this->namespace) {
foreach ($handlers as &$handler) {
$h... | php | public function on($method, $path, $handler, $name = '') {
if (!$this->result->hasHandler()
&& $this->prefixMatched
&& $this->request->isMethod($method)
) {
if ($this->matchPartial($path, true)) {
$handlers = (array)$handler;
if ($this->namespace) {
foreach ($handlers as &$handler) {
$h... | [
"public",
"function",
"on",
"(",
"$",
"method",
",",
"$",
"path",
",",
"$",
"handler",
",",
"$",
"name",
"=",
"''",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"result",
"->",
"hasHandler",
"(",
")",
"&&",
"$",
"this",
"->",
"prefixMatched",
"&&... | Add a route.
@param string $method
@param string $path
@param string|string[] $handler
@param string $name Route name.
@return self | [
"Add",
"a",
"route",
"."
] | cd14ef9956f1b6875b7bcd642545dcef6a9152b7 | https://github.com/php-rise/rise/blob/cd14ef9956f1b6875b7bcd642545dcef6a9152b7/src/Router/Scope.php#L168-L197 |
19,369 | php-rise/rise | src/Router/Scope.php | Scope.setupParent | public function setupParent($prefix, $prefixMatched, $requestPathOffset, $params) {
$this->prefix = $prefix;
$this->parentPrefix = $prefix;
$this->prefixMatched = $prefixMatched;
$this->parentPrefixMatched = $prefixMatched;
$this->requestPathOffset = $requestPathOffset;
$this->parentRequestPathOffset = $req... | php | public function setupParent($prefix, $prefixMatched, $requestPathOffset, $params) {
$this->prefix = $prefix;
$this->parentPrefix = $prefix;
$this->prefixMatched = $prefixMatched;
$this->parentPrefixMatched = $prefixMatched;
$this->requestPathOffset = $requestPathOffset;
$this->parentRequestPathOffset = $req... | [
"public",
"function",
"setupParent",
"(",
"$",
"prefix",
",",
"$",
"prefixMatched",
",",
"$",
"requestPathOffset",
",",
"$",
"params",
")",
"{",
"$",
"this",
"->",
"prefix",
"=",
"$",
"prefix",
";",
"$",
"this",
"->",
"parentPrefix",
"=",
"$",
"prefix",
... | Inherit data from parent scope.
@param string $prefix
@param bool $prefixMatched
@param int $requestPathOffset
@param array $params | [
"Inherit",
"data",
"from",
"parent",
"scope",
"."
] | cd14ef9956f1b6875b7bcd642545dcef6a9152b7 | https://github.com/php-rise/rise/blob/cd14ef9956f1b6875b7bcd642545dcef6a9152b7/src/Router/Scope.php#L245-L253 |
19,370 | php-rise/rise | src/Router/Scope.php | Scope.matchPartial | protected function matchPartial($routePathPartial, $toEnd = false) {
$result = false;
$numOfRouteMatches = preg_match_all(
self::ROUTE_PARAM_PATTERN,
$routePathPartial,
$routeMatches,
PREG_OFFSET_CAPTURE
);
if ($numOfRouteMatches === 0) { // plain string
if ($toEnd) {
$requestPathPartial = ... | php | protected function matchPartial($routePathPartial, $toEnd = false) {
$result = false;
$numOfRouteMatches = preg_match_all(
self::ROUTE_PARAM_PATTERN,
$routePathPartial,
$routeMatches,
PREG_OFFSET_CAPTURE
);
if ($numOfRouteMatches === 0) { // plain string
if ($toEnd) {
$requestPathPartial = ... | [
"protected",
"function",
"matchPartial",
"(",
"$",
"routePathPartial",
",",
"$",
"toEnd",
"=",
"false",
")",
"{",
"$",
"result",
"=",
"false",
";",
"$",
"numOfRouteMatches",
"=",
"preg_match_all",
"(",
"self",
"::",
"ROUTE_PARAM_PATTERN",
",",
"$",
"routePathP... | Match path partial with request path. This will move the request path offset.
@param string $routePathPartial,
@param bool $toEnd
@return bool | [
"Match",
"path",
"partial",
"with",
"request",
"path",
".",
"This",
"will",
"move",
"the",
"request",
"path",
"offset",
"."
] | cd14ef9956f1b6875b7bcd642545dcef6a9152b7 | https://github.com/php-rise/rise/blob/cd14ef9956f1b6875b7bcd642545dcef6a9152b7/src/Router/Scope.php#L262-L323 |
19,371 | Lansoweb/LosReCaptcha | src/Service/ReCaptcha.php | ReCaptcha.getHtml | public function getHtml($name = null)
{
$host = self::API_SERVER;
$langOption = '';
if (isset($this->options['lang']) && ! empty($this->options['lang'])) {
$langOption = "?hl={$this->options['lang']}";
}
$return = <<<HTML
<script type="text/javascript" src="{$h... | php | public function getHtml($name = null)
{
$host = self::API_SERVER;
$langOption = '';
if (isset($this->options['lang']) && ! empty($this->options['lang'])) {
$langOption = "?hl={$this->options['lang']}";
}
$return = <<<HTML
<script type="text/javascript" src="{$h... | [
"public",
"function",
"getHtml",
"(",
"$",
"name",
"=",
"null",
")",
"{",
"$",
"host",
"=",
"self",
"::",
"API_SERVER",
";",
"$",
"langOption",
"=",
"''",
";",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"options",
"[",
"'lang'",
"]",
")",
"&&",
... | Get the HTML code for the captcha
This method uses the public key to fetch a recaptcha form.
@param null|string $name Base name for recaptcha form elements
@return string
@throws \LosReCaptcha\Service\Exception | [
"Get",
"the",
"HTML",
"code",
"for",
"the",
"captcha"
] | 8df866995501db087c3850f97fd2b6547632e6ed | https://github.com/Lansoweb/LosReCaptcha/blob/8df866995501db087c3850f97fd2b6547632e6ed/src/Service/ReCaptcha.php#L138-L153 |
19,372 | Lansoweb/LosReCaptcha | src/Service/ReCaptcha.php | ReCaptcha.query | protected function query($responseField)
{
$params = new Parameters($this->secretKey, $responseField, $this->ip);
return $this->request->send($params);
} | php | protected function query($responseField)
{
$params = new Parameters($this->secretKey, $responseField, $this->ip);
return $this->request->send($params);
} | [
"protected",
"function",
"query",
"(",
"$",
"responseField",
")",
"{",
"$",
"params",
"=",
"new",
"Parameters",
"(",
"$",
"this",
"->",
"secretKey",
",",
"$",
"responseField",
",",
"$",
"this",
"->",
"ip",
")",
";",
"return",
"$",
"this",
"->",
"reques... | Gets a solution to the verify server
@param string $responseField
@return \LosReCaptcha\Service\Response
@throws \LosReCaptcha\\Service\Exception | [
"Gets",
"a",
"solution",
"to",
"the",
"verify",
"server"
] | 8df866995501db087c3850f97fd2b6547632e6ed | https://github.com/Lansoweb/LosReCaptcha/blob/8df866995501db087c3850f97fd2b6547632e6ed/src/Service/ReCaptcha.php#L184-L189 |
19,373 | yuncms/framework | src/user/controllers/SettingsController.php | SettingsController.actionProfile | public function actionProfile()
{
$model = UserProfile::findOne(['user_id' => Yii::$app->user->identity->getId()]);
if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) {
Yii::$app->response->format = Response::FORMAT_JSON;
return ActiveForm::validate($... | php | public function actionProfile()
{
$model = UserProfile::findOne(['user_id' => Yii::$app->user->identity->getId()]);
if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) {
Yii::$app->response->format = Response::FORMAT_JSON;
return ActiveForm::validate($... | [
"public",
"function",
"actionProfile",
"(",
")",
"{",
"$",
"model",
"=",
"UserProfile",
"::",
"findOne",
"(",
"[",
"'user_id'",
"=>",
"Yii",
"::",
"$",
"app",
"->",
"user",
"->",
"identity",
"->",
"getId",
"(",
")",
"]",
")",
";",
"if",
"(",
"Yii",
... | Shows profile settings form.
@return array|string|Response | [
"Shows",
"profile",
"settings",
"form",
"."
] | af42e28ea4ae15ab8eead3f6d119f93863b94154 | https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/user/controllers/SettingsController.php#L64-L78 |
19,374 | yuncms/framework | src/user/controllers/SettingsController.php | SettingsController.actionAvatar | public function actionAvatar()
{
$model = new AvatarForm();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
Yii::$app->getSession()->setFlash('success', Yii::t('yuncms', 'Your avatar has been updated'));
}
return $this->render('avatar', [
'mo... | php | public function actionAvatar()
{
$model = new AvatarForm();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
Yii::$app->getSession()->setFlash('success', Yii::t('yuncms', 'Your avatar has been updated'));
}
return $this->render('avatar', [
'mo... | [
"public",
"function",
"actionAvatar",
"(",
")",
"{",
"$",
"model",
"=",
"new",
"AvatarForm",
"(",
")",
";",
"if",
"(",
"$",
"model",
"->",
"load",
"(",
"Yii",
"::",
"$",
"app",
"->",
"request",
"->",
"post",
"(",
")",
")",
"&&",
"$",
"model",
"->... | Show portrait setting form
@return \yii\web\Response|string
@throws \League\Flysystem\FileExistsException
@throws \League\Flysystem\FileNotFoundException
@throws \yii\base\ErrorException
@throws \yii\base\Exception
@throws \yii\base\InvalidConfigException | [
"Show",
"portrait",
"setting",
"form"
] | af42e28ea4ae15ab8eead3f6d119f93863b94154 | https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/user/controllers/SettingsController.php#L89-L98 |
19,375 | struzik-vladislav/php-error-handler | src/Processor/IntoExceptionProcessor.php | IntoExceptionProcessor.getAssociatedClass | private function getAssociatedClass($errno)
{
$associations = [
E_WARNING => Exception\WarningException::class,
E_NOTICE => Exception\NoticeException::class,
E_USER_ERROR => Exception\UserErrorException::class,
E_USER_WARNING => Exception\UserWarningException:... | php | private function getAssociatedClass($errno)
{
$associations = [
E_WARNING => Exception\WarningException::class,
E_NOTICE => Exception\NoticeException::class,
E_USER_ERROR => Exception\UserErrorException::class,
E_USER_WARNING => Exception\UserWarningException:... | [
"private",
"function",
"getAssociatedClass",
"(",
"$",
"errno",
")",
"{",
"$",
"associations",
"=",
"[",
"E_WARNING",
"=>",
"Exception",
"\\",
"WarningException",
"::",
"class",
",",
"E_NOTICE",
"=>",
"Exception",
"\\",
"NoticeException",
"::",
"class",
",",
"... | Getting the exception class name associated with error code.
@param int $errno level of the error raised
@return string | [
"Getting",
"the",
"exception",
"class",
"name",
"associated",
"with",
"error",
"code",
"."
] | 87fa9f56edca7011f78e00659bb094b4fe713ebe | https://github.com/struzik-vladislav/php-error-handler/blob/87fa9f56edca7011f78e00659bb094b4fe713ebe/src/Processor/IntoExceptionProcessor.php#L64-L83 |
19,376 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseCountry.php | BaseCountry.initCustomers | public function initCustomers($overrideExisting = true)
{
if (null !== $this->collCustomers && !$overrideExisting) {
return;
}
$this->collCustomers = new PropelObjectCollection();
$this->collCustomers->setModel('Customer');
} | php | public function initCustomers($overrideExisting = true)
{
if (null !== $this->collCustomers && !$overrideExisting) {
return;
}
$this->collCustomers = new PropelObjectCollection();
$this->collCustomers->setModel('Customer');
} | [
"public",
"function",
"initCustomers",
"(",
"$",
"overrideExisting",
"=",
"true",
")",
"{",
"if",
"(",
"null",
"!==",
"$",
"this",
"->",
"collCustomers",
"&&",
"!",
"$",
"overrideExisting",
")",
"{",
"return",
";",
"}",
"$",
"this",
"->",
"collCustomers",
... | Initializes the collCustomers collection.
By default this just sets the collCustomers collection to an empty array (like clearcollCustomers());
however, you may wish to override this method in your stub class to provide setting appropriate
to your application -- for example, setting the initial array to the values sto... | [
"Initializes",
"the",
"collCustomers",
"collection",
"."
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseCountry.php#L1041-L1048 |
19,377 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseCountry.php | BaseCountry.getCustomers | public function getCustomers($criteria = null, PropelPDO $con = null)
{
$partial = $this->collCustomersPartial && !$this->isNew();
if (null === $this->collCustomers || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collCustomers) {
// return empt... | php | public function getCustomers($criteria = null, PropelPDO $con = null)
{
$partial = $this->collCustomersPartial && !$this->isNew();
if (null === $this->collCustomers || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collCustomers) {
// return empt... | [
"public",
"function",
"getCustomers",
"(",
"$",
"criteria",
"=",
"null",
",",
"PropelPDO",
"$",
"con",
"=",
"null",
")",
"{",
"$",
"partial",
"=",
"$",
"this",
"->",
"collCustomersPartial",
"&&",
"!",
"$",
"this",
"->",
"isNew",
"(",
")",
";",
"if",
... | Gets an array of Customer objects which contain a foreign key that references this object.
If the $criteria is not null, it is used to always fetch the results from the database.
Otherwise the results are fetched from the database the first time, then cached.
Next time the same method is called without $criteria, the ... | [
"Gets",
"an",
"array",
"of",
"Customer",
"objects",
"which",
"contain",
"a",
"foreign",
"key",
"that",
"references",
"this",
"object",
"."
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseCountry.php#L1064-L1107 |
19,378 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseCountry.php | BaseCountry.countCustomers | public function countCustomers(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
{
$partial = $this->collCustomersPartial && !$this->isNew();
if (null === $this->collCustomers || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collCustomers) {
... | php | public function countCustomers(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
{
$partial = $this->collCustomersPartial && !$this->isNew();
if (null === $this->collCustomers || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collCustomers) {
... | [
"public",
"function",
"countCustomers",
"(",
"Criteria",
"$",
"criteria",
"=",
"null",
",",
"$",
"distinct",
"=",
"false",
",",
"PropelPDO",
"$",
"con",
"=",
"null",
")",
"{",
"$",
"partial",
"=",
"$",
"this",
"->",
"collCustomersPartial",
"&&",
"!",
"$"... | Returns the number of related Customer objects.
@param Criteria $criteria
@param boolean $distinct
@param PropelPDO $con
@return int Count of related Customer objects.
@throws PropelException | [
"Returns",
"the",
"number",
"of",
"related",
"Customer",
"objects",
"."
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseCountry.php#L1150-L1172 |
19,379 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseCountry.php | BaseCountry.addCustomer | public function addCustomer(Customer $l)
{
if ($this->collCustomers === null) {
$this->initCustomers();
$this->collCustomersPartial = true;
}
if (!in_array($l, $this->collCustomers->getArrayCopy(), true)) { // only add it if the **same** object is not already associa... | php | public function addCustomer(Customer $l)
{
if ($this->collCustomers === null) {
$this->initCustomers();
$this->collCustomersPartial = true;
}
if (!in_array($l, $this->collCustomers->getArrayCopy(), true)) { // only add it if the **same** object is not already associa... | [
"public",
"function",
"addCustomer",
"(",
"Customer",
"$",
"l",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"collCustomers",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"initCustomers",
"(",
")",
";",
"$",
"this",
"->",
"collCustomersPartial",
"=",
"true",
... | Method called to associate a Customer object to this object
through the Customer foreign key attribute.
@param Customer $l Customer
@return Country The current object (for fluent API support) | [
"Method",
"called",
"to",
"associate",
"a",
"Customer",
"object",
"to",
"this",
"object",
"through",
"the",
"Customer",
"foreign",
"key",
"attribute",
"."
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseCountry.php#L1181-L1197 |
19,380 | CakeCMS/Core | src/Controller/Component/MoveComponent.php | MoveComponent.down | public function down(Table $table, $id, $step = 1)
{
return $this->_move($table, $id, $step, self::TYPE_DOWN);
} | php | public function down(Table $table, $id, $step = 1)
{
return $this->_move($table, $id, $step, self::TYPE_DOWN);
} | [
"public",
"function",
"down",
"(",
"Table",
"$",
"table",
",",
"$",
"id",
",",
"$",
"step",
"=",
"1",
")",
"{",
"return",
"$",
"this",
"->",
"_move",
"(",
"$",
"table",
",",
"$",
"id",
",",
"$",
"step",
",",
"self",
"::",
"TYPE_DOWN",
")",
";",... | Move down record in tree.
@param Table $table
@param int $id
@param int $step
@return \Cake\Http\Response|null | [
"Move",
"down",
"record",
"in",
"tree",
"."
] | f9cba7aa0043a10e5c35bd45fbad158688a09a96 | https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/Controller/Component/MoveComponent.php#L53-L56 |
19,381 | CakeCMS/Core | src/Controller/Component/MoveComponent.php | MoveComponent.up | public function up(Table $table, $id, $step = 1)
{
return $this->_move($table, $id, $step);
} | php | public function up(Table $table, $id, $step = 1)
{
return $this->_move($table, $id, $step);
} | [
"public",
"function",
"up",
"(",
"Table",
"$",
"table",
",",
"$",
"id",
",",
"$",
"step",
"=",
"1",
")",
"{",
"return",
"$",
"this",
"->",
"_move",
"(",
"$",
"table",
",",
"$",
"id",
",",
"$",
"step",
")",
";",
"}"
] | Move up record in tree.
@param Table $table
@param int $id
@param int $step
@return \Cake\Http\Response|null
@SuppressWarnings(PHPMD.ShortMethodName) | [
"Move",
"up",
"record",
"in",
"tree",
"."
] | f9cba7aa0043a10e5c35bd45fbad158688a09a96 | https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/Controller/Component/MoveComponent.php#L92-L95 |
19,382 | CakeCMS/Core | src/Controller/Component/MoveComponent.php | MoveComponent._move | protected function _move(Table $table, $id, $step = 1, $type = self::TYPE_UP)
{
$behaviors = $table->behaviors();
if (!Arr::in('Tree', $behaviors->loaded())) {
$behaviors->load('Tree');
}
$entity = $table->get($id);
/** @var TreeBehavior $treeBehavior */
... | php | protected function _move(Table $table, $id, $step = 1, $type = self::TYPE_UP)
{
$behaviors = $table->behaviors();
if (!Arr::in('Tree', $behaviors->loaded())) {
$behaviors->load('Tree');
}
$entity = $table->get($id);
/** @var TreeBehavior $treeBehavior */
... | [
"protected",
"function",
"_move",
"(",
"Table",
"$",
"table",
",",
"$",
"id",
",",
"$",
"step",
"=",
"1",
",",
"$",
"type",
"=",
"self",
"::",
"TYPE_UP",
")",
"{",
"$",
"behaviors",
"=",
"$",
"table",
"->",
"behaviors",
"(",
")",
";",
"if",
"(",
... | Move object in tree table.
@param Table $table
@param string $type
@param int $id
@param int $step
@return \Cake\Http\Response|null | [
"Move",
"object",
"in",
"tree",
"table",
"."
] | f9cba7aa0043a10e5c35bd45fbad158688a09a96 | https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/Controller/Component/MoveComponent.php#L106-L126 |
19,383 | CakeCMS/Core | src/Controller/Component/MoveComponent.php | MoveComponent._redirect | protected function _redirect()
{
$request = $this->_controller->request;
return $this->_controller->redirect([
'prefix' => $request->getParam('prefix'),
'plugin' => $request->getParam('plugin'),
'controller' => $request->getParam('controller'),
... | php | protected function _redirect()
{
$request = $this->_controller->request;
return $this->_controller->redirect([
'prefix' => $request->getParam('prefix'),
'plugin' => $request->getParam('plugin'),
'controller' => $request->getParam('controller'),
... | [
"protected",
"function",
"_redirect",
"(",
")",
"{",
"$",
"request",
"=",
"$",
"this",
"->",
"_controller",
"->",
"request",
";",
"return",
"$",
"this",
"->",
"_controller",
"->",
"redirect",
"(",
"[",
"'prefix'",
"=>",
"$",
"request",
"->",
"getParam",
... | Process redirect.
@return \Cake\Http\Response|null | [
"Process",
"redirect",
"."
] | f9cba7aa0043a10e5c35bd45fbad158688a09a96 | https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/Controller/Component/MoveComponent.php#L133-L142 |
19,384 | nguyenanhung/nusoap | src-fix/nusoap.php | nusoap_base.& | function &getDebugAsXMLComment()
{
// it would be nice to use a memory stream here to use
// memory more efficiently
while (strpos($this->debug_str, '--')) {
$this->debug_str = str_replace('--', '- -', $this->debug_str);
}
$ret = "<!--\n" . $this->debug_str . "\n-... | php | function &getDebugAsXMLComment()
{
// it would be nice to use a memory stream here to use
// memory more efficiently
while (strpos($this->debug_str, '--')) {
$this->debug_str = str_replace('--', '- -', $this->debug_str);
}
$ret = "<!--\n" . $this->debug_str . "\n-... | [
"function",
"&",
"getDebugAsXMLComment",
"(",
")",
"{",
"// it would be nice to use a memory stream here to use",
"// memory more efficiently",
"while",
"(",
"strpos",
"(",
"$",
"this",
"->",
"debug_str",
",",
"'--'",
")",
")",
"{",
"$",
"this",
"->",
"debug_str",
"... | gets the current debug data for this instance as an XML comment
this may change the contents of the debug data
@return debug data as an XML comment
@access public | [
"gets",
"the",
"current",
"debug",
"data",
"for",
"this",
"instance",
"as",
"an",
"XML",
"comment",
"this",
"may",
"change",
"the",
"contents",
"of",
"the",
"debug",
"data"
] | a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556 | https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src-fix/nusoap.php#L346-L356 |
19,385 | nguyenanhung/nusoap | src-fix/nusoap.php | nusoap_xmlschema.serializeTypeDef | function serializeTypeDef($type)
{
//print "in sTD() for type $type<br>";
if ($typeDef = $this->getTypeDef($type)) {
$str .= '<' . $type;
if (is_array($typeDef['attrs'])) {
foreach ($typeDef['attrs'] as $attName => $data) {
$str .= " $attNa... | php | function serializeTypeDef($type)
{
//print "in sTD() for type $type<br>";
if ($typeDef = $this->getTypeDef($type)) {
$str .= '<' . $type;
if (is_array($typeDef['attrs'])) {
foreach ($typeDef['attrs'] as $attName => $data) {
$str .= " $attNa... | [
"function",
"serializeTypeDef",
"(",
"$",
"type",
")",
"{",
"//print \"in sTD() for type $type<br>\";",
"if",
"(",
"$",
"typeDef",
"=",
"$",
"this",
"->",
"getTypeDef",
"(",
"$",
"type",
")",
")",
"{",
"$",
"str",
".=",
"'<'",
".",
"$",
"type",
";",
"if"... | returns a sample serialization of a given type, or false if no type by the given name
@param string $type name of type
@return mixed
@access public
@deprecated | [
"returns",
"a",
"sample",
"serialization",
"of",
"a",
"given",
"type",
"or",
"false",
"if",
"no",
"type",
"by",
"the",
"given",
"name"
] | a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556 | https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src-fix/nusoap.php#L1995-L2022 |
19,386 | nguyenanhung/nusoap | src-fix/nusoap.php | nusoap_xmlschema.typeToForm | function typeToForm($name, $type)
{
// get typedef
if ($typeDef = $this->getTypeDef($type)) {
// if struct
if ($typeDef['phpType'] == 'struct') {
$buffer .= '<table>';
foreach ($typeDef['elements'] as $child => $childDef) {
... | php | function typeToForm($name, $type)
{
// get typedef
if ($typeDef = $this->getTypeDef($type)) {
// if struct
if ($typeDef['phpType'] == 'struct') {
$buffer .= '<table>';
foreach ($typeDef['elements'] as $child => $childDef) {
... | [
"function",
"typeToForm",
"(",
"$",
"name",
",",
"$",
"type",
")",
"{",
"// get typedef",
"if",
"(",
"$",
"typeDef",
"=",
"$",
"this",
"->",
"getTypeDef",
"(",
"$",
"type",
")",
")",
"{",
"// if struct",
"if",
"(",
"$",
"typeDef",
"[",
"'phpType'",
"... | returns HTML form elements that allow a user
to enter values for creating an instance of the given type.
@param string $name name for type instance
@param string $type name of type
@return string
@access public
@deprecated | [
"returns",
"HTML",
"form",
"elements",
"that",
"allow",
"a",
"user",
"to",
"enter",
"values",
"for",
"creating",
"an",
"instance",
"of",
"the",
"given",
"type",
"."
] | a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556 | https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src-fix/nusoap.php#L2035-L2066 |
19,387 | nguyenanhung/nusoap | src-fix/nusoap.php | nusoap_xmlschema.addComplexType | function addComplexType(
$name, $typeClass = 'complexType', $phpType = 'array', $compositor = '', $restrictionBase = '', $elements = [], $attrs = [],
$arrayType = ''
) {
$this->complexTypes[$name] = [
'name' => $name,
'typeClass' => $typeClass,
... | php | function addComplexType(
$name, $typeClass = 'complexType', $phpType = 'array', $compositor = '', $restrictionBase = '', $elements = [], $attrs = [],
$arrayType = ''
) {
$this->complexTypes[$name] = [
'name' => $name,
'typeClass' => $typeClass,
... | [
"function",
"addComplexType",
"(",
"$",
"name",
",",
"$",
"typeClass",
"=",
"'complexType'",
",",
"$",
"phpType",
"=",
"'array'",
",",
"$",
"compositor",
"=",
"''",
",",
"$",
"restrictionBase",
"=",
"''",
",",
"$",
"elements",
"=",
"[",
"]",
",",
"$",
... | adds a complex type to the schema
example: array
addType(
'ArrayOfstring',
'complexType',
'array',
'',
'SOAP-ENC:Array',
array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'string[]'),
'xsd:string'
);
example: PHP associative array ( SOAP Struct )
addType(
'SOAPStruct',
'complexType',
'struct',
'all',
array('myVar... | [
"adds",
"a",
"complex",
"type",
"to",
"the",
"schema"
] | a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556 | https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src-fix/nusoap.php#L2110-L2127 |
19,388 | nguyenanhung/nusoap | src-fix/nusoap.php | soap_transport_http.setURL | function setURL($url)
{
$this->url = $url;
$u = parse_url($url);
foreach ($u as $k => $v) {
$this->debug("parsed URL $k = $v");
$this->$k = $v;
}
// add any GET params to path
if (isset($u['query']) && $u['query'] != '') {
$this->... | php | function setURL($url)
{
$this->url = $url;
$u = parse_url($url);
foreach ($u as $k => $v) {
$this->debug("parsed URL $k = $v");
$this->$k = $v;
}
// add any GET params to path
if (isset($u['query']) && $u['query'] != '') {
$this->... | [
"function",
"setURL",
"(",
"$",
"url",
")",
"{",
"$",
"this",
"->",
"url",
"=",
"$",
"url",
";",
"$",
"u",
"=",
"parse_url",
"(",
"$",
"url",
")",
";",
"foreach",
"(",
"$",
"u",
"as",
"$",
"k",
"=>",
"$",
"v",
")",
"{",
"$",
"this",
"->",
... | sets the URL to which to connect
@param string $url The URL to which to connect
@access private | [
"sets",
"the",
"URL",
"to",
"which",
"to",
"connect"
] | a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556 | https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src-fix/nusoap.php#L2409-L2446 |
19,389 | nguyenanhung/nusoap | src-fix/nusoap.php | soap_transport_http.setEncoding | function setEncoding($enc = 'gzip, deflate')
{
if (function_exists('gzdeflate')) {
$this->protocol_version = '1.1';
$this->setHeader('Accept-Encoding', $enc);
if (!isset($this->outgoing_headers['Connection'])) {
$this->setHeader('Connection', 'close');
... | php | function setEncoding($enc = 'gzip, deflate')
{
if (function_exists('gzdeflate')) {
$this->protocol_version = '1.1';
$this->setHeader('Accept-Encoding', $enc);
if (!isset($this->outgoing_headers['Connection'])) {
$this->setHeader('Connection', 'close');
... | [
"function",
"setEncoding",
"(",
"$",
"enc",
"=",
"'gzip, deflate'",
")",
"{",
"if",
"(",
"function_exists",
"(",
"'gzdeflate'",
")",
")",
"{",
"$",
"this",
"->",
"protocol_version",
"=",
"'1.1'",
";",
"$",
"this",
"->",
"setHeader",
"(",
"'Accept-Encoding'",... | use http encoding
@param string $enc encoding style. supported values: gzip, deflate, or both
@access public | [
"use",
"http",
"encoding"
] | a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556 | https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src-fix/nusoap.php#L2873-L2886 |
19,390 | nguyenanhung/nusoap | src-fix/nusoap.php | nusoap_server.register | function register(
$name, $in = [], $out = [], $namespace = FALSE, $soapaction = FALSE, $style = FALSE, $use = FALSE, $documentation = '',
$encodingStyle = ''
) {
global $HTTP_SERVER_VARS;
if ($this->externalWSDLURL) {
die('You cannot bind to an external WSDL file, and r... | php | function register(
$name, $in = [], $out = [], $namespace = FALSE, $soapaction = FALSE, $style = FALSE, $use = FALSE, $documentation = '',
$encodingStyle = ''
) {
global $HTTP_SERVER_VARS;
if ($this->externalWSDLURL) {
die('You cannot bind to an external WSDL file, and r... | [
"function",
"register",
"(",
"$",
"name",
",",
"$",
"in",
"=",
"[",
"]",
",",
"$",
"out",
"=",
"[",
"]",
",",
"$",
"namespace",
"=",
"FALSE",
",",
"$",
"soapaction",
"=",
"FALSE",
",",
"$",
"style",
"=",
"FALSE",
",",
"$",
"use",
"=",
"FALSE",
... | register a service function with the server
@param string $name the name of the PHP function, class.method or class..method
@param array $in assoc array of input values: key = param name, value = param type
@param array $out assoc array of output values: key = param name, value... | [
"register",
"a",
"service",
"function",
"with",
"the",
"server"
] | a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556 | https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src-fix/nusoap.php#L4693-L4754 |
19,391 | nguyenanhung/nusoap | src-fix/nusoap.php | wsdl.getOperations | function getOperations($portName = '', $bindingType = 'soap')
{
$ops = [];
if ($bindingType == 'soap') {
$bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/';
} elseif ($bindingType == 'soap12') {
$bindingType = 'http://schemas.xmlsoap.org/wsdl/soap12/';
} e... | php | function getOperations($portName = '', $bindingType = 'soap')
{
$ops = [];
if ($bindingType == 'soap') {
$bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/';
} elseif ($bindingType == 'soap12') {
$bindingType = 'http://schemas.xmlsoap.org/wsdl/soap12/';
} e... | [
"function",
"getOperations",
"(",
"$",
"portName",
"=",
"''",
",",
"$",
"bindingType",
"=",
"'soap'",
")",
"{",
"$",
"ops",
"=",
"[",
"]",
";",
"if",
"(",
"$",
"bindingType",
"==",
"'soap'",
")",
"{",
"$",
"bindingType",
"=",
"'http://schemas.xmlsoap.org... | returns an assoc array of operation names => operation data
@param string $portName WSDL port name
@param string $bindingType eg: soap, smtp, dime (only soap and soap12 are currently supported)
@return array
@access public | [
"returns",
"an",
"assoc",
"array",
"of",
"operation",
"names",
"=",
">",
"operation",
"data"
] | a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556 | https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src-fix/nusoap.php#L5481-L5513 |
19,392 | nguyenanhung/nusoap | src-fix/nusoap.php | nusoap_client.parseResponse | function parseResponse($headers, $data)
{
$this->debug('Entering parseResponse() for data of length ' . strlen($data) . ' headers:');
$this->appendDebug($this->varDump($headers));
if (!isset($headers['content-type'])) {
$this->setError('Response not of type text/xml (no content-t... | php | function parseResponse($headers, $data)
{
$this->debug('Entering parseResponse() for data of length ' . strlen($data) . ' headers:');
$this->appendDebug($this->varDump($headers));
if (!isset($headers['content-type'])) {
$this->setError('Response not of type text/xml (no content-t... | [
"function",
"parseResponse",
"(",
"$",
"headers",
",",
"$",
"data",
")",
"{",
"$",
"this",
"->",
"debug",
"(",
"'Entering parseResponse() for data of length '",
".",
"strlen",
"(",
"$",
"data",
")",
".",
"' headers:'",
")",
";",
"$",
"this",
"->",
"appendDeb... | processes SOAP message returned from server
@param array $headers The HTTP headers
@param string $data unprocessed response data from server
@return mixed value of the message, decoded into a PHP type
@access private | [
"processes",
"SOAP",
"message",
"returned",
"from",
"server"
] | a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556 | https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src-fix/nusoap.php#L8072-L8124 |
19,393 | nguyenanhung/nusoap | src-fix/nusoap.php | nusoap_client.getProxy | function getProxy()
{
$r = rand();
$evalStr = $this->_getProxyClassCode($r);
//$this->debug("proxy class: $evalStr");
if ($this->getError()) {
$this->debug("Error from _getProxyClassCode, so return null");
return NULL;
}
// eval the clas... | php | function getProxy()
{
$r = rand();
$evalStr = $this->_getProxyClassCode($r);
//$this->debug("proxy class: $evalStr");
if ($this->getError()) {
$this->debug("Error from _getProxyClassCode, so return null");
return NULL;
}
// eval the clas... | [
"function",
"getProxy",
"(",
")",
"{",
"$",
"r",
"=",
"rand",
"(",
")",
";",
"$",
"evalStr",
"=",
"$",
"this",
"->",
"_getProxyClassCode",
"(",
"$",
"r",
")",
";",
"//$this->debug(\"proxy class: $evalStr\");",
"if",
"(",
"$",
"this",
"->",
"getError",
"(... | dynamically creates an instance of a proxy class,
allowing user to directly call methods from wsdl
@return object soap_proxy object
@access public | [
"dynamically",
"creates",
"an",
"instance",
"of",
"a",
"proxy",
"class",
"allowing",
"user",
"to",
"directly",
"call",
"methods",
"from",
"wsdl"
] | a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556 | https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src-fix/nusoap.php#L8306-L8349 |
19,394 | nguyenanhung/nusoap | src-fix/nusoap.php | nusoap_client._getProxyClassCode | function _getProxyClassCode($r)
{
$this->debug("in getProxy endpointType=$this->endpointType");
$this->appendDebug("wsdl=" . $this->varDump($this->wsdl));
if ($this->endpointType != 'wsdl') {
$evalStr = 'A proxy can only be created for a WSDL client';
$this->setError(... | php | function _getProxyClassCode($r)
{
$this->debug("in getProxy endpointType=$this->endpointType");
$this->appendDebug("wsdl=" . $this->varDump($this->wsdl));
if ($this->endpointType != 'wsdl') {
$evalStr = 'A proxy can only be created for a WSDL client';
$this->setError(... | [
"function",
"_getProxyClassCode",
"(",
"$",
"r",
")",
"{",
"$",
"this",
"->",
"debug",
"(",
"\"in getProxy endpointType=$this->endpointType\"",
")",
";",
"$",
"this",
"->",
"appendDebug",
"(",
"\"wsdl=\"",
".",
"$",
"this",
"->",
"varDump",
"(",
"$",
"this",
... | dynamically creates proxy class code
@return string PHP/NuSOAP code for the proxy class
@access private | [
"dynamically",
"creates",
"proxy",
"class",
"code"
] | a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556 | https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src-fix/nusoap.php#L8357-L8411 |
19,395 | webforge-labs/psc-cms | lib/Psc/Form/ComponentsValidator.php | ComponentsValidator.validateSet | public function validateSet() {
$this->validatedComponents = array(); // jede Componente nur einmal validieren, wir führen buch
$exceptions = array();
foreach ($this->components as $component) {
try {
$this->validateComponent($component);
} catch (ValidatorException $e) {
... | php | public function validateSet() {
$this->validatedComponents = array(); // jede Componente nur einmal validieren, wir führen buch
$exceptions = array();
foreach ($this->components as $component) {
try {
$this->validateComponent($component);
} catch (ValidatorException $e) {
... | [
"public",
"function",
"validateSet",
"(",
")",
"{",
"$",
"this",
"->",
"validatedComponents",
"=",
"array",
"(",
")",
";",
"// jede Componente nur einmal validieren, wir führen buch",
"$",
"exceptions",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"... | Validiert alle Daten anhand der Meta-Daten von den FormDaten
optionals müssen hiervor gesetzt werden
wenn $this->exceptionList TRUE ist werden die ValidationExceptions gesammelt und dann eine ValidatorExceptionList geworfen
wenn FALSE wird direkt die erste ValidatorException geworfen | [
"Validiert",
"alle",
"Daten",
"anhand",
"der",
"Meta",
"-",
"Daten",
"von",
"den",
"FormDaten"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/Form/ComponentsValidator.php#L67-L89 |
19,396 | PortaText/php-sdk | src/PortaText/Command/Base.php | Base.getContentType | protected function getContentType($method)
{
// Just to make PHPMD happy.
$method = null;
$file = $this->getArgument("file");
if (!is_null($file)) {
return "text/csv";
}
$soundFile = $this->getArgument("sound_file");
if (!is_null($soundFile)) {
... | php | protected function getContentType($method)
{
// Just to make PHPMD happy.
$method = null;
$file = $this->getArgument("file");
if (!is_null($file)) {
return "text/csv";
}
$soundFile = $this->getArgument("sound_file");
if (!is_null($soundFile)) {
... | [
"protected",
"function",
"getContentType",
"(",
"$",
"method",
")",
"{",
"// Just to make PHPMD happy.",
"$",
"method",
"=",
"null",
";",
"$",
"file",
"=",
"$",
"this",
"->",
"getArgument",
"(",
"\"file\"",
")",
";",
"if",
"(",
"!",
"is_null",
"(",
"$",
... | Returns the content type for this endpoint.
@param string $method Method for this command.
@return string | [
"Returns",
"the",
"content",
"type",
"for",
"this",
"endpoint",
"."
] | dbe04ef043db5b251953f9de57aa4d0f1785dfcc | https://github.com/PortaText/php-sdk/blob/dbe04ef043db5b251953f9de57aa4d0f1785dfcc/src/PortaText/Command/Base.php#L115-L128 |
19,397 | PortaText/php-sdk | src/PortaText/Command/Base.php | Base.getAcceptContentType | protected function getAcceptContentType($method)
{
// Just to make PHPMD happy.
$method = null;
$acceptFile = $this->getArgument("accept_file");
if (!is_null($acceptFile)) {
return "text/csv";
}
$acceptAnyFile = $this->getArgument("accept_any_file");
... | php | protected function getAcceptContentType($method)
{
// Just to make PHPMD happy.
$method = null;
$acceptFile = $this->getArgument("accept_file");
if (!is_null($acceptFile)) {
return "text/csv";
}
$acceptAnyFile = $this->getArgument("accept_any_file");
... | [
"protected",
"function",
"getAcceptContentType",
"(",
"$",
"method",
")",
"{",
"// Just to make PHPMD happy.",
"$",
"method",
"=",
"null",
";",
"$",
"acceptFile",
"=",
"$",
"this",
"->",
"getArgument",
"(",
"\"accept_file\"",
")",
";",
"if",
"(",
"!",
"is_null... | Returns the accepted content type for this endpoint.
@param string $method Method for this command.
@return string | [
"Returns",
"the",
"accepted",
"content",
"type",
"for",
"this",
"endpoint",
"."
] | dbe04ef043db5b251953f9de57aa4d0f1785dfcc | https://github.com/PortaText/php-sdk/blob/dbe04ef043db5b251953f9de57aa4d0f1785dfcc/src/PortaText/Command/Base.php#L137-L154 |
19,398 | PortaText/php-sdk | src/PortaText/Command/Base.php | Base.run | protected function run($method)
{
$endpoint = $this->getEndpoint($method);
$outputFile = $this->getArgument('accept_file');
if (is_null($outputFile)) {
$outputFile = $this->getArgument('accept_any_file');
}
if (is_null($outputFile)) {
$outputFile = $th... | php | protected function run($method)
{
$endpoint = $this->getEndpoint($method);
$outputFile = $this->getArgument('accept_file');
if (is_null($outputFile)) {
$outputFile = $this->getArgument('accept_any_file');
}
if (is_null($outputFile)) {
$outputFile = $th... | [
"protected",
"function",
"run",
"(",
"$",
"method",
")",
"{",
"$",
"endpoint",
"=",
"$",
"this",
"->",
"getEndpoint",
"(",
"$",
"method",
")",
";",
"$",
"outputFile",
"=",
"$",
"this",
"->",
"getArgument",
"(",
"'accept_file'",
")",
";",
"if",
"(",
"... | Runs this command with the given method and returns the result.
@param string $method HTTP Method to use.
@return PortaText\Command\ICommand
@throws PortaText\Exception\RequestError | [
"Runs",
"this",
"command",
"with",
"the",
"given",
"method",
"and",
"returns",
"the",
"result",
"."
] | dbe04ef043db5b251953f9de57aa4d0f1785dfcc | https://github.com/PortaText/php-sdk/blob/dbe04ef043db5b251953f9de57aa4d0f1785dfcc/src/PortaText/Command/Base.php#L219-L243 |
19,399 | onigoetz/imagecache | src/Manager.php | Manager.getOriginalFile | public function getOriginalFile($source_file)
{
$original_file = $this->options['path_local'] . '/' . $source_file;
if (!is_file($original_file)) {
throw new Exceptions\NotFoundException('File not found');
}
return $original_file;
} | php | public function getOriginalFile($source_file)
{
$original_file = $this->options['path_local'] . '/' . $source_file;
if (!is_file($original_file)) {
throw new Exceptions\NotFoundException('File not found');
}
return $original_file;
} | [
"public",
"function",
"getOriginalFile",
"(",
"$",
"source_file",
")",
"{",
"$",
"original_file",
"=",
"$",
"this",
"->",
"options",
"[",
"'path_local'",
"]",
".",
"'/'",
".",
"$",
"source_file",
";",
"if",
"(",
"!",
"is_file",
"(",
"$",
"original_file",
... | The path to the original file
@param $source_file
@return string
@throws Exceptions\NotFoundException | [
"The",
"path",
"to",
"the",
"original",
"file"
] | 8e22c11def1733819183e8296bab3c8a4ffc1d9c | https://github.com/onigoetz/imagecache/blob/8e22c11def1733819183e8296bab3c8a4ffc1d9c/src/Manager.php#L128-L136 |
Subsets and Splits
Yii Code Samples
Gathers all records from test, train, and validation sets that contain the word 'yii', providing a basic filtered view of the dataset relevant to Yii-related content.