repository_name stringlengths 5 67 | func_path_in_repository stringlengths 4 234 | func_name stringlengths 0 314 | whole_func_string stringlengths 52 3.87M | language stringclasses 6
values | func_code_string stringlengths 52 3.87M | func_code_tokens listlengths 15 672k | func_documentation_string stringlengths 1 47.2k | func_documentation_tokens listlengths 1 3.92k | split_name stringclasses 1
value | func_code_url stringlengths 85 339 |
|---|---|---|---|---|---|---|---|---|---|---|
datasift/php_webdriver | src/php/DataSift/BrowserMobProxy/BrowserMobProxySession.php | BrowserMobProxySession.getHAR | public function getHAR($logName = 'default')
{
$this->requireOpenConnection();
$response = $this->curl(
'GET',
'/proxy/' . $this->port . '/har'
);
$har = new HttpArchive();
$har->initFromProxyData($response);
return $har;
} | php | public function getHAR($logName = 'default')
{
$this->requireOpenConnection();
$response = $this->curl(
'GET',
'/proxy/' . $this->port . '/har'
);
$har = new HttpArchive();
$har->initFromProxyData($response);
return $har;
} | [
"public",
"function",
"getHAR",
"(",
"$",
"logName",
"=",
"'default'",
")",
"{",
"$",
"this",
"->",
"requireOpenConnection",
"(",
")",
";",
"$",
"response",
"=",
"$",
"this",
"->",
"curl",
"(",
"'GET'",
",",
"'/proxy/'",
".",
"$",
"this",
"->",
"port",... | get the HTTP request/response details about the last page, in
HTTP Archive (HAR) format
@param string $logName name of the log used with startHAR()
@return HttpArchive | [
"get",
"the",
"HTTP",
"request",
"/",
"response",
"details",
"about",
"the",
"last",
"page",
"in",
"HTTP",
"Archive",
"(",
"HAR",
")",
"format"
] | train | https://github.com/datasift/php_webdriver/blob/efca991198616b53c8f40b59ad05306e2b10e7f0/src/php/DataSift/BrowserMobProxy/BrowserMobProxySession.php#L123-L136 |
datasift/php_webdriver | src/php/DataSift/BrowserMobProxy/BrowserMobProxySession.php | BrowserMobProxySession.setHeaders | public function setHeaders($headers)
{
$this->requireOpenConnection();
$response = $this->curl(
'POST',
'/proxy/' . $this->port . '/headers',
(object)$headers
);
} | php | public function setHeaders($headers)
{
$this->requireOpenConnection();
$response = $this->curl(
'POST',
'/proxy/' . $this->port . '/headers',
(object)$headers
);
} | [
"public",
"function",
"setHeaders",
"(",
"$",
"headers",
")",
"{",
"$",
"this",
"->",
"requireOpenConnection",
"(",
")",
";",
"$",
"response",
"=",
"$",
"this",
"->",
"curl",
"(",
"'POST'",
",",
"'/proxy/'",
".",
"$",
"this",
"->",
"port",
".",
"'/head... | inject a set of headers into all subsequent requests
@param array(string => string) $headers
a list of headers to inject, with the array key being the name
of the header, and the array value being the value of the header
@return void | [
"inject",
"a",
"set",
"of",
"headers",
"into",
"all",
"subsequent",
"requests"
] | train | https://github.com/datasift/php_webdriver/blob/efca991198616b53c8f40b59ad05306e2b10e7f0/src/php/DataSift/BrowserMobProxy/BrowserMobProxySession.php#L147-L156 |
datasift/php_webdriver | src/php/DataSift/BrowserMobProxy/BrowserMobProxySession.php | BrowserMobProxySession.removeHeader | public function removeHeader($name) {
$this->requireOpenConnection();
$this->requireFeature('headerGetDelete');
$response = $this->curl(
'DELETE',
'/proxy/' . $this->port . '/header/' . urlencode($name)
);
} | php | public function removeHeader($name) {
$this->requireOpenConnection();
$this->requireFeature('headerGetDelete');
$response = $this->curl(
'DELETE',
'/proxy/' . $this->port . '/header/' . urlencode($name)
);
} | [
"public",
"function",
"removeHeader",
"(",
"$",
"name",
")",
"{",
"$",
"this",
"->",
"requireOpenConnection",
"(",
")",
";",
"$",
"this",
"->",
"requireFeature",
"(",
"'headerGetDelete'",
")",
";",
"$",
"response",
"=",
"$",
"this",
"->",
"curl",
"(",
"'... | remove a header from the list of headers that browsermob-proxy
injects for us
@param string
the header to remove
@return void | [
"remove",
"a",
"header",
"from",
"the",
"list",
"of",
"headers",
"that",
"browsermob",
"-",
"proxy",
"injects",
"for",
"us"
] | train | https://github.com/datasift/php_webdriver/blob/efca991198616b53c8f40b59ad05306e2b10e7f0/src/php/DataSift/BrowserMobProxy/BrowserMobProxySession.php#L167-L175 |
datasift/php_webdriver | src/php/DataSift/BrowserMobProxy/BrowserMobProxySession.php | BrowserMobProxySession.removeAllHeaders | public function removeAllHeaders() {
$this->requireOpenConnection();
$this->requireFeature('headerGetDelete');
$response = $this->curl(
'DELETE',
'/proxy/' . $this->port . '/headers'
);
} | php | public function removeAllHeaders() {
$this->requireOpenConnection();
$this->requireFeature('headerGetDelete');
$response = $this->curl(
'DELETE',
'/proxy/' . $this->port . '/headers'
);
} | [
"public",
"function",
"removeAllHeaders",
"(",
")",
"{",
"$",
"this",
"->",
"requireOpenConnection",
"(",
")",
";",
"$",
"this",
"->",
"requireFeature",
"(",
"'headerGetDelete'",
")",
";",
"$",
"response",
"=",
"$",
"this",
"->",
"curl",
"(",
"'DELETE'",
"... | remove all of the headers that browsermob-proxy injects for us
@return void | [
"remove",
"all",
"of",
"the",
"headers",
"that",
"browsermob",
"-",
"proxy",
"injects",
"for",
"us"
] | train | https://github.com/datasift/php_webdriver/blob/efca991198616b53c8f40b59ad05306e2b10e7f0/src/php/DataSift/BrowserMobProxy/BrowserMobProxySession.php#L182-L190 |
datasift/php_webdriver | src/php/DataSift/BrowserMobProxy/BrowserMobProxySession.php | BrowserMobProxySession.setHttpBasicAuth | public function setHttpBasicAuth($domain, $username, $password) {
$this->requireOpenConnection();
$this->requireFeature('authBasic');
$response = $this->curl(
'PUT',
'/proxy/' . $this->port . '/auth/basic/' . urlencode($domain),
array(
'userna... | php | public function setHttpBasicAuth($domain, $username, $password) {
$this->requireOpenConnection();
$this->requireFeature('authBasic');
$response = $this->curl(
'PUT',
'/proxy/' . $this->port . '/auth/basic/' . urlencode($domain),
array(
'userna... | [
"public",
"function",
"setHttpBasicAuth",
"(",
"$",
"domain",
",",
"$",
"username",
",",
"$",
"password",
")",
"{",
"$",
"this",
"->",
"requireOpenConnection",
"(",
")",
";",
"$",
"this",
"->",
"requireFeature",
"(",
"'authBasic'",
")",
";",
"$",
"response... | enable HTTP BASIC auth
@param string $domain
the DNS domain to send HTTP BASIC auth info to
@param $username
the username to send to the web server
@param string $password
the password to send to the web server | [
"enable",
"HTTP",
"BASIC",
"auth"
] | train | https://github.com/datasift/php_webdriver/blob/efca991198616b53c8f40b59ad05306e2b10e7f0/src/php/DataSift/BrowserMobProxy/BrowserMobProxySession.php#L222-L234 |
datasift/php_webdriver | src/php/DataSift/BrowserMobProxy/BrowserMobProxySession.php | BrowserMobProxySession.close | public function close()
{
$this->requireOpenConnection();
$response = $this->curl(
'DELETE',
'/proxy/' . $this->port
);
$this->closed = true;
} | php | public function close()
{
$this->requireOpenConnection();
$response = $this->curl(
'DELETE',
'/proxy/' . $this->port
);
$this->closed = true;
} | [
"public",
"function",
"close",
"(",
")",
"{",
"$",
"this",
"->",
"requireOpenConnection",
"(",
")",
";",
"$",
"response",
"=",
"$",
"this",
"->",
"curl",
"(",
"'DELETE'",
",",
"'/proxy/'",
".",
"$",
"this",
"->",
"port",
")",
";",
"$",
"this",
"->",
... | delete the proxy, because we're done
@return void | [
"delete",
"the",
"proxy",
"because",
"we",
"re",
"done"
] | train | https://github.com/datasift/php_webdriver/blob/efca991198616b53c8f40b59ad05306e2b10e7f0/src/php/DataSift/BrowserMobProxy/BrowserMobProxySession.php#L241-L251 |
flipboxstudio/orm-manager | src/Flipbox/OrmManager/Consoles/Command.php | Command.choice | public function choice($question, array $choices, $default = null, $attempts = null, $multiple = null)
{
return parent::choice($this->setTextPrompt($question), $choices, $default, $attempts, $multiple);
} | php | public function choice($question, array $choices, $default = null, $attempts = null, $multiple = null)
{
return parent::choice($this->setTextPrompt($question), $choices, $default, $attempts, $multiple);
} | [
"public",
"function",
"choice",
"(",
"$",
"question",
",",
"array",
"$",
"choices",
",",
"$",
"default",
"=",
"null",
",",
"$",
"attempts",
"=",
"null",
",",
"$",
"multiple",
"=",
"null",
")",
"{",
"return",
"parent",
"::",
"choice",
"(",
"$",
"this"... | Give the user a single choice from an array of answers.
@param string $question
@param array $choices
@param string $default
@param mixed $attempts
@param bool $multiple
@return string | [
"Give",
"the",
"user",
"a",
"single",
"choice",
"from",
"an",
"array",
"of",
"answers",
"."
] | train | https://github.com/flipboxstudio/orm-manager/blob/4288426517f53d05177b8729c4ba94c5beca9a98/src/Flipbox/OrmManager/Consoles/Command.php#L45-L48 |
flipboxstudio/orm-manager | src/Flipbox/OrmManager/Consoles/Command.php | Command.title | public function title($string, $backgorund='blue', $forgeground='white')
{
$string = $this->paintString(" {$string} ", $forgeground, $backgorund);
echo $string ."\n\r";
} | php | public function title($string, $backgorund='blue', $forgeground='white')
{
$string = $this->paintString(" {$string} ", $forgeground, $backgorund);
echo $string ."\n\r";
} | [
"public",
"function",
"title",
"(",
"$",
"string",
",",
"$",
"backgorund",
"=",
"'blue'",
",",
"$",
"forgeground",
"=",
"'white'",
")",
"{",
"$",
"string",
"=",
"$",
"this",
"->",
"paintString",
"(",
"\" {$string} \"",
",",
"$",
"forgeground",
",",
"$",
... | Write title output.
@param string $string
@return void | [
"Write",
"title",
"output",
"."
] | train | https://github.com/flipboxstudio/orm-manager/blob/4288426517f53d05177b8729c4ba94c5beca9a98/src/Flipbox/OrmManager/Consoles/Command.php#L83-L88 |
webforge-labs/psc-cms | lib/Psc/CMS/Modules.php | Modules.create | protected function create($name) {
$c = $this->avaibleModules[$name]['class'];
$module = new $c($this->project, $this->inTests);
$module->setName($name);
$this->modules[$name] = $module;
PSC::getEventManager()->dispatchEvent('Psc.ModuleCreated', NULL, $module);
return $module;
} | php | protected function create($name) {
$c = $this->avaibleModules[$name]['class'];
$module = new $c($this->project, $this->inTests);
$module->setName($name);
$this->modules[$name] = $module;
PSC::getEventManager()->dispatchEvent('Psc.ModuleCreated', NULL, $module);
return $module;
} | [
"protected",
"function",
"create",
"(",
"$",
"name",
")",
"{",
"$",
"c",
"=",
"$",
"this",
"->",
"avaibleModules",
"[",
"$",
"name",
"]",
"[",
"'class'",
"]",
";",
"$",
"module",
"=",
"new",
"$",
"c",
"(",
"$",
"this",
"->",
"project",
",",
"$",
... | Erstellt ein neues Modul
wird nur einmal aufgerufen pro Request
vorher wurde mit isModule ($name) bereits überprüft
@return Psc\CMS\Module | [
"Erstellt",
"ein",
"neues",
"Modul"
] | train | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/CMS/Modules.php#L50-L60 |
kherge-abandoned/php-wise | src/lib/Herrera/Wise/Loader/XmlFileLoader.php | XmlFileLoader.toArray | private function toArray(DOMElement $node)
{
$value = null;
switch ($node->nodeName) {
case 'array':
$value = array();
if ($node->hasChildNodes()) {
for ($i = 0; $i < $node->childNodes->length; $i++) {
/** @var... | php | private function toArray(DOMElement $node)
{
$value = null;
switch ($node->nodeName) {
case 'array':
$value = array();
if ($node->hasChildNodes()) {
for ($i = 0; $i < $node->childNodes->length; $i++) {
/** @var... | [
"private",
"function",
"toArray",
"(",
"DOMElement",
"$",
"node",
")",
"{",
"$",
"value",
"=",
"null",
";",
"switch",
"(",
"$",
"node",
"->",
"nodeName",
")",
"{",
"case",
"'array'",
":",
"$",
"value",
"=",
"array",
"(",
")",
";",
"if",
"(",
"$",
... | Converts a DOM elements to native PHP values.
@param DOMElement $node The node.
@return mixed The result. | [
"Converts",
"a",
"DOM",
"elements",
"to",
"native",
"PHP",
"values",
"."
] | train | https://github.com/kherge-abandoned/php-wise/blob/7621e0be7dbb2a015d68197d290fe8469f539a4d/src/lib/Herrera/Wise/Loader/XmlFileLoader.php#L46-L82 |
2amigos/yiifoundation | widgets/InterChange.php | Interchange.init | public function init()
{
$this->assets = array(
'js' => YII_DEBUG ? 'foundation/foundation.interchange.js' : 'foundation.min.js'
);
$this->htmlOptions['src'] = $this->src;
parent::init();
} | php | public function init()
{
$this->assets = array(
'js' => YII_DEBUG ? 'foundation/foundation.interchange.js' : 'foundation.min.js'
);
$this->htmlOptions['src'] = $this->src;
parent::init();
} | [
"public",
"function",
"init",
"(",
")",
"{",
"$",
"this",
"->",
"assets",
"=",
"array",
"(",
"'js'",
"=>",
"YII_DEBUG",
"?",
"'foundation/foundation.interchange.js'",
":",
"'foundation.min.js'",
")",
";",
"$",
"this",
"->",
"htmlOptions",
"[",
"'src'",
"]",
... | Initializes the widget | [
"Initializes",
"the",
"widget"
] | train | https://github.com/2amigos/yiifoundation/blob/49bed0d3ca1a9bac9299000e48a2661bdc8f9a29/widgets/InterChange.php#L40-L49 |
2amigos/yiifoundation | widgets/InterChange.php | Interchange.renderImage | public function renderImage()
{
$rules = array();
foreach ($this->rules as $rule) {
$rules[] = '[' . implode(", ", $rule) . ']';
}
$this->htmlOptions['data-interchange'] = implode(", ", $rules);
return \CHtml::tag('img', $this->htmlOptions);
} | php | public function renderImage()
{
$rules = array();
foreach ($this->rules as $rule) {
$rules[] = '[' . implode(", ", $rule) . ']';
}
$this->htmlOptions['data-interchange'] = implode(", ", $rules);
return \CHtml::tag('img', $this->htmlOptions);
} | [
"public",
"function",
"renderImage",
"(",
")",
"{",
"$",
"rules",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"rules",
"as",
"$",
"rule",
")",
"{",
"$",
"rules",
"[",
"]",
"=",
"'['",
".",
"implode",
"(",
"\", \"",
",",
"$",
... | Renders the interchange image
@return string the resulting img tag | [
"Renders",
"the",
"interchange",
"image"
] | train | https://github.com/2amigos/yiifoundation/blob/49bed0d3ca1a9bac9299000e48a2661bdc8f9a29/widgets/InterChange.php#L63-L71 |
Chill-project/Main | Controller/UserController.php | UserController.createAction | public function createAction(Request $request)
{
$user = new User();
$form = $this->createCreateForm($user);
$form->handleRequest($request);
if ($form->isValid()) {
$em = $this->getDoctrine()->getManager();
$user->setPassword($this->get('security... | php | public function createAction(Request $request)
{
$user = new User();
$form = $this->createCreateForm($user);
$form->handleRequest($request);
if ($form->isValid()) {
$em = $this->getDoctrine()->getManager();
$user->setPassword($this->get('security... | [
"public",
"function",
"createAction",
"(",
"Request",
"$",
"request",
")",
"{",
"$",
"user",
"=",
"new",
"User",
"(",
")",
";",
"$",
"form",
"=",
"$",
"this",
"->",
"createCreateForm",
"(",
"$",
"user",
")",
";",
"$",
"form",
"->",
"handleRequest",
"... | Creates a new User entity. | [
"Creates",
"a",
"new",
"User",
"entity",
"."
] | train | https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Controller/UserController.php#L41-L63 |
Chill-project/Main | Controller/UserController.php | UserController.createCreateForm | private function createCreateForm(User $entity)
{
$form = $this->createForm(new UserType(), $entity, array(
'action' => $this->generateUrl('admin_user_create'),
'method' => 'POST',
'is_creation' => true
));
$form->add('submit', 'submit', array('label' => ... | php | private function createCreateForm(User $entity)
{
$form = $this->createForm(new UserType(), $entity, array(
'action' => $this->generateUrl('admin_user_create'),
'method' => 'POST',
'is_creation' => true
));
$form->add('submit', 'submit', array('label' => ... | [
"private",
"function",
"createCreateForm",
"(",
"User",
"$",
"entity",
")",
"{",
"$",
"form",
"=",
"$",
"this",
"->",
"createForm",
"(",
"new",
"UserType",
"(",
")",
",",
"$",
"entity",
",",
"array",
"(",
"'action'",
"=>",
"$",
"this",
"->",
"generateU... | Creates a form to create a User entity.
@param User $entity The entity
@return \Symfony\Component\Form\Form The form | [
"Creates",
"a",
"form",
"to",
"create",
"a",
"User",
"entity",
"."
] | train | https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Controller/UserController.php#L72-L83 |
Chill-project/Main | Controller/UserController.php | UserController.newAction | public function newAction()
{
$user = new User();
$form = $this->createCreateForm($user);
return $this->render('ChillMainBundle:User:new.html.twig', array(
'entity' => $user,
'form' => $form->createView(),
));
} | php | public function newAction()
{
$user = new User();
$form = $this->createCreateForm($user);
return $this->render('ChillMainBundle:User:new.html.twig', array(
'entity' => $user,
'form' => $form->createView(),
));
} | [
"public",
"function",
"newAction",
"(",
")",
"{",
"$",
"user",
"=",
"new",
"User",
"(",
")",
";",
"$",
"form",
"=",
"$",
"this",
"->",
"createCreateForm",
"(",
"$",
"user",
")",
";",
"return",
"$",
"this",
"->",
"render",
"(",
"'ChillMainBundle:User:ne... | Displays a form to create a new User entity. | [
"Displays",
"a",
"form",
"to",
"create",
"a",
"new",
"User",
"entity",
"."
] | train | https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Controller/UserController.php#L89-L98 |
Chill-project/Main | Controller/UserController.php | UserController.editAction | public function editAction($id)
{
$em = $this->getDoctrine()->getManager();
$user = $em->getRepository('ChillMainBundle:User')->find($id);
if (!$user) {
throw $this->createNotFoundException('Unable to find User entity.');
}
$editForm = $this->createEditForm($us... | php | public function editAction($id)
{
$em = $this->getDoctrine()->getManager();
$user = $em->getRepository('ChillMainBundle:User')->find($id);
if (!$user) {
throw $this->createNotFoundException('Unable to find User entity.');
}
$editForm = $this->createEditForm($us... | [
"public",
"function",
"editAction",
"(",
"$",
"id",
")",
"{",
"$",
"em",
"=",
"$",
"this",
"->",
"getDoctrine",
"(",
")",
"->",
"getManager",
"(",
")",
";",
"$",
"user",
"=",
"$",
"em",
"->",
"getRepository",
"(",
"'ChillMainBundle:User'",
")",
"->",
... | Displays a form to edit an existing User entity. | [
"Displays",
"a",
"form",
"to",
"edit",
"an",
"existing",
"User",
"entity",
"."
] | train | https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Controller/UserController.php#L123-L146 |
Chill-project/Main | Controller/UserController.php | UserController.editPasswordAction | public function editPasswordAction($id)
{
$em = $this->getDoctrine()->getManager();
$user = $em->getRepository('ChillMainBundle:User')->find($id);
if (!$user) {
throw $this->createNotFoundException('Unable to find User entity.');
}
$editForm = $this->createEdit... | php | public function editPasswordAction($id)
{
$em = $this->getDoctrine()->getManager();
$user = $em->getRepository('ChillMainBundle:User')->find($id);
if (!$user) {
throw $this->createNotFoundException('Unable to find User entity.');
}
$editForm = $this->createEdit... | [
"public",
"function",
"editPasswordAction",
"(",
"$",
"id",
")",
"{",
"$",
"em",
"=",
"$",
"this",
"->",
"getDoctrine",
"(",
")",
"->",
"getManager",
"(",
")",
";",
"$",
"user",
"=",
"$",
"em",
"->",
"getRepository",
"(",
"'ChillMainBundle:User'",
")",
... | Displays a form to edit the user password. | [
"Displays",
"a",
"form",
"to",
"edit",
"the",
"user",
"password",
"."
] | train | https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Controller/UserController.php#L152-L168 |
Chill-project/Main | Controller/UserController.php | UserController.createEditForm | private function createEditForm(User $user)
{
$form = $this->createForm(new UserType(), $user, array(
'action' => $this->generateUrl('admin_user_update', array('id' => $user->getId())),
'method' => 'PUT',
));
$form->add('submit', 'submit', array('label' => 'Update'))... | php | private function createEditForm(User $user)
{
$form = $this->createForm(new UserType(), $user, array(
'action' => $this->generateUrl('admin_user_update', array('id' => $user->getId())),
'method' => 'PUT',
));
$form->add('submit', 'submit', array('label' => 'Update'))... | [
"private",
"function",
"createEditForm",
"(",
"User",
"$",
"user",
")",
"{",
"$",
"form",
"=",
"$",
"this",
"->",
"createForm",
"(",
"new",
"UserType",
"(",
")",
",",
"$",
"user",
",",
"array",
"(",
"'action'",
"=>",
"$",
"this",
"->",
"generateUrl",
... | Creates a form to edit a User entity.
@param User $user The entity
@return \Symfony\Component\Form\Form The form | [
"Creates",
"a",
"form",
"to",
"edit",
"a",
"User",
"entity",
"."
] | train | https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Controller/UserController.php#L291-L301 |
Chill-project/Main | Controller/UserController.php | UserController.updateAction | public function updateAction(Request $request, $id)
{
$em = $this->getDoctrine()->getManager();
$user = $em->getRepository('ChillMainBundle:User')->find($id);
if (!$user) {
throw $this->createNotFoundException('Unable to find User entity.');
}
$editForm = $this... | php | public function updateAction(Request $request, $id)
{
$em = $this->getDoctrine()->getManager();
$user = $em->getRepository('ChillMainBundle:User')->find($id);
if (!$user) {
throw $this->createNotFoundException('Unable to find User entity.');
}
$editForm = $this... | [
"public",
"function",
"updateAction",
"(",
"Request",
"$",
"request",
",",
"$",
"id",
")",
"{",
"$",
"em",
"=",
"$",
"this",
"->",
"getDoctrine",
"(",
")",
"->",
"getManager",
"(",
")",
";",
"$",
"user",
"=",
"$",
"em",
"->",
"getRepository",
"(",
... | Edits an existing User entity. | [
"Edits",
"an",
"existing",
"User",
"entity",
"."
] | train | https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Controller/UserController.php#L307-L337 |
Chill-project/Main | Controller/UserController.php | UserController.updatePasswordAction | public function updatePasswordAction(Request $request, $id)
{
$em = $this->getDoctrine()->getManager();
$user = $em->getRepository('ChillMainBundle:User')->find($id);
if (!$user) {
throw $this->createNotFoundException('Unable to find User entity.');
}
$editForm... | php | public function updatePasswordAction(Request $request, $id)
{
$em = $this->getDoctrine()->getManager();
$user = $em->getRepository('ChillMainBundle:User')->find($id);
if (!$user) {
throw $this->createNotFoundException('Unable to find User entity.');
}
$editForm... | [
"public",
"function",
"updatePasswordAction",
"(",
"Request",
"$",
"request",
",",
"$",
"id",
")",
"{",
"$",
"em",
"=",
"$",
"this",
"->",
"getDoctrine",
"(",
")",
"->",
"getManager",
"(",
")",
";",
"$",
"user",
"=",
"$",
"em",
"->",
"getRepository",
... | Edits the user password | [
"Edits",
"the",
"user",
"password"
] | train | https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Controller/UserController.php#L343-L381 |
Chill-project/Main | Controller/UserController.php | UserController.createDeleteLinkGroupCenterForm | private function createDeleteLinkGroupCenterForm(User $user, GroupCenter $groupCenter)
{
return $this->createFormBuilder()
->setAction($this->generateUrl('admin_user_delete_group_center',
array('uid' => $user->getId(), 'gcid' => $groupCenter->getId())))
->setMeth... | php | private function createDeleteLinkGroupCenterForm(User $user, GroupCenter $groupCenter)
{
return $this->createFormBuilder()
->setAction($this->generateUrl('admin_user_delete_group_center',
array('uid' => $user->getId(), 'gcid' => $groupCenter->getId())))
->setMeth... | [
"private",
"function",
"createDeleteLinkGroupCenterForm",
"(",
"User",
"$",
"user",
",",
"GroupCenter",
"$",
"groupCenter",
")",
"{",
"return",
"$",
"this",
"->",
"createFormBuilder",
"(",
")",
"->",
"setAction",
"(",
"$",
"this",
"->",
"generateUrl",
"(",
"'a... | Creates a form to delete a link to a GroupCenter
@param mixed $permissionsGroup The entity id
@return \Symfony\Component\Form\Form The form | [
"Creates",
"a",
"form",
"to",
"delete",
"a",
"link",
"to",
"a",
"GroupCenter"
] | train | https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Controller/UserController.php#L391-L400 |
Chill-project/Main | Controller/UserController.php | UserController.createAddLinkGroupCenterForm | private function createAddLinkGroupCenterForm(User $user)
{
return $this->createFormBuilder()
->setAction($this->generateUrl('admin_user_add_group_center',
array('uid' => $user->getId())))
->setMethod('POST')
->add(self::FORM_GROUP_CEN... | php | private function createAddLinkGroupCenterForm(User $user)
{
return $this->createFormBuilder()
->setAction($this->generateUrl('admin_user_add_group_center',
array('uid' => $user->getId())))
->setMethod('POST')
->add(self::FORM_GROUP_CEN... | [
"private",
"function",
"createAddLinkGroupCenterForm",
"(",
"User",
"$",
"user",
")",
"{",
"return",
"$",
"this",
"->",
"createFormBuilder",
"(",
")",
"->",
"setAction",
"(",
"$",
"this",
"->",
"generateUrl",
"(",
"'admin_user_add_group_center'",
",",
"array",
"... | create a form to add a link to a groupcenter
@param User $user
@return \Symfony\Component\Form\Form | [
"create",
"a",
"form",
"to",
"add",
"a",
"link",
"to",
"a",
"groupcenter"
] | train | https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Controller/UserController.php#L408-L418 |
FuriosoJack/LaraException | src/Core/Manager.php | Manager.getCallBack | public function getCallBack($request, \Exception $exception)
{
foreach ($this->exceptionsCallbacks as $callback){
if(is_callable($callback)){
$data = call_user_func($callback,$request,$exception);
if(!is_null($data)){
return $data;
... | php | public function getCallBack($request, \Exception $exception)
{
foreach ($this->exceptionsCallbacks as $callback){
if(is_callable($callback)){
$data = call_user_func($callback,$request,$exception);
if(!is_null($data)){
return $data;
... | [
"public",
"function",
"getCallBack",
"(",
"$",
"request",
",",
"\\",
"Exception",
"$",
"exception",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"exceptionsCallbacks",
"as",
"$",
"callback",
")",
"{",
"if",
"(",
"is_callable",
"(",
"$",
"callback",
")",
... | Obtiene el callback de excepcion que se mostrara
Entonces Se obtiene el pimer callback que cumpla con que retorne algo
@param $request
@param \Exception $exception
@return mixed | [
"Obtiene",
"el",
"callback",
"de",
"excepcion",
"que",
"se",
"mostrara",
"Entonces",
"Se",
"obtiene",
"el",
"pimer",
"callback",
"que",
"cumpla",
"con",
"que",
"retorne",
"algo"
] | train | https://github.com/FuriosoJack/LaraException/blob/b30ec2ed3331d99fca4d0ae47c8710a522bd0c19/src/Core/Manager.php#L57-L68 |
webforge-labs/psc-cms | lib/PHPWord/PHPWord/Section/Footer.php | PHPWord_Section_Footer.addTable | public function addTable($style = null) {
$table = new PHPWord_Section_Table('footer', $this->_footerCount, $style);
$this->_elementCollection[] = $table;
return $table;
} | php | public function addTable($style = null) {
$table = new PHPWord_Section_Table('footer', $this->_footerCount, $style);
$this->_elementCollection[] = $table;
return $table;
} | [
"public",
"function",
"addTable",
"(",
"$",
"style",
"=",
"null",
")",
"{",
"$",
"table",
"=",
"new",
"PHPWord_Section_Table",
"(",
"'footer'",
",",
"$",
"this",
"->",
"_footerCount",
",",
"$",
"style",
")",
";",
"$",
"this",
"->",
"_elementCollection",
... | Add a Table Element
@param mixed $style
@return PHPWord_Section_Table | [
"Add",
"a",
"Table",
"Element"
] | train | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord/Section/Footer.php#L108-L112 |
webforge-labs/psc-cms | lib/PHPWord/PHPWord/Section/Footer.php | PHPWord_Section_Footer.addImage | public function addImage($src, $style = null) {
$image = new PHPWord_Section_Image($src, $style);
if(!is_null($image->getSource())) {
$rID = PHPWord_Media::addFooterMediaElement($this->_footerCount, $src);
$image->setRelationId($rID);
$this->_elementCollection[] = $image;
return $image;
... | php | public function addImage($src, $style = null) {
$image = new PHPWord_Section_Image($src, $style);
if(!is_null($image->getSource())) {
$rID = PHPWord_Media::addFooterMediaElement($this->_footerCount, $src);
$image->setRelationId($rID);
$this->_elementCollection[] = $image;
return $image;
... | [
"public",
"function",
"addImage",
"(",
"$",
"src",
",",
"$",
"style",
"=",
"null",
")",
"{",
"$",
"image",
"=",
"new",
"PHPWord_Section_Image",
"(",
"$",
"src",
",",
"$",
"style",
")",
";",
"if",
"(",
"!",
"is_null",
"(",
"$",
"image",
"->",
"getSo... | Add a Image Element
@param string $src
@param mixed $style
@return PHPWord_Section_Image | [
"Add",
"a",
"Image",
"Element"
] | train | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord/Section/Footer.php#L121-L133 |
webforge-labs/psc-cms | lib/PHPWord/PHPWord/Section/Footer.php | PHPWord_Section_Footer.addMemoryImage | public function addMemoryImage($link, $style = null) {
$memoryImage = new PHPWord_Section_MemoryImage($link, $style);
if(!is_null($memoryImage->getSource())) {
$rID = PHPWord_Media::addFooterMediaElement($this->_footerCount, $link, $memoryImage);
$memoryImage->setRelationId($rID);
$this->_element... | php | public function addMemoryImage($link, $style = null) {
$memoryImage = new PHPWord_Section_MemoryImage($link, $style);
if(!is_null($memoryImage->getSource())) {
$rID = PHPWord_Media::addFooterMediaElement($this->_footerCount, $link, $memoryImage);
$memoryImage->setRelationId($rID);
$this->_element... | [
"public",
"function",
"addMemoryImage",
"(",
"$",
"link",
",",
"$",
"style",
"=",
"null",
")",
"{",
"$",
"memoryImage",
"=",
"new",
"PHPWord_Section_MemoryImage",
"(",
"$",
"link",
",",
"$",
"style",
")",
";",
"if",
"(",
"!",
"is_null",
"(",
"$",
"memo... | Add a by PHP created Image Element
@param string $link
@param mixed $style
@return PHPWord_Section_MemoryImage | [
"Add",
"a",
"by",
"PHP",
"created",
"Image",
"Element"
] | train | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord/Section/Footer.php#L142-L153 |
factorio-item-browser/export-data | src/Entity/Icon/Layer.php | Layer.writeData | public function writeData(): array
{
$dataBuilder = new DataBuilder();
$dataBuilder->setString('f', $this->getFileName(), '')
->setArray('c', $this->tintColor->writeData(), null, [])
->setInteger('x', $this->getOffsetX(), 0)
->setInteger('y... | php | public function writeData(): array
{
$dataBuilder = new DataBuilder();
$dataBuilder->setString('f', $this->getFileName(), '')
->setArray('c', $this->tintColor->writeData(), null, [])
->setInteger('x', $this->getOffsetX(), 0)
->setInteger('y... | [
"public",
"function",
"writeData",
"(",
")",
":",
"array",
"{",
"$",
"dataBuilder",
"=",
"new",
"DataBuilder",
"(",
")",
";",
"$",
"dataBuilder",
"->",
"setString",
"(",
"'f'",
",",
"$",
"this",
"->",
"getFileName",
"(",
")",
",",
"''",
")",
"->",
"s... | Writes the entity data to an array.
@return array | [
"Writes",
"the",
"entity",
"data",
"to",
"an",
"array",
"."
] | train | https://github.com/factorio-item-browser/export-data/blob/1413b2eed0fbfed0521457ac7ef0d668ac30c212/src/Entity/Icon/Layer.php#L170-L179 |
factorio-item-browser/export-data | src/Entity/Icon/Layer.php | Layer.readData | public function readData(DataContainer $data)
{
$this->fileName = $data->getString('f', '');
$this->tintColor->readData($data->getObject('c'));
$this->offsetX = $data->getInteger('x', 0);
$this->offsetY = $data->getInteger('y', 0);
$this->scale = $data->getFloat('s', 1.);
... | php | public function readData(DataContainer $data)
{
$this->fileName = $data->getString('f', '');
$this->tintColor->readData($data->getObject('c'));
$this->offsetX = $data->getInteger('x', 0);
$this->offsetY = $data->getInteger('y', 0);
$this->scale = $data->getFloat('s', 1.);
... | [
"public",
"function",
"readData",
"(",
"DataContainer",
"$",
"data",
")",
"{",
"$",
"this",
"->",
"fileName",
"=",
"$",
"data",
"->",
"getString",
"(",
"'f'",
",",
"''",
")",
";",
"$",
"this",
"->",
"tintColor",
"->",
"readData",
"(",
"$",
"data",
"-... | Reads the entity data.
@param DataContainer $data
@return $this | [
"Reads",
"the",
"entity",
"data",
"."
] | train | https://github.com/factorio-item-browser/export-data/blob/1413b2eed0fbfed0521457ac7ef0d668ac30c212/src/Entity/Icon/Layer.php#L186-L194 |
factorio-item-browser/export-data | src/Entity/Icon/Layer.php | Layer.calculateHash | public function calculateHash(): string
{
return EntityUtils::calculateHashOfArray([
$this->fileName,
$this->tintColor->calculateHash(),
$this->offsetX,
$this->offsetY,
$this->scale,
]);
} | php | public function calculateHash(): string
{
return EntityUtils::calculateHashOfArray([
$this->fileName,
$this->tintColor->calculateHash(),
$this->offsetX,
$this->offsetY,
$this->scale,
]);
} | [
"public",
"function",
"calculateHash",
"(",
")",
":",
"string",
"{",
"return",
"EntityUtils",
"::",
"calculateHashOfArray",
"(",
"[",
"$",
"this",
"->",
"fileName",
",",
"$",
"this",
"->",
"tintColor",
"->",
"calculateHash",
"(",
")",
",",
"$",
"this",
"->... | Calculates a hash value representing the entity.
@return string | [
"Calculates",
"a",
"hash",
"value",
"representing",
"the",
"entity",
"."
] | train | https://github.com/factorio-item-browser/export-data/blob/1413b2eed0fbfed0521457ac7ef0d668ac30c212/src/Entity/Icon/Layer.php#L200-L209 |
qcubed/orm | src/Query/Builder.php | Builder.setOrderByClause | public function setOrderByClause(Clause\OrderBy $objOrderByClause)
{
if ($this->objOrderByClause) {
throw new Caller('You can only have one OrderBy clause in a query.');
}
$this->objOrderByClause = $objOrderByClause;
} | php | public function setOrderByClause(Clause\OrderBy $objOrderByClause)
{
if ($this->objOrderByClause) {
throw new Caller('You can only have one OrderBy clause in a query.');
}
$this->objOrderByClause = $objOrderByClause;
} | [
"public",
"function",
"setOrderByClause",
"(",
"Clause",
"\\",
"OrderBy",
"$",
"objOrderByClause",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"objOrderByClause",
")",
"{",
"throw",
"new",
"Caller",
"(",
"'You can only have one OrderBy clause in a query.'",
")",
";",
... | Sets the one order by clause allowed in a query. Stores it for delayed processing.
@param Clause\OrderBy $objOrderByClause
@throws Caller | [
"Sets",
"the",
"one",
"order",
"by",
"clause",
"allowed",
"in",
"a",
"query",
".",
"Stores",
"it",
"for",
"delayed",
"processing",
"."
] | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Query/Builder.php#L455-L461 |
ray-di/Ray.ValidateModule | src/ValidateModule.php | ValidateModule.configure | protected function configure()
{
$this->bind(Reader::class)->to(AnnotationReader::class)->in(Scope::SINGLETON);
$this->bindInterceptor(
$this->matcher->any(),
$this->matcher->annotatedWith(Valid::class),
[ValidateInterceptor::class]
);
} | php | protected function configure()
{
$this->bind(Reader::class)->to(AnnotationReader::class)->in(Scope::SINGLETON);
$this->bindInterceptor(
$this->matcher->any(),
$this->matcher->annotatedWith(Valid::class),
[ValidateInterceptor::class]
);
} | [
"protected",
"function",
"configure",
"(",
")",
"{",
"$",
"this",
"->",
"bind",
"(",
"Reader",
"::",
"class",
")",
"->",
"to",
"(",
"AnnotationReader",
"::",
"class",
")",
"->",
"in",
"(",
"Scope",
"::",
"SINGLETON",
")",
";",
"$",
"this",
"->",
"bin... | {@inheritdoc} | [
"{"
] | train | https://github.com/ray-di/Ray.ValidateModule/blob/7e4e3c4a05e11dc989d689202ac6ae625695588e/src/ValidateModule.php#L20-L28 |
freearhey/sparql | src/GraphBuilder.php | GraphBuilder.service | public function service( $service, $subject, $predicate = null, $object = null ) {
$graphBuilder = $this->getGraphBuilder( $subject, $predicate, $object );
$this->services[$service] = $graphBuilder->getSPARQL();
return $this;
} | php | public function service( $service, $subject, $predicate = null, $object = null ) {
$graphBuilder = $this->getGraphBuilder( $subject, $predicate, $object );
$this->services[$service] = $graphBuilder->getSPARQL();
return $this;
} | [
"public",
"function",
"service",
"(",
"$",
"service",
",",
"$",
"subject",
",",
"$",
"predicate",
"=",
"null",
",",
"$",
"object",
"=",
"null",
")",
"{",
"$",
"graphBuilder",
"=",
"$",
"this",
"->",
"getGraphBuilder",
"(",
"$",
"subject",
",",
"$",
"... | Adds the given graph or triple as an services condition.
@param string|GraphBuilder $subject
@param string|null $predicate
@param string|null $object
@return self
@throws InvalidArgumentException | [
"Adds",
"the",
"given",
"graph",
"or",
"triple",
"as",
"an",
"services",
"condition",
"."
] | train | https://github.com/freearhey/sparql/blob/622a8ea661dc5939122b0e8b430a6a94b3bc49c7/src/GraphBuilder.php#L211-L215 |
CakeCMS/Core | src/Toolbar/ToolbarHelper.php | ToolbarHelper.add | public static function add($title = null, $url = ['action' => 'add'], $icon = 'plus', array $options = [])
{
$toolbar = Toolbar::getInstance(self::$_toolbar);
$options += [
'icon' => $icon,
'button' => 'green lighten-2'
];
$toolbar->appendButton('Core.link'... | php | public static function add($title = null, $url = ['action' => 'add'], $icon = 'plus', array $options = [])
{
$toolbar = Toolbar::getInstance(self::$_toolbar);
$options += [
'icon' => $icon,
'button' => 'green lighten-2'
];
$toolbar->appendButton('Core.link'... | [
"public",
"static",
"function",
"add",
"(",
"$",
"title",
"=",
"null",
",",
"$",
"url",
"=",
"[",
"'action'",
"=>",
"'add'",
"]",
",",
"$",
"icon",
"=",
"'plus'",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"toolbar",
"=",
"Toolba... | Create add link.
@param string|null $title
@param array|string $url
@param string $icon
@param array $options
@return void | [
"Create",
"add",
"link",
"."
] | train | https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/Toolbar/ToolbarHelper.php#L48-L57 |
CakeCMS/Core | src/Toolbar/ToolbarHelper.php | ToolbarHelper.apply | public static function apply($title = null)
{
$toolbar = Toolbar::getInstance(self::$_toolbar);
$title = (empty($title)) ? __d('core', 'Apply') : $title;
$toolbar->appendButton('Core.action', $title, self::ACTION_APPLY, [
'class' => 'jsFormButton',
'icon' => 'ch... | php | public static function apply($title = null)
{
$toolbar = Toolbar::getInstance(self::$_toolbar);
$title = (empty($title)) ? __d('core', 'Apply') : $title;
$toolbar->appendButton('Core.action', $title, self::ACTION_APPLY, [
'class' => 'jsFormButton',
'icon' => 'ch... | [
"public",
"static",
"function",
"apply",
"(",
"$",
"title",
"=",
"null",
")",
"{",
"$",
"toolbar",
"=",
"Toolbar",
"::",
"getInstance",
"(",
"self",
"::",
"$",
"_toolbar",
")",
";",
"$",
"title",
"=",
"(",
"empty",
"(",
"$",
"title",
")",
")",
"?",... | Apply form button.
@param null|string $title
@return void | [
"Apply",
"form",
"button",
"."
] | train | https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/Toolbar/ToolbarHelper.php#L65-L75 |
CakeCMS/Core | src/Toolbar/ToolbarHelper.php | ToolbarHelper.cancel | public static function cancel($title = null, $url = null, array $options = [])
{
$toolbar = Toolbar::getInstance(self::$_toolbar);
$options += [
'icon' => 'close',
'iconClass' => 'ckTextRed',
'button' => 'grey lighten-3'
];
if (empty($url)... | php | public static function cancel($title = null, $url = null, array $options = [])
{
$toolbar = Toolbar::getInstance(self::$_toolbar);
$options += [
'icon' => 'close',
'iconClass' => 'ckTextRed',
'button' => 'grey lighten-3'
];
if (empty($url)... | [
"public",
"static",
"function",
"cancel",
"(",
"$",
"title",
"=",
"null",
",",
"$",
"url",
"=",
"null",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"toolbar",
"=",
"Toolbar",
"::",
"getInstance",
"(",
"self",
"::",
"$",
"_toolbar",
... | Cancel form button.
@param string|null $title
@param null|string|array $url
@param array $options
@return void | [
"Cancel",
"form",
"button",
"."
] | train | https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/Toolbar/ToolbarHelper.php#L85-L101 |
CakeCMS/Core | src/Toolbar/ToolbarHelper.php | ToolbarHelper.delete | public static function delete($title = null)
{
$toolbar = Toolbar::getInstance(self::$_toolbar);
$title = (empty($title)) ? __d('core', 'Delete') : $title;
$toolbar->appendButton('Core.action', $title, self::ACTION_DELETE, []);
} | php | public static function delete($title = null)
{
$toolbar = Toolbar::getInstance(self::$_toolbar);
$title = (empty($title)) ? __d('core', 'Delete') : $title;
$toolbar->appendButton('Core.action', $title, self::ACTION_DELETE, []);
} | [
"public",
"static",
"function",
"delete",
"(",
"$",
"title",
"=",
"null",
")",
"{",
"$",
"toolbar",
"=",
"Toolbar",
"::",
"getInstance",
"(",
"self",
"::",
"$",
"_toolbar",
")",
";",
"$",
"title",
"=",
"(",
"empty",
"(",
"$",
"title",
")",
")",
"?"... | Delete for process form.
@param string|null $title
@return void | [
"Delete",
"for",
"process",
"form",
"."
] | train | https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/Toolbar/ToolbarHelper.php#L109-L115 |
CakeCMS/Core | src/Toolbar/ToolbarHelper.php | ToolbarHelper.link | public static function link($title, $url, array $options = [])
{
$toolbar = Toolbar::getInstance(self::$_toolbar);
$options += [
'icon' => 'link',
'button' => 'grey lighten-3'
];
$toolbar->appendButton('Core.link', $title, $url, $options);
} | php | public static function link($title, $url, array $options = [])
{
$toolbar = Toolbar::getInstance(self::$_toolbar);
$options += [
'icon' => 'link',
'button' => 'grey lighten-3'
];
$toolbar->appendButton('Core.link', $title, $url, $options);
} | [
"public",
"static",
"function",
"link",
"(",
"$",
"title",
",",
"$",
"url",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"toolbar",
"=",
"Toolbar",
"::",
"getInstance",
"(",
"self",
"::",
"$",
"_toolbar",
")",
";",
"$",
"options",
"+... | Create link output.
@param string $title
@param string|array $url
@param array $options | [
"Create",
"link",
"output",
"."
] | train | https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/Toolbar/ToolbarHelper.php#L124-L133 |
CakeCMS/Core | src/Toolbar/ToolbarHelper.php | ToolbarHelper.save | public static function save($title = null)
{
$toolbar = Toolbar::getInstance(self::$_toolbar);
$title = (empty($title)) ? __d('core', 'Save') : $title;
$toolbar->appendButton('Core.action', $title, self::ACTION_SAVE, [
'icon' => 'check',
'class' => 'jsForm... | php | public static function save($title = null)
{
$toolbar = Toolbar::getInstance(self::$_toolbar);
$title = (empty($title)) ? __d('core', 'Save') : $title;
$toolbar->appendButton('Core.action', $title, self::ACTION_SAVE, [
'icon' => 'check',
'class' => 'jsForm... | [
"public",
"static",
"function",
"save",
"(",
"$",
"title",
"=",
"null",
")",
"{",
"$",
"toolbar",
"=",
"Toolbar",
"::",
"getInstance",
"(",
"self",
"::",
"$",
"_toolbar",
")",
";",
"$",
"title",
"=",
"(",
"empty",
"(",
"$",
"title",
")",
")",
"?",
... | Save form button.
@param null|string $title
@return void | [
"Save",
"form",
"button",
"."
] | train | https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/Toolbar/ToolbarHelper.php#L141-L152 |
afrittella/back-project | src/app/Http/Controllers/Auth/ResetPasswordController.php | ResetPasswordController.showResetForm | public function showResetForm(Request $request, $token = null)
{
$this->data['title'] = trans('back-project::base.reset_password'); // set the page title
return view('back-project::auth.passwords.reset', $this->data)->with(
['token' => $token, 'email' => $request->email]
);
... | php | public function showResetForm(Request $request, $token = null)
{
$this->data['title'] = trans('back-project::base.reset_password'); // set the page title
return view('back-project::auth.passwords.reset', $this->data)->with(
['token' => $token, 'email' => $request->email]
);
... | [
"public",
"function",
"showResetForm",
"(",
"Request",
"$",
"request",
",",
"$",
"token",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"data",
"[",
"'title'",
"]",
"=",
"trans",
"(",
"'back-project::base.reset_password'",
")",
";",
"// set the page title",
"retur... | Display the password reset view for the given token.
If no token is present, display the link request form.
@param \Illuminate\Http\Request $request
@param string|null $token
@return \Illuminate\Http\Response | [
"Display",
"the",
"password",
"reset",
"view",
"for",
"the",
"given",
"token",
"."
] | train | https://github.com/afrittella/back-project/blob/e1aa2e3ee03d453033f75a4b16f073c60b5f32d1/src/app/Http/Controllers/Auth/ResetPasswordController.php#L48-L55 |
ripaclub/zf2-sphinxsearch-tool | src/Controller/Traits/ConfigTrait.php | ConfigTrait.getConfig | protected function getConfig($file = null)
{
// Config
$appConfig = $this->getServiceLocator()->get('Config');
if (!isset($appConfig['sphinxsearch'])) {
throw new \InvalidArgumentException('Config not found with name: "sphinxsearch"');
} else {
$config = new ... | php | protected function getConfig($file = null)
{
// Config
$appConfig = $this->getServiceLocator()->get('Config');
if (!isset($appConfig['sphinxsearch'])) {
throw new \InvalidArgumentException('Config not found with name: "sphinxsearch"');
} else {
$config = new ... | [
"protected",
"function",
"getConfig",
"(",
"$",
"file",
"=",
"null",
")",
"{",
"// Config",
"$",
"appConfig",
"=",
"$",
"this",
"->",
"getServiceLocator",
"(",
")",
"->",
"get",
"(",
"'Config'",
")",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"appConfig",... | Retrieve the config of sphinxsearch node
@param string|null $file
@return Config | [
"Retrieve",
"the",
"config",
"of",
"sphinxsearch",
"node"
] | train | https://github.com/ripaclub/zf2-sphinxsearch-tool/blob/4cb51341ccf1db9942e3e578855a579afd608d69/src/Controller/Traits/ConfigTrait.php#L27-L46 |
steeffeen/FancyManiaLinks | FML/Stylesheet/SkyGradientKey.php | SkyGradientKey.render | public function render(\DOMDocument $domDocument)
{
$domElement = $domDocument->createElement("key");
$domElement->setAttribute("x", $this->x);
$domElement->setAttribute("color", $this->color);
return $domElement;
} | php | public function render(\DOMDocument $domDocument)
{
$domElement = $domDocument->createElement("key");
$domElement->setAttribute("x", $this->x);
$domElement->setAttribute("color", $this->color);
return $domElement;
} | [
"public",
"function",
"render",
"(",
"\\",
"DOMDocument",
"$",
"domDocument",
")",
"{",
"$",
"domElement",
"=",
"$",
"domDocument",
"->",
"createElement",
"(",
"\"key\"",
")",
";",
"$",
"domElement",
"->",
"setAttribute",
"(",
"\"x\"",
",",
"$",
"this",
"-... | Render the SkyGradientKey
@param \DOMDocument $domDocument DOMDocument for which the Sky Gradient Key should be rendered
@return \DOMElement | [
"Render",
"the",
"SkyGradientKey"
] | train | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Stylesheet/SkyGradientKey.php#L109-L115 |
m0ppers/MopArangoDbBundle | DependencyInjection/MopArangoDbExtension.php | MopArangoDbExtension.load | public function load(array $configs, ContainerBuilder $container)
{
$configuration = new Configuration($container->getParameter('kernel.debug'));
$config = $this->processConfiguration($configuration, $configs);
$loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Reso... | php | public function load(array $configs, ContainerBuilder $container)
{
$configuration = new Configuration($container->getParameter('kernel.debug'));
$config = $this->processConfiguration($configuration, $configs);
$loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Reso... | [
"public",
"function",
"load",
"(",
"array",
"$",
"configs",
",",
"ContainerBuilder",
"$",
"container",
")",
"{",
"$",
"configuration",
"=",
"new",
"Configuration",
"(",
"$",
"container",
"->",
"getParameter",
"(",
"'kernel.debug'",
")",
")",
";",
"$",
"confi... | {@inheritDoc} | [
"{"
] | train | https://github.com/m0ppers/MopArangoDbBundle/blob/95ea747f0a6ddce434605038021525e98d98a83e/DependencyInjection/MopArangoDbExtension.php#L22-L61 |
steeffeen/FancyManiaLinks | FML/Controls/Graph.php | Graph.createSettings | protected function createSettings()
{
$this->graphSettings = new GraphSettings($this);
$this->addScriptFeature($this->graphSettings);
return $this->graphSettings;
} | php | protected function createSettings()
{
$this->graphSettings = new GraphSettings($this);
$this->addScriptFeature($this->graphSettings);
return $this->graphSettings;
} | [
"protected",
"function",
"createSettings",
"(",
")",
"{",
"$",
"this",
"->",
"graphSettings",
"=",
"new",
"GraphSettings",
"(",
"$",
"this",
")",
";",
"$",
"this",
"->",
"addScriptFeature",
"(",
"$",
"this",
"->",
"graphSettings",
")",
";",
"return",
"$",
... | Create new graph settings
@return GraphSettings | [
"Create",
"new",
"graph",
"settings"
] | train | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Controls/Graph.php#L48-L53 |
steeffeen/FancyManiaLinks | FML/Controls/Graph.php | Graph.addCurve | public function addCurve(GraphCurve $curve)
{
$curve->setGraph($this);
$this->addScriptFeature($curve);
array_push($this->curves, $curve);
return $this;
} | php | public function addCurve(GraphCurve $curve)
{
$curve->setGraph($this);
$this->addScriptFeature($curve);
array_push($this->curves, $curve);
return $this;
} | [
"public",
"function",
"addCurve",
"(",
"GraphCurve",
"$",
"curve",
")",
"{",
"$",
"curve",
"->",
"setGraph",
"(",
"$",
"this",
")",
";",
"$",
"this",
"->",
"addScriptFeature",
"(",
"$",
"curve",
")",
";",
"array_push",
"(",
"$",
"this",
"->",
"curves",... | Add curve
@api
@param GraphCurve $curve Curve
@return static | [
"Add",
"curve"
] | train | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Controls/Graph.php#L73-L79 |
iocaste/microservice-foundation | src/Data/Models/Parameter/Parameter.php | Parameter.choices | public function choices(): HasMany
{
return $this->hasMany(\Iocaste\Microservice\Foundation\Data\Models\Parameter\Choice::class);
} | php | public function choices(): HasMany
{
return $this->hasMany(\Iocaste\Microservice\Foundation\Data\Models\Parameter\Choice::class);
} | [
"public",
"function",
"choices",
"(",
")",
":",
"HasMany",
"{",
"return",
"$",
"this",
"->",
"hasMany",
"(",
"\\",
"Iocaste",
"\\",
"Microservice",
"\\",
"Foundation",
"\\",
"Data",
"\\",
"Models",
"\\",
"Parameter",
"\\",
"Choice",
"::",
"class",
")",
"... | One-to-Many Relationship
One Parameter has Many Choices.
@return \Illuminate\Database\Eloquent\Relations\HasMany | [
"One",
"-",
"to",
"-",
"Many",
"Relationship",
"One",
"Parameter",
"has",
"Many",
"Choices",
"."
] | train | https://github.com/iocaste/microservice-foundation/blob/274a154de4299e8a57314bab972e09f6d8cdae9e/src/Data/Models/Parameter/Parameter.php#L71-L74 |
phrest/sdk | src/Generator/Helper/ClassDiff.php | ClassDiff.getGeneratorFromReflection | public function getGeneratorFromReflection(ClassReflection $classReflection)
{
// class generator
$cg = new ClassGenerator($classReflection->getName());
$cg->setSourceContent($cg->getSourceContent());
$cg->setSourceDirty(false);
if ($classReflection->getDocComment() != '')
{
$docblock
... | php | public function getGeneratorFromReflection(ClassReflection $classReflection)
{
// class generator
$cg = new ClassGenerator($classReflection->getName());
$cg->setSourceContent($cg->getSourceContent());
$cg->setSourceDirty(false);
if ($classReflection->getDocComment() != '')
{
$docblock
... | [
"public",
"function",
"getGeneratorFromReflection",
"(",
"ClassReflection",
"$",
"classReflection",
")",
"{",
"// class generator",
"$",
"cg",
"=",
"new",
"ClassGenerator",
"(",
"$",
"classReflection",
"->",
"getName",
"(",
")",
")",
";",
"$",
"cg",
"->",
"setSo... | Copied from ClassGenerator::fromReflection and tweaked slightly
@param ClassReflection $classReflection
@return ClassGenerator | [
"Copied",
"from",
"ClassGenerator",
"::",
"fromReflection",
"and",
"tweaked",
"slightly"
] | train | https://github.com/phrest/sdk/blob/e9f2812ad517b07ca4d284512b530f615305eb47/src/Generator/Helper/ClassDiff.php#L140-L223 |
userfriendly/SocialUserBundle | Model/User.php | User.setEmail | public function setEmail( $email )
{
if ( !$email ) $this->setEmailCanonical( NULL );
if ( NULL === $email ) $email = '';
return parent::setEmail($email);
} | php | public function setEmail( $email )
{
if ( !$email ) $this->setEmailCanonical( NULL );
if ( NULL === $email ) $email = '';
return parent::setEmail($email);
} | [
"public",
"function",
"setEmail",
"(",
"$",
"email",
")",
"{",
"if",
"(",
"!",
"$",
"email",
")",
"$",
"this",
"->",
"setEmailCanonical",
"(",
"NULL",
")",
";",
"if",
"(",
"NULL",
"===",
"$",
"email",
")",
"$",
"email",
"=",
"''",
";",
"return",
... | {@inheritDoc} | [
"{"
] | train | https://github.com/userfriendly/SocialUserBundle/blob/1dfcf76af2bc639901c471e6f28b04d73fb65452/Model/User.php#L81-L86 |
userfriendly/SocialUserBundle | Model/User.php | User.getIdentitiesAsStrings | public function getIdentitiesAsStrings()
{
$result = array();
foreach ( $this->identities as $identity )
{
$result[] = $identity->getTypeString();
}
return $result;
} | php | public function getIdentitiesAsStrings()
{
$result = array();
foreach ( $this->identities as $identity )
{
$result[] = $identity->getTypeString();
}
return $result;
} | [
"public",
"function",
"getIdentitiesAsStrings",
"(",
")",
"{",
"$",
"result",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"identities",
"as",
"$",
"identity",
")",
"{",
"$",
"result",
"[",
"]",
"=",
"$",
"identity",
"->",
"getTypeSt... | {@inheritDoc} | [
"{"
] | train | https://github.com/userfriendly/SocialUserBundle/blob/1dfcf76af2bc639901c471e6f28b04d73fb65452/Model/User.php#L177-L185 |
linkorb/database-manager | src/DatabaseManager/Command/ConnectionConfigCommand.php | ConnectionConfigCommand.configure | protected function configure()
{
$this->ignoreValidationErrors();
$this
->setName('connection:config')
->setDefinition(array(
new InputArgument('dbname', InputArgument::REQUIRED, 'Database name')
))
->setDescription('Display datatbase ... | php | protected function configure()
{
$this->ignoreValidationErrors();
$this
->setName('connection:config')
->setDefinition(array(
new InputArgument('dbname', InputArgument::REQUIRED, 'Database name')
))
->setDescription('Display datatbase ... | [
"protected",
"function",
"configure",
"(",
")",
"{",
"$",
"this",
"->",
"ignoreValidationErrors",
"(",
")",
";",
"$",
"this",
"->",
"setName",
"(",
"'connection:config'",
")",
"->",
"setDefinition",
"(",
"array",
"(",
"new",
"InputArgument",
"(",
"'dbname'",
... | {@inheritdoc} | [
"{"
] | train | https://github.com/linkorb/database-manager/blob/7e3eabfe9a85ec31b0a1097bcf64c3a1f819156a/src/DatabaseManager/Command/ConnectionConfigCommand.php#L25-L36 |
linkorb/database-manager | src/DatabaseManager/Command/ConnectionConfigCommand.php | ConnectionConfigCommand.execute | protected function execute(InputInterface $input, OutputInterface $output)
{
$dbname = $input->getArgument('dbname');
$manager = new DatabaseManager();
$databaseconfig = $manager->getDatabaseConfigByDatabaseName($dbname);
echo "NAME: [" . $databaseconfig->getName() . "]\n";
... | php | protected function execute(InputInterface $input, OutputInterface $output)
{
$dbname = $input->getArgument('dbname');
$manager = new DatabaseManager();
$databaseconfig = $manager->getDatabaseConfigByDatabaseName($dbname);
echo "NAME: [" . $databaseconfig->getName() . "]\n";
... | [
"protected",
"function",
"execute",
"(",
"InputInterface",
"$",
"input",
",",
"OutputInterface",
"$",
"output",
")",
"{",
"$",
"dbname",
"=",
"$",
"input",
"->",
"getArgument",
"(",
"'dbname'",
")",
";",
"$",
"manager",
"=",
"new",
"DatabaseManager",
"(",
... | {@inheritdoc} | [
"{"
] | train | https://github.com/linkorb/database-manager/blob/7e3eabfe9a85ec31b0a1097bcf64c3a1f819156a/src/DatabaseManager/Command/ConnectionConfigCommand.php#L41-L61 |
milkyway-multimedia/ss-mwm-formfields | src/Composite/Model/ComponentFieldHolder.php | ComponentFieldHolder.getTemplates | public function getTemplates()
{
$template = parent::getTemplates();
if ($default = $this->defaultTemplate) {
$key = array_search('FormField', $template);
if ($key !== false) {
$default[$key] = $this->defaultTemplate;
}
}
return ... | php | public function getTemplates()
{
$template = parent::getTemplates();
if ($default = $this->defaultTemplate) {
$key = array_search('FormField', $template);
if ($key !== false) {
$default[$key] = $this->defaultTemplate;
}
}
return ... | [
"public",
"function",
"getTemplates",
"(",
")",
"{",
"$",
"template",
"=",
"parent",
"::",
"getTemplates",
"(",
")",
";",
"if",
"(",
"$",
"default",
"=",
"$",
"this",
"->",
"defaultTemplate",
")",
"{",
"$",
"key",
"=",
"array_search",
"(",
"'FormField'",... | Returns an array of templates to use for rendering {@link FieldH}
@return array | [
"Returns",
"an",
"array",
"of",
"templates",
"to",
"use",
"for",
"rendering",
"{",
"@link",
"FieldH",
"}"
] | train | https://github.com/milkyway-multimedia/ss-mwm-formfields/blob/b98d84d494c92d6881dcea50c9c8334e5f487e1d/src/Composite/Model/ComponentFieldHolder.php#L157-L170 |
ClanCats/Core | src/classes/CCCookie.php | CCCookie.set | public static function set( $key, $value, $expire = 0 ) {
// set the expire date
if ( $expire > 0 ) {
if ( $expire < time() ) {
$expire = time() + $expire;
}
}
CCServer::$_instance->COOKIE[$key] = $value;
/*
* Finally set the cookie
* @toDo: just at the cookie to an array an set ... | php | public static function set( $key, $value, $expire = 0 ) {
// set the expire date
if ( $expire > 0 ) {
if ( $expire < time() ) {
$expire = time() + $expire;
}
}
CCServer::$_instance->COOKIE[$key] = $value;
/*
* Finally set the cookie
* @toDo: just at the cookie to an array an set ... | [
"public",
"static",
"function",
"set",
"(",
"$",
"key",
",",
"$",
"value",
",",
"$",
"expire",
"=",
"0",
")",
"{",
"// set the expire date ",
"if",
"(",
"$",
"expire",
">",
"0",
")",
"{",
"if",
"(",
"$",
"expire",
"<",
"time",
"(",
")",
")",
"{",... | Set a cookie
@param string $key
@param string $value
@param int $expire
@return bool | [
"Set",
"a",
"cookie"
] | train | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCCookie.php#L45-L70 |
ClanCats/Core | src/classes/CCCookie.php | CCCookie.get | public static function get( $key, $default = null )
{
if ( !isset( CCServer::$_instance->COOKIE[$key] ) )
{
return $default;
}
return CCServer::$_instance->COOKIE[$key];
} | php | public static function get( $key, $default = null )
{
if ( !isset( CCServer::$_instance->COOKIE[$key] ) )
{
return $default;
}
return CCServer::$_instance->COOKIE[$key];
} | [
"public",
"static",
"function",
"get",
"(",
"$",
"key",
",",
"$",
"default",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"CCServer",
"::",
"$",
"_instance",
"->",
"COOKIE",
"[",
"$",
"key",
"]",
")",
")",
"{",
"return",
"$",
"default",
"... | get a cookie
@param string $key
@return mixed | [
"get",
"a",
"cookie"
] | train | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCCookie.php#L78-L85 |
ClanCats/Core | src/classes/CCCookie.php | CCCookie.once | public static function once( $key ) {
if ( !is_null( static::get( $key ) ) ) {
$cookie = static::get( $key );
static::delete( $key );
return $cookie;
}
} | php | public static function once( $key ) {
if ( !is_null( static::get( $key ) ) ) {
$cookie = static::get( $key );
static::delete( $key );
return $cookie;
}
} | [
"public",
"static",
"function",
"once",
"(",
"$",
"key",
")",
"{",
"if",
"(",
"!",
"is_null",
"(",
"static",
"::",
"get",
"(",
"$",
"key",
")",
")",
")",
"{",
"$",
"cookie",
"=",
"static",
"::",
"get",
"(",
"$",
"key",
")",
";",
"static",
"::",... | eat a cookie, means get it once
@param string $key
@return mixed | [
"eat",
"a",
"cookie",
"means",
"get",
"it",
"once"
] | train | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCCookie.php#L93-L101 |
meccado/acl-admin-control-panel | src/AclAdminControlPanelServiceProvider.php | AclAdminControlPanelServiceProvider.boot | public function boot(Router $router)
{
$router->middleware('roles', \App\Http\Middleware\HasRole::class);
$router->middleware('admin', \App\Http\Middleware\AdminMiddleware::class);
if (! $this->app->routesAreCached()) {
require __DIR__.'/Http/routes.php';
}
$configFiles = ['acl'];
forea... | php | public function boot(Router $router)
{
$router->middleware('roles', \App\Http\Middleware\HasRole::class);
$router->middleware('admin', \App\Http\Middleware\AdminMiddleware::class);
if (! $this->app->routesAreCached()) {
require __DIR__.'/Http/routes.php';
}
$configFiles = ['acl'];
forea... | [
"public",
"function",
"boot",
"(",
"Router",
"$",
"router",
")",
"{",
"$",
"router",
"->",
"middleware",
"(",
"'roles'",
",",
"\\",
"App",
"\\",
"Http",
"\\",
"Middleware",
"\\",
"HasRole",
"::",
"class",
")",
";",
"$",
"router",
"->",
"middleware",
"(... | Perform post-registration booting of services.
@return void | [
"Perform",
"post",
"-",
"registration",
"booting",
"of",
"services",
"."
] | train | https://github.com/meccado/acl-admin-control-panel/blob/50ac4c0dbf8bd49944ecad6a70708a70411b7378/src/AclAdminControlPanelServiceProvider.php#L17-L79 |
meccado/acl-admin-control-panel | src/AclAdminControlPanelServiceProvider.php | AclAdminControlPanelServiceProvider.register | public function register()
{
$this->app->bind('acl', function($app){
return new AclAdminControlPanel;
});
//Register dependency packages
$this->app->register('Collective\Html\HtmlServiceProvider');
$this->app->register('Intervention\Image\ImageServiceProvider');
// Register dependancy ... | php | public function register()
{
$this->app->bind('acl', function($app){
return new AclAdminControlPanel;
});
//Register dependency packages
$this->app->register('Collective\Html\HtmlServiceProvider');
$this->app->register('Intervention\Image\ImageServiceProvider');
// Register dependancy ... | [
"public",
"function",
"register",
"(",
")",
"{",
"$",
"this",
"->",
"app",
"->",
"bind",
"(",
"'acl'",
",",
"function",
"(",
"$",
"app",
")",
"{",
"return",
"new",
"AclAdminControlPanel",
";",
"}",
")",
";",
"//Register dependency packages",
"$",
"this",
... | Register any package services.
@return void | [
"Register",
"any",
"package",
"services",
"."
] | train | https://github.com/meccado/acl-admin-control-panel/blob/50ac4c0dbf8bd49944ecad6a70708a70411b7378/src/AclAdminControlPanelServiceProvider.php#L86-L105 |
sparwelt/imgix-lib | src/Components/ImageGenerator.php | ImageGenerator.generateImage | public function generateImage($originalUrl, array $attributesFilters)
{
if (empty($attributesFilters)) {
throw new \InvalidArgumentException('Please provide at least one key for attribute generation (e.g. \'src\') ');
}
$image = (new \DOMDocument())->createElement('img');
... | php | public function generateImage($originalUrl, array $attributesFilters)
{
if (empty($attributesFilters)) {
throw new \InvalidArgumentException('Please provide at least one key for attribute generation (e.g. \'src\') ');
}
$image = (new \DOMDocument())->createElement('img');
... | [
"public",
"function",
"generateImage",
"(",
"$",
"originalUrl",
",",
"array",
"$",
"attributesFilters",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"attributesFilters",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'Please provide at least one... | @param string $originalUrl
@param array $attributesFilters
@return string
@throws \InvalidArgumentException | [
"@param",
"string",
"$originalUrl",
"@param",
"array",
"$attributesFilters"
] | train | https://github.com/sparwelt/imgix-lib/blob/330e1db2bed71bc283e5a2da6246528f240939ec/src/Components/ImageGenerator.php#L42-L62 |
whisller/IrcBotBundle | DependencyInjection/WhisnetIrcBotExtension.php | WhisnetIrcBotExtension.load | public function load(array $configs, ContainerBuilder $container)
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
$loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
foreach (array... | php | public function load(array $configs, ContainerBuilder $container)
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
$loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
foreach (array... | [
"public",
"function",
"load",
"(",
"array",
"$",
"configs",
",",
"ContainerBuilder",
"$",
"container",
")",
"{",
"$",
"configuration",
"=",
"new",
"Configuration",
"(",
")",
";",
"$",
"config",
"=",
"$",
"this",
"->",
"processConfiguration",
"(",
"$",
"con... | {@inheritDoc} | [
"{"
] | train | https://github.com/whisller/IrcBotBundle/blob/d8bcafc1599cbbc7756b0a59f51ee988a2de0f2e/DependencyInjection/WhisnetIrcBotExtension.php#L21-L44 |
PortaText/php-sdk | src/PortaText/Command/Factory.php | Factory.get | public function get($command)
{
$className = ucfirst($command);
$className = "PortaText\\Command\\Api\\$className";
if (!class_exists($className)) {
throw new \InvalidArgumentException(
"Command $command does not exist"
);
}
return new ... | php | public function get($command)
{
$className = ucfirst($command);
$className = "PortaText\\Command\\Api\\$className";
if (!class_exists($className)) {
throw new \InvalidArgumentException(
"Command $command does not exist"
);
}
return new ... | [
"public",
"function",
"get",
"(",
"$",
"command",
")",
"{",
"$",
"className",
"=",
"ucfirst",
"(",
"$",
"command",
")",
";",
"$",
"className",
"=",
"\"PortaText\\\\Command\\\\Api\\\\$className\"",
";",
"if",
"(",
"!",
"class_exists",
"(",
"$",
"className",
"... | Returns a command instance based on the command name requested.
@param string $command The name of the command.
@return PortaText\Command\ICommand
@throws InvalidArgumentException | [
"Returns",
"a",
"command",
"instance",
"based",
"on",
"the",
"command",
"name",
"requested",
"."
] | train | https://github.com/PortaText/php-sdk/blob/dbe04ef043db5b251953f9de57aa4d0f1785dfcc/src/PortaText/Command/Factory.php#L24-L34 |
tylercd100/monolog-mailgun | src/Handler/MailgunHandler.php | MailgunHandler.send | protected function send($content, array $records)
{
$auth = base64_encode("api:".$this->token);
$fields = http_build_query([
'from' => $this->from,
'to' => $this->to,
'subject' => $this->subject,
'text' => $content
]);
$ch ... | php | protected function send($content, array $records)
{
$auth = base64_encode("api:".$this->token);
$fields = http_build_query([
'from' => $this->from,
'to' => $this->to,
'subject' => $this->subject,
'text' => $content
]);
$ch ... | [
"protected",
"function",
"send",
"(",
"$",
"content",
",",
"array",
"$",
"records",
")",
"{",
"$",
"auth",
"=",
"base64_encode",
"(",
"\"api:\"",
".",
"$",
"this",
"->",
"token",
")",
";",
"$",
"fields",
"=",
"http_build_query",
"(",
"[",
"'from'",
"=>... | {@inheritdoc} | [
"{"
] | train | https://github.com/tylercd100/monolog-mailgun/blob/3f64ecaf66ac128092592dbf8d5ab3d9361417cc/src/Handler/MailgunHandler.php#L39-L62 |
vorbind/influx-analytics | src/Adapter/InfluxDatabaseAdapter.php | InfluxDatabaseAdapter.getDatabaseAdapter | public function getDatabaseAdapter() {
try {
if (isset($this->db)) {
return $this->db;
}
$config = $this->reader->getDbsConfig();
if ( !isset($config['influx'])
|| !isset($config['influx']... | php | public function getDatabaseAdapter() {
try {
if (isset($this->db)) {
return $this->db;
}
$config = $this->reader->getDbsConfig();
if ( !isset($config['influx'])
|| !isset($config['influx']... | [
"public",
"function",
"getDatabaseAdapter",
"(",
")",
"{",
"try",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"db",
")",
")",
"{",
"return",
"$",
"this",
"->",
"db",
";",
"}",
"$",
"config",
"=",
"$",
"this",
"->",
"reader",
"->",
"getDbsConfi... | Get db adapter
@return InfluxDB
@throws Exception | [
"Get",
"db",
"adapter"
] | train | https://github.com/vorbind/influx-analytics/blob/8c0c150351f045ccd3d57063f2b3b50a2c926e3e/src/Adapter/InfluxDatabaseAdapter.php#L53-L83 |
steeffeen/FancyManiaLinks | FML/Components/RadioButtonGroup.php | RadioButtonGroup.setName | public function setName($name)
{
$this->name = (string)$name;
$this->getEntry()
->setName($this->name);
return $this;
} | php | public function setName($name)
{
$this->name = (string)$name;
$this->getEntry()
->setName($this->name);
return $this;
} | [
"public",
"function",
"setName",
"(",
"$",
"name",
")",
"{",
"$",
"this",
"->",
"name",
"=",
"(",
"string",
")",
"$",
"name",
";",
"$",
"this",
"->",
"getEntry",
"(",
")",
"->",
"setName",
"(",
"$",
"this",
"->",
"name",
")",
";",
"return",
"$",
... | Set the name
@api
@param string $name RadioButtonGroup name
@return static | [
"Set",
"the",
"name"
] | train | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Components/RadioButtonGroup.php#L64-L70 |
joseph-walker/vector | src/Lib/Strings.php | Strings.__split | protected static function __split(string $on, string $string) : array
{
if ($on === '') {
return str_split($string);
}
return array_filter(explode($on, $string));
} | php | protected static function __split(string $on, string $string) : array
{
if ($on === '') {
return str_split($string);
}
return array_filter(explode($on, $string));
} | [
"protected",
"static",
"function",
"__split",
"(",
"string",
"$",
"on",
",",
"string",
"$",
"string",
")",
":",
"array",
"{",
"if",
"(",
"$",
"on",
"===",
"''",
")",
"{",
"return",
"str_split",
"(",
"$",
"string",
")",
";",
"}",
"return",
"array_filt... | String Splitting
Split a string into parts based on a delimiter. Operates similar to php `explode`,
but is more consistent. Can split on empty delimiters, and trims out empty strings
after exploding.
@example
Strings::split('-', 'Hello-World'); // ['Hello', 'World']
@example
Strings::split('', 'asdf'); // ['a', 's',... | [
"String",
"Splitting"
] | train | https://github.com/joseph-walker/vector/blob/e349aa2e9e0535b1993f9fffc0476e7fd8e113fc/src/Lib/Strings.php#L67-L74 |
joseph-walker/vector | src/Lib/Strings.php | Strings.__startsWith | protected static function __startsWith(string $subStr, string $str) : bool
{
return substr($str, 0, strlen($subStr)) === $subStr;
} | php | protected static function __startsWith(string $subStr, string $str) : bool
{
return substr($str, 0, strlen($subStr)) === $subStr;
} | [
"protected",
"static",
"function",
"__startsWith",
"(",
"string",
"$",
"subStr",
",",
"string",
"$",
"str",
")",
":",
"bool",
"{",
"return",
"substr",
"(",
"$",
"str",
",",
"0",
",",
"strlen",
"(",
"$",
"subStr",
")",
")",
"===",
"$",
"subStr",
";",
... | Substring Match
Determines if a string starts with a specific substring. Returns true if the string
matches the substring at its start, otherwise false.
@example
Strings::startsWith('as', 'asdf'); true
@example
Strings::startsWith('foo', 'barfoo'); false
@type String -> String -> Bool
@param String $subStr Substr... | [
"Substring",
"Match"
] | train | https://github.com/joseph-walker/vector/blob/e349aa2e9e0535b1993f9fffc0476e7fd8e113fc/src/Lib/Strings.php#L94-L97 |
joseph-walker/vector | src/Lib/Strings.php | Strings.__lchomp | protected static function __lchomp(string $toChomp, string $string) : string
{
$length = strlen($toChomp);
if (strcmp(substr($string, 0, $length), $toChomp) === 0) {
return substr($string, $length);
}
return $string;
} | php | protected static function __lchomp(string $toChomp, string $string) : string
{
$length = strlen($toChomp);
if (strcmp(substr($string, 0, $length), $toChomp) === 0) {
return substr($string, $length);
}
return $string;
} | [
"protected",
"static",
"function",
"__lchomp",
"(",
"string",
"$",
"toChomp",
",",
"string",
"$",
"string",
")",
":",
"string",
"{",
"$",
"length",
"=",
"strlen",
"(",
"$",
"toChomp",
")",
";",
"if",
"(",
"strcmp",
"(",
"substr",
"(",
"$",
"string",
... | Left Chomp
Removes the specified substring from the left end of the target string. Unlike PHP's
trim function, the substring to chomp is not a character mask -- rather it is a full
substring. This function is case sensitive.
@example
Strings::lchomp('He', 'Hello World'); // 'llo World'
Strings::lchomp('Hi', 'Hello Wo... | [
"Left",
"Chomp"
] | train | https://github.com/joseph-walker/vector/blob/e349aa2e9e0535b1993f9fffc0476e7fd8e113fc/src/Lib/Strings.php#L172-L181 |
joseph-walker/vector | src/Lib/Strings.php | Strings.__rchomp | protected static function __rchomp(string $toChomp, string $string) : string
{
$length = strlen($toChomp);
if (strcmp(substr($string, -$length, $length), $toChomp) === 0) {
$string = substr($string, 0, -$length);
}
return $string;
} | php | protected static function __rchomp(string $toChomp, string $string) : string
{
$length = strlen($toChomp);
if (strcmp(substr($string, -$length, $length), $toChomp) === 0) {
$string = substr($string, 0, -$length);
}
return $string;
} | [
"protected",
"static",
"function",
"__rchomp",
"(",
"string",
"$",
"toChomp",
",",
"string",
"$",
"string",
")",
":",
"string",
"{",
"$",
"length",
"=",
"strlen",
"(",
"$",
"toChomp",
")",
";",
"if",
"(",
"strcmp",
"(",
"substr",
"(",
"$",
"string",
... | Right Chomp
Removes the specified substring from the right end of the target string. Unlike PHP's
trim function, the substring to chomp is not a character mask -- rather it is a full
substring. This function is case sensitive.
@example
Strings::rchomp('ld', 'Hello World'); // 'Hello Wor'
Strings::rchomp('li', 'Hello ... | [
"Right",
"Chomp"
] | train | https://github.com/joseph-walker/vector/blob/e349aa2e9e0535b1993f9fffc0476e7fd8e113fc/src/Lib/Strings.php#L201-L210 |
joseph-walker/vector | src/Lib/Strings.php | Strings.__chomp | protected static function __chomp(string $toChomp, string $string) : string
{
/** @noinspection PhpParamsInspection */
$chomp = Lambda::compose(self::lchomp($toChomp), self::rchomp($toChomp));
return $chomp($string);
} | php | protected static function __chomp(string $toChomp, string $string) : string
{
/** @noinspection PhpParamsInspection */
$chomp = Lambda::compose(self::lchomp($toChomp), self::rchomp($toChomp));
return $chomp($string);
} | [
"protected",
"static",
"function",
"__chomp",
"(",
"string",
"$",
"toChomp",
",",
"string",
"$",
"string",
")",
":",
"string",
"{",
"/** @noinspection PhpParamsInspection */",
"$",
"chomp",
"=",
"Lambda",
"::",
"compose",
"(",
"self",
"::",
"lchomp",
"(",
"$",... | Two-Sided Chomp
Removes the specified substring from both ends of the target string. Unlike PHP's
trim function, the substring to chomp is not a character mask -- rather it is a full
substring. This function is case sensitive.
@example
Strings::chomp('a', 'abccba'); // 'bccb'
Strings::chomp('ab', 'abccba'); // 'abccb... | [
"Two",
"-",
"Sided",
"Chomp"
] | train | https://github.com/joseph-walker/vector/blob/e349aa2e9e0535b1993f9fffc0476e7fd8e113fc/src/Lib/Strings.php#L230-L236 |
joseph-walker/vector | src/Lib/Strings.php | Strings.__replace | protected static function __replace(string $substring, string $replacement, string $string) : string
{
return str_replace($substring, $replacement, $string);
} | php | protected static function __replace(string $substring, string $replacement, string $string) : string
{
return str_replace($substring, $replacement, $string);
} | [
"protected",
"static",
"function",
"__replace",
"(",
"string",
"$",
"substring",
",",
"string",
"$",
"replacement",
",",
"string",
"$",
"string",
")",
":",
"string",
"{",
"return",
"str_replace",
"(",
"$",
"substring",
",",
"$",
"replacement",
",",
"$",
"s... | String Replace
Replace all occurrences of the search string with the replacement string.
@example
Strings::replace('test', 'passes', 'this test']); // 'this passes'
@param String $substring Substring to find
@param $replacement
@param String $string Replacement string
@return String $string Result after replacemen... | [
"String",
"Replace"
] | train | https://github.com/joseph-walker/vector/blob/e349aa2e9e0535b1993f9fffc0476e7fd8e113fc/src/Lib/Strings.php#L276-L279 |
phpmob/changmin | src/PhpMob/WidgetBundle/Registry/WidgetRegistry.php | WidgetRegistry.getWidgetClass | public function getWidgetClass($name)
{
if (!array_key_exists($name, $this->widgets)) {
throw new \InvalidArgumentException("Not found widget by name `$name`.");
}
return $this->widgets[$name];
} | php | public function getWidgetClass($name)
{
if (!array_key_exists($name, $this->widgets)) {
throw new \InvalidArgumentException("Not found widget by name `$name`.");
}
return $this->widgets[$name];
} | [
"public",
"function",
"getWidgetClass",
"(",
"$",
"name",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"$",
"name",
",",
"$",
"this",
"->",
"widgets",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"\"Not found widget by name `$nam... | {@inheritdoc} | [
"{"
] | train | https://github.com/phpmob/changmin/blob/bfebb1561229094d1c138574abab75f2f1d17d66/src/PhpMob/WidgetBundle/Registry/WidgetRegistry.php#L37-L44 |
aedart/laravel-helpers | src/Traits/Filesystem/StorageFactoryTrait.php | StorageFactoryTrait.getStorageFactory | public function getStorageFactory(): ?Factory
{
if (!$this->hasStorageFactory()) {
$this->setStorageFactory($this->getDefaultStorageFactory());
}
return $this->storageFactory;
} | php | public function getStorageFactory(): ?Factory
{
if (!$this->hasStorageFactory()) {
$this->setStorageFactory($this->getDefaultStorageFactory());
}
return $this->storageFactory;
} | [
"public",
"function",
"getStorageFactory",
"(",
")",
":",
"?",
"Factory",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"hasStorageFactory",
"(",
")",
")",
"{",
"$",
"this",
"->",
"setStorageFactory",
"(",
"$",
"this",
"->",
"getDefaultStorageFactory",
"(",
")",... | Get storage factory
If no storage factory has been set, this method will
set and return a default storage factory, if any such
value is available
@see getDefaultStorageFactory()
@return Factory|null storage factory or null if none storage factory has been set | [
"Get",
"storage",
"factory"
] | train | https://github.com/aedart/laravel-helpers/blob/8b81a2d6658f3f8cb62b6be2c34773aaa2df219a/src/Traits/Filesystem/StorageFactoryTrait.php#L53-L59 |
xavieryang007/xcron-expression | src/Cron/FieldFactory.php | FieldFactory.getField | public function getField($position)
{
if (!isset($this->fields[$position])) {
switch ($position) {
case 0:
$this->fields[$position] = new SecondsField();
break;
case 1:
$this->fields[$position] = new Minu... | php | public function getField($position)
{
if (!isset($this->fields[$position])) {
switch ($position) {
case 0:
$this->fields[$position] = new SecondsField();
break;
case 1:
$this->fields[$position] = new Minu... | [
"public",
"function",
"getField",
"(",
"$",
"position",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"fields",
"[",
"$",
"position",
"]",
")",
")",
"{",
"switch",
"(",
"$",
"position",
")",
"{",
"case",
"0",
":",
"$",
"this",
"->",
... | Get an instance of a field object for a cron expression position
@param int $position CRON expression position value to retrieve
@return FieldInterface
@throws InvalidArgumentException if a position is not valid | [
"Get",
"an",
"instance",
"of",
"a",
"field",
"object",
"for",
"a",
"cron",
"expression",
"position"
] | train | https://github.com/xavieryang007/xcron-expression/blob/a7fa8108ee8ad636625425a9795aae8ba4fee1b3/src/Cron/FieldFactory.php#L26-L55 |
weew/url | src/Weew/Url/UrlQuery.php | UrlQuery.toString | public function toString($encode = false) {
$query = http_build_query($this->query, '', '&', PHP_QUERY_RFC3986);
if ( ! $encode) {
return rawurldecode($query);
}
return $query;
} | php | public function toString($encode = false) {
$query = http_build_query($this->query, '', '&', PHP_QUERY_RFC3986);
if ( ! $encode) {
return rawurldecode($query);
}
return $query;
} | [
"public",
"function",
"toString",
"(",
"$",
"encode",
"=",
"false",
")",
"{",
"$",
"query",
"=",
"http_build_query",
"(",
"$",
"this",
"->",
"query",
",",
"''",
",",
"'&'",
",",
"PHP_QUERY_RFC3986",
")",
";",
"if",
"(",
"!",
"$",
"encode",
")",
"{",
... | @param bool $encode
@return string | [
"@param",
"bool",
"$encode"
] | train | https://github.com/weew/url/blob/117be15e899cc343f22f04f5eb9e92e2164c56c1/src/Weew/Url/UrlQuery.php#L64-L72 |
weew/url | src/Weew/Url/UrlQuery.php | UrlQuery.parseQuery | private function parseQuery($query) {
if (is_array($query)) {
return $query;
}
// "+" sign is reserved and must always be encoded,
// otherwise it is interpreted as a space
$queryString = str_replace('+', '%2B', $query);
parse_str($queryString, $query);
... | php | private function parseQuery($query) {
if (is_array($query)) {
return $query;
}
// "+" sign is reserved and must always be encoded,
// otherwise it is interpreted as a space
$queryString = str_replace('+', '%2B', $query);
parse_str($queryString, $query);
... | [
"private",
"function",
"parseQuery",
"(",
"$",
"query",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"query",
")",
")",
"{",
"return",
"$",
"query",
";",
"}",
"// \"+\" sign is reserved and must always be encoded,",
"// otherwise it is interpreted as a space",
"$",
"q... | @param string|array $query
@return array | [
"@param",
"string|array",
"$query"
] | train | https://github.com/weew/url/blob/117be15e899cc343f22f04f5eb9e92e2164c56c1/src/Weew/Url/UrlQuery.php#L100-L111 |
jfusion/org.jfusion.framework | src/Plugin/Platform.php | Platform.hasFile | final public function hasFile($file)
{
$helloReflection = new \ReflectionClass($this);
$dir = dirname($helloReflection->getFilename());
if(file_exists($dir . '/' . $file)) {
return $dir . '/' . $file;
}
return false;
} | php | final public function hasFile($file)
{
$helloReflection = new \ReflectionClass($this);
$dir = dirname($helloReflection->getFilename());
if(file_exists($dir . '/' . $file)) {
return $dir . '/' . $file;
}
return false;
} | [
"final",
"public",
"function",
"hasFile",
"(",
"$",
"file",
")",
"{",
"$",
"helloReflection",
"=",
"new",
"\\",
"ReflectionClass",
"(",
"$",
"this",
")",
";",
"$",
"dir",
"=",
"dirname",
"(",
"$",
"helloReflection",
"->",
"getFilename",
"(",
")",
")",
... | framework has file?
@param $file
@return boolean|string | [
"framework",
"has",
"file?"
] | train | https://github.com/jfusion/org.jfusion.framework/blob/65771963f23ccabcf1f867eb17c9452299cfe683/src/Plugin/Platform.php#L55-L64 |
webforge-labs/psc-cms | lib/Psc/Doctrine/HydrationCollectionSynchronizer.php | HydrationCollectionSynchronizer.process | public function process($fromCollection, $toCollection) {
// wir haben keine Ahnung welche Objekte in der $fromCollection und welche in der $toCollection sind
$fromCollection = \Psc\Code\Code::castArray($fromCollection); // damit wir eine copy machen
$updates = $inserts = $deletes = array();
$index... | php | public function process($fromCollection, $toCollection) {
// wir haben keine Ahnung welche Objekte in der $fromCollection und welche in der $toCollection sind
$fromCollection = \Psc\Code\Code::castArray($fromCollection); // damit wir eine copy machen
$updates = $inserts = $deletes = array();
$index... | [
"public",
"function",
"process",
"(",
"$",
"fromCollection",
",",
"$",
"toCollection",
")",
"{",
"// wir haben keine Ahnung welche Objekte in der $fromCollection und welche in der $toCollection sind",
"$",
"fromCollection",
"=",
"\\",
"Psc",
"\\",
"Code",
"\\",
"Code",
"::"... | Synchronisiert eine Collection von (Datenbank-)Objekten mit einer Collection von Daten / Unique-Kriterien oder Exportieren Objekten
Die $fromCollection ist die Collection der bereits hydrierten Objekte. (fertige Tags)
die $toCollection ist die noch nicht hydrierte Collection der Objekte die Objekte in $fromCollection ... | [
"Synchronisiert",
"eine",
"Collection",
"von",
"(",
"Datenbank",
"-",
")",
"Objekten",
"mit",
"einer",
"Collection",
"von",
"Daten",
"/",
"Unique",
"-",
"Kriterien",
"oder",
"Exportieren",
"Objekten"
] | train | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/Doctrine/HydrationCollectionSynchronizer.php#L53-L83 |
4devs/ElfinderPhpConnector | Driver/LocalDriver.php | LocalDriver.open | public function open(Response $response, $target = '', $tree = false, $init = false)
{
$target = $target ?: $this->driverOptions['path'];
$url = $this->driverOptions['host'].DIRECTORY_SEPARATOR.$this->driverOptions['path'].DIRECTORY_SEPARATOR;
$this->addOption('path', $target);
$thi... | php | public function open(Response $response, $target = '', $tree = false, $init = false)
{
$target = $target ?: $this->driverOptions['path'];
$url = $this->driverOptions['host'].DIRECTORY_SEPARATOR.$this->driverOptions['path'].DIRECTORY_SEPARATOR;
$this->addOption('path', $target);
$thi... | [
"public",
"function",
"open",
"(",
"Response",
"$",
"response",
",",
"$",
"target",
"=",
"''",
",",
"$",
"tree",
"=",
"false",
",",
"$",
"init",
"=",
"false",
")",
"{",
"$",
"target",
"=",
"$",
"target",
"?",
":",
"$",
"this",
"->",
"driverOptions"... | {@inheritdoc} | [
"{"
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/LocalDriver.php#L63-L86 |
4devs/ElfinderPhpConnector | Driver/LocalDriver.php | LocalDriver.getRootFileInfo | public function getRootFileInfo()
{
$root = $this->getFileInfo($this->driverOptions['path']);
$root->setVolumeid($this->getDriverId().'_');
$root->setPhash(null);
return $root;
} | php | public function getRootFileInfo()
{
$root = $this->getFileInfo($this->driverOptions['path']);
$root->setVolumeid($this->getDriverId().'_');
$root->setPhash(null);
return $root;
} | [
"public",
"function",
"getRootFileInfo",
"(",
")",
"{",
"$",
"root",
"=",
"$",
"this",
"->",
"getFileInfo",
"(",
"$",
"this",
"->",
"driverOptions",
"[",
"'path'",
"]",
")",
";",
"$",
"root",
"->",
"setVolumeid",
"(",
"$",
"this",
"->",
"getDriverId",
... | {@inheritdoc} | [
"{"
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/LocalDriver.php#L91-L98 |
4devs/ElfinderPhpConnector | Driver/LocalDriver.php | LocalDriver.tree | public function tree(Response $response, $target)
{
$response->setTree($this->scanDir($target, GLOB_ONLYDIR));
return $response;
} | php | public function tree(Response $response, $target)
{
$response->setTree($this->scanDir($target, GLOB_ONLYDIR));
return $response;
} | [
"public",
"function",
"tree",
"(",
"Response",
"$",
"response",
",",
"$",
"target",
")",
"{",
"$",
"response",
"->",
"setTree",
"(",
"$",
"this",
"->",
"scanDir",
"(",
"$",
"target",
",",
"GLOB_ONLYDIR",
")",
")",
";",
"return",
"$",
"response",
";",
... | {@inheritdoc} | [
"{"
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/LocalDriver.php#L103-L108 |
4devs/ElfinderPhpConnector | Driver/LocalDriver.php | LocalDriver.parents | public function parents(Response $response, $target)
{
do {
$this->tree($response, $target);
} while ($target = trim(dirname($target), '.'));
} | php | public function parents(Response $response, $target)
{
do {
$this->tree($response, $target);
} while ($target = trim(dirname($target), '.'));
} | [
"public",
"function",
"parents",
"(",
"Response",
"$",
"response",
",",
"$",
"target",
")",
"{",
"do",
"{",
"$",
"this",
"->",
"tree",
"(",
"$",
"response",
",",
"$",
"target",
")",
";",
"}",
"while",
"(",
"$",
"target",
"=",
"trim",
"(",
"dirname"... | {@inheritdoc} | [
"{"
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/LocalDriver.php#L113-L118 |
4devs/ElfinderPhpConnector | Driver/LocalDriver.php | LocalDriver.upload | public function upload(Response $response, $target, $files)
{
if (is_array($files)) {
$files = new FileBag($files);
}
/* @var \Symfony\Component\HttpFoundation\File\UploadedFile $file */
$files = $files->all();
foreach ($files['upload'] as $file) {
$fi... | php | public function upload(Response $response, $target, $files)
{
if (is_array($files)) {
$files = new FileBag($files);
}
/* @var \Symfony\Component\HttpFoundation\File\UploadedFile $file */
$files = $files->all();
foreach ($files['upload'] as $file) {
$fi... | [
"public",
"function",
"upload",
"(",
"Response",
"$",
"response",
",",
"$",
"target",
",",
"$",
"files",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"files",
")",
")",
"{",
"$",
"files",
"=",
"new",
"FileBag",
"(",
"$",
"files",
")",
";",
"}",
"/*... | {@inheritdoc} | [
"{"
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/LocalDriver.php#L123-L149 |
4devs/ElfinderPhpConnector | Driver/LocalDriver.php | LocalDriver.file | public function file(Response $response, $target, $download = false)
{
return new BinaryFileResponse($target, 200, [], false, $download ? 'attachment' : 'inline');
} | php | public function file(Response $response, $target, $download = false)
{
return new BinaryFileResponse($target, 200, [], false, $download ? 'attachment' : 'inline');
} | [
"public",
"function",
"file",
"(",
"Response",
"$",
"response",
",",
"$",
"target",
",",
"$",
"download",
"=",
"false",
")",
"{",
"return",
"new",
"BinaryFileResponse",
"(",
"$",
"target",
",",
"200",
",",
"[",
"]",
",",
"false",
",",
"$",
"download",
... | {@inheritdoc} | [
"{"
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/LocalDriver.php#L154-L157 |
4devs/ElfinderPhpConnector | Driver/LocalDriver.php | LocalDriver.ls | public function ls(Response $response, $target)
{
$files = array_filter(
glob($target.'/*', GLOB_MARK),
function ($val) {
return substr($val, -1, 1) != DIRECTORY_SEPARATOR;
}
);
$files = array_map(
function ($val) {
... | php | public function ls(Response $response, $target)
{
$files = array_filter(
glob($target.'/*', GLOB_MARK),
function ($val) {
return substr($val, -1, 1) != DIRECTORY_SEPARATOR;
}
);
$files = array_map(
function ($val) {
... | [
"public",
"function",
"ls",
"(",
"Response",
"$",
"response",
",",
"$",
"target",
")",
"{",
"$",
"files",
"=",
"array_filter",
"(",
"glob",
"(",
"$",
"target",
".",
"'/*'",
",",
"GLOB_MARK",
")",
",",
"function",
"(",
"$",
"val",
")",
"{",
"return",
... | {@inheritdoc} | [
"{"
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/LocalDriver.php#L162-L177 |
4devs/ElfinderPhpConnector | Driver/LocalDriver.php | LocalDriver.search | public function search(Response $response, $q)
{
$pattern = '/*';
do {
$files = glob($this->driverOptions['path'].$pattern.$q.'*');
foreach ($files as $file) {
$response->addFile($this->getFileInfo($file));
}
$pattern = $pattern.'/*';
... | php | public function search(Response $response, $q)
{
$pattern = '/*';
do {
$files = glob($this->driverOptions['path'].$pattern.$q.'*');
foreach ($files as $file) {
$response->addFile($this->getFileInfo($file));
}
$pattern = $pattern.'/*';
... | [
"public",
"function",
"search",
"(",
"Response",
"$",
"response",
",",
"$",
"q",
")",
"{",
"$",
"pattern",
"=",
"'/*'",
";",
"do",
"{",
"$",
"files",
"=",
"glob",
"(",
"$",
"this",
"->",
"driverOptions",
"[",
"'path'",
"]",
".",
"$",
"pattern",
"."... | {@inheritdoc} | [
"{"
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/LocalDriver.php#L182-L192 |
4devs/ElfinderPhpConnector | Driver/LocalDriver.php | LocalDriver.size | public function size(Response $response, array $targets)
{
$response->incSize(0);
foreach ($targets as $target) {
if (is_dir($target)) {
$this->size($response, glob($target.DIRECTORY_SEPARATOR.'*'));
} else {
$response->incSize(filesize($target... | php | public function size(Response $response, array $targets)
{
$response->incSize(0);
foreach ($targets as $target) {
if (is_dir($target)) {
$this->size($response, glob($target.DIRECTORY_SEPARATOR.'*'));
} else {
$response->incSize(filesize($target... | [
"public",
"function",
"size",
"(",
"Response",
"$",
"response",
",",
"array",
"$",
"targets",
")",
"{",
"$",
"response",
"->",
"incSize",
"(",
"0",
")",
";",
"foreach",
"(",
"$",
"targets",
"as",
"$",
"target",
")",
"{",
"if",
"(",
"is_dir",
"(",
"... | {@inheritdoc} | [
"{"
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/LocalDriver.php#L197-L207 |
4devs/ElfinderPhpConnector | Driver/LocalDriver.php | LocalDriver.mkdir | public function mkdir(Response $response, $target, $name)
{
$dirName = $target.DIRECTORY_SEPARATOR.$name;
@mkdir($dirName);
$dir = $this->getFileInfo($dirName);
$response->addAdded($dir);
return $response;
} | php | public function mkdir(Response $response, $target, $name)
{
$dirName = $target.DIRECTORY_SEPARATOR.$name;
@mkdir($dirName);
$dir = $this->getFileInfo($dirName);
$response->addAdded($dir);
return $response;
} | [
"public",
"function",
"mkdir",
"(",
"Response",
"$",
"response",
",",
"$",
"target",
",",
"$",
"name",
")",
"{",
"$",
"dirName",
"=",
"$",
"target",
".",
"DIRECTORY_SEPARATOR",
".",
"$",
"name",
";",
"@",
"mkdir",
"(",
"$",
"dirName",
")",
";",
"$",
... | {@inheritdoc} | [
"{"
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/LocalDriver.php#L212-L220 |
4devs/ElfinderPhpConnector | Driver/LocalDriver.php | LocalDriver.rm | public function rm(Response $response, array $targets)
{
foreach ($targets as $target) {
if (is_dir($target)) {
$files = [];
$d = dir($target);
while (false !== ($entry = $d->read())) {
$file = $target.DIRECTORY_SEPARATOR.$entry... | php | public function rm(Response $response, array $targets)
{
foreach ($targets as $target) {
if (is_dir($target)) {
$files = [];
$d = dir($target);
while (false !== ($entry = $d->read())) {
$file = $target.DIRECTORY_SEPARATOR.$entry... | [
"public",
"function",
"rm",
"(",
"Response",
"$",
"response",
",",
"array",
"$",
"targets",
")",
"{",
"foreach",
"(",
"$",
"targets",
"as",
"$",
"target",
")",
"{",
"if",
"(",
"is_dir",
"(",
"$",
"target",
")",
")",
"{",
"$",
"files",
"=",
"[",
"... | {@inheritdoc} | [
"{"
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/LocalDriver.php#L225-L251 |
4devs/ElfinderPhpConnector | Driver/LocalDriver.php | LocalDriver.rename | public function rename(Response $response, $target, $name)
{
$name = pathinfo($target, PATHINFO_DIRNAME).DIRECTORY_SEPARATOR.$name;
rename($target, $name);
$tmb = $this->getThumb($target);
if (file_exists($tmb)) {
unlink($tmb);
}
$response->addRemoved(File... | php | public function rename(Response $response, $target, $name)
{
$name = pathinfo($target, PATHINFO_DIRNAME).DIRECTORY_SEPARATOR.$name;
rename($target, $name);
$tmb = $this->getThumb($target);
if (file_exists($tmb)) {
unlink($tmb);
}
$response->addRemoved(File... | [
"public",
"function",
"rename",
"(",
"Response",
"$",
"response",
",",
"$",
"target",
",",
"$",
"name",
")",
"{",
"$",
"name",
"=",
"pathinfo",
"(",
"$",
"target",
",",
"PATHINFO_DIRNAME",
")",
".",
"DIRECTORY_SEPARATOR",
".",
"$",
"name",
";",
"rename",... | {@inheritdoc} | [
"{"
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/LocalDriver.php#L256-L266 |
4devs/ElfinderPhpConnector | Driver/LocalDriver.php | LocalDriver.duplicate | public function duplicate(Response $response, array $targets)
{
foreach ($targets as $target) {
$pathInfo = pathinfo($target);
$isDir = is_dir($target);
for ($i = 0; $i < 1000000; ++$i) {
$newName = $isDir ? $target.'_'.$i : $pathInfo['dirname'].DIRECTORY_... | php | public function duplicate(Response $response, array $targets)
{
foreach ($targets as $target) {
$pathInfo = pathinfo($target);
$isDir = is_dir($target);
for ($i = 0; $i < 1000000; ++$i) {
$newName = $isDir ? $target.'_'.$i : $pathInfo['dirname'].DIRECTORY_... | [
"public",
"function",
"duplicate",
"(",
"Response",
"$",
"response",
",",
"array",
"$",
"targets",
")",
"{",
"foreach",
"(",
"$",
"targets",
"as",
"$",
"target",
")",
"{",
"$",
"pathInfo",
"=",
"pathinfo",
"(",
"$",
"target",
")",
";",
"$",
"isDir",
... | {@inheritdoc} | [
"{"
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/LocalDriver.php#L271-L289 |
4devs/ElfinderPhpConnector | Driver/LocalDriver.php | LocalDriver.paste | public function paste(Response $response, $src, $dst, array $targets, $cut = 0)
{
foreach ($targets as $target) {
if (is_dir($target)) {
$this->copyDir($response, $target, $dst);
} else {
$fileName = $dst.DIRECTORY_SEPARATOR.$this->basename($target);
... | php | public function paste(Response $response, $src, $dst, array $targets, $cut = 0)
{
foreach ($targets as $target) {
if (is_dir($target)) {
$this->copyDir($response, $target, $dst);
} else {
$fileName = $dst.DIRECTORY_SEPARATOR.$this->basename($target);
... | [
"public",
"function",
"paste",
"(",
"Response",
"$",
"response",
",",
"$",
"src",
",",
"$",
"dst",
",",
"array",
"$",
"targets",
",",
"$",
"cut",
"=",
"0",
")",
"{",
"foreach",
"(",
"$",
"targets",
"as",
"$",
"target",
")",
"{",
"if",
"(",
"is_di... | {@inheritdoc} | [
"{"
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/LocalDriver.php#L294-L308 |
4devs/ElfinderPhpConnector | Driver/LocalDriver.php | LocalDriver.info | public function info(Response $response, array $targets)
{
foreach ($targets as $target) {
$response->addFile($this->getFileInfo($target));
}
} | php | public function info(Response $response, array $targets)
{
foreach ($targets as $target) {
$response->addFile($this->getFileInfo($target));
}
} | [
"public",
"function",
"info",
"(",
"Response",
"$",
"response",
",",
"array",
"$",
"targets",
")",
"{",
"foreach",
"(",
"$",
"targets",
"as",
"$",
"target",
")",
"{",
"$",
"response",
"->",
"addFile",
"(",
"$",
"this",
"->",
"getFileInfo",
"(",
"$",
... | {@inheritdoc} | [
"{"
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/LocalDriver.php#L313-L318 |
4devs/ElfinderPhpConnector | Driver/LocalDriver.php | LocalDriver.put | public function put(Response $response, $target, $content = '')
{
$fp = fopen($target, 'w');
fwrite($fp, $content);
fclose($fp);
} | php | public function put(Response $response, $target, $content = '')
{
$fp = fopen($target, 'w');
fwrite($fp, $content);
fclose($fp);
} | [
"public",
"function",
"put",
"(",
"Response",
"$",
"response",
",",
"$",
"target",
",",
"$",
"content",
"=",
"''",
")",
"{",
"$",
"fp",
"=",
"fopen",
"(",
"$",
"target",
",",
"'w'",
")",
";",
"fwrite",
"(",
"$",
"fp",
",",
"$",
"content",
")",
... | {@inheritdoc} | [
"{"
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/LocalDriver.php#L331-L336 |
4devs/ElfinderPhpConnector | Driver/LocalDriver.php | LocalDriver.mkfile | public function mkfile(Response $response, $target, $name)
{
$fullName = $target.DIRECTORY_SEPARATOR.$name;
$fp = fopen($fullName, 'w');
fclose($fp);
$file = $this->getFileInfo($fullName);
$response->addAdded($file);
} | php | public function mkfile(Response $response, $target, $name)
{
$fullName = $target.DIRECTORY_SEPARATOR.$name;
$fp = fopen($fullName, 'w');
fclose($fp);
$file = $this->getFileInfo($fullName);
$response->addAdded($file);
} | [
"public",
"function",
"mkfile",
"(",
"Response",
"$",
"response",
",",
"$",
"target",
",",
"$",
"name",
")",
"{",
"$",
"fullName",
"=",
"$",
"target",
".",
"DIRECTORY_SEPARATOR",
".",
"$",
"name",
";",
"$",
"fp",
"=",
"fopen",
"(",
"$",
"fullName",
"... | {@inheritdoc} | [
"{"
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/LocalDriver.php#L341-L348 |
4devs/ElfinderPhpConnector | Driver/LocalDriver.php | LocalDriver.tmb | public function tmb(Response $response, array $targets)
{
$data = ['images' => [], 'tmb' => false];
$manager = $this->getImageManager();
if (!empty($this->driverOptions['tmbPath']) && !empty($this->driverOptions['path'])) {
foreach ($targets as $target) {
$pInfo =... | php | public function tmb(Response $response, array $targets)
{
$data = ['images' => [], 'tmb' => false];
$manager = $this->getImageManager();
if (!empty($this->driverOptions['tmbPath']) && !empty($this->driverOptions['path'])) {
foreach ($targets as $target) {
$pInfo =... | [
"public",
"function",
"tmb",
"(",
"Response",
"$",
"response",
",",
"array",
"$",
"targets",
")",
"{",
"$",
"data",
"=",
"[",
"'images'",
"=>",
"[",
"]",
",",
"'tmb'",
"=>",
"false",
"]",
";",
"$",
"manager",
"=",
"$",
"this",
"->",
"getImageManager"... | {@inheritdoc} | [
"{"
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/LocalDriver.php#L353-L374 |
4devs/ElfinderPhpConnector | Driver/LocalDriver.php | LocalDriver.resize | public function resize(Response $response, $target, $width, $height, $mode, $x = 0, $y = 0, $degree = 0)
{
$image = $this->getImageManager()->make($target);
switch ($mode) {
case 'resize':
$image->resize($width, $height);
break;
case 'crop':
... | php | public function resize(Response $response, $target, $width, $height, $mode, $x = 0, $y = 0, $degree = 0)
{
$image = $this->getImageManager()->make($target);
switch ($mode) {
case 'resize':
$image->resize($width, $height);
break;
case 'crop':
... | [
"public",
"function",
"resize",
"(",
"Response",
"$",
"response",
",",
"$",
"target",
",",
"$",
"width",
",",
"$",
"height",
",",
"$",
"mode",
",",
"$",
"x",
"=",
"0",
",",
"$",
"y",
"=",
"0",
",",
"$",
"degree",
"=",
"0",
")",
"{",
"$",
"ima... | {@inheritdoc} | [
"{"
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/LocalDriver.php#L379-L398 |
4devs/ElfinderPhpConnector | Driver/LocalDriver.php | LocalDriver.dim | public function dim(Response $response, $target)
{
$img = $this->getImageManager()->make($target);
$response->setDim($img->getWidth().'x'.$img->getHeight());
} | php | public function dim(Response $response, $target)
{
$img = $this->getImageManager()->make($target);
$response->setDim($img->getWidth().'x'.$img->getHeight());
} | [
"public",
"function",
"dim",
"(",
"Response",
"$",
"response",
",",
"$",
"target",
")",
"{",
"$",
"img",
"=",
"$",
"this",
"->",
"getImageManager",
"(",
")",
"->",
"make",
"(",
"$",
"target",
")",
";",
"$",
"response",
"->",
"setDim",
"(",
"$",
"im... | return image dimensions.
@param Response $response
@param string $target | [
"return",
"image",
"dimensions",
"."
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/LocalDriver.php#L406-L410 |
4devs/ElfinderPhpConnector | Driver/LocalDriver.php | LocalDriver.setAdditionalImages | public function setAdditionalImages(array $additionalImages)
{
$resolver = new OptionsResolver();
$this->configureAdditionalImage($resolver);
$this->additionalImages = $additionalImages;
foreach ($additionalImages as $additionalImage) {
$this->addAdditionalImage($addition... | php | public function setAdditionalImages(array $additionalImages)
{
$resolver = new OptionsResolver();
$this->configureAdditionalImage($resolver);
$this->additionalImages = $additionalImages;
foreach ($additionalImages as $additionalImage) {
$this->addAdditionalImage($addition... | [
"public",
"function",
"setAdditionalImages",
"(",
"array",
"$",
"additionalImages",
")",
"{",
"$",
"resolver",
"=",
"new",
"OptionsResolver",
"(",
")",
";",
"$",
"this",
"->",
"configureAdditionalImage",
"(",
"$",
"resolver",
")",
";",
"$",
"this",
"->",
"ad... | set Additional Images.
@param array $additionalImages
@return $this | [
"set",
"Additional",
"Images",
"."
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/LocalDriver.php#L419-L429 |
4devs/ElfinderPhpConnector | Driver/LocalDriver.php | LocalDriver.addAdditionalImage | protected function addAdditionalImage(array $additionalImage, OptionsResolver $resolver)
{
$image = $resolver->resolve($additionalImage);
$this->additionalImages[$image['prefix']] = $image;
return $this;
} | php | protected function addAdditionalImage(array $additionalImage, OptionsResolver $resolver)
{
$image = $resolver->resolve($additionalImage);
$this->additionalImages[$image['prefix']] = $image;
return $this;
} | [
"protected",
"function",
"addAdditionalImage",
"(",
"array",
"$",
"additionalImage",
",",
"OptionsResolver",
"$",
"resolver",
")",
"{",
"$",
"image",
"=",
"$",
"resolver",
"->",
"resolve",
"(",
"$",
"additionalImage",
")",
";",
"$",
"this",
"->",
"additionalIm... | add Additional Image.
@param array $additionalImage
@param OptionsResolver $resolver
@return $this | [
"add",
"Additional",
"Image",
"."
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/LocalDriver.php#L439-L445 |
4devs/ElfinderPhpConnector | Driver/LocalDriver.php | LocalDriver.configureAdditionalImage | protected function configureAdditionalImage(OptionsResolver $resolver)
{
$resolver
->setRequired(['prefix', 'width', 'height'])
->setOptional(['mode'])
->setDefaults(['mode' => 'fit'])
->addAllowedTypes(
[
'prefix' => 'strin... | php | protected function configureAdditionalImage(OptionsResolver $resolver)
{
$resolver
->setRequired(['prefix', 'width', 'height'])
->setOptional(['mode'])
->setDefaults(['mode' => 'fit'])
->addAllowedTypes(
[
'prefix' => 'strin... | [
"protected",
"function",
"configureAdditionalImage",
"(",
"OptionsResolver",
"$",
"resolver",
")",
"{",
"$",
"resolver",
"->",
"setRequired",
"(",
"[",
"'prefix'",
",",
"'width'",
",",
"'height'",
"]",
")",
"->",
"setOptional",
"(",
"[",
"'mode'",
"]",
")",
... | configure Additional Image.
@param OptionsResolver $resolver
@return $this | [
"configure",
"Additional",
"Image",
"."
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/LocalDriver.php#L454-L471 |
4devs/ElfinderPhpConnector | Driver/LocalDriver.php | LocalDriver.copyDir | private function copyDir(Response $response, $target, $dst, $newFolder = '')
{
$folder = trim(strrchr($target, DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR);
$newFolder = $newFolder ?: $dst.DIRECTORY_SEPARATOR.$folder;
if (file_exists($newFolder)) {
throw new ExistsException(sprintf... | php | private function copyDir(Response $response, $target, $dst, $newFolder = '')
{
$folder = trim(strrchr($target, DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR);
$newFolder = $newFolder ?: $dst.DIRECTORY_SEPARATOR.$folder;
if (file_exists($newFolder)) {
throw new ExistsException(sprintf... | [
"private",
"function",
"copyDir",
"(",
"Response",
"$",
"response",
",",
"$",
"target",
",",
"$",
"dst",
",",
"$",
"newFolder",
"=",
"''",
")",
"{",
"$",
"folder",
"=",
"trim",
"(",
"strrchr",
"(",
"$",
"target",
",",
"DIRECTORY_SEPARATOR",
")",
",",
... | copy dir and all inside.
@param Response $response
@param string $target
@param string $dst
@param string $newFolder | [
"copy",
"dir",
"and",
"all",
"inside",
"."
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/LocalDriver.php#L481-L499 |
4devs/ElfinderPhpConnector | Driver/LocalDriver.php | LocalDriver.isShowFile | private function isShowFile($name, $showHidden = false)
{
$response = true;
if ($name == '.' || $name == '..' || (!$showHidden && strpos($name, '.') === 0)) {
$response = false;
}
return $response;
} | php | private function isShowFile($name, $showHidden = false)
{
$response = true;
if ($name == '.' || $name == '..' || (!$showHidden && strpos($name, '.') === 0)) {
$response = false;
}
return $response;
} | [
"private",
"function",
"isShowFile",
"(",
"$",
"name",
",",
"$",
"showHidden",
"=",
"false",
")",
"{",
"$",
"response",
"=",
"true",
";",
"if",
"(",
"$",
"name",
"==",
"'.'",
"||",
"$",
"name",
"==",
"'..'",
"||",
"(",
"!",
"$",
"showHidden",
"&&",... | is Show File.
@param string $name
@return bool | [
"is",
"Show",
"File",
"."
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/LocalDriver.php#L508-L516 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.