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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
225,500 | jeffreyguo/SS-Behat-quicksetup | src/SilverStripe/BehatExtension/Context/BasicContext.php | BasicContext.cleanAssetsAfterScenario | public function cleanAssetsAfterScenario(ScenarioEvent $event) {
foreach(\File::get() as $file) {
if(file_exists($file->getFullPath())) $file->delete();
}
} | php | public function cleanAssetsAfterScenario(ScenarioEvent $event) {
foreach(\File::get() as $file) {
if(file_exists($file->getFullPath())) $file->delete();
}
} | [
"public",
"function",
"cleanAssetsAfterScenario",
"(",
"ScenarioEvent",
"$",
"event",
")",
"{",
"foreach",
"(",
"\\",
"File",
"::",
"get",
"(",
")",
"as",
"$",
"file",
")",
"{",
"if",
"(",
"file_exists",
"(",
"$",
"file",
"->",
"getFullPath",
"(",
")",
... | Delete any created files and folders from assets directory
@AfterScenario @assets | [
"Delete",
"any",
"created",
"files",
"and",
"folders",
"from",
"assets",
"directory"
] | a5172f3a94dc2b364df5c2758a8a1df4f026168e | https://github.com/jeffreyguo/SS-Behat-quicksetup/blob/a5172f3a94dc2b364df5c2758a8a1df4f026168e/src/SilverStripe/BehatExtension/Context/BasicContext.php#L269-L273 |
225,501 | jeffreyguo/SS-Behat-quicksetup | src/SilverStripe/BehatExtension/Context/BasicContext.php | BasicContext.iSelectFromInputGroup | public function iSelectFromInputGroup($value, $labelText) {
$page = $this->getSession()->getPage();
$parent = null;
foreach($page->findAll('css', 'label') as $label) {
if($label->getText() == $labelText) {
$parent = $label->getParent();
}
}
if(!$parent) throw new \InvalidArgumentException(sprintf(... | php | public function iSelectFromInputGroup($value, $labelText) {
$page = $this->getSession()->getPage();
$parent = null;
foreach($page->findAll('css', 'label') as $label) {
if($label->getText() == $labelText) {
$parent = $label->getParent();
}
}
if(!$parent) throw new \InvalidArgumentException(sprintf(... | [
"public",
"function",
"iSelectFromInputGroup",
"(",
"$",
"value",
",",
"$",
"labelText",
")",
"{",
"$",
"page",
"=",
"$",
"this",
"->",
"getSession",
"(",
")",
"->",
"getPage",
"(",
")",
";",
"$",
"parent",
"=",
"null",
";",
"foreach",
"(",
"$",
"pag... | Select an individual input from within a group, matched by the top-most label.
@Given /^I select "([^"]*)" from "([^"]*)" input group$/ | [
"Select",
"an",
"individual",
"input",
"from",
"within",
"a",
"group",
"matched",
"by",
"the",
"top",
"-",
"most",
"label",
"."
] | a5172f3a94dc2b364df5c2758a8a1df4f026168e | https://github.com/jeffreyguo/SS-Behat-quicksetup/blob/a5172f3a94dc2b364df5c2758a8a1df4f026168e/src/SilverStripe/BehatExtension/Context/BasicContext.php#L449-L471 |
225,502 | jeffreyguo/SS-Behat-quicksetup | src/SilverStripe/BehatExtension/Context/BasicContext.php | BasicContext.iSelectTheRadioButton | public function iSelectTheRadioButton($radioLabel) {
$session = $this->getSession();
$radioButton = $session->getPage()->find('named', array(
'radio', $this->getSession()->getSelectorsHandler()->xpathLiteral($radioLabel)
));
assertNotNull($radioButton);
$session->getDrive... | php | public function iSelectTheRadioButton($radioLabel) {
$session = $this->getSession();
$radioButton = $session->getPage()->find('named', array(
'radio', $this->getSession()->getSelectorsHandler()->xpathLiteral($radioLabel)
));
assertNotNull($radioButton);
$session->getDrive... | [
"public",
"function",
"iSelectTheRadioButton",
"(",
"$",
"radioLabel",
")",
"{",
"$",
"session",
"=",
"$",
"this",
"->",
"getSession",
"(",
")",
";",
"$",
"radioButton",
"=",
"$",
"session",
"->",
"getPage",
"(",
")",
"->",
"find",
"(",
"'named'",
",",
... | Selects the specified radio button
@Given /^I select the "([^"]*)" radio button$/ | [
"Selects",
"the",
"specified",
"radio",
"button"
] | a5172f3a94dc2b364df5c2758a8a1df4f026168e | https://github.com/jeffreyguo/SS-Behat-quicksetup/blob/a5172f3a94dc2b364df5c2758a8a1df4f026168e/src/SilverStripe/BehatExtension/Context/BasicContext.php#L705-L712 |
225,503 | jeffreyguo/SS-Behat-quicksetup | src/SilverStripe/BehatExtension/Context/BasicContext.php | BasicContext.iWaitXUntilISee | public function iWaitXUntilISee($wait, $selector) {
$page = $this->getSession()->getPage();
$this->spin(function($page) use ($page, $selector){
$element = $page->find('css', $selector);
if(empty($element)) {
return false;
} else {
return $element->isVisible();
}
});
} | php | public function iWaitXUntilISee($wait, $selector) {
$page = $this->getSession()->getPage();
$this->spin(function($page) use ($page, $selector){
$element = $page->find('css', $selector);
if(empty($element)) {
return false;
} else {
return $element->isVisible();
}
});
} | [
"public",
"function",
"iWaitXUntilISee",
"(",
"$",
"wait",
",",
"$",
"selector",
")",
"{",
"$",
"page",
"=",
"$",
"this",
"->",
"getSession",
"(",
")",
"->",
"getPage",
"(",
")",
";",
"$",
"this",
"->",
"spin",
"(",
"function",
"(",
"$",
"page",
")... | Wait until a certain amount of seconds till I see an element identified by a CSS selector.
Example: Given I wait for 10 seconds until I see the ".css_element" element
@Given /^I wait for (\d+) seconds until I see the "([^"]*)" element$/ | [
"Wait",
"until",
"a",
"certain",
"amount",
"of",
"seconds",
"till",
"I",
"see",
"an",
"element",
"identified",
"by",
"a",
"CSS",
"selector",
"."
] | a5172f3a94dc2b364df5c2758a8a1df4f026168e | https://github.com/jeffreyguo/SS-Behat-quicksetup/blob/a5172f3a94dc2b364df5c2758a8a1df4f026168e/src/SilverStripe/BehatExtension/Context/BasicContext.php#L820-L832 |
225,504 | jeffreyguo/SS-Behat-quicksetup | src/SilverStripe/BehatExtension/Context/BasicContext.php | BasicContext.iWaitUntilISee | public function iWaitUntilISee($selector) {
$page = $this->getSession()->getPage();
$this->spin(function($page) use ($page, $selector){
$element = $page->find('css', $selector);
if(empty($element)){
return false;
} else{
return ($elemen... | php | public function iWaitUntilISee($selector) {
$page = $this->getSession()->getPage();
$this->spin(function($page) use ($page, $selector){
$element = $page->find('css', $selector);
if(empty($element)){
return false;
} else{
return ($elemen... | [
"public",
"function",
"iWaitUntilISee",
"(",
"$",
"selector",
")",
"{",
"$",
"page",
"=",
"$",
"this",
"->",
"getSession",
"(",
")",
"->",
"getPage",
"(",
")",
";",
"$",
"this",
"->",
"spin",
"(",
"function",
"(",
"$",
"page",
")",
"use",
"(",
"$",... | Wait until a particular element is visible, using a CSS selector. Useful for content loaded via AJAX, or only
populated after JS execution.
Example: Given I wait until I see the "header .login-form" element
@Given /^I wait until I see the "([^"]*)" element$/ | [
"Wait",
"until",
"a",
"particular",
"element",
"is",
"visible",
"using",
"a",
"CSS",
"selector",
".",
"Useful",
"for",
"content",
"loaded",
"via",
"AJAX",
"or",
"only",
"populated",
"after",
"JS",
"execution",
"."
] | a5172f3a94dc2b364df5c2758a8a1df4f026168e | https://github.com/jeffreyguo/SS-Behat-quicksetup/blob/a5172f3a94dc2b364df5c2758a8a1df4f026168e/src/SilverStripe/BehatExtension/Context/BasicContext.php#L842-L852 |
225,505 | jeffreyguo/SS-Behat-quicksetup | src/SilverStripe/BehatExtension/Context/BasicContext.php | BasicContext.iWaitUntilISeeText | public function iWaitUntilISeeText($text){
$page = $this->getSession()->getPage();
$session = $this->getSession();
$this->spin(function($page) use ($page, $session, $text) {
$element = $page->find(
'xpath',
$session->getSelectorsHandler()->selectorToXp... | php | public function iWaitUntilISeeText($text){
$page = $this->getSession()->getPage();
$session = $this->getSession();
$this->spin(function($page) use ($page, $session, $text) {
$element = $page->find(
'xpath',
$session->getSelectorsHandler()->selectorToXp... | [
"public",
"function",
"iWaitUntilISeeText",
"(",
"$",
"text",
")",
"{",
"$",
"page",
"=",
"$",
"this",
"->",
"getSession",
"(",
")",
"->",
"getPage",
"(",
")",
";",
"$",
"session",
"=",
"$",
"this",
"->",
"getSession",
"(",
")",
";",
"$",
"this",
"... | Wait until a particular string is found on the page. Useful for content loaded via AJAX, or only populated after
JS execution.
Example: Given I wait until I see the text "Welcome back, John!"
@Given /^I wait until I see the text "([^"]*)"$/ | [
"Wait",
"until",
"a",
"particular",
"string",
"is",
"found",
"on",
"the",
"page",
".",
"Useful",
"for",
"content",
"loaded",
"via",
"AJAX",
"or",
"only",
"populated",
"after",
"JS",
"execution",
"."
] | a5172f3a94dc2b364df5c2758a8a1df4f026168e | https://github.com/jeffreyguo/SS-Behat-quicksetup/blob/a5172f3a94dc2b364df5c2758a8a1df4f026168e/src/SilverStripe/BehatExtension/Context/BasicContext.php#L862-L877 |
225,506 | jeffreyguo/SS-Behat-quicksetup | src/SilverStripe/BehatExtension/Context/BasicContext.php | BasicContext.iScrollToField | public function iScrollToField($locator, $type) {
$page = $this->getSession()->getPage();
$el = $page->find('named', array($type, "'$locator'"));
assertNotNull($el, sprintf('%s element not found', $locator));
$id = $el->getAttribute('id');
if(empty($id)) {
throw new \InvalidArgumentExcep... | php | public function iScrollToField($locator, $type) {
$page = $this->getSession()->getPage();
$el = $page->find('named', array($type, "'$locator'"));
assertNotNull($el, sprintf('%s element not found', $locator));
$id = $el->getAttribute('id');
if(empty($id)) {
throw new \InvalidArgumentExcep... | [
"public",
"function",
"iScrollToField",
"(",
"$",
"locator",
",",
"$",
"type",
")",
"{",
"$",
"page",
"=",
"$",
"this",
"->",
"getSession",
"(",
")",
"->",
"getPage",
"(",
")",
";",
"$",
"el",
"=",
"$",
"page",
"->",
"find",
"(",
"'named'",
",",
... | Scroll to a certain element by label.
Requires an "id" attribute to uniquely identify the element in the document.
Example: Given I scroll to the "Submit" button
Example: Given I scroll to the "My Date" field
@Given /^I scroll to the "([^"]*)" (field|link|button)$/ | [
"Scroll",
"to",
"a",
"certain",
"element",
"by",
"label",
".",
"Requires",
"an",
"id",
"attribute",
"to",
"uniquely",
"identify",
"the",
"element",
"in",
"the",
"document",
"."
] | a5172f3a94dc2b364df5c2758a8a1df4f026168e | https://github.com/jeffreyguo/SS-Behat-quicksetup/blob/a5172f3a94dc2b364df5c2758a8a1df4f026168e/src/SilverStripe/BehatExtension/Context/BasicContext.php#L903-L915 |
225,507 | jeffreyguo/SS-Behat-quicksetup | src/SilverStripe/BehatExtension/Context/BasicContext.php | BasicContext.iScrollToElement | public function iScrollToElement($locator) {
$el = $this->getSession()->getPage()->find('css', $locator);
assertNotNull($el, sprintf('The element "%s" is not found', $locator));
$id = $el->getAttribute('id');
if(empty($id)) {
throw new \InvalidArgumentException('Element requires an "id" attribute');
}
... | php | public function iScrollToElement($locator) {
$el = $this->getSession()->getPage()->find('css', $locator);
assertNotNull($el, sprintf('The element "%s" is not found', $locator));
$id = $el->getAttribute('id');
if(empty($id)) {
throw new \InvalidArgumentException('Element requires an "id" attribute');
}
... | [
"public",
"function",
"iScrollToElement",
"(",
"$",
"locator",
")",
"{",
"$",
"el",
"=",
"$",
"this",
"->",
"getSession",
"(",
")",
"->",
"getPage",
"(",
")",
"->",
"find",
"(",
"'css'",
",",
"$",
"locator",
")",
";",
"assertNotNull",
"(",
"$",
"el",... | Scroll to a certain element by CSS selector.
Requires an "id" attribute to uniquely identify the element in the document.
Example: Given I scroll to the ".css_element" element
@Given /^I scroll to the "(?P<locator>(?:[^"]|\\")*)" element$/ | [
"Scroll",
"to",
"a",
"certain",
"element",
"by",
"CSS",
"selector",
".",
"Requires",
"an",
"id",
"attribute",
"to",
"uniquely",
"identify",
"the",
"element",
"in",
"the",
"document",
"."
] | a5172f3a94dc2b364df5c2758a8a1df4f026168e | https://github.com/jeffreyguo/SS-Behat-quicksetup/blob/a5172f3a94dc2b364df5c2758a8a1df4f026168e/src/SilverStripe/BehatExtension/Context/BasicContext.php#L925-L936 |
225,508 | DarvinStudio/DarvinUserBundle | Repository/UserRepository.php | UserRepository.getByRegistrationToken | public function getByRegistrationToken($code)
{
$builder = $this->createQueryBuilder('u');
return $builder
->where('u.registrationConfirmToken.id=:code')
->andWhere($builder->expr()->isNotNull('u.registrationConfirmToken.id'))
->setParameter('code', $code)
... | php | public function getByRegistrationToken($code)
{
$builder = $this->createQueryBuilder('u');
return $builder
->where('u.registrationConfirmToken.id=:code')
->andWhere($builder->expr()->isNotNull('u.registrationConfirmToken.id'))
->setParameter('code', $code)
... | [
"public",
"function",
"getByRegistrationToken",
"(",
"$",
"code",
")",
"{",
"$",
"builder",
"=",
"$",
"this",
"->",
"createQueryBuilder",
"(",
"'u'",
")",
";",
"return",
"$",
"builder",
"->",
"where",
"(",
"'u.registrationConfirmToken.id=:code'",
")",
"->",
"a... | Find user by registration confirmation code
@param $code
@return BaseUser|null | [
"Find",
"user",
"by",
"registration",
"confirmation",
"code"
] | da18cc7348f33ffa212e6646b7ef96a18ab3eff0 | https://github.com/DarvinStudio/DarvinUserBundle/blob/da18cc7348f33ffa212e6646b7ef96a18ab3eff0/Repository/UserRepository.php#L36-L48 |
225,509 | RevisionTen/cqrs | Services/EventStore.php | EventStore.find | public function find(string $uuid, int $max_version = null, int $min_version = null): array
{
return $this->findEventObjects(EventStreamObject::class, $uuid, $max_version, $min_version);
} | php | public function find(string $uuid, int $max_version = null, int $min_version = null): array
{
return $this->findEventObjects(EventStreamObject::class, $uuid, $max_version, $min_version);
} | [
"public",
"function",
"find",
"(",
"string",
"$",
"uuid",
",",
"int",
"$",
"max_version",
"=",
"null",
",",
"int",
"$",
"min_version",
"=",
"null",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"findEventObjects",
"(",
"EventStreamObject",
"::",
"... | Returns Event Stream Objects for a given Uuid.
@param string $uuid
@param int|null $max_version
@param int|null $min_version
@return array | [
"Returns",
"Event",
"Stream",
"Objects",
"for",
"a",
"given",
"Uuid",
"."
] | d94fdd86855a994c4662e24a6c3c08ef586e64f9 | https://github.com/RevisionTen/cqrs/blob/d94fdd86855a994c4662e24a6c3c08ef586e64f9/Services/EventStore.php#L89-L92 |
225,510 | RevisionTen/cqrs | Services/EventStore.php | EventStore.findQeued | public function findQeued(string $uuid, int $max_version = null, int $min_version = null, int $user): array
{
$eventQeueObjects = $this->findEventObjects(EventQeueObject::class, $uuid, $max_version, $min_version, $user);
return array_map(function ($eventQeueObject) {
/* @var EventQeueOb... | php | public function findQeued(string $uuid, int $max_version = null, int $min_version = null, int $user): array
{
$eventQeueObjects = $this->findEventObjects(EventQeueObject::class, $uuid, $max_version, $min_version, $user);
return array_map(function ($eventQeueObject) {
/* @var EventQeueOb... | [
"public",
"function",
"findQeued",
"(",
"string",
"$",
"uuid",
",",
"int",
"$",
"max_version",
"=",
"null",
",",
"int",
"$",
"min_version",
"=",
"null",
",",
"int",
"$",
"user",
")",
":",
"array",
"{",
"$",
"eventQeueObjects",
"=",
"$",
"this",
"->",
... | Returns qeued Event Stream Objects for a given Uuid and User.
@param string $uuid
@param int|null $max_version
@param int|null $min_version
@param int $user
@return array | [
"Returns",
"qeued",
"Event",
"Stream",
"Objects",
"for",
"a",
"given",
"Uuid",
"and",
"User",
"."
] | d94fdd86855a994c4662e24a6c3c08ef586e64f9 | https://github.com/RevisionTen/cqrs/blob/d94fdd86855a994c4662e24a6c3c08ef586e64f9/Services/EventStore.php#L104-L112 |
225,511 | RevisionTen/cqrs | Services/EventStore.php | EventStore.findEventObjects | public function findEventObjects(string $objectClass, string $uuid, int $max_version = null, int $min_version = null, int $user = null): array
{
$criteria = new Criteria();
$criteria->where(Criteria::expr()->eq('uuid', $uuid));
if (null !== $max_version) {
$criteria->andWhere(C... | php | public function findEventObjects(string $objectClass, string $uuid, int $max_version = null, int $min_version = null, int $user = null): array
{
$criteria = new Criteria();
$criteria->where(Criteria::expr()->eq('uuid', $uuid));
if (null !== $max_version) {
$criteria->andWhere(C... | [
"public",
"function",
"findEventObjects",
"(",
"string",
"$",
"objectClass",
",",
"string",
"$",
"uuid",
",",
"int",
"$",
"max_version",
"=",
"null",
",",
"int",
"$",
"min_version",
"=",
"null",
",",
"int",
"$",
"user",
"=",
"null",
")",
":",
"array",
... | Returns Event Objects for a given Uuid.
@param string $objectClass
@param string $uuid
@param int|null $max_version
@param int|null $min_version
@param int|null $user
@return array | [
"Returns",
"Event",
"Objects",
"for",
"a",
"given",
"Uuid",
"."
] | d94fdd86855a994c4662e24a6c3c08ef586e64f9 | https://github.com/RevisionTen/cqrs/blob/d94fdd86855a994c4662e24a6c3c08ef586e64f9/Services/EventStore.php#L125-L148 |
225,512 | RevisionTen/cqrs | Services/EventStore.php | EventStore.save | public function save(): void
{
try {
$this->em->flush();
} catch (OptimisticLockException $e) {
$this->messageBus->dispatch(new Message(
$e->getMessage(),
$e->getCode(),
null,
null,
$e
... | php | public function save(): void
{
try {
$this->em->flush();
} catch (OptimisticLockException $e) {
$this->messageBus->dispatch(new Message(
$e->getMessage(),
$e->getCode(),
null,
null,
$e
... | [
"public",
"function",
"save",
"(",
")",
":",
"void",
"{",
"try",
"{",
"$",
"this",
"->",
"em",
"->",
"flush",
"(",
")",
";",
"}",
"catch",
"(",
"OptimisticLockException",
"$",
"e",
")",
"{",
"$",
"this",
"->",
"messageBus",
"->",
"dispatch",
"(",
"... | Saves the events to the Event Store. | [
"Saves",
"the",
"events",
"to",
"the",
"Event",
"Store",
"."
] | d94fdd86855a994c4662e24a6c3c08ef586e64f9 | https://github.com/RevisionTen/cqrs/blob/d94fdd86855a994c4662e24a6c3c08ef586e64f9/Services/EventStore.php#L217-L238 |
225,513 | DrNixx/yii2-onix | src/collections/TreeNode.php | TreeNode.predecessor | public function predecessor()
{
if ($this->information & 2) {
$node = $this->left;
while ($node->information & 1) {
$node = $node->right;
}
return $node;
} else {
return $this->left;
}
} | php | public function predecessor()
{
if ($this->information & 2) {
$node = $this->left;
while ($node->information & 1) {
$node = $node->right;
}
return $node;
} else {
return $this->left;
}
} | [
"public",
"function",
"predecessor",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"information",
"&",
"2",
")",
"{",
"$",
"node",
"=",
"$",
"this",
"->",
"left",
";",
"while",
"(",
"$",
"node",
"->",
"information",
"&",
"1",
")",
"{",
"$",
"node"... | Get the predecessor
@return TreeNode the predecessor node | [
"Get",
"the",
"predecessor"
] | 0a621ed301dc94971ff71af062b24d6bc0858dd7 | https://github.com/DrNixx/yii2-onix/blob/0a621ed301dc94971ff71af062b24d6bc0858dd7/src/collections/TreeNode.php#L138-L151 |
225,514 | DrNixx/yii2-onix | src/collections/TreeNode.php | TreeNode.successor | public function successor()
{
if ($this->information & 1) {
$node = $this->right;
while ($node->information & 2) {
$node = $node->left;
}
return $node;
} else {
return $this->right;
}
} | php | public function successor()
{
if ($this->information & 1) {
$node = $this->right;
while ($node->information & 2) {
$node = $node->left;
}
return $node;
} else {
return $this->right;
}
} | [
"public",
"function",
"successor",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"information",
"&",
"1",
")",
"{",
"$",
"node",
"=",
"$",
"this",
"->",
"right",
";",
"while",
"(",
"$",
"node",
"->",
"information",
"&",
"2",
")",
"{",
"$",
"node",... | Get the successor
@return TreeNode the successor node | [
"Get",
"the",
"successor"
] | 0a621ed301dc94971ff71af062b24d6bc0858dd7 | https://github.com/DrNixx/yii2-onix/blob/0a621ed301dc94971ff71af062b24d6bc0858dd7/src/collections/TreeNode.php#L157-L170 |
225,515 | DrNixx/yii2-onix | src/collections/TreeNode.php | TreeNode.find | public function find($key, $comparator, $type = 0)
{
$cmp = -1;
$node = $this;
while (true) {
$cmp = $comparator->compare($key, $node->fKey);
if ($cmp < 0 && $node->information & 2) {
$node = $node->left;
} elseif ($cmp > 0 && $node->inform... | php | public function find($key, $comparator, $type = 0)
{
$cmp = -1;
$node = $this;
while (true) {
$cmp = $comparator->compare($key, $node->fKey);
if ($cmp < 0 && $node->information & 2) {
$node = $node->left;
} elseif ($cmp > 0 && $node->inform... | [
"public",
"function",
"find",
"(",
"$",
"key",
",",
"$",
"comparator",
",",
"$",
"type",
"=",
"0",
")",
"{",
"$",
"cmp",
"=",
"-",
"1",
";",
"$",
"node",
"=",
"$",
"this",
";",
"while",
"(",
"true",
")",
"{",
"$",
"cmp",
"=",
"$",
"comparator... | Get the node for a key
@param mixed $key The key
@param ComparatorInterface $comparator The comparator function
@param integer $type The operation type
-2 for the greatest key lesser than the given key
-1 for the greatest key lesser than or equal to the given key
0 for the given key
+1 for the lowest key greater than ... | [
"Get",
"the",
"node",
"for",
"a",
"key"
] | 0a621ed301dc94971ff71af062b24d6bc0858dd7 | https://github.com/DrNixx/yii2-onix/blob/0a621ed301dc94971ff71af062b24d6bc0858dd7/src/collections/TreeNode.php#L204-L244 |
225,516 | DrNixx/yii2-onix | src/collections/TreeNode.php | TreeNode.rotateLeft | private function rotateLeft()
{
$right = $this->right;
if ($right->information & 2) {
$this->right = $right->left;
$right->left = $this;
} else {
$right->information |= 2;
$this->information &= ~ 1;
}
$this->information -= 4;
... | php | private function rotateLeft()
{
$right = $this->right;
if ($right->information & 2) {
$this->right = $right->left;
$right->left = $this;
} else {
$right->information |= 2;
$this->information &= ~ 1;
}
$this->information -= 4;
... | [
"private",
"function",
"rotateLeft",
"(",
")",
"{",
"$",
"right",
"=",
"$",
"this",
"->",
"right",
";",
"if",
"(",
"$",
"right",
"->",
"information",
"&",
"2",
")",
"{",
"$",
"this",
"->",
"right",
"=",
"$",
"right",
"->",
"left",
";",
"$",
"righ... | Rotate the node to the left
@return TreeNode The rotated node | [
"Rotate",
"the",
"node",
"to",
"the",
"left"
] | 0a621ed301dc94971ff71af062b24d6bc0858dd7 | https://github.com/DrNixx/yii2-onix/blob/0a621ed301dc94971ff71af062b24d6bc0858dd7/src/collections/TreeNode.php#L250-L275 |
225,517 | DrNixx/yii2-onix | src/collections/TreeNode.php | TreeNode.rotateRight | private function rotateRight()
{
$left = $this->left;
if ($left->information & 1) {
$this->left = $left->right;
$left->right = $this;
} else {
$this->information &= ~ 2;
$left->information |= 1;
}
$this->information += 4;
... | php | private function rotateRight()
{
$left = $this->left;
if ($left->information & 1) {
$this->left = $left->right;
$left->right = $this;
} else {
$this->information &= ~ 2;
$left->information |= 1;
}
$this->information += 4;
... | [
"private",
"function",
"rotateRight",
"(",
")",
"{",
"$",
"left",
"=",
"$",
"this",
"->",
"left",
";",
"if",
"(",
"$",
"left",
"->",
"information",
"&",
"1",
")",
"{",
"$",
"this",
"->",
"left",
"=",
"$",
"left",
"->",
"right",
";",
"$",
"left",
... | Rotate the node to the right
@return TreeNode The rotated node | [
"Rotate",
"the",
"node",
"to",
"the",
"right"
] | 0a621ed301dc94971ff71af062b24d6bc0858dd7 | https://github.com/DrNixx/yii2-onix/blob/0a621ed301dc94971ff71af062b24d6bc0858dd7/src/collections/TreeNode.php#L282-L307 |
225,518 | DrNixx/yii2-onix | src/collections/TreeNode.php | TreeNode.incBalance | private function incBalance()
{
$this->information += 4;
if ($this->information >= 8) {
if ($this->right->information < 0) {
$this->right = $this->right->rotateRight();
}
return $this->rotateLeft();
}
return $this;
} | php | private function incBalance()
{
$this->information += 4;
if ($this->information >= 8) {
if ($this->right->information < 0) {
$this->right = $this->right->rotateRight();
}
return $this->rotateLeft();
}
return $this;
} | [
"private",
"function",
"incBalance",
"(",
")",
"{",
"$",
"this",
"->",
"information",
"+=",
"4",
";",
"if",
"(",
"$",
"this",
"->",
"information",
">=",
"8",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"right",
"->",
"information",
"<",
"0",
")",
"{",
... | Increment the balance of the node
@return TreeNode $this or a rotated version of $this | [
"Increment",
"the",
"balance",
"of",
"the",
"node"
] | 0a621ed301dc94971ff71af062b24d6bc0858dd7 | https://github.com/DrNixx/yii2-onix/blob/0a621ed301dc94971ff71af062b24d6bc0858dd7/src/collections/TreeNode.php#L314-L327 |
225,519 | DrNixx/yii2-onix | src/collections/TreeNode.php | TreeNode.decBalance | private function decBalance()
{
$this->information -= 4;
if ($this->information < - 4) {
if ($this->left->information >= 4) {
$this->left = $this->left->rotateLeft();
}
return $this->rotateRight();
}
return $this;
} | php | private function decBalance()
{
$this->information -= 4;
if ($this->information < - 4) {
if ($this->left->information >= 4) {
$this->left = $this->left->rotateLeft();
}
return $this->rotateRight();
}
return $this;
} | [
"private",
"function",
"decBalance",
"(",
")",
"{",
"$",
"this",
"->",
"information",
"-=",
"4",
";",
"if",
"(",
"$",
"this",
"->",
"information",
"<",
"-",
"4",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"left",
"->",
"information",
">=",
"4",
")",
... | Decrement the balance of the node
@return TreeNode $this or a rotated version of $this | [
"Decrement",
"the",
"balance",
"of",
"the",
"node"
] | 0a621ed301dc94971ff71af062b24d6bc0858dd7 | https://github.com/DrNixx/yii2-onix/blob/0a621ed301dc94971ff71af062b24d6bc0858dd7/src/collections/TreeNode.php#L334-L347 |
225,520 | DrNixx/yii2-onix | src/collections/TreeNode.php | TreeNode.pullUpLeftMost | private function pullUpLeftMost()
{
if ($this->information & 2) {
$leftBalance = $this->left->information & ~3;
$this->left = $this->left->pullUpLeftMost();
if (!($this->information & 2) || $leftBalance != 0 && ($this->left->information & ~3) == 0) {
retu... | php | private function pullUpLeftMost()
{
if ($this->information & 2) {
$leftBalance = $this->left->information & ~3;
$this->left = $this->left->pullUpLeftMost();
if (!($this->information & 2) || $leftBalance != 0 && ($this->left->information & ~3) == 0) {
retu... | [
"private",
"function",
"pullUpLeftMost",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"information",
"&",
"2",
")",
"{",
"$",
"leftBalance",
"=",
"$",
"this",
"->",
"left",
"->",
"information",
"&",
"~",
"3",
";",
"$",
"this",
"->",
"left",
"=",
"$... | Pull up the left most node of a node
@return TreeNode The new root | [
"Pull",
"up",
"the",
"left",
"most",
"node",
"of",
"a",
"node"
] | 0a621ed301dc94971ff71af062b24d6bc0858dd7 | https://github.com/DrNixx/yii2-onix/blob/0a621ed301dc94971ff71af062b24d6bc0858dd7/src/collections/TreeNode.php#L401-L432 |
225,521 | DrNixx/yii2-onix | src/collections/TreeNode.php | TreeNode.remove | public function remove($key, $comparator)
{
$cmp = $comparator->compare($key, $this->fKey);
if ($cmp < 0) {
if ($this->information & 2) {
$leftBalance = $this->left->information & ~3;
$this->left = $this->left->remove($key, $comparator);
... | php | public function remove($key, $comparator)
{
$cmp = $comparator->compare($key, $this->fKey);
if ($cmp < 0) {
if ($this->information & 2) {
$leftBalance = $this->left->information & ~3;
$this->left = $this->left->remove($key, $comparator);
... | [
"public",
"function",
"remove",
"(",
"$",
"key",
",",
"$",
"comparator",
")",
"{",
"$",
"cmp",
"=",
"$",
"comparator",
"->",
"compare",
"(",
"$",
"key",
",",
"$",
"this",
"->",
"fKey",
")",
";",
"if",
"(",
"$",
"cmp",
"<",
"0",
")",
"{",
"if",
... | Remove a key
@param mixed $key The key
@param ComparatorInterface $comparator The comparator function
@return TreeNode The new root | [
"Remove",
"a",
"key"
] | 0a621ed301dc94971ff71af062b24d6bc0858dd7 | https://github.com/DrNixx/yii2-onix/blob/0a621ed301dc94971ff71af062b24d6bc0858dd7/src/collections/TreeNode.php#L442-L497 |
225,522 | railken/amethyst-data-builder | src/Validators/DataBuilderValidator.php | DataBuilderValidator.raw | public function raw(array $schema, array $data)
{
$errors = new Collection();
if (count($schema) !== 0) {
$validator = IlluminateValidator::make($data, $schema);
foreach ($validator->errors()->getMessages() as $key => $error) {
$errors[] = new Exceptions\Dat... | php | public function raw(array $schema, array $data)
{
$errors = new Collection();
if (count($schema) !== 0) {
$validator = IlluminateValidator::make($data, $schema);
foreach ($validator->errors()->getMessages() as $key => $error) {
$errors[] = new Exceptions\Dat... | [
"public",
"function",
"raw",
"(",
"array",
"$",
"schema",
",",
"array",
"$",
"data",
")",
"{",
"$",
"errors",
"=",
"new",
"Collection",
"(",
")",
";",
"if",
"(",
"count",
"(",
"$",
"schema",
")",
"!==",
"0",
")",
"{",
"$",
"validator",
"=",
"Illu... | Validate input submitted.
@param array $schema
@param array $data
@return \Illuminate\Support\Collection | [
"Validate",
"input",
"submitted",
"."
] | 55334227b6b7f14cf755b02e7cd36a11db00f454 | https://github.com/railken/amethyst-data-builder/blob/55334227b6b7f14cf755b02e7cd36a11db00f454/src/Validators/DataBuilderValidator.php#L20-L33 |
225,523 | php-toolkit/str-utils | src/UUID.php | UUID.mintName | protected static function mintName($ver, $node, $ns): string
{
if (empty($node)) {
throw new \InvalidArgumentException('A name-string is required for Version 3 or 5 UUIDs.');
}
// if the namespace UUID isn't binary, make it so
$ns = static::makeBin($ns, 16);
if (... | php | protected static function mintName($ver, $node, $ns): string
{
if (empty($node)) {
throw new \InvalidArgumentException('A name-string is required for Version 3 or 5 UUIDs.');
}
// if the namespace UUID isn't binary, make it so
$ns = static::makeBin($ns, 16);
if (... | [
"protected",
"static",
"function",
"mintName",
"(",
"$",
"ver",
",",
"$",
"node",
",",
"$",
"ns",
")",
":",
"string",
"{",
"if",
"(",
"empty",
"(",
"$",
"node",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'A name-string is requ... | Generates a Version 3 or Version 5 UUID.
These are derived from a hash of a name and its namespace, in binary form.
@param int $ver
@param string $node
@param string|null $ns
@return string
@throws \InvalidArgumentException | [
"Generates",
"a",
"Version",
"3",
"or",
"Version",
"5",
"UUID",
".",
"These",
"are",
"derived",
"from",
"a",
"hash",
"of",
"a",
"name",
"and",
"its",
"namespace",
"in",
"binary",
"form",
"."
] | 2e0b081c7c86e4fb92d1dca63bd8c0449cb6b278 | https://github.com/php-toolkit/str-utils/blob/2e0b081c7c86e4fb92d1dca63bd8c0449cb6b278/src/UUID.php#L268-L302 |
225,524 | php-toolkit/str-utils | src/UUID.php | UUID.mintRand | protected static function mintRand(): string
{
$uuid = static::randomBytes(16);
// set variant
$uuid[8] = \chr(\ord($uuid[8]) & static::CLEAR_VAR | static::VAR_RFC);
// set version
$uuid[6] = \chr(\ord($uuid[6]) & static::CLEAR_VER | static::VERSION_4);
return $uuid;... | php | protected static function mintRand(): string
{
$uuid = static::randomBytes(16);
// set variant
$uuid[8] = \chr(\ord($uuid[8]) & static::CLEAR_VAR | static::VAR_RFC);
// set version
$uuid[6] = \chr(\ord($uuid[6]) & static::CLEAR_VER | static::VERSION_4);
return $uuid;... | [
"protected",
"static",
"function",
"mintRand",
"(",
")",
":",
"string",
"{",
"$",
"uuid",
"=",
"static",
"::",
"randomBytes",
"(",
"16",
")",
";",
"// set variant",
"$",
"uuid",
"[",
"8",
"]",
"=",
"\\",
"chr",
"(",
"\\",
"ord",
"(",
"$",
"uuid",
"... | Generate a Version 4 UUID.
These are derived solely from random numbers.
generate random fields
@return string
@throws \Exception | [
"Generate",
"a",
"Version",
"4",
"UUID",
".",
"These",
"are",
"derived",
"solely",
"from",
"random",
"numbers",
".",
"generate",
"random",
"fields"
] | 2e0b081c7c86e4fb92d1dca63bd8c0449cb6b278 | https://github.com/php-toolkit/str-utils/blob/2e0b081c7c86e4fb92d1dca63bd8c0449cb6b278/src/UUID.php#L312-L321 |
225,525 | php-toolkit/str-utils | src/UUID.php | UUID.compare | public static function compare(string $a, string $b): string
{
return static::makeBin($a, 16) === static::makeBin($b, 16);
} | php | public static function compare(string $a, string $b): string
{
return static::makeBin($a, 16) === static::makeBin($b, 16);
} | [
"public",
"static",
"function",
"compare",
"(",
"string",
"$",
"a",
",",
"string",
"$",
"b",
")",
":",
"string",
"{",
"return",
"static",
"::",
"makeBin",
"(",
"$",
"a",
",",
"16",
")",
"===",
"static",
"::",
"makeBin",
"(",
"$",
"b",
",",
"16",
... | Compares the binary representations of two UUIDs.
The comparison will return true if they are bit-exact,
or if neither is valid.
@param string $a
@param string $b
@return string|string | [
"Compares",
"the",
"binary",
"representations",
"of",
"two",
"UUIDs",
".",
"The",
"comparison",
"will",
"return",
"true",
"if",
"they",
"are",
"bit",
"-",
"exact",
"or",
"if",
"neither",
"is",
"valid",
"."
] | 2e0b081c7c86e4fb92d1dca63bd8c0449cb6b278 | https://github.com/php-toolkit/str-utils/blob/2e0b081c7c86e4fb92d1dca63bd8c0449cb6b278/src/UUID.php#L344-L347 |
225,526 | php-toolkit/str-utils | src/UUID.php | UUID.validate | public static function validate(string $uuid): bool
{
return (boolean)\preg_match('~' . static::VALID_UUID_REGEX . '~', static::import($uuid)->string);
} | php | public static function validate(string $uuid): bool
{
return (boolean)\preg_match('~' . static::VALID_UUID_REGEX . '~', static::import($uuid)->string);
} | [
"public",
"static",
"function",
"validate",
"(",
"string",
"$",
"uuid",
")",
":",
"bool",
"{",
"return",
"(",
"boolean",
")",
"\\",
"preg_match",
"(",
"'~'",
".",
"static",
"::",
"VALID_UUID_REGEX",
".",
"'~'",
",",
"static",
"::",
"import",
"(",
"$",
... | Import and validate an UUID
@param Uuid|string $uuid
@return boolean
@throws \InvalidArgumentException | [
"Import",
"and",
"validate",
"an",
"UUID"
] | 2e0b081c7c86e4fb92d1dca63bd8c0449cb6b278 | https://github.com/php-toolkit/str-utils/blob/2e0b081c7c86e4fb92d1dca63bd8c0449cb6b278/src/UUID.php#L356-L359 |
225,527 | sopinetchat/SopinetChatBundle | Listener/WebClientEventListener.php | WebClientEventListener.onServerStart | public function onServerStart(ServerEvent $event)
{
$event = $event->getEventLoop();
// Cuando el servidor se inicie querrá decir que, previamente, estaba parado, por tanto
// debemos eliminar todos los Clientes Web que tuviésemos almacenados.
// Eliminar Device WebClient
$... | php | public function onServerStart(ServerEvent $event)
{
$event = $event->getEventLoop();
// Cuando el servidor se inicie querrá decir que, previamente, estaba parado, por tanto
// debemos eliminar todos los Clientes Web que tuviésemos almacenados.
// Eliminar Device WebClient
$... | [
"public",
"function",
"onServerStart",
"(",
"ServerEvent",
"$",
"event",
")",
"{",
"$",
"event",
"=",
"$",
"event",
"->",
"getEventLoop",
"(",
")",
";",
"// Cuando el servidor se inicie querrá decir que, previamente, estaba parado, por tanto",
"// debemos eliminar todos los C... | Called whenever server start
@param ServentEvent $event | [
"Called",
"whenever",
"server",
"start"
] | 92c306963d8e9c74ecaa06422cea65bcf1bb3ba2 | https://github.com/sopinetchat/SopinetChatBundle/blob/92c306963d8e9c74ecaa06422cea65bcf1bb3ba2/Listener/WebClientEventListener.php#L73-L93 |
225,528 | cmsgears/module-forms | common/models/entities/FormSubmit.php | FormSubmit.getFieldsMap | public function getFieldsMap() {
$formFields = $this->fields;
$formFieldsMap = array();
foreach ( $formFields as $formField ) {
$formFieldsMap[ $formField->name ] = $formField;
}
return $formFieldsMap;
} | php | public function getFieldsMap() {
$formFields = $this->fields;
$formFieldsMap = array();
foreach ( $formFields as $formField ) {
$formFieldsMap[ $formField->name ] = $formField;
}
return $formFieldsMap;
} | [
"public",
"function",
"getFieldsMap",
"(",
")",
"{",
"$",
"formFields",
"=",
"$",
"this",
"->",
"fields",
";",
"$",
"formFieldsMap",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"formFields",
"as",
"$",
"formField",
")",
"{",
"$",
"formFieldsMap",
... | Generate and return the map of form submit fields.
@return array | [
"Generate",
"and",
"return",
"the",
"map",
"of",
"form",
"submit",
"fields",
"."
] | 84cbb26e8ecb945410bb2604b84440d5ed841308 | https://github.com/cmsgears/module-forms/blob/84cbb26e8ecb945410bb2604b84440d5ed841308/common/models/entities/FormSubmit.php#L154-L165 |
225,529 | Innmind/Filesystem | src/Adapter/FilesystemAdapter.php | FilesystemAdapter.createFileAt | private function createFileAt(string $path, File $file)
{
if ($file instanceof Directory) {
$folder = $path.'/'.(string) $file->name();
if (
$this->files->contains($folder) &&
$this->files->get($folder) === $file
) {
return... | php | private function createFileAt(string $path, File $file)
{
if ($file instanceof Directory) {
$folder = $path.'/'.(string) $file->name();
if (
$this->files->contains($folder) &&
$this->files->get($folder) === $file
) {
return... | [
"private",
"function",
"createFileAt",
"(",
"string",
"$",
"path",
",",
"File",
"$",
"file",
")",
"{",
"if",
"(",
"$",
"file",
"instanceof",
"Directory",
")",
"{",
"$",
"folder",
"=",
"$",
"path",
".",
"'/'",
".",
"(",
"string",
")",
"$",
"file",
"... | Create the wished file at the given absolute path
@param string $path
@param File $file
@return void | [
"Create",
"the",
"wished",
"file",
"at",
"the",
"given",
"absolute",
"path"
] | 21700d8424bc88e99fd5c612c5316613e4c45a3b | https://github.com/Innmind/Filesystem/blob/21700d8424bc88e99fd5c612c5316613e4c45a3b/src/Adapter/FilesystemAdapter.php#L122-L178 |
225,530 | Innmind/Filesystem | src/Adapter/FilesystemAdapter.php | FilesystemAdapter.open | private function open(string $folder, string $file): File
{
$path = $folder.'/'.$file;
if (is_dir($path)) {
$object = new Directory\Directory(
$file,
(function($folder) {
$handle = opendir($folder);
while (($name =... | php | private function open(string $folder, string $file): File
{
$path = $folder.'/'.$file;
if (is_dir($path)) {
$object = new Directory\Directory(
$file,
(function($folder) {
$handle = opendir($folder);
while (($name =... | [
"private",
"function",
"open",
"(",
"string",
"$",
"folder",
",",
"string",
"$",
"file",
")",
":",
"File",
"{",
"$",
"path",
"=",
"$",
"folder",
".",
"'/'",
".",
"$",
"file",
";",
"if",
"(",
"is_dir",
"(",
"$",
"path",
")",
")",
"{",
"$",
"obje... | Open the file in the given folder
@param string $folder
@param string $file
@return File | [
"Open",
"the",
"file",
"in",
"the",
"given",
"folder"
] | 21700d8424bc88e99fd5c612c5316613e4c45a3b | https://github.com/Innmind/Filesystem/blob/21700d8424bc88e99fd5c612c5316613e4c45a3b/src/Adapter/FilesystemAdapter.php#L188-L226 |
225,531 | SetBased/php-abc-form-louver | src/Control/LouverControl.php | LouverControl.getHtml | public function getHtml(): string
{
$this->prepareOverviewTable();
if (!empty($this->templateData))
{
$this->setAttrData('slat-name', $this->submitName);
// If required add template row to this louver control. This row will be used by JS for adding dynamically
// additional rows to the... | php | public function getHtml(): string
{
$this->prepareOverviewTable();
if (!empty($this->templateData))
{
$this->setAttrData('slat-name', $this->submitName);
// If required add template row to this louver control. This row will be used by JS for adding dynamically
// additional rows to the... | [
"public",
"function",
"getHtml",
"(",
")",
":",
"string",
"{",
"$",
"this",
"->",
"prepareOverviewTable",
"(",
")",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"this",
"->",
"templateData",
")",
")",
"{",
"$",
"this",
"->",
"setAttrData",
"(",
"'slat-name'... | Returns the HTML code of displaying the form controls of this complex form control in a table.
@return string | [
"Returns",
"the",
"HTML",
"code",
"of",
"displaying",
"the",
"form",
"controls",
"of",
"this",
"complex",
"form",
"control",
"in",
"a",
"table",
"."
] | 59ff07a59da4ba90ef9665a8893559cd66d37233 | https://github.com/SetBased/php-abc-form-louver/blob/59ff07a59da4ba90ef9665a8893559cd66d37233/src/Control/LouverControl.php#L67-L120 |
225,532 | SetBased/php-abc-form-louver | src/Control/LouverControl.php | LouverControl.setFooterControl | public function setFooterControl(Control $control): void
{
$this->footerControl = $control;
$this->addFormControl($control);
} | php | public function setFooterControl(Control $control): void
{
$this->footerControl = $control;
$this->addFormControl($control);
} | [
"public",
"function",
"setFooterControl",
"(",
"Control",
"$",
"control",
")",
":",
"void",
"{",
"$",
"this",
"->",
"footerControl",
"=",
"$",
"control",
";",
"$",
"this",
"->",
"addFormControl",
"(",
"$",
"control",
")",
";",
"}"
] | Sets the footer form control of this table form control.
@param Control $control | [
"Sets",
"the",
"footer",
"form",
"control",
"of",
"this",
"table",
"form",
"control",
"."
] | 59ff07a59da4ba90ef9665a8893559cd66d37233 | https://github.com/SetBased/php-abc-form-louver/blob/59ff07a59da4ba90ef9665a8893559cd66d37233/src/Control/LouverControl.php#L181-L185 |
225,533 | SetBased/php-abc-form-louver | src/Control/LouverControl.php | LouverControl.setTemplate | public function setTemplate(array $data, string $key): void
{
$this->templateData = $data;
$this->templateKey = $key;
} | php | public function setTemplate(array $data, string $key): void
{
$this->templateData = $data;
$this->templateKey = $key;
} | [
"public",
"function",
"setTemplate",
"(",
"array",
"$",
"data",
",",
"string",
"$",
"key",
")",
":",
"void",
"{",
"$",
"this",
"->",
"templateData",
"=",
"$",
"data",
";",
"$",
"this",
"->",
"templateKey",
"=",
"$",
"key",
";",
"}"
] | Sets the template data and key of the key for dynamically adding additional rows to form.
@param array $data The data for initializing template row(s).
@param string $key The key of the key in the template row. | [
"Sets",
"the",
"template",
"data",
"and",
"key",
"of",
"the",
"key",
"for",
"dynamically",
"adding",
"additional",
"rows",
"to",
"form",
"."
] | 59ff07a59da4ba90ef9665a8893559cd66d37233 | https://github.com/SetBased/php-abc-form-louver/blob/59ff07a59da4ba90ef9665a8893559cd66d37233/src/Control/LouverControl.php#L205-L209 |
225,534 | SetBased/php-abc-form-louver | src/Control/LouverControl.php | LouverControl.getHtmlBody | protected function getHtmlBody(): string
{
$ret = '';
$i = 0;
foreach ($this->controls as $control)
{
if ($control!==$this->footerControl)
{
$control->addClass(OverviewTable::$class);
$control->addClass(($i % 2==0) ? 'even' : 'odd');
$ret .= $control->getHtml();
... | php | protected function getHtmlBody(): string
{
$ret = '';
$i = 0;
foreach ($this->controls as $control)
{
if ($control!==$this->footerControl)
{
$control->addClass(OverviewTable::$class);
$control->addClass(($i % 2==0) ? 'even' : 'odd');
$ret .= $control->getHtml();
... | [
"protected",
"function",
"getHtmlBody",
"(",
")",
":",
"string",
"{",
"$",
"ret",
"=",
"''",
";",
"$",
"i",
"=",
"0",
";",
"foreach",
"(",
"$",
"this",
"->",
"controls",
"as",
"$",
"control",
")",
"{",
"if",
"(",
"$",
"control",
"!==",
"$",
"this... | Returns the inner HTML code of the tbody element of this table form control.
@return string | [
"Returns",
"the",
"inner",
"HTML",
"code",
"of",
"the",
"tbody",
"element",
"of",
"this",
"table",
"form",
"control",
"."
] | 59ff07a59da4ba90ef9665a8893559cd66d37233 | https://github.com/SetBased/php-abc-form-louver/blob/59ff07a59da4ba90ef9665a8893559cd66d37233/src/Control/LouverControl.php#L217-L235 |
225,535 | SetBased/php-abc-form-louver | src/Control/LouverControl.php | LouverControl.prepareOverviewTable | private function prepareOverviewTable(): void
{
$this->addClass(OverviewTable::$class);
if (OverviewTable::$responsiveMediaQuery!==null && $this->getAttribute('id')===null)
{
$this->setAttrId(Html::getAutoId());
}
} | php | private function prepareOverviewTable(): void
{
$this->addClass(OverviewTable::$class);
if (OverviewTable::$responsiveMediaQuery!==null && $this->getAttribute('id')===null)
{
$this->setAttrId(Html::getAutoId());
}
} | [
"private",
"function",
"prepareOverviewTable",
"(",
")",
":",
"void",
"{",
"$",
"this",
"->",
"addClass",
"(",
"OverviewTable",
"::",
"$",
"class",
")",
";",
"if",
"(",
"OverviewTable",
"::",
"$",
"responsiveMediaQuery",
"!==",
"null",
"&&",
"$",
"this",
"... | Prepares the Overview table part for generation HTML code. | [
"Prepares",
"the",
"Overview",
"table",
"part",
"for",
"generation",
"HTML",
"code",
"."
] | 59ff07a59da4ba90ef9665a8893559cd66d37233 | https://github.com/SetBased/php-abc-form-louver/blob/59ff07a59da4ba90ef9665a8893559cd66d37233/src/Control/LouverControl.php#L251-L259 |
225,536 | Eve-PHP/Framework | src/Dispatcher.php | Dispatcher.run | public function run($queue = 'queue')
{
// notify its up
echo ' * Worker online. waiting for tasks.', "\n";
// define job
$callback = function($message) {
// notify once a task is received
echo " * a task is received", "\n";
// get the data
... | php | public function run($queue = 'queue')
{
// notify its up
echo ' * Worker online. waiting for tasks.', "\n";
// define job
$callback = function($message) {
// notify once a task is received
echo " * a task is received", "\n";
// get the data
... | [
"public",
"function",
"run",
"(",
"$",
"queue",
"=",
"'queue'",
")",
"{",
"// notify its up",
"echo",
"' * Worker online. waiting for tasks.'",
",",
"\"\\n\"",
";",
"// define job",
"$",
"callback",
"=",
"function",
"(",
"$",
"message",
")",
"{",
"// notify once a... | Run the jobs
@return void | [
"Run",
"the",
"jobs"
] | cd4ca9472c6c46034bde402bf20bf2f86657c608 | https://github.com/Eve-PHP/Framework/blob/cd4ca9472c6c46034bde402bf20bf2f86657c608/src/Dispatcher.php#L27-L110 |
225,537 | railken/amethyst-api | src/Api/Http/Controllers/RestController.php | RestController.getResourceName | public function getResourceName()
{
return $this->name !== null ? $this->name : str_replace('_', '-', (new Inflector())->tableize($this->getManager()->getName()));
} | php | public function getResourceName()
{
return $this->name !== null ? $this->name : str_replace('_', '-', (new Inflector())->tableize($this->getManager()->getName()));
} | [
"public",
"function",
"getResourceName",
"(",
")",
"{",
"return",
"$",
"this",
"->",
"name",
"!==",
"null",
"?",
"$",
"this",
"->",
"name",
":",
"str_replace",
"(",
"'_'",
",",
"'-'",
",",
"(",
"new",
"Inflector",
"(",
")",
")",
"->",
"tableize",
"("... | Retrieve resource name.
@return string | [
"Retrieve",
"resource",
"name",
"."
] | 00b78540b05dac59e6ef9367f1c37623a5754b89 | https://github.com/railken/amethyst-api/blob/00b78540b05dac59e6ef9367f1c37623a5754b89/src/Api/Http/Controllers/RestController.php#L50-L53 |
225,538 | railken/amethyst-api | src/Api/Http/Controllers/RestController.php | RestController.parseKey | public function parseKey($key)
{
$keys = explode('.', $key);
if (count($keys) === 1) {
$keys = [$this->getManager()->getRepository()->newEntity()->getTable(), $keys[0]];
}
return DB::raw('`'.implode('.', array_slice($keys, 0, -1)).'`.'.$keys[count($keys) - 1]);
} | php | public function parseKey($key)
{
$keys = explode('.', $key);
if (count($keys) === 1) {
$keys = [$this->getManager()->getRepository()->newEntity()->getTable(), $keys[0]];
}
return DB::raw('`'.implode('.', array_slice($keys, 0, -1)).'`.'.$keys[count($keys) - 1]);
} | [
"public",
"function",
"parseKey",
"(",
"$",
"key",
")",
"{",
"$",
"keys",
"=",
"explode",
"(",
"'.'",
",",
"$",
"key",
")",
";",
"if",
"(",
"count",
"(",
"$",
"keys",
")",
"===",
"1",
")",
"{",
"$",
"keys",
"=",
"[",
"$",
"this",
"->",
"getMa... | Parse the key before using it in the query.
@param string $key
@return string | [
"Parse",
"the",
"key",
"before",
"using",
"it",
"in",
"the",
"query",
"."
] | 00b78540b05dac59e6ef9367f1c37623a5754b89 | https://github.com/railken/amethyst-api/blob/00b78540b05dac59e6ef9367f1c37623a5754b89/src/Api/Http/Controllers/RestController.php#L72-L81 |
225,539 | railken/amethyst-api | src/Api/Http/Controllers/RestController.php | RestController.getFractalTransformer | public function getFractalTransformer(EntityContract $entity = null, Request $request): TransformerAbstract
{
$classTransformer = $this->transformerClass;
return new $classTransformer($this->getManager(), $request);
} | php | public function getFractalTransformer(EntityContract $entity = null, Request $request): TransformerAbstract
{
$classTransformer = $this->transformerClass;
return new $classTransformer($this->getManager(), $request);
} | [
"public",
"function",
"getFractalTransformer",
"(",
"EntityContract",
"$",
"entity",
"=",
"null",
",",
"Request",
"$",
"request",
")",
":",
"TransformerAbstract",
"{",
"$",
"classTransformer",
"=",
"$",
"this",
"->",
"transformerClass",
";",
"return",
"new",
"$"... | Create a new instance of fractal transformer.
@param \Railken\Lem\Contracts\EntityContract $entity
@param \Illuminate\Http\Request $request
@return TransformerAbstract | [
"Create",
"a",
"new",
"instance",
"of",
"fractal",
"transformer",
"."
] | 00b78540b05dac59e6ef9367f1c37623a5754b89 | https://github.com/railken/amethyst-api/blob/00b78540b05dac59e6ef9367f1c37623a5754b89/src/Api/Http/Controllers/RestController.php#L101-L106 |
225,540 | railken/amethyst-api | src/Api/Http/Controllers/RestController.php | RestController.getResourceBaseUrl | public function getResourceBaseUrl(Request $request): string
{
return $request->getSchemeAndHttpHost().Config::get('amethyst.api.http.'.explode('.', Route::getCurrentRoute()->getName())[0].'.router.prefix');
} | php | public function getResourceBaseUrl(Request $request): string
{
return $request->getSchemeAndHttpHost().Config::get('amethyst.api.http.'.explode('.', Route::getCurrentRoute()->getName())[0].'.router.prefix');
} | [
"public",
"function",
"getResourceBaseUrl",
"(",
"Request",
"$",
"request",
")",
":",
"string",
"{",
"return",
"$",
"request",
"->",
"getSchemeAndHttpHost",
"(",
")",
".",
"Config",
"::",
"get",
"(",
"'amethyst.api.http.'",
".",
"explode",
"(",
"'.'",
",",
"... | Retrieve url base.
@param \Illuminate\Http\Request $request
@return string | [
"Retrieve",
"url",
"base",
"."
] | 00b78540b05dac59e6ef9367f1c37623a5754b89 | https://github.com/railken/amethyst-api/blob/00b78540b05dac59e6ef9367f1c37623a5754b89/src/Api/Http/Controllers/RestController.php#L115-L118 |
225,541 | railken/amethyst-api | src/Api/Http/Controllers/RestController.php | RestController.getFractalManager | public function getFractalManager(Request $request)
{
$manager = new Fractal\Manager();
$manager->setSerializer(new JsonApiSerializer($this->getResourceBaseUrl($request)));
if ($request->input('include') !== null) {
$manager->parseIncludes($request->input('include'));
}
... | php | public function getFractalManager(Request $request)
{
$manager = new Fractal\Manager();
$manager->setSerializer(new JsonApiSerializer($this->getResourceBaseUrl($request)));
if ($request->input('include') !== null) {
$manager->parseIncludes($request->input('include'));
}
... | [
"public",
"function",
"getFractalManager",
"(",
"Request",
"$",
"request",
")",
"{",
"$",
"manager",
"=",
"new",
"Fractal",
"\\",
"Manager",
"(",
")",
";",
"$",
"manager",
"->",
"setSerializer",
"(",
"new",
"JsonApiSerializer",
"(",
"$",
"this",
"->",
"get... | Retrieve fractal manager.
@param \Illuminate\Http\Request $request
@return Fractal\Manager; | [
"Retrieve",
"fractal",
"manager",
"."
] | 00b78540b05dac59e6ef9367f1c37623a5754b89 | https://github.com/railken/amethyst-api/blob/00b78540b05dac59e6ef9367f1c37623a5754b89/src/Api/Http/Controllers/RestController.php#L127-L137 |
225,542 | swayok/peskyorm-laravel | src/PeskyORMLaravel/Db/Column/Utils/ImageModificationConfig.php | ImageModificationConfig.setVerticalAlign | public function setVerticalAlign($verticalAlign) {
if (!in_array($verticalAlign, [static::TOP, static::CENTER, static::BOTTOM], true)) {
throw new \InvalidArgumentException(
'$verticalAlign argument must be one of: ImagesGroupConfig::TOP, ImagesGroupConfig::CENTER, ImagesGroupConfig:... | php | public function setVerticalAlign($verticalAlign) {
if (!in_array($verticalAlign, [static::TOP, static::CENTER, static::BOTTOM], true)) {
throw new \InvalidArgumentException(
'$verticalAlign argument must be one of: ImagesGroupConfig::TOP, ImagesGroupConfig::CENTER, ImagesGroupConfig:... | [
"public",
"function",
"setVerticalAlign",
"(",
"$",
"verticalAlign",
")",
"{",
"if",
"(",
"!",
"in_array",
"(",
"$",
"verticalAlign",
",",
"[",
"static",
"::",
"TOP",
",",
"static",
"::",
"CENTER",
",",
"static",
"::",
"BOTTOM",
"]",
",",
"true",
")",
... | Set vertical align for images with fit mode CONTAIN and COVER
@param int $verticalAlign
@return $this
@throws \InvalidArgumentException | [
"Set",
"vertical",
"align",
"for",
"images",
"with",
"fit",
"mode",
"CONTAIN",
"and",
"COVER"
] | ae5a285790eade3435f9fcbb6c376b755a5c3956 | https://github.com/swayok/peskyorm-laravel/blob/ae5a285790eade3435f9fcbb6c376b755a5c3956/src/PeskyORMLaravel/Db/Column/Utils/ImageModificationConfig.php#L177-L185 |
225,543 | swayok/peskyorm-laravel | src/PeskyORMLaravel/Db/Column/Utils/ImageModificationConfig.php | ImageModificationConfig.setImageType | public function setImageType($mimeType) {
if (!in_array($mimeType, [self::SAME_AS_ORIGINAL, self::GIF, self::PNG, self::JPEG, self::SVG], true)) {
throw new \InvalidArgumentException("\$mimeType '{$mimeType}' is not supported");
}
$this->alterImageType = $mimeType;
return $th... | php | public function setImageType($mimeType) {
if (!in_array($mimeType, [self::SAME_AS_ORIGINAL, self::GIF, self::PNG, self::JPEG, self::SVG], true)) {
throw new \InvalidArgumentException("\$mimeType '{$mimeType}' is not supported");
}
$this->alterImageType = $mimeType;
return $th... | [
"public",
"function",
"setImageType",
"(",
"$",
"mimeType",
")",
"{",
"if",
"(",
"!",
"in_array",
"(",
"$",
"mimeType",
",",
"[",
"self",
"::",
"SAME_AS_ORIGINAL",
",",
"self",
"::",
"GIF",
",",
"self",
"::",
"PNG",
",",
"self",
"::",
"JPEG",
",",
"s... | Change image type
@param $mimeType - ImageModificationConfig::SAME_AS_ORIGINAL, ImageModificationConfig::PNG,
ImageModificationConfig::JPEG, ImageModificationConfig::GIF, ImageModificationConfig::SVG
@return ImageModificationConfig
@throws \InvalidArgumentException | [
"Change",
"image",
"type"
] | ae5a285790eade3435f9fcbb6c376b755a5c3956 | https://github.com/swayok/peskyorm-laravel/blob/ae5a285790eade3435f9fcbb6c376b755a5c3956/src/PeskyORMLaravel/Db/Column/Utils/ImageModificationConfig.php#L265-L271 |
225,544 | stubbles/stubbles-input | src/main/php/errors/messages/PropertyBasedParamErrorMessages.php | PropertyBasedParamErrorMessages.messagesFor | public function messagesFor(ParamError $error): array
{
return $error->fillMessages($this->properties()->section($error->id()));
} | php | public function messagesFor(ParamError $error): array
{
return $error->fillMessages($this->properties()->section($error->id()));
} | [
"public",
"function",
"messagesFor",
"(",
"ParamError",
"$",
"error",
")",
":",
"array",
"{",
"return",
"$",
"error",
"->",
"fillMessages",
"(",
"$",
"this",
"->",
"properties",
"(",
")",
"->",
"section",
"(",
"$",
"error",
"->",
"id",
"(",
")",
")",
... | creates a list of message for given param error
@param \stubbles\input\errors\ParamError $error
@return \stubbles\input\errors\messages\LocalizedMessage[] | [
"creates",
"a",
"list",
"of",
"message",
"for",
"given",
"param",
"error"
] | 1ce0ebe5ba392faf3cc369a95e3fe0fa38912b1e | https://github.com/stubbles/stubbles-input/blob/1ce0ebe5ba392faf3cc369a95e3fe0fa38912b1e/src/main/php/errors/messages/PropertyBasedParamErrorMessages.php#L77-L80 |
225,545 | stubbles/stubbles-input | src/main/php/errors/messages/PropertyBasedParamErrorMessages.php | PropertyBasedParamErrorMessages.messageFor | public function messageFor(ParamError $error, string $locale = null): LocalizedMessage
{
$usedLocale = $this->selectLocale($error->id(), $locale);
return $error->fillMessage(
$this->properties()->value($error->id(), $usedLocale, ''),
$usedLocale
);
} | php | public function messageFor(ParamError $error, string $locale = null): LocalizedMessage
{
$usedLocale = $this->selectLocale($error->id(), $locale);
return $error->fillMessage(
$this->properties()->value($error->id(), $usedLocale, ''),
$usedLocale
);
} | [
"public",
"function",
"messageFor",
"(",
"ParamError",
"$",
"error",
",",
"string",
"$",
"locale",
"=",
"null",
")",
":",
"LocalizedMessage",
"{",
"$",
"usedLocale",
"=",
"$",
"this",
"->",
"selectLocale",
"(",
"$",
"error",
"->",
"id",
"(",
")",
",",
... | creates message for given param error in given locale
If no locale is given the method falls back to a default locale.
@param \stubbles\input\errors\ParamError $error
@param string $locale
@return \stubbles\input\errors\messages\LocalizedMessage | [
"creates",
"message",
"for",
"given",
"param",
"error",
"in",
"given",
"locale"
] | 1ce0ebe5ba392faf3cc369a95e3fe0fa38912b1e | https://github.com/stubbles/stubbles-input/blob/1ce0ebe5ba392faf3cc369a95e3fe0fa38912b1e/src/main/php/errors/messages/PropertyBasedParamErrorMessages.php#L91-L98 |
225,546 | stubbles/stubbles-input | src/main/php/errors/messages/PropertyBasedParamErrorMessages.php | PropertyBasedParamErrorMessages.selectLocale | private function selectLocale(string $errorId, string $requestedLocale = null): string
{
$properties = $this->properties();
if (null !== $requestedLocale) {
if ($properties->containValue($errorId, $requestedLocale)) {
return $requestedLocale;
}
$b... | php | private function selectLocale(string $errorId, string $requestedLocale = null): string
{
$properties = $this->properties();
if (null !== $requestedLocale) {
if ($properties->containValue($errorId, $requestedLocale)) {
return $requestedLocale;
}
$b... | [
"private",
"function",
"selectLocale",
"(",
"string",
"$",
"errorId",
",",
"string",
"$",
"requestedLocale",
"=",
"null",
")",
":",
"string",
"{",
"$",
"properties",
"=",
"$",
"this",
"->",
"properties",
"(",
")",
";",
"if",
"(",
"null",
"!==",
"$",
"r... | selects locale based on availability of translations
@param string $errorId
@param string $requestedLocale
@return string | [
"selects",
"locale",
"based",
"on",
"availability",
"of",
"translations"
] | 1ce0ebe5ba392faf3cc369a95e3fe0fa38912b1e | https://github.com/stubbles/stubbles-input/blob/1ce0ebe5ba392faf3cc369a95e3fe0fa38912b1e/src/main/php/errors/messages/PropertyBasedParamErrorMessages.php#L107-L126 |
225,547 | stubbles/stubbles-input | src/main/php/errors/messages/PropertyBasedParamErrorMessages.php | PropertyBasedParamErrorMessages.properties | private function properties(): Properties
{
static $properties = null;
if (null === $properties) {
$properties = new Properties();
foreach ($this->resourceLoader->availableResourceUris('input/error/message.ini') as $resourceUri) {
$properties = $properties->me... | php | private function properties(): Properties
{
static $properties = null;
if (null === $properties) {
$properties = new Properties();
foreach ($this->resourceLoader->availableResourceUris('input/error/message.ini') as $resourceUri) {
$properties = $properties->me... | [
"private",
"function",
"properties",
"(",
")",
":",
"Properties",
"{",
"static",
"$",
"properties",
"=",
"null",
";",
"if",
"(",
"null",
"===",
"$",
"properties",
")",
"{",
"$",
"properties",
"=",
"new",
"Properties",
"(",
")",
";",
"foreach",
"(",
"$"... | parses properties from property files
@return \stubbles\values\Properties | [
"parses",
"properties",
"from",
"property",
"files"
] | 1ce0ebe5ba392faf3cc369a95e3fe0fa38912b1e | https://github.com/stubbles/stubbles-input/blob/1ce0ebe5ba392faf3cc369a95e3fe0fa38912b1e/src/main/php/errors/messages/PropertyBasedParamErrorMessages.php#L133-L144 |
225,548 | DrNixx/yii2-onix | src/http/Curl.php | Curl.getHeaders | private function getHeaders()
{
$result = [];
foreach ($this->headers as $name => $value) {
$result[] = sprintf("%s: %s", $name, $value);
}
return $result;
} | php | private function getHeaders()
{
$result = [];
foreach ($this->headers as $name => $value) {
$result[] = sprintf("%s: %s", $name, $value);
}
return $result;
} | [
"private",
"function",
"getHeaders",
"(",
")",
"{",
"$",
"result",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"this",
"->",
"headers",
"as",
"$",
"name",
"=>",
"$",
"value",
")",
"{",
"$",
"result",
"[",
"]",
"=",
"sprintf",
"(",
"\"%s: %s\"",
",",
... | Convert name=>value headers to strings
@return array | [
"Convert",
"name",
"=",
">",
"value",
"headers",
"to",
"strings"
] | 0a621ed301dc94971ff71af062b24d6bc0858dd7 | https://github.com/DrNixx/yii2-onix/blob/0a621ed301dc94971ff71af062b24d6bc0858dd7/src/http/Curl.php#L289-L297 |
225,549 | DrNixx/yii2-onix | src/http/Curl.php | Curl.unsetOption | public function unsetOption($key)
{
//reset a single option if its set already
if (isset($this->options[$key])) {
unset($this->options[$key]);
}
return $this;
} | php | public function unsetOption($key)
{
//reset a single option if its set already
if (isset($this->options[$key])) {
unset($this->options[$key]);
}
return $this;
} | [
"public",
"function",
"unsetOption",
"(",
"$",
"key",
")",
"{",
"//reset a single option if its set already",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"options",
"[",
"$",
"key",
"]",
")",
")",
"{",
"unset",
"(",
"$",
"this",
"->",
"options",
"[",
"$"... | Unset a single curl option
@param string $key
@return $this | [
"Unset",
"a",
"single",
"curl",
"option"
] | 0a621ed301dc94971ff71af062b24d6bc0858dd7 | https://github.com/DrNixx/yii2-onix/blob/0a621ed301dc94971ff71af062b24d6bc0858dd7/src/http/Curl.php#L306-L314 |
225,550 | DrNixx/yii2-onix | src/http/Curl.php | Curl.reset | public function reset()
{
if ($this->curl !== null) {
curl_close($this->curl); //stop curl
}
//reset all options
$this->unsetOptions();
//reset response & status code
$this->curl = null;
$this->response = null;
$this->responseCode = null;... | php | public function reset()
{
if ($this->curl !== null) {
curl_close($this->curl); //stop curl
}
//reset all options
$this->unsetOptions();
//reset response & status code
$this->curl = null;
$this->response = null;
$this->responseCode = null;... | [
"public",
"function",
"reset",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"curl",
"!==",
"null",
")",
"{",
"curl_close",
"(",
"$",
"this",
"->",
"curl",
")",
";",
"//stop curl",
"}",
"//reset all options",
"$",
"this",
"->",
"unsetOptions",
"(",
")",... | Total reset of options, responses, etc.
@return $this | [
"Total",
"reset",
"of",
"options",
"responses",
"etc",
"."
] | 0a621ed301dc94971ff71af062b24d6bc0858dd7 | https://github.com/DrNixx/yii2-onix/blob/0a621ed301dc94971ff71af062b24d6bc0858dd7/src/http/Curl.php#L337-L352 |
225,551 | DrNixx/yii2-onix | src/http/Curl.php | Curl.getOption | public function getOption($key)
{
//get merged options depends on default and user options
$mergesOptions = $this->getOptions();
//return value or false if key is not set.
return isset($mergesOptions[$key]) ? $mergesOptions[$key] : false;
} | php | public function getOption($key)
{
//get merged options depends on default and user options
$mergesOptions = $this->getOptions();
//return value or false if key is not set.
return isset($mergesOptions[$key]) ? $mergesOptions[$key] : false;
} | [
"public",
"function",
"getOption",
"(",
"$",
"key",
")",
"{",
"//get merged options depends on default and user options",
"$",
"mergesOptions",
"=",
"$",
"this",
"->",
"getOptions",
"(",
")",
";",
"//return value or false if key is not set.",
"return",
"isset",
"(",
"$"... | Return a single option
@param string|integer $key
@return mixed|boolean | [
"Return",
"a",
"single",
"option"
] | 0a621ed301dc94971ff71af062b24d6bc0858dd7 | https://github.com/DrNixx/yii2-onix/blob/0a621ed301dc94971ff71af062b24d6bc0858dd7/src/http/Curl.php#L361-L368 |
225,552 | DrNixx/yii2-onix | src/http/Curl.php | Curl.getOptions | public function getOptions()
{
$options = [];
if (sizeof($this->headers) > 0) {
$options = [
CURLOPT_HTTPHEADER => $this->getHeaders()
];
}
return $options + $this->options + $this->getDefaultOptions();
} | php | public function getOptions()
{
$options = [];
if (sizeof($this->headers) > 0) {
$options = [
CURLOPT_HTTPHEADER => $this->getHeaders()
];
}
return $options + $this->options + $this->getDefaultOptions();
} | [
"public",
"function",
"getOptions",
"(",
")",
"{",
"$",
"options",
"=",
"[",
"]",
";",
"if",
"(",
"sizeof",
"(",
"$",
"this",
"->",
"headers",
")",
">",
"0",
")",
"{",
"$",
"options",
"=",
"[",
"CURLOPT_HTTPHEADER",
"=>",
"$",
"this",
"->",
"getHea... | Return merged curl options and keep keys!
@return array | [
"Return",
"merged",
"curl",
"options",
"and",
"keep",
"keys!"
] | 0a621ed301dc94971ff71af062b24d6bc0858dd7 | https://github.com/DrNixx/yii2-onix/blob/0a621ed301dc94971ff71af062b24d6bc0858dd7/src/http/Curl.php#L376-L386 |
225,553 | vperyod/vperyod.auth-handler | src/AuthRequestAwareTrait.php | AuthRequestAwareTrait.getAuth | protected function getAuth(Request $request) : Auth
{
$auth = $request->getAttribute($this->authAttribute);
if (! $auth instanceof Auth) {
throw new \InvalidArgumentException(
'Auth attribute not available in request'
);
}
return $auth;
} | php | protected function getAuth(Request $request) : Auth
{
$auth = $request->getAttribute($this->authAttribute);
if (! $auth instanceof Auth) {
throw new \InvalidArgumentException(
'Auth attribute not available in request'
);
}
return $auth;
} | [
"protected",
"function",
"getAuth",
"(",
"Request",
"$",
"request",
")",
":",
"Auth",
"{",
"$",
"auth",
"=",
"$",
"request",
"->",
"getAttribute",
"(",
"$",
"this",
"->",
"authAttribute",
")",
";",
"if",
"(",
"!",
"$",
"auth",
"instanceof",
"Auth",
")"... | Get auth from request
@param Request $request PSR7 Request
@return Auth
@throws \InvalidArgumentException if auth attribute is not an `Auth`
@access protected | [
"Get",
"auth",
"from",
"request"
] | 7b90b4ca1d8a39f8ea159022046fe898eaae3db7 | https://github.com/vperyod/vperyod.auth-handler/blob/7b90b4ca1d8a39f8ea159022046fe898eaae3db7/src/AuthRequestAwareTrait.php#L74-L83 |
225,554 | edineibauer/helpers | public/src/Helpers/Time.php | Time.checkValueTime | private function checkValueTime(int $value)
{
if ($value > -1 && $value < 60) {
if (!isset($this->data['h']) && $value < 24) {
return "h";
} elseif (!isset($this->data['i'])) {
return "i";
} else {
return "s";
}
... | php | private function checkValueTime(int $value)
{
if ($value > -1 && $value < 60) {
if (!isset($this->data['h']) && $value < 24) {
return "h";
} elseif (!isset($this->data['i'])) {
return "i";
} else {
return "s";
}
... | [
"private",
"function",
"checkValueTime",
"(",
"int",
"$",
"value",
")",
"{",
"if",
"(",
"$",
"value",
">",
"-",
"1",
"&&",
"$",
"value",
"<",
"60",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"data",
"[",
"'h'",
"]",
")",
"&&",
... | Verifica qual tempo utilizar
@param int $value
@return mixed | [
"Verifica",
"qual",
"tempo",
"utilizar"
] | 3ed14fec3a8f2f282107f79f6bd1ca11e6882300 | https://github.com/edineibauer/helpers/blob/3ed14fec3a8f2f282107f79f6bd1ca11e6882300/public/src/Helpers/Time.php#L89-L102 |
225,555 | edineibauer/helpers | public/src/Helpers/Time.php | Time.checkNameHour | private function checkNameHour(string $time)
{
if (preg_match('/\s*\d{1,2}\s*(h|hour|hora|hs|hr|hrs)\s*/i', $time)) {
$this->setCerteza("h", $time);
}
if (preg_match('/\s*\d{1,2}\s*(m|min|minuto)\s*/i', $time)) {
$this->setCerteza("i", $time);
}
if (... | php | private function checkNameHour(string $time)
{
if (preg_match('/\s*\d{1,2}\s*(h|hour|hora|hs|hr|hrs)\s*/i', $time)) {
$this->setCerteza("h", $time);
}
if (preg_match('/\s*\d{1,2}\s*(m|min|minuto)\s*/i', $time)) {
$this->setCerteza("i", $time);
}
if (... | [
"private",
"function",
"checkNameHour",
"(",
"string",
"$",
"time",
")",
"{",
"if",
"(",
"preg_match",
"(",
"'/\\s*\\d{1,2}\\s*(h|hour|hora|hs|hr|hrs)\\s*/i'",
",",
"$",
"time",
")",
")",
"{",
"$",
"this",
"->",
"setCerteza",
"(",
"\"h\"",
",",
"$",
"time",
... | Verifica Se a string encontrada diz respeito a uma hora, minuto ou segundo
@param string $time | [
"Verifica",
"Se",
"a",
"string",
"encontrada",
"diz",
"respeito",
"a",
"uma",
"hora",
"minuto",
"ou",
"segundo"
] | 3ed14fec3a8f2f282107f79f6bd1ca11e6882300 | https://github.com/edineibauer/helpers/blob/3ed14fec3a8f2f282107f79f6bd1ca11e6882300/public/src/Helpers/Time.php#L108-L121 |
225,556 | SlayerBirden/dataflow | src/Pipe/Swap.php | Swap.pass | public function pass(DataBagInterface $dataBag): DataBagInterface
{
$first = $dataBag[$this->first] ?? null;
$second = $dataBag[$this->second] ?? null;
$dataBag[$this->first] = $second;
$dataBag[$this->second] = $first;
return $dataBag;
} | php | public function pass(DataBagInterface $dataBag): DataBagInterface
{
$first = $dataBag[$this->first] ?? null;
$second = $dataBag[$this->second] ?? null;
$dataBag[$this->first] = $second;
$dataBag[$this->second] = $first;
return $dataBag;
} | [
"public",
"function",
"pass",
"(",
"DataBagInterface",
"$",
"dataBag",
")",
":",
"DataBagInterface",
"{",
"$",
"first",
"=",
"$",
"dataBag",
"[",
"$",
"this",
"->",
"first",
"]",
"??",
"null",
";",
"$",
"second",
"=",
"$",
"dataBag",
"[",
"$",
"this",
... | Swap one key with another.
@param DataBagInterface $dataBag
@return DataBagInterface | [
"Swap",
"one",
"key",
"with",
"another",
"."
] | a9cb826b106e882e43523d39fea319adc4893e00 | https://github.com/SlayerBirden/dataflow/blob/a9cb826b106e882e43523d39fea319adc4893e00/src/Pipe/Swap.php#L39-L47 |
225,557 | SlayerBirden/dataflow | src/Pipe/Filter.php | Filter.pass | public function pass(DataBagInterface $dataBag): DataBagInterface
{
if (!($this->callback)($dataBag)) {
throw new FlowTerminationException(
sprintf(
'Flow was terminated by Filter (%s) for data %s.',
$this->getIdentifier(),
... | php | public function pass(DataBagInterface $dataBag): DataBagInterface
{
if (!($this->callback)($dataBag)) {
throw new FlowTerminationException(
sprintf(
'Flow was terminated by Filter (%s) for data %s.',
$this->getIdentifier(),
... | [
"public",
"function",
"pass",
"(",
"DataBagInterface",
"$",
"dataBag",
")",
":",
"DataBagInterface",
"{",
"if",
"(",
"!",
"(",
"$",
"this",
"->",
"callback",
")",
"(",
"$",
"dataBag",
")",
")",
"{",
"throw",
"new",
"FlowTerminationException",
"(",
"sprintf... | Filtering handler.
Terminate data flow based on a callback applied to DataBag.
{@inheritdoc} | [
"Filtering",
"handler",
".",
"Terminate",
"data",
"flow",
"based",
"on",
"a",
"callback",
"applied",
"to",
"DataBag",
"."
] | a9cb826b106e882e43523d39fea319adc4893e00 | https://github.com/SlayerBirden/dataflow/blob/a9cb826b106e882e43523d39fea319adc4893e00/src/Pipe/Filter.php#L35-L48 |
225,558 | bytic/Common | src/Controllers/Traits/CrudModels.php | CrudModels.add | public function add()
{
$record = $this->addNewModel();
$form = $this->addGetForm($record);
if ($form->execute()) {
$this->addRedirect($record);
}
$this->getView()->set('item', $record);
$this->getView()->set('form', $form);
$this->getView()->set... | php | public function add()
{
$record = $this->addNewModel();
$form = $this->addGetForm($record);
if ($form->execute()) {
$this->addRedirect($record);
}
$this->getView()->set('item', $record);
$this->getView()->set('form', $form);
$this->getView()->set... | [
"public",
"function",
"add",
"(",
")",
"{",
"$",
"record",
"=",
"$",
"this",
"->",
"addNewModel",
"(",
")",
";",
"$",
"form",
"=",
"$",
"this",
"->",
"addGetForm",
"(",
"$",
"record",
")",
";",
"if",
"(",
"$",
"form",
"->",
"execute",
"(",
")",
... | Add item method
@return void | [
"Add",
"item",
"method"
] | 5d17043e03a2274a758fba1f6dedb7d85195bcfb | https://github.com/bytic/Common/blob/5d17043e03a2274a758fba1f6dedb7d85195bcfb/src/Controllers/Traits/CrudModels.php#L79-L97 |
225,559 | bytic/Common | src/Controllers/Traits/CrudModels.php | CrudModels.duplicate | public function duplicate()
{
$record = $this->initExistingItem();
$record->duplicate();
$url = $this->getAfterUrl(
"after-duplicate",
$this->getModelManager()->getURL()
);
$flashName = $this->getAfterFlashName(
"after-duplicate",
... | php | public function duplicate()
{
$record = $this->initExistingItem();
$record->duplicate();
$url = $this->getAfterUrl(
"after-duplicate",
$this->getModelManager()->getURL()
);
$flashName = $this->getAfterFlashName(
"after-duplicate",
... | [
"public",
"function",
"duplicate",
"(",
")",
"{",
"$",
"record",
"=",
"$",
"this",
"->",
"initExistingItem",
"(",
")",
";",
"$",
"record",
"->",
"duplicate",
"(",
")",
";",
"$",
"url",
"=",
"$",
"this",
"->",
"getAfterUrl",
"(",
"\"after-duplicate\"",
... | Duplicate item action
@return void | [
"Duplicate",
"item",
"action"
] | 5d17043e03a2274a758fba1f6dedb7d85195bcfb | https://github.com/bytic/Common/blob/5d17043e03a2274a758fba1f6dedb7d85195bcfb/src/Controllers/Traits/CrudModels.php#L269-L291 |
225,560 | bytic/Common | src/Utility/MM.php | MM.getNamespaced | protected static function getNamespaced($name)
{
$baseNamespace = app('app')->getRootNamespace() . 'Models\\';
if (strpos($name, '\\') === false) {
$name = $name . '\\' . $name;
}
$class = $baseNamespace . $name;
if (class_exists($class)) {
return self... | php | protected static function getNamespaced($name)
{
$baseNamespace = app('app')->getRootNamespace() . 'Models\\';
if (strpos($name, '\\') === false) {
$name = $name . '\\' . $name;
}
$class = $baseNamespace . $name;
if (class_exists($class)) {
return self... | [
"protected",
"static",
"function",
"getNamespaced",
"(",
"$",
"name",
")",
"{",
"$",
"baseNamespace",
"=",
"app",
"(",
"'app'",
")",
"->",
"getRootNamespace",
"(",
")",
".",
"'Models\\\\'",
";",
"if",
"(",
"strpos",
"(",
"$",
"name",
",",
"'\\\\'",
")",
... | Get ModelManager from namespaced class
@param string $name
@return mixed | [
"Get",
"ModelManager",
"from",
"namespaced",
"class"
] | 5d17043e03a2274a758fba1f6dedb7d85195bcfb | https://github.com/bytic/Common/blob/5d17043e03a2274a758fba1f6dedb7d85195bcfb/src/Utility/MM.php#L34-L45 |
225,561 | cmsgears/plugin-file-manager | config/FileProperties.php | FileProperties.getImageExtensions | public function getImageExtensions( $default = null ) {
$prop = $this->properties[ self::PROP_EXTENSION_IMAGE ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return preg_split( "/,/", $prop );
}
return $default;
} | php | public function getImageExtensions( $default = null ) {
$prop = $this->properties[ self::PROP_EXTENSION_IMAGE ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return preg_split( "/,/", $prop );
}
return $default;
} | [
"public",
"function",
"getImageExtensions",
"(",
"$",
"default",
"=",
"null",
")",
"{",
"$",
"prop",
"=",
"$",
"this",
"->",
"properties",
"[",
"self",
"::",
"PROP_EXTENSION_IMAGE",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"prop",
")",
"&&",
"strlen",
"... | Returns the extensions allowed for images.
@param type $default
@return string | [
"Returns",
"the",
"extensions",
"allowed",
"for",
"images",
"."
] | aad2a109b4c6126efabcadfb38762cd240a60bc5 | https://github.com/cmsgears/plugin-file-manager/blob/aad2a109b4c6126efabcadfb38762cd240a60bc5/config/FileProperties.php#L109-L119 |
225,562 | cmsgears/plugin-file-manager | config/FileProperties.php | FileProperties.getVideoExtensions | public function getVideoExtensions( $default = null ) {
$prop = $this->properties[ self::PROP_EXTENSION_VIDEO ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return preg_split( "/,/", $prop );
}
return $default;
} | php | public function getVideoExtensions( $default = null ) {
$prop = $this->properties[ self::PROP_EXTENSION_VIDEO ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return preg_split( "/,/", $prop );
}
return $default;
} | [
"public",
"function",
"getVideoExtensions",
"(",
"$",
"default",
"=",
"null",
")",
"{",
"$",
"prop",
"=",
"$",
"this",
"->",
"properties",
"[",
"self",
"::",
"PROP_EXTENSION_VIDEO",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"prop",
")",
"&&",
"strlen",
"... | Returns the extensions allowed for videos.
@param type $default
@return string | [
"Returns",
"the",
"extensions",
"allowed",
"for",
"videos",
"."
] | aad2a109b4c6126efabcadfb38762cd240a60bc5 | https://github.com/cmsgears/plugin-file-manager/blob/aad2a109b4c6126efabcadfb38762cd240a60bc5/config/FileProperties.php#L127-L137 |
225,563 | cmsgears/plugin-file-manager | config/FileProperties.php | FileProperties.getAudioExtensions | public function getAudioExtensions( $default = null ) {
$prop = $this->properties[ self::PROP_EXTENSION_AUDIO ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return preg_split( "/,/", $prop );
}
return $default;
} | php | public function getAudioExtensions( $default = null ) {
$prop = $this->properties[ self::PROP_EXTENSION_AUDIO ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return preg_split( "/,/", $prop );
}
return $default;
} | [
"public",
"function",
"getAudioExtensions",
"(",
"$",
"default",
"=",
"null",
")",
"{",
"$",
"prop",
"=",
"$",
"this",
"->",
"properties",
"[",
"self",
"::",
"PROP_EXTENSION_AUDIO",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"prop",
")",
"&&",
"strlen",
"... | Returns the extensions allowed for music and audio.
@param type $default
@return string | [
"Returns",
"the",
"extensions",
"allowed",
"for",
"music",
"and",
"audio",
"."
] | aad2a109b4c6126efabcadfb38762cd240a60bc5 | https://github.com/cmsgears/plugin-file-manager/blob/aad2a109b4c6126efabcadfb38762cd240a60bc5/config/FileProperties.php#L145-L155 |
225,564 | cmsgears/plugin-file-manager | config/FileProperties.php | FileProperties.getDocumentExtensions | public function getDocumentExtensions( $default = null ) {
$prop = $this->properties[ self::PROP_EXTENSION_DOCUMENT ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return preg_split( "/,/", $prop );
}
return $default;
} | php | public function getDocumentExtensions( $default = null ) {
$prop = $this->properties[ self::PROP_EXTENSION_DOCUMENT ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return preg_split( "/,/", $prop );
}
return $default;
} | [
"public",
"function",
"getDocumentExtensions",
"(",
"$",
"default",
"=",
"null",
")",
"{",
"$",
"prop",
"=",
"$",
"this",
"->",
"properties",
"[",
"self",
"::",
"PROP_EXTENSION_DOCUMENT",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"prop",
")",
"&&",
"strlen... | Returns the extensions allowed for documents.
@param type $default
@return string | [
"Returns",
"the",
"extensions",
"allowed",
"for",
"documents",
"."
] | aad2a109b4c6126efabcadfb38762cd240a60bc5 | https://github.com/cmsgears/plugin-file-manager/blob/aad2a109b4c6126efabcadfb38762cd240a60bc5/config/FileProperties.php#L163-L173 |
225,565 | cmsgears/plugin-file-manager | config/FileProperties.php | FileProperties.getCompressedExtensions | public function getCompressedExtensions( $default = null ) {
$prop = $this->properties[ self::PROP_EXTENSION_COMPRESSED ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return preg_split( "/,/", $prop );
}
return $default;
} | php | public function getCompressedExtensions( $default = null ) {
$prop = $this->properties[ self::PROP_EXTENSION_COMPRESSED ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return preg_split( "/,/", $prop );
}
return $default;
} | [
"public",
"function",
"getCompressedExtensions",
"(",
"$",
"default",
"=",
"null",
")",
"{",
"$",
"prop",
"=",
"$",
"this",
"->",
"properties",
"[",
"self",
"::",
"PROP_EXTENSION_COMPRESSED",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"prop",
")",
"&&",
"st... | Returns the extensions allowed for compressed documents.
@param type $default
@return string | [
"Returns",
"the",
"extensions",
"allowed",
"for",
"compressed",
"documents",
"."
] | aad2a109b4c6126efabcadfb38762cd240a60bc5 | https://github.com/cmsgears/plugin-file-manager/blob/aad2a109b4c6126efabcadfb38762cd240a60bc5/config/FileProperties.php#L181-L191 |
225,566 | cmsgears/plugin-file-manager | config/FileProperties.php | FileProperties.isGenerateName | public function isGenerateName( $default = null ) {
$prop = $this->properties[ self::PROP_NAME_GENERATE ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return $prop;
}
return $default;
} | php | public function isGenerateName( $default = null ) {
$prop = $this->properties[ self::PROP_NAME_GENERATE ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return $prop;
}
return $default;
} | [
"public",
"function",
"isGenerateName",
"(",
"$",
"default",
"=",
"null",
")",
"{",
"$",
"prop",
"=",
"$",
"this",
"->",
"properties",
"[",
"self",
"::",
"PROP_NAME_GENERATE",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"prop",
")",
"&&",
"strlen",
"(",
... | Check whether name must be auto generated while storing the file. The given file
name will be stored in title.
@param type $default
@return string | [
"Check",
"whether",
"name",
"must",
"be",
"auto",
"generated",
"while",
"storing",
"the",
"file",
".",
"The",
"given",
"file",
"name",
"will",
"be",
"stored",
"in",
"title",
"."
] | aad2a109b4c6126efabcadfb38762cd240a60bc5 | https://github.com/cmsgears/plugin-file-manager/blob/aad2a109b4c6126efabcadfb38762cd240a60bc5/config/FileProperties.php#L200-L210 |
225,567 | cmsgears/plugin-file-manager | config/FileProperties.php | FileProperties.isPrettyName | public function isPrettyName( $default = null ) {
$prop = $this->properties[ self::PROP_NAME_PRETTY ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return $prop;
}
return $default;
} | php | public function isPrettyName( $default = null ) {
$prop = $this->properties[ self::PROP_NAME_PRETTY ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return $prop;
}
return $default;
} | [
"public",
"function",
"isPrettyName",
"(",
"$",
"default",
"=",
"null",
")",
"{",
"$",
"prop",
"=",
"$",
"this",
"->",
"properties",
"[",
"self",
"::",
"PROP_NAME_PRETTY",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"prop",
")",
"&&",
"strlen",
"(",
"$",... | Check whether pretty names must be generated by hyphenating the given file name. The
given file name will be stored in title.
@param type $default
@return string | [
"Check",
"whether",
"pretty",
"names",
"must",
"be",
"generated",
"by",
"hyphenating",
"the",
"given",
"file",
"name",
".",
"The",
"given",
"file",
"name",
"will",
"be",
"stored",
"in",
"title",
"."
] | aad2a109b4c6126efabcadfb38762cd240a60bc5 | https://github.com/cmsgears/plugin-file-manager/blob/aad2a109b4c6126efabcadfb38762cd240a60bc5/config/FileProperties.php#L219-L229 |
225,568 | cmsgears/plugin-file-manager | config/FileProperties.php | FileProperties.getMaxSize | public function getMaxSize( $default = null ) {
$prop = $this->properties[ self::PROP_MAX_SIZE ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return $prop;
}
return $default;
} | php | public function getMaxSize( $default = null ) {
$prop = $this->properties[ self::PROP_MAX_SIZE ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return $prop;
}
return $default;
} | [
"public",
"function",
"getMaxSize",
"(",
"$",
"default",
"=",
"null",
")",
"{",
"$",
"prop",
"=",
"$",
"this",
"->",
"properties",
"[",
"self",
"::",
"PROP_MAX_SIZE",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"prop",
")",
"&&",
"strlen",
"(",
"$",
"p... | Returns the maximum size allowed for file.
@param type $default
@return string | [
"Returns",
"the",
"maximum",
"size",
"allowed",
"for",
"file",
"."
] | aad2a109b4c6126efabcadfb38762cd240a60bc5 | https://github.com/cmsgears/plugin-file-manager/blob/aad2a109b4c6126efabcadfb38762cd240a60bc5/config/FileProperties.php#L237-L247 |
225,569 | cmsgears/plugin-file-manager | config/FileProperties.php | FileProperties.getMaxResolution | public function getMaxResolution( $default = null ) {
$prop = $this->properties[ self::PROP_MAX_RESOLUTION ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return $prop;
}
return $default;
} | php | public function getMaxResolution( $default = null ) {
$prop = $this->properties[ self::PROP_MAX_RESOLUTION ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return $prop;
}
return $default;
} | [
"public",
"function",
"getMaxResolution",
"(",
"$",
"default",
"=",
"null",
")",
"{",
"$",
"prop",
"=",
"$",
"this",
"->",
"properties",
"[",
"self",
"::",
"PROP_MAX_RESOLUTION",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"prop",
")",
"&&",
"strlen",
"(",... | Returns the maximum resolution allowed for image.
@param type $default
@return string | [
"Returns",
"the",
"maximum",
"resolution",
"allowed",
"for",
"image",
"."
] | aad2a109b4c6126efabcadfb38762cd240a60bc5 | https://github.com/cmsgears/plugin-file-manager/blob/aad2a109b4c6126efabcadfb38762cd240a60bc5/config/FileProperties.php#L255-L265 |
225,570 | cmsgears/plugin-file-manager | config/FileProperties.php | FileProperties.isGenerateMedium | public function isGenerateMedium( $default = null ) {
$prop = $this->properties[ self::PROP_GENERATE_MEDIUM ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return $prop;
}
return $default;
} | php | public function isGenerateMedium( $default = null ) {
$prop = $this->properties[ self::PROP_GENERATE_MEDIUM ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return $prop;
}
return $default;
} | [
"public",
"function",
"isGenerateMedium",
"(",
"$",
"default",
"=",
"null",
")",
"{",
"$",
"prop",
"=",
"$",
"this",
"->",
"properties",
"[",
"self",
"::",
"PROP_GENERATE_MEDIUM",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"prop",
")",
"&&",
"strlen",
"("... | Check whether medium image must be generated while storing the image file.
@param type $default
@return string | [
"Check",
"whether",
"medium",
"image",
"must",
"be",
"generated",
"while",
"storing",
"the",
"image",
"file",
"."
] | aad2a109b4c6126efabcadfb38762cd240a60bc5 | https://github.com/cmsgears/plugin-file-manager/blob/aad2a109b4c6126efabcadfb38762cd240a60bc5/config/FileProperties.php#L273-L283 |
225,571 | cmsgears/plugin-file-manager | config/FileProperties.php | FileProperties.getMediumWidth | public function getMediumWidth( $default = null ) {
$prop = $this->properties[ self::PROP_MEDIUM_WIDTH ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return $prop;
}
return $default;
} | php | public function getMediumWidth( $default = null ) {
$prop = $this->properties[ self::PROP_MEDIUM_WIDTH ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return $prop;
}
return $default;
} | [
"public",
"function",
"getMediumWidth",
"(",
"$",
"default",
"=",
"null",
")",
"{",
"$",
"prop",
"=",
"$",
"this",
"->",
"properties",
"[",
"self",
"::",
"PROP_MEDIUM_WIDTH",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"prop",
")",
"&&",
"strlen",
"(",
"... | Returns the width of medium image.
@param type $default
@return string | [
"Returns",
"the",
"width",
"of",
"medium",
"image",
"."
] | aad2a109b4c6126efabcadfb38762cd240a60bc5 | https://github.com/cmsgears/plugin-file-manager/blob/aad2a109b4c6126efabcadfb38762cd240a60bc5/config/FileProperties.php#L291-L301 |
225,572 | cmsgears/plugin-file-manager | config/FileProperties.php | FileProperties.isGenerateThumb | public function isGenerateThumb( $default = null ) {
$prop = $this->properties[ self::PROP_GENERATE_THUMB ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return $prop;
}
return $default;
} | php | public function isGenerateThumb( $default = null ) {
$prop = $this->properties[ self::PROP_GENERATE_THUMB ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return $prop;
}
return $default;
} | [
"public",
"function",
"isGenerateThumb",
"(",
"$",
"default",
"=",
"null",
")",
"{",
"$",
"prop",
"=",
"$",
"this",
"->",
"properties",
"[",
"self",
"::",
"PROP_GENERATE_THUMB",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"prop",
")",
"&&",
"strlen",
"(",
... | Check whether thumb image must be generated while storing the image file.
@param type $default
@return string | [
"Check",
"whether",
"thumb",
"image",
"must",
"be",
"generated",
"while",
"storing",
"the",
"image",
"file",
"."
] | aad2a109b4c6126efabcadfb38762cd240a60bc5 | https://github.com/cmsgears/plugin-file-manager/blob/aad2a109b4c6126efabcadfb38762cd240a60bc5/config/FileProperties.php#L327-L337 |
225,573 | cmsgears/plugin-file-manager | config/FileProperties.php | FileProperties.getThumbWidth | public function getThumbWidth( $default = null ) {
$prop = $this->properties[ self::PROP_THUMB_WIDTH ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return $prop;
}
return $default;
} | php | public function getThumbWidth( $default = null ) {
$prop = $this->properties[ self::PROP_THUMB_WIDTH ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return $prop;
}
return $default;
} | [
"public",
"function",
"getThumbWidth",
"(",
"$",
"default",
"=",
"null",
")",
"{",
"$",
"prop",
"=",
"$",
"this",
"->",
"properties",
"[",
"self",
"::",
"PROP_THUMB_WIDTH",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"prop",
")",
"&&",
"strlen",
"(",
"$"... | Returns the width of thumb image.
@param type $default
@return string | [
"Returns",
"the",
"width",
"of",
"thumb",
"image",
"."
] | aad2a109b4c6126efabcadfb38762cd240a60bc5 | https://github.com/cmsgears/plugin-file-manager/blob/aad2a109b4c6126efabcadfb38762cd240a60bc5/config/FileProperties.php#L345-L355 |
225,574 | cmsgears/plugin-file-manager | config/FileProperties.php | FileProperties.isUpload | public function isUpload( $default = null ) {
$prop = $this->properties[ self::PROP_UPLOAD ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return $prop;
}
return $default;
} | php | public function isUpload( $default = null ) {
$prop = $this->properties[ self::PROP_UPLOAD ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return $prop;
}
return $default;
} | [
"public",
"function",
"isUpload",
"(",
"$",
"default",
"=",
"null",
")",
"{",
"$",
"prop",
"=",
"$",
"this",
"->",
"properties",
"[",
"self",
"::",
"PROP_UPLOAD",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"prop",
")",
"&&",
"strlen",
"(",
"$",
"prop"... | Checks whether file upload is allowed.
@param type $default
@return boolean | [
"Checks",
"whether",
"file",
"upload",
"is",
"allowed",
"."
] | aad2a109b4c6126efabcadfb38762cd240a60bc5 | https://github.com/cmsgears/plugin-file-manager/blob/aad2a109b4c6126efabcadfb38762cd240a60bc5/config/FileProperties.php#L381-L391 |
225,575 | cmsgears/plugin-file-manager | config/FileProperties.php | FileProperties.getUploadDir | public function getUploadDir( $default = null ) {
$prop = $this->properties[ self::PROP_UPLOAD_DIR ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return $prop;
}
return $default;
} | php | public function getUploadDir( $default = null ) {
$prop = $this->properties[ self::PROP_UPLOAD_DIR ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return $prop;
}
return $default;
} | [
"public",
"function",
"getUploadDir",
"(",
"$",
"default",
"=",
"null",
")",
"{",
"$",
"prop",
"=",
"$",
"this",
"->",
"properties",
"[",
"self",
"::",
"PROP_UPLOAD_DIR",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"prop",
")",
"&&",
"strlen",
"(",
"$",
... | Returns the uploads directory path to which files will be stored.
@param type $default
@return string | [
"Returns",
"the",
"uploads",
"directory",
"path",
"to",
"which",
"files",
"will",
"be",
"stored",
"."
] | aad2a109b4c6126efabcadfb38762cd240a60bc5 | https://github.com/cmsgears/plugin-file-manager/blob/aad2a109b4c6126efabcadfb38762cd240a60bc5/config/FileProperties.php#L399-L409 |
225,576 | cmsgears/plugin-file-manager | config/FileProperties.php | FileProperties.getUploadUrl | public function getUploadUrl( $default = null ) {
$prop = $this->properties[ self::PROP_UPLOAD_URL ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return $prop;
}
return $default;
} | php | public function getUploadUrl( $default = null ) {
$prop = $this->properties[ self::PROP_UPLOAD_URL ];
if( isset( $prop ) && strlen( $prop ) > 0 ) {
return $prop;
}
return $default;
} | [
"public",
"function",
"getUploadUrl",
"(",
"$",
"default",
"=",
"null",
")",
"{",
"$",
"prop",
"=",
"$",
"this",
"->",
"properties",
"[",
"self",
"::",
"PROP_UPLOAD_URL",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"prop",
")",
"&&",
"strlen",
"(",
"$",
... | Returns the uploads URL path to access file via URL.
@param type $default
@return string | [
"Returns",
"the",
"uploads",
"URL",
"path",
"to",
"access",
"file",
"via",
"URL",
"."
] | aad2a109b4c6126efabcadfb38762cd240a60bc5 | https://github.com/cmsgears/plugin-file-manager/blob/aad2a109b4c6126efabcadfb38762cd240a60bc5/config/FileProperties.php#L417-L427 |
225,577 | RevisionTen/cqrs | Model/EventQeueObject.php | EventQeueObject.getEventStreamObject | public function getEventStreamObject(): EventStreamObject
{
$eventStreamObject = new EventStreamObject();
$eventStreamObject->setUuid($this->getUuid());
$eventStreamObject->setCommandUuid($this->getCommandUuid());
$eventStreamObject->setVersion($this->getVersion());
$eventStr... | php | public function getEventStreamObject(): EventStreamObject
{
$eventStreamObject = new EventStreamObject();
$eventStreamObject->setUuid($this->getUuid());
$eventStreamObject->setCommandUuid($this->getCommandUuid());
$eventStreamObject->setVersion($this->getVersion());
$eventStr... | [
"public",
"function",
"getEventStreamObject",
"(",
")",
":",
"EventStreamObject",
"{",
"$",
"eventStreamObject",
"=",
"new",
"EventStreamObject",
"(",
")",
";",
"$",
"eventStreamObject",
"->",
"setUuid",
"(",
"$",
"this",
"->",
"getUuid",
"(",
")",
")",
";",
... | Transforms the EventQeueObject into an EventStreamObject
and returns it.
@return EventStreamObject | [
"Transforms",
"the",
"EventQeueObject",
"into",
"an",
"EventStreamObject",
"and",
"returns",
"it",
"."
] | d94fdd86855a994c4662e24a6c3c08ef586e64f9 | https://github.com/RevisionTen/cqrs/blob/d94fdd86855a994c4662e24a6c3c08ef586e64f9/Model/EventQeueObject.php#L110-L124 |
225,578 | edineibauer/entity | public/src/Entity/Meta.php | Meta.setDados | public function setDados($dados = null, $default)
{
if (!empty($dados)) {
if (!$default)
$default = json_decode(file_get_contents(PATH_HOME . VENDOR . "entity-form/public/entity/input_type.json"), true)['default'];
foreach (array_replace_recursive($default, $dados) a... | php | public function setDados($dados = null, $default)
{
if (!empty($dados)) {
if (!$default)
$default = json_decode(file_get_contents(PATH_HOME . VENDOR . "entity-form/public/entity/input_type.json"), true)['default'];
foreach (array_replace_recursive($default, $dados) a... | [
"public",
"function",
"setDados",
"(",
"$",
"dados",
"=",
"null",
",",
"$",
"default",
")",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"dados",
")",
")",
"{",
"if",
"(",
"!",
"$",
"default",
")",
"$",
"default",
"=",
"json_decode",
"(",
"file_get_cont... | Informa dados a esta Meta
@param mixed $dados
@param mixed $default | [
"Informa",
"dados",
"a",
"esta",
"Meta"
] | 8437f5531ed9cd5f75c4c69c7db27b31e31e02c2 | https://github.com/edineibauer/entity/blob/8437f5531ed9cd5f75c4c69c7db27b31e31e02c2/public/src/Entity/Meta.php#L450-L518 |
225,579 | sopinetchat/SopinetChatBundle | Service/InterfaceHelper.php | InterfaceHelper.sendMessage | public function sendMessage(Request $request) {
/** @var MessageHelper $messageHelper */
$messageHelper = $this->container->get('sopinet_chatbundle_messagehelper');
/** @var ApiHelper $apiHelper */
$apiHelper = $this->container->get('sopinet_apihelperbundle_apihelper');
/** @va... | php | public function sendMessage(Request $request) {
/** @var MessageHelper $messageHelper */
$messageHelper = $this->container->get('sopinet_chatbundle_messagehelper');
/** @var ApiHelper $apiHelper */
$apiHelper = $this->container->get('sopinet_apihelperbundle_apihelper');
/** @va... | [
"public",
"function",
"sendMessage",
"(",
"Request",
"$",
"request",
")",
"{",
"/** @var MessageHelper $messageHelper */",
"$",
"messageHelper",
"=",
"$",
"this",
"->",
"container",
"->",
"get",
"(",
"'sopinet_chatbundle_messagehelper'",
")",
";",
"/** @var ApiHelper $a... | Manda un mensaje a un Chat
request llevará la información pertinente
text - Texto de mensaje en el chat.
type - Tipo de mensaje.
fromDevice - Device que lo envía.
chat - ID del Chat en el servidor en el que se envía el mensaje,
id - ID del Mensaje,
fromTime - Fecha y hora de envío de mensaje, formato Timestamp
@param... | [
"Manda",
"un",
"mensaje",
"a",
"un",
"Chat"
] | 92c306963d8e9c74ecaa06422cea65bcf1bb3ba2 | https://github.com/sopinetchat/SopinetChatBundle/blob/92c306963d8e9c74ecaa06422cea65bcf1bb3ba2/Service/InterfaceHelper.php#L46-L83 |
225,580 | Everest/Everest-Filesystem | src/classes/Everest/Filesystem/Collection.php | Collection.delete | public function delete(bool $recursive = true): bool
{
$this->each(function (AbstractObject $item) use ($recursive) {
if ($item->isFolder()) {
$item->delete($recursive);
} else {
$item->delete();
}
});
return true;
} | php | public function delete(bool $recursive = true): bool
{
$this->each(function (AbstractObject $item) use ($recursive) {
if ($item->isFolder()) {
$item->delete($recursive);
} else {
$item->delete();
}
});
return true;
} | [
"public",
"function",
"delete",
"(",
"bool",
"$",
"recursive",
"=",
"true",
")",
":",
"bool",
"{",
"$",
"this",
"->",
"each",
"(",
"function",
"(",
"AbstractObject",
"$",
"item",
")",
"use",
"(",
"$",
"recursive",
")",
"{",
"if",
"(",
"$",
"item",
... | Delete all files and folders.
@param bool $recursive Set FALSE to prevent recursive deleting all files and sub folders
@return bool | [
"Delete",
"all",
"files",
"and",
"folders",
"."
] | 67782256e4b09adc7f761944b88ea317a194d677 | https://github.com/Everest/Everest-Filesystem/blob/67782256e4b09adc7f761944b88ea317a194d677/src/classes/Everest/Filesystem/Collection.php#L30-L41 |
225,581 | Eve-PHP/Framework | src/Cli/Database.php | Database.createRelations | protected function createRelations()
{
foreach($this->schema['relations'] as $table => $many) {
$this->database->query('DROP TABLE IF EXISTS `'.$this->schema['name'].'_'.$table.'`');
$this->database->query('CREATE TABLE `'.$this->schema['name'].'_'.$table.'` (
`'.$this... | php | protected function createRelations()
{
foreach($this->schema['relations'] as $table => $many) {
$this->database->query('DROP TABLE IF EXISTS `'.$this->schema['name'].'_'.$table.'`');
$this->database->query('CREATE TABLE `'.$this->schema['name'].'_'.$table.'` (
`'.$this... | [
"protected",
"function",
"createRelations",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"schema",
"[",
"'relations'",
"]",
"as",
"$",
"table",
"=>",
"$",
"many",
")",
"{",
"$",
"this",
"->",
"database",
"->",
"query",
"(",
"'DROP TABLE IF EXISTS `'",... | Create the relational tables
@return Eve\Framework\Cli\Database | [
"Create",
"the",
"relational",
"tables"
] | cd4ca9472c6c46034bde402bf20bf2f86657c608 | https://github.com/Eve-PHP/Framework/blob/cd4ca9472c6c46034bde402bf20bf2f86657c608/src/Cli/Database.php#L156-L176 |
225,582 | Eve-PHP/Framework | src/Cli/Database.php | Database.insertFixtures | protected function insertFixtures()
{
foreach($this->schema['fixture'] as $row) {
$model = $this->database
->model($row)
->save($this->schema['name']);
foreach($this->schema['relations'] as $table => $many) {
if(isset($row[$this->schem... | php | protected function insertFixtures()
{
foreach($this->schema['fixture'] as $row) {
$model = $this->database
->model($row)
->save($this->schema['name']);
foreach($this->schema['relations'] as $table => $many) {
if(isset($row[$this->schem... | [
"protected",
"function",
"insertFixtures",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"schema",
"[",
"'fixture'",
"]",
"as",
"$",
"row",
")",
"{",
"$",
"model",
"=",
"$",
"this",
"->",
"database",
"->",
"model",
"(",
"$",
"row",
")",
"->",
"... | Insert fixtures while we are at it
@param array $args CLI arguments
@return Eve\Framework\Cli\Database | [
"Insert",
"fixtures",
"while",
"we",
"are",
"at",
"it"
] | cd4ca9472c6c46034bde402bf20bf2f86657c608 | https://github.com/Eve-PHP/Framework/blob/cd4ca9472c6c46034bde402bf20bf2f86657c608/src/Cli/Database.php#L289-L306 |
225,583 | yawik/behat | src/Select2Context.php | Select2Context.fillSearchField | private function fillSearchField(DocumentElement $page, $field, $value)
{
$driver = $this->getSession()->getDriver();
if ('Behat\Mink\Driver\Selenium2Driver' === get_class($driver)) {
// Can't use `$this->getSession()->getPage()->find()` because of https://github.com/minkphp/MinkSelenium2Driver/issues/188
... | php | private function fillSearchField(DocumentElement $page, $field, $value)
{
$driver = $this->getSession()->getDriver();
if ('Behat\Mink\Driver\Selenium2Driver' === get_class($driver)) {
// Can't use `$this->getSession()->getPage()->find()` because of https://github.com/minkphp/MinkSelenium2Driver/issues/188
... | [
"private",
"function",
"fillSearchField",
"(",
"DocumentElement",
"$",
"page",
",",
"$",
"field",
",",
"$",
"value",
")",
"{",
"$",
"driver",
"=",
"$",
"this",
"->",
"getSession",
"(",
")",
"->",
"getDriver",
"(",
")",
";",
"if",
"(",
"'Behat\\Mink\\Driv... | Fill Select2 search field
@param DocumentElement $page
@param string $field
@param string $value
@throws \Exception | [
"Fill",
"Select2",
"search",
"field"
] | 9e776b8aa8a069da13e35d717f7bb35c2f96b277 | https://github.com/yawik/behat/blob/9e776b8aa8a069da13e35d717f7bb35c2f96b277/src/Select2Context.php#L64-L92 |
225,584 | bytic/Common | src/Records/Traits/HasForms/RecordTrait.php | RecordTrait.getForm | public function getForm($type = null)
{
if (!isset($this->forms[$type])) {
$form = $this->getManager()->newForm($type);
$this->forms[$type] = $this->initForm($form);
}
return $this->forms[$type];
} | php | public function getForm($type = null)
{
if (!isset($this->forms[$type])) {
$form = $this->getManager()->newForm($type);
$this->forms[$type] = $this->initForm($form);
}
return $this->forms[$type];
} | [
"public",
"function",
"getForm",
"(",
"$",
"type",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"forms",
"[",
"$",
"type",
"]",
")",
")",
"{",
"$",
"form",
"=",
"$",
"this",
"->",
"getManager",
"(",
")",
"->",
"newFor... | Get Form object by name
@param string $type Form name
@return Form | [
"Get",
"Form",
"object",
"by",
"name"
] | 5d17043e03a2274a758fba1f6dedb7d85195bcfb | https://github.com/bytic/Common/blob/5d17043e03a2274a758fba1f6dedb7d85195bcfb/src/Records/Traits/HasForms/RecordTrait.php#L28-L37 |
225,585 | n2n/n2n-log4php | src/app/n2n/log4php/logging/LoggingEvent.php | LoggingEvent.getLocationInformation | public function getLocationInformation() {
if($this->locationInfo === null) {
$locationInfo = array();
$trace = debug_backtrace();
$prevHop = null;
// make a downsearch to identify the caller
$hop = array_pop($trace);
while($hop !== null) {
if(isset($hop['class'])) {
// we are so... | php | public function getLocationInformation() {
if($this->locationInfo === null) {
$locationInfo = array();
$trace = debug_backtrace();
$prevHop = null;
// make a downsearch to identify the caller
$hop = array_pop($trace);
while($hop !== null) {
if(isset($hop['class'])) {
// we are so... | [
"public",
"function",
"getLocationInformation",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"locationInfo",
"===",
"null",
")",
"{",
"$",
"locationInfo",
"=",
"array",
"(",
")",
";",
"$",
"trace",
"=",
"debug_backtrace",
"(",
")",
";",
"$",
"prevHop",
... | Set the location information for this logging event. The collected
information is cached for future use.
<p>This method uses {@link PHP_MANUAL#debug_backtrace debug_backtrace()} function (if exists)
to collect informations about caller.</p>
<p>It only recognize informations generated by {@link \n2n\log4php\Logger} and... | [
"Set",
"the",
"location",
"information",
"for",
"this",
"logging",
"event",
".",
"The",
"collected",
"information",
"is",
"cached",
"for",
"future",
"use",
"."
] | 1e6fff4c2785acdb8c2e0c3d5451cbb7e1b51fc2 | https://github.com/n2n/n2n-log4php/blob/1e6fff4c2785acdb8c2e0c3d5451cbb7e1b51fc2/src/app/n2n/log4php/logging/LoggingEvent.php#L159-L196 |
225,586 | n2n/n2n-log4php | src/app/n2n/log4php/logging/LoggingEvent.php | LoggingEvent.getRenderedMessage | public function getRenderedMessage() {
if($this->renderedMessage === null and $this->message !== null) {
if(is_string($this->message)) {
$this->renderedMessage = $this->message;
} else {
$rendererMap = \n2n\log4php\Logger::getHierarchy()->getRendererMap();
$this->renderedMessage= $rendererMap-... | php | public function getRenderedMessage() {
if($this->renderedMessage === null and $this->message !== null) {
if(is_string($this->message)) {
$this->renderedMessage = $this->message;
} else {
$rendererMap = \n2n\log4php\Logger::getHierarchy()->getRendererMap();
$this->renderedMessage= $rendererMap-... | [
"public",
"function",
"getRenderedMessage",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"renderedMessage",
"===",
"null",
"and",
"$",
"this",
"->",
"message",
"!==",
"null",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"this",
"->",
"message",
")",
")"... | Render message.
@return string | [
"Render",
"message",
"."
] | 1e6fff4c2785acdb8c2e0c3d5451cbb7e1b51fc2 | https://github.com/n2n/n2n-log4php/blob/1e6fff4c2785acdb8c2e0c3d5451cbb7e1b51fc2/src/app/n2n/log4php/logging/LoggingEvent.php#L268-L278 |
225,587 | n2n/n2n-log4php | src/app/n2n/log4php/logging/LoggingEvent.php | LoggingEvent.getTime | public function getTime() {
$eventTime = $this->getTimeStamp();
$eventStartTime = LoggingEvent::getStartTime();
return number_format(($eventTime - $eventStartTime) * 1000, 0, '', '');
} | php | public function getTime() {
$eventTime = $this->getTimeStamp();
$eventStartTime = LoggingEvent::getStartTime();
return number_format(($eventTime - $eventStartTime) * 1000, 0, '', '');
} | [
"public",
"function",
"getTime",
"(",
")",
"{",
"$",
"eventTime",
"=",
"$",
"this",
"->",
"getTimeStamp",
"(",
")",
";",
"$",
"eventStartTime",
"=",
"LoggingEvent",
"::",
"getStartTime",
"(",
")",
";",
"return",
"number_format",
"(",
"(",
"$",
"eventTime",... | Returns the time in milliseconds passed from the beginning of execution
to the time the event was constructed.
@deprecated This method has been replaced by getRelativeTime which
does not perform unneccesary multiplication and formatting.
@return integer | [
"Returns",
"the",
"time",
"in",
"milliseconds",
"passed",
"from",
"the",
"beginning",
"of",
"execution",
"to",
"the",
"time",
"the",
"event",
"was",
"constructed",
"."
] | 1e6fff4c2785acdb8c2e0c3d5451cbb7e1b51fc2 | https://github.com/n2n/n2n-log4php/blob/1e6fff4c2785acdb8c2e0c3d5451cbb7e1b51fc2/src/app/n2n/log4php/logging/LoggingEvent.php#L318-L322 |
225,588 | 975L/PaymentBundle | Repository/PaymentRepository.php | PaymentRepository.findOneByOrderIdNotFinished | public function findOneByOrderIdNotFinished($orderId)
{
$qb = $this->createQueryBuilder('p');
$qb->select('p')
->where('p.orderId = :orderId')
->andWhere('p.finished is NULL')
->setParameter('orderId', strtoupper($orderId))
;
return $qb->getQu... | php | public function findOneByOrderIdNotFinished($orderId)
{
$qb = $this->createQueryBuilder('p');
$qb->select('p')
->where('p.orderId = :orderId')
->andWhere('p.finished is NULL')
->setParameter('orderId', strtoupper($orderId))
;
return $qb->getQu... | [
"public",
"function",
"findOneByOrderIdNotFinished",
"(",
"$",
"orderId",
")",
"{",
"$",
"qb",
"=",
"$",
"this",
"->",
"createQueryBuilder",
"(",
"'p'",
")",
";",
"$",
"qb",
"->",
"select",
"(",
"'p'",
")",
"->",
"where",
"(",
"'p.orderId = :orderId'",
")"... | Finds Payment not finished with its orderId
@return Payment|null | [
"Finds",
"Payment",
"not",
"finished",
"with",
"its",
"orderId"
] | da3beb13842aea6a3dc278eeb565f519040995b7 | https://github.com/975L/PaymentBundle/blob/da3beb13842aea6a3dc278eeb565f519040995b7/Repository/PaymentRepository.php#L26-L36 |
225,589 | UCSLabs/form | ArrayFormType.php | ArrayFormType.getBuilder | public function getBuilder($group, array $options, array $model, $editMode)
{
if (!isset($options['attr'])) {
$options['attr'] = array();
}
$options['attr']['class'] = 'ucs-fieldgroup';
$builder = $this->formFactory->createNamedBuilder($group, 'form', null, $options);
... | php | public function getBuilder($group, array $options, array $model, $editMode)
{
if (!isset($options['attr'])) {
$options['attr'] = array();
}
$options['attr']['class'] = 'ucs-fieldgroup';
$builder = $this->formFactory->createNamedBuilder($group, 'form', null, $options);
... | [
"public",
"function",
"getBuilder",
"(",
"$",
"group",
",",
"array",
"$",
"options",
",",
"array",
"$",
"model",
",",
"$",
"editMode",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"options",
"[",
"'attr'",
"]",
")",
")",
"{",
"$",
"options",
"[",
... | Create a form builder for the given group
@param string $group
@param array $options
@param array $model
@return FormBuilderInterface | [
"Create",
"a",
"form",
"builder",
"for",
"the",
"given",
"group"
] | ce2f609c4ee48ab8fbd10924685d2531c18652da | https://github.com/UCSLabs/form/blob/ce2f609c4ee48ab8fbd10924685d2531c18652da/ArrayFormType.php#L94-L106 |
225,590 | UCSLabs/form | ArrayFormType.php | ArrayFormType.addFromModel | public function addFromModel(FormBuilderInterface $builder, array $model, $editMode)
{
foreach( $model as $property => $parameters ) {
if( isset($parameters['type']) && $parameters['type'] == 'group') {
$options = array();
if (isset($parameters['options'])) {
... | php | public function addFromModel(FormBuilderInterface $builder, array $model, $editMode)
{
foreach( $model as $property => $parameters ) {
if( isset($parameters['type']) && $parameters['type'] == 'group') {
$options = array();
if (isset($parameters['options'])) {
... | [
"public",
"function",
"addFromModel",
"(",
"FormBuilderInterface",
"$",
"builder",
",",
"array",
"$",
"model",
",",
"$",
"editMode",
")",
"{",
"foreach",
"(",
"$",
"model",
"as",
"$",
"property",
"=>",
"$",
"parameters",
")",
"{",
"if",
"(",
"isset",
"("... | Add fields to the builder from the given model
@param FormBuilderInterface $builder
@param array $model
@throws \RuntimeException if the property widget was not set | [
"Add",
"fields",
"to",
"the",
"builder",
"from",
"the",
"given",
"model"
] | ce2f609c4ee48ab8fbd10924685d2531c18652da | https://github.com/UCSLabs/form/blob/ce2f609c4ee48ab8fbd10924685d2531c18652da/ArrayFormType.php#L116-L135 |
225,591 | UCSLabs/form | ArrayFormType.php | ArrayFormType.buildField | public function buildField(FormBuilderInterface $builder, $property, array $widget, $editMode)
{
if (!isset($widget['options'])) {
$widget['options'] = array();
}
if( !isset($widget['attr']) ) {
$widget['attr'] = array();
}
if (!isset($widget['type'])... | php | public function buildField(FormBuilderInterface $builder, $property, array $widget, $editMode)
{
if (!isset($widget['options'])) {
$widget['options'] = array();
}
if( !isset($widget['attr']) ) {
$widget['attr'] = array();
}
if (!isset($widget['type'])... | [
"public",
"function",
"buildField",
"(",
"FormBuilderInterface",
"$",
"builder",
",",
"$",
"property",
",",
"array",
"$",
"widget",
",",
"$",
"editMode",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"widget",
"[",
"'options'",
"]",
")",
")",
"{",
"$",
... | Add the field to the given widget
@param FormBuilderInterface $builder
@param string $property
@param array $widget
@throws \RuntimeException if the property widget was not set | [
"Add",
"the",
"field",
"to",
"the",
"given",
"widget"
] | ce2f609c4ee48ab8fbd10924685d2531c18652da | https://github.com/UCSLabs/form/blob/ce2f609c4ee48ab8fbd10924685d2531c18652da/ArrayFormType.php#L146-L183 |
225,592 | UCSLabs/form | ArrayFormType.php | ArrayFormType.buildConstraints | protected function buildConstraints($original)
{
$constraints = array();
foreach ($constraints as $name => $params) {
$constraints[] = $this->constraintFactory->buildConstraint($name, $params);
}
return $constraints;
} | php | protected function buildConstraints($original)
{
$constraints = array();
foreach ($constraints as $name => $params) {
$constraints[] = $this->constraintFactory->buildConstraint($name, $params);
}
return $constraints;
} | [
"protected",
"function",
"buildConstraints",
"(",
"$",
"original",
")",
"{",
"$",
"constraints",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"constraints",
"as",
"$",
"name",
"=>",
"$",
"params",
")",
"{",
"$",
"constraints",
"[",
"]",
"=",
"$",
... | Build the final constraints array frmp the original one
@param array $original
@return array | [
"Build",
"the",
"final",
"constraints",
"array",
"frmp",
"the",
"original",
"one"
] | ce2f609c4ee48ab8fbd10924685d2531c18652da | https://github.com/UCSLabs/form/blob/ce2f609c4ee48ab8fbd10924685d2531c18652da/ArrayFormType.php#L192-L201 |
225,593 | sopinetchat/SopinetChatBundle | Topic/SessionTopic.php | SessionTopic.onSubscribe | public function onSubscribe(ConnectionInterface $connection, Topic $topic, WampRequest $request)
{
//this will broadcast the message to ALL subscribers of this topic.
$topic->broadcast(['msg' => $connection->resourceId . " has joined " . $topic->getId()]);
} | php | public function onSubscribe(ConnectionInterface $connection, Topic $topic, WampRequest $request)
{
//this will broadcast the message to ALL subscribers of this topic.
$topic->broadcast(['msg' => $connection->resourceId . " has joined " . $topic->getId()]);
} | [
"public",
"function",
"onSubscribe",
"(",
"ConnectionInterface",
"$",
"connection",
",",
"Topic",
"$",
"topic",
",",
"WampRequest",
"$",
"request",
")",
"{",
"//this will broadcast the message to ALL subscribers of this topic.",
"$",
"topic",
"->",
"broadcast",
"(",
"["... | This will receive any Subscription requests for this topic.
@param ConnectionInterface $connection
@param Topic $topic
@param WampRequest $request
@return void | [
"This",
"will",
"receive",
"any",
"Subscription",
"requests",
"for",
"this",
"topic",
"."
] | 92c306963d8e9c74ecaa06422cea65bcf1bb3ba2 | https://github.com/sopinetchat/SopinetChatBundle/blob/92c306963d8e9c74ecaa06422cea65bcf1bb3ba2/Topic/SessionTopic.php#L32-L36 |
225,594 | sopinetchat/SopinetChatBundle | Topic/SessionTopic.php | SessionTopic.onPublish | public function onPublish(ConnectionInterface $connection, Topic $topic, WampRequest $request, $event, array $exclude, array $eligible)
{
/*
$topic->getId() will contain the FULL requested uri, so you can proceed based on that
if ($topic->getId() == "chat/channel/shout") ???????????... | php | public function onPublish(ConnectionInterface $connection, Topic $topic, WampRequest $request, $event, array $exclude, array $eligible)
{
/*
$topic->getId() will contain the FULL requested uri, so you can proceed based on that
if ($topic->getId() == "chat/channel/shout") ???????????... | [
"public",
"function",
"onPublish",
"(",
"ConnectionInterface",
"$",
"connection",
",",
"Topic",
"$",
"topic",
",",
"WampRequest",
"$",
"request",
",",
"$",
"event",
",",
"array",
"$",
"exclude",
",",
"array",
"$",
"eligible",
")",
"{",
"/*\n $topic-... | This will receive any Publish requests for this topic.
@param ConnectionInterface $connection
@param $Topic topic
@param WampRequest $request
@param $event
@param array $exclude
@param array $eligibles
@return mixed|void | [
"This",
"will",
"receive",
"any",
"Publish",
"requests",
"for",
"this",
"topic",
"."
] | 92c306963d8e9c74ecaa06422cea65bcf1bb3ba2 | https://github.com/sopinetchat/SopinetChatBundle/blob/92c306963d8e9c74ecaa06422cea65bcf1bb3ba2/Topic/SessionTopic.php#L63-L75 |
225,595 | Erebot/API | src/Utils.php | Utils.humanSize | public static function humanSize($size, $max = null, $system = 'si', $retstring = '%01.2f %s')
{
// Pick units
$systems = array();
$systems['si']['suffix'] = array('B', 'KB', 'MB', 'GB', 'TB', 'PB');
$systems['si']['size'] = 1000;
$systems['bi']['suffix'] = array('B', 'KiB'... | php | public static function humanSize($size, $max = null, $system = 'si', $retstring = '%01.2f %s')
{
// Pick units
$systems = array();
$systems['si']['suffix'] = array('B', 'KB', 'MB', 'GB', 'TB', 'PB');
$systems['si']['size'] = 1000;
$systems['bi']['suffix'] = array('B', 'KiB'... | [
"public",
"static",
"function",
"humanSize",
"(",
"$",
"size",
",",
"$",
"max",
"=",
"null",
",",
"$",
"system",
"=",
"'si'",
",",
"$",
"retstring",
"=",
"'%01.2f %s'",
")",
"{",
"// Pick units",
"$",
"systems",
"=",
"array",
"(",
")",
";",
"$",
"sys... | Return human readable sizes.
@author Aidan Lister <aidan@php.net>
@version 1.3.0
@see http://aidanlister.com/2004/04/human-readable-file-sizes/
@param int $size size in bytes
@param string $max maximum unit
@param string $system 'si' for SI, 'bi' for binary ... | [
"Return",
"human",
"readable",
"sizes",
"."
] | 0bff8d2048ace141aca0a536b931cf9a0186e1e3 | https://github.com/Erebot/API/blob/0bff8d2048ace141aca0a536b931cf9a0186e1e3/src/Utils.php#L280-L304 |
225,596 | bytic/Common | src/Application/Controllers/Traits/PageControllerTrait.php | PageControllerTrait.setMeta | protected function setMeta()
{
$this->getView()->Meta()->populateFromConfig(
$this->getConfig()->get('meta')
);
$favicon = new Favicon();
$favicon->setBaseDir(asset('images/favicon'));
$favicon->addAll();
$this->getView()->set('favicon', $favicon);
} | php | protected function setMeta()
{
$this->getView()->Meta()->populateFromConfig(
$this->getConfig()->get('meta')
);
$favicon = new Favicon();
$favicon->setBaseDir(asset('images/favicon'));
$favicon->addAll();
$this->getView()->set('favicon', $favicon);
} | [
"protected",
"function",
"setMeta",
"(",
")",
"{",
"$",
"this",
"->",
"getView",
"(",
")",
"->",
"Meta",
"(",
")",
"->",
"populateFromConfig",
"(",
"$",
"this",
"->",
"getConfig",
"(",
")",
"->",
"get",
"(",
"'meta'",
")",
")",
";",
"$",
"favicon",
... | Set meta information
@return void | [
"Set",
"meta",
"information"
] | 5d17043e03a2274a758fba1f6dedb7d85195bcfb | https://github.com/bytic/Common/blob/5d17043e03a2274a758fba1f6dedb7d85195bcfb/src/Application/Controllers/Traits/PageControllerTrait.php#L58-L68 |
225,597 | swayok/peskyorm-laravel | src/PeskyORMLaravel/Db/Column/Utils/FileUploadingColumnClosures.php | FileUploadingColumnClosures.valueDeleteExtender | static public function valueDeleteExtender(RecordValue $valueContainer, $deleteFiles) {
if ($deleteFiles) {
/** @var FileColumn $column */
$column = $valueContainer->getColumn();
$fileConfig = $column->getConfiguration();
$pkValue = $valueContainer->getRecord()->g... | php | static public function valueDeleteExtender(RecordValue $valueContainer, $deleteFiles) {
if ($deleteFiles) {
/** @var FileColumn $column */
$column = $valueContainer->getColumn();
$fileConfig = $column->getConfiguration();
$pkValue = $valueContainer->getRecord()->g... | [
"static",
"public",
"function",
"valueDeleteExtender",
"(",
"RecordValue",
"$",
"valueContainer",
",",
"$",
"deleteFiles",
")",
"{",
"if",
"(",
"$",
"deleteFiles",
")",
"{",
"/** @var FileColumn $column */",
"$",
"column",
"=",
"$",
"valueContainer",
"->",
"getCol... | Additional actions after record deleted from DB
@param RecordValue $valueContainer
@param bool $deleteFiles
@return void
@throws \UnexpectedValueException
@throws \InvalidArgumentException
@throws \BadMethodCallException | [
"Additional",
"actions",
"after",
"record",
"deleted",
"from",
"DB"
] | ae5a285790eade3435f9fcbb6c376b755a5c3956 | https://github.com/swayok/peskyorm-laravel/blob/ae5a285790eade3435f9fcbb6c376b755a5c3956/src/PeskyORMLaravel/Db/Column/Utils/FileUploadingColumnClosures.php#L426-L437 |
225,598 | n2n/n2n-log4php | src/app/n2n/log4php/appender/mongo/MongoDB.php | MongoDB.append | public function append(\n2n\log4php\logging\LoggingEvent $event) {
try {
if ($this->collection != null) {
$this->collection->insert($this->format($event));
}
} catch (MongoCursorException $ex) {
$this->warn(sprintf('Error while writing to mongo collection: %s', $ex->getMessage()));
}
} | php | public function append(\n2n\log4php\logging\LoggingEvent $event) {
try {
if ($this->collection != null) {
$this->collection->insert($this->format($event));
}
} catch (MongoCursorException $ex) {
$this->warn(sprintf('Error while writing to mongo collection: %s', $ex->getMessage()));
}
} | [
"public",
"function",
"append",
"(",
"\\",
"n2n",
"\\",
"log4php",
"\\",
"logging",
"\\",
"LoggingEvent",
"$",
"event",
")",
"{",
"try",
"{",
"if",
"(",
"$",
"this",
"->",
"collection",
"!=",
"null",
")",
"{",
"$",
"this",
"->",
"collection",
"->",
"... | Appends a new event to the mongo database.
@param \n2n\log4php\logging\LoggingEvent $event | [
"Appends",
"a",
"new",
"event",
"to",
"the",
"mongo",
"database",
"."
] | 1e6fff4c2785acdb8c2e0c3d5451cbb7e1b51fc2 | https://github.com/n2n/n2n-log4php/blob/1e6fff4c2785acdb8c2e0c3d5451cbb7e1b51fc2/src/app/n2n/log4php/appender/mongo/MongoDB.php#L152-L160 |
225,599 | n2n/n2n-log4php | src/app/n2n/log4php/appender/mongo/MongoDB.php | MongoDB.format | protected function format(\n2n\log4php\logging\LoggingEvent $event) {
$timestampSec = (int) $event->getTimestamp();
$timestampUsec = (int) (($event->getTimestamp() - $timestampSec) * 1000000);
$document = array(
'timestamp' => new MongoDate($timestampSec, $timestampUsec),
'level' => $event->getLevel(... | php | protected function format(\n2n\log4php\logging\LoggingEvent $event) {
$timestampSec = (int) $event->getTimestamp();
$timestampUsec = (int) (($event->getTimestamp() - $timestampSec) * 1000000);
$document = array(
'timestamp' => new MongoDate($timestampSec, $timestampUsec),
'level' => $event->getLevel(... | [
"protected",
"function",
"format",
"(",
"\\",
"n2n",
"\\",
"log4php",
"\\",
"logging",
"\\",
"LoggingEvent",
"$",
"event",
")",
"{",
"$",
"timestampSec",
"=",
"(",
"int",
")",
"$",
"event",
"->",
"getTimestamp",
"(",
")",
";",
"$",
"timestampUsec",
"=",
... | Converts the logging event into an array which can be logged to mongodb.
@param \n2n\log4php\logging\LoggingEvent $event
@return array The array representation of the logging event. | [
"Converts",
"the",
"logging",
"event",
"into",
"an",
"array",
"which",
"can",
"be",
"logged",
"to",
"mongodb",
"."
] | 1e6fff4c2785acdb8c2e0c3d5451cbb7e1b51fc2 | https://github.com/n2n/n2n-log4php/blob/1e6fff4c2785acdb8c2e0c3d5451cbb7e1b51fc2/src/app/n2n/log4php/appender/mongo/MongoDB.php#L168-L194 |
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.