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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
223,200 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php | ClassMetadataFactory.addInheritedNamedQueries | private function addInheritedNamedQueries(ClassMetadata $subClass, ClassMetadata $parentClass)
{
foreach ($parentClass->namedQueries as $name => $query) {
if ( ! isset ($subClass->namedQueries[$name])) {
$subClass->addNamedQuery(array(
'name' => $query['name'... | php | private function addInheritedNamedQueries(ClassMetadata $subClass, ClassMetadata $parentClass)
{
foreach ($parentClass->namedQueries as $name => $query) {
if ( ! isset ($subClass->namedQueries[$name])) {
$subClass->addNamedQuery(array(
'name' => $query['name'... | [
"private",
"function",
"addInheritedNamedQueries",
"(",
"ClassMetadata",
"$",
"subClass",
",",
"ClassMetadata",
"$",
"parentClass",
")",
"{",
"foreach",
"(",
"$",
"parentClass",
"->",
"namedQueries",
"as",
"$",
"name",
"=>",
"$",
"query",
")",
"{",
"if",
"(",
... | Adds inherited named queries to the subclass mapping.
@since 2.2
@param \Doctrine\ORM\Mapping\ClassMetadata $subClass
@param \Doctrine\ORM\Mapping\ClassMetadata $parentClass
@return void | [
"Adds",
"inherited",
"named",
"queries",
"to",
"the",
"subclass",
"mapping",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php#L532-L542 |
223,201 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php | ClassMetadataFactory.addInheritedNamedNativeQueries | private function addInheritedNamedNativeQueries(ClassMetadata $subClass, ClassMetadata $parentClass)
{
foreach ($parentClass->namedNativeQueries as $name => $query) {
if ( ! isset ($subClass->namedNativeQueries[$name])) {
$subClass->addNamedNativeQuery(array(
... | php | private function addInheritedNamedNativeQueries(ClassMetadata $subClass, ClassMetadata $parentClass)
{
foreach ($parentClass->namedNativeQueries as $name => $query) {
if ( ! isset ($subClass->namedNativeQueries[$name])) {
$subClass->addNamedNativeQuery(array(
... | [
"private",
"function",
"addInheritedNamedNativeQueries",
"(",
"ClassMetadata",
"$",
"subClass",
",",
"ClassMetadata",
"$",
"parentClass",
")",
"{",
"foreach",
"(",
"$",
"parentClass",
"->",
"namedNativeQueries",
"as",
"$",
"name",
"=>",
"$",
"query",
")",
"{",
"... | Adds inherited named native queries to the subclass mapping.
@since 2.3
@param \Doctrine\ORM\Mapping\ClassMetadata $subClass
@param \Doctrine\ORM\Mapping\ClassMetadata $parentClass
@return void | [
"Adds",
"inherited",
"named",
"native",
"queries",
"to",
"the",
"subclass",
"mapping",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php#L554-L567 |
223,202 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php | ClassMetadataFactory.addInheritedSqlResultSetMappings | private function addInheritedSqlResultSetMappings(ClassMetadata $subClass, ClassMetadata $parentClass)
{
foreach ($parentClass->sqlResultSetMappings as $name => $mapping) {
if ( ! isset ($subClass->sqlResultSetMappings[$name])) {
$entities = array();
foreach ($map... | php | private function addInheritedSqlResultSetMappings(ClassMetadata $subClass, ClassMetadata $parentClass)
{
foreach ($parentClass->sqlResultSetMappings as $name => $mapping) {
if ( ! isset ($subClass->sqlResultSetMappings[$name])) {
$entities = array();
foreach ($map... | [
"private",
"function",
"addInheritedSqlResultSetMappings",
"(",
"ClassMetadata",
"$",
"subClass",
",",
"ClassMetadata",
"$",
"parentClass",
")",
"{",
"foreach",
"(",
"$",
"parentClass",
"->",
"sqlResultSetMappings",
"as",
"$",
"name",
"=>",
"$",
"mapping",
")",
"{... | Adds inherited sql result set mappings to the subclass mapping.
@since 2.3
@param \Doctrine\ORM\Mapping\ClassMetadata $subClass
@param \Doctrine\ORM\Mapping\ClassMetadata $parentClass
@return void | [
"Adds",
"inherited",
"sql",
"result",
"set",
"mappings",
"to",
"the",
"subclass",
"mapping",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php#L579-L600 |
223,203 | shopsys/doctrine-orm | lib/Doctrine/ORM/Query/Parser.php | Parser.isInternalFunction | static public function isInternalFunction($functionName)
{
$functionName = strtolower($functionName);
return isset(self::$_STRING_FUNCTIONS[$functionName])
|| isset(self::$_DATETIME_FUNCTIONS[$functionName])
|| isset(self::$_NUMERIC_FUNCTIONS[$functionName]);
} | php | static public function isInternalFunction($functionName)
{
$functionName = strtolower($functionName);
return isset(self::$_STRING_FUNCTIONS[$functionName])
|| isset(self::$_DATETIME_FUNCTIONS[$functionName])
|| isset(self::$_NUMERIC_FUNCTIONS[$functionName]);
} | [
"static",
"public",
"function",
"isInternalFunction",
"(",
"$",
"functionName",
")",
"{",
"$",
"functionName",
"=",
"strtolower",
"(",
"$",
"functionName",
")",
";",
"return",
"isset",
"(",
"self",
"::",
"$",
"_STRING_FUNCTIONS",
"[",
"$",
"functionName",
"]",... | Checks if a function is internally defined. Used to prevent overwriting
of built-in functions through user-defined functions.
@param string $functionName
@return bool | [
"Checks",
"if",
"a",
"function",
"is",
"internally",
"defined",
".",
"Used",
"to",
"prevent",
"overwriting",
"of",
"built",
"-",
"in",
"functions",
"through",
"user",
"-",
"defined",
"functions",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Query/Parser.php#L181-L188 |
223,204 | shopsys/doctrine-orm | lib/Doctrine/ORM/Query/Parser.php | Parser.getAST | public function getAST()
{
// Parse & build AST
$AST = $this->QueryLanguage();
// Process any deferred validations of some nodes in the AST.
// This also allows post-processing of the AST for modification purposes.
$this->processDeferredIdentificationVariables();
if... | php | public function getAST()
{
// Parse & build AST
$AST = $this->QueryLanguage();
// Process any deferred validations of some nodes in the AST.
// This also allows post-processing of the AST for modification purposes.
$this->processDeferredIdentificationVariables();
if... | [
"public",
"function",
"getAST",
"(",
")",
"{",
"// Parse & build AST",
"$",
"AST",
"=",
"$",
"this",
"->",
"QueryLanguage",
"(",
")",
";",
"// Process any deferred validations of some nodes in the AST.",
"// This also allows post-processing of the AST for modification purposes.",... | Parses and builds AST for the given Query.
@return \Doctrine\ORM\Query\AST\SelectStatement |
\Doctrine\ORM\Query\AST\UpdateStatement |
\Doctrine\ORM\Query\AST\DeleteStatement | [
"Parses",
"and",
"builds",
"AST",
"for",
"the",
"given",
"Query",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Query/Parser.php#L265-L296 |
223,205 | shopsys/doctrine-orm | lib/Doctrine/ORM/Query/Parser.php | Parser.parse | public function parse()
{
$AST = $this->getAST();
if (($customWalkers = $this->query->getHint(Query::HINT_CUSTOM_TREE_WALKERS)) !== false) {
$this->customTreeWalkers = $customWalkers;
}
if (($customOutputWalker = $this->query->getHint(Query::HINT_CUSTOM_OUTPUT_WALKER)) ... | php | public function parse()
{
$AST = $this->getAST();
if (($customWalkers = $this->query->getHint(Query::HINT_CUSTOM_TREE_WALKERS)) !== false) {
$this->customTreeWalkers = $customWalkers;
}
if (($customOutputWalker = $this->query->getHint(Query::HINT_CUSTOM_OUTPUT_WALKER)) ... | [
"public",
"function",
"parse",
"(",
")",
"{",
"$",
"AST",
"=",
"$",
"this",
"->",
"getAST",
"(",
")",
";",
"if",
"(",
"(",
"$",
"customWalkers",
"=",
"$",
"this",
"->",
"query",
"->",
"getHint",
"(",
"Query",
"::",
"HINT_CUSTOM_TREE_WALKERS",
")",
")... | Parses a query string.
@return ParserResult | [
"Parses",
"a",
"query",
"string",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Query/Parser.php#L349-L393 |
223,206 | shopsys/doctrine-orm | lib/Doctrine/ORM/Query/Parser.php | Parser.fixIdentificationVariableOrder | private function fixIdentificationVariableOrder($AST)
{
if (count($this->identVariableExpressions) <= 1) {
return;
}
foreach ($this->queryComponents as $dqlAlias => $qComp) {
if ( ! isset($this->identVariableExpressions[$dqlAlias])) {
continue;
... | php | private function fixIdentificationVariableOrder($AST)
{
if (count($this->identVariableExpressions) <= 1) {
return;
}
foreach ($this->queryComponents as $dqlAlias => $qComp) {
if ( ! isset($this->identVariableExpressions[$dqlAlias])) {
continue;
... | [
"private",
"function",
"fixIdentificationVariableOrder",
"(",
"$",
"AST",
")",
"{",
"if",
"(",
"count",
"(",
"$",
"this",
"->",
"identVariableExpressions",
")",
"<=",
"1",
")",
"{",
"return",
";",
"}",
"foreach",
"(",
"$",
"this",
"->",
"queryComponents",
... | Fixes order of identification variables.
They have to appear in the select clause in the same order as the
declarations (from ... x join ... y join ... z ...) appear in the query
as the hydration process relies on that order for proper operation.
@param AST\SelectStatement|AST\DeleteStatement|AST\UpdateStatement $AST... | [
"Fixes",
"order",
"of",
"identification",
"variables",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Query/Parser.php#L406-L424 |
223,207 | shopsys/doctrine-orm | lib/Doctrine/ORM/Query/Parser.php | Parser.isAggregateFunction | private function isAggregateFunction($tokenType)
{
return in_array($tokenType, array(Lexer::T_AVG, Lexer::T_MIN, Lexer::T_MAX, Lexer::T_SUM, Lexer::T_COUNT));
} | php | private function isAggregateFunction($tokenType)
{
return in_array($tokenType, array(Lexer::T_AVG, Lexer::T_MIN, Lexer::T_MAX, Lexer::T_SUM, Lexer::T_COUNT));
} | [
"private",
"function",
"isAggregateFunction",
"(",
"$",
"tokenType",
")",
"{",
"return",
"in_array",
"(",
"$",
"tokenType",
",",
"array",
"(",
"Lexer",
"::",
"T_AVG",
",",
"Lexer",
"::",
"T_MIN",
",",
"Lexer",
"::",
"T_MAX",
",",
"Lexer",
"::",
"T_SUM",
... | Checks whether the given token type indicates an aggregate function.
@param int $tokenType
@return boolean TRUE if the token type is an aggregate function, FALSE otherwise. | [
"Checks",
"whether",
"the",
"given",
"token",
"type",
"indicates",
"an",
"aggregate",
"function",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Query/Parser.php#L556-L559 |
223,208 | shopsys/doctrine-orm | lib/Doctrine/ORM/Query/Parser.php | Parser.isNextAllAnySome | private function isNextAllAnySome()
{
return in_array($this->lexer->lookahead['type'], array(Lexer::T_ALL, Lexer::T_ANY, Lexer::T_SOME));
} | php | private function isNextAllAnySome()
{
return in_array($this->lexer->lookahead['type'], array(Lexer::T_ALL, Lexer::T_ANY, Lexer::T_SOME));
} | [
"private",
"function",
"isNextAllAnySome",
"(",
")",
"{",
"return",
"in_array",
"(",
"$",
"this",
"->",
"lexer",
"->",
"lookahead",
"[",
"'type'",
"]",
",",
"array",
"(",
"Lexer",
"::",
"T_ALL",
",",
"Lexer",
"::",
"T_ANY",
",",
"Lexer",
"::",
"T_SOME",
... | Checks whether the current lookahead token of the lexer has the type T_ALL, T_ANY or T_SOME.
@return boolean | [
"Checks",
"whether",
"the",
"current",
"lookahead",
"token",
"of",
"the",
"lexer",
"has",
"the",
"type",
"T_ALL",
"T_ANY",
"or",
"T_SOME",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Query/Parser.php#L566-L569 |
223,209 | shopsys/doctrine-orm | lib/Doctrine/ORM/Query/Parser.php | Parser.PathExpression | public function PathExpression($expectedTypes)
{
$identVariable = $this->IdentificationVariable();
$field = null;
if ($this->lexer->isNextToken(Lexer::T_DOT)) {
$this->match(Lexer::T_DOT);
$this->match(Lexer::T_IDENTIFIER);
$field = $this->lexer->token['... | php | public function PathExpression($expectedTypes)
{
$identVariable = $this->IdentificationVariable();
$field = null;
if ($this->lexer->isNextToken(Lexer::T_DOT)) {
$this->match(Lexer::T_DOT);
$this->match(Lexer::T_IDENTIFIER);
$field = $this->lexer->token['... | [
"public",
"function",
"PathExpression",
"(",
"$",
"expectedTypes",
")",
"{",
"$",
"identVariable",
"=",
"$",
"this",
"->",
"IdentificationVariable",
"(",
")",
";",
"$",
"field",
"=",
"null",
";",
"if",
"(",
"$",
"this",
"->",
"lexer",
"->",
"isNextToken",
... | Parses an arbitrary path expression and defers semantical validation
based on expected types.
PathExpression ::= IdentificationVariable {"." identifier}*
@param integer $expectedTypes
@return \Doctrine\ORM\Query\AST\PathExpression | [
"Parses",
"an",
"arbitrary",
"path",
"expression",
"and",
"defers",
"semantical",
"validation",
"based",
"on",
"expected",
"types",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Query/Parser.php#L1058-L1087 |
223,210 | shopsys/doctrine-orm | lib/Doctrine/ORM/Query/Parser.php | Parser.CustomFunctionDeclaration | private function CustomFunctionDeclaration()
{
$token = $this->lexer->lookahead;
$funcName = strtolower($token['value']);
// Check for custom functions afterwards
$config = $this->em->getConfiguration();
switch (true) {
case ($config->getCustomStringFunction($fu... | php | private function CustomFunctionDeclaration()
{
$token = $this->lexer->lookahead;
$funcName = strtolower($token['value']);
// Check for custom functions afterwards
$config = $this->em->getConfiguration();
switch (true) {
case ($config->getCustomStringFunction($fu... | [
"private",
"function",
"CustomFunctionDeclaration",
"(",
")",
"{",
"$",
"token",
"=",
"$",
"this",
"->",
"lexer",
"->",
"lookahead",
";",
"$",
"funcName",
"=",
"strtolower",
"(",
"$",
"token",
"[",
"'value'",
"]",
")",
";",
"// Check for custom functions after... | Helper function for FunctionDeclaration grammar rule.
@return \Doctrine\ORM\Query\AST\Functions\FunctionNode | [
"Helper",
"function",
"for",
"FunctionDeclaration",
"grammar",
"rule",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Query/Parser.php#L3360-L3381 |
223,211 | shopsys/doctrine-orm | lib/Doctrine/ORM/Query/FilterCollection.php | FilterCollection.getFilter | public function getFilter($name)
{
if ( ! $this->isEnabled($name)) {
throw new \InvalidArgumentException("Filter '" . $name . "' is not enabled.");
}
return $this->enabledFilters[$name];
} | php | public function getFilter($name)
{
if ( ! $this->isEnabled($name)) {
throw new \InvalidArgumentException("Filter '" . $name . "' is not enabled.");
}
return $this->enabledFilters[$name];
} | [
"public",
"function",
"getFilter",
"(",
"$",
"name",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isEnabled",
"(",
"$",
"name",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"\"Filter '\"",
".",
"$",
"name",
".",
"\"' is not enab... | Gets an enabled filter from the collection.
@param string $name Name of the filter.
@return \Doctrine\ORM\Query\Filter\SQLFilter The filter.
@throws \InvalidArgumentException If the filter is not enabled. | [
"Gets",
"an",
"enabled",
"filter",
"from",
"the",
"collection",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Query/FilterCollection.php#L156-L163 |
223,212 | shopsys/doctrine-orm | lib/Doctrine/ORM/Query/FilterCollection.php | FilterCollection.getHash | public function getHash()
{
// If there are only clean filters, the previous hash can be returned
if (self::FILTERS_STATE_CLEAN === $this->filtersState) {
return $this->filterHash;
}
$filterHash = '';
foreach ($this->enabledFilters as $name => $filter) {
... | php | public function getHash()
{
// If there are only clean filters, the previous hash can be returned
if (self::FILTERS_STATE_CLEAN === $this->filtersState) {
return $this->filterHash;
}
$filterHash = '';
foreach ($this->enabledFilters as $name => $filter) {
... | [
"public",
"function",
"getHash",
"(",
")",
"{",
"// If there are only clean filters, the previous hash can be returned",
"if",
"(",
"self",
"::",
"FILTERS_STATE_CLEAN",
"===",
"$",
"this",
"->",
"filtersState",
")",
"{",
"return",
"$",
"this",
"->",
"filterHash",
";",... | Generates a string of currently enabled filters to use for the cache id.
@return string | [
"Generates",
"a",
"string",
"of",
"currently",
"enabled",
"filters",
"to",
"use",
"for",
"the",
"cache",
"id",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Query/FilterCollection.php#L202-L216 |
223,213 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/Builder/EntityListenerBuilder.php | EntityListenerBuilder.bindEntityListener | static public function bindEntityListener(ClassMetadata $metadata, $className)
{
$class = $metadata->fullyQualifiedClassName($className);
if ( ! class_exists($class)) {
throw MappingException::entityListenerClassNotFound($class, $className);
}
foreach (get_class_methods... | php | static public function bindEntityListener(ClassMetadata $metadata, $className)
{
$class = $metadata->fullyQualifiedClassName($className);
if ( ! class_exists($class)) {
throw MappingException::entityListenerClassNotFound($class, $className);
}
foreach (get_class_methods... | [
"static",
"public",
"function",
"bindEntityListener",
"(",
"ClassMetadata",
"$",
"metadata",
",",
"$",
"className",
")",
"{",
"$",
"class",
"=",
"$",
"metadata",
"->",
"fullyQualifiedClassName",
"(",
"$",
"className",
")",
";",
"if",
"(",
"!",
"class_exists",
... | Lookup the entity class to find methods that match to event lifecycle names
@param \Doctrine\ORM\Mapping\ClassMetadata $metadata The entity metadata.
@param string $className The listener class name.
@throws \Doctrine\ORM\Mapping\MappingException When the listener class n... | [
"Lookup",
"the",
"entity",
"class",
"to",
"find",
"methods",
"that",
"match",
"to",
"event",
"lifecycle",
"names"
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/Builder/EntityListenerBuilder.php#L56-L71 |
223,214 | shopsys/doctrine-orm | lib/Doctrine/ORM/Cache/EntityCacheEntry.php | EntityCacheEntry.resolveAssociationEntries | public function resolveAssociationEntries(EntityManagerInterface $em)
{
return array_map(function($value) use ($em) {
if ( ! ($value instanceof AssociationCacheEntry)) {
return $value;
}
return $em->getReference($value->class, $value->identifier);
... | php | public function resolveAssociationEntries(EntityManagerInterface $em)
{
return array_map(function($value) use ($em) {
if ( ! ($value instanceof AssociationCacheEntry)) {
return $value;
}
return $em->getReference($value->class, $value->identifier);
... | [
"public",
"function",
"resolveAssociationEntries",
"(",
"EntityManagerInterface",
"$",
"em",
")",
"{",
"return",
"array_map",
"(",
"function",
"(",
"$",
"value",
")",
"use",
"(",
"$",
"em",
")",
"{",
"if",
"(",
"!",
"(",
"$",
"value",
"instanceof",
"Associ... | Retrieves the entity data resolving cache entries
@param \Doctrine\ORM\EntityManagerInterfac $em
@return array | [
"Retrieves",
"the",
"entity",
"data",
"resolving",
"cache",
"entries"
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Cache/EntityCacheEntry.php#L76-L85 |
223,215 | kontoulis/rabbitmq-laravel | src/Broker/Broker.php | Broker.listenToQueue | public function listenToQueue(array $handlers , $routingKey = null, $options =[] )
{
/* Look for handlers */
$handlersMap = array();
foreach ($handlers as $handlerClassPath) {
if (!class_exists($handlerClassPath)) {
$handlerClassPath = "Kontoulis\\RabbitMQLaravel\... | php | public function listenToQueue(array $handlers , $routingKey = null, $options =[] )
{
/* Look for handlers */
$handlersMap = array();
foreach ($handlers as $handlerClassPath) {
if (!class_exists($handlerClassPath)) {
$handlerClassPath = "Kontoulis\\RabbitMQLaravel\... | [
"public",
"function",
"listenToQueue",
"(",
"array",
"$",
"handlers",
",",
"$",
"routingKey",
"=",
"null",
",",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"/* Look for handlers */",
"$",
"handlersMap",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"han... | Starts to listen to a queue for incoming messages.
@param array $handlers Array of handler class instances
@param null $routingKey
@param array $options
@return bool
@internal param string $queueName The AMQP queue | [
"Starts",
"to",
"listen",
"to",
"a",
"queue",
"for",
"incoming",
"messages",
"."
] | f677b3b447be63dd14732309193d26c3b841c5fc | https://github.com/kontoulis/rabbitmq-laravel/blob/f677b3b447be63dd14732309193d26c3b841c5fc/src/Broker/Broker.php#L176-L214 |
223,216 | mespronos/mespronos | src/Entity/Getters/LeagueGettersTrait.php | LeagueGettersTrait.getDays | public function getDays() {
$query = \Drupal::entityQuery('day');
$query->condition('league', $this->id());
$query->sort('id', 'ASC');
$ids = $query->execute();
return Day::loadMultiple($ids);
} | php | public function getDays() {
$query = \Drupal::entityQuery('day');
$query->condition('league', $this->id());
$query->sort('id', 'ASC');
$ids = $query->execute();
return Day::loadMultiple($ids);
} | [
"public",
"function",
"getDays",
"(",
")",
"{",
"$",
"query",
"=",
"\\",
"Drupal",
"::",
"entityQuery",
"(",
"'day'",
")",
";",
"$",
"query",
"->",
"condition",
"(",
"'league'",
",",
"$",
"this",
"->",
"id",
"(",
")",
")",
";",
"$",
"query",
"->",
... | Return all days for league
@return \Drupal\mespronos\Entity\Day[] | [
"Return",
"all",
"days",
"for",
"league"
] | 73757663581ed9040944768073d1d9abc761196b | https://github.com/mespronos/mespronos/blob/73757663581ed9040944768073d1d9abc761196b/src/Entity/Getters/LeagueGettersTrait.php#L30-L37 |
223,217 | efficiently/jquery-laravel | src/Efficiently/JqueryLaravel/VerifyJavascriptResponse.php | VerifyJavascriptResponse.shouldPassThrough | protected function shouldPassThrough($request)
{
foreach ($this->except as $except) {
if ($request->is($except)) {
return true;
}
}
return false;
} | php | protected function shouldPassThrough($request)
{
foreach ($this->except as $except) {
if ($request->is($except)) {
return true;
}
}
return false;
} | [
"protected",
"function",
"shouldPassThrough",
"(",
"$",
"request",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"except",
"as",
"$",
"except",
")",
"{",
"if",
"(",
"$",
"request",
"->",
"is",
"(",
"$",
"except",
")",
")",
"{",
"return",
"true",
";",
... | Determine if the request has a URI that should pass through cross origin verification.
@param \Illuminate\Http\Request $request
@return bool | [
"Determine",
"if",
"the",
"request",
"has",
"a",
"URI",
"that",
"should",
"pass",
"through",
"cross",
"origin",
"verification",
"."
] | 30e3953e51ac8644e13d90150e2cf56012ce8f6b | https://github.com/efficiently/jquery-laravel/blob/30e3953e51ac8644e13d90150e2cf56012ce8f6b/src/Efficiently/JqueryLaravel/VerifyJavascriptResponse.php#L61-L69 |
223,218 | mmerian/phpcrawl | libs/Utils/PHPCrawlerUtils.class.php | PHPCrawlerUtils.buildURLFromParts | public static function buildURLFromParts($url_parts, $normalize = false)
{
// Host has to be set aat least
if (!isset($url_parts["host"]))
{
throw new Exception("Cannot generate URL, host not specified!");
}
if (!isset($url_parts["protocol"]) || $url_parts["protocol"] == "") $ur... | php | public static function buildURLFromParts($url_parts, $normalize = false)
{
// Host has to be set aat least
if (!isset($url_parts["host"]))
{
throw new Exception("Cannot generate URL, host not specified!");
}
if (!isset($url_parts["protocol"]) || $url_parts["protocol"] == "") $ur... | [
"public",
"static",
"function",
"buildURLFromParts",
"(",
"$",
"url_parts",
",",
"$",
"normalize",
"=",
"false",
")",
"{",
"// Host has to be set aat least\r",
"if",
"(",
"!",
"isset",
"(",
"$",
"url_parts",
"[",
"\"host\"",
"]",
")",
")",
"{",
"throw",
"new... | Builds an URL from it's single parts.
@param array $url_parts Array conatining the URL-parts.
The keys should be:
"protocol" (z.B. "http://") OPTIONAL
"host" (z.B. "www.bla.de")
"path" (z.B. "/test/palimm/") OPTIONAL
"file" (z.B. "index.htm") OPTIONAL
"port" (z.B. 80) OPTIONAL
"auth_username" OPTIONAL... | [
"Builds",
"an",
"URL",
"from",
"it",
"s",
"single",
"parts",
"."
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/Utils/PHPCrawlerUtils.class.php#L126-L175 |
223,219 | mmerian/phpcrawl | libs/Utils/PHPCrawlerUtils.class.php | PHPCrawlerUtils.normalizeURL | public static function normalizeURL($url)
{
$url_parts = self::splitURL($url);
if ($url_parts == null) return null;
$url_normalized = self::buildURLFromParts($url_parts, true);
return $url_normalized;
} | php | public static function normalizeURL($url)
{
$url_parts = self::splitURL($url);
if ($url_parts == null) return null;
$url_normalized = self::buildURLFromParts($url_parts, true);
return $url_normalized;
} | [
"public",
"static",
"function",
"normalizeURL",
"(",
"$",
"url",
")",
"{",
"$",
"url_parts",
"=",
"self",
"::",
"splitURL",
"(",
"$",
"url",
")",
";",
"if",
"(",
"$",
"url_parts",
"==",
"null",
")",
"return",
"null",
";",
"$",
"url_normalized",
"=",
... | Normalizes an URL
I.e. converts http://www.foo.com:80/path/ to http://www.foo.com/path/
@param string $url
@return string OR NULL on failure | [
"Normalizes",
"an",
"URL"
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/Utils/PHPCrawlerUtils.class.php#L185-L193 |
223,220 | mmerian/phpcrawl | libs/Utils/PHPCrawlerUtils.class.php | PHPCrawlerUtils.checkRegexPattern | public static function checkRegexPattern($pattern)
{
$check = @preg_match($pattern, "anything"); // thats the easy way to check a pattern ;)
if (is_integer($check) == false) return false;
else return true;
} | php | public static function checkRegexPattern($pattern)
{
$check = @preg_match($pattern, "anything"); // thats the easy way to check a pattern ;)
if (is_integer($check) == false) return false;
else return true;
} | [
"public",
"static",
"function",
"checkRegexPattern",
"(",
"$",
"pattern",
")",
"{",
"$",
"check",
"=",
"@",
"preg_match",
"(",
"$",
"pattern",
",",
"\"anything\"",
")",
";",
"// thats the easy way to check a pattern ;)\r",
"if",
"(",
"is_integer",
"(",
"$",
"che... | Checks whether a given RegEx-pattern is valid or not.
@return bool | [
"Checks",
"whether",
"a",
"given",
"RegEx",
"-",
"pattern",
"is",
"valid",
"or",
"not",
"."
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/Utils/PHPCrawlerUtils.class.php#L200-L205 |
223,221 | mmerian/phpcrawl | libs/Utils/PHPCrawlerUtils.class.php | PHPCrawlerUtils.getHTTPStatusCode | public static function getHTTPStatusCode($header)
{
$first_line = strtok($header, "\n");
preg_match("# [0-9]{3}#", $first_line, $match);
if (isset($match[0]))
return (int)trim($match[0]);
else
return null;
} | php | public static function getHTTPStatusCode($header)
{
$first_line = strtok($header, "\n");
preg_match("# [0-9]{3}#", $first_line, $match);
if (isset($match[0]))
return (int)trim($match[0]);
else
return null;
} | [
"public",
"static",
"function",
"getHTTPStatusCode",
"(",
"$",
"header",
")",
"{",
"$",
"first_line",
"=",
"strtok",
"(",
"$",
"header",
",",
"\"\\n\"",
")",
";",
"preg_match",
"(",
"\"# [0-9]{3}#\"",
",",
"$",
"first_line",
",",
"$",
"match",
")",
";",
... | Gets the HTTP-statuscode from a given response-header.
@param string $header The response-header
@return int The status-code or NULL if no status-code was found. | [
"Gets",
"the",
"HTTP",
"-",
"statuscode",
"from",
"a",
"given",
"response",
"-",
"header",
"."
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/Utils/PHPCrawlerUtils.class.php#L213-L223 |
223,222 | mmerian/phpcrawl | libs/Utils/PHPCrawlerUtils.class.php | PHPCrawlerUtils.buildURLFromLink | public static function buildURLFromLink($link, PHPCrawlerUrlPartsDescriptor $BaseUrl)
{
$url_parts = $BaseUrl->toArray();
// Dedoce HTML-entities
$link = PHPCrawlerEncodingUtils::decodeHtmlEntities($link);
// Remove anchor ("#..."), but ONLY at the end, not if # is at the beginning !... | php | public static function buildURLFromLink($link, PHPCrawlerUrlPartsDescriptor $BaseUrl)
{
$url_parts = $BaseUrl->toArray();
// Dedoce HTML-entities
$link = PHPCrawlerEncodingUtils::decodeHtmlEntities($link);
// Remove anchor ("#..."), but ONLY at the end, not if # is at the beginning !... | [
"public",
"static",
"function",
"buildURLFromLink",
"(",
"$",
"link",
",",
"PHPCrawlerUrlPartsDescriptor",
"$",
"BaseUrl",
")",
"{",
"$",
"url_parts",
"=",
"$",
"BaseUrl",
"->",
"toArray",
"(",
")",
";",
"// Dedoce HTML-entities\r",
"$",
"link",
"=",
"PHPCrawler... | Reconstructs a full qualified and normalized URL from a given link relating to the URL the link was found in.
@param string $link The link (i.e. "../page.htm")
@param PHPCrawlerUrlPartsDescriptor $BaseUrl The base-URL the link was found in as PHPCrawlerUrlPartsDescriptor-object
@return stri... | [
"Reconstructs",
"a",
"full",
"qualified",
"and",
"normalized",
"URL",
"from",
"a",
"given",
"link",
"relating",
"to",
"the",
"URL",
"the",
"link",
"was",
"found",
"in",
"."
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/Utils/PHPCrawlerUtils.class.php#L234-L328 |
223,223 | mmerian/phpcrawl | libs/Utils/PHPCrawlerUtils.class.php | PHPCrawlerUtils.getBaseUrlFromMetaTag | public static function getBaseUrlFromMetaTag(&$html_source)
{
preg_match("#<{1}[ ]{0,}((?i)base){1}[ ]{1,}((?i)href|src)[ ]{0,}=[ ]{0,}(\"|'){0,1}([^\"'><\n ]{0,})(\"|'|>|<|\n| )# i", $html_source, $match);
if (isset($match[4]))
{
$match[4] = trim($match[4]);
return $match[4];
... | php | public static function getBaseUrlFromMetaTag(&$html_source)
{
preg_match("#<{1}[ ]{0,}((?i)base){1}[ ]{1,}((?i)href|src)[ ]{0,}=[ ]{0,}(\"|'){0,1}([^\"'><\n ]{0,})(\"|'|>|<|\n| )# i", $html_source, $match);
if (isset($match[4]))
{
$match[4] = trim($match[4]);
return $match[4];
... | [
"public",
"static",
"function",
"getBaseUrlFromMetaTag",
"(",
"&",
"$",
"html_source",
")",
"{",
"preg_match",
"(",
"\"#<{1}[ ]{0,}((?i)base){1}[ ]{1,}((?i)href|src)[ ]{0,}=[ ]{0,}(\\\"|'){0,1}([^\\\"'><\\n ]{0,})(\\\"|'|>|<|\\n| )# i\"",
",",
"$",
"html_source",
",",
"$",
"match... | Returns the base-URL specified in a meta-tag in the given HTML-source
@return string The base-URL or NULL if not found. | [
"Returns",
"the",
"base",
"-",
"URL",
"specified",
"in",
"a",
"meta",
"-",
"tag",
"in",
"the",
"given",
"HTML",
"-",
"source"
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/Utils/PHPCrawlerUtils.class.php#L335-L345 |
223,224 | mmerian/phpcrawl | libs/Utils/PHPCrawlerUtils.class.php | PHPCrawlerUtils.getRedirectURLFromHeader | public static function getRedirectURLFromHeader(&$header)
{
// Get redirect-link from header
preg_match("/((?i)location:|content-location:)(.{0,})[\n]/", $header, $match);
if (isset($match[2]))
{
$redirect = trim($match[2]);
return $redirect;
}
else return null;
} | php | public static function getRedirectURLFromHeader(&$header)
{
// Get redirect-link from header
preg_match("/((?i)location:|content-location:)(.{0,})[\n]/", $header, $match);
if (isset($match[2]))
{
$redirect = trim($match[2]);
return $redirect;
}
else return null;
} | [
"public",
"static",
"function",
"getRedirectURLFromHeader",
"(",
"&",
"$",
"header",
")",
"{",
"// Get redirect-link from header\r",
"preg_match",
"(",
"\"/((?i)location:|content-location:)(.{0,})[\\n]/\"",
",",
"$",
"header",
",",
"$",
"match",
")",
";",
"if",
"(",
"... | Returns the redirect-URL from the given HTML-header
@return string The redirect-URL or NULL if not found. | [
"Returns",
"the",
"redirect",
"-",
"URL",
"from",
"the",
"given",
"HTML",
"-",
"header"
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/Utils/PHPCrawlerUtils.class.php#L352-L363 |
223,225 | mmerian/phpcrawl | libs/Utils/PHPCrawlerUtils.class.php | PHPCrawlerUtils.checkStringAgainstRegexArray | public static function checkStringAgainstRegexArray(&$string, $regex_array)
{
if (count($regex_array) == 0) return true;
$cnt = count($regex_array);
for ($x=0; $x<$cnt; $x++)
{
if (preg_match($regex_array[$x], $string))
{
return true;
}
}
return... | php | public static function checkStringAgainstRegexArray(&$string, $regex_array)
{
if (count($regex_array) == 0) return true;
$cnt = count($regex_array);
for ($x=0; $x<$cnt; $x++)
{
if (preg_match($regex_array[$x], $string))
{
return true;
}
}
return... | [
"public",
"static",
"function",
"checkStringAgainstRegexArray",
"(",
"&",
"$",
"string",
",",
"$",
"regex_array",
")",
"{",
"if",
"(",
"count",
"(",
"$",
"regex_array",
")",
"==",
"0",
")",
"return",
"true",
";",
"$",
"cnt",
"=",
"count",
"(",
"$",
"re... | Checks whether a given string matches with one of the given regular-expressions.
@param &string $string The string
@param array $regex_array Numerich array containing the regular-expressions to check against.
@return bool TRUE if one of the regexes matches the string, otherwise FALSE. | [
"Checks",
"whether",
"a",
"given",
"string",
"matches",
"with",
"one",
"of",
"the",
"given",
"regular",
"-",
"expressions",
"."
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/Utils/PHPCrawlerUtils.class.php#L373-L387 |
223,226 | mmerian/phpcrawl | libs/Utils/PHPCrawlerUtils.class.php | PHPCrawlerUtils.getHeaderValue | public static function getHeaderValue($header, $directive)
{
preg_match("#[\r\n]".$directive.":(.*)[\r\n\;]# Ui", $header, $match);
if (isset($match[1]) && trim($match[1]) != "")
{
return trim($match[1]);
}
else return null;
} | php | public static function getHeaderValue($header, $directive)
{
preg_match("#[\r\n]".$directive.":(.*)[\r\n\;]# Ui", $header, $match);
if (isset($match[1]) && trim($match[1]) != "")
{
return trim($match[1]);
}
else return null;
} | [
"public",
"static",
"function",
"getHeaderValue",
"(",
"$",
"header",
",",
"$",
"directive",
")",
"{",
"preg_match",
"(",
"\"#[\\r\\n]\"",
".",
"$",
"directive",
".",
"\":(.*)[\\r\\n\\;]# Ui\"",
",",
"$",
"header",
",",
"$",
"match",
")",
";",
"if",
"(",
"... | Gets the value of an header-directive from the given HTTP-header.
Example:
<code>PHPCrawlerUtils::getHeaderValue($header, "content-type");</code>
@param string $header The HTTP-header
@param string $directive The header-directive
@return string The value of the given directive found in the header.
Or NULL if not ... | [
"Gets",
"the",
"value",
"of",
"an",
"header",
"-",
"directive",
"from",
"the",
"given",
"HTTP",
"-",
"header",
"."
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/Utils/PHPCrawlerUtils.class.php#L401-L411 |
223,227 | mmerian/phpcrawl | libs/Utils/PHPCrawlerUtils.class.php | PHPCrawlerUtils.getCookiesFromHeader | public static function getCookiesFromHeader($header, $source_url)
{
$cookies = array();
$hits = preg_match_all("#[\r\n]set-cookie:(.*)[\r\n]# Ui", $header, $matches);
if ($hits && $hits != 0)
{
for ($x=0; $x<count($matches[1]); $x++)
{
$cookies[] = PHPCrawlerCoo... | php | public static function getCookiesFromHeader($header, $source_url)
{
$cookies = array();
$hits = preg_match_all("#[\r\n]set-cookie:(.*)[\r\n]# Ui", $header, $matches);
if ($hits && $hits != 0)
{
for ($x=0; $x<count($matches[1]); $x++)
{
$cookies[] = PHPCrawlerCoo... | [
"public",
"static",
"function",
"getCookiesFromHeader",
"(",
"$",
"header",
",",
"$",
"source_url",
")",
"{",
"$",
"cookies",
"=",
"array",
"(",
")",
";",
"$",
"hits",
"=",
"preg_match_all",
"(",
"\"#[\\r\\n]set-cookie:(.*)[\\r\\n]# Ui\"",
",",
"$",
"header",
... | Returns all cookies from the give response-header.
@param string $header The response-header
@param string $source_url URL the cookie was send from.
@return array Numeric array containing all cookies as PHPCrawlerCookieDescriptor-objects. | [
"Returns",
"all",
"cookies",
"from",
"the",
"give",
"response",
"-",
"header",
"."
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/Utils/PHPCrawlerUtils.class.php#L420-L435 |
223,228 | mmerian/phpcrawl | libs/Utils/PHPCrawlerUtils.class.php | PHPCrawlerUtils.getRootUrl | public static function getRootUrl($url)
{
$url_parts = self::splitURL($url);
$root_url = $url_parts["protocol"].$url_parts["host"].":".$url_parts["port"];
return self::normalizeURL($root_url);
} | php | public static function getRootUrl($url)
{
$url_parts = self::splitURL($url);
$root_url = $url_parts["protocol"].$url_parts["host"].":".$url_parts["port"];
return self::normalizeURL($root_url);
} | [
"public",
"static",
"function",
"getRootUrl",
"(",
"$",
"url",
")",
"{",
"$",
"url_parts",
"=",
"self",
"::",
"splitURL",
"(",
"$",
"url",
")",
";",
"$",
"root_url",
"=",
"$",
"url_parts",
"[",
"\"protocol\"",
"]",
".",
"$",
"url_parts",
"[",
"\"host\"... | Returns the normalized root-URL of the given URL
@param string $url The URL, e.g. "www.foo.con/something/index.html"
@return string The root-URL, e.g. "http://www.foo.com" | [
"Returns",
"the",
"normalized",
"root",
"-",
"URL",
"of",
"the",
"given",
"URL"
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/Utils/PHPCrawlerUtils.class.php#L443-L449 |
223,229 | mmerian/phpcrawl | libs/Utils/PHPCrawlerUtils.class.php | PHPCrawlerUtils.deserializeFromFile | public static function deserializeFromFile($file)
{
if (file_exists($file))
{
$serialized_data = file_get_contents($file);
return unserialize($serialized_data);
}
else return null;
} | php | public static function deserializeFromFile($file)
{
if (file_exists($file))
{
$serialized_data = file_get_contents($file);
return unserialize($serialized_data);
}
else return null;
} | [
"public",
"static",
"function",
"deserializeFromFile",
"(",
"$",
"file",
")",
"{",
"if",
"(",
"file_exists",
"(",
"$",
"file",
")",
")",
"{",
"$",
"serialized_data",
"=",
"file_get_contents",
"(",
"$",
"file",
")",
";",
"return",
"unserialize",
"(",
"$",
... | Returns deserialized data that is stored in a file.
@param string $file The file containing the serialized data
@return mixed The data or NULL if the file doesn't exist | [
"Returns",
"deserialized",
"data",
"that",
"is",
"stored",
"in",
"a",
"file",
"."
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/Utils/PHPCrawlerUtils.class.php#L491-L499 |
223,230 | mmerian/phpcrawl | libs/Utils/PHPCrawlerUtils.class.php | PHPCrawlerUtils.sort2dArray | public static function sort2dArray(&$array, $sort_args)
{
$args = func_get_args();
// Für jedes zu sortierende Feld ein eigenes Array bilden
@reset($array);
while (list($field) = @each($array))
{
for ($x=1; $x<count($args); $x++)
{
// Ist das Argument ein String... | php | public static function sort2dArray(&$array, $sort_args)
{
$args = func_get_args();
// Für jedes zu sortierende Feld ein eigenes Array bilden
@reset($array);
while (list($field) = @each($array))
{
for ($x=1; $x<count($args); $x++)
{
// Ist das Argument ein String... | [
"public",
"static",
"function",
"sort2dArray",
"(",
"&",
"$",
"array",
",",
"$",
"sort_args",
")",
"{",
"$",
"args",
"=",
"func_get_args",
"(",
")",
";",
"// Für jedes zu sortierende Feld ein eigenes Array bilden\r",
"@",
"reset",
"(",
"$",
"array",
")",
";",
... | Sorts a twodimensiolnal array. | [
"Sorts",
"a",
"twodimensiolnal",
"array",
"."
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/Utils/PHPCrawlerUtils.class.php#L504-L546 |
223,231 | mmerian/phpcrawl | libs/Utils/PHPCrawlerUtils.class.php | PHPCrawlerUtils.getMetaTagAttributes | public static function getMetaTagAttributes(&$html_source)
{
preg_match_all("#<\s*meta\s+".
"name\s*=\s*(?|\"([^\"]+)\"|'([^']+)'|([^\s><'\"]+))\s+".
"content\s*=\s*(?|\"([^\"]+)\"|'([^']+)'|([^\s><'\"]+))".
".*># Uis", $html_source, $m... | php | public static function getMetaTagAttributes(&$html_source)
{
preg_match_all("#<\s*meta\s+".
"name\s*=\s*(?|\"([^\"]+)\"|'([^']+)'|([^\s><'\"]+))\s+".
"content\s*=\s*(?|\"([^\"]+)\"|'([^']+)'|([^\s><'\"]+))".
".*># Uis", $html_source, $m... | [
"public",
"static",
"function",
"getMetaTagAttributes",
"(",
"&",
"$",
"html_source",
")",
"{",
"preg_match_all",
"(",
"\"#<\\s*meta\\s+\"",
".",
"\"name\\s*=\\s*(?|\\\"([^\\\"]+)\\\"|'([^']+)'|([^\\s><'\\\"]+))\\s+\"",
".",
"\"content\\s*=\\s*(?|\\\"([^\\\"]+)\\\"|'([^']+)'|([^\\s><... | Gets all meta-tag atteributes from the given HTML-source.
@param &string &$html_source
@return array Assoziative array conatining all found meta-attributes.
The keys are the meta-names, the values the content of the attributes.
(like $tags["robots"] = "nofollow") | [
"Gets",
"all",
"meta",
"-",
"tag",
"atteributes",
"from",
"the",
"given",
"HTML",
"-",
"source",
"."
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/Utils/PHPCrawlerUtils.class.php#L568-L585 |
223,232 | mmerian/phpcrawl | libs/Utils/PHPCrawlerUtils.class.php | PHPCrawlerUtils.getURIContent | public static function getURIContent($uri, $request_user_agent_string = null, $throw_exception = false)
{
$UriParts = PHPCrawlerUrlPartsDescriptor::fromURL($uri);
$error_str = "";
// If protocol is "file"
if ($UriParts->protocol == "file://")
{
$file = preg_replace("#^file... | php | public static function getURIContent($uri, $request_user_agent_string = null, $throw_exception = false)
{
$UriParts = PHPCrawlerUrlPartsDescriptor::fromURL($uri);
$error_str = "";
// If protocol is "file"
if ($UriParts->protocol == "file://")
{
$file = preg_replace("#^file... | [
"public",
"static",
"function",
"getURIContent",
"(",
"$",
"uri",
",",
"$",
"request_user_agent_string",
"=",
"null",
",",
"$",
"throw_exception",
"=",
"false",
")",
"{",
"$",
"UriParts",
"=",
"PHPCrawlerUrlPartsDescriptor",
"::",
"fromURL",
"(",
"$",
"uri",
"... | Gets the content from the given file or URL
@param string $uri The URI (like "file://../myfile.txt" or "http://foo.com")
@param string $request_user_agent_string The UrserAgent-string to use for URL-requests
@param bool $throw_exception If set to true, an exception will get thro... | [
"Gets",
"the",
"content",
"from",
"the",
"given",
"file",
"or",
"URL"
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/Utils/PHPCrawlerUtils.class.php#L607-L653 |
223,233 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php | ClassMetadataBuilder.setMappedSuperClass | public function setMappedSuperClass()
{
$this->cm->isMappedSuperclass = true;
$this->cm->isEmbeddedClass = false;
return $this;
} | php | public function setMappedSuperClass()
{
$this->cm->isMappedSuperclass = true;
$this->cm->isEmbeddedClass = false;
return $this;
} | [
"public",
"function",
"setMappedSuperClass",
"(",
")",
"{",
"$",
"this",
"->",
"cm",
"->",
"isMappedSuperclass",
"=",
"true",
";",
"$",
"this",
"->",
"cm",
"->",
"isEmbeddedClass",
"=",
"false",
";",
"return",
"$",
"this",
";",
"}"
] | Marks the class as mapped superclass.
@return ClassMetadataBuilder | [
"Marks",
"the",
"class",
"as",
"mapped",
"superclass",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php#L62-L68 |
223,234 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php | ClassMetadataBuilder.setEmbeddable | public function setEmbeddable()
{
$this->cm->isEmbeddedClass = true;
$this->cm->isMappedSuperclass = false;
return $this;
} | php | public function setEmbeddable()
{
$this->cm->isEmbeddedClass = true;
$this->cm->isMappedSuperclass = false;
return $this;
} | [
"public",
"function",
"setEmbeddable",
"(",
")",
"{",
"$",
"this",
"->",
"cm",
"->",
"isEmbeddedClass",
"=",
"true",
";",
"$",
"this",
"->",
"cm",
"->",
"isMappedSuperclass",
"=",
"false",
";",
"return",
"$",
"this",
";",
"}"
] | Marks the class as embeddable.
@return ClassMetadataBuilder | [
"Marks",
"the",
"class",
"as",
"embeddable",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php#L75-L81 |
223,235 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php | ClassMetadataBuilder.addEmbedded | public function addEmbedded($fieldName, $class, $columnPrefix = null)
{
$this->cm->mapEmbedded(array(
'fieldName' => $fieldName,
'class' => $class,
'columnPrefix' => $columnPrefix
));
return $this;
} | php | public function addEmbedded($fieldName, $class, $columnPrefix = null)
{
$this->cm->mapEmbedded(array(
'fieldName' => $fieldName,
'class' => $class,
'columnPrefix' => $columnPrefix
));
return $this;
} | [
"public",
"function",
"addEmbedded",
"(",
"$",
"fieldName",
",",
"$",
"class",
",",
"$",
"columnPrefix",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"cm",
"->",
"mapEmbedded",
"(",
"array",
"(",
"'fieldName'",
"=>",
"$",
"fieldName",
",",
"'class'",
"=>",
... | Adds and embedded class
@param string $fieldName
@param string $class
@param string|null $columnPrefix
@return $this | [
"Adds",
"and",
"embedded",
"class"
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php#L92-L101 |
223,236 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php | ClassMetadataBuilder.addIndex | public function addIndex(array $columns, $name)
{
if (!isset($this->cm->table['indexes'])) {
$this->cm->table['indexes'] = array();
}
$this->cm->table['indexes'][$name] = array('columns' => $columns);
return $this;
} | php | public function addIndex(array $columns, $name)
{
if (!isset($this->cm->table['indexes'])) {
$this->cm->table['indexes'] = array();
}
$this->cm->table['indexes'][$name] = array('columns' => $columns);
return $this;
} | [
"public",
"function",
"addIndex",
"(",
"array",
"$",
"columns",
",",
"$",
"name",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"cm",
"->",
"table",
"[",
"'indexes'",
"]",
")",
")",
"{",
"$",
"this",
"->",
"cm",
"->",
"table",
"[",
... | Adds Index.
@param array $columns
@param string $name
@return ClassMetadataBuilder | [
"Adds",
"Index",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php#L151-L160 |
223,237 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php | ClassMetadataBuilder.addUniqueConstraint | public function addUniqueConstraint(array $columns, $name)
{
if ( ! isset($this->cm->table['uniqueConstraints'])) {
$this->cm->table['uniqueConstraints'] = array();
}
$this->cm->table['uniqueConstraints'][$name] = array('columns' => $columns);
return $this;
} | php | public function addUniqueConstraint(array $columns, $name)
{
if ( ! isset($this->cm->table['uniqueConstraints'])) {
$this->cm->table['uniqueConstraints'] = array();
}
$this->cm->table['uniqueConstraints'][$name] = array('columns' => $columns);
return $this;
} | [
"public",
"function",
"addUniqueConstraint",
"(",
"array",
"$",
"columns",
",",
"$",
"name",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"cm",
"->",
"table",
"[",
"'uniqueConstraints'",
"]",
")",
")",
"{",
"$",
"this",
"->",
"cm",
"->"... | Adds Unique Constraint.
@param array $columns
@param string $name
@return ClassMetadataBuilder | [
"Adds",
"Unique",
"Constraint",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php#L170-L179 |
223,238 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php | ClassMetadataBuilder.setDiscriminatorColumn | public function setDiscriminatorColumn($name, $type = 'string', $length = 255)
{
$this->cm->setDiscriminatorColumn(array(
'name' => $name,
'type' => $type,
'length' => $length,
));
return $this;
} | php | public function setDiscriminatorColumn($name, $type = 'string', $length = 255)
{
$this->cm->setDiscriminatorColumn(array(
'name' => $name,
'type' => $type,
'length' => $length,
));
return $this;
} | [
"public",
"function",
"setDiscriminatorColumn",
"(",
"$",
"name",
",",
"$",
"type",
"=",
"'string'",
",",
"$",
"length",
"=",
"255",
")",
"{",
"$",
"this",
"->",
"cm",
"->",
"setDiscriminatorColumn",
"(",
"array",
"(",
"'name'",
"=>",
"$",
"name",
",",
... | Sets the discriminator column details.
@param string $name
@param string $type
@param int $length
@return ClassMetadataBuilder | [
"Sets",
"the",
"discriminator",
"column",
"details",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php#L232-L241 |
223,239 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php | ClassMetadataBuilder.addField | public function addField($name, $type, array $mapping = array())
{
$mapping['fieldName'] = $name;
$mapping['type'] = $type;
$this->cm->mapField($mapping);
return $this;
} | php | public function addField($name, $type, array $mapping = array())
{
$mapping['fieldName'] = $name;
$mapping['type'] = $type;
$this->cm->mapField($mapping);
return $this;
} | [
"public",
"function",
"addField",
"(",
"$",
"name",
",",
"$",
"type",
",",
"array",
"$",
"mapping",
"=",
"array",
"(",
")",
")",
"{",
"$",
"mapping",
"[",
"'fieldName'",
"]",
"=",
"$",
"name",
";",
"$",
"mapping",
"[",
"'type'",
"]",
"=",
"$",
"t... | Adds Field.
@param string $name
@param string $type
@param array $mapping
@return ClassMetadataBuilder | [
"Adds",
"Field",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php#L306-L314 |
223,240 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php | ClassMetadataBuilder.addManyToOne | public function addManyToOne($name, $targetEntity, $inversedBy = null)
{
$builder = $this->createManyToOne($name, $targetEntity);
if ($inversedBy) {
$builder->inversedBy($inversedBy);
}
return $builder->build();
} | php | public function addManyToOne($name, $targetEntity, $inversedBy = null)
{
$builder = $this->createManyToOne($name, $targetEntity);
if ($inversedBy) {
$builder->inversedBy($inversedBy);
}
return $builder->build();
} | [
"public",
"function",
"addManyToOne",
"(",
"$",
"name",
",",
"$",
"targetEntity",
",",
"$",
"inversedBy",
"=",
"null",
")",
"{",
"$",
"builder",
"=",
"$",
"this",
"->",
"createManyToOne",
"(",
"$",
"name",
",",
"$",
"targetEntity",
")",
";",
"if",
"(",... | Adds a simple many to one association, optionally with the inversed by field.
@param string $name
@param string $targetEntity
@param string|null $inversedBy
@return ClassMetadataBuilder | [
"Adds",
"a",
"simple",
"many",
"to",
"one",
"association",
"optionally",
"with",
"the",
"inversed",
"by",
"field",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php#L364-L373 |
223,241 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php | ClassMetadataBuilder.addInverseOneToOne | public function addInverseOneToOne($name, $targetEntity, $mappedBy)
{
$builder = $this->createOneToOne($name, $targetEntity);
$builder->mappedBy($mappedBy);
return $builder->build();
} | php | public function addInverseOneToOne($name, $targetEntity, $mappedBy)
{
$builder = $this->createOneToOne($name, $targetEntity);
$builder->mappedBy($mappedBy);
return $builder->build();
} | [
"public",
"function",
"addInverseOneToOne",
"(",
"$",
"name",
",",
"$",
"targetEntity",
",",
"$",
"mappedBy",
")",
"{",
"$",
"builder",
"=",
"$",
"this",
"->",
"createOneToOne",
"(",
"$",
"name",
",",
"$",
"targetEntity",
")",
";",
"$",
"builder",
"->",
... | Adds simple inverse one-to-one association.
@param string $name
@param string $targetEntity
@param string $mappedBy
@return ClassMetadataBuilder | [
"Adds",
"simple",
"inverse",
"one",
"-",
"to",
"-",
"one",
"association",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php#L426-L432 |
223,242 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php | ClassMetadataBuilder.addOwningOneToOne | public function addOwningOneToOne($name, $targetEntity, $inversedBy = null)
{
$builder = $this->createOneToOne($name, $targetEntity);
if ($inversedBy) {
$builder->inversedBy($inversedBy);
}
return $builder->build();
} | php | public function addOwningOneToOne($name, $targetEntity, $inversedBy = null)
{
$builder = $this->createOneToOne($name, $targetEntity);
if ($inversedBy) {
$builder->inversedBy($inversedBy);
}
return $builder->build();
} | [
"public",
"function",
"addOwningOneToOne",
"(",
"$",
"name",
",",
"$",
"targetEntity",
",",
"$",
"inversedBy",
"=",
"null",
")",
"{",
"$",
"builder",
"=",
"$",
"this",
"->",
"createOneToOne",
"(",
"$",
"name",
",",
"$",
"targetEntity",
")",
";",
"if",
... | Adds simple owning one-to-one association.
@param string $name
@param string $targetEntity
@param string|null $inversedBy
@return ClassMetadataBuilder | [
"Adds",
"simple",
"owning",
"one",
"-",
"to",
"-",
"one",
"association",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php#L443-L452 |
223,243 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php | ClassMetadataBuilder.addOwningManyToMany | public function addOwningManyToMany($name, $targetEntity, $inversedBy = null)
{
$builder = $this->createManyToMany($name, $targetEntity);
if ($inversedBy) {
$builder->inversedBy($inversedBy);
}
return $builder->build();
} | php | public function addOwningManyToMany($name, $targetEntity, $inversedBy = null)
{
$builder = $this->createManyToMany($name, $targetEntity);
if ($inversedBy) {
$builder->inversedBy($inversedBy);
}
return $builder->build();
} | [
"public",
"function",
"addOwningManyToMany",
"(",
"$",
"name",
",",
"$",
"targetEntity",
",",
"$",
"inversedBy",
"=",
"null",
")",
"{",
"$",
"builder",
"=",
"$",
"this",
"->",
"createManyToMany",
"(",
"$",
"name",
",",
"$",
"targetEntity",
")",
";",
"if"... | Adds a simple owning many to many association.
@param string $name
@param string $targetEntity
@param string|null $inversedBy
@return ClassMetadataBuilder | [
"Adds",
"a",
"simple",
"owning",
"many",
"to",
"many",
"association",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php#L483-L492 |
223,244 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php | ClassMetadataBuilder.addInverseManyToMany | public function addInverseManyToMany($name, $targetEntity, $mappedBy)
{
$builder = $this->createManyToMany($name, $targetEntity);
$builder->mappedBy($mappedBy);
return $builder->build();
} | php | public function addInverseManyToMany($name, $targetEntity, $mappedBy)
{
$builder = $this->createManyToMany($name, $targetEntity);
$builder->mappedBy($mappedBy);
return $builder->build();
} | [
"public",
"function",
"addInverseManyToMany",
"(",
"$",
"name",
",",
"$",
"targetEntity",
",",
"$",
"mappedBy",
")",
"{",
"$",
"builder",
"=",
"$",
"this",
"->",
"createManyToMany",
"(",
"$",
"name",
",",
"$",
"targetEntity",
")",
";",
"$",
"builder",
"-... | Adds a simple inverse many to many association.
@param string $name
@param string $targetEntity
@param string $mappedBy
@return ClassMetadataBuilder | [
"Adds",
"a",
"simple",
"inverse",
"many",
"to",
"many",
"association",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php#L503-L509 |
223,245 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php | ClassMetadataBuilder.addOneToMany | public function addOneToMany($name, $targetEntity, $mappedBy)
{
$builder = $this->createOneToMany($name, $targetEntity);
$builder->mappedBy($mappedBy);
return $builder->build();
} | php | public function addOneToMany($name, $targetEntity, $mappedBy)
{
$builder = $this->createOneToMany($name, $targetEntity);
$builder->mappedBy($mappedBy);
return $builder->build();
} | [
"public",
"function",
"addOneToMany",
"(",
"$",
"name",
",",
"$",
"targetEntity",
",",
"$",
"mappedBy",
")",
"{",
"$",
"builder",
"=",
"$",
"this",
"->",
"createOneToMany",
"(",
"$",
"name",
",",
"$",
"targetEntity",
")",
";",
"$",
"builder",
"->",
"ma... | Adds simple OneToMany association.
@param string $name
@param string $targetEntity
@param string $mappedBy
@return ClassMetadataBuilder | [
"Adds",
"simple",
"OneToMany",
"association",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php#L540-L546 |
223,246 | mespronos/mespronos | src/Entity/Game.php | Game.removeBets | public function removeBets() {
$query = \Drupal::entityQuery('bet');
$query->condition('game', $this->id());
$ids = $query->execute();
$bets = Bet::loadMultiple($ids);
foreach ($bets as $bet) {
$bet->delete();
}
\Drupal::logger('mespronos')->notice(t('Bets removed on game #@id (@game_l... | php | public function removeBets() {
$query = \Drupal::entityQuery('bet');
$query->condition('game', $this->id());
$ids = $query->execute();
$bets = Bet::loadMultiple($ids);
foreach ($bets as $bet) {
$bet->delete();
}
\Drupal::logger('mespronos')->notice(t('Bets removed on game #@id (@game_l... | [
"public",
"function",
"removeBets",
"(",
")",
"{",
"$",
"query",
"=",
"\\",
"Drupal",
"::",
"entityQuery",
"(",
"'bet'",
")",
";",
"$",
"query",
"->",
"condition",
"(",
"'game'",
",",
"$",
"this",
"->",
"id",
"(",
")",
")",
";",
"$",
"ids",
"=",
... | Remove bets on current day
@return integer number of deleted bets | [
"Remove",
"bets",
"on",
"current",
"day"
] | 73757663581ed9040944768073d1d9abc761196b | https://github.com/mespronos/mespronos/blob/73757663581ed9040944768073d1d9abc761196b/src/Entity/Game.php#L123-L137 |
223,247 | imanee/imanee | src/PixelMath.php | PixelMath.getPlacementCoordinates | public static function getPlacementCoordinates(
$resourceSize = [],
$size = [],
$place_constant = Imanee::IM_POS_TOP_LEFT
) {
$x = 0;
$y = 0;
switch ($place_constant) {
case Imanee::IM_POS_TOP_CENTER:
$x = ($size['width'] / 2) - ($resourc... | php | public static function getPlacementCoordinates(
$resourceSize = [],
$size = [],
$place_constant = Imanee::IM_POS_TOP_LEFT
) {
$x = 0;
$y = 0;
switch ($place_constant) {
case Imanee::IM_POS_TOP_CENTER:
$x = ($size['width'] / 2) - ($resourc... | [
"public",
"static",
"function",
"getPlacementCoordinates",
"(",
"$",
"resourceSize",
"=",
"[",
"]",
",",
"$",
"size",
"=",
"[",
"]",
",",
"$",
"place_constant",
"=",
"Imanee",
"::",
"IM_POS_TOP_LEFT",
")",
"{",
"$",
"x",
"=",
"0",
";",
"$",
"y",
"=",
... | Gets the coordinates for a relative placement using the IM_POS constants.
@param array $resourceSize An array with the keys 'width' and 'height' from the image to be
placed.
@param array $size An array with they keys 'width' and 'height' from the original,
base image.
@param int $place_constant An Imanee... | [
"Gets",
"the",
"coordinates",
"for",
"a",
"relative",
"placement",
"using",
"the",
"IM_POS",
"constants",
"."
] | cf390b5e7f92ca21d6e388abe51433e9ed671b1b | https://github.com/imanee/imanee/blob/cf390b5e7f92ca21d6e388abe51433e9ed671b1b/src/PixelMath.php#L73-L124 |
223,248 | mmerian/phpcrawl | libs/PHPCrawler.class.php | PHPCrawler.initCrawlerProcess | protected function initCrawlerProcess()
{
// Create working directory
$this->createWorkingDirectory();
// Setup url-cache
if ($this->url_cache_type == PHPCrawlerUrlCacheTypes::URLCACHE_SQLITE)
$this->LinkCache = new PHPCrawlerSQLiteURLCache($this->working_directory."urlcache.db3", t... | php | protected function initCrawlerProcess()
{
// Create working directory
$this->createWorkingDirectory();
// Setup url-cache
if ($this->url_cache_type == PHPCrawlerUrlCacheTypes::URLCACHE_SQLITE)
$this->LinkCache = new PHPCrawlerSQLiteURLCache($this->working_directory."urlcache.db3", t... | [
"protected",
"function",
"initCrawlerProcess",
"(",
")",
"{",
"// Create working directory\r",
"$",
"this",
"->",
"createWorkingDirectory",
"(",
")",
";",
"// Setup url-cache\r",
"if",
"(",
"$",
"this",
"->",
"url_cache_type",
"==",
"PHPCrawlerUrlCacheTypes",
"::",
"U... | Initiates a crawler-process | [
"Initiates",
"a",
"crawler",
"-",
"process"
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/PHPCrawler.class.php#L300-L347 |
223,249 | mmerian/phpcrawl | libs/PHPCrawler.class.php | PHPCrawler.setupCrawlerStatusHandler | protected function setupCrawlerStatusHandler()
{
// Cases the crawlerstatus has to be written to file
if ($this->multiprocess_mode == PHPCrawlerMultiProcessModes::MPMODE_CHILDS_EXECUTES_USERCODE || $this->resumtion_enabled == true)
{
$this->CrawlerStatusHandler->write_status_to_file = true;
... | php | protected function setupCrawlerStatusHandler()
{
// Cases the crawlerstatus has to be written to file
if ($this->multiprocess_mode == PHPCrawlerMultiProcessModes::MPMODE_CHILDS_EXECUTES_USERCODE || $this->resumtion_enabled == true)
{
$this->CrawlerStatusHandler->write_status_to_file = true;
... | [
"protected",
"function",
"setupCrawlerStatusHandler",
"(",
")",
"{",
"// Cases the crawlerstatus has to be written to file\r",
"if",
"(",
"$",
"this",
"->",
"multiprocess_mode",
"==",
"PHPCrawlerMultiProcessModes",
"::",
"MPMODE_CHILDS_EXECUTES_USERCODE",
"||",
"$",
"this",
"... | Setups the CrawlerStatusHandler dependent on the crawler-settings | [
"Setups",
"the",
"CrawlerStatusHandler",
"dependent",
"on",
"the",
"crawler",
"-",
"settings"
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/PHPCrawler.class.php#L852-L875 |
223,250 | mmerian/phpcrawl | libs/PHPCrawler.class.php | PHPCrawler.cleanup | protected function cleanup()
{
// Free/unlock caches
$this->CookieCache->cleanup();
$this->LinkCache->cleanup();
// Delete working-dir
PHPCrawlerUtils::rmDir($this->working_directory);
// Remove semaphore (if multiprocess-mode)
if ($this->multiprocess_mode != PHPCrawlerMult... | php | protected function cleanup()
{
// Free/unlock caches
$this->CookieCache->cleanup();
$this->LinkCache->cleanup();
// Delete working-dir
PHPCrawlerUtils::rmDir($this->working_directory);
// Remove semaphore (if multiprocess-mode)
if ($this->multiprocess_mode != PHPCrawlerMult... | [
"protected",
"function",
"cleanup",
"(",
")",
"{",
"// Free/unlock caches\r",
"$",
"this",
"->",
"CookieCache",
"->",
"cleanup",
"(",
")",
";",
"$",
"this",
"->",
"LinkCache",
"->",
"cleanup",
"(",
")",
";",
"// Delete working-dir\r",
"PHPCrawlerUtils",
"::",
... | Cleans up the crawler after it has finished. | [
"Cleans",
"up",
"the",
"crawler",
"after",
"it",
"has",
"finished",
"."
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/PHPCrawler.class.php#L900-L915 |
223,251 | mmerian/phpcrawl | libs/PHPCrawler.class.php | PHPCrawler.getProcessReport | public function getProcessReport()
{
// Get current crawler-Status
$CrawlerStatus = $this->crawlerStatus;
// Create report
$Report = new PHPCrawlerProcessReport();
$Report->links_followed = $CrawlerStatus->links_followed;
$Report->files_received = $CrawlerStatus->documents_... | php | public function getProcessReport()
{
// Get current crawler-Status
$CrawlerStatus = $this->crawlerStatus;
// Create report
$Report = new PHPCrawlerProcessReport();
$Report->links_followed = $CrawlerStatus->links_followed;
$Report->files_received = $CrawlerStatus->documents_... | [
"public",
"function",
"getProcessReport",
"(",
")",
"{",
"// Get current crawler-Status\r",
"$",
"CrawlerStatus",
"=",
"$",
"this",
"->",
"crawlerStatus",
";",
"// Create report\r",
"$",
"Report",
"=",
"new",
"PHPCrawlerProcessReport",
"(",
")",
";",
"$",
"Report",
... | Retruns summarizing report-information about the crawling-process after it has finished.
@return PHPCrawlerProcessReport PHPCrawlerProcessReport-object containing process-summary-information
@section 1 Basic settings | [
"Retruns",
"summarizing",
"report",
"-",
"information",
"about",
"the",
"crawling",
"-",
"process",
"after",
"it",
"has",
"finished",
"."
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/PHPCrawler.class.php#L923-L968 |
223,252 | mmerian/phpcrawl | libs/PHPCrawler.class.php | PHPCrawler.obeyRobotsTxt | public function obeyRobotsTxt($mode, $robots_txt_uri = null)
{
if (!is_bool($mode)) return false;
$this->obey_robots_txt = $mode;
if ($mode == true)
$this->robots_txt_uri = $robots_txt_uri;
else
$this->robots_txt_uri = null;
return true;
} | php | public function obeyRobotsTxt($mode, $robots_txt_uri = null)
{
if (!is_bool($mode)) return false;
$this->obey_robots_txt = $mode;
if ($mode == true)
$this->robots_txt_uri = $robots_txt_uri;
else
$this->robots_txt_uri = null;
return true;
} | [
"public",
"function",
"obeyRobotsTxt",
"(",
"$",
"mode",
",",
"$",
"robots_txt_uri",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"is_bool",
"(",
"$",
"mode",
")",
")",
"return",
"false",
";",
"$",
"this",
"->",
"obey_robots_txt",
"=",
"$",
"mode",
";",
"i... | Defines whether the crawler should parse and obey robots.txt-files.
If this is set to TRUE, the crawler looks for a robots.txt-file for the root-URL of the crawling-process at the default location
and - if present - parses it and obeys all containig directives appliying to the
useragent-identification of the cralwer (... | [
"Defines",
"whether",
"the",
"crawler",
"should",
"parse",
"and",
"obey",
"robots",
".",
"txt",
"-",
"files",
"."
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/PHPCrawler.class.php#L1444-L1456 |
223,253 | mmerian/phpcrawl | libs/PHPCrawler.class.php | PHPCrawler.setRequestLimit | public function setRequestLimit($limit, $only_count_received_documents = false)
{
if (!preg_match("/^[0-9]*$/", $limit)) return false;
$this->request_limit = $limit;
$this->only_count_received_documents = $only_count_received_documents;
return true;
} | php | public function setRequestLimit($limit, $only_count_received_documents = false)
{
if (!preg_match("/^[0-9]*$/", $limit)) return false;
$this->request_limit = $limit;
$this->only_count_received_documents = $only_count_received_documents;
return true;
} | [
"public",
"function",
"setRequestLimit",
"(",
"$",
"limit",
",",
"$",
"only_count_received_documents",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"preg_match",
"(",
"\"/^[0-9]*$/\"",
",",
"$",
"limit",
")",
")",
"return",
"false",
";",
"$",
"this",
"->",
"req... | Sets a limit to the total number of requests the crawler should execute.
If the given limit is reached, the crawler stops the crawling-process. The default-value is 0 (no limit).
If the second parameter is set to true, the given limit refers to to total number of successfully received documents
instead of the number ... | [
"Sets",
"a",
"limit",
"to",
"the",
"total",
"number",
"of",
"requests",
"the",
"crawler",
"should",
"execute",
"."
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/PHPCrawler.class.php#L1499-L1506 |
223,254 | mmerian/phpcrawl | libs/PHPCrawler.class.php | PHPCrawler.setRequestDelay | public function setRequestDelay($time)
{
if (is_float($time) || is_int($time))
{
$this->request_delay_time = $time;
return true;
}
return false;
} | php | public function setRequestDelay($time)
{
if (is_float($time) || is_int($time))
{
$this->request_delay_time = $time;
return true;
}
return false;
} | [
"public",
"function",
"setRequestDelay",
"(",
"$",
"time",
")",
"{",
"if",
"(",
"is_float",
"(",
"$",
"time",
")",
"||",
"is_int",
"(",
"$",
"time",
")",
")",
"{",
"$",
"this",
"->",
"request_delay_time",
"=",
"$",
"time",
";",
"return",
"true",
";",... | Sets a delay for every HTTP-requests the crawler executes.
The crawler will wait for the given time after every request it does, regardless of
the mode it runs in (single-/multiprocessmode).
Example 1:
<code>
// Let's the crawler wait for a half second before every request.
$crawler->setRequestDelay(0.5);
</code>
Exa... | [
"Sets",
"a",
"delay",
"for",
"every",
"HTTP",
"-",
"requests",
"the",
"crawler",
"executes",
"."
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/PHPCrawler.class.php#L2075-L2084 |
223,255 | mmerian/phpcrawl | libs/PHPCrawler.class.php | PHPCrawler.setCrawlingDepthLimit | public function setCrawlingDepthLimit($depth)
{
if (is_int($depth) && $depth >= 0)
{
$this->UrlFilter->max_crawling_depth = $depth;
return true;
}
return false;
} | php | public function setCrawlingDepthLimit($depth)
{
if (is_int($depth) && $depth >= 0)
{
$this->UrlFilter->max_crawling_depth = $depth;
return true;
}
return false;
} | [
"public",
"function",
"setCrawlingDepthLimit",
"(",
"$",
"depth",
")",
"{",
"if",
"(",
"is_int",
"(",
"$",
"depth",
")",
"&&",
"$",
"depth",
">=",
"0",
")",
"{",
"$",
"this",
"->",
"UrlFilter",
"->",
"max_crawling_depth",
"=",
"$",
"depth",
";",
"retur... | Sets the maximum crawling depth
Defines how "deep" the crawler should follow links relating to the entry-URL of a crawling-process.
For instance: If the maximum depth is set to 1, the crawler only will follow links found in the entry-page
of the crawling-process, but won't follow any further links found in underlying... | [
"Sets",
"the",
"maximum",
"crawling",
"depth"
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/PHPCrawler.class.php#L2130-L2139 |
223,256 | mmerian/phpcrawl | libs/PHPCrawlerHTTPRequest.class.php | PHPCrawlerHTTPRequest.setUrl | public function setUrl(PHPCrawlerURLDescriptor $UrlDescriptor)
{
$this->UrlDescriptor = $UrlDescriptor;
// Split the URL into its parts
$this->url_parts = PHPCrawlerUtils::splitURL($UrlDescriptor->url_rebuild);
} | php | public function setUrl(PHPCrawlerURLDescriptor $UrlDescriptor)
{
$this->UrlDescriptor = $UrlDescriptor;
// Split the URL into its parts
$this->url_parts = PHPCrawlerUtils::splitURL($UrlDescriptor->url_rebuild);
} | [
"public",
"function",
"setUrl",
"(",
"PHPCrawlerURLDescriptor",
"$",
"UrlDescriptor",
")",
"{",
"$",
"this",
"->",
"UrlDescriptor",
"=",
"$",
"UrlDescriptor",
";",
"// Split the URL into its parts\r",
"$",
"this",
"->",
"url_parts",
"=",
"PHPCrawlerUtils",
"::",
"sp... | Sets the URL for the request.
@param PHPCrawlerURLDescriptor $UrlDescriptor An PHPCrawlerURLDescriptor-object containing the URL to request | [
"Sets",
"the",
"URL",
"for",
"the",
"request",
"."
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/PHPCrawlerHTTPRequest.class.php#L209-L215 |
223,257 | mmerian/phpcrawl | libs/PHPCrawlerHTTPRequest.class.php | PHPCrawlerHTTPRequest.addCookieDescriptors | public function addCookieDescriptors($cookies)
{
$cnt = count($cookies);
for ($x=0; $x<$cnt; $x++)
{
$this->addCookieDescriptor($cookies[$x]);
}
} | php | public function addCookieDescriptors($cookies)
{
$cnt = count($cookies);
for ($x=0; $x<$cnt; $x++)
{
$this->addCookieDescriptor($cookies[$x]);
}
} | [
"public",
"function",
"addCookieDescriptors",
"(",
"$",
"cookies",
")",
"{",
"$",
"cnt",
"=",
"count",
"(",
"$",
"cookies",
")",
";",
"for",
"(",
"$",
"x",
"=",
"0",
";",
"$",
"x",
"<",
"$",
"cnt",
";",
"$",
"x",
"++",
")",
"{",
"$",
"this",
... | Adds a bunch of cookies to send with the request
@param array $cookies Numeric array containins cookies as PHPCrawlerCookieDescriptor-objects | [
"Adds",
"a",
"bunch",
"of",
"cookies",
"to",
"send",
"with",
"the",
"request"
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/PHPCrawlerHTTPRequest.class.php#L243-L250 |
223,258 | mmerian/phpcrawl | libs/PHPCrawlerHTTPRequest.class.php | PHPCrawlerHTTPRequest.setFindRedirectURLs | public function setFindRedirectURLs($mode)
{
if (!is_bool($mode)) return false;
$this->LinkFinder->find_redirect_urls = $mode;
return true;
} | php | public function setFindRedirectURLs($mode)
{
if (!is_bool($mode)) return false;
$this->LinkFinder->find_redirect_urls = $mode;
return true;
} | [
"public",
"function",
"setFindRedirectURLs",
"(",
"$",
"mode",
")",
"{",
"if",
"(",
"!",
"is_bool",
"(",
"$",
"mode",
")",
")",
"return",
"false",
";",
"$",
"this",
"->",
"LinkFinder",
"->",
"find_redirect_urls",
"=",
"$",
"mode",
";",
"return",
"true",
... | Specifies whether redirect-links set in http-headers should get searched for.
@return bool | [
"Specifies",
"whether",
"redirect",
"-",
"links",
"set",
"in",
"http",
"-",
"headers",
"should",
"get",
"searched",
"for",
"."
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/PHPCrawlerHTTPRequest.class.php#L279-L286 |
223,259 | mmerian/phpcrawl | libs/PHPCrawlerHTTPRequest.class.php | PHPCrawlerHTTPRequest.calulateDataTransferRateValues | protected function calulateDataTransferRateValues()
{
$vals = array();
// Works like this:
// After the server resonded, the socket-buffer is already filled with bytes,
// that means they were received within the server-response-time.
// To calulate the real data transfer rate, t... | php | protected function calulateDataTransferRateValues()
{
$vals = array();
// Works like this:
// After the server resonded, the socket-buffer is already filled with bytes,
// that means they were received within the server-response-time.
// To calulate the real data transfer rate, t... | [
"protected",
"function",
"calulateDataTransferRateValues",
"(",
")",
"{",
"$",
"vals",
"=",
"array",
"(",
")",
";",
"// Works like this:\r",
"// After the server resonded, the socket-buffer is already filled with bytes,\r",
"// that means they were received within the server-response-t... | Calculates data tranfer rate values
@return int The rate in bytes/second | [
"Calculates",
"data",
"tranfer",
"rate",
"values"
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/PHPCrawlerHTTPRequest.class.php#L485-L507 |
223,260 | mmerian/phpcrawl | libs/PHPCrawlerHTTPRequest.class.php | PHPCrawlerHTTPRequest.openSocket | protected function openSocket(&$error_code, &$error_string)
{
PHPCrawlerBenchmark::reset("connecting_server");
PHPCrawlerBenchmark::start("connecting_server");
// SSL or not?
if ($this->url_parts["protocol"] == "https://") $protocol_prefix = "ssl://";
else $protocol_prefix = "";
... | php | protected function openSocket(&$error_code, &$error_string)
{
PHPCrawlerBenchmark::reset("connecting_server");
PHPCrawlerBenchmark::start("connecting_server");
// SSL or not?
if ($this->url_parts["protocol"] == "https://") $protocol_prefix = "ssl://";
else $protocol_prefix = "";
... | [
"protected",
"function",
"openSocket",
"(",
"&",
"$",
"error_code",
",",
"&",
"$",
"error_string",
")",
"{",
"PHPCrawlerBenchmark",
"::",
"reset",
"(",
"\"connecting_server\"",
")",
";",
"PHPCrawlerBenchmark",
"::",
"start",
"(",
"\"connecting_server\"",
")",
";",... | Opens the socket to the host.
@param int &$error_code Error-code by referenct if an error occured.
@param string &$error_string Error-string by reference
@return bool TRUE if socket could be opened, otherwise FALSE. | [
"Opens",
"the",
"socket",
"to",
"the",
"host",
"."
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/PHPCrawlerHTTPRequest.class.php#L517-L597 |
223,261 | mmerian/phpcrawl | libs/PHPCrawlerHTTPRequest.class.php | PHPCrawlerHTTPRequest.sendRequestHeader | protected function sendRequestHeader($request_header_lines)
{
// Header senden
$cnt = count($request_header_lines);
for ($x=0; $x<$cnt; $x++)
{
fputs($this->socket, $request_header_lines[$x]);
}
} | php | protected function sendRequestHeader($request_header_lines)
{
// Header senden
$cnt = count($request_header_lines);
for ($x=0; $x<$cnt; $x++)
{
fputs($this->socket, $request_header_lines[$x]);
}
} | [
"protected",
"function",
"sendRequestHeader",
"(",
"$",
"request_header_lines",
")",
"{",
"// Header senden\r",
"$",
"cnt",
"=",
"count",
"(",
"$",
"request_header_lines",
")",
";",
"for",
"(",
"$",
"x",
"=",
"0",
";",
"$",
"x",
"<",
"$",
"cnt",
";",
"$"... | Send the request-header. | [
"Send",
"the",
"request",
"-",
"header",
"."
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/PHPCrawlerHTTPRequest.class.php#L602-L610 |
223,262 | mmerian/phpcrawl | libs/PHPCrawlerHTTPRequest.class.php | PHPCrawlerHTTPRequest.readResponseHeader | protected function readResponseHeader(&$error_code, &$error_string)
{
PHPCrawlerBenchmark::reset("server_response_time");
PHPCrawlerBenchmark::start("server_response_time");
$status = socket_get_status($this->socket);
$source_read = "";
$header = "";
$server_responded = false;
... | php | protected function readResponseHeader(&$error_code, &$error_string)
{
PHPCrawlerBenchmark::reset("server_response_time");
PHPCrawlerBenchmark::start("server_response_time");
$status = socket_get_status($this->socket);
$source_read = "";
$header = "";
$server_responded = false;
... | [
"protected",
"function",
"readResponseHeader",
"(",
"&",
"$",
"error_code",
",",
"&",
"$",
"error_string",
")",
"{",
"PHPCrawlerBenchmark",
"::",
"reset",
"(",
"\"server_response_time\"",
")",
";",
"PHPCrawlerBenchmark",
"::",
"start",
"(",
"\"server_response_time\"",... | Reads the response-header.
@param int &$error_code Error-code by reference if an error occured.
@param string &$error_string Error-string by reference
@return string The response-header or NULL if an error occured | [
"Reads",
"the",
"response",
"-",
"header",
"."
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/PHPCrawlerHTTPRequest.class.php#L620-L702 |
223,263 | mmerian/phpcrawl | libs/PHPCrawlerHTTPRequest.class.php | PHPCrawlerHTTPRequest.readResponseContent | protected function readResponseContent($stream_to_file = false, &$error_code, &$error_string, &$document_received_completely)
{
$this->content_bytes_received = 0;
// If content should be streamed to file
if ($stream_to_file == true)
{
$fp = @fopen($this->tmpFile, "w");
... | php | protected function readResponseContent($stream_to_file = false, &$error_code, &$error_string, &$document_received_completely)
{
$this->content_bytes_received = 0;
// If content should be streamed to file
if ($stream_to_file == true)
{
$fp = @fopen($this->tmpFile, "w");
... | [
"protected",
"function",
"readResponseContent",
"(",
"$",
"stream_to_file",
"=",
"false",
",",
"&",
"$",
"error_code",
",",
"&",
"$",
"error_string",
",",
"&",
"$",
"document_received_completely",
")",
"{",
"$",
"this",
"->",
"content_bytes_received",
"=",
"0",
... | Reads the response-content.
@param bool $stream_to_file If TRUE, the content will be streamed diretly to the temporary file and
this method will not return the content as a string.
@param int &$error_code Error-code by reference if an error occured.
@param &string &$error_string Error-string by reference
@p... | [
"Reads",
"the",
"response",
"-",
"content",
"."
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/PHPCrawlerHTTPRequest.class.php#L715-L796 |
223,264 | mmerian/phpcrawl | libs/PHPCrawlerHTTPRequest.class.php | PHPCrawlerHTTPRequest.readResponseContentChunk | protected function readResponseContentChunk(&$document_completed, &$error_code, &$error_string, &$document_received_completely)
{
$source_chunk = "";
$stop_receiving = false;
$bytes_received = 0;
$document_completed = false;
// If chunked encoding and protocol to use is HTTP 1.1
... | php | protected function readResponseContentChunk(&$document_completed, &$error_code, &$error_string, &$document_received_completely)
{
$source_chunk = "";
$stop_receiving = false;
$bytes_received = 0;
$document_completed = false;
// If chunked encoding and protocol to use is HTTP 1.1
... | [
"protected",
"function",
"readResponseContentChunk",
"(",
"&",
"$",
"document_completed",
",",
"&",
"$",
"error_code",
",",
"&",
"$",
"error_string",
",",
"&",
"$",
"document_received_completely",
")",
"{",
"$",
"source_chunk",
"=",
"\"\"",
";",
"$",
"stop_recei... | Reads a chunk from the response-content
@return string | [
"Reads",
"a",
"chunk",
"from",
"the",
"response",
"-",
"content"
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/PHPCrawlerHTTPRequest.class.php#L803-L895 |
223,265 | mmerian/phpcrawl | libs/PHPCrawlerHTTPRequest.class.php | PHPCrawlerHTTPRequest.buildRequestHeader | protected function buildRequestHeader()
{
// Create header
$headerlines = array();
// Methode(GET or POST)
if (count($this->post_data) > 0) $request_type = "POST";
else $request_type = "GET";
// HTTP protocol
if ($this->http_protocol_version == PHPCrawlerHTTPProtocols::... | php | protected function buildRequestHeader()
{
// Create header
$headerlines = array();
// Methode(GET or POST)
if (count($this->post_data) > 0) $request_type = "POST";
else $request_type = "GET";
// HTTP protocol
if ($this->http_protocol_version == PHPCrawlerHTTPProtocols::... | [
"protected",
"function",
"buildRequestHeader",
"(",
")",
"{",
"// Create header\r",
"$",
"headerlines",
"=",
"array",
"(",
")",
";",
"// Methode(GET or POST)\r",
"if",
"(",
"count",
"(",
"$",
"this",
"->",
"post_data",
")",
">",
"0",
")",
"$",
"request_type",
... | Builds the request-header from the given settings.
@return array Numeric array containing the lines of the request-header | [
"Builds",
"the",
"request",
"-",
"header",
"from",
"the",
"given",
"settings",
"."
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/PHPCrawlerHTTPRequest.class.php#L902-L980 |
223,266 | mmerian/phpcrawl | libs/PHPCrawlerHTTPRequest.class.php | PHPCrawlerHTTPRequest.prepareHTTPRequestQuery | protected function prepareHTTPRequestQuery($query)
{
// If string already is a valid URL -> do nothing
if (PHPCrawlerUtils::isValidUrlString($query))
{
return $query;
}
// Decode query-string (for URLs that are partly urlencoded and partly not)
$query = rawurldecode($query)... | php | protected function prepareHTTPRequestQuery($query)
{
// If string already is a valid URL -> do nothing
if (PHPCrawlerUtils::isValidUrlString($query))
{
return $query;
}
// Decode query-string (for URLs that are partly urlencoded and partly not)
$query = rawurldecode($query)... | [
"protected",
"function",
"prepareHTTPRequestQuery",
"(",
"$",
"query",
")",
"{",
"// If string already is a valid URL -> do nothing\r",
"if",
"(",
"PHPCrawlerUtils",
"::",
"isValidUrlString",
"(",
"$",
"query",
")",
")",
"{",
"return",
"$",
"query",
";",
"}",
"// De... | Prepares the given HTTP-query-string for the HTTP-request.
HTTP-query-strings always should be utf8-encoded and urlencoded afterwards.
So "/path/file?test=tatütata" will be converted to "/path/file?test=tat%C3%BCtata":
@param stirng The quetry-string (like "/path/file?test=tatütata")
@return string | [
"Prepares",
"the",
"given",
"HTTP",
"-",
"query",
"-",
"string",
"for",
"the",
"HTTP",
"-",
"request",
"."
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/PHPCrawlerHTTPRequest.class.php#L991-L1020 |
223,267 | mmerian/phpcrawl | libs/PHPCrawlerHTTPRequest.class.php | PHPCrawlerHTTPRequest.buildCookieHeader | protected function buildCookieHeader()
{
$cookie_string = "";
@reset($this->cookie_array);
while(list($key, $value) = @each($this->cookie_array))
{
$cookie_string .= "; ".$key."=".$value."";
}
if ($cookie_string != "")
{
return "Cookie: ".substr($cookie_st... | php | protected function buildCookieHeader()
{
$cookie_string = "";
@reset($this->cookie_array);
while(list($key, $value) = @each($this->cookie_array))
{
$cookie_string .= "; ".$key."=".$value."";
}
if ($cookie_string != "")
{
return "Cookie: ".substr($cookie_st... | [
"protected",
"function",
"buildCookieHeader",
"(",
")",
"{",
"$",
"cookie_string",
"=",
"\"\"",
";",
"@",
"reset",
"(",
"$",
"this",
"->",
"cookie_array",
")",
";",
"while",
"(",
"list",
"(",
"$",
"key",
",",
"$",
"value",
")",
"=",
"@",
"each",
"(",... | Builds the cookie-header-part for the header to send.
@return string The cookie-header-part, i.e. "Cookie: test=bla; palimm=palaber"
Returns NULL if no cookies should be send with the header. | [
"Builds",
"the",
"cookie",
"-",
"header",
"-",
"part",
"for",
"the",
"header",
"to",
"send",
"."
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/PHPCrawlerHTTPRequest.class.php#L1051-L1069 |
223,268 | mmerian/phpcrawl | libs/PHPCrawlerHTTPRequest.class.php | PHPCrawlerHTTPRequest.addReceiveContentType | public function addReceiveContentType($regex)
{
$check = PHPCrawlerUtils::checkRegexPattern($regex); // Check pattern
if ($check == true)
{
$this->receive_content_types[] = trim(strtolower($regex));
}
return $check;
} | php | public function addReceiveContentType($regex)
{
$check = PHPCrawlerUtils::checkRegexPattern($regex); // Check pattern
if ($check == true)
{
$this->receive_content_types[] = trim(strtolower($regex));
}
return $check;
} | [
"public",
"function",
"addReceiveContentType",
"(",
"$",
"regex",
")",
"{",
"$",
"check",
"=",
"PHPCrawlerUtils",
"::",
"checkRegexPattern",
"(",
"$",
"regex",
")",
";",
"// Check pattern\r",
"if",
"(",
"$",
"check",
"==",
"true",
")",
"{",
"$",
"this",
"-... | Adds a rule to the list of rules that decides which pages or files - regarding their content-type - should be received
If the content-type of a requested document doesn't match with the given rules, the request will be aborted after the header
was received.
@param string $regex The rule as a regular-expression
@retur... | [
"Adds",
"a",
"rule",
"to",
"the",
"list",
"of",
"rules",
"that",
"decides",
"which",
"pages",
"or",
"files",
"-",
"regarding",
"their",
"content",
"-",
"type",
"-",
"should",
"be",
"received"
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/PHPCrawlerHTTPRequest.class.php#L1136-L1145 |
223,269 | mmerian/phpcrawl | libs/PHPCrawlerHTTPRequest.class.php | PHPCrawlerHTTPRequest.addStreamToFileContentType | public function addStreamToFileContentType($regex)
{
$check = PHPCrawlerUtils::checkRegexPattern($regex); // Check pattern
if ($check == true)
{
$this->receive_to_file_content_types[] = trim($regex);
}
return $check;
} | php | public function addStreamToFileContentType($regex)
{
$check = PHPCrawlerUtils::checkRegexPattern($regex); // Check pattern
if ($check == true)
{
$this->receive_to_file_content_types[] = trim($regex);
}
return $check;
} | [
"public",
"function",
"addStreamToFileContentType",
"(",
"$",
"regex",
")",
"{",
"$",
"check",
"=",
"PHPCrawlerUtils",
"::",
"checkRegexPattern",
"(",
"$",
"regex",
")",
";",
"// Check pattern\r",
"if",
"(",
"$",
"check",
"==",
"true",
")",
"{",
"$",
"this",... | Adds a rule to the list of rules that decides what types of content should be streamed diretly to the temporary file.
If a content-type of a page or file matches with one of these rules, the content will be streamed directly into the temporary file
given in setTmpFile() without claiming local RAM.
@param string $rege... | [
"Adds",
"a",
"rule",
"to",
"the",
"list",
"of",
"rules",
"that",
"decides",
"what",
"types",
"of",
"content",
"should",
"be",
"streamed",
"diretly",
"to",
"the",
"temporary",
"file",
"."
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/PHPCrawlerHTTPRequest.class.php#L1156-L1165 |
223,270 | mmerian/phpcrawl | libs/PHPCrawlerHTTPRequest.class.php | PHPCrawlerHTTPRequest.setTmpFile | public function setTmpFile($tmp_file)
{
//Check if writable
$fp = @fopen($tmp_file, "w");
if (!$fp)
{
return false;
}
else
{
fclose($fp);
$this->tmpFile = $tmp_file;
return true;
}
} | php | public function setTmpFile($tmp_file)
{
//Check if writable
$fp = @fopen($tmp_file, "w");
if (!$fp)
{
return false;
}
else
{
fclose($fp);
$this->tmpFile = $tmp_file;
return true;
}
} | [
"public",
"function",
"setTmpFile",
"(",
"$",
"tmp_file",
")",
"{",
"//Check if writable\r",
"$",
"fp",
"=",
"@",
"fopen",
"(",
"$",
"tmp_file",
",",
"\"w\"",
")",
";",
"if",
"(",
"!",
"$",
"fp",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
... | Sets the temporary file to use when content of found documents should be streamed directly into a temporary file.
@param string $tmp_file The TMP-file to use. | [
"Sets",
"the",
"temporary",
"file",
"to",
"use",
"when",
"content",
"of",
"found",
"documents",
"should",
"be",
"streamed",
"directly",
"into",
"a",
"temporary",
"file",
"."
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/PHPCrawlerHTTPRequest.class.php#L1172-L1187 |
223,271 | mmerian/phpcrawl | libs/PHPCrawlerHTTPRequest.class.php | PHPCrawlerHTTPRequest.setBufferSizes | public function setBufferSizes($content_buffer_size = null, $chunk_buffer_size = null, $socket_read_buffer_size = null, $source_overlap_size = null)
{
if ($content_buffer_size !== null)
$this->content_buffer_size = $content_buffer_size;
if ($chunk_buffer_size !== null)
$this->chunk_buff... | php | public function setBufferSizes($content_buffer_size = null, $chunk_buffer_size = null, $socket_read_buffer_size = null, $source_overlap_size = null)
{
if ($content_buffer_size !== null)
$this->content_buffer_size = $content_buffer_size;
if ($chunk_buffer_size !== null)
$this->chunk_buff... | [
"public",
"function",
"setBufferSizes",
"(",
"$",
"content_buffer_size",
"=",
"null",
",",
"$",
"chunk_buffer_size",
"=",
"null",
",",
"$",
"socket_read_buffer_size",
"=",
"null",
",",
"$",
"source_overlap_size",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"content... | Adjusts some internal buffer-sizes of the HTTPRequest-class
@param int $content_buffer_size content_buffer_size in bytes or NULL if not to change this value.
@param int $chunk_buffer_size chunk_buffer_size in bytes or NULL if not to change this value.
@param int $socket_read_buffer_size socket_read_buffer_si... | [
"Adjusts",
"some",
"internal",
"buffer",
"-",
"sizes",
"of",
"the",
"HTTPRequest",
"-",
"class"
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/PHPCrawlerHTTPRequest.class.php#L1275-L1293 |
223,272 | kontoulis/rabbitmq-laravel | src/Message/Message.php | Message.fromAMQPMessage | public static function fromAMQPMessage(AMQPMessage $AMQPMessage)
{
$msg = new Message(
json_decode($AMQPMessage->body, true),
$AMQPMessage->delivery_info['routing_key'],
$AMQPMessage->get_properties()
);
$msg->setAMQPMessage($AMQPMessage);
return $... | php | public static function fromAMQPMessage(AMQPMessage $AMQPMessage)
{
$msg = new Message(
json_decode($AMQPMessage->body, true),
$AMQPMessage->delivery_info['routing_key'],
$AMQPMessage->get_properties()
);
$msg->setAMQPMessage($AMQPMessage);
return $... | [
"public",
"static",
"function",
"fromAMQPMessage",
"(",
"AMQPMessage",
"$",
"AMQPMessage",
")",
"{",
"$",
"msg",
"=",
"new",
"Message",
"(",
"json_decode",
"(",
"$",
"AMQPMessage",
"->",
"body",
",",
"true",
")",
",",
"$",
"AMQPMessage",
"->",
"delivery_info... | Creates a message given the AMQP message and the queue it was received
from
@param AMQPMessage $AMQPMessage
@return Message
@internal param AMQPMessage $msg | [
"Creates",
"a",
"message",
"given",
"the",
"AMQP",
"message",
"and",
"the",
"queue",
"it",
"was",
"received",
"from"
] | f677b3b447be63dd14732309193d26c3b841c5fc | https://github.com/kontoulis/rabbitmq-laravel/blob/f677b3b447be63dd14732309193d26c3b841c5fc/src/Message/Message.php#L122-L132 |
223,273 | kontoulis/rabbitmq-laravel | src/Message/Message.php | Message.sendNack | public function sendNack($requeue = false)
{
$this->amqpMessage->delivery_info['channel']->basic_nack(
$this->getDeliveryTag(),
true, // ignore all unacknowledged messages
$requeue // reschedule the message
);
} | php | public function sendNack($requeue = false)
{
$this->amqpMessage->delivery_info['channel']->basic_nack(
$this->getDeliveryTag(),
true, // ignore all unacknowledged messages
$requeue // reschedule the message
);
} | [
"public",
"function",
"sendNack",
"(",
"$",
"requeue",
"=",
"false",
")",
"{",
"$",
"this",
"->",
"amqpMessage",
"->",
"delivery_info",
"[",
"'channel'",
"]",
"->",
"basic_nack",
"(",
"$",
"this",
"->",
"getDeliveryTag",
"(",
")",
",",
"true",
",",
"// i... | Sends a negative acknowledgment
@param bool $requeue Will the message be requeued | [
"Sends",
"a",
"negative",
"acknowledgment"
] | f677b3b447be63dd14732309193d26c3b841c5fc | https://github.com/kontoulis/rabbitmq-laravel/blob/f677b3b447be63dd14732309193d26c3b841c5fc/src/Message/Message.php#L176-L183 |
223,274 | kontoulis/rabbitmq-laravel | src/Message/Message.php | Message.republish | public function republish()
{
$this->amqpMessage->delivery_info['channel']->basic_publish(
$this->getAMQPMessage(),
$this->amqpMessage->delivery_info['exchange'],
$this->routingKey
);
} | php | public function republish()
{
$this->amqpMessage->delivery_info['channel']->basic_publish(
$this->getAMQPMessage(),
$this->amqpMessage->delivery_info['exchange'],
$this->routingKey
);
} | [
"public",
"function",
"republish",
"(",
")",
"{",
"$",
"this",
"->",
"amqpMessage",
"->",
"delivery_info",
"[",
"'channel'",
"]",
"->",
"basic_publish",
"(",
"$",
"this",
"->",
"getAMQPMessage",
"(",
")",
",",
"$",
"this",
"->",
"amqpMessage",
"->",
"deliv... | Re-publishes the message to the queue. | [
"Re",
"-",
"publishes",
"the",
"message",
"to",
"the",
"queue",
"."
] | f677b3b447be63dd14732309193d26c3b841c5fc | https://github.com/kontoulis/rabbitmq-laravel/blob/f677b3b447be63dd14732309193d26c3b841c5fc/src/Message/Message.php#L190-L197 |
223,275 | shopsys/doctrine-orm | lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryWalker.php | LimitSubqueryWalker.validate | private function validate(SelectStatement $AST)
{
// Prevent LimitSubqueryWalker from being used with queries that include
// a limit, a fetched to-many join, and an order by condition that
// references a column from the fetch joined table.
$queryComponents = $this->getQueryComponen... | php | private function validate(SelectStatement $AST)
{
// Prevent LimitSubqueryWalker from being used with queries that include
// a limit, a fetched to-many join, and an order by condition that
// references a column from the fetch joined table.
$queryComponents = $this->getQueryComponen... | [
"private",
"function",
"validate",
"(",
"SelectStatement",
"$",
"AST",
")",
"{",
"// Prevent LimitSubqueryWalker from being used with queries that include",
"// a limit, a fetched to-many join, and an order by condition that",
"// references a column from the fetch joined table.",
"$",
"qu... | Validate the AST to ensure that this walker is able to properly manipulate it.
@param SelectStatement $AST | [
"Validate",
"the",
"AST",
"to",
"ensure",
"that",
"this",
"walker",
"is",
"able",
"to",
"properly",
"manipulate",
"it",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryWalker.php#L126-L154 |
223,276 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/Builder/FieldBuilder.php | FieldBuilder.setSequenceGenerator | public function setSequenceGenerator($sequenceName, $allocationSize = 1, $initialValue = 1)
{
$this->sequenceDef = array(
'sequenceName' => $sequenceName,
'allocationSize' => $allocationSize,
'initialValue' => $initialValue,
);
return $this;
} | php | public function setSequenceGenerator($sequenceName, $allocationSize = 1, $initialValue = 1)
{
$this->sequenceDef = array(
'sequenceName' => $sequenceName,
'allocationSize' => $allocationSize,
'initialValue' => $initialValue,
);
return $this;
} | [
"public",
"function",
"setSequenceGenerator",
"(",
"$",
"sequenceName",
",",
"$",
"allocationSize",
"=",
"1",
",",
"$",
"initialValue",
"=",
"1",
")",
"{",
"$",
"this",
"->",
"sequenceDef",
"=",
"array",
"(",
"'sequenceName'",
"=>",
"$",
"sequenceName",
",",... | Sets Sequence Generator.
@param string $sequenceName
@param int $allocationSize
@param int $initialValue
@return FieldBuilder | [
"Sets",
"Sequence",
"Generator",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/Builder/FieldBuilder.php#L212-L220 |
223,277 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/Builder/FieldBuilder.php | FieldBuilder.build | public function build()
{
$cm = $this->builder->getClassMetadata();
if ($this->generatedValue) {
$cm->setIdGeneratorType(constant('Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_' . $this->generatedValue));
}
if ($this->version) {
$cm->setVersionMapping($t... | php | public function build()
{
$cm = $this->builder->getClassMetadata();
if ($this->generatedValue) {
$cm->setIdGeneratorType(constant('Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_' . $this->generatedValue));
}
if ($this->version) {
$cm->setVersionMapping($t... | [
"public",
"function",
"build",
"(",
")",
"{",
"$",
"cm",
"=",
"$",
"this",
"->",
"builder",
"->",
"getClassMetadata",
"(",
")",
";",
"if",
"(",
"$",
"this",
"->",
"generatedValue",
")",
"{",
"$",
"cm",
"->",
"setIdGeneratorType",
"(",
"constant",
"(",
... | Finalizes this field and attach it to the ClassMetadata.
Without this call a FieldBuilder has no effect on the ClassMetadata.
@return ClassMetadataBuilder | [
"Finalizes",
"this",
"field",
"and",
"attach",
"it",
"to",
"the",
"ClassMetadata",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/Builder/FieldBuilder.php#L242-L256 |
223,278 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php | YamlDriver.joinColumnToArray | private function joinColumnToArray($joinColumnElement)
{
$joinColumn = array();
if (isset($joinColumnElement['referencedColumnName'])) {
$joinColumn['referencedColumnName'] = (string) $joinColumnElement['referencedColumnName'];
}
if (isset($joinColumnElement['name'])) {
... | php | private function joinColumnToArray($joinColumnElement)
{
$joinColumn = array();
if (isset($joinColumnElement['referencedColumnName'])) {
$joinColumn['referencedColumnName'] = (string) $joinColumnElement['referencedColumnName'];
}
if (isset($joinColumnElement['name'])) {
... | [
"private",
"function",
"joinColumnToArray",
"(",
"$",
"joinColumnElement",
")",
"{",
"$",
"joinColumn",
"=",
"array",
"(",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"joinColumnElement",
"[",
"'referencedColumnName'",
"]",
")",
")",
"{",
"$",
"joinColumn",
"[",... | Constructs a joinColumn mapping array based on the information
found in the given join column element.
@param array $joinColumnElement The array join column element.
@return array The mapping array. | [
"Constructs",
"a",
"joinColumn",
"mapping",
"array",
"based",
"on",
"the",
"information",
"found",
"in",
"the",
"given",
"join",
"column",
"element",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php#L663-L695 |
223,279 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php | YamlDriver.columnToArray | private function columnToArray($fieldName, $column)
{
$mapping = array(
'fieldName' => $fieldName
);
if (isset($column['type'])) {
$params = explode('(', $column['type']);
$column['type'] = $params[0];
$mapping['type'] = $column['type'];
... | php | private function columnToArray($fieldName, $column)
{
$mapping = array(
'fieldName' => $fieldName
);
if (isset($column['type'])) {
$params = explode('(', $column['type']);
$column['type'] = $params[0];
$mapping['type'] = $column['type'];
... | [
"private",
"function",
"columnToArray",
"(",
"$",
"fieldName",
",",
"$",
"column",
")",
"{",
"$",
"mapping",
"=",
"array",
"(",
"'fieldName'",
"=>",
"$",
"fieldName",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"column",
"[",
"'type'",
"]",
")",
")",
"{"... | Parses the given column as array.
@param string $fieldName
@param array $column
@return array | [
"Parses",
"the",
"given",
"column",
"as",
"array",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php#L705-L758 |
223,280 | shopsys/doctrine-orm | lib/Doctrine/ORM/Mapping/Builder/AssociationBuilder.php | AssociationBuilder.addJoinColumn | public function addJoinColumn($columnName, $referencedColumnName, $nullable = true, $unique = false, $onDelete = null, $columnDef = null)
{
$this->joinColumns[] = array(
'name' => $columnName,
'referencedColumnName' => $referencedColumnName,
'nullable' => $nullable,
... | php | public function addJoinColumn($columnName, $referencedColumnName, $nullable = true, $unique = false, $onDelete = null, $columnDef = null)
{
$this->joinColumns[] = array(
'name' => $columnName,
'referencedColumnName' => $referencedColumnName,
'nullable' => $nullable,
... | [
"public",
"function",
"addJoinColumn",
"(",
"$",
"columnName",
",",
"$",
"referencedColumnName",
",",
"$",
"nullable",
"=",
"true",
",",
"$",
"unique",
"=",
"false",
",",
"$",
"onDelete",
"=",
"null",
",",
"$",
"columnDef",
"=",
"null",
")",
"{",
"$",
... | Add Join Columns.
@param string $columnName
@param string $referencedColumnName
@param bool $nullable
@param bool $unique
@param string|null $onDelete
@param string|null $columnDef
@return AssociationBuilder | [
"Add",
"Join",
"Columns",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Mapping/Builder/AssociationBuilder.php#L173-L184 |
223,281 | drmonkeyninja/cakephp-font-awesome | src/View/Helper/FaHelper.php | FaHelper.link | public function link($icon, $title, $url = null, $options = [], $confirmMessage = false)
{
$escapeTitle = true;
if (isset($options['escapeTitle'])) {
$escapeTitle = $options['escapeTitle'];
unset($options['escapeTitle']);
} elseif (isset($options['escape'])) {
... | php | public function link($icon, $title, $url = null, $options = [], $confirmMessage = false)
{
$escapeTitle = true;
if (isset($options['escapeTitle'])) {
$escapeTitle = $options['escapeTitle'];
unset($options['escapeTitle']);
} elseif (isset($options['escape'])) {
... | [
"public",
"function",
"link",
"(",
"$",
"icon",
",",
"$",
"title",
",",
"$",
"url",
"=",
"null",
",",
"$",
"options",
"=",
"[",
"]",
",",
"$",
"confirmMessage",
"=",
"false",
")",
"{",
"$",
"escapeTitle",
"=",
"true",
";",
"if",
"(",
"isset",
"("... | Create link containing a Font Awesome icon.
@param string $icon Font Awesome icon (excluding the fa- prefix)
@param string $title Link text
@param string|array $url Cake-relative URL or array of URL parameters, or external URL (starts with http://)
@param array $options Array of options and HTML attributes.
@param str... | [
"Create",
"link",
"containing",
"a",
"Font",
"Awesome",
"icon",
"."
] | e35e0b785d1dcb9e3389c8e9f17ce4855d79b1a5 | https://github.com/drmonkeyninja/cakephp-font-awesome/blob/e35e0b785d1dcb9e3389c8e9f17ce4855d79b1a5/src/View/Helper/FaHelper.php#L22-L51 |
223,282 | shopsys/doctrine-orm | lib/Doctrine/ORM/Tools/EntityGenerator.php | EntityGenerator.generate | public function generate(array $metadatas, $outputDirectory)
{
foreach ($metadatas as $metadata) {
$this->writeEntityClass($metadata, $outputDirectory);
}
} | php | public function generate(array $metadatas, $outputDirectory)
{
foreach ($metadatas as $metadata) {
$this->writeEntityClass($metadata, $outputDirectory);
}
} | [
"public",
"function",
"generate",
"(",
"array",
"$",
"metadatas",
",",
"$",
"outputDirectory",
")",
"{",
"foreach",
"(",
"$",
"metadatas",
"as",
"$",
"metadata",
")",
"{",
"$",
"this",
"->",
"writeEntityClass",
"(",
"$",
"metadata",
",",
"$",
"outputDirect... | Generates and writes entity classes for the given array of ClassMetadataInfo instances.
@param array $metadatas
@param string $outputDirectory
@return void | [
"Generates",
"and",
"writes",
"entity",
"classes",
"for",
"the",
"given",
"array",
"of",
"ClassMetadataInfo",
"instances",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Tools/EntityGenerator.php#L346-L351 |
223,283 | shopsys/doctrine-orm | lib/Doctrine/ORM/Tools/EntityGenerator.php | EntityGenerator.writeEntityClass | public function writeEntityClass(ClassMetadataInfo $metadata, $outputDirectory)
{
$path = $outputDirectory . '/' . str_replace('\\', DIRECTORY_SEPARATOR, $metadata->name) . $this->extension;
$dir = dirname($path);
if ( ! is_dir($dir)) {
mkdir($dir, 0775, true);
}
... | php | public function writeEntityClass(ClassMetadataInfo $metadata, $outputDirectory)
{
$path = $outputDirectory . '/' . str_replace('\\', DIRECTORY_SEPARATOR, $metadata->name) . $this->extension;
$dir = dirname($path);
if ( ! is_dir($dir)) {
mkdir($dir, 0775, true);
}
... | [
"public",
"function",
"writeEntityClass",
"(",
"ClassMetadataInfo",
"$",
"metadata",
",",
"$",
"outputDirectory",
")",
"{",
"$",
"path",
"=",
"$",
"outputDirectory",
".",
"'/'",
".",
"str_replace",
"(",
"'\\\\'",
",",
"DIRECTORY_SEPARATOR",
",",
"$",
"metadata",... | Generates and writes entity class to disk for the given ClassMetadataInfo instance.
@param ClassMetadataInfo $metadata
@param string $outputDirectory
@return void
@throws \RuntimeException | [
"Generates",
"and",
"writes",
"entity",
"class",
"to",
"disk",
"for",
"the",
"given",
"ClassMetadataInfo",
"instance",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Tools/EntityGenerator.php#L363-L395 |
223,284 | shopsys/doctrine-orm | lib/Doctrine/ORM/Tools/EntityGenerator.php | EntityGenerator.generateEntityClass | public function generateEntityClass(ClassMetadataInfo $metadata)
{
$placeHolders = array(
'<namespace>',
'<useStatement>',
'<entityAnnotation>',
'<entityClassName>',
'<entityBody>'
);
$replacements = array(
$this->gener... | php | public function generateEntityClass(ClassMetadataInfo $metadata)
{
$placeHolders = array(
'<namespace>',
'<useStatement>',
'<entityAnnotation>',
'<entityClassName>',
'<entityBody>'
);
$replacements = array(
$this->gener... | [
"public",
"function",
"generateEntityClass",
"(",
"ClassMetadataInfo",
"$",
"metadata",
")",
"{",
"$",
"placeHolders",
"=",
"array",
"(",
"'<namespace>'",
",",
"'<useStatement>'",
",",
"'<entityAnnotation>'",
",",
"'<entityClassName>'",
",",
"'<entityBody>'",
")",
";"... | Generates a PHP5 Doctrine 2 entity class from the given ClassMetadataInfo instance.
@param ClassMetadataInfo $metadata
@return string | [
"Generates",
"a",
"PHP5",
"Doctrine",
"2",
"entity",
"class",
"from",
"the",
"given",
"ClassMetadataInfo",
"instance",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Tools/EntityGenerator.php#L404-L425 |
223,285 | shopsys/doctrine-orm | lib/Doctrine/ORM/Tools/EntityGenerator.php | EntityGenerator.generateUpdatedEntityClass | public function generateUpdatedEntityClass(ClassMetadataInfo $metadata, $path)
{
$currentCode = file_get_contents($path);
$body = $this->generateEntityBody($metadata);
$body = str_replace('<spaces>', $this->spaces, $body);
$last = strrpos($currentCode, '}');
return substr($... | php | public function generateUpdatedEntityClass(ClassMetadataInfo $metadata, $path)
{
$currentCode = file_get_contents($path);
$body = $this->generateEntityBody($metadata);
$body = str_replace('<spaces>', $this->spaces, $body);
$last = strrpos($currentCode, '}');
return substr($... | [
"public",
"function",
"generateUpdatedEntityClass",
"(",
"ClassMetadataInfo",
"$",
"metadata",
",",
"$",
"path",
")",
"{",
"$",
"currentCode",
"=",
"file_get_contents",
"(",
"$",
"path",
")",
";",
"$",
"body",
"=",
"$",
"this",
"->",
"generateEntityBody",
"(",... | Generates the updated code for the given ClassMetadataInfo and entity at path.
@param ClassMetadataInfo $metadata
@param string $path
@return string | [
"Generates",
"the",
"updated",
"code",
"for",
"the",
"given",
"ClassMetadataInfo",
"and",
"entity",
"at",
"path",
"."
] | faf2288cd1c133c4b5340079a26aa4f14dd7beab | https://github.com/shopsys/doctrine-orm/blob/faf2288cd1c133c4b5340079a26aa4f14dd7beab/lib/Doctrine/ORM/Tools/EntityGenerator.php#L435-L444 |
223,286 | mmerian/phpcrawl | libs/ProcessCommunication/PHPCrawlerDocumentInfoQueue.class.php | PHPCrawlerDocumentInfoQueue.addDocumentInfo | public function addDocumentInfo(PHPCrawlerDocumentInfo $DocInfo)
{
// If queue is full -> wait a little
while ($this->getDocumentInfoCount() >= $this->queue_max_size)
{
usleep(500000);
}
$this->createPreparedStatements();
$ser = serialize($DocInfo);
$this->... | php | public function addDocumentInfo(PHPCrawlerDocumentInfo $DocInfo)
{
// If queue is full -> wait a little
while ($this->getDocumentInfoCount() >= $this->queue_max_size)
{
usleep(500000);
}
$this->createPreparedStatements();
$ser = serialize($DocInfo);
$this->... | [
"public",
"function",
"addDocumentInfo",
"(",
"PHPCrawlerDocumentInfo",
"$",
"DocInfo",
")",
"{",
"// If queue is full -> wait a little\r",
"while",
"(",
"$",
"this",
"->",
"getDocumentInfoCount",
"(",
")",
">=",
"$",
"this",
"->",
"queue_max_size",
")",
"{",
"uslee... | Adds a PHPCrawlerDocumentInfo-object to the queue | [
"Adds",
"a",
"PHPCrawlerDocumentInfo",
"-",
"object",
"to",
"the",
"queue"
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/ProcessCommunication/PHPCrawlerDocumentInfoQueue.class.php#L58-L75 |
223,287 | mmerian/phpcrawl | libs/ProcessCommunication/PHPCrawlerDocumentInfoQueue.class.php | PHPCrawlerDocumentInfoQueue.createPreparedStatements | protected function createPreparedStatements()
{
if ($this->prepared_statements_created == false)
{
$this->preparedInsertStatement = $this->PDO->prepare("INSERT INTO document_infos (document_info) VALUES (?);");
$this->preparedSelectStatement = $this->PDO->prepare("SELECT * FROM document_infos... | php | protected function createPreparedStatements()
{
if ($this->prepared_statements_created == false)
{
$this->preparedInsertStatement = $this->PDO->prepare("INSERT INTO document_infos (document_info) VALUES (?);");
$this->preparedSelectStatement = $this->PDO->prepare("SELECT * FROM document_infos... | [
"protected",
"function",
"createPreparedStatements",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"prepared_statements_created",
"==",
"false",
")",
"{",
"$",
"this",
"->",
"preparedInsertStatement",
"=",
"$",
"this",
"->",
"PDO",
"->",
"prepare",
"(",
"\"INSE... | Creates all prepared statemenst | [
"Creates",
"all",
"prepared",
"statemenst"
] | 1c5e07ff33cf079c69191eb9540a3ced64d392dc | https://github.com/mmerian/phpcrawl/blob/1c5e07ff33cf079c69191eb9540a3ced64d392dc/libs/ProcessCommunication/PHPCrawlerDocumentInfoQueue.class.php#L105-L114 |
223,288 | Torann/laravel-asana | src/Asana.php | Asana.getUsers | public function getUsers($opt_fields = null)
{
$url = $opt_fields ? 'users?opt_fields=' . $opt_fields : 'users';
return $this->curl->get($url);
} | php | public function getUsers($opt_fields = null)
{
$url = $opt_fields ? 'users?opt_fields=' . $opt_fields : 'users';
return $this->curl->get($url);
} | [
"public",
"function",
"getUsers",
"(",
"$",
"opt_fields",
"=",
"null",
")",
"{",
"$",
"url",
"=",
"$",
"opt_fields",
"?",
"'users?opt_fields='",
".",
"$",
"opt_fields",
":",
"'users'",
";",
"return",
"$",
"this",
"->",
"curl",
"->",
"get",
"(",
"$",
"u... | Returns the user records for all users in all workspaces you have access.
@return string|null | [
"Returns",
"the",
"user",
"records",
"for",
"all",
"users",
"in",
"all",
"workspaces",
"you",
"have",
"access",
"."
] | 6e669720dbc3e66f19ffb637865eab9d5ae9d299 | https://github.com/Torann/laravel-asana/blob/6e669720dbc3e66f19ffb637865eab9d5ae9d299/src/Asana.php#L74-L78 |
223,289 | Torann/laravel-asana | src/Asana.php | Asana.createTask | public function createTask($data)
{
$data = array_merge([
'workspace' => $this->defaultWorkspaceId,
'projects' => $this->defaultProjectId
], $data);
return $this->curl->post('tasks', ['data' => $data]);
} | php | public function createTask($data)
{
$data = array_merge([
'workspace' => $this->defaultWorkspaceId,
'projects' => $this->defaultProjectId
], $data);
return $this->curl->post('tasks', ['data' => $data]);
} | [
"public",
"function",
"createTask",
"(",
"$",
"data",
")",
"{",
"$",
"data",
"=",
"array_merge",
"(",
"[",
"'workspace'",
"=>",
"$",
"this",
"->",
"defaultWorkspaceId",
",",
"'projects'",
"=>",
"$",
"this",
"->",
"defaultProjectId",
"]",
",",
"$",
"data",
... | Function to create a task.
For assign or remove the task to a project, use the addProjectToTask and removeProjectToTask.
@param array $data
Example:
array(
"workspace" => "1768",
"name" => "Hello World!",
"notes" => "This is a task for testing the Asana API :)",
"assignee" => "176822166183",
"followers" => array(
"... | [
"Function",
"to",
"create",
"a",
"task",
"."
] | 6e669720dbc3e66f19ffb637865eab9d5ae9d299 | https://github.com/Torann/laravel-asana/blob/6e669720dbc3e66f19ffb637865eab9d5ae9d299/src/Asana.php#L102-L110 |
223,290 | Torann/laravel-asana | src/Asana.php | Asana.addProjectToTask | public function addProjectToTask($taskId, $projectId = null)
{
$data = [
'project' => $projectId ?: $this->defaultProjectId
];
return $this->curl->post("tasks/{$taskId}/addProject", ['data' => $data]);
} | php | public function addProjectToTask($taskId, $projectId = null)
{
$data = [
'project' => $projectId ?: $this->defaultProjectId
];
return $this->curl->post("tasks/{$taskId}/addProject", ['data' => $data]);
} | [
"public",
"function",
"addProjectToTask",
"(",
"$",
"taskId",
",",
"$",
"projectId",
"=",
"null",
")",
"{",
"$",
"data",
"=",
"[",
"'project'",
"=>",
"$",
"projectId",
"?",
":",
"$",
"this",
"->",
"defaultProjectId",
"]",
";",
"return",
"$",
"this",
"-... | Adds a project to task. If successful, will
return success and an empty data block.
@param string $taskId
@param string $projectId
@return string|null | [
"Adds",
"a",
"project",
"to",
"task",
".",
"If",
"successful",
"will",
"return",
"success",
"and",
"an",
"empty",
"data",
"block",
"."
] | 6e669720dbc3e66f19ffb637865eab9d5ae9d299 | https://github.com/Torann/laravel-asana/blob/6e669720dbc3e66f19ffb637865eab9d5ae9d299/src/Asana.php#L231-L238 |
223,291 | Torann/laravel-asana | src/Asana.php | Asana.getTasksByFilter | public function getTasksByFilter($filter = ["assignee" => "", "project" => "", "workspace" => ""])
{
$filter = array_filter(array_merge(["assignee" => "", "project" => "", "workspace" => ""], $filter));
$url = '?' . join('&', array_map(function ($k, $v) {
return "{$k}={$v}";
... | php | public function getTasksByFilter($filter = ["assignee" => "", "project" => "", "workspace" => ""])
{
$filter = array_filter(array_merge(["assignee" => "", "project" => "", "workspace" => ""], $filter));
$url = '?' . join('&', array_map(function ($k, $v) {
return "{$k}={$v}";
... | [
"public",
"function",
"getTasksByFilter",
"(",
"$",
"filter",
"=",
"[",
"\"assignee\"",
"=>",
"\"\"",
",",
"\"project\"",
"=>",
"\"\"",
",",
"\"workspace\"",
"=>",
"\"\"",
"]",
")",
"{",
"$",
"filter",
"=",
"array_filter",
"(",
"array_merge",
"(",
"[",
"\"... | Returns task by a given filter.
For now (limited by Asana API), you may limit your
query either to a specific project or to an assignee and workspace
NOTE: As Asana API says, if you filter by assignee, you MUST specify a workspaceId and vice-a-versa.
@param array $filter
array(
"assignee" => "",
"project" => 0,
"wo... | [
"Returns",
"task",
"by",
"a",
"given",
"filter",
"."
] | 6e669720dbc3e66f19ffb637865eab9d5ae9d299 | https://github.com/Torann/laravel-asana/blob/6e669720dbc3e66f19ffb637865eab9d5ae9d299/src/Asana.php#L276-L284 |
223,292 | Torann/laravel-asana | src/Asana.php | Asana.getProject | public function getProject($projectId = null)
{
$projectId = $projectId ?: $this->defaultProjectId;
return $this->curl->get("projects/{$projectId}");
} | php | public function getProject($projectId = null)
{
$projectId = $projectId ?: $this->defaultProjectId;
return $this->curl->get("projects/{$projectId}");
} | [
"public",
"function",
"getProject",
"(",
"$",
"projectId",
"=",
"null",
")",
"{",
"$",
"projectId",
"=",
"$",
"projectId",
"?",
":",
"$",
"this",
"->",
"defaultProjectId",
";",
"return",
"$",
"this",
"->",
"curl",
"->",
"get",
"(",
"\"projects/{$projectId}... | Returns the full record for a single project.
@param string $projectId
@return string|null | [
"Returns",
"the",
"full",
"record",
"for",
"a",
"single",
"project",
"."
] | 6e669720dbc3e66f19ffb637865eab9d5ae9d299 | https://github.com/Torann/laravel-asana/blob/6e669720dbc3e66f19ffb637865eab9d5ae9d299/src/Asana.php#L383-L388 |
223,293 | Torann/laravel-asana | src/Asana.php | Asana.getProjects | public function getProjects($archived = false, $opt_fields = "")
{
$archived = $archived ? "true" : "false";
$opt_fields = ($opt_fields != "") ? "&opt_fields={$opt_fields}" : "";
return $this->curl->get("projects?archived={$archived}{$opt_fields}");
} | php | public function getProjects($archived = false, $opt_fields = "")
{
$archived = $archived ? "true" : "false";
$opt_fields = ($opt_fields != "") ? "&opt_fields={$opt_fields}" : "";
return $this->curl->get("projects?archived={$archived}{$opt_fields}");
} | [
"public",
"function",
"getProjects",
"(",
"$",
"archived",
"=",
"false",
",",
"$",
"opt_fields",
"=",
"\"\"",
")",
"{",
"$",
"archived",
"=",
"$",
"archived",
"?",
"\"true\"",
":",
"\"false\"",
";",
"$",
"opt_fields",
"=",
"(",
"$",
"opt_fields",
"!=",
... | Returns the projects in all workspaces containing archived ones or not.
@param boolean $archived Return archived projects or not
@param string $opt_fields Return results with optional parameters
@return string JSON or null | [
"Returns",
"the",
"projects",
"in",
"all",
"workspaces",
"containing",
"archived",
"ones",
"or",
"not",
"."
] | 6e669720dbc3e66f19ffb637865eab9d5ae9d299 | https://github.com/Torann/laravel-asana/blob/6e669720dbc3e66f19ffb637865eab9d5ae9d299/src/Asana.php#L398-L404 |
223,294 | Torann/laravel-asana | src/Asana.php | Asana.getProjectsInWorkspace | public function getProjectsInWorkspace($workspaceId = null, $archived = false)
{
$archived = $archived ? 1 : 0;
$workspaceId = $workspaceId ?: $this->defaultWorkspaceId;
return $this->curl->get("projects?archived={$archived}&workspace={$workspaceId}");
} | php | public function getProjectsInWorkspace($workspaceId = null, $archived = false)
{
$archived = $archived ? 1 : 0;
$workspaceId = $workspaceId ?: $this->defaultWorkspaceId;
return $this->curl->get("projects?archived={$archived}&workspace={$workspaceId}");
} | [
"public",
"function",
"getProjectsInWorkspace",
"(",
"$",
"workspaceId",
"=",
"null",
",",
"$",
"archived",
"=",
"false",
")",
"{",
"$",
"archived",
"=",
"$",
"archived",
"?",
"1",
":",
"0",
";",
"$",
"workspaceId",
"=",
"$",
"workspaceId",
"?",
":",
"... | Returns the projects in provided workspace containing archived ones or not.
@param string $workspaceId
@param boolean $archived Return archived projects or not
@return string JSON or null | [
"Returns",
"the",
"projects",
"in",
"provided",
"workspace",
"containing",
"archived",
"ones",
"or",
"not",
"."
] | 6e669720dbc3e66f19ffb637865eab9d5ae9d299 | https://github.com/Torann/laravel-asana/blob/6e669720dbc3e66f19ffb637865eab9d5ae9d299/src/Asana.php#L414-L420 |
223,295 | Torann/laravel-asana | src/Asana.php | Asana.updateProject | public function updateProject($projectId = null, $data)
{
$projectId = $projectId ?: $this->defaultProjectId;
return $this->curl->put("projects/{$projectId}", ['data' => $data]);
} | php | public function updateProject($projectId = null, $data)
{
$projectId = $projectId ?: $this->defaultProjectId;
return $this->curl->put("projects/{$projectId}", ['data' => $data]);
} | [
"public",
"function",
"updateProject",
"(",
"$",
"projectId",
"=",
"null",
",",
"$",
"data",
")",
"{",
"$",
"projectId",
"=",
"$",
"projectId",
"?",
":",
"$",
"this",
"->",
"defaultProjectId",
";",
"return",
"$",
"this",
"->",
"curl",
"->",
"put",
"(",... | This method modifies the fields of a project provided
in the request, then returns the full updated record.
@param string $projectId
@param array $data
@return string|null | [
"This",
"method",
"modifies",
"the",
"fields",
"of",
"a",
"project",
"provided",
"in",
"the",
"request",
"then",
"returns",
"the",
"full",
"updated",
"record",
"."
] | 6e669720dbc3e66f19ffb637865eab9d5ae9d299 | https://github.com/Torann/laravel-asana/blob/6e669720dbc3e66f19ffb637865eab9d5ae9d299/src/Asana.php#L431-L436 |
223,296 | Torann/laravel-asana | src/Asana.php | Asana.getProjectTasks | public function getProjectTasks($projectId = null)
{
$projectId = $projectId ?: $this->defaultProjectId;
return $this->curl->get("tasks?project={$projectId}");
} | php | public function getProjectTasks($projectId = null)
{
$projectId = $projectId ?: $this->defaultProjectId;
return $this->curl->get("tasks?project={$projectId}");
} | [
"public",
"function",
"getProjectTasks",
"(",
"$",
"projectId",
"=",
"null",
")",
"{",
"$",
"projectId",
"=",
"$",
"projectId",
"?",
":",
"$",
"this",
"->",
"defaultProjectId",
";",
"return",
"$",
"this",
"->",
"curl",
"->",
"get",
"(",
"\"tasks?project={$... | Returns all unarchived tasks of a given project
@param string $projectId
@return string|null | [
"Returns",
"all",
"unarchived",
"tasks",
"of",
"a",
"given",
"project"
] | 6e669720dbc3e66f19ffb637865eab9d5ae9d299 | https://github.com/Torann/laravel-asana/blob/6e669720dbc3e66f19ffb637865eab9d5ae9d299/src/Asana.php#L445-L450 |
223,297 | Torann/laravel-asana | src/Asana.php | Asana.getProjectStories | public function getProjectStories($projectId = null)
{
$projectId = $projectId ?: $this->defaultProjectId;
return $this->curl->get("projects/{$projectId}/stories");
} | php | public function getProjectStories($projectId = null)
{
$projectId = $projectId ?: $this->defaultProjectId;
return $this->curl->get("projects/{$projectId}/stories");
} | [
"public",
"function",
"getProjectStories",
"(",
"$",
"projectId",
"=",
"null",
")",
"{",
"$",
"projectId",
"=",
"$",
"projectId",
"?",
":",
"$",
"this",
"->",
"defaultProjectId",
";",
"return",
"$",
"this",
"->",
"curl",
"->",
"get",
"(",
"\"projects/{$pro... | Returns the list of stories associated with the object.
As usual with queries, stories are returned in compact form.
However, the compact form for stories contains more
information by default than just the ID.
There is presently no way to get a filtered set of stories.
@param string $projectId
@return string|null | [
"Returns",
"the",
"list",
"of",
"stories",
"associated",
"with",
"the",
"object",
".",
"As",
"usual",
"with",
"queries",
"stories",
"are",
"returned",
"in",
"compact",
"form",
".",
"However",
"the",
"compact",
"form",
"for",
"stories",
"contains",
"more",
"i... | 6e669720dbc3e66f19ffb637865eab9d5ae9d299 | https://github.com/Torann/laravel-asana/blob/6e669720dbc3e66f19ffb637865eab9d5ae9d299/src/Asana.php#L463-L468 |
223,298 | Torann/laravel-asana | src/Asana.php | Asana.commentOnProject | public function commentOnProject($projectId = null, $text = "")
{
$projectId = $projectId ?: $this->defaultProjectId;
$data = [
"text" => $text
];
return $this->curl->post("projects/{$projectId}/stories", ['data' => $data]);
} | php | public function commentOnProject($projectId = null, $text = "")
{
$projectId = $projectId ?: $this->defaultProjectId;
$data = [
"text" => $text
];
return $this->curl->post("projects/{$projectId}/stories", ['data' => $data]);
} | [
"public",
"function",
"commentOnProject",
"(",
"$",
"projectId",
"=",
"null",
",",
"$",
"text",
"=",
"\"\"",
")",
"{",
"$",
"projectId",
"=",
"$",
"projectId",
"?",
":",
"$",
"this",
"->",
"defaultProjectId",
";",
"$",
"data",
"=",
"[",
"\"text\"",
"=>... | Adds a comment to a project
The comment will be authored by the authorized user, and
timestamped when the server receives the request.
@param string $projectId
@param string $text
@return string|null | [
"Adds",
"a",
"comment",
"to",
"a",
"project"
] | 6e669720dbc3e66f19ffb637865eab9d5ae9d299 | https://github.com/Torann/laravel-asana/blob/6e669720dbc3e66f19ffb637865eab9d5ae9d299/src/Asana.php#L481-L490 |
223,299 | Torann/laravel-asana | src/Asana.php | Asana.getWorkspaceTasks | public function getWorkspaceTasks($workspaceId = null, $assignee = "me")
{
$workspaceId = $workspaceId ?: $this->defaultWorkspaceId;
return $this->curl->get("tasks?workspace={$workspaceId}&assignee={$assignee}");
} | php | public function getWorkspaceTasks($workspaceId = null, $assignee = "me")
{
$workspaceId = $workspaceId ?: $this->defaultWorkspaceId;
return $this->curl->get("tasks?workspace={$workspaceId}&assignee={$assignee}");
} | [
"public",
"function",
"getWorkspaceTasks",
"(",
"$",
"workspaceId",
"=",
"null",
",",
"$",
"assignee",
"=",
"\"me\"",
")",
"{",
"$",
"workspaceId",
"=",
"$",
"workspaceId",
"?",
":",
"$",
"this",
"->",
"defaultWorkspaceId",
";",
"return",
"$",
"this",
"->"... | Returns tasks of all workspace assigned to someone.
Note: As Asana API says, you must specify an assignee when querying for workspace tasks.
@param string $workspaceId The id of the workspace
@param string $assignee Can be "me" or user ID
@return string|null | [
"Returns",
"tasks",
"of",
"all",
"workspace",
"assigned",
"to",
"someone",
"."
] | 6e669720dbc3e66f19ffb637865eab9d5ae9d299 | https://github.com/Torann/laravel-asana/blob/6e669720dbc3e66f19ffb637865eab9d5ae9d299/src/Asana.php#L590-L595 |
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.