query
stringlengths 7
5.25k
| document
stringlengths 15
1.06M
| metadata
dict | negatives
sequencelengths 3
101
| negative_scores
sequencelengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
Set the value of email | public function setEmail($email)
{
$this->email = $email;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setEmail($value)\n {\n $this->_email = $value;\n }",
"public function setEmail($value) {\r\n $this->email = $value;\r\n }",
"public function setEmail($value) {\n if(!strstr($value, \"@\")){\n throw new Exception(\"Errore in setEmail\");\n }\n // se esiste\n\n $this->email = $value;\n\n //$this->generateUserId();\n }",
"public function setEmail($value) {\n\t\tif(!check($value)) throw new Exception(lang('error_9'));\n\t\tif(!Validator::AccountEmail($value)) throw new Exception(lang('error_9'));\n\t\t\n\t\t$this->_email = $value;\n\t}",
"private function setEmail()\n {\n\t if ( empty( $_POST['email'] ) ) {\n\t\t\t$this->data['error']['email'] = 'Please provide a valid email address.';\n $this->error = true;\n return;\n }\n \n $e = trim( $_POST['email'] );\n \n\t\tif ( ! filter_var( $e, FILTER_VALIDATE_EMAIL ) ) {\n\t\t\t$this->data['error']['email'] = 'Please provide a valid email address.';\n $this->error = true;\n return;\n\t\t}\n \n\t\t$this->data['email'] = $e;\n }",
"public function setEmail(?string $value): void {\n $this->getBackingStore()->set('email', $value);\n }",
"function setEmail($newEmail){\n $this->email = $newEmail;\n }",
"function setEmail( $email )\n {\n $this->setValueByFieldName( 'person_email', $email );\n return;\n }",
"public function setEmailAttribute($value)\n {\n if (!empty($value)) {\n $this->attributes['email'] = $this->mayaEncrypt($value);\n }\n }",
"public function changeEmail($newValue){\n\n $this->email = $newValue;\n $this ->save();\n\n }",
"public function setUserEmail($value)\n {\n return $this->set('UserEmail', $value);\n }",
"public function setUserEmail($value)\n {\n return $this->set('UserEmail', $value);\n }",
"public function setEmail($email){\n\t\t$this->email = $email;\n\t}",
"function setEmail($email) {\n\t\treturn $this->setData('email', $email);\n\t}",
"public function setEmail(string $email){\n $this->email = $email;\n }",
"private function _setEmail($input) {\n\t\tif(!Validator::Email($input)) throw new Exception(lang('error_9'));\n\t\t$this->_identifier = $input;\n\t}",
"public function setEmail($newEmail){\n\t}",
"public function set_email( $email ) {\n\t\treturn $this->set_field( 'EMAIL', $email );\n\t}",
"protected function setEmail(string $email)\r\n\t{\r\n\t\t$this->email = $email;\r\n\t}",
"public function setEmail($email){\n\t\t\t$this->email = $email;\n\t\t}",
"public function setEmail($value)\n {\n return $this->set('Email', $value);\n }",
"public function setEmail($value)\n {\n return $this->set('Email', $value);\n }",
"public function setEmail($value)\n {\n return $this->set('Email', $value);\n }",
"public function setEmail($value)\n {\n \t$this->email = $value;\n \treturn $this;\n }",
"public function setEmail($value)\n {\n return $this->set(self::EMAIL, $value);\n }",
"public function setEmail(string $email): void\n {\n $this->_email = $email;\n }",
"public function setEmail($email) {\n\t\t$this->_email = $email;\n\t}",
"public function setUserMail(?string $value): void {\n $this->getBackingStore()->set('userMail', $value);\n }",
"protected function setEmail(string $email) {\n $this->email = $email;\n }",
"public function setEmailAddress($email);",
"public function setEmail($email);",
"public function setEmail($email);",
"public function setEmail($email);",
"public function setGiftcardSenderEmail($value);",
"public static function setEmail($email)\n {\n self::$email = $email;\n }",
"public function setEmail($email)\n {\n $this->email = $this->db->real_escape_string( $email);\n\n }",
"public function setEmail(string $email): void\n {\n $this->email = $email;\n }",
"public function setEmail($email) {\n\t\t$this->email = $email;\n\t}",
"public function setEmail($email) {\n\t\t$this->email = $email;\n\t}",
"public function setEmail($email) {\n\t\t$this->email = $email;\n\t}",
"public function setEmail($email)\n\t{\n\t\t$this->email = $email;\n\t}",
"public function setEmail($email)\n\t{\n\t\t$this->email = $email;\n\t}",
"public function setEmail(string $email)\n {\n $this->email = $email;\n }",
"public function setEmail($email) {\n $this->user_email = $email;\n }",
"public function setEmail1($value)\n {\n return $this->set('Email1', $value);\n }",
"public function setEmail($email) {\n $this->set('email', $email, 'user');\n }",
"public function setEmailAttribute($value)\n {\n $this->attributes['email'] = mb_strtolower($value);\n }",
"public function setEmail(String $email)\n {\n $this->email = $email;\n }",
"function set_email($email) {\n if (is_string($email) == false)\n throw new Exception('type error!');\n\n $email = strtolower($email);\n $len = strlen($email);\n \n if ($len == 0)\n throw new Exception(\"email cannot be empty\");\n if (preg_match(\"/[^a-z_.0-9-@]+/\", $email))\n throw new Exception(\"email has some not allowed characters.\");\n if (!filter_var($email, FILTER_VALIDATE_EMAIL))\n throw new Exception(\"email is not valid\");\n if ($len > 30)\n throw new Exception(\"email cannot be more than 30 characters\");\n\n $this->email = $email;\n }",
"public function setEmail($email)\n {\n $this->email = $email;\n }",
"public function setEmail($email)\n {\n $this->email = $email;\n }",
"public function setEmail($email)\n {\n $this->email = $email;\n }",
"public function setEmail($email)\n {\n $this->email = $email;\n }",
"public function setEmail($email)\n {\n $this->email = $email;\n }",
"public function setEmail($email)\n {\n $this->email = $email;\n }",
"public function setEmail($email)\n {\n $this->email = $email;\n }",
"public function setEmail(string $email) {\n\n $this->email = $email;\n\n }",
"public function setEmailAttribute($value) {\n \t$this->attributes['email'] = strtolower($value);\n\t}",
"public function setEmail($strEmail) {\n\t\t$this->email = $strEmail;\n\t}",
"public function setEmail($email) {\n $this->email = $email;\n }",
"public function setEmail($email) {\n $this->email = $email;\n }",
"public function setEmail($email) {\n $this->email = $email;\n }",
"public function setEmail(?string $email): void;",
"public function setEmail(?string $email): void;",
"public function setEmail($val)\n {\n $this->_propDict[\"email\"] = $val;\n return $this;\n }",
"function _webform_edit_email_validate($element, &$form_state) {\r\n if ($form_state['values']['user_email']) {\r\n $form_state['values']['value'] = '%useremail';\r\n }\r\n}",
"public function set_email($email) : void\n {\n try {\n $this->obj_contato_anunciante->set_email(Validador::Contato_Anunciante()::validar_email($email));\n } catch (Exception $e) {\n $this->erros[] = $e->getMessage();\n $this->campos['email'] = \"erro\";\n }\n }",
"public function setEmail($email)\n {\n $this->session->set('email', $email);\n $this->session->set('crumb', md5($this->config->secrets->secret . time()));\n if($this->isOwner())\n $this->session->set('site', $_SERVER['HTTP_HOST']);\n }",
"public function set_email($email){\n if (\n !empty($email) &&\n \\Audit::instance()->email($email) == false\n ) {\n // no valid email address\n $this->throwValidationError('email');\n }\n return $email;\n }",
"public function setGiftcardRecipientEmail($value);",
"public function setEmail($email)\n\n{\n\n$this->email = $email;\n\n}",
"public function setEmail($mail);",
"public function setEmailAttribute($value)\n {\n $this->attributes['email'] = strtolower($value);\n }",
"public function setEmail($email) {\n $this->setUsername($email);\n $this->email = $email;\n }",
"public function setEmail($newEmail) {\n //first, trim the input of excess whitespace\n $newEmail = trim($newEmail);\n \n //second, sanitize the email of all invalid email characters\n $newEmail = filter_var($newEmail, FILTER_SANITIZE_EMAIL);\n \n //finally, bring the email out of quarantine\n $this->email = $newEmail;\n }",
"public function setEmail($email)\r\n {\r\n if(!$this->validate($email)){\r\n $this->message = \"Field is empty\";\r\n return false;\r\n }\r\n \r\n $this->email = $email;\r\n\r\n return true;\r\n }",
"public function setEmail($email)\n\t\t{\n\t\t$this->email = $email;\n\t\treturn true;\n\t\t}",
"public function userEmail($value = null)\n\t{\n\t\tif ($value != null)\n\t\t{\n\t\t\t$this->_userEmail = $value;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->_userEmail;\n\t\t}\n\t}",
"public function setEmail(?CustomerTextFilter $email): void\n {\n $this->email = $email;\n }",
"function set_admin_email($email) {\n $this->admin_email = $email;\n }",
"public function setEmailAttribute(string $value): void\n {\n $this->attributes[self::EMAIL] = \\strtolower($value);\n }",
"public function setEmail($email) {\n $this->getlead()->setEmail($email);\n }",
"public function setUsernameToEmail()\n {\n $this->username = $this->email;\n $this->usernameCanonical = $this->emailCanonical;\n }",
"function changeemail($member,$oldemail,$newemail) {\n\t\n}",
"public function setMail($_mail)\n {\n $this->mail = $_mail;\n }",
"public function setADEmail($email)\n\t{\n\t\t$this->email = $email;\n\t}",
"public function setUserEmail($user) {\n\t\t$this->userEmail = $user;\n\t}",
"public function updateEmail($email)\n {\n $this->email = trim($email);\n $this->update();\n }",
"function email($email)\n {\n if (!is_valid_email($email))\n return false;\n\n if ($email != $this->email)\n $this->update['email'] = $email;\n\n $this->email = $email;\n\n return true;\n }",
"public function setEmail($value)\n {\n return $this->setParameter('email', $value);\n }",
"public function setEmail($value)\n {\n return $this->setParameter('email', $value);\n }",
"public function setEmail($value)\n {\n return $this->setParameter('email', $value);\n }",
"public function setEmail($value)\n {\n return $this->setParameter('email', $value);\n }",
"public function setEmail($value)\n {\n return $this->setParameter('email', $value);\n }",
"public function _setEmail($Email)\n {\n $this->Email = $Email;\n\n }",
"public function setEmail($email)\n {\n if (!filter_var($_POST['email'],FILTER_VALIDATE_EMAIL)) {\n $this->erreur[] = 'Mauvais format Email';\n }else{\n $this->email = htmlspecialchars($_POST['email']);\n return $this;\n }\n }",
"public function setEmail($anEmail) {\n\t\t$this->_email = $anEmail;\n\t}",
"public function setEmailToAddress($value) { $this->_emailToAddress = $value; }",
"protected static function _email(){\n if (self::$_ruleValue) {\n $str = filter_var(trim(self::$_elementValue), FILTER_VALIDATE_EMAIL);\n if (!$str) {\n self:: setErrorMessage(\"Enter valid email\");\n self::setInvalidFlag(true);\n } else {\n self::setInvalidFlag(false);\n }\n }\n }",
"public function change_email() {\n if($_SESSION['user']->set_email($this->email)) {\n return true;\n } else {\n // An error occured updating the email address, return false\n return false;\n }\n }",
"public function setEmail($email) {\n if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n return false;\n }\n $this->email = $email;\n return true;\n }"
] | [
"0.8320114",
"0.8207443",
"0.81339836",
"0.80443805",
"0.7915434",
"0.78432465",
"0.78333914",
"0.7637634",
"0.7605696",
"0.756671",
"0.75154626",
"0.75154626",
"0.7496423",
"0.7487856",
"0.7484968",
"0.74780154",
"0.74690026",
"0.7465834",
"0.74249554",
"0.73958474",
"0.7376175",
"0.73746145",
"0.73746145",
"0.73733425",
"0.7350471",
"0.73355174",
"0.7335016",
"0.73184",
"0.7308534",
"0.7303374",
"0.72843206",
"0.72843206",
"0.72843206",
"0.7282046",
"0.72757095",
"0.7272034",
"0.72678685",
"0.7241061",
"0.7241061",
"0.7241061",
"0.7229155",
"0.7229155",
"0.7227465",
"0.7195372",
"0.7191777",
"0.71894056",
"0.71891856",
"0.71888304",
"0.71815145",
"0.7175152",
"0.7175152",
"0.7175152",
"0.7175152",
"0.7175152",
"0.7175152",
"0.7175152",
"0.716556",
"0.7160852",
"0.7160221",
"0.7152097",
"0.7152097",
"0.7152097",
"0.7128992",
"0.7128992",
"0.7121045",
"0.71195114",
"0.711073",
"0.70832497",
"0.70753133",
"0.7065379",
"0.7054867",
"0.7051952",
"0.70494074",
"0.7031222",
"0.7007698",
"0.70075375",
"0.69909424",
"0.6990149",
"0.6979738",
"0.6979417",
"0.6968789",
"0.6964078",
"0.69636315",
"0.6953141",
"0.6923221",
"0.6909192",
"0.688023",
"0.6869575",
"0.6860859",
"0.68381596",
"0.68381596",
"0.68381596",
"0.68381596",
"0.68381596",
"0.6832759",
"0.68308496",
"0.6829195",
"0.6819542",
"0.68109906",
"0.67864144",
"0.6784444"
] | 0.0 | -1 |
Set the value of phone_number | public function setPhone_number($phone_number)
{
$this->phone_number = $phone_number;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setPhoneNumber($phone_number): void\n {\n $this->_phoneNumber = $phone_number;\n }",
"function setPhone($newPhone){\n //check if the phone number is numeric\n if(is_numeric($newPhone)) {\n $this->phone = $newPhone;\n }\n //if not set to default, 0000000000\n $this->phone = \"0000000000\";\n }",
"public function setPhone($phone = \"\");",
"public function setPhoneAttribute($value)\n {\n if (!empty($value)) {\n $this->attributes['phone'] = $this->mayaEncrypt($value);\n }\n }",
"public function setPhone(string $phone):void\n {\n $this->phone = $phone;\n }",
"public function setPhone(string $phone): void\n {\n $this->_phone = $phone;\n }",
"public function setphoneNumber($number)\n {\n $this->_param['phone_number'] = Util::cleanNumber($number);\n return $this;\n }",
"private function setTelephone()\n {\n \tif ( empty($_POST['telephone'] ) ) {\n $this->data['error']['telephone'] = 'Please provide a valid phone number.';\n $this->error = true;\n return;\n }\n\t\n $t = trim( $_POST['telephone'] );\n \n\t\t// Remove non-digits.\n\t\t$t = preg_replace('/[^0-9]/', '', $t);\n\t\n\t\t// Make sure it's 10 digits.\n\t\tif ( strlen($t) != 10 ) {\n\t\t\t$this->data['error']['telephone'] = 'Please provide a valid phone number.';\n $this->error = true;\n return;\n\t\t}\n\t\n $this->data['telephone'] = $t;\n }",
"public function setPhone($value)\n {\n return $this->set('Phone', $value);\n }",
"public function setPhone($phone)\r\n {\r\n $this->_phone = $phone;\r\n }",
"public function setPhone($phone)\r\n {\r\n $this->_phone = $phone;\r\n }",
"public function setPhone($value)\n {\n return $this->set(self::PHONE, $value);\n }",
"public function setPhone($value)\n {\n return $this->set(self::PHONE, $value);\n }",
"public function setPhone($phone) {\n\t\t$this->phone = $phone;\n\t}",
"public function setPhone($phone) {\n $this->phone = $phone;\n }",
"public function setPhone($phone)\n {\n $this->phone = $phone;\n }",
"public function setPhone($phone)\n {\n $this->phone = $phone;\n }",
"public function setPhone($value)\n {\n $this->phone = $value;\n return $this;\n }",
"public function setPhone($var)\n {\n GPBUtil::checkString($var, True);\n $this->phone = $var;\n }",
"public function set_telephone_number( $number ) {\n\t\treturn $this->set_field( 'OWNERTELNO', $number );\n\t}",
"public function setPhoneNumber(String $phoneNumber)\n {\n $this->phoneNumber = $phoneNumber;\n }",
"public function setPhoneNumber($value)\n {\n return $this->setParameter('phoneNumber', $value);\n }",
"public function setPhoneNumber($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->phone_number !== $v) {\n\t\t\t$this->phone_number = $v;\n\t\t\t$this->modifiedColumns[] = UserPeer::PHONE_NUMBER;\n\t\t}\n\n\t\treturn $this;\n\t}",
"public function setPhoneNumber($var)\n {\n GPBUtil::checkString($var, True);\n $this->phoneNumber = $var;\n\n return $this;\n }",
"public function setPhoneNumber($phoneNumber)\n {\n $phoneNumber = str_replace(' ', '', $phoneNumber); // perhaps using a regular expression would be easier?\n\n if(!ctype_digit($phoneNumber))\n throw new \\InvalidArgumentException('Only digits may be used within phone numbers.');\n\n $this->phoneNumber = $phoneNumber;\n }",
"public function setPhone($newNumber)\n\t{\n\t\t//If there are more or less than 10 digits, break.\n\t\t//Else, format as follows: \"(ABC) DEF-GHIJ\"\n\t\t$newNumber = buildPhoneNum($newNumber);\n\t\tif ($newNumber == null)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif (updateContact($id, 'phone', $newNumber))\n\t\t{\n\t\t\t$this->phone = $newNumber;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function setTelephone($telephone) {\n\t\t$this->telephone = $telephone;\n\t}",
"public function setCustomerPhone($customer_phone){\n $this->customer_phone = $customer_phone;\n }",
"public function testCanSetAndGetPhoneNumber()\n {\n $mockPhoneNumber = '12345678990';\n\n $this->dataCenter->setPhoneNumber($mockPhoneNumber);\n\n $this->assertEquals($mockPhoneNumber, $this->dataCenter->getPhoneNumber());\n }",
"public function setTelephone($telephone)\n {\n $this->telephone = $telephone;\n }",
"function changeNumber() {\r\n\t\r\n\t\t//set phone number as is, with () and - in it.\r\n\t\t$phoneNumber = $this->phone_number;\r\n\r\n\t\t//seperate phone number into 3 parts\r\n\t\t$phoneNum1 = substr($phoneNumber, -13, 3);\r\n\t\t$phoneNum2 = substr($phoneNumber, -8, 3);\r\n\t\t$phoneNum3 = substr($phoneNumber, -4, 4);\r\n\t\t\r\n\t\t//combine three parts of phone number into one.\r\n\t\t$phoneNumberFull = $phoneNum1 . $phoneNum2 . $phoneNum3;\r\n\r\n\t\t//change phoneNumber data for specific carrier\r\n\t\t$phoneCarrier = $this->carrier;\r\n\t\t\r\n\t\tswitch($phoneCarrier) {\r\n\t\t\t//Verizon\r\n\t\t\tcase \"verizon\":\r\n\t\t\t\t$phoneNumberFull .= \"@vtext.com\";\r\n\t\t\t\tbreak;\r\n\t\t\t//AT & T\r\n\t\t\tcase \"at&t\":\r\n\t\t\t\t$phoneNumberFull .= \"@txt.att.net\";\r\n\t\t\t\tbreak;\r\n\t\t\t//Sprint\r\n\t\t\tcase \"sprint\":\r\n\t\t\t\t$phoneNumberFull .= \"@messaging.sprintpcs.com\";\r\n\t\t\t\tbreak;\r\n\t\t\t//T-Mobile\r\n\t\t\tcase \"tmobile\":\r\n\t\t\t\t$phoneNumberFull .= \"@tmomail.net\";\r\n\t\t\t\tbreak;\r\n\t\t\t//Default case where error occurred.\r\n\t\t\tdefault:\r\n\t\t\t\tdie(\"Converting phoneNumber failed.<br />\");\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\t//assigns phone number to event class\r\n\t\t$this->phone_number = $phoneNumberFull;\r\n\t\r\n\t}",
"public function setMobileNumber($mobileNumber);",
"public function setPhoneNumber($phoneNumber)\n {\n $this->phoneNumber = $this->purify($phoneNumber);\n\n return $this;\n }",
"public function setSmsNumber($number)\n {\n $currentNumber = $this->getSmsNumber();\n if ($number === $currentNumber) {\n return;\n }\n $this->unsetSmsNumber();\n $updated = false;\n if ($this->data->contact_info->phone) {\n foreach ($this->data->contact_info->phone as $phone) {\n if ($phone->phone_number === $number) {\n $phone->preferred_sms = true;\n }\n }\n }\n if (!$updated) {\n $this->addSmsNumber($number);\n }\n }",
"function change_mobile_number() {\n\n\t\t$this->authentication->is_user_logged_in(TRUE, 'user/login');\n\n\t\tloadTemplate('user/add_mobile_number');\n\t}",
"public function _set($number) {\n\t\t$this->number = $number;\n\t\t$this->id = $this->id_base . '-' . $number;\n\t}",
"public function setPhone($value)\n {\n $this->setParameter('billingPhone', $value);\n $this->setParameter('shippingPhone', $value);\n\n return $this;\n }",
"public function setCustomerPhone($val)\n {\n $this->_propDict[\"customerPhone\"] = $val;\n return $this;\n }",
"public function setPhone(?CustomerTextFilter $phone): void\n {\n $this->phone = $phone;\n }",
"public function setPhone($phone)\n {\n $this->phone = $phone;\n\n return $this;\n }",
"public function setNewPhone($value)\n {\n return $this->set('NewPhone', $value);\n }",
"public function setRegistrationNumber($value) {\n\t\tself::$_registrationNumber = $value;\n\t}",
"public function setPhone( $phone ) {\n\t\t$this->container['phones'] = isset( $phone ) ? array( $phone ) : null;\n\n\t\treturn $this;\n\t}",
"public function _set($number)\n {\n }",
"public function setPhone(string $phone = null) : CNabuDataObject\n {\n $this->setValue('nb_icontact_prospect_phone', $phone);\n \n return $this;\n }",
"public function setPhone($phone)\r\n {\r\n $this->phone = $phone;\r\n return $this;\r\n }",
"public function setPhoneNumber($phone_number)\n {\n $this->phone_number = $phone_number;\n\n return $this;\n }",
"public function phone($phone = null);",
"public function setCustomerPhone($customerPhone = '000-000-0000') {\n $phone = array(\n 'x_phone'=>$this->truncateChars($this->cleanPhoneNumber($customerPhone), 25),\n );\n $this->NVP = array_merge($this->NVP, $phone); \n }",
"public function setPhone($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->phone !== $v) {\n $this->phone = $v;\n $this->modifiedColumns[OrdrhedTableMap::COL_PHONE] = true;\n }\n\n return $this;\n }",
"public function getPhoneNumber()\n {\n return $this->phone_number;\n }",
"public function setTelefono($_telefono)\n {\n $this->telefono = $_telefono;\n }",
"public function setPhone($phone)\n {\n $this->phone = $phone;\n return $this;\n }",
"public function setPhone($phone)\n {\n $this->phone = $phone;\n return $this;\n }",
"public function setNumber($number) {\n $this->_number = $number;\n }",
"public function setNumber($number)\n {\n $this->_number = $number;\n }",
"public function setPhoneNumber($phoneNumber)\n {\n $this->phoneNumber = $phoneNumber;\n\n return $this;\n }",
"public function setNumber($number);",
"public function getPhoneNumber()\n\t{\n\t\treturn $this->phone_number;\n\t}",
"public function getPhoneNumber()\n {\n return $this->phoneNumber;\n }",
"function editPhoneNumber($data){\n\t\t\t$conn = $this->connect();\n\t\t\t$uid = $_SESSION['userid'];\n\t\t\t$pid = $_SESSION['pid'];\n\t\t\t$ephone = $this->modify(mysqli_real_escape_string($conn, $data['ephone']));\n\t\t\tif(empty($ephone)) {\n\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&Empty\");\n\t\t\t} else {\n\t\t\t\tif(preg_match(\"/^[0][1](8|9|5|7|6)[0-9]+$/\", $ephone)) {\n\t\t\t\t\tif($this->length($ephone, 11, 11)) {\n\t\t\t\t\t\t$result = $this->changepost(\"newpost\", \"post_phone_number\", $ephone , $uid , $pid);\n\t\t\t\t\t\tif($result == false) {\n\t\t\t\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&Failed!\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&Successfully_Changed\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&length=tooBigOrSmall\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&invalid=number\");\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public function set_idnumber($value) {\r\n $this->idnumber = $value;\r\n data::add(\"idnumber\", $this->idnumber == \"\" ? NODATA : input::santize($this->idnumber), $this->table_fields);\r\n }",
"public function setPhoneNo(string $phoneNo) : self\n {\n $this->phoneNo = $phoneNo;\n return $this;\n }",
"public function setNumber($number) {\n\t\tif (!preg_match('/\\+[0-9]{3,16}$/', $number)) return false;\n\t\t$this->number = $number;\r\n\t\treturn true;\r\n\t}",
"public function setNumber(?string $value): void {\n $this->getBackingStore()->set('number', $value);\n }",
"public function setPhone($phone) {\n $this->phone = $phone;\n\n return $this;\n }",
"public function setNumber($number)\n {\n $this->number = $number;\n }",
"public function getPhoneNumber()\n {\n return $this->phoneNumber;\n }",
"public function getPhoneNumber()\n {\n return $this->phoneNumber;\n }",
"public function getPhoneNumber()\n {\n return $this->phoneNumber;\n }",
"public function setTelephone($telephone)\n {\n $this->telephone = $telephone;\n\n return $this;\n }",
"public function getPhoneNo()\n {\n return $this->phone_no;\n }",
"public function setPhone($phone)\n {\n $this->getEntity()->setPhone($phone);\n return $this;\n }",
"public function setPhone($phone)\n {\n $this->phone = $phone;\n\n return $this;\n }",
"public function setPhone($phone)\n {\n $this->phone = $phone;\n\n return $this;\n }",
"public function setPhone($phone)\n {\n $this->phone = $phone;\n\n return $this;\n }",
"public function setPhone($phone)\n {\n $this->phone = $phone;\n\n return $this;\n }",
"public function setPhone($phone)\n {\n $this->phone = $phone;\n\n return $this;\n }",
"public function setPhone($phone)\n {\n $this->phone = $phone;\n\n return $this;\n }",
"public function setPhone($phone)\n {\n $this->phone = $phone;\n\n return $this;\n }",
"public function setPhone($phone)\n {\n $this->phone = $phone;\n\n return $this;\n }",
"public function get_phone() {\r\n return $this->phone;\r\n }",
"public function getPhoneNumber()\n\t{\n\t\treturn $this->getIfSet('number', $this->data->phone);\n\t}",
"public function setBillingPhone($value)\n {\n return $this->setParameter('billingPhone', $value);\n }",
"function setPrimaryPhone($primaryPhone) {\n\t\treturn $this->setData('primaryPhone', $primaryPhone);\n\t}",
"public function getPhoneNumber()\n {\n return $this->country_code.$this->phone;\n }",
"public function setPhone($quote, $phone)\n {\n $quote->getBillingAddress()->setTelephone($phone)->save();\n $quote->getShippingAddress()->setTelephone($phone)->save();\n $customerAddressId = $quote->getBillingAddress()->getCustomerAddressId();\n if ($customerAddressId) {\n $customerAddress = Mage::getModel('customer/address')->load($customerAddressId);\n $customerAddress->setTelephone($phone)->save();\n }\n }",
"public function setPhone($quote, $phone)\n {\n $quote->getBillingAddress()->setTelephone($phone)->save();\n $quote->getShippingAddress()->setTelephone($phone)->save();\n $customerAddressId = $quote->getBillingAddress()->getCustomerAddressId();\n if ($customerAddressId) {\n $customerAddress = Mage::getModel('customer/address')->load($customerAddressId);\n $customerAddress->setTelephone($phone)->save();\n }\n }",
"function set_random_us_phone($state='*')\r\n{\r\n\t// get random state\r\n\tif ( $state == '*' )\r\n\t{\r\n\t\t$_ZIP_DATA = $this->_get_random_zip_data();\r\n\t\t$state = $_ZIP_DATA[1];\r\n\t}\r\n\t\r\n\t// get random phone\r\n\t$phone = $this->_get_random_us_phone($state, 1);\r\n\t\r\n\t// set prop\r\n\t$this->phone = $phone;\r\n\treturn;\r\n}",
"function phoneid ($phone_number, array $fields = []) {\n return $this->post(sprintf(self::PHONEID_RESOURCE, $phone_number), $fields);\n }",
"public function setPhoneNo($phone_no)\n {\n $this->phone_no = $phone_no;\n\n return $this;\n }",
"public function setPhone($areaCode, $number, $countryCode = 55)\n\t{\n\t\t$this->data->phone = new stdClass();\n\t\t$this->data->phone->countryCode = $countryCode;\n\t\t$this->data->phone->areaCode = $areaCode;\n\t\t$this->data->phone->number = $number;\n\n\t\treturn $this;\n\t}",
"public function setNumber(?string $number): self\n {\n $this->initialized['number'] = true;\n $this->number = $number;\n\n return $this;\n }",
"function setNum_teleco($snum_teleco = '')\n {\n $this->snum_teleco = $snum_teleco;\n }",
"public function setCallerIdNumber(string $number)\n {\n $this->callerIdNumber = $number;\n }",
"public function setNumber($number)\n {\n return $this->setData(self::NUMBER, $number);\n }",
"public function setTelephone(string $telephone)\n {\n $this->telephone = $telephone;\n\n return $this;\n }",
"public function __construct($phone)\n {\n $this->_phone = $phone;\n }",
"function phone($number = 'primary')\n {\n // Determine the characters that can make up a phone number\n $characters = ['(', ')', '+', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.'];\n\n // Check for configuration reference\n if(strlen($number) < 10 || strlen(str_replace($characters, '', $number)) == 0) {\n\n // Determine the phone configuration\n $number = config('branding.contacts.phones.' . $number);\n\n }\n\n // Return the phone number\n return $number;\n }",
"public function setShippingPhone($value)\n {\n return $this->setParameter('shippingPhone', $value);\n }"
] | [
"0.78021264",
"0.7687545",
"0.76150024",
"0.75051856",
"0.7486988",
"0.74764365",
"0.7443406",
"0.74153167",
"0.74139726",
"0.7357721",
"0.7357721",
"0.7333779",
"0.7333779",
"0.7274097",
"0.7213269",
"0.7206081",
"0.7206081",
"0.7204833",
"0.7195353",
"0.71811473",
"0.714684",
"0.7134174",
"0.7127547",
"0.70525986",
"0.7036177",
"0.7028188",
"0.6922198",
"0.6884856",
"0.6859255",
"0.68588376",
"0.68540055",
"0.68509674",
"0.6782195",
"0.67496157",
"0.66972965",
"0.6688272",
"0.66867745",
"0.6672176",
"0.6665441",
"0.6659996",
"0.66322637",
"0.66276234",
"0.6614263",
"0.6607587",
"0.65780485",
"0.65764177",
"0.65703803",
"0.65651083",
"0.6460929",
"0.64587605",
"0.64571375",
"0.6438677",
"0.64339364",
"0.64339364",
"0.64210784",
"0.6417443",
"0.6417027",
"0.64036626",
"0.64033985",
"0.6355003",
"0.6354612",
"0.6348077",
"0.63356304",
"0.63330036",
"0.63297075",
"0.63210684",
"0.6314452",
"0.62889546",
"0.62889546",
"0.62889546",
"0.62762356",
"0.6267828",
"0.6255344",
"0.624804",
"0.624804",
"0.624804",
"0.624804",
"0.624804",
"0.624804",
"0.624804",
"0.624804",
"0.6226892",
"0.6210195",
"0.6199287",
"0.61939824",
"0.6187343",
"0.6186058",
"0.6186058",
"0.6173808",
"0.61694866",
"0.61586",
"0.6138031",
"0.6134648",
"0.61324775",
"0.611578",
"0.61157733",
"0.61036026",
"0.610333",
"0.6091359",
"0.60710496"
] | 0.6853466 | 31 |
Set the value of bp | public function setBp($bp)
{
$this->bp = $bp;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setValue ($value) {\n\t\t$this->_value = $value;\n\t}",
"function setPlace( &$value )\n {\n $this->Place = $value;\n }",
"function setValue($value){\r\n\t\t$this->value = $value;\r\n\t}",
"function set_value($value)\n\t{\n\t\t$this->value = $value;\n\t}",
"public function setValue($value){\n $this->_value = $value;\n }",
"function setValue($value) {\n $this->value = $value;\n }",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function set()\n {\n if ( ! $this->value ) {\n $this->generate();\n }\n }",
"public function setValue($value);",
"public function setValue($value);",
"public function setValue($value);",
"public function setValue($value);",
"public function setValue($value);",
"public function setValue($value);",
"public function setValue($value);",
"public function setValue($value);",
"public function setValue($value);",
"public function setValue($value);",
"function value( $value )\n\t{\n\t\t$this->value = $value;\n\t}",
"function byref_set_value( $pFeature, $pPref = \"\", $pPackageName = NULL ) {\n\tglobal $_REQUEST, $gBitSystem, $gBitSmarty;\n\tif( isset( $_REQUEST[$pFeature] ) ) {\n\t\tif( strlen( $pPref ) > 0 ) {\n\t\t\t$gBitSystem->storeConfig( $pPref, $_REQUEST[$pFeature], $pPackageName );\n\t\t\t// also assign the ref appareantly --gongo\n\t\t\t$gBitSmarty->assign_by_ref( $pPref, $_REQUEST[$pFeature] );\n\t\t} else {\n\t\t\t$gBitSystem->storeConfig( $pFeature, $_REQUEST[$pFeature], $pPackageName );\n\t\t}\n\n\t\t$gBitSmarty->assign_by_ref( $pFeature, $_REQUEST[$pFeature] );\n\t}\n}",
"abstract public function setValue($value);",
"public function set_value($value) {\n\t\t$this->_value = $value + 0;\n\t}",
"public function set_value( $value ) {\n $this->value = $value;\n }",
"public function SetValue($value)\n\t{\n\t\t$this->value = $value;\n\t}",
"public function setFbp( $fbp ) {\n\t\t$this->container['fbp'] = $fbp;\n\n\t\treturn $this;\n\t}",
"protected function doSet($value)\n {\n }",
"public function setValue( $value )\r\n\t{\r\n\t\t$this->value = $value;\r\n\t}",
"public function setValue($value)\n {\n $this->_value = new Zend_Memory_Value($value, $this);\n }",
"public function setValue($bibtex_key, $p, $v) // {{{\n {\n $entry = $this->m_entries[$bibtex_key];\n $entry[$p] = $v;\n $entry[\"raw\"][$p] = $v;\n $this->m_entries[$bibtex_key] = $entry;\n }",
"public function setValue($value) {\n $this->value = $value->value;\n }",
"private function setParam($statemant, $key, $value){\n\t\t$statemant->bindParam($key, $value);\n\t}",
"public function setBloodSupply($value)\n {\n $this->bloodSupply = $value;\n }",
"public function setValue($v){\n $this->value = $v;\n }",
"public function setValue($value) {\n $this->value = $value;\n }",
"public function setValue($value) {\n $this->value = $value;\n }",
"public function setValue($value) {\n $this->value = $value;\n }",
"public function setValue($value) {\n $this->value = $value;\n }",
"public function __set ($psProperty, $pmValue)\n\t{\n\t\t$this->set($psProperty, $pmValue);\n\t}",
"function simple_set_value( $pFeature, $pPackageName = NULL ) {\n\tglobal $_REQUEST, $gBitSystem, $gBitSmarty;\n\tif( isset( $_REQUEST[$pFeature] ) ) {\n\t\t$gBitSystem->storeConfig( $pFeature, $_REQUEST[$pFeature], $pPackageName );\n\t\t$gBitSmarty->assign( $pFeature, $_REQUEST[$pFeature] );\n\t}\n}",
"public function setValue($value)\n {\n $this->value = $value;\n }",
"public function setValue($value)\n {\n $this->value = $value;\n }",
"public function setValue($value)\n {\n $this->value = $value;\n }",
"public function setValue($value)\n {\n $this->value = $value;\n }",
"function set_par($p,$v)\n {\n $this->__par[$p] = $v;\n }",
"public function setValue( $value ) { \n $this->inputValue = $value; \n $this->value = $value;\n }",
"public function setValue($value = true)\n {\n $this->value = $value;\n }",
"public function setVal($val){\n\t\t\t$this->_val = $val;\n\t\t}",
"public function set($value = null);",
"function setStreet1( &$value )\n {\n $this->Street1 = $value;\n }",
"public function setValue2($value){\n $this->_value2 = $value;\n }",
"public function setBreadth($breadth) {\r\n $this->breadth = $breadth;\r\n }",
"public function setAddress($value)\n {\n $this->_address = $value;\n }",
"public function __set($param, $value);",
"public function _set($number)\n {\n }",
"public function setBU($value)\n {\n return $this->set(self::BU, $value);\n }",
"public function setAddress(?string $value): void {\n $this->getBackingStore()->set('address', $value);\n }",
"public function __set( $member, $value ){\n\n $this->array_values[ $member ] = $value;\n\n }",
"public function set(int $value): void {}",
"public function setPostcode($value) {\n\t\tself::$_postCode = $value;\n\t}",
"protected function _setValue($name, $value) {}",
"public function setValue($value, $load = false);",
"public function set()\n {\n // to reflect the current bar.\n\n // Why?\n\n // Otherwise the bar count gets repeated. And that people notice.\n\n $this->variables->setVariable(\"count\", $this->bar_count);\n $this->variables->setVariable(\"max_bar_count\", $this->max_bar_count);\n\n $this->variables->setVariable(\"refreshed_at\", $this->current_time);\n }",
"public function setPostBuffer($val)\n {\n $this->_propDict[\"postBuffer\"] = $val;\n return $this;\n }",
"public function set($parameter, $value);",
"function set($name, $value) {\n $this->vars[$name] = $value; //is_object($value) ? $value->fetch() : $value;\n }",
"public function setValue($value)\n\t{\n\t\tif (parent::getValue() === $value) {\n\t\t\treturn;\n\t\t}\n\n\t\tparent::setValue($value);\n\t\tif ($this->getActiveControl()->canUpdateClientSide() && $this->getHasLoadedPostData()) {\n\t\t\t$this->getPage()->getCallbackClient()->setValue($this, $value);\n\t\t}\n\t}",
"public function setBranchOf($value)\n {\n $this->branchOf = $value;\n }",
"function setValue(int $field, $value) : void;",
"public function assign($name,$value);",
"public function setProcessId(?int $value): void {\n $this->getBackingStore()->set('processId', $value);\n }",
"function setBreve($sbreve = '')\n {\n $this->sbreve = $sbreve;\n }",
"function setStateB($stateB) {\r\r\n\t\t$this->stateB = $stateB;\r\r\n\t}",
"public function getBp($bp=null)\n {\n if ($bp != null && is_array($this->entity) && count($this->entity)!=0) {\n $table_name = strtolower(get_class($this));\n $query = \"SELECT * FROM $table_name WHERE bp = ?\";\n $req = Manager::bdd()->prepare($query);\n $req->execute([$bp]);\n $data = \"\";\n if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) {\n$d=$data[0];\n$this->setId_entity($d['id_entity']);\n$this->setLabel($d['label']);\n$this->setDomaine($d['domaine']);\n$this->setEmail($d['email']);\n$this->setPhone_number($d['phone_number']);\n$this->setBp($d['bp']);\n$this->setLocalisation($d['localisation']);\n$this->setVille($d['ville']);\n$this->setUniqueId($d['uniqueId']);\n$this->setCreated_at($d['created_at']);\n$this->setCreated_by($d['created_by']);\n$this->setUpdate_at($d['update_at']);\n$this->setUpdate_by($d['update_by']);\n$this->entity =$data; \n return $this;\n }\n \n } else {\n return $this->bp;\n }\n \n }",
"public function setValue($value)\n\t{\n\t\t$this->setViewState('Value',$value,'');\n\t}",
"protected function populate_value()\n {\n }",
"public function setB($b)\n {\n $this->B = $b;\n return $this;\n }",
"public function setFlag($flag);",
"public function\tsetSubmittedValue($submittedValue);",
"public function setImAddress($value)\n {\n $this->setProperty(\"ImAddress\", $value, true);\n }",
"public function __set($_name, $_value);",
"function setBCC($bcc){\n\t\t\t$this->bcc = $bcc;\n\t\t}",
"public function setNumber(?string $value): void {\n $this->getBackingStore()->set('number', $value);\n }",
"public function setUpn(?string $value): void {\n $this->getBackingStore()->set('upn', $value);\n }",
"function set($name, $value){\n\t\t$this->vars[$name] = $value;\n\t}",
"public function set($params) {}",
"function setUrl( &$value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->Url = ( $value );\n }",
"private function setBuddypressParams()\n\t{\n\t\tif ($this->buddypress_active === true && get_option($this->GrOptionDbPrefix . 'bp_registration_on'))\n\t\t{\n\t\t\tadd_action('bp_before_registration_submit_buttons', array(\n\t\t\t\t&$this,\n\t\t\t\t'AddCheckboxToBpRegistrationPage'\n\t\t\t), 5);\n\t\t\tadd_action('bp_after_registration_confirmed', array(&$this, 'SetBpActivateKey'), 5, 1);\n\t\t\tadd_action('bp_after_activation_page', array(&$this, 'addActivatedBpContactsToGr'), 5, 1);\n\t\t\tadd_action('wp_head', array(&$this, 'AddGrBpCss'));\n\t\t}\n\t}",
"public function setBuslineAttribute($value)\n {\n $this->attributes['busline'] = $value;\n }"
] | [
"0.61799836",
"0.6149069",
"0.6136377",
"0.6131183",
"0.6059759",
"0.5970114",
"0.59155583",
"0.59155583",
"0.59155583",
"0.59155583",
"0.59155583",
"0.59155583",
"0.59155583",
"0.59155583",
"0.59155583",
"0.59155583",
"0.59155583",
"0.5915305",
"0.5915305",
"0.5834921",
"0.5826029",
"0.5826029",
"0.5826029",
"0.5826029",
"0.5826029",
"0.5826029",
"0.5826029",
"0.5826029",
"0.5826029",
"0.5826029",
"0.5795385",
"0.5751686",
"0.57367814",
"0.57360923",
"0.5732341",
"0.5719044",
"0.5677766",
"0.56476057",
"0.5637639",
"0.5617196",
"0.5617085",
"0.5603955",
"0.55707574",
"0.5555067",
"0.55393445",
"0.5530096",
"0.5530096",
"0.5530096",
"0.5530096",
"0.55152196",
"0.54913765",
"0.5485587",
"0.5485587",
"0.5485587",
"0.5485587",
"0.5484165",
"0.5464667",
"0.5455404",
"0.5455006",
"0.5418666",
"0.54021436",
"0.53992814",
"0.5399003",
"0.5383017",
"0.53730714",
"0.5371951",
"0.53684133",
"0.53599244",
"0.5358256",
"0.5354561",
"0.5350373",
"0.5338498",
"0.5335002",
"0.5327681",
"0.5322256",
"0.5316655",
"0.530676",
"0.5300569",
"0.52993935",
"0.5297632",
"0.5263296",
"0.5262495",
"0.5255726",
"0.5251565",
"0.5250841",
"0.52407736",
"0.5234946",
"0.522171",
"0.5218474",
"0.5216239",
"0.5215167",
"0.52127266",
"0.5211682",
"0.5202609",
"0.51948434",
"0.5193135",
"0.5192369",
"0.519179",
"0.51784855",
"0.51761097"
] | 0.7108403 | 0 |
Set the value of localisation | public function setLocalisation($localisation)
{
$this->localisation = $localisation;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function settingLanguage() {}",
"public function settingLocale() {}",
"function setLocale($localename)\r\n\t{\r\n\t\t$this->pathLocale = $localename;\r\n\t\t$f = $this->_getFileName();\r\n\t\t/* load language configuration */\r\n\t\tif (file_exists($f))\r\n\t\t{\r\n\t\t\tglobal $tmp;\r\n\t\t\tinclude($f);\r\n\t\t\tif ($this->varMode == 'names')\r\n\t\t\t{\r\n#\t\t\t\t$this->lang = array_merge($this->lang, ${$this->varName});\r\n\t\t\t\t$this->lang = ${$this->varName};\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"function setLocale($locale);",
"private function set_locale() {\n\n\t\t$plugin_i18n = new Service_Tracker_i18n();\n\n\t\t$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );\n\n\t}",
"public function setLocale($val)\n {\n $this->locale = $val;\n }",
"private function set_locale() {\n\n\t\t$plugin_i18n = new Soisy_Pagamento_Rateale_i18n();\n\n\t\t$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );\n\t}",
"private function set_locale() {\n\n\t\t$plugin_i18n = new I18n();\n\n\t\t$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );\n\n\t}",
"protected function setLanguage() {\r\n\t\t$this->language = $GLOBALS['TSFE']->config['config']['language'];\r\n\t}",
"private function setLanguage()\n\t{\n\t\tif (isset($_GET['language']))\n\t\t\t$id_lang = (int)($_GET['language'])>0 ? $_GET['language'] : 0;\n\t\tif (!isset($id_lang))\n\t\t\t$id_lang = ($this->getIdByHAL());\n\t\t$this->lang = $this->xml_file->lang[(int)($id_lang)];\n\t}",
"private function SetCulture()\n {\n \tif($_SESSION['LANGUAGE'] == \"fr\" )\n \t{\n \t\t$this->lang_name_field = \"subscription_name_fr\";\n\t\t\t$this->lang_desc_field = \"subscription_desc_fr\";\n \t}\n \telse\n \t{\n \t\t$this->lang_name_field = \"subscription_name_en\";\n\t\t\t$this->lang_desc_field = \"subscription_desc_en\";\n \t}\n }",
"public function setLocalizations($val)\n {\n $this->_propDict[\"localizations\"] = $val;\n return $this;\n }",
"private function set_locale()\n {\n\n $plugin_i18n = new myFOSSIL_Resources_i18n();\n $plugin_i18n->set_domain( $this->get_plugin_name() );\n\n $this->loader->add_action( 'plugins_loaded', $plugin_i18n,\n 'load_plugin_textdomain' );\n\n }",
"private function set_locale() {\n\n\t\t$plugin_i18n = new APS_I18n();\n\n\t\t$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );\n\n\t}",
"function set_language($locale) {\n\t\t\t$this->i18n_locale = $locale;\n\t\t}",
"public function setLanguage($l)\n {\n $this->setOption('language',$l);\n }",
"public function setLocale($locale);",
"protected static function setLanguageKeys() {}",
"public function setLocale()\n\t{\n\t\tif ($locale = $this->app->session->get('admin_locale'))\n\t\t{\n\t\t\t$this->app->setLocale($locale);\n\t\t} else {\n \\Session::put('admin_locale', \\Config::get('app.locale'));\n }\n\t}",
"function setLocale($key) {\n\t\t\t$this->locale = $key;\n\t\t}",
"public function setTranslation($key, $value, $language);",
"private function setLanguage() {\n//\t\tYii::app()->language = @Yii::app()->user->getState('lang');\n\t}",
"public function setLanguage(?LocaleInfo $value): void {\n $this->getBackingStore()->set('language', $value);\n }",
"static function setCurrentByLocal($local = NULL) {\n $language = self::getLangByLocal($local);\n self::$current_lang = ($language === NULL) ? self::getDefaultLang() : $language;\n Yii::$app->language = self::$current_lang->local;\n }",
"private function setLocale() {\n if ($this->_language == 'french')\n setlocale (LC_ALL, 'fr_FR.iso88591', 'fr_FR@euro', 'fr_FR', 'french', 'fra');\n else if ($this->_language == 'english')\n setlocale (LC_ALL, 'en_GB.iso88591', 'en_GB', 'english', 'eng');\n }",
"public function setLocale($locale)\n {\n //\n }",
"public function incLocalLang() {}",
"private function setLocale()\n {\n $plugin_i18n = new I18n();\n $plugin_i18n->setDomain(Plugin_Name::PLUGIN_ID);\n\n add_action('plugins_loaded', [$plugin_i18n, 'loadPluginTextdomain']);\n }",
"private function set_locale() {\n\n if (function_exists('determine_locale')) {\n $locale = determine_locale();\n } else {\n // @todo Remove when start supporting WP 5.0 or later.\n $locale = is_admin() ? get_user_locale() : get_locale();\n }\n $locale = apply_filters('plugin_locale', $locale, 'careerfy-frame');\n \n unload_textdomain('careerfy-frame');\n load_textdomain('careerfy-frame', WP_LANG_DIR . '/plugins/careerfy-frame-' . $locale . '.mo');\n load_plugin_textdomain('careerfy-frame', false, dirname(dirname(plugin_basename(__FILE__))) . '/languages');\n }",
"public function setLocal($local){ }",
"function setLocale($locale) {\n\t\t$this->locale = $locale;\n\t}",
"public function setLocale()\n {\n $lang = Request::segment(2);\n\n try {\n $this->language->set($lang);\n return Redirect::back();\n } catch (Exception $e) {\n //show error\n }\n }",
"public function setLocale($locale = null);",
"public function setLanguage($value)\n {\n $value = strtolower($value);\n if (!isset($this->_models[$value])) {\n $this->_models[$value] = $this->loadTranslation($value);\n }\n $this->_language = $value;\n }",
"private function setLang(){\n\n\t\tif( isset($_GET['lang']) )\n\t\t\t$lang\t= $_GET['lang'];\n\n\t\telse{\n\t\t\t$sess_lang\t= session('lang');\n\t\t\t$lang\t\t= $sess_lang ? $sess_lang : App::getLocale();\n\t\t}\n\n\t\tsession(['lang'=>$lang]);\n\t\tApp::setLocale( $lang );\n\t}",
"public function setLanguage($i) {\n\t\t$this->current_language = $i;\n\t}",
"protected function setCountry(): void\n {\n Config::set('butik.country', 'DE');\n }",
"private function set_locale()\n {\n $plugin_i18n = new MailChimp_WooCommerce_i18n();\n $this->loader->add_action('init', $plugin_i18n, 'load_plugin_textdomain');\n }",
"protected function setLang() {\n \n /*\n //setlocale (LC_ALL,\"russian\");\n //setlocale (LC_ALL,\"\");\n $locale = 'ru_RU';\n putenv('LANG='.$locale);\n setlocale(LC_ALL,\"\");\n setlocale(LC_MESSAGES,$locale);\n setlocale(LC_CTYPE,$locale);\n \n //putenv(\"LANG=ru_RU\");\n \n bindtextdomain (\"messages\", XPATH_TEMPLATE_FRONT . DS . 'locale');\n textdomain (\"messages\");\n bind_textdomain_codeset(\"messages\", \"UTF-8\");*/\n \n //setlocale(LC_MESSAGES, $this->_lang . '_' . strtoupper($this->_lang) . '.UTF-8');\n \n putenv(\"LC_MESSAGES=\".$this->_lang . '_' . strtoupper($this->_lang) . '.UTF-8');\n \n bindtextdomain('messages', XPATH_TEMPLATE_FRONT . DS . 'locale' . DS);\n bind_textdomain_codeset('messages', 'UTF-8');\n textdomain('messages');\n }",
"public function actionSetLocale($locale = 'en_us')\n {\n //Set cookies\n $localeCookie = new CHttpCookie('Locale', $locale);\n $localeCookie->expire = time() + 15 * 24 * 3600;\n Yii::app()->request->cookies['Locale'] = $localeCookie;\n\n //Set application langauge\n Yii::app()->setLanguage($locale);\n }",
"public function setCulture($value)\n\t{\n\t\t$this->setViewState('Culture', $value, '');\n\t}",
"public function setCulture($value)\n\t{\n\t\t$this->setViewState('Culture', $value, '');\n\t}",
"public function setLanguage(string $lang);",
"private function set_CI_language()\n\t{\n\t\t$this->CI->config->set_item('language', $this->get_language());\n\t}",
"public function set($domain, $locale, $path)\n {\n }",
"protected function _setLanguage() {\n\t// Get the default user language\n\t$userLanguage = Configure::read('User.defaultLanguage');\n\n\t// Use cookie, session, or params\n\tif ($this->Cookie->read('User.language')) {\n\t $userLanguage = $this->Cookie->read('User.language');\n\t}\n\tif ($this->Session->check('User.language')) {\n\t $userLanguage = $this->Session->read('User.language');\n\t}\n\tif (isset($this->params['language'])) {\n\t $userLanguage = $this->params['language'];\n\t}\n\n\t// Update the session\n\t$this->Session->write('User.language', $userLanguage);\n\t// Update the cookie if changed\n\tif ($this->Cookie->read('User.language') != $userLanguage) {\n\t $this->Cookie->write('User.language', $userLanguage, false, '20 days');\n\t}\n\n\t// Update the global used by CakePHP - don't use a different name!!!\n\tConfigure::write('Config.language', $userLanguage);\n }",
"function setLocale($args) {\n\t\t$setLocale = isset($args[0]) ? $args[0] : null;\n\t\t\n\t\t$site = &Request::getSite();\n\t\t$journal = &Request::getJournal();\n\t\tif ($journal != null) {\n\t\t\t$journalSupportedLocales = $journal->getSetting('supportedLocales');\n\t\t\tif (!is_array($journalSupportedLocales)) {\n\t\t\t\t$journalSupportedLocales = array();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (Locale::isLocaleValid($setLocale) && (!isset($journalSupportedLocales) || in_array($setLocale, $journalSupportedLocales)) && in_array($setLocale, $site->getSupportedLocales())) {\n\t\t\t$session = &Request::getSession();\n\t\t\t$session->setSessionVar('currentLocale', $setLocale);\n\t\t}\n\t\t\n\t\tif(isset($_SERVER['HTTP_REFERER'])) {\n\t\t\tRequest::redirect($_SERVER['HTTP_REFERER']);\n\t\t}\n\t\t\n\t\t$source = Request::getUserVar('source');\n\t\tif (isset($source) && !empty($source)) {\n\t\t\tRequest::redirect(Request::getProtocol() . '://' . Request::getServerHost() . $source, false);\n\t\t}\n\t\t\n\t\tRequest::redirect('index');\t\t\n\t}",
"private function init_localisation()\n {\n\n // Set class var $int_localisation_mode; init TS of pObj->objLocalise;\n if ( !isset( $this->int_localisation_mode ) )\n {\n $this->int_localisation_mode = $this->pObj->objLocalise->get_localisationMode();\n $this->pObj->objLocalise->init_typoscript();\n }\n\n // Set class var $bool_dontLocalise\n // SWITCH $int_localisation_mode\n switch ( $this->int_localisation_mode )\n {\n case( PI1_DEFAULT_LANGUAGE ):\n // #44621, 130118, dwildt, 1-\n// $this->bool_dontLocalise = true;\n $prompt = 'Localisation mode is PI1_DEFAULT_LANGUAGE. There isn\\' any need to localise!';\n break;\n case( PI1_DEFAULT_LANGUAGE_ONLY ):\n // #44621, 130118, dwildt, 1-\n// $this->bool_dontLocalise = true;\n $prompt = 'Localisation mode is PI1_DEFAULT_LANGUAGE_ONLY. There isn\\' any need to localise!';\n break;\n default:\n // #44621, 130118, dwildt, 1-\n// $this->bool_dontLocalise = false;\n $prompt = 'Localisation mode is enabled';\n break;\n }\n // SWITCH $int_localisation_mode\n // Set class var $bool_dontLocalise\n // DRS\n if ( $this->pObj->b_drs_filter || $this->pObj->b_drs_sql || $this->pObj->b_drs_localisation )\n {\n t3lib_div::devlog( '[INFO/FILTER+SQL+LOCALISATION] ' . $prompt, $this->pObj->extKey, 0 );\n }\n // DRS\n\n return;\n }",
"public function setLocale(MvcEvent $e) {\n $translator = $e->getApplication()->getServiceManager()->get('translator');\n $translator->setLocale('ru_RU');\n \n }",
"private function set_lang()\n\t{\n\t\t//print_r($this->CI->uri->rsegment_array());\n\t\t//echo $this->CI->uri->ruri_string();\n\t\t\n\t\t// Set from default config\n\t\t$this->lang = $this->lang_default;\n\t\t\t\t\n\t\t// Set from browser\n\t\tif ($this->detect_browser)\n\t\t{\n\t\t\t$this->lang = $this->detect_browser_lang();\n\t\t}\n\n\t\t// Set from session\n\t\t$this->set_session();\n\t\t\n\t\t// Set from URI\n\t\t$first_segment = $this->CI->uri->segment(1);\n\t\tif (in_array($first_segment, $this->langs))\n\t\t{\n\t\t\t$this->lang = $first_segment;\n\t\t\t$this->set_session($first_segment);\n\t\t}\n\t}",
"protected function loadLocalization() {}",
"abstract protected function initializeCulture();",
"public function __set($name, $value)\n {\n $method = 'set' . ucfirst($name);\n return $this->proxyCurrentLocaleTranslation($method, array($value));\n }",
"function set_locale($locale) {\n\t\t\t$this->i18n_locale = $locale;\n\t\t\treturn $this->i18n_locale;\n\t\t}",
"function setWpLocale($lang) {\n\t$localLocale = $_COOKIE['dk_locale'];\n\t$currentSite = get_current_blog_id();\n\t$siteDetail = get_blog_details($currentSite);\n\n\tif ($localLocale == 'en_CA' || $currentSite == '3') {\n\t\t$val = 'en_CA';\n\t\theader( 'Location: '. $siteDetail->siteurl);\n\t\tsetcookie(\"dk_locale\", $val, time()+3600*24);\n\t\tsetlocale(LC_MONETARY, $val);\n\n\t\treturn $val;\n\t} else if($localLocale == 'fr_CA' || $currentSite == '2') {\n\t\t$val = 'fr_CA';\n\t\theader( 'Location: '. $siteDetail->siteurl);\n\t\tsetcookie(\"dk_locale\", $val, time()+3600*24);\n\t\tsetlocale(LC_MONETARY, $val);\n\n\t\treturn $val;\n\t} else {\n\t\tsetcookie(\"dk_locale\", $lang, time()+3600*24);\n\t\tsetlocale(LC_MONETARY, $lang);\n\t\treturn $lang;\n\t}\n\t\n}",
"public function setCurrentLang($v)\n\t{\n\t\t$this->currentLang = $v;\n\t}",
"public function setLocale ($locale) {\n\t\t$this->locale = $locale;\n\t}",
"public function __construct()\n {\n $this->setCode(SolarLite_Config::get('locale', 'en_US'));\n }",
"function setLocale($locale) {\n\t\treturn $this->setData('locale', $locale);\n\t}",
"function setCode($code) {\n\t\tif (empty ($code)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ($this->code != $code) {\n\t\t\t$this->messages= null;\n\t\t\t/*\n\t\t\t\t\t\tif (isset ($this->Session)) {\n\t\t\t\t\t\t\t$this->Session->write('Lang.Code', $code);\n\t\t\t\t\t\t}\n\t\t\t*/\n\t\t\t$this->code= $code;\n\t\t\t$this->controller->set('Lang_Code', $code);\n\t\t\tif (function_exists('setlocale')) {\n\t\t\t\tsetlocale(LC_COLLATE | LC_CTYPE | LC_TIME, $this->getLanguageFromTld($code));\n\t\t\t}\n\t\t}\n\t}",
"private function localise()\n {\n // SWITCH localisation mode\n // RETURN value\n switch ( $this->int_localisation_mode )\n {\n case( PI1_DEFAULT_LANGUAGE ):\n return;\n //break;\n case( PI1_DEFAULT_LANGUAGE_ONLY ):\n return;\n //break;\n default:\n // Localisation mode is enabled\n // Follow the workflow\n break;\n }\n // RETURN value\n // SWITCH localisation mode\n // SWITCH language overlay or sys language\n switch ( true )\n {\n case( $this->sql_filterFields[ $this->curr_tableField ][ 'lang_ol' ] ):\n $this->localise_langOl();\n break;\n case( $this->sql_filterFields[ $this->curr_tableField ][ 'transOrigPointerField' ] ):\n $this->localise_sysLanguage();\n break;\n default:\n }\n // SWITCH language overlay or sys language\n }",
"public function save()\n {\n $this->user->setCulture($this->getValue('language'));\n }",
"function setAllTranslationStrings($list) {\n\t\t$this->translationStrings = $list;\n\t}",
"function set_lang ($lang)\r\n {\r\n $_SESSION[\"lang\"] = $lang;\r\n }",
"public function setLangue($langue){\n $this->niveauLangue++;\n $this->langue = $langue;\n }",
"public function setLangue($langue){\n $this->niveauLangue++;\n $this->langue = $langue;\n }",
"public function setLanguage(string $strLanguage) : void\r\n {\r\n $this->strLanguage = strtolower($strLanguage);\r\n }",
"public function setLocal($lang)\n {\n Session::put('applocale', $lang);\n return redirect()->back();\n }",
"function regional_settings()\n {\n // set the time zone\n $timezones = $this->config->item('timezones');\n if (function_exists('date_default_timezone_set'))\n {\n date_default_timezone_set($timezones[$this->settings->timezones]);\n }\n\n // set site language\n $this->languages = get_languages();\n \n // set language according to this priority:\n // 1) Set user selected language\n // 2) If no session, use the global setting languauge\n if ($this->session->language)\n {\n $this->config->set_item('language', $this->session->language);\n }\n else\n {\n $this->config->set_item('language', $this->settings->default_language);\n \n // save language to session\n $this->session->language = $this->config->item('language');\n }\n }",
"private function initLocale()\n {\n if (!$this->initialised) {\n putenv(\"LANG=$this->locale\");\n setlocale(LC_ALL, $this->locale);\n\n $this->initialised = true;\n }\n }",
"public function setLanguage($code)\n {\n $this->lang = $code;\n }",
"public function setLocale($value)\n {\n return $this->setParameter('locale', $value);\n }",
"public function setLocale(Request $request, string $locale): void\n {\n Site::setLocale($locale);\n $request->session()->put($this->makeKey($this->localeKey), $locale);\n }",
"public function init()\n {\n// $lang = $this->getRequest()->getParam('lang');\n $lang = Zend_Registry::isRegistered('lang') ? Zend_Registry::get('lang') : '';\n\n if (!$lang) {\n $locale = new Zend_Locale('auto');\n $lang = array_key_exists($locale->getLanguage(), $this->_locales)\n ? $locale->getLanguage() : $this->_defaultLanguage;\n }\n\n if (!array_key_exists($lang, $this->_locales)) {\n $lang = $this->_defaultLanguage;\n }\n\n $this->setTranslatorLang($lang);\n }",
"function setHeadLanguage($var)\n\t{\n\t\t$this -> head_language = $var;\n\t}",
"public function setYiiLang(){\r\n $get_lang = Yii::app()->getRequest()->getParam(Yii::app()->urlManager->languageParam);//check if we have lang in url\r\n if (!in_array($get_lang,array_keys(Yii::app()->params['translatedLanguages'])) &&\r\n isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {\r\n $langList = Util::sortByPriority($_SERVER['HTTP_ACCEPT_LANGUAGE']);\r\n foreach ($langList as $lang => $quality) {\r\n foreach (Defaults::$supportedLanguages as $supported) {\r\n if (strcasecmp($supported, $lang) == 0) {\r\n Yii::app()->language = $supported;\r\n break 2;\r\n }\r\n }\r\n }\r\n }\r\n }",
"function initLangCode()\n\t{\n\t\tglobal $ilUser;\n\t\t\n\t\t// lang_code is only required in $this->fetchnodedata\n\t\tif (!is_object($ilUser))\n\t\t{\n\t\t\t$this->lang_code = \"en\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->lang_code = $ilUser->getCurrentLanguage();\n\t\t}\n\t}",
"private function _setLangSelection(MvcEvent $e) {\n $sm = $e->getApplication()->getServiceManager();\n $authService = ServicesUtil::getAuthService($sm);\n if(CheckAuthentication::isAuthorized($authService, \"\")) {\n $userUtil = \\JumpUpUser\\Util\\ServicesUtil::getUserUtil($sm);\n $loggedInUser = $userUtil->getCurrentUser();\n $localStr = $loggedInUser->getLocale();\n if(null !== $localStr) { // perform selection of local file\n $translator = ServicesUtil::getTranslatorService($sm);\n $translator->setLocale($localStr);\n }\n }\n }",
"public function setLocale($locale) {\n\t\t$this->_locale = $locale;\n\t}",
"function set($sValue, $sKey, $sLang);",
"public static function ru(){\n setcookie('language', 'ru', time()+60);\n }",
"public function testSetGetLocaleLanguageCodeViaSetterAndGetter()\n {\n $this->translator->setLocale('fo');\n $this->assertEquals('fo', $this->translator->getLocale());\n }",
"public static function localeCookie(string $locale) : void\n {\n setcookie('NameYourGoat_User_Locale', self::langToLocale($locale), time() + 3600*24*30, '/');\n }",
"public function offsetSet($offset, $value) {\n $this->_i18n[$offset] = $value;\n }",
"public function initializeLanguages() {}",
"public function restore_current_locale()\n {\n }",
"private function processLocale(): void\n {\n if ($this->request->has(self::LOCALE) && null !== $this->request->get(self::LOCALE, null)) {\n $this->setLocale($this->request->get(self::LOCALE));\n }\n }",
"public function init()\r\n {\r\n \theader('content-type: text/html; charset=utf8');\r\n \tdefined('BASE_URL')\t|| define('BASE_URL', Zend_Controller_Front::getInstance()->getBaseUrl());\r\n \t$this->tr = Application_Form_FrmLanguages::getCurrentlanguage();\r\n \t$this->type = 1;\r\n\t}",
"public function setCountry($value) {\n\t\tself::$_country = $value;\n\t}",
"public function set_translations($domain, $path = '')\n {\n }",
"function restore_current_locale()\n {\n }",
"private static function initStatic()\n {\n if (!isset(self::$_local)) {\n self::setLocale(self::DEFAULT_LOCAL);\n }\n }",
"function _setlocale($category, $locale)\r\n\t{\r\n\t\tglobal $CURRENTLOCALE, $EMULATEGETTEXT;\r\n\t\tif ($locale === 0) { // use === to differentiate between string \"0\"\r\n\t\t\tif ($CURRENTLOCALE != '')\r\n\t\t\t\treturn $CURRENTLOCALE;\r\n\t\t\telse\r\n\t\t\t// obey LANG variable, maybe extend to support all of LC_* vars\r\n\t\t\t// even if we tried to read locale without setting it first\r\n\t\t\t\treturn _setlocale($category, $CURRENTLOCALE);\r\n\t\t} else {\r\n\t\t\tif (function_exists('setlocale')) {\r\n\t\t\t\t$ret = setlocale($category, $locale);\r\n\t\t\t\tif (($locale == '' and !$ret) or // failed setting it by env\r\n\t\t\t\t\t($locale != '' and $ret != $locale)) { // failed setting it\r\n\t\t\t\t\t// Failed setting it according to environment.\r\n\t\t\t\t\t$CURRENTLOCALE = _get_default_locale($locale);\r\n\t\t\t\t\t$EMULATEGETTEXT = 1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$CURRENTLOCALE = $ret;\r\n\t\t\t\t\t$EMULATEGETTEXT = 0;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// No function setlocale(), emulate it all.\r\n\t\t\t\t$CURRENTLOCALE = _get_default_locale($locale);\r\n\t\t\t\t$EMULATEGETTEXT = 1;\r\n\t\t\t}\r\n\t\t\t// Allow locale to be changed on the go for one translation domain.\r\n\t\t\tglobal $text_domains, $default_domain;\r\n\t\t\tif (array_key_exists($default_domain, $text_domains)) {\r\n\t\t\t\tunset($text_domains[$default_domain]->l10n);\r\n\t\t\t}\r\n\t\t\treturn $CURRENTLOCALE;\r\n\t\t}\r\n\t}",
"private static function set() {\n if(!empty(Dispatcher::$args['lang']) && self::isAvailable(Dispatcher::$args['lang'])) {\n $_GET['lang'] = Dispatcher::$args['lang'];\n }\n if(!empty($_GET['lang']) && self::isAvailable($_GET['lang'])) {\n //Set on page\n self::$lang = $_GET['lang'];\n //Set in session\n if(empty($_SESSION['lang']) || $_SESSION['lang'] != $_GET['lang']) {\n $_SESSION['lang'] = $_GET['lang'];\n }\n //Set in cookie\n if(empty($_COOKIE['lang']) || $_COOKIE['lang'] != $_GET['lang']) {\n self::setCookie($_GET['lang']);\n }\n return true;\n } elseif(!empty($_COOKIE['lang']) && self::isAvailable($_COOKIE['lang'])) {\n self::$lang = $_COOKIE['lang'];\n //set in session\n if(empty($_SESSION['lang']) || $_SESSION['lang'] != $_COOKIE['lang']) {\n $_SESSION['lang'] = $_COOKIE['lang'];\n }\n return true;\n } elseif(!empty($_SESSION['lang']) && self::isAvailable($_SESSION['lang'])) {\n //set on page\n self::$lang = $_SESSION['lang'];\n //set cookie if empty\n if(empty($_COOKIE['lang']) || $_COOKIE['lang'] != $_SESSION['lang']) {\n self::setCookie($_SESSION['lang']);\n }\n return true;\n }\n return false;\n }",
"public function setLocale(Locale $locale){\n\t\t$this->_locale = $locale;\n\t}",
"public function setTranslated($flag)\n {\n $this->translated = $flag;\n }",
"public function setLanguage($code) {\n\t\tif(preg_match('/^[a-z]{2,3}\\_[A-Z]{2,3}$/',$code)){\n\t\t\t$this->languageCode = $code;\n\t\t} else {\n\t\t\t///TODO:APC: Why does this not throw an I18nException?\n\t\t\tthrow new \\nano\\core\\exception\\CoreException('Could not set language from code \\''.$code.'\\'');\n\t\t}\n\t}",
"public function setLanguage($strLanguage) {\n\t\t\t$this->strLanguage = $strLanguage;\n\t\t\t$this->loadReplacements();\n\t\t}",
"public function setLocale($locale) {\n $this->locale = $locale;\n }",
"static function set($lang)\n\t{\n\t\tif (!self::valid($lang)) {\n\t\t\ttrigger_error(\"Invalid language id: '$lang'\");\n\t\t\treturn;\n\t\t}\n\t\tself::$lang = $lang;\n\t}"
] | [
"0.73815644",
"0.72877604",
"0.7263297",
"0.7075487",
"0.7017133",
"0.69707304",
"0.6961756",
"0.69266105",
"0.69202536",
"0.6900012",
"0.6876838",
"0.687326",
"0.6863539",
"0.6830927",
"0.6804752",
"0.67062795",
"0.66866696",
"0.66562253",
"0.663825",
"0.66019934",
"0.65957516",
"0.65875244",
"0.6562478",
"0.6556779",
"0.65325356",
"0.65004504",
"0.64385396",
"0.6420626",
"0.6412991",
"0.637086",
"0.6339115",
"0.63359195",
"0.6333778",
"0.6323502",
"0.631296",
"0.62913734",
"0.6270259",
"0.626704",
"0.6255824",
"0.624723",
"0.6225987",
"0.6225987",
"0.6189698",
"0.617633",
"0.6168981",
"0.61544526",
"0.6148165",
"0.6138208",
"0.6123263",
"0.6118713",
"0.6102207",
"0.60744905",
"0.60578626",
"0.6057372",
"0.60442376",
"0.60368466",
"0.6024929",
"0.60090643",
"0.60007334",
"0.5998661",
"0.5997263",
"0.598758",
"0.59749514",
"0.59691066",
"0.5962942",
"0.5962942",
"0.5955016",
"0.5954437",
"0.59482586",
"0.5931575",
"0.592938",
"0.5915782",
"0.59102196",
"0.5902834",
"0.58979195",
"0.5897041",
"0.58810675",
"0.58677095",
"0.58645064",
"0.583707",
"0.5826394",
"0.58261746",
"0.582527",
"0.58215594",
"0.5821359",
"0.58109266",
"0.58051676",
"0.5804035",
"0.5803091",
"0.58004296",
"0.5799204",
"0.5797055",
"0.5796322",
"0.579397",
"0.57855064",
"0.57825905",
"0.57786924",
"0.57779217",
"0.5776511",
"0.57730633"
] | 0.62951505 | 35 |
Set the value of ville | public function setVille($ville)
{
$this->ville = $ville;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setVille($valeur)\n {\n $this->ville = $valeur;\n }",
"public function setVida($valor){\n $this->vida=$valor;\n }",
"protected function setVida() {\n $this->vida = 200;\n }",
"public function setValue($v){\n $this->value = $v;\n }",
"public function setValor($valor)\n {\n $this->valor = $valor;\n }",
"public function setVille(?string $ville): self\n {\n $this->ville = $ville;\n\n return $this;\n }",
"public function setVille($ville)\n {\n $this->ville = $ville;\n\n return $this;\n }",
"public function setVille(?string $ville):self\n {\n $this->ville = $ville;\n\n return $this;\n }",
"public function getVille()\n {\n return $this->ville;\n }",
"public function setValeur($valeur)\n {\n $this->valeur = $this->recupValeur($valeur);\n }",
"public function setVoti(float $voto){\n if($voto>2 && $voto <= 10 ){\n \n $this->voti[] = $voto;\n \n } else {\n\n $messaggio = new Exception(\"Il valore $voto è errato\");\n throw $messaggio;\n\n }\n }",
"public function setVatIdNo($vatin);",
"public function setNerve($value)\n {\n $this->nerve = $value;\n }",
"public function setValorAttribute($value)\n {\n $this->attributes['valor'] = str_replace(\",\", \".\", str_replace(\".\", \"\", $value));\n }",
"function setNota_num($inota_num = '')\n {\n // adminto ',' como separador decimal.\n $inota_num = str_replace(\",\", \".\", $inota_num);\n $this->inota_num = $inota_num;\n }",
"public function setVal($val){\n\t\t\t$this->_val = $val;\n\t\t}",
"function __set($name,$value){\r\n switch ($name){\r\n case 'gas': // daca aveam in loc de case, return numai trebuia sa pun break\r\n if(is_numeric($value)) $this->gas = $value;\r\n break; // la return nu se pune break!!\r\n case new Exception(\"Gas tre sa fie numeric\"); //arunca o eroare\r\n break;\r\n }\r\n }",
"public function getVille_idville()\r\n {\r\n return $this->ville_idville;\r\n }",
"function setValue($value){\r\n\t\t$this->value = $value;\r\n\t}",
"public function set($n,$v)\n\t{\n\t\tif (isset($this->prefs[$n])) {\n\t\t\t$this->prefs[$n]['value'] = $v;\n\t\t}\n\t}",
"public function setVigour($value)\n {\n return $this->set(self::VIGOUR, $value);\n }",
"function set_value($value)\n\t{\n\t\t$this->value = $value;\n\t}",
"public function testSetNomVille() {\n\n $obj = new Collaborateurs();\n\n $obj->setNomVille(\"nomVille\");\n $this->assertEquals(\"nomVille\", $obj->getNomVille());\n }",
"function setValue($value) {\n $this->value = $value;\n }",
"public function setValorLancar($nValorLancar){\n $this->nValorLancar = $nValorLancar;\n }",
"public function testSetPrixVente() {\n\n $obj = new Collaborateurs();\n\n $obj->setPrixVente(10.092018);\n $this->assertEquals(10.092018, $obj->getPrixVente());\n }",
"function setNiveau($niveau) { $niveau = (int) $niveau;\r\n if ($niveau >= 1 && $niveau <= 100) {\r\n $this->_niveau = $niveau;\r\n }\r\n }",
"function __set($modelo, $valor)\n\t{\n\t\t$this->modelo = $modelo;\n\t}",
"function setNota_num($inota_num = '')\n {\n $this->inota_num = $inota_num;\n }",
"public function set($atributo, $valor) {\r\n\t\t\t $this->$atributo = $valor;\r\n\t\t}",
"function setNum($num)\n {\n $this->num = $num;\n }",
"public function setPersonne($valeur)\n {\n $this->id_personne = $valeur;\n }",
"public function set_ville($_ville)\n {\n $this->_ville = $_ville;\n\n return $this;\n }",
"public function testSetNumVoie() {\n\n $obj = new Collaborateurs();\n\n $obj->setNumVoie(\"numVoie\");\n $this->assertEquals(\"numVoie\", $obj->getNumVoie());\n }",
"public function setValue($value);",
"public function setValue($value);",
"public function setValue($value);",
"public function setValue($value);",
"public function setValue($value);",
"public function setValue($value);",
"public function setValue($value);",
"public function setValue($value);",
"public function setValue($value);",
"public function setValue($value);",
"public function setDataVencimento(string $dataVencimento)\n {\n $this->dataVencimento = $dataVencimento;\n }",
"public function set_value( $value ) {\n $this->value = $value;\n }",
"function value( $value )\n\t{\n\t\t$this->value = $value;\n\t}",
"public function setValue($value){\n $this->_value = $value;\n }",
"function setNumero($numero){\n if(empty($numero)){\n header(\"Location:../vu/formulaire_inscription.php\");\n return;\n\n }\n //on declare de la variable numero puis on appelle la varibale prive numero\n $this->_numero = $numero;\n }",
"function setValue( $value )\r\n {\r\n $newValue = number_format( $value, 4, \".\", \"\" );\r\n $value = (double) $newValue;\r\n $this->Value = $value;\r\n }",
"public function setVolumen( $volumen ) {\n $this->volumen=$volumen;\n $this->enviarVolumen();\n $this->activarPantalla();\n //activar y enviar volumen\n }",
"function setValue(int $field, $value) : void;",
"function setValue ($value) {\n\t\t$this->_value = $value;\n\t}",
"public function setCampoLivre($campo_livre){\n if (strlen($campo_livre) > 128) {\n throw new \\UnexpectedValueException('O campo livre deve ter, no máximo, 128 caracteres');\n }\n\n $this->campo_livre = $campo_livre;\n }",
"function carregaValors($id,$autor){\t\r\n\t\t\t\t$this->set_aut_idautor($id);\r\n\t\t\t\t$this->set_aut_autor($autor);\r\n\t\t}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setUser($p_mVal) { $this->m_mUser = $p_mVal; }",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function testSetNomVille() {\n\n $obj = new Employes();\n\n $obj->setNomVille(\"nomVille\");\n $this->assertEquals(\"nomVille\", $obj->getNomVille());\n }",
"public function mort()\n\t{\n\t\tif ( $this->vie <= 0 ) {\n\t\t\techo $this->nom . \" est mort <br>\";\n\t\t} else {\n\t\t\techo $this->nom . \" est vivant ! <br>\";\n\t\t}\n\t}",
"public function setdia_semana($valor)\n {\n if (($valor <= 0) || ($valor > 7)) :\n echo \"Tentou atribuir {$valor} para dia da semana!\";\n die();\n endif;\n\n $this->data['dia_semana'] = $valor;\n }",
"public function setidExamen($Valor){\r\n $this->idExamen = trim($Valor);\r\n }",
"public function vaziuoti($km){\n echo $this->kebuloNumeris.\"Liko vaziuoti $km <br />\";\n }",
"public function setParcela(int $parcela)\n {\n $this->parcela = $parcela;\n }",
"public function SetIdConvocatoria($valor){\n\t\t $this->id_convocatoria= $valor;\n\t }",
"public function setValue($valor)\n {\n $this->_value = $valor;\n return $this;\n }",
"public function setCity($value) {\n\t\tself::$_city = $value;\n\t}",
"public function setLng($value)\n {\n $this->lng = $value;\n }",
"public function setNumeroIP( $numero ) {\n $this->numero_ip=$numero;\n $this->enviarNumero();\n $this->activarPantalla();\n //activar y enviar numero\n }",
"public function __set($nome, $valor) {\n $this->nome = $valor;\n }",
"public function set( $option, $value );",
"public function set_id_poblacion($value = \"\"){ \n $this->_id_poblacion= \\helpers\\Validator::valInt('f_id_poblacion',$value,TRUE);\n}",
"public function set_value($value) {\n\t\t$this->_value = $value + 0;\n\t}",
"function modificarNumFilhos($numFilhos) {\r\n $this->numFilhos = $numFilhos;\r\n }",
"function valor($valor) {\n\n $this->_valorUpdate = $valor;\n\n if (in_array($this->_tipo, $this->_controlesMultiples)) {\n\n foreach ($this->_selectoresOpcion as $key => $selector) {\n if ($selector->attr('value') == $valor) {\n $selector->attr('checked', 'checked');\n }\n }\n\n } else\n if ($this->type == 'select') {\n foreach ($this->_selectoresOpcion as $key => $selector) {\n if ($selector->attr('value') == $valor) {\n $selector->attr('selected', 'selected');\n }\n }\n\n } elseif ($this->type == \"textarea\") {\n $this->innerHTML($valor);\n } else {\n $this->attr('value', $valor);\n }\n\n }",
"function setValorNota($nValorNota) {\n \n $this->nValorNota = $nValorNota;\n }",
"public function setValue( $value ) { \n $this->inputValue = $value; \n $this->value = $value;\n }",
"function setLeja($_leja){\r\n $this->leja=$_leja;\r\n }",
"public function setVip($vip)\n {\n $this->_vip = $vip;\n }",
"public function setValorDiaria($valorDiaria)\n {\n $this->valorDiaria = $valorDiaria;\n\n \n\n }",
"public function setVisitor($value) {\n\t\t$this->visitor = $value;\n\t}",
"public function getValorLancar(){\n return $this->nValorLancar;\n }",
"public function setNValue($nVal) {}",
"public function setValue($value) {\n $this->value = $value->value;\n }",
"public function setUserfield($value);",
"public function setKaina($x) {\n $this->kaina = $x; //privati reiksme tai kaina\n }",
"function setSumarPais(){\n\t\t$this->cantidad_paises++;\n\t}",
"public function setVatility($value)\n {\n return $this->set(self::_VATILITY, $value);\n }",
"public function setVoiture($voiture){\n $this->$voiture = $voiture;\n }"
] | [
"0.7607434",
"0.6543471",
"0.64467597",
"0.626502",
"0.61783457",
"0.6159194",
"0.6065006",
"0.602216",
"0.5956322",
"0.5891147",
"0.57661486",
"0.57028466",
"0.55879563",
"0.55873495",
"0.5540058",
"0.54986167",
"0.5491278",
"0.5480593",
"0.54791987",
"0.5475379",
"0.54606664",
"0.5414766",
"0.54010034",
"0.5377454",
"0.5369017",
"0.5368171",
"0.53157586",
"0.5307016",
"0.52938247",
"0.5285387",
"0.52833897",
"0.526506",
"0.52604663",
"0.5260344",
"0.52603316",
"0.52603316",
"0.52603316",
"0.52603316",
"0.52603316",
"0.52603316",
"0.52603316",
"0.52603316",
"0.52603316",
"0.52603316",
"0.52557534",
"0.525093",
"0.5248718",
"0.52434653",
"0.52425385",
"0.5241408",
"0.5227692",
"0.5225922",
"0.51990336",
"0.51976395",
"0.5194531",
"0.51886284",
"0.51886284",
"0.5188435",
"0.51878166",
"0.51878166",
"0.51878166",
"0.51878166",
"0.51878166",
"0.51878166",
"0.51878166",
"0.51878166",
"0.51878166",
"0.51878166",
"0.51878166",
"0.517033",
"0.5163581",
"0.51589197",
"0.51534766",
"0.5143377",
"0.51428455",
"0.5142449",
"0.51408815",
"0.51395667",
"0.51314557",
"0.51201946",
"0.5093904",
"0.509096",
"0.5071074",
"0.50665873",
"0.5061751",
"0.50615466",
"0.50594884",
"0.5058599",
"0.50441885",
"0.50423557",
"0.5034897",
"0.50291896",
"0.5028906",
"0.5028747",
"0.50240207",
"0.50185186",
"0.5010862",
"0.5003381",
"0.50022066",
"0.49998474"
] | 0.6607578 | 1 |
Set the value of uniqueId | public function setUniqueId($uniqueId)
{
$this->uniqueId = $uniqueId;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setUniqueID($key) {\r\n\t\t$this->uniqueID = $key;\r\n\t}",
"public function setUniqueId($uniqueId){\n $this->uniqueId = $uniqueId;\n }",
"public function setUniqueIdAttribute($value): void\n {\n\n\t\t$this->attributes['unique_id'] = uniqid(str_replace(' ', '-', $value), true);\n\t}",
"public function setUniqueId($uniqueId)\n {\n $this->uniqueId = $uniqueId;\n }",
"public function setUniqueId($uniqueId)\n {\n $this->_uniqueId = $uniqueId;\n }",
"function SetId($value) { $this->id=$value; }",
"public function tempId()\n {\n $this->id = uniqid('item');\n }",
"protected function _setId($value)\n\t{\n\t\tvar_dump($value);\n\t\tif (empty($value) || ($value < 0)) {\n\t\t\ttrigger_error('Invalid value used to set the member id', E_USER_ERROR);\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\t$this->_id = $value;\n\t\t\t$_SESSION['user_id']=$value;\n\t\t\t\n\n\t\t}\n\t}",
"public function createUid()\n {\n $uid = uniqid();\n while (AutoEvent::where('uid', '=', $uid)->count() > 0) {\n $uid = uniqid();\n }\n $this->uid = $uid;\n }",
"public function updateId() {\n $this->Id = session_id();\n }",
"function setId($value) {\n $this->_id = intval($value);\n }",
"public function setID($value) {\r\n //if (!is_numeric($value)) die(\"setID() only accepts a numerical ID value\");\r\n $this->id = $value;\r\n }",
"public function testSetUniqId() {\n\n $obj = new AppelsEnCours();\n\n $obj->setUniqId(\"uniqId\");\n $this->assertEquals(\"uniqId\", $obj->getUniqId());\n }",
"public function testSetUniqId() {\n\n $obj = new PointBonTrav();\n\n $obj->setUniqId(\"uniqId\");\n $this->assertEquals(\"uniqId\", $obj->getUniqId());\n }",
"private function generateId() {\n $this->setId(AgaviToolkit::uniqid(\"ldap_conn_\"));\n }",
"public function setPublicIdAttribute($value)\n {\n do{\n \t $newPublicId = chr(rand(64, 90)) . chr(rand(64, 90)) . rand(10,99);\n $publicIdCount = count( $this->whereRaw(\"public_id = '{$newPublicId}'\")->get());\n }while($publicIdCount != 0);\n $this->attributes['public_id'] = $newPublicId;\n }",
"abstract public function unique_id();",
"private function SetID($value)\n\t\t{\n\t\t\t$this->id = $value;\n\t\t}",
"public function setUnique($value = TRUE);",
"private static function get_unique_id(){\n\t\tself::$u_id+=1;\n\t\treturn (string) self::$u_id;\n\t}",
"public function setIdentifier($record){\n\t\t$record->writeAttribute($this->_identityColumn, $this->generateUUID());\n\t}",
"public function setId($id)\n {\n $this->id = $id ? $id : uniqid();\n }",
"public function setId($x) { $this->id = $x; }",
"function setId($value){\n\t\t//echo \"setting ID to \".$value;\n\t\t$this->_id=$value;\n\t\t//echo \"ID set to \".$this->_id;\n\t\treturn $this;\n\t}",
"function setIdentifier($val) {\n $this->identifier = $this->updateDB('identifier', $val);\n }",
"private function _setUserid($input) {\n\t\tif(!Validator::UnsignedNumber($input)) throw new Exception(lang('error_90'));\n\t\t$this->_identifier = $input;\n\t}",
"public function setIdentifier($id)\n {\n $this->uid = (int)$id;\n }",
"public function regenerateId(): self;",
"public function setIduser($value)\n {\n $this->iduser = $value;\n }",
"public function setNameAndId() {}",
"public function setUnique($u)\n {\n $this->isUnique = $u;\n }",
"static public function setId($id){\n \tif (self::$_id != $id){\n \t\tself::$_id = $id;\n \t\tself::regenerate();\n \t}\n }",
"public function set_id_user($value = \"\")\n {\n $this->_id_user = \\helpers\\Validator::valInt('f_id_user', $value, TRUE);\n }",
"public function setIdAttribute($value)\n {\n $this->attributes['id'] = $value;\n }",
"public function setUserid($value) {\n\t\tif(!check($value)) throw new Exception(lang('error_90'));\n\t\tif(!Validator::AccountId($value)) throw new Exception(lang('error_90'));\n\t\t\n\t\t$this->_userid = $value;\n\t}",
"public function resetId()\n {\n\n $this->id = null;\n\n }",
"public function testSetUserIdAllowsForSettingOfUserId()\n {\n $request = new Request($this->config, []);\n $user = uniqid('', true);\n\n $request->setUserId($user);\n $this->assertEquals($user, $request->getUserId());\n }",
"public function set_user_id( $value ) {\n\t\t$this->set_prop( 'user_id', absint( $value ) ) ;\n\t}",
"public function setId($value){\n\t\tif($this->validateId($value)){\n\t\t\t$this->id = $value;\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function generateUniqueId(){\n //PHPs uniquid function is time based and therefor guessable\n //A stright random MD5 sum is too long for email and tends to line break causing usability problems\n //So we get unique through uniquid and we get random by prefixing it with a part of an MD5\n //hopefully this results in a URL friendly short, but unguessable string\n $prefix = substr(md5(mt_rand()*mt_rand()),rand(0,24), rand(6,8));\n $this->uniqueId = \\uniqid($prefix);\n }",
"public function regenerateId();",
"public function regenerateId();",
"public function setUid($value) {\n return $this->set(self::UID, $value);\n }",
"public function setId($value){\n if($this->validateId($value)){\n $this->id=$value;\n return true;\n }else{\n return false;\n }\n }",
"public function setUserIdAttribute($input)\n {\n $this->attributes['user_id'] = $input ? $input : null;\n }",
"public function setUserIdAttribute($input)\n {\n $this->attributes['user_id'] = $input ? $input : null;\n }",
"public function setUserIdAttribute($input)\n {\n $this->attributes['user_id'] = $input ? $input : null;\n }",
"public function setUserIdAttribute($input)\n {\n $this->attributes['user_id'] = $input ? $input : null;\n }",
"public function setUserIdAttribute($input)\n {\n $this->attributes['user_id'] = $input ? $input : null;\n }",
"public function setUserIdAttribute($input)\n {\n $this->attributes['user_id'] = $input ? $input : null;\n }",
"public function setUserIdAttribute($input)\n {\n $this->attributes['user_id'] = $input ? $input : null;\n }",
"public function setUserIdAttribute($input)\n {\n $this->attributes['user_id'] = $input ? $input : null;\n }",
"public function getUniqueId()\n {\n return $this->unique_id;\n }",
"function setId($id) {\r\n $this->_id = $id;\r\n }",
"public function set($new_id);",
"public function testSetUniqIdNoeud() {\n\n $obj = new FichesControlesEntetes();\n\n $obj->setUniqIdNoeud(\"uniqIdNoeud\");\n $this->assertEquals(\"uniqIdNoeud\", $obj->getUniqIdNoeud());\n }",
"public function setUniqueID(array $uniqueID)\n {\n $this->uniqueID = $uniqueID;\n return $this;\n }",
"public function setID($_id) \n \t{\n \t\t$this->_id = $_id;\n \t}",
"public function setId(int $id)\n {\n $this->id = md5($id);\n }",
"public function setUid($value)\n {\n return $this->set(self::_UID, $value);\n }",
"public function setUid($value)\n {\n return $this->set(self::_UID, $value);\n }",
"public function setUid($value)\n {\n return $this->set(self::_UID, $value);\n }",
"public function setUid($value)\n {\n return $this->set(self::_UID, $value);\n }",
"public function setUid($value)\n {\n return $this->set(self::_UID, $value);\n }",
"public function setUid($value)\n {\n return $this->set(self::_UID, $value);\n }",
"public function setID($v)\n { return $this->set('id', $v ? $v : JSONMessage::generateID()); }",
"public function setId($uId)\n\t{\n\t\tif ($uId == null) {\n\t\t\treturn false;\n\t\t}\n\t\t$tColumnId = $this->getModel()->getIdTab();\n\t\t$sColumnId = $tColumnId[0];\n\n\t\t$this->_tProperty[$sColumnId] = $uId;\n\n\t\t$this->chooseUpdate();\n\t}",
"public function setId($id){\n $this->_id = $id;\n }",
"public function setUniqueName(?string $value): void {\n $this->getBackingStore()->set('uniqueName', $value);\n }",
"function set_id( $id ){\n\t\t$this->id = $id;\n\t\t// this is add request. so number is 0\n\t\tif( $this->id == $this->id_base ){\n\t\t\t$this->number = 0;\n\t\t\t$this->is_new = true;\n\t\t}\n\t\t// parse number\n\t\telse{\n\t\t\t$this->number = str_replace($this->id_base.'-', '', $this->id);\n\n\t\t\t// load instance data\n\t\t\t$this->instance = jcf_field_settings_get( $this->id );\n\t\t\tif( !empty($this->instance) ){\n\t\t\t\t$this->slug = $this->instance['slug'];\n\t\t\t}\n\t\t}\n\t}",
"public function setId(?string $value): void {\n $this->getBackingStore()->set('id', $value);\n }",
"public function setId(?string $value): void {\n $this->getBackingStore()->set('id', $value);\n }",
"public function setId(?string $value): void {\n $this->getBackingStore()->set('id', $value);\n }",
"public function setId(?string $value): void {\n $this->getBackingStore()->set('id', $value);\n }",
"public function generateNewUid()\n {\n $this->uid = gmdate('Ymd') . 'T' . gmdate('His') . 'Z-' . uniqid('', true) . '@' . gethostname();\n\n return $this;\n }",
"public function uniqueId(): string\n {\n return strval($this->user->id);\n }",
"public function setUserID($value) {\n\t\t$this->_user_id = $value;\n\t}",
"public function generateUniqueId()\n {\n //PHPs uniquid function is time based and therefor guessable\n //A stright random MD5 sum is too long for email and tends to line break causing usability problems\n //So we get unique through uniquid and we get random by prefixing it with a part of an MD5\n //hopefully this results in a URL friendly short, but unguessable string\n $prefix = substr(md5(mt_rand() * mt_rand()), rand(0, 24), rand(6, 8));\n $this->uniqueId = \\uniqid($prefix);\n }",
"function UniqueID(){\n\t\treturn uniqid ('Depari', true);\n\t}",
"function set_id($id) {\n\t\t$this->id = $id;\n\t}",
"function setId($id) {\n\t\t$this->_id = $id;\n\t}",
"function gen_id() {\n\t\t$this->id = get_uid();\n\t\t$this->mk_paths($this->id);\n\t}",
"public function setIdentity($value);",
"protected function getUniqId()\n {\n return uniqid('', true);\n }",
"function getUniqueID() {\r\n\t\treturn $this->uniqueID;\r\n\t}",
"public function setLoginId(): void\n {\n }",
"function setid_exp($val)\n { $this->id_exp=$val;}",
"public function setId($_id);",
"public function setId()\n {\n $apiKey = new ApiKey;\n $apiKey->setId();\n $this->id = $apiKey->getId();\n }",
"public function getUniqueID()\n {\n return $this->uniqueID;\n }",
"public function getUniqueID()\n {\n return $this->uniqueID;\n }",
"public function SetId ($id);",
"public function regenerateId()\n {\n $this->checkIfStarted();\n\n $this->sessionId = $this->calculateSessionId();\n }",
"public function _set($number) {\n\t\t$this->number = $number;\n\t\t$this->id = $this->id_base . '-' . $number;\n\t}",
"public function setMaconomyId(string $key): void\n {\n $this->data['instancekeyField'] = $key;\n }",
"public function set_users_id($value) {\r\n $this->users_id = $value;\r\n data::add(\"users_id\", $this->users_id == \"\" ? session::get(CURRENT_USER_SESSION_NAME) : $this->users_id, $this->table_fields);\r\n }",
"public function setID($_id) \n\t{\n\t\t$this->_id = $_id;\n\t}",
"function setid_exp($val)\n { $this->id_exp=$val;}",
"function setid_exp($val)\n { $this->id_exp=$val;}",
"public function setId(int $userId)\n {\n $this->_id = (int) $userId;\n }"
] | [
"0.74906033",
"0.74151075",
"0.73116803",
"0.7160486",
"0.7000528",
"0.6869744",
"0.670103",
"0.66879684",
"0.6642139",
"0.6553679",
"0.6553279",
"0.6539984",
"0.6530855",
"0.6432999",
"0.63978803",
"0.63976145",
"0.6393939",
"0.6376019",
"0.6368848",
"0.63168156",
"0.6309743",
"0.62965983",
"0.6284115",
"0.62676626",
"0.62119275",
"0.6200379",
"0.61648715",
"0.6143771",
"0.61413085",
"0.6138469",
"0.61156404",
"0.60924613",
"0.6076911",
"0.6074526",
"0.6071819",
"0.6064184",
"0.6062484",
"0.606095",
"0.60406095",
"0.6038247",
"0.60241145",
"0.60241145",
"0.6019691",
"0.60143024",
"0.6005964",
"0.6005964",
"0.6005964",
"0.6005964",
"0.6005964",
"0.6005964",
"0.6005964",
"0.6005964",
"0.5998777",
"0.59665227",
"0.5965534",
"0.59626406",
"0.5959881",
"0.59575087",
"0.5935183",
"0.59307456",
"0.59307456",
"0.59307456",
"0.59307456",
"0.59307456",
"0.59307456",
"0.59282064",
"0.5920962",
"0.591933",
"0.59192175",
"0.59174556",
"0.5914822",
"0.5914822",
"0.5914822",
"0.5914822",
"0.59091526",
"0.59068567",
"0.58975697",
"0.58922243",
"0.58913946",
"0.58906466",
"0.5889573",
"0.5889251",
"0.58881444",
"0.5865406",
"0.585636",
"0.584253",
"0.5838451",
"0.58333874",
"0.5830837",
"0.58268136",
"0.58268136",
"0.5826149",
"0.582533",
"0.58239406",
"0.5821299",
"0.5817579",
"0.5813019",
"0.5810671",
"0.5810671",
"0.5803458"
] | 0.6100524 | 31 |
Set the value of created_at | public function setCreated_at($created_at)
{
$this->created_at = $created_at;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setDateTime($value)\n {\n $this->createdAt=$value;\n }",
"public function setCreatedAtValue()\n {\n $this->createdAt = new \\DateTime();\n }",
"public function setCreatedAtAttribute($value)\n {\n $this->attributes['created_at'] = $value;\n }",
"public function setCreatedAtAttribute($value)\n {\n $this->attributes['created_at'] = date('Y-m-d');\n }",
"public function setCreatedAt()\n {\n $this->createdAt = new \\DateTime();\n }",
"public function setCreatedAtAttribute($value) {}",
"public function setCreatedAt($value)\n {\n if (!array_key_exists('created_at', $this->fieldsModified)) {\n $this->fieldsModified['created_at'] = $this->data['fields']['created_at'];\n } elseif ($value === $this->fieldsModified['created_at']) {\n unset($this->fieldsModified['created_at']);\n }\n\n $this->data['fields']['created_at'] = $value;\n }",
"public function setCreatedAtAttribute($value)\n {\n $this->attributes['created_at'] = Carbon::parse($value);\n }",
"public function setCreatedat(\\DateTime $createdAt);",
"public function setCreatedAt($createdAt);",
"public function setCreatedAt($createdAt);",
"public function setCreatedAt($createdAt);",
"public function setCreatedAt($createdAt);",
"public function setCreatedAt($createdAt);",
"public function setCreatedAt($created_at)\n {\n $this->created_at = $created_at;\n }",
"public function setCreatedAt(string $created_at): void\n {\n $this->_created_at = $created_at;\n }",
"public function setCreatedAt(string $created_at): void\n {\n $this->_created_at = $created_at;\n }",
"public function setCreatedAt($createdAt) \r\n {\r\n $this->createdAt = $createdAt;\r\n }",
"public function setCreatedAt(?string $createdAt): void\n {\n $this->createdAt = $createdAt;\n }",
"public function setCreatedAt(?string $createdAt): void\n {\n $this->createdAt = $createdAt;\n }",
"public function setCreatedAt(\\Datetime $createdAt);",
"public function setCreatedAt(string $createdAt): void\n {\n $this->createdAt = $createdAt;\n }",
"public function setCreatedAtAttribute( $value ) {\n if (config('database.default') == 'mysql') {\n $this->attributes['created_at'] = (new Carbon($value))->format('Y-m-d H:i:s');\n }elseif(config('database.default') == 'sqlsrv'){\n $this->attributes['created_at'] = (new Carbon($value))->format('Ymd H:i:s');\n }else{\n $this->attributes['created_at'] = (new Carbon($value))->format('Y-m-d H:i:s');\n }\n }",
"public function updateCreatedAt()\n {\n $this->setCreatedAt(new \\Datetime());\n $this->updateUpdatedAt();\n }",
"public function setCreatedAt($createdAt)\n {\n $this->createdAt = $createdAt;\n }",
"public function setCreatedAt($createdAt)\n {\n $this->createdAt = $createdAt;\n }",
"public function setCreatedAt($createdAt)\n {\n $this->createdAt = $createdAt;\n }",
"public function setCreatedAt(string $createdAt): self;",
"public function setCreatedAt(string $createdAt): self;",
"private function SetCreated(\\DateTime $value)\n\t\t{\n\t\t\t$this->created = $value;\n\t\t}",
"public function setCreatedAt(\\DateTime $createdAt = null);",
"public function setCreatedAt(DateTime $date);",
"public function setValueDefault()\n {\n $this->createdAt = new \\DateTime();\n }",
"public function setCreatedAt(DateTime $createdAt): self;",
"public function setCreated(\\DateTime $created) {\n\n $this->created = $created->format('Y-m-d H:i:s');\n\n }",
"public function setCreatedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('createdDateTime', $value);\n }",
"public function setCreatedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('createdDateTime', $value);\n }",
"public function setCreatedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('createdDateTime', $value);\n }",
"public function setCreatedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('createdDateTime', $value);\n }",
"public function setCreatedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('createdDateTime', $value);\n }",
"public function setCreatedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('createdDateTime', $value);\n }",
"public function setCreatedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('createdDateTime', $value);\n }",
"public function setCreatedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('createdDateTime', $value);\n }",
"public function setCreated($created);",
"public function setCreated($created);",
"public function setCreatedAt($createdAt){\n return $this->setData(self::CREATED_AT, $createdAt);\n }",
"public function setDate()\n\t{\n\t\tif ($this->getIsNewRecord())\n\t\t\t$this->create_time = time();\n\t}",
"public function setDate()\n\t{\n\t\tif($this->isNewRecord)\n\t\t\t$this->create_time=$this->update_time=time();\n\t\telse\n\t\t\t$this->update_time=time();\n\t}",
"public function setDate()\n\t{\n\t\tif($this->isNewRecord)\n\t\t\t$this->create_time=$this->update_time=time();\n\t\telse\n\t\t\t$this->update_time=time();\n\t}",
"public function set_dates(){\n // if the id is not set, this means its anew item being created\n if(property_exists($this, 'created_on') && empty($this->id)){\n $this->created_on = date('Y-m-d H:i:s');\n }\n\n // if id is set, its an update\n if(property_exists($this, 'last_updated_on') && isset($this->id)){\n $this->last_updated_on = date('Y-m-d H:i:s');\n }\n }",
"public function setCreated_at($created_at) {\n $this->_created_at = (int)$created_at;\n $this->_params['created_at'] = (int)$created_at;\n return $this;\n }",
"public function setCreationTimestamp(?DateTime $value): void {\n $this->getBackingStore()->set('creationTimestamp', $value);\n }",
"public function beforeSave()\n {\n $this->CreatedAt = new \\DateTime('now', new \\DateTimeZone('UTC'));\n }",
"public function onPrePersist()\r\n {\r\n $this->created_at = new \\DateTime(\"now\");\r\n }",
"public function beforeCreate()\n {\n $this->created_at = date('Y-m-d H:i:s');\n }",
"public function setCreatedDateTime($val)\n {\n $this->_propDict[\"createdDateTime\"] = $val;\n return $this;\n }",
"public function setCreatedDateTime($val)\n {\n $this->_propDict[\"createdDateTime\"] = $val;\n return $this;\n }",
"public function setCreatedDateTime($val)\n {\n $this->_propDict[\"createdDateTime\"] = $val;\n return $this;\n }",
"public function setCreatedDateTime($val)\n {\n $this->_propDict[\"createdDateTime\"] = $val;\n return $this;\n }",
"public function setCreatedDateTime($val)\n {\n $this->_propDict[\"createdDateTime\"] = $val;\n return $this;\n }",
"public function setCreatedDateTime($val)\n {\n $this->_propDict[\"createdDateTime\"] = $val;\n return $this;\n }",
"public function setCreatedDateTime($val)\n {\n $this->_propDict[\"createdDateTime\"] = $val;\n return $this;\n }",
"public function setCreatedDateTime($val)\n {\n $this->_propDict[\"createdDateTime\"] = $val;\n return $this;\n }",
"public function setCreatedAt($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->created_at !== null || $dt !== null) {\n if ($this->created_at === null || $dt === null || $dt->format(\"Y-m-d H:i:s\") !== $this->created_at->format(\"Y-m-d H:i:s\")) {\n $this->created_at = $dt === null ? null : clone $dt;\n $this->modifiedColumns[UserTableMap::COL_CREATED_AT] = true;\n }\n } // if either are not null\n\n return $this;\n }",
"function setCreated($value) {\n\t\treturn $this->setColumnValue('created', $value, Model::COLUMN_TYPE_INTEGER_TIMESTAMP);\n\t}",
"public function setCreatedAt($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->created_at !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->created_at !== null && $tmpDt = new DateTime($this->created_at)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('Y-m-d H:i:s') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->created_at = ($dt ? $dt->format('Y-m-d H:i:s') : null);\n\t\t\t\t$this->modifiedColumns[] = UserPeer::CREATED_AT;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}",
"public function setCreatedAt($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->created_at !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->created_at !== null && $tmpDt = new DateTime($this->created_at)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('Y-m-d H:i:s') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->created_at = ($dt ? $dt->format('Y-m-d H:i:s') : null);\n\t\t\t\t$this->modifiedColumns[] = UserPeer::CREATED_AT;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}",
"public function getCreated_at()\n {\n return $this->created_at;\n }",
"public function getCreated_at()\n {\n return $this->created_at;\n }",
"public function getCreated_at()\n {\n return $this->created_at;\n }",
"public function getCreated_at()\n {\n return $this->created_at;\n }",
"public function getCreate_at()\n {\n return $this->create_at;\n }",
"public function getCreate_at()\n {\n return $this->create_at;\n }",
"public function setCreatedAt($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->created_at !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->created_at !== null && $tmpDt = new DateTime($this->created_at)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('Y-m-d H:i:s') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->created_at = ($dt ? $dt->format('Y-m-d H:i:s') : null);\n\t\t\t\t$this->modifiedColumns[] = CampaignPeer::CREATED_AT;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}",
"public function createdAt();",
"public function createdAt();",
"public function addCreated()\n {\n try {\n $date = new DateTime();\n $this->created_at = $date->format('Y-m-d H:i:s');\n $this->created_by = 0;\n } catch (Exception $e) {\n print_r($e);\n }\n }",
"public function setUpdatedAtAttribute($value) {}",
"public function setUpdatedAtAttribute($value) {}",
"public function setCreatedAt($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->created_at !== null || $dt !== null) {\n $currentDateAsString = ($this->created_at !== null && $tmpDt = new DateTime($this->created_at)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;\n if ($currentDateAsString !== $newDateAsString) {\n $this->created_at = $newDateAsString;\n $this->modifiedColumns[] = EventPeer::CREATED_AT;\n }\n } // if either are not null\n\n\n return $this;\n }",
"public function setCreatedAt($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->created_at !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->created_at !== null && $tmpDt = new DateTime($this->created_at)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('Y-m-d H:i:s') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->created_at = ($dt ? $dt->format('Y-m-d H:i:s') : null);\n\t\t\t\t$this->modifiedColumns[] = PostPeer::CREATED_AT;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}",
"public function getCreatedAt(){\n return $this->createdAt;\n }",
"public function getCreatedAtAttribute()\n {\n return strtotime($this->attributes['created_at']);\n }",
"public function setUpdatedAtAttribute($value)\n {\n $this->attributes['updated_at'] = $value;\n }",
"public function setCreatedAt(DateTime $datetime): void;",
"public function setcreateDatetime($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->createdatetime !== null || $dt !== null) {\n $currentDateAsString = ($this->createdatetime !== null && $tmpDt = new DateTime($this->createdatetime)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;\n if ($currentDateAsString !== $newDateAsString) {\n $this->createdatetime = $newDateAsString;\n $this->modifiedColumns[] = ActionTypePeer::CREATEDATETIME;\n }\n } // if either are not null\n\n\n return $this;\n }",
"public function setDateCreated($value)\n {\n $this->validateDate('DateCreated', $value);\n $this->validateNotNull('DateCreated', $value);\n\n if ($this->data['date_created'] === $value) {\n return;\n }\n\n $this->data['date_created'] = $value;\n $this->setModified('date_created');\n }",
"public function getCreatedAt() {\n return $this->attributes['created_at'];\n }",
"public function createdAt() : \\DateTime;",
"public function getCreatedAt() \r\n {\r\n return $this->createdAt;\r\n }",
"public function setCreated(\\DateTime $created = null)\n {\n $this->created = $created;\n }",
"public function setUpdatedAtValue()\n {\n $this->updatedAt = new \\DateTime();\n }",
"public function setUpdatedAtValue()\n {\n $this->updatedAt = new \\DateTime();\n }",
"public function setUpdatedAtValue()\n {\n $this->updatedAt = new \\DateTime();\n }",
"public function setUpdatedAt($value)\n {\n }",
"public function getCreateAt()\n {\n return $this->create_at;\n }",
"public function setCreatedAt($_created_at)\n {\n $this->_created_at = $_created_at;\n\n return $this;\n }",
"public function setCreatedAt(\\DateTime $createdAt){\n $this->createdAt = $createdAt;\n return $this;\n }",
"public function getCreatedAt()\n {\n return clone $this->createdAt;\n }",
"public function onPrePersist()\n {\n $this->setCreatedAt(new \\DateTime());\n }"
] | [
"0.8108836",
"0.7978941",
"0.791579",
"0.78679883",
"0.77636284",
"0.7692112",
"0.75862956",
"0.7556652",
"0.7477115",
"0.7448109",
"0.7448109",
"0.7448109",
"0.7448109",
"0.7448109",
"0.74423444",
"0.73563635",
"0.73563635",
"0.7307852",
"0.73021567",
"0.73021567",
"0.7268941",
"0.7256419",
"0.7234398",
"0.72195023",
"0.7133448",
"0.7133448",
"0.7133448",
"0.71112114",
"0.71112114",
"0.708807",
"0.7080531",
"0.703129",
"0.7016913",
"0.700178",
"0.69824076",
"0.6974677",
"0.6974677",
"0.6974677",
"0.6974677",
"0.6974677",
"0.6974677",
"0.6974677",
"0.6974677",
"0.68335307",
"0.68335307",
"0.6817646",
"0.6810394",
"0.6808639",
"0.6808639",
"0.67941403",
"0.67892987",
"0.67888033",
"0.6784397",
"0.67812747",
"0.67755646",
"0.6748722",
"0.6748722",
"0.6748722",
"0.6748722",
"0.6748722",
"0.6748722",
"0.6748722",
"0.6748722",
"0.6747198",
"0.67246264",
"0.6723447",
"0.6723447",
"0.6699547",
"0.6699547",
"0.6699547",
"0.6699547",
"0.6699033",
"0.6699033",
"0.66852343",
"0.66785455",
"0.66785455",
"0.66720843",
"0.66696644",
"0.66696644",
"0.6654554",
"0.665211",
"0.66511047",
"0.6649076",
"0.6647405",
"0.66388494",
"0.66283983",
"0.6627314",
"0.66125244",
"0.6607389",
"0.66043544",
"0.65990967",
"0.659895",
"0.659895",
"0.659895",
"0.6584566",
"0.6584147",
"0.6583831",
"0.6567874",
"0.6566527",
"0.6566129"
] | 0.68940467 | 43 |
Set the value of created_by | public function setCreated_by($created_by)
{
$this->created_by = $created_by;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setCreatedBy($createdBy);",
"private function SetCreatedBy(User $value = null)\n\t\t{\n\t\t\t$this->createdby = $value;\n\t\t}",
"public function setCreatedByAttribute(){\n $this->attributes['created_by'] = Auth::user()->id;\n }",
"public function _setCreatedBy($createdBy) {\n\t\t$this->_createdBy = $createdBy;\n\t}",
"public function setCreatedBy(?SubmissionUserIdentity $value): void {\n $this->getBackingStore()->set('createdBy', $value);\n }",
"public function setCreatedby($input){\n\n $this->m_Createdby=$input;\n }",
"public function setCreatedBy($val)\n {\n $this->_propDict[\"createdBy\"] = $val;\n return $this;\n }",
"public function setCreatedBy($val)\n {\n $this->_propDict[\"createdBy\"] = $val;\n return $this;\n }",
"public function setCreatedBy($val)\n {\n $this->_propDict[\"createdBy\"] = $val;\n return $this;\n }",
"public function setCreatedBy(?UserIdentity $value): void {\n $this->getBackingStore()->set('createdBy', $value);\n }",
"public function setCreatedBy(User $createdBy)\n\t{\n\t\t$this->createdBy=$createdBy; \n\t\t$this->keyModified['created_by'] = 1; \n\n\t}",
"public function get_created_by()\n\t{\n\t\treturn $this->created_by;\n\t}",
"public function getCreatedby() {\n\n return $this->u_createdby;\n\n }",
"public function setCreatedBy(?IdentitySet $value): void {\n $this->getBackingStore()->set('createdBy', $value);\n }",
"public function setCreatedBy(?IdentitySet $value): void {\n $this->getBackingStore()->set('createdBy', $value);\n }",
"public function setCreatedBy()\n {\n $userService = app()->make(AuthUserService::class);\n if ($userService->check()) {\n $this->{static::CREATED_BY} = $userService->user()->id;\n }\n\n return $this;\n }",
"public function setCreatedByUserId(?string $value): void {\n $this->getBackingStore()->set('createdByUserId', $value);\n }",
"public function getCreatedBy()\n {\n return $this->created_by;\n }",
"public function getCreatedBy()\n {\n return $this->createdBy;\n }",
"public function getCreatedBy()\n {\n return $this->createdBy;\n }",
"public function getCreatedBy()\n {\n return $this->createdBy;\n }",
"public function getCreatedBy()\n {\n return $this->createdBy;\n }",
"public function getCreatedBy()\n {\n return $this->createdBy;\n }",
"public function getCreatedBy()\n {\n return $this->createdBy;\n }",
"public function setCreatedBy($var)\n {\n GPBUtil::checkString($var, True);\n $this->createdBy = $var;\n\n return $this;\n }",
"public function getCreatedBy()\n\t{\n\t\treturn $this->createdBy; \n\n\t}",
"public function _getCreatedBy() {\n\t\treturn $this->_createdBy;\n\t}",
"public function setCreatedBy($creator) {\n\n $this->u_createdby = $creator;\n\n }",
"public function getCreatedBy()\n\t{\n\t\treturn $this->created_by;\n\t}",
"public function set()\n\t{\n\t\t$this->created_at = date(TIMESTAMP_FORMAT);\n $user = new SessionUser();\n\t\t$this->created_by = $user->getID();\t\t\n\t}",
"public function setCreatedBy(?WorkbookEmailIdentity $value): void {\n $this->getBackingStore()->set('createdBy', $value);\n }",
"public function getCreatedby()\n {\n return ($this->m_Createdby);\n }",
"public function getCreatedBy()\n {\n return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy;\n }",
"public function getCreatedBy()\n {\n return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy;\n }",
"public function getCreatedBy()\n {\n return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy;\n }",
"public function set_created_by($created_by)\n\t{\n\t\tif (is_null($created_by)) {\n\t\t\tthrow new InvalidArgumentException(\"Project Created By Invalid!\");\n\t\t}\n\t\t$this->created_by = $created_by;\n\t}",
"public function setCreatedBy($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (int) $v;\n\t\t}\n\n\t\tif ($this->created_by !== $v) {\n\t\t\t$this->created_by = $v;\n\t\t\t$this->modifiedColumns[] = CampaignPeer::CREATED_BY;\n\t\t}\n\n\t\tif ($this->asfGuardUserProfile !== null && $this->asfGuardUserProfile->getId() !== $v) {\n\t\t\t$this->asfGuardUserProfile = null;\n\t\t}\n\n\t\treturn $this;\n\t}",
"public function getCreateBy()\n {\n return $this->hasOne(User::className(), ['id' => 'created_by']);\n }",
"public function setCreator(User $creator);",
"public function setCreatedBy($createdBy) {\n\t\t$this->_setCreatedBy($createdBy);\n\t\treturn $this;\n\t}",
"public function setCreatedByIdAttribute($input)\n {\n $this->attributes['created_by_id'] = $input ? $input : null;\n }",
"public function setCreatedByIdAttribute($input)\n {\n $this->attributes['created_by_id'] = $input ? $input : null;\n }",
"public function getCreatedBy() {\n if(array_key_exists('created_by', $this->_attributes)) {\n return $this->_attributes['created_by'];\n }\n return 0;\n }",
"public function createdBy()\n {\n return $this->belongsTo(User::class, 'created_by')->withDefault();\n }",
"public function _setCreatedByAdmin($createdByAdmin) {\n\t\t$this->_createdByAdmin = $createdByAdmin;\n\t}",
"public function setCreatedBy($userID);",
"public function createdBy()\n {\n return $this->belongsTo(User::class, 'created_by_id');\n }",
"public function created_by() {\n return $this->belongsTo(User::class,'created_by_id');\n }",
"protected static function created_by(): mixed\n\t{\n\t\treturn self::$query->created_by;\n\t}",
"public function createdBy()\n {\n return $this->belongsTo(User::class, 'created_by');\n }",
"public function setCreator(): self\n {\n $this->added_by_user_id = auth()->user() ? auth()->user()->id : User::SYSUID;\n return $this;\n }",
"public function createdBy() {\r\n return $this->belongsTo('User', 'created_by_id');\r\n }",
"public function getCreatedBy()\n {\n $this->loadManyToOne('createdBy');\n return $this->createdBy;\n }",
"public function creator()\n\t{\n\t\treturn $this->belongsToOne('Hubzero\\User\\User', 'created_by');\n\t}",
"public function creator()\n\t{\n\t\treturn $this->belongsToOne('Hubzero\\User\\User', 'created_by');\n\t}",
"public function createdBy()\n {\n return $this->belongsTo('App\\User', 'created_by');\n }",
"public function getCreatedBy()\n {\n return $this->hasOne(User::className(), ['id' => 'created_by']);\n }",
"public function getCreatedBy()\n {\n return $this->hasOne(User::className(), ['id' => 'created_by']);\n }",
"public function getCreatedBy()\n {\n return $this->hasOne(User::className(), ['id' => 'created_by']);\n }",
"public function getCreatedBy()\n {\n return $this->hasOne(User::className(), ['id' => 'created_by']);\n }",
"public function setCreatedBy(int $createdBy)\n\t{\n\t\t$this->createdBy = $createdBy;\n\n\t\treturn $this;\n\t}",
"public function getCreatedBy();",
"public function getCreatedBy();",
"public function getCreatedBy();",
"public function getCreatedBy();",
"public function created_by()\n {\n return $this->belongsTo(User::class);\n }",
"public function setCreatedBy($createdBy)\n {\n $this->createdBy = $createdBy;\n\n return $this;\n }",
"public function setCreatedBy($createdBy)\n {\n $this->createdBy = $createdBy;\n\n return $this;\n }",
"public function setCreatedBy($createdBy)\n {\n $this->createdBy = $createdBy;\n\n return $this;\n }",
"public function getCreatedby0()\n {\n return $this->hasOne(User::className(), ['id' => 'createdby']);\n }",
"public function getCreatedby0()\n {\n return $this->hasOne(User::className(), ['id' => 'createdby']);\n }",
"public function setUserCreatedAttribute($value){\n if(isset($value)){\n $this->attributes['user_created'] = $value;\n }\n else{\n $this->attributes['user_created'] = 0;\n }\n }",
"public function getCreatedBy() {\n\t\treturn $this->hasOne ( User::className (), [ \n\t\t\t\t'id' => 'created_by_id' \n\t\t] );\n\t}",
"public function getCreatedBy()\n {\n return $this->hasOne(User::class, ['id' => 'created_by']);\n }",
"public function getCreatedBy()\n {\n if (is_null($this->createdBy)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_CREATED_BY);\n if (is_null($data)) {\n return null;\n }\n\n $this->createdBy = CreatedByModel::of($data);\n }\n\n return $this->createdBy;\n }",
"public function createdBy()\n\t{\n\t\treturn $this->hasOne('App\\User', 'id', 'created_by');\n\t}",
"public function setCreatedBy(UserInterface $createdBy)\n {\n $this->createdBy = $createdBy;\n $this->addFollower($createdBy);\n\n return $this;\n }",
"public function getCreatedByColumn()\n {\n return Track::CREATED_BY;\n }",
"public function getCreatedBy()\n {\n if (array_key_exists(\"createdBy\", $this->_propDict)) {\n if (is_a($this->_propDict[\"createdBy\"], \"\\Beta\\Microsoft\\Graph\\Model\\IdentitySet\") || is_null($this->_propDict[\"createdBy\"])) {\n return $this->_propDict[\"createdBy\"];\n } else {\n $this->_propDict[\"createdBy\"] = new \\Beta\\Microsoft\\Graph\\Model\\IdentitySet($this->_propDict[\"createdBy\"]);\n return $this->_propDict[\"createdBy\"];\n }\n }\n return null;\n }",
"public function creator()\n {\n return $this->belongsTo('App\\User', 'created_by');\n }",
"public function creator()\n {\n return $this->belongsTo(User::class, 'created_by');\n }",
"public function creator()\n {\n return $this->belongsTo(User::class, 'created_by');\n }",
"public function creator()\n {\n return $this->belongsTo(User::class, 'created_by');\n }",
"public function creator()\n {\n return $this->belongsTo(User::class, 'created_by');\n }",
"public function creator()\n {\n return $this->belongsTo(User::class, 'created_by');\n }",
"public function creator()\n {\n return $this->belongsTo('App\\User','created_by');\n }",
"public function _getCreatedByAdmin() {\n\t\treturn $this->_createdByAdmin;\n\t}",
"private function SetModifiedBy(User $value = null)\n\t\t{\n\t\t\t$this->modifiedby = $value;\n\t\t}",
"public function user()\n {\n return $this->belongsTo('App\\Models\\User','created_by');\n }",
"public function getCreated_by($created_by=null)\n {\n if ($created_by != null && is_array($this->entity) && count($this->entity)!=0) {\n $table_name = strtolower(get_class($this));\n $query = \"SELECT * FROM $table_name WHERE created_by = ?\";\n $req = Manager::bdd()->prepare($query);\n $req->execute([$created_by]);\n $data = \"\";\n if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) {\n$d=$data[0];\n$this->setId_entity($d['id_entity']);\n$this->setLabel($d['label']);\n$this->setDomaine($d['domaine']);\n$this->setEmail($d['email']);\n$this->setPhone_number($d['phone_number']);\n$this->setBp($d['bp']);\n$this->setLocalisation($d['localisation']);\n$this->setVille($d['ville']);\n$this->setUniqueId($d['uniqueId']);\n$this->setCreated_at($d['created_at']);\n$this->setCreated_by($d['created_by']);\n$this->setUpdate_at($d['update_at']);\n$this->setUpdate_by($d['update_by']);\n$this->entity =$data; \n return $this;\n }\n \n } else {\n return $this->created_by;\n }\n \n }",
"public function creator()\n {\n return $this->belongsTo('App\\User', 'created_by', 'id');\n }",
"public function setCreatedBy(\\GoetasWebservices\\Client\\SalesforceEnterprise\\Sobject\\UserType $createdBy)\n {\n $this->createdBy = $createdBy;\n return $this;\n }",
"public function setCreatedBy(\\GoetasWebservices\\Client\\SalesforceEnterprise\\Sobject\\UserType $createdBy)\n {\n $this->createdBy = $createdBy;\n return $this;\n }",
"public function setCreatedBy(\\GoetasWebservices\\Client\\SalesforceEnterprise\\Sobject\\UserType $createdBy)\n {\n $this->createdBy = $createdBy;\n return $this;\n }",
"public function setCreatedBy(\\GoetasWebservices\\Client\\SalesforceEnterprise\\Sobject\\UserType $createdBy)\n {\n $this->createdBy = $createdBy;\n return $this;\n }",
"public function setCreatedBy(\\GoetasWebservices\\Client\\SalesforceEnterprise\\Sobject\\UserType $createdBy)\n {\n $this->createdBy = $createdBy;\n return $this;\n }",
"public function setCreatedBy(\\GoetasWebservices\\Client\\SalesforceEnterprise\\Sobject\\UserType $createdBy)\n {\n $this->createdBy = $createdBy;\n return $this;\n }",
"public function setCreatedBy(\\GoetasWebservices\\Client\\SalesforceEnterprise\\Sobject\\UserType $createdBy)\n {\n $this->createdBy = $createdBy;\n return $this;\n }",
"public function setCreatedBy(\\GoetasWebservices\\Client\\SalesforceEnterprise\\Sobject\\UserType $createdBy)\n {\n $this->createdBy = $createdBy;\n return $this;\n }",
"public function setCreatedBy(\\GoetasWebservices\\Client\\SalesforceEnterprise\\Sobject\\UserType $createdBy)\n {\n $this->createdBy = $createdBy;\n return $this;\n }"
] | [
"0.8133105",
"0.81027514",
"0.8092404",
"0.7935914",
"0.7823249",
"0.77964735",
"0.7785043",
"0.7785043",
"0.7785043",
"0.77207595",
"0.7638569",
"0.75950086",
"0.75556827",
"0.75140077",
"0.75140077",
"0.75058687",
"0.74027807",
"0.7369703",
"0.7325514",
"0.7325514",
"0.7325514",
"0.7325514",
"0.7325514",
"0.7325514",
"0.73182577",
"0.7252665",
"0.72458255",
"0.7216095",
"0.7201394",
"0.713117",
"0.711525",
"0.70684564",
"0.70258284",
"0.70258284",
"0.70258284",
"0.70189404",
"0.6995621",
"0.6958993",
"0.6928298",
"0.69109035",
"0.6899697",
"0.6899697",
"0.6879562",
"0.6861484",
"0.6834997",
"0.6816232",
"0.6806218",
"0.6805041",
"0.6793253",
"0.6772939",
"0.6751503",
"0.672973",
"0.6710539",
"0.6705485",
"0.6705485",
"0.6684538",
"0.6670976",
"0.6670976",
"0.6670976",
"0.6670976",
"0.6658221",
"0.6641241",
"0.6641241",
"0.6641241",
"0.6641241",
"0.6632535",
"0.6600051",
"0.6600051",
"0.6600051",
"0.6568145",
"0.6568145",
"0.6542796",
"0.6537425",
"0.6537342",
"0.65272325",
"0.6525178",
"0.6509991",
"0.64870137",
"0.64563566",
"0.6448299",
"0.64461017",
"0.64461017",
"0.64461017",
"0.64461017",
"0.64461017",
"0.64346397",
"0.6417045",
"0.6399199",
"0.63952804",
"0.63919216",
"0.6381176",
"0.6359482",
"0.6359482",
"0.6359482",
"0.6359482",
"0.6359482",
"0.6359482",
"0.6359482",
"0.6359482",
"0.6359482"
] | 0.7609677 | 11 |
Set the value of update_at | public function setUpdate_at($update_at)
{
$this->update_at = $update_at;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function _update()\n {\n $this->updatedAt = new \\DateTime();\n }",
"public function setUpdatedAt($updated_at)\n {\n $this->updated_at = $updated_at;\n }",
"public function setUpdatedAtValue()\n {\n $this->updatedAt = new \\DateTime();\n }",
"public function setUpdatedAtValue()\n {\n $this->updatedAt = new \\DateTime();\n }",
"public function setUpdatedAtValue()\n {\n $this->updatedAt = new \\DateTime();\n }",
"public function updateUpdatedAt()\n {\n $this->setUpdatedAt(new \\Datetime());\n }",
"public function setUpdatedAt(string $updated_at): void\n {\n $this->_updated_at = $updated_at;\n }",
"public function setUpdatedAt(string $updated_at): void\n {\n $this->_updated_at = $updated_at;\n }",
"public function setUpdatedAtAttribute($value)\n {\n $this->attributes['updated_at'] = $value;\n }",
"private function updateUpdatedAtField() {\n foreach (static::getFields() as $field_name => $field) {\n if ($field instanceof UpdatedAtField) {\n $this->$field_name = time();\n }\n }\n }",
"public function markLastUpdate()\n {\n if (!$this->updatedAtOveridden) {\n $this->updatedAt = new \\DateTime();\n }\n }",
"public function setUpdatedAtAttribute($value)\n {\n $this->attributes['updated_at'] = Carbon::parse($value);\n }",
"protected function setUpdated(){\n if($this->_id > 0){\n $pfDB = DB\\Database::instance()->getDB('PF');\n\n $pfDB->exec(\n [\"UPDATE \" . $this->table . \" SET updated=NOW() WHERE id=:id\"],\n [\n [':id' => $this->_id]\n ]\n );\n }\n }",
"public function updatedAt();",
"public function addUpdated()\n {\n try {\n $date = new DateTime();\n $this->updated_at = $date->format('Y-m-d H:i:s');\n $this->updated_by = 0;\n } catch (Exception $e) {\n print_r($e);\n }\n }",
"public function onPreUpdate()\r\n {\r\n $this->updated_at = new \\DateTime(\"now\");\r\n }",
"public function beforeUpdate()\n {\n $this->update_at=time();\n }",
"public function setUpdatedAt($value)\n {\n }",
"public function setUpdatedAt($value)\n {\n if (!array_key_exists('updated_at', $this->fieldsModified)) {\n $this->fieldsModified['updated_at'] = $this->data['fields']['updated_at'];\n } elseif ($value === $this->fieldsModified['updated_at']) {\n unset($this->fieldsModified['updated_at']);\n }\n\n $this->data['fields']['updated_at'] = $value;\n }",
"public function getUpdateAt()\n {\n return $this->update_at;\n }",
"public function getUpdateAt()\n {\n return $this->update_at;\n }",
"private function set_last_updated_at() {\n\n\t\tif ( ! static::get_table() instanceof TimestampedTable ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$dirty = $this->is_dirty();\n\n\t\t$this->set_attribute( static::get_table()->get_updated_at_column(), $this->fresh_timestamp() );\n\n\t\t// If the model is dirty, we don't want to commit our save since the user should already be calling save.\n\t\tif ( ! $dirty ) {\n\t\t\t$this->save();\n\t\t}\n\t}",
"public function onPreUpdate()\n {\n $this->updatedAt = new \\DateTime(\"now\");\n }",
"public function onPreUpdate()\n {\n $this->updatedAt = new DateTime();\n }",
"public function onPreUpdate()\n {\n $this->updatedAt = new DateTime();\n }",
"public function onPreUpdate()\n {\n $this->updatedAt = new \\DateTime();\n }",
"public function onPreUpdate()\n {\n $this->updatedAt = new \\DateTime();\n }",
"public function beforeUpdate()\n {\n $this->owner->{$this->updatedAtField} = date($this->format);\n }",
"public function onPreUpdate()\n {\n $this->updatedAt = new \\DateTime(\"now\");\n }",
"public function onPreUpdate()\n {\n $this->updatedAt = new \\DateTime(\"now\");\n }",
"public function onPreUpdate()\n {\n $this->updateAt = new Carbon();\n }",
"public function setUpdatedAtAttribute($value) {}",
"public function setUpdatedAtAttribute($value) {}",
"public function onPreUpdate()\n {\n $this->updatedAt = new \\DateTime('now');\n }",
"public function preUpdate()\n {\n $this->updatedAt = new \\DateTime;\n }",
"public function preUpdate()\n {\n $this->updatedAt = new \\DateTime();\n }",
"public function setUpdatedAt(?string $updatedAt): void\n {\n $this->updatedAt = $updatedAt;\n }",
"public function setUpdatedAt(?string $updatedAt): void\n {\n $this->updatedAt = $updatedAt;\n }",
"public function updateDatetime( Inx_Api_Recipient_Attribute $attr, $sValue );",
"public function updateTimestamps()\r\n {\r\n $this->setUpdatedAt(new \\DateTime('now'));\r\n\r\n if (is_null($this->getCreatedAt())) {\r\n $this->setCreatedAt(new \\DateTime('now'));\r\n }\r\n }",
"public function touch() {\n $this->updatedAt = new DateTime();\n }",
"public function updateTimestamps()\n {\n $this->setUpdatedAt(new \\DateTime());\n\n if ($this->getCreatedAt() == null) {\n $this->setCreatedAt(new \\DateTime());\n }\n }",
"public function updateTimestamps()\n {\n $this->setUpdatedAt(new \\DateTime());\n\n if ($this->getCreatedAt() == null) {\n $this->setCreatedAt(new \\DateTime());\n }\n }",
"public function updateTimestamps()\n {\n $this->setUpdatedAt(new \\DateTime());\n\n if ($this->getCreatedAt() == null) {\n $this->setCreatedAt(new \\DateTime());\n }\n }",
"public function updateTimestamps()\n {\n $this->setUpdatedAt(new \\DateTime());\n\n if ($this->getCreatedAt() == null) {\n $this->setCreatedAt(new \\DateTime());\n }\n }",
"public function setUpdatedAt($updatedAt)\n {\n $this->updatedAt = $updatedAt;\n }",
"public function setUpdatedAt($updatedAt)\n {\n $this->updatedAt = $updatedAt;\n }",
"public function setUpdated($date)\n {\n $this->updated = $date;\n }",
"public function updateTimestamps() {\r\n $this->setModifiedAt(new \\DateTime(date('Y-m-d H:i:s')));\r\n\r\n if ($this->getCreatedAt() == null) {\r\n $this->setCreatedAt(new \\DateTime(date('Y-m-d H:i:s')));\r\n }\r\n }",
"public function setUpdateAt($update_at)\n {\n $this->update_at = $update_at;\n\n return $this;\n }",
"public function setUpdateAt($update_at)\n {\n $this->update_at = $update_at;\n\n return $this;\n }",
"public function refreshUpdateAt() {\n // Get session\n $securitySession = $this->getSecuritySession();\n if($securitySession != null) {\n $securitySession[self::SESS_UPDATED_AT] = time();\n $this->setSecuritySessionFromArray($securitySession);\n }\n }",
"public function setUpdated($updated);",
"public function onPreUpdate()\n {\n $now = new \\DateTime();\n $this->setUpdatedAt($now);\n }",
"public function updatedTimestamps()\n {\n $this->setUpdatedAt(new \\DateTime(date('d-m-Y H:i')));\n\n if($this->getCreatedAt() == null)\n {\n $this->setCreatedAt(new \\DateTime(date('d-m-Y H:i')));\n }\n }",
"public function updatedTimestamps()\n {\n if($this->getCreatedAt() == null)\n {\n $this->setCreatedAt(new \\DateTime(date('Y-m-d H:i:s')));\n }\n }",
"public function setUpdatedAt($updatedAt);",
"public function setUpdatedAt($updatedAt);",
"public function onPreUpdate()\n {\n $this->modified_at = new \\DateTime(\"now\");\n }",
"public function setUpdatedAt($timestamp);",
"public function setUpdated(\\DateTime $updated = null)\n {\n $this->updated = $updated;\n }",
"public function updatedTimestamps()\n {\n $this->setUpdatedAt(new \\DateTime('now'));\n }",
"public function setUpdatedAtAttribute($value)\n {\n // Do nothing.\n }",
"public function setModifiedAt()\n {\n $this->modifiedAt = new \\DateTime();\n }",
"public function onPreUpdate(): void\n {\n $this->updated = new DateTime(\"now\", new DateTimeZone(\"UTC\"));\n }",
"public function onPreUpdate(): void\n {\n $this->updated = new DateTime(\"now\", new DateTimeZone(\"UTC\"));\n }",
"public function doPreUpdate()\n {\n $this->updatedAt = new \\DateTime( 'now', new \\DateTimeZone( 'UTC' ) );\n }",
"public function setUpdated($date) \n\t{\n\t\t$this->updated = $this->parseDate($date);\n\t}",
"public function setDateUpdated($value)\n {\n $this->validateDate('DateUpdated', $value);\n $this->validateNotNull('DateUpdated', $value);\n\n if ($this->data['date_updated'] === $value) {\n return;\n }\n\n $this->data['date_updated'] = $value;\n $this->setModified('date_updated');\n }",
"public function refreshUpdated(): void\n {\n $this->setUpdatedAt(new \\DateTime());\n }",
"protected function _update()\n {\r\n $this->date_updated = new Zend_Db_Expr(\"NOW()\");\n parent::_update();\n }",
"public function set_dates(){\n // if the id is not set, this means its anew item being created\n if(property_exists($this, 'created_on') && empty($this->id)){\n $this->created_on = date('Y-m-d H:i:s');\n }\n\n // if id is set, its an update\n if(property_exists($this, 'last_updated_on') && isset($this->id)){\n $this->last_updated_on = date('Y-m-d H:i:s');\n }\n }",
"public function setLastUpdateAttribute($date)\n {\n $myDate = Carbon::createFromFormat('Y-m-d', $date);\n if ($myDate > Carbon::now()) {\n $this->attributes['last_update'] = Carbon::parse($date);\n } else {\n $this->attributes['last_update'] = Carbon::createFromFormat('Y-m-d', $date);\n }\n }",
"public function setLastUpdateAttribute($date)\n {\n $myDate = Carbon::createFromFormat('Y-m-d', $date);\n if ($myDate > Carbon::now()) {\n $this->attributes['last_update'] = Carbon::parse($date);\n } else {\n $this->attributes['last_update'] = Carbon::createFromFormat('Y-m-d', $date);\n }\n }",
"public function onPreUpdate()\n {\n $this->updated = new \\DateTime(\"now\");\n }",
"public function setUpdatedAt(\\DateTime $updatedAt);",
"public function beforeUpdate()\n {\n\t\t// Asignar fecha y hora de ultima actualizacion\n// $this->updatedon = time();\n }",
"public function updatePublishedAt() {\n\t\tif (!$this->private && !$this->published_at) {\n\t\t\t$this->published_at = $this->updated_at;\n\t\t}\n\t}",
"public function setUpdatedAt($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->updated_at !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->updated_at !== null && $tmpDt = new DateTime($this->updated_at)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('Y-m-d H:i:s') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->updated_at = ($dt ? $dt->format('Y-m-d H:i:s') : null);\n\t\t\t\t$this->modifiedColumns[] = CampaignPeer::UPDATED_AT;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}",
"public function setLastUpdatedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('lastUpdatedDateTime', $value);\n }",
"public function setLastStatusUpdate($value) {\n\t\t$value = date('d-M-Y', strtotime($value));\n\t\tself::$_lastStatusUpdate = $value;\n\t}",
"public function setUpdatedAt(\\Datetime $updatedAt = null);",
"public function setUpdatedAt($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->updated_at !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->updated_at !== null && $tmpDt = new DateTime($this->updated_at)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('Y-m-d H:i:s') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->updated_at = ($dt ? $dt->format('Y-m-d H:i:s') : null);\n\t\t\t\t$this->modifiedColumns[] = PostPeer::UPDATED_AT;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}",
"public function onPreUpdate()\n {\n $this->updated = new \\DateTime('now');\n }",
"function setUpdated($value) {\n\t\treturn $this->setColumnValue('updated', $value, Model::COLUMN_TYPE_INTEGER_TIMESTAMP);\n\t}",
"public function update(array $update)\n {\n $update['dtstamp'] = gmdate('Ymd\\THis\\Z', time());\n $update['dtstart'] = gmdate('Ymd\\THis\\Z', strtotime($update['startTime']));\n $update['dtend'] = gmdate('Ymd\\THis\\Z', strtotime($update['endTime']));\n \n parent::update($update);\n }",
"public function setUpdatedAt($_updated_at)\n {\n $this->_updated_at = $_updated_at;\n\n return $this;\n }",
"public function setUpdatedAt($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->updated_at !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->updated_at !== null && $tmpDt = new DateTime($this->updated_at)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('Y-m-d H:i:s') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->updated_at = ($dt ? $dt->format('Y-m-d H:i:s') : null);\n\t\t\t\t$this->modifiedColumns[] = UserPeer::UPDATED_AT;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}",
"public function updatedTimestamps()\n {\n $this->setModifiedAt(new \\DateTime(date('Y-m-d H:i:s')));\n\n if($this->getCreatedAt() == null)\n {\n $this->setCreatedAt(new \\DateTime(date('Y-m-d H:i:s')));\n }\n }",
"protected function _update()\n\t{\n\t\t$this->date_modified = \\Core\\Date::getInstance(null,\\Core\\Date::SQL_FULL, true)->toString();\n\t\t$this->last_online = $this->date_modified;\n\t}",
"public function updateTime( Inx_Api_Recipient_Attribute $attr, $sValue );",
"public function setUpdatedAt($updatedAt = null);",
"public function setUpdatedAt(\\DateTime $date = null);",
"public function onPreUpdate()\n {\n $this->setUpdated(new \\DateTime(\"now\"));\n }",
"public function setEmittedAtAttribute($value)\n {\n $this->attributes['emitted_at'] = DataHelper::setDateTime($value);\n }",
"public function setUpdatedAt(?string $updatedAt): self;",
"protected function _setDateModified(XMLWriter $xml)\n {\n if (!$this->entry->getDateModified()) {\n throw new InvalidArgumentException(\n 'Atom 1.0 entry elements MUST contain exactly one'\n . ' atom:updated element but a modification date has not been set'\n );\n }\n\n $xml->writeElement(\n 'updated', \n $this->entry->getDateModified()->format(DateTime::RFC3339)\n );\n }",
"public function setUpdateOn($data)\n {\n \n if ($data == '0000-00-00 00:00:00') {\n\n $data = null;\n }\n \n if ($data === 'CURRENT_TIMESTAMP') {\n \t$data = \\Zend_Date::now()->setTimezone('UTC');\n }\n\n if ($data instanceof \\Zend_Date) {\n\n $data = new \\DateTime($data->toString('yyyy-MM-dd HH:mm:ss'), new \\DateTimeZone($data->getTimezone()));\n\n } elseif (!is_null($data) && !$data instanceof \\DateTime) {\n\n $data = new \\DateTime($data, new \\DateTimeZone('UTC'));\n }\n\n if ($data instanceof \\DateTime && $data->getTimezone()->getName() != 'UTC') {\n\n $data->setTimezone(new \\DateTimeZone('UTC'));\n }\n\n if ($this->_logChanges === true && $this->_updateOn != $data) {\n\n $this->_logChange('updateOn');\n }\n\n $this->_updateOn = $data;\n return $this;\n }",
"public function updatedAt(?string $value): self\n {\n $this->instance->setUpdatedAt($value);\n return $this;\n }",
"public function setUpdatedAt(\\DateTime $updatedAt = null);"
] | [
"0.7373528",
"0.7331793",
"0.7293645",
"0.7293645",
"0.7293645",
"0.7285675",
"0.7249674",
"0.7249674",
"0.70946604",
"0.70505416",
"0.70440763",
"0.70376456",
"0.70323217",
"0.69707924",
"0.6928115",
"0.6917095",
"0.6915163",
"0.691319",
"0.69127333",
"0.68610305",
"0.68610305",
"0.68599683",
"0.684059",
"0.68396187",
"0.68396187",
"0.6800173",
"0.6800173",
"0.6746949",
"0.67421097",
"0.67421097",
"0.67139065",
"0.6699636",
"0.6699636",
"0.6694643",
"0.6651273",
"0.66468775",
"0.6614289",
"0.6614289",
"0.66120493",
"0.65799916",
"0.65586",
"0.65392184",
"0.65392184",
"0.65392184",
"0.65392184",
"0.6535941",
"0.6535941",
"0.6533543",
"0.65215653",
"0.6518939",
"0.6518939",
"0.6502329",
"0.64800924",
"0.6453434",
"0.644995",
"0.6445726",
"0.6445512",
"0.6445512",
"0.6435904",
"0.642626",
"0.6416016",
"0.63719887",
"0.63567734",
"0.63495433",
"0.63308096",
"0.63308096",
"0.6314269",
"0.6311748",
"0.63063115",
"0.6300725",
"0.62854934",
"0.6281591",
"0.6271479",
"0.6271479",
"0.6266803",
"0.6249489",
"0.62483567",
"0.6246422",
"0.62381697",
"0.62311393",
"0.62289816",
"0.6227507",
"0.6225504",
"0.61937946",
"0.61882824",
"0.61848146",
"0.6177676",
"0.61728257",
"0.6169312",
"0.61631596",
"0.6161241",
"0.6160704",
"0.61454356",
"0.6132626",
"0.61172706",
"0.6104787",
"0.6103104",
"0.6096839",
"0.609387",
"0.60911864"
] | 0.70844126 | 9 |
Set the value of update_by | public function setUpdate_by($update_by)
{
$this->update_by = $update_by;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function _setUpdatedBy($updatedBy) {\n\t\t$this->_updatedBy = $updatedBy;\n\t}",
"public function setBy($x) { $this->by = $x; }",
"public function updateBy( array $data, $value = NULL, $field = 'id' );",
"public function setUpdatedBy()\n {\n $userService = app()->make(AuthUserService::class);\n if ($userService->check()) {\n $this->{static::UPDATED_BY} = $userService->user()->id;\n }\n\n return $this;\n }",
"public function getUpdate_by($update_by=null)\n {\n if ($update_by != null && is_array($this->entity) && count($this->entity)!=0) {\n $table_name = strtolower(get_class($this));\n $query = \"SELECT * FROM $table_name WHERE update_by = ?\";\n $req = Manager::bdd()->prepare($query);\n $req->execute([$update_by]);\n $data = \"\";\n if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) {\n$d=$data[0];\n$this->setId_entity($d['id_entity']);\n$this->setLabel($d['label']);\n$this->setDomaine($d['domaine']);\n$this->setEmail($d['email']);\n$this->setPhone_number($d['phone_number']);\n$this->setBp($d['bp']);\n$this->setLocalisation($d['localisation']);\n$this->setVille($d['ville']);\n$this->setUniqueId($d['uniqueId']);\n$this->setCreated_at($d['created_at']);\n$this->setCreated_by($d['created_by']);\n$this->setUpdate_at($d['update_at']);\n$this->setUpdate_by($d['update_by']);\n$this->entity =$data; \n return $this;\n }\n \n } else {\n return $this->update_by;\n }\n \n }",
"public function setIdUpdate($idUpdate){\n $this->idUpdate=$idUpdate;\n }",
"public function _setUpdatedByAdmin($updatedByAdmin) {\n\t\t$this->_updatedByAdmin = $updatedByAdmin;\n\t}",
"public function setBy($by) {\n\t\t$this->attributes['by'] = $by;\n\t\t$this->by = $by;\n\t\treturn $this;\n\t}",
"public function forUpdate($set = TRUE);",
"public function setUpdatedBy(int $updatedBy)\n\t{\n\t\t$this->updatedBy = $updatedBy;\n\n\t\treturn $this;\n\t}",
"protected function setUpdated(){\n if($this->_id > 0){\n $pfDB = DB\\Database::instance()->getDB('PF');\n\n $pfDB->exec(\n [\"UPDATE \" . $this->table . \" SET updated=NOW() WHERE id=:id\"],\n [\n [':id' => $this->_id]\n ]\n );\n }\n }",
"public function _getUpdatedBy() {\n\t\treturn $this->_updatedBy;\n\t}",
"public function getUpdateBy()\n {\n return $this->hasOne(User::className(), ['id' => 'updated_by']);\n }",
"public function getUpdatedBy()\n\t{\n\t\treturn $this->updatedBy;\n\t}",
"public function updating(Siswa $siswa)\n {\n $siswa->updated_by = \\Auth::user()->id;\n }",
"public function setUpdatedBy($updatedBy) {\n\t\t$this->_setUpdatedBy($updatedBy);\n\t\treturn $this;\n\t}",
"public function testUpdatedBy()\n {\n $updatedBy = new User();\n $event = (new Event())->setUpdatedBy($updatedBy);\n $this->assertEquals($updatedBy, $event->getUpdatedBy());\n }",
"protected static function updated_by(): mixed\n\t{\n\t\treturn self::$query->updated_by;\n\t}",
"public function setStateUpdate($update){\n $this->update=$update;\n }",
"private function SetModifiedBy(User $value = null)\n\t\t{\n\t\t\t$this->modifiedby = $value;\n\t\t}",
"public function setUpdate_at($update_at)\n {\n $this->update_at = $update_at;\n \n return $this;\n }",
"public function update() {\n\t\t$date = date(\"Y-m-d H:i:s\");\n\n\t\t$query=mysql_query(\"update \".$this->table.\" set \".$this->column.\" = '\".mysql_escape_string($this->value).\"', modified_by = \".$this->userID.\", modified='\".$date.\"' where id=\".$this->id);\n\n\t}",
"public function beforeUpdate()\n {\n $this->owner->{$this->updatedAtField} = date($this->format);\n }",
"public function _update()\n {\n $this->updatedAt = new \\DateTime();\n }",
"public function setToUpdate()\n\t{\n\t\t$this->todo = 2 ;\n\t}",
"public function addUpdated()\n {\n try {\n $date = new DateTime();\n $this->updated_at = $date->format('Y-m-d H:i:s');\n $this->updated_by = 0;\n } catch (Exception $e) {\n print_r($e);\n }\n }",
"public function update() {\n\t\tif (isset($this->params['updated'])) {\n\t\t\t$this->params['updated'] = null;\n\t\t} // 'updated' is an auto timestamp\n\n\t\t$columns = array();\n\t\tforeach (array_keys($this->params) as $key) {\n\t\t\tarray_push($columns, $key . ' = ?');\n\t\t}\n\t\t$bindings = implode(', ', $columns);\n\t\t$sql = 'UPDATE ' . static::$table . ' SET ' . $bindings . ' WHERE id = ' . $this->get('id') . ' ;';\n\t\t$query = DBH()->prepare($sql);\n\t\t$query->execute(array_values($this->params));\n\t}",
"public function setLastUpdatedBy($userID);",
"public function updator()\n {\n return $this->belongsTo(User::class, 'updated_by');\n }",
"public function updator()\n {\n return $this->belongsTo(User::class, 'updated_by');\n }",
"public function updator()\n {\n return $this->belongsTo(User::class, 'updated_by');\n }",
"public function setUpdated($updated);",
"public function setUpdateStrategy($strategy = UpdateTypes::UPDATE_MUTABLE);",
"public function beforeUpdate()\n {\n $this->update_at=time();\n }",
"public function getUpdatedByColumn()\n {\n return Track::UPDATED_BY;\n }",
"private function updateUpdatedAtField() {\n foreach (static::getFields() as $field_name => $field) {\n if ($field instanceof UpdatedAtField) {\n $this->$field_name = time();\n }\n }\n }",
"function update () {\n\t\t$stm = DB::$pdo->prepare(\"update `generated_object` \n\t\t\t\t\t\t\t\t set {$generator_update_values} \n\t\t\t\t\t\t\t\t where `id`=:id\");\n\t\t// generator bind hook\n\t\t$stm->bindParam(':id', $this->id);\n\t\t$stm->execute();\n\t}",
"public function setModifiedBy($u_modifiedby) {\n\n $this->u_modifiedby = $u_modifiedby;\n\n }",
"public function getUpdatedBy(): string\n {\n return $this->updated_by;\n }",
"public function setUpdater(User $updater);",
"public function updating(Model $model)\n {\n if(Schema::hasColumn($model->getTable(), \"updated_by\")) {\n $model->updated_by = Auth::user()->id;\n }\n if(Schema::hasColumn($model->getTable(), \"updated_at\")) {\n $model->updated_at = date('Y-m-d h:i:s');\n }\n }",
"public function updated(Structure $structure)\n {\n\t\t\t$structure->updated_by = Auth::id();\n }",
"public function setModifiedBy(User $modifiedBy)\n\t{\n\t\t$this->modifiedBy=$modifiedBy; \n\t\t$this->keyModified['modified_by'] = 1; \n\n\t}",
"public function userUpdate()\n {\n return $this->belongsTo('App\\User', 'updated_by_id');\n }",
"public function update()\n {\n if ( ! $this->bean->getId()) {\n $this->bean->user = R::dispense('user')->current();\n }\n $this->bean->year = date('Y', strtotime($this->bean->invoicedate));\n $this->bean->m = date('m', strtotime($this->bean->invoicedate));\n $this->bean->d = date('d', strtotime($this->bean->invoicedate));\n $this->bean->yearname = $this->bean->year.$this->bean->name;\n parent::update();\n }",
"public function updated_by() {\n return $this->belongsTo(User::class, 'updated_by_id');\n }",
"public function setUpdated($date)\n {\n $this->updated = $date;\n }",
"protected function _update()\n {\n \n }",
"protected function _update()\n {\n \n }",
"private function update()\n {\n $queryString = 'UPDATE ' . $this->table . ' SET ';\n foreach ($this->data as $column => $value) {\n if ($column != self::ID) {\n $queryString .= $column . ' =:' . $column . ',';\n }\n }\n $queryString .= ' updated_at = sysdate() WHERE 1 = 1 AND ' . self::ID . ' =:' . self::ID;\n $this->query = $this->pdo->prepare($queryString);\n }",
"public function updatedBy()\n {\n return $this->belongsTo(User::class, 'updated_by')->withDefault();\n }",
"public function setUpdateParametersFromRequest($request)\n {\n if (!isset($request->from))\n {\n $this->from = '';\n }\n else\n {\n $this->from = $request->from;\n }\n\n if (!isset($request->until))\n {\n $this->until = '';\n }\n else\n {\n $this->until = $request->until;\n }\n\n if (!isset($request->set))\n {\n $this->set = '';\n }\n else\n {\n $this->set = $request->set;\n }\n\n if (!isset($request->metadataPrefix))\n {\n $this->metadataPrefix = 'oai_dc';\n }\n else\n {\n $this->metadataPrefix = $request->metadataPrefix;\n }\n\n // If cursor not supplied, define as 0\n if (!isset($request->cursor))\n {\n $this->cursor = 0;\n }\n else\n {\n $this->cursor = $request->cursor;\n }\n }",
"public function setUpdatedByAdmin($updatedByAdmin) {\n\t\t$this->_setUpdatedByAdmin($updatedByAdmin);\n\t\treturn $this;\n\t}",
"public function update(array $input, $which) {\n\t\t$input ['adate'] = date ( 'Y-m-d G:i:s' );\n\t\t$input ['changer'] = $input ['changer'] ?: current_user ();\n\t\tparent::update ( $input, $which );\n\t}",
"public function setUpdatedBy(UserAccount $user)\n {\n $this->updatedBy = $user;\n return $this;\n }",
"public function getLastUpdatedBy();",
"public function run()\n {\n DB::table('properties')->update([\n 'created_by' => 1\n ]);\n }",
"public function update(array $update);",
"public function setCreatedby($input){\n\n $this->m_Createdby=$input;\n }",
"protected function _update()\n\t{\n\t}",
"public function updater()\n {\n return $this->belongsTo(User::class, 'updated_by');\n }",
"public function getUpdatedBy()\n {\n $this->loadManyToOne('updatedBy');\n return $this->updatedBy;\n }",
"public function updatedBy()\n {\n return $this->belongsTo('App\\User', 'updated_by');\n }",
"protected function update() {}",
"public function update($raporAdminSetting);",
"public function lastUpdateBy()\n {\n return $this->belongsTo('App\\Components\\User\\Models\\User', 'updated_by');\n }",
"public function update($tblUpdate);",
"protected function setUpdateArray() {\n $column_names = getColumnNames($this->table_name);\n foreach ($column_names as $column_name) {\n if (isset($_POST[$column_name])) {\n $this->update[$column_name] = Mysql::SQLValue($_POST[$column_name]);\n } else if (isset($_GET[$column_name])) {\n $this->update[$column_name] = Mysql::SQLValue($_GET[$column_name]);\n }\n }\n }",
"public function getUpdatedBy()\n {\n return $this->hasOne(User::className(), ['id' => 'updated_by']);\n }",
"public function getUpdatedBy()\n {\n return $this->hasOne(User::className(), ['id' => 'updated_by']);\n }",
"public function getUpdatedBy()\n {\n return $this->hasOne(User::className(), ['id' => 'updated_by']);\n }",
"public function setUpdated($date) \n\t{\n\t\t$this->updated = $this->parseDate($date);\n\t}",
"function setAllowEntityUpdate($update) {\n $this->_allowEntityUpdate = $update;\n }",
"public function update()\n\t{\n\n\t}",
"public function setUpdateOn($data)\n {\n \n if ($data == '0000-00-00 00:00:00') {\n\n $data = null;\n }\n \n if ($data === 'CURRENT_TIMESTAMP') {\n \t$data = \\Zend_Date::now()->setTimezone('UTC');\n }\n\n if ($data instanceof \\Zend_Date) {\n\n $data = new \\DateTime($data->toString('yyyy-MM-dd HH:mm:ss'), new \\DateTimeZone($data->getTimezone()));\n\n } elseif (!is_null($data) && !$data instanceof \\DateTime) {\n\n $data = new \\DateTime($data, new \\DateTimeZone('UTC'));\n }\n\n if ($data instanceof \\DateTime && $data->getTimezone()->getName() != 'UTC') {\n\n $data->setTimezone(new \\DateTimeZone('UTC'));\n }\n\n if ($this->_logChanges === true && $this->_updateOn != $data) {\n\n $this->_logChange('updateOn');\n }\n\n $this->_updateOn = $data;\n return $this;\n }",
"public function setUpdateAt($update_at)\n {\n $this->update_at = $update_at;\n\n return $this;\n }",
"public function setUpdateAt($update_at)\n {\n $this->update_at = $update_at;\n\n return $this;\n }",
"protected function _update()\n\t{\n\t\t$this->date_modified = \\Core\\Date::getInstance(null,\\Core\\Date::SQL_FULL, true)->toString();\n\t\t$this->last_online = $this->date_modified;\n\t}",
"public function markLastUpdate()\n {\n if (!$this->updatedAtOveridden) {\n $this->updatedAt = new \\DateTime();\n }\n }",
"public function setAuthorUpdatedDate($userUpdatedDate);",
"public function SQL_UPDATE() {\r\n\t}",
"public function update()\r\n {\r\n \r\n }",
"protected function _update()\n {\r\n $this->date_updated = new Zend_Db_Expr(\"NOW()\");\n parent::_update();\n }",
"public function _setCreatedBy($createdBy) {\n\t\t$this->_createdBy = $createdBy;\n\t}",
"public function getUpdateStrategy();",
"public function update() {\r\n\r\n\t}",
"public function update(){\n\t\tparent::update(\"UPDATE Users set privacy_setting = \" . $this->privacy_setting . \" where id = \" . $this->id);\n\t}",
"public function fromArray($update)\n {\n if (is_array($update)) {\n foreach ($update as $key => $value) {\n $this->{$key} = $value;\n }\n }\n }",
"public function set_dates(){\n // if the id is not set, this means its anew item being created\n if(property_exists($this, 'created_on') && empty($this->id)){\n $this->created_on = date('Y-m-d H:i:s');\n }\n\n // if id is set, its an update\n if(property_exists($this, 'last_updated_on') && isset($this->id)){\n $this->last_updated_on = date('Y-m-d H:i:s');\n }\n }",
"public function _setUpdatedOn($updatedOn) {\n\t\t$this->_updatedOn = $updatedOn;\n\t}",
"public function update() {\r\n }",
"public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",lastname=\\\"$this->lastname\\\",username=\\\"$this->username\\\",email=\\\"$this->email\\\",kind=\\\"$this->kind\\\",status=\\\"$this->status\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}",
"public function __set($key, $value)\n {\n $valid_update = array(\n 'name' => 'name',\n 'content' => 'content',\n 'author' => 'author',\n 'date_modified' => 'date_modified',\n 'date_created' => 'date_created',\n 'draft' => 'draft'\n );\n \n if ($read_only)\n {\n if ($key != 'id')\n {\n if ($key == 'author')\n {\n if (is_string($value) and strlen($value) == 32)\n {\n $value = new User($value);\n }\n \n if (is_object($value) and isset($value->id))\n {\n $this->user = $value;\n }\n else\n {\n exLog(\"Pages->__set(): Could not update author. Neither user ID nor user Object given as value.\");\n }\n }\n else if ($key == 'draft')\n {\n $value = ($value); // Force BOOL\n $this->draft = ($value);\n }\n else\n {\n $this->$key = $value;\n }\n }\n else\n {\n exLog('Page->__set(): ID is not editable');\n }\n }\n else\n {\n if (in_array($key, $valid_update))\n {\n if ($key == 'author')\n {\n if (is_string($value) and strlen($value) == 32)\n {\n $value = new User($value);\n }\n \n if (is_object($value) and isset($value->id))\n {\n query(SharedPage::$statements['update_with_id'], 'author', $value->id, $this->id);\n $this->user = $value;\n }\n else\n {\n exLog(\"Pages->__set(): Could not update author. Neither user ID nor user Object given as value.\");\n }\n }\n else if ($key == 'draft')\n {\n $value = ($value); // Force BOOL\n query(SharedPage::$statements['update_with_id'], 'draft', '1', $this->id);\n $this->draft = ($value);\n }\n else\n {\n array_flip($valid_update);\n query(SharedPage::$statements['update_with_id'], $valid_update[$key], $value, $this->id);\n $this->$key = $value;\n }\n }\n else\n {\n exLog(\"Pages->__set(): Cannot update $key in mysql, only local copy modified.\");\n $this->$key = $value;\n }\n }\n }",
"public function updatedAt();",
"public function update()\r\n {\r\n //\r\n }",
"public function update()\n {\n }",
"public function update()\n {\n }",
"public function update()\n {\n }",
"public function update()\n {\n }",
"public function update()\n {\n }"
] | [
"0.71269834",
"0.67451936",
"0.6626519",
"0.65955627",
"0.6535593",
"0.6336943",
"0.618899",
"0.61513186",
"0.60835236",
"0.6080476",
"0.60582566",
"0.60320497",
"0.6027964",
"0.60158443",
"0.6012018",
"0.5960064",
"0.58396405",
"0.5832077",
"0.5820128",
"0.5818278",
"0.578887",
"0.578287",
"0.57775515",
"0.57674795",
"0.5732216",
"0.57061297",
"0.56848013",
"0.5677074",
"0.5667012",
"0.5667012",
"0.5667012",
"0.5654596",
"0.5629011",
"0.5617374",
"0.5605373",
"0.5582498",
"0.5559128",
"0.5539138",
"0.5534081",
"0.55320275",
"0.5518655",
"0.5488549",
"0.5486406",
"0.5483698",
"0.5466183",
"0.5457828",
"0.54441464",
"0.5438161",
"0.5438161",
"0.5436107",
"0.54320896",
"0.54246205",
"0.54195535",
"0.5399406",
"0.5390896",
"0.53899443",
"0.53770524",
"0.53737324",
"0.5361208",
"0.5355261",
"0.53513116",
"0.5342482",
"0.5334853",
"0.5334371",
"0.53282857",
"0.5304274",
"0.53024256",
"0.53003275",
"0.52797395",
"0.52797395",
"0.52797395",
"0.5279474",
"0.52735066",
"0.52480614",
"0.52371114",
"0.52334714",
"0.52334714",
"0.5232275",
"0.52284473",
"0.52283925",
"0.5214802",
"0.52082187",
"0.520674",
"0.52041733",
"0.51926064",
"0.5190666",
"0.51903963",
"0.5187025",
"0.51783",
"0.51782143",
"0.5177412",
"0.5176667",
"0.5173748",
"0.51709574",
"0.5166768",
"0.5164545",
"0.5164545",
"0.5164545",
"0.5164545",
"0.5164545"
] | 0.7710697 | 0 |
used for paging products | public function countAll(){
$query = "SELECT id FROM " . $this->table_name . "";
$stmt = $this->conn->prepare( $query );
$stmt->execute();
$num = $stmt->rowCount();
return $num;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function do_paging()\n {\n }",
"function getFeatureProducts(){\n \n $itemonpage = !empty($_GET['per_page'])?$_GET['per_page']:3;\n $page = !empty($_GET['page'])?$_GET['page']:1;\n $offset= ($page-1)*$itemonpage;\n\n $numberPage = ceil(30/$itemonpage);\n \n $sql = self::$connection->prepare(\"SELECT * FROM products limit \".$itemonpage.\" offset \".$offset);\n \n $sql->execute();//return an object\n $items = array();\n $items = $sql->get_result()->fetch_all(MYSQLI_ASSOC);\n include \"link.php\";\n return $items; //return an array\n }",
"public function pageAction()\n {\n $page = $this->getRequest()->getParam('page', 1);\n $count = $this->getRequest()->getParam('count', 20);\n $collectionJson = Mage::helper('neklo_productposition/product')->getCollectionJson($page, $count);\n $this->getResponse()->setBody($collectionJson);\n $this->getResponse()->clearHeaders()->setHeader('Content-type', 'application/json', true);\n }",
"function dustrial_loop_shop_per_page( $products ) {\n if( function_exists( 'dustrial_framework_init' ) ) {\n $shop_posts_per_page = dustrial_get_option('shop_posts_per_page');\n if (!empty($shop_posts_per_page)) {\n $shop_posts_per_page = $shop_posts_per_page;\n } else {\n $shop_posts_per_page = '8';\n }\n } else {\n $shop_posts_per_page = '8';\n }\n $products = $shop_posts_per_page;\n return $products;\n}",
"public function getPageItems()\n {\n }",
"protected function _getProductCollection(){\n \n\n $cpBlock = $this->getLayout()->getBlockSingleton('Mage_Catalog_Block_Product_List_Toolbar');\n//echo //getCurrentMode();\n\nif( $_REQUEST['mode']!='grid' ) {\n\n \n $this->_itemPerPage = Mage::getStoreConfig('catalog/frontend/list_per_page_values');\n \n \n}\nelse {\n $this->_itemPerPage = Mage::getStoreConfig('catalog/frontend/grid_per_page');\n} \n\nif($_REQUEST['limit']!='')\n{\n \n $this->_itemPerPage = $_REQUEST['limit'];\n \n}\nif( $_REQUEST['mode']=='grid' && $_REQUEST['limit']!='') {\n \n\n if(!in_array($this->_itemPerPage,explode(\",\",Mage::getStoreConfig('catalog/frontend/grid_per_page_values'))))\n {\n \n $new_size = explode(\",\",Mage::getStoreConfig('catalog/frontend/grid_per_page_values'));\n $sizes = $new_size[0];\n $this->_itemPerPage = $sizes; \n }\n\n}else\n{\n if(!in_array($this->_itemPerPage,explode(\",\",Mage::getStoreConfig('catalog/frontend/list_per_page_values'))))\n {\n \n $new_size = explode(\",\",Mage::getStoreConfig('catalog/frontend/list_per_page_values'));\n $sizes = $new_size[0];\n $this->_itemPerPage = $cpBlock->getLimit(); \n }\n\n}\n\nif( $_REQUEST['mode']!='grid' && $_REQUEST['limit']=='') {\n \n \n $this->_itemPerPage = $cpBlock->getLimit(); \n \n\n}\n\n$page_id = $this->getRequest()->getParam('id');\n\n$result = Mage::helper('percentagepricing')->getcate_pages($page_id);\n\n\n\n$this->_productCollection = Mage::getModel('catalog/product')->getCollection();\n$this->_productCollection->addAttributeToSelect('*');\nif(count($result) > 0)\n{\nforeach($result as $key => $val)\n{\n if($key == 'category_ids')\n {\n $cate = $val;\n }else\n {\n $val = explode(',',$val);\n $this->_productCollection->addAttributeToFilter($key, array('in' => $val));\n }\n // $this->_productCollection->addFieldToFilter($key,$val);\n \n}\n//$newcates = '';\n//\n//if(count($cate) > 0)\n//{\n// $newcates = $this->getCategories().\",\".$cate; \n// \n//}else\n//{\n// $newcates = $this->getCategories();\n//}\n\nif(count($cate) > 0)\n$this->_productCollection->addCategoriesFilter($cate);\n\n}\n$this->_productCollection->addAttributeToSort($_REQUEST['order'],$_REQUEST['dir']);\n//echo $this->_productCollection->getSelect()->__toString();\n$page = $this->getRequest()->getParam('p');\n if($page) $this->_curPage = $page;\n \n $this->_productCollection->setCurPage($this->_curPage);\n $this->_productCollection->setPageSize($this->_itemPerPage);\n//$this->_productCollection->setPageSize($_REQUEST['limit']);\n//echo $this->_productCollection->getSelect()->__toString();\nreturn $this->_productCollection;\n\n}",
"abstract public function preparePagination();",
"public function load_more_promoted_products()\n {\n post_method();\n $offset = clean_number($this->input->post('offset', true));\n $promoted_products = get_promoted_products($offset, $this->promoted_products_limit);\n\n $data_json = array(\n 'result' => 0,\n 'html_content' => \"\",\n 'offset' => $offset + $this->promoted_products_limit,\n 'hide_button' => 0,\n );\n $html_content = \"\";\n if (!empty($promoted_products)) {\n foreach ($promoted_products as $product) {\n $vars = array('product' => $product, 'promoted_badge' => false);\n $html_content .= '<div class=\"col-6 col-sm-6 col-md-4 col-lg-3 col-product\">' . $this->load->view(\"product/_product_item\", $vars, true) . '</div>';\n }\n $data_json['result'] = 1;\n $data_json['html_content'] = $html_content;\n if ($offset + $this->promoted_products_limit >= get_promoted_products_count()) {\n $data_json['hide_button'] = 1;\n }\n }\n echo json_encode($data_json);\n }",
"public function can_return_a_collection_of_paginated_products()\n {\n $product1 = $this->create('Product');\n $product2 = $this->create('Product');\n $product3 = $this->create('Product');\n\n $response = $this->actingAs($this->create('User', [], false), 'api')->json('GET', '/api/products');\n\n $response->assertStatus(200)\n ->assertJsonStructure([\n 'data' => [\n '*' => ['id','name','slug','price','created_at']\n ],\n\n 'links' => ['first', 'last', 'prev', 'next'],\n 'meta' => [\n 'current_page', 'last_page', 'from', 'to', 'path', 'per_page', 'total'\n ]\n ]);\n }",
"function pagination(){}",
"function productpagelistwithstar(&$page,&$pagecount,$pagesize=2,$catid=NULL,$ctrl=PRODUCT_CTRL_SHOW,$star=NULL,$hint=NULL,$minprice=NULL,$maxprice=NULL,$exid=NULL,$getcatid=TRUE,$type=NULL){\n\tglobal $sql,$ESNC_ROWCOUNT,$ESNC_ROWSTART,$ESNC_ROWEND;\n\tif(!is_int($ctrl)) return FALSE;\n\t$wh = \" WHERE `a`.`ctrl` & {$ctrl} = {$ctrl}\";\n\tif(is_int($exid)){ $wh .= \" AND `a`.`id` <> {$exid}\";}\n\tif(is_int($type)){ $wh .= \" AND `a`.`type` = {$type}\";}\n\t$tbcat='';\n\tif(is_int($catid)){//filter by cat\n\t\t$tbcat = \" INNER JOIN `\".DB_TABLE_PREFIX.\"catproductproduct` as `b` ON `a`.`id` = `b`.`productid` AND `b`.`catproductid` = {$catid} INNER JOIN `\".DB_TABLE_PREFIX.\"catproduct` as `c` ON `b`.`catproductid` = `c`.`id`\";\n\t}else {$tbcat = \" INNER JOIN `\".DB_TABLE_PREFIX.\"catproductproduct` as `b` ON `a`.`id` = `b`.`productid` INNER JOIN `\".DB_TABLE_PREFIX.\"catproduct` as `c` ON `b`.`catproductid` = `c`.`id`\";}\n\tif($star != NULL){\n\t\t$wh .= \" AND `a`.`manufacturer`={$star}\";\n\t}\n\tif($hint !== NULL){\n\t\t$hint = mysql_escape_string(str_replace(array('*','?'),array('%','_'),$hint));\n\t\tif(strpos($hint,'%') === FALSE && strpos('_',$hint) === FALSE) $hint='%'.$hint.'%';\n\t\t$wh .= \" AND (`a`.`name` LIKE '{$hint}' OR `a`.`keyword` LIKE '{$hint}' OR `a`.`code` LIKE '{$hint}' OR `a`.`summary` LIKE '{$hint}')\";\n\t}\n\t$lm='';\n\tif(is_int($page) && is_int($pagesize) && $pagesize >= 1){//must be number\n\t\t$ESNC_ROWSTART=$pagesize * ($page -1);\n\t\t$lm = ' LIMIT '.$ESNC_ROWSTART.','.$pagesize;\n\t}\n\t$sql = \"SELECT SQL_CALC_FOUND_ROWS DISTINCT a.`id`,a.`name`,a.`code`,a.`unit`,a.`include`,a.`manufacturer`,a.`saleprice`,`a`.`price`,`a`.`class`,a.`ctrl`,a.`view`,`a`.`urlrewrite`, c.`name` catname,c.`id` catnameid,`c`.`urlrewrite` caturlrewrite, a.`summary`, a.`detail`,a.`keyword`,a.`img1`,a.`alt1`,a.`img2`,a.`alt2`,a.`warranty`,a.`type`,a.`country` ,`a`.`model`\".($getcatid ? ',`b`.`catproductid` as `catid`':'').\" FROM `\".DB_TABLE_PREFIX.\"product` as `a` {$tbcat} {$wh} ORDER BY `a`.`view` ASC,`a`.`id` DESC {$lm}\";\n\t//echo $sql;\n\t$rs = mysql_query($sql);\n\t$sql = 'SELECT FOUND_ROWS()';\n\t$rs1 = mysql_query($sql);\n\t$row = mysql_fetch_row($rs1);\n\tmysql_free_result($rs1);\n\t$ESNC_ROWCOUNT=(int)$row[0];\n\t$ESNC_ROWEND = (++$ESNC_ROWSTART) + $pagesize;\n\tif($ESNC_ROWEND > $ESNC_ROWCOUNT) $ESNC_ROWEND = $ESNC_ROWCOUNT;\n\t$pagecount = ceil($ESNC_ROWCOUNT/$pagesize);\n\treturn $rs;\n}",
"function bt_new_loop_shop_per_page( $cols ) {\n // $cols contains the current number of products per page based on the value stored on Options -> Reading\n // Return the number of products you wanna show per page.\n $cols = 12;\n return $cols;\n}",
"protected function buildPagination() {}",
"protected function buildPagination() {}",
"public function product($url='page',$page=0){\n\t\t$data \t\t\t\t\t\t= $this->data;\n\t\t$data['menu'] \t\t\t\t= 'product';\n\t\t$data['category'] \t\t\t= CategoryBlogModel::desc()->get();\n\t\t$data['tag'] \t\t\t\t= TagModel::desc()->get();\n\t\t$data['popular_news'] \t\t= BlogModel::notDraft()->take(4)->orderBy('view','desc')->get();\n\t\t$data['events']\t\t\t\t= EventPromoModel::notDraft()->take(4)->desc()->get();\n\t\tif($url==\"detail\" && $page!=0){\n\n\t\t\t$product \t\t\t\t= ProductModel::notDraft()->find($page);\n\n\t\t\tif(!$product){\n\t\t\t\tredirect('error');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tProductModel::notDraft()->whereId($page)->increment('view');\n\t\t\t$data['related'] \t\t= ProductModel::notDraft()->where('id_category',$product->id_category)\n\t\t\t\t\t\t\t\t\t\t->where('id','!=',$product->id)->take(3)->desc()->get();\n\t\t\t$data['product'] \t\t= $product;\n\t\t\techo $this->blade->nggambar('website.product.content',$data);\n\t\t}\n\t\telse {\n\t\t\tif(!is_numeric($page)){\n\t\t\t\t$page \t= 0;\n\t\t\t}\n\n\t\t\t$name \t\t\t\t\t\t= (null != $this->input->get('q')) ? $this->input->get('q') : '';\n\n\n\t\t\t$by \t\t\t\t\t\t= $this->input->get('by');\n\n\t\t\t$by_data \t\t\t\t\t= ['newest','oldest','priceasc','pricedesc'];\n\t\t\tif(!in_array($by, $by_data)){\n\t\t\t\t$by \t\t\t\t\t= 'newest';\n\t\t\t}\n\n\t\t\tif($by==\"newest\" || $by==\"pricedesc\"){\n\t\t\t\t$sort \t\t\t\t\t= 'desc';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$sort \t\t\t\t\t= 'asc';\n\t\t\t}\n\n\t\t\t// atribute set\n\t\t\t$data['attr_by'] \t\t\t= $by;\n\t\t\t$data['attr_name'] \t\t\t= $name;\n\t\t\t\n\t\t\t$paginate\t\t\t\t\t= new Aksa_pagination;\n\t\t\t$data['page']\t\t\t\t= $page;\n\n\t\t\tif($by==\"newest\" || $by==\"oldest\"){\n\t\t\t\t$by \t\t\t\t\t= 'created_at';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$by \t\t\t\t\t= 'price';\n\t\t\t}\n\n\t\t\t$data['total']\t\t\t\t= ProductModel::notDraft()->where('name', 'LIKE', '%'.$name.'%');\n\t\t\t$data['product']\t\t\t= ProductModel::notDraft()->where('name', 'LIKE', '%'.$name.'%');\n\n\t\t\t$data['total'] \t\t\t\t= $data['total']->get();\n\t\t\t$data['product'] \t\t\t= $data['product']->take(6)->skip($page*6)->orderBy($by,$sort)->get();\n\n\t\t\t$data['pagination'] \t\t= $paginate->paginate(base_url('main/product/page/'),5,6,count($data['total']),$page);\n\t\t\techo $this->blade->nggambar('website.product.index',$data);\n\t\t\treturn;\n\t\t}\n\t}",
"function pagination_view_product()\n\t\t{\n\n\t\t $this->load->library(\"pagination\");\n\t\t $config = array();\n\t\t $config[\"base_url\"] = \"#\";\n\t\t $config[\"total_rows\"] = $this->crud_model->count_all_view_product();\n\t\t $config[\"per_page\"] = 10;\n\t\t $config[\"uri_segment\"] = 3;\n\t\t $config[\"use_page_numbers\"] = TRUE;\n\t\t $config[\"full_tag_open\"] = '<ul class=\"nav pagination\">';\n\t\t $config[\"full_tag_close\"] = '</ul>';\n\t\t $config[\"first_tag_open\"] = '<li class=\"page-item\">';\n\t\t $config[\"first_tag_close\"] = '</li>';\n\t\t $config[\"last_tag_open\"] = '<li class=\"page-item\">';\n\t\t $config[\"last_tag_close\"] = '</li>';\n\t\t $config['next_link'] = '<li class=\"page-item active\"><i class=\"btn btn-info\">>></i>';\n\t\t $config[\"next_tag_open\"] = '<li class=\"page-item\">';\n\t\t $config[\"next_tag_close\"] = '</li>';\n\t\t $config[\"prev_link\"] = '<li class=\"page-item active\"><i class=\"btn btn-info\"><<</i>';\n\t\t $config[\"prev_tag_open\"] = \"<li class='page-item'>\";\n\t\t $config[\"prev_tag_close\"] = \"</li>\";\n\t\t $config[\"cur_tag_open\"] = \"<li class='page-item active'><a href='#' class='page-link'>\";\n\t\t $config[\"cur_tag_close\"] = \"</a></li>\";\n\t\t $config[\"num_tag_open\"] = \"<li class='page-item'>\";\n\t\t $config[\"num_tag_close\"] = \"</li>\";\n\t\t $config[\"num_links\"] = 1;\n\t\t $this->pagination->initialize($config);\n\t\t $page = $this->uri->segment(3);\n\t\t $start = ($page - 1) * $config[\"per_page\"];\n\n\t\t $output = array(\n\t\t 'pagination_link' => $this->pagination->create_links(),\n\t\t 'country_table' => $this->crud_model->fetch_details_view_product($config[\"per_page\"], $start)\n\t\t );\n\t\t echo json_encode($output);\n\t\t}",
"public function testGETProductsCollectionPaginated()\n {\n $this->assertEquals(\n 4,\n $this->crawler->filter('span:contains(\"Title\")')->count()\n );\n //in the last page have 2 product\n $crawler = $this->client->request('GET', '/?page=8');\n $this->assertEquals(\n 2,\n $crawler->filter('span:contains(\"Title\")')->count()\n );\n }",
"function MyMod_Paging_Page_No_2_Item_Nos()\n {\n if ($this->NumberOfItems>$this->NItemsPerPage)\n {\n if ($this->MyMod_Paging_Active_ID && $this->MyMod_Paging_Active_ID>0)\n {\n $this->FirstItemNo=0;\n foreach ($items as $id => $item)\n {\n if ($item[ \"ID\" ]==$this->MyMod_Paging_Active_ID)\n {\n $this->FirstItemNo=$id;\n $this->OffSet=$this->NumberOfItems;\n }\n }\n }\n else\n {\n if ($this->MyMod_Paging_No==0)\n {\n $this->FirstItemNo=0;\n $this->OffSet=$this->NumberOfItems;\n }\n elseif\n (\n preg_match('/\\d+/',$this->MyMod_Paging_No)\n &&\n $this->MyMod_Paging_No>0\n )\n {\n $res=$this->NItemsPerPage % $this->NumberOfItems;\n\n $this->FirstItemNo=($this->MyMod_Paging_No-1)*$this->NItemsPerPage;\n $this->OffSet=$res;\n }\n else\n {\n $this->FirstItemNo=0;\n $this->OffSet=0;\n }\n }\n }\n else\n {\n $this->FirstItemNo=0;\n $this->OffSet=$this->NumberOfItems;\n }\n\n $this->LastItemNo=$this->FirstItemNo+$this->OffSet;\n }",
"function pagingSubAll($CategoryID, $SubCatLimitNext, $ProductLimitNext, $SubCatLimitPrevious, $ProductLimitPrevious, $pageID)\n{\n global $db;\n \n $numberofProductsinCategory = $db->query(\"SELECT p1.ProductID, p1.SubCategoryID, s1.SubCategoryID, s1.CategoryID FROM Products as p1 JOIN SubCategories as s1 WHERE p1.SubCategoryID = s1.SubCategoryID AND s1.CategoryID='$CategoryID'\")->num_rows;\n \n \n \n echo 'Nombre d\\'items: <strong>';\n echo $numberofProductsinCategory;\n echo '</strong><br /><br />';\n \n \n \n if ($pageID == 1) {\n \n \n echo \"<a href='#' onclick='SelectAllSubNextPage($CategoryID,$SubCatLimitNext,$ProductLimitNext,$pageID)'>Suivant >></a>\";\n echo \" \";\n \n \n }\n \n elseif ($pageID == 0) {\n \n \n \n echo \"<a href='#' onclick='SelectAllSubNextPage($CategoryID,$SubCatLimitPrevious,$ProductLimitPrevious,$pageID)'><< Précédent</a>\";\n \n \n }\n \n else {\n \n \n If ($SubCatLimitPrevious == 0 && $ProductLimitPrevious == 0) {\n echo \"<a href='#' onclick='SelectAllSubFirstPage($CategoryID)'><< Précédent</a>\";\n } else {\n echo \"<a href='#' onclick='SelectAllSubNextPage($CategoryID,$SubCatLimitPrevious,$ProductLimitPrevious,$pageID)'><< Précédent</a>\";\n }\n echo \" \";\n echo \"<a href='#' onclick='SelectAllSubNextPage($CategoryID,$SubCatLimitNext,$ProductLimitNext,$pageID)'>Suivant >></a>\";\n echo \" \";\n \n }\n \n \n}",
"function getPaginator()\n{\n/// getPaginator Function Code Starts ///\n $per_page = 6;\n global $db;\n $aWhere = array();\n $aPath = '';\n/// Manufacturers Code Starts ///\n if (isset($_REQUEST['man']) && is_array($_REQUEST['man'])) {\n foreach ($_REQUEST['man'] as $sKey => $sVal) {\n if ((int) $sVal != 0) {\n $aWhere[] = 'manufacturer_id=' . (int) $sVal;\n $aPath .= 'man[]=' . (int) $sVal . '&';\n }\n }\n }\n/// Manufacturers Code Ends ///\n /// Products Categories Code Starts ///\n if (isset($_REQUEST['p_cat']) && is_array($_REQUEST['p_cat'])) {\n foreach ($_REQUEST['p_cat'] as $sKey => $sVal) {\n if ((int) $sVal != 0) {\n $aWhere[] = 'p_cat_id=' . (int) $sVal;\n $aPath .= 'p_cat[]=' . (int) $sVal . '&';\n }\n }\n }\n/// Products Categories Code Ends ///\n /// Categories Code Starts ///\n if (isset($_REQUEST['cat']) && is_array($_REQUEST['cat'])) {\n foreach ($_REQUEST['cat'] as $sKey => $sVal) {\n if ((int) $sVal != 0) {\n $aWhere[] = 'cat_id=' . (int) $sVal;\n $aPath .= 'cat[]=' . (int) $sVal . '&';\n }\n }\n }\n/// Categories Code Ends ///\n $sWhere = (count($aWhere) > 0 ? ' WHERE ' . implode(' or ', $aWhere) : '');\n $query = \"select * from products \" . $sWhere;\n $result = mysqli_query($db, $query);\n $total_records = mysqli_num_rows($result);\n $total_pages = ceil($total_records / $per_page);\n echo \"<li><a href='shop.php?page=1\";\n if (!empty($aPath)) {\n echo \"&\" . $aPath;\n }\n echo \"' >\" . 'First Page' . \"</a></li>\";\n for ($i = 1; $i <= $total_pages; $i++) {\n echo \"<li><a href='shop.php?page=\" . $i . (!empty($aPath) ? '&' . $aPath : '') . \"' >\" . $i . \"</a></li>\";\n }\n ;\n echo \"<li><a href='shop.php?page=$total_pages\";\n if (!empty($aPath)) {\n echo \"&\" . $aPath;\n }\n echo \"' >\" . 'Last Page' . \"</a></li>\";\n/// getPaginator Function Code Ends ///\n}",
"private function _generateProductsData(){\n \n $products = $this->context->cart->getProducts();\n $pagseguro_items = array();\n \n $cont = 1;\n \n foreach ($products as $product) {\n \n $pagSeguro_item = new PagSeguroItem();\n $pagSeguro_item->setId($cont++);\n $pagSeguro_item->setDescription(Tools::truncate($product['name'], 255));\n $pagSeguro_item->setQuantity($product['quantity']);\n $pagSeguro_item->setAmount($product['price_wt']);\n $pagSeguro_item->setWeight($product['weight'] * 1000); // defines weight in gramas\n \n if ($product['additional_shipping_cost'] > 0)\n $pagSeguro_item->setShippingCost($product['additional_shipping_cost']);\n \n array_push($pagseguro_items, $pagSeguro_item);\n }\n \n return $pagseguro_items;\n }",
"function getPaginator(){\n\n/// getPaginator Function Code Starts ///\n\n$per_page = 6;\n\nglobal $db;\n\n$aWhere = array();\n\n$aPath = '';\n\n/// Manufacturers Code Starts ///\n\nif(isset($_REQUEST['man'])&&is_array($_REQUEST['man'])){\n\nforeach($_REQUEST['man'] as $sKey=>$sVal){\n\nif((int)$sVal!=0){\n\n$aWhere[] = 'manufacturer_id='.(int)$sVal;\n\n$aPath .= 'man[]='.(int)$sVal.'&';\n\n}\n\n}\n\n}\n\n/// Manufacturers Code Ends ///\n\n/// Products Categories Code Starts ///\n\nif(isset($_REQUEST['p_cat'])&&is_array($_REQUEST['p_cat'])){\n\nforeach($_REQUEST['p_cat'] as $sKey=>$sVal){\n\nif((int)$sVal!=0){\n\n$aWhere[] = 'p_cat_id='.(int)$sVal;\n\n$aPath .= 'p_cat[]='.(int)$sVal.'&';\n\n}\n\n}\n\n}\n\n/// Products Categories Code Ends ///\n\n/// Categories Code Starts ///\n\nif(isset($_REQUEST['cat'])&&is_array($_REQUEST['cat'])){\n\nforeach($_REQUEST['cat'] as $sKey=>$sVal){\n\nif((int)$sVal!=0){\n\n$aWhere[] = 'cat_id='.(int)$sVal;\n\n$aPath .= 'cat[]='.(int)$sVal.'&';\n\n}\n\n}\n\n}\n\n/// Categories Code Ends ///\n\n$sWhere = (count($aWhere)>0?' WHERE '.implode(' or ',$aWhere):'');\n\n$query = \"select * from products \".$sWhere;\n\n$result = mysqli_query($db,$query);\n\n$total_records = mysqli_num_rows($result);\n\n$total_pages = ceil($total_records / $per_page);\n\necho \"<li><a href='shop.php?page=1\";\n\nif(!empty($aPath)){ echo \"&\".$aPath; }\n\necho \"' >\".'First Page'.\"</a></li>\";\n\nfor ($i=1; $i<=$total_pages; $i++){\n\necho \"<li><a href='shop.php?page=\".$i.(!empty($aPath)?'&'.$aPath:'').\"' >\".$i.\"</a></li>\";\n\n};\n\necho \"<li><a href='shop.php?page=$total_pages\";\n\nif(!empty($aPath)){ echo \"&\".$aPath; }\n\necho \"' >\".'Last Page'.\"</a></li>\";\n\n/// getPaginator Function Code Ends ///\n\n}",
"public function index()\n {\n return Product::latest()->paginate(15);\n }",
"function new_loop_shop_per_page( $post_per_page ) {\n $post_per_page = 4;\n\n return $post_per_page; // Return the number of products you wanna show per page.\n}",
"function poco_woocommerce_pagination() {\n if (woocommerce_products_will_display()) {\n woocommerce_pagination();\n }\n }",
"function so22835795_loop_shop_per_page() {\n return -1; //return any number, -1 === show all\n }",
"function showAllProducts()\n\t{\n\t\tinclude('classes/Lib/Paging.php');\n\t\t\n\t\t$pagesize=25;\n\t \tif(isset($_GET['page']))\n\t\t{\n\t\t \n\t\t\t$start = trim($_GET['page']-1) * $pagesize;\n\t\t\t$end = $pagesize;\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$start = 0;\n\t\t\t$end = $pagesize;\n\t\t}\n\t\t\n\t\t$total = 0;\n\t\t$sql = \"SELECT \t* FROM products_table \";\n\t\t\n\t\t$query = new Bin_Query();\n\t\t\n\t\tif($query->executeQuery($sql))\n\t\t{\n\t\t\t$total = ceil($query->totrows/ $pagesize);\n\t\t\t\t\n\t\t\t$tmp = new Lib_Paging('classic',array('totalpages'=>$total, 'length'=>10),'pagination');\n\t\t\t\n\t\t\t$this->data['paging'] = $tmp->output;\n\t\t\t$this->data['prev'] =$tmp->prev;\n\t\t\t$this->data['next'] = $tmp->next;\t\n\t\t\t\n\t\t\t$sql = \"SELECT \t* FROM products_table LIMIT $start,$end \";\n\t\t\t\n\t\t\t$query = new Bin_Query();\n\t\t\t\n\t\t\tif($query->executeQuery($sql))\n\t\t\t\t\n\t\t\t\treturn Display_DManageProducts::showAllProducts($query->records,1,$this->data['paging'],$this->data['prev'],$this->data['next'],$start);\n\t\t\t\t\n\t\t}\t\n\t\telse\n\t\t{\n\t\t\treturn '<div class=\"exc_msgbox\">No Products Found! Please Click Product Entry Link to Add Products!</div>';\n\t\t}\t\n\t}",
"public function index()\n {\n return Product::latest()->paginate(20);\n }",
"public function index()\n {\n //\n return ProductoResource::collection(Producto::paginate(15));\n }",
"function new_loop_shop_per_page( $cols ) {\n // Return the number of products you wanna show per page.\n $cols = 18;\n return $cols;\n}",
"public function index() {\r\n $this->set('response', array('Products' => $this->Paginate('Product')));\r\n }",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n return ProductResource::collection(Product::paginate(15));\n }",
"public function getItemsPerPage();",
"public function getItemsPerPage();",
"function paging($condtion='1')\r\n {\r\n /*\r\n $url = '';\r\n \t if(isset($_GET[\"brand\"])){\r\n \t \t$value = trim($_GET['brand']);\r\n \t \tif($value != \"\"){\r\n\t \t \t$condtion = sprintf(\"brand='%s'\",$value);\r\n\t \t \t$url = '&brand='.$value;\r\n \t \t}\r\n \t }\r\n \t \r\n \t if(isset($_GET[\"module\"])){\r\n \t \t$value = trim($_GET['module']);\r\n \t \tif($value != \"\"){\r\n\t \t \t$module = sprintf(\"series='%s'\",$value);\r\n\t \t \t$condtion = $condtion.' and '.$module;\r\n\t \t \t$url = $url.'&module='.$value;\r\n \t \t}\r\n \t }\r\n \t \r\n \t if(isset($_GET[\"part\"])){\r\n \t \t$value = trim($_GET['part']);\r\n \t \tif($value != \"\"){ \t \t\r\n\t \t \t$part = sprintf(\"module='%s'\",$value);\r\n\t \t \t$condtion = $condtion.' and '.$part;\r\n\t \t \t$url = $url.'&part='.$value;\r\n \t \t}\r\n \t }\r\n \t \r\n \t if(isset($_GET[\"key\"])){\r\n \t \t$value = trim($_GET[\"key\"]);\r\n \t \tif($value != \"\"){\r\n\t \t \t$condtion = $this->key_query($value,$url);\r\n\t \t \techo \"++++++++++\".$condtion;\r\n\t \t \t//$url = $url.'&part='.$value; \t \t\r\n \t \t}\r\n \t }\r\n \t */\r\n // get current page index\r\n $page = 1;\r\n \t if(isset($_GET[\"page\"])){\r\n \t \t$page = $_GET['page'];\r\n \t }\r\n \t \r\n \t // set paging parameters\r\n $number = 6; \r\n $total = $this->total;\r\n $url = $this->pget;\r\n $condtion = $this->cond;\r\n //$total = $this->getTotal($condtion);\r\n \r\n $url = '?page={page}'.$url; \r\n $pager = new Paging($total,$number,$page,$url);\r\n \t \r\n \t // get publish records\r\n\t $db = GLOBALDB();\r\n $sql = \"SELECT * FROM publish WHERE \".$condtion.\" order by id desc LIMIT \".$pager->limit.\",\".$pager->size;\r\n $result = $db->query($sql); \r\n $this->display($result);\r\n \r\n // show paging bar\r\n //echo $sql;\r\n\t $pager->show();\r\n }",
"function getPagingParameters()\n {\n }",
"public function paginate()\n {\n }",
"public function getQtyPages()\n {\n }",
"public function getQtyPages()\n {\n }",
"public function getQtyPages()\n {\n }",
"public function getQtyPages()\n {\n }",
"function new_loop_shop_per_page( $cols ) {\r\n // Return the number of products you wanna show per page.\r\n $cols = 12;\r\n\r\n return $cols;\r\n\r\n}",
"public function index()\n {\n return Product::orderBy('id','desc')->paginate(15);\n }",
"public function isProductPage();",
"function new_loop_shop_per_page( $cols ) {\n // Return the number of products you wanna show per page.\n $cols = 9;\n return $cols;\n}",
"function getPaging() {\n\t\t//if the total number of rows great than page size\n\t\tif($this->totalRows > $this->pageSize) {\n\t\t\tprint '<div class=\"paging\">';\n\t\t\tprint '<ul>';\n\t\t\tprint $this->first() . $this->prev() . $this->pageList() . $this->next() . $this->end();\n\t\t\tprint '</ul>';\n\t\t\tprint '</div>';\n\t\t}\n }",
"function products_from_request($page, $page_count){\n\tglobal $con;\n\t\n\t$args = [];\n\t$arg_types = \"\";\n\t$query = \"\n\t\tSELECT *\n\t\tFROM `products`\n\t\tINNER JOIN `categories`\n\t\t\tON `categories`.category_id = `products`.product_category\n\t\tINNER JOIN manufacturers\n\t\t\tON `manufacturers`.manufacturer_id = `products`.product_manufacturer\";\n\t\n\t// Now the dynamic part of our query, filtering logic\n\t\n\t$has_w = false;\n\t\n\t// view only products of a certain category.\n\tif(!empty($_GET['c'])){\n\t\t$args [] = &$_GET['c'];\n\t\t$query .= \" WHERE category_id = ? \";\n\t\t$arg_types .= \"i\";\n\t\t$has_w = true;\n\t}\n\t\n\t// view only products of a certain manufacturer\n\tif(!empty($_GET['m'])) {\n\t\t$args [] = &$_GET['m'];\n\t\t$query .= $has_w ? \" AND \" : \" WHERE \";\n\t\t$query .= \" manufacturer_id = ? \";\n\t\t$arg_types .= \"i\";\n\t\t$has_w = true;\n\t}\n\t\n\t// where the name of the product is...\n\tif(!empty($_GET['n'])) {\n\t\t$query_name = \"%\" . $_GET['n'] . \"%\";\n\t\t$args [] = &$query_name;\n\t\t$query .= $has_w ? \" AND \" : \" WHERE \";\n\t\t$query .= \" product_name LIKE ? \";\n\t\t$arg_types .= \"s\";\n\t\t$has_w = true;\n\t}\n\t\n\t// price range...\n\tif(!empty($_GET['p-min'])) {\n\t\t$args [] = &$_GET['p-min'];\n\t\t$query .= $has_w ? \" AND \" : \" WHERE \";\n\t\t$query .= \" product_price >= ? \";\n\t\t$arg_types .= \"d\";\n\t\t$has_w = true;\n\t}\n\t\n\tif(!empty($_GET['p-max']) ) {\n\t\t$args [] = &$_GET['p-max'];\n\t\t$query .= $has_w ? \" AND \" : \" WHERE \";\n\t\t$query .= \" product_price <= ? \";\n\t\t$arg_types .= \"d\";\n\t\t$has_w = true;\n\t}\n\t\n\t// ordering\n\t\n\tif(isset($_GET['o'])){\n\t\t$order = intval($_GET['o']);\n\t} else {\n\t\t$order = 1;\n\t}\n\t\n\tswitch($order){\n\t\tcase 1:\n\t\t\t$query .= \" ORDER BY product_name ASC \";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\t$query .= \" ORDER BY product_price DESC \";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\t$query .= \" ORDER BY product_price ASC \";\n\t\t\tbreak;\n\t}\n\t\n\t\n\t// now we want to limit number of rows we're getting.\n\t$from = ($page - 1) * 20;\n\t$query .= \" LIMIT $from, 20 \";\n\t\n\t\n\t// Now put the query together...\n\tif(count($args) > 0){\n\t\t// the input data types string is the first argument to the bind_param \n\t\t// method, so we have to prepend it at the start of the args array\n\t\tarray_unshift($args, $arg_types);\n\t\t\n\t\t$prep = $con->prepare($query);\n\t\t\n\t\t// since the bind_param is a vararg function, we need to use some\n\t\t// funky shit... i.e., we need to be able to call the function by \n\t\t// passing an array of our arguments.\n\t\tcall_user_func_array(array($prep,'bind_param'), $args);\n\t\t\n\t\t$prep->execute();\n\t\t$result = $prep->get_result();\n\t\t$prep->close();\n\t\t\n\t} else {\n\t\t$result = $con->query($query);\n\t}\n\treturn $result;\n\t\n}",
"public function preProcess()\r\n\t{\t\t\r\n\t\tif(!Module::isInstalled('agilesearchbyzipcode'))return parent::preProcess();\r\n\t\tif(Tools::getValue('is_zipcode_search') != 1)return parent::preProcess();\r\n\r\n\t\t$this->productSort();\r\n\t\t$this->n = abs((int)(Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE'))));\r\n\t\t$this->p = abs((int)(Tools::getValue('p', 1)));\r\n \r\n $centerLat = Tools::getValue('asbz_centerLat');\r\n $centerLng = Tools::getValue('asbz_centerLng');\r\n $search_scope = Configuration::get('ASBZ_SEARCH_SCOPE');\r\n \r\n include_once(dirname(__FILE__) . \"/../../modules/agilesearchbyzipcode/ProdLocation.php\");\r\n $products = ProdLocation::searchProducts(self::$cookie->id_lang,$centerLat,$centerLng,$search_scope,Tools::getValue('orderby'),Tools::getValue('orderway'));\r\n\t\t$nbProducts = count($products);\r\n\t\t$this->pagination($nbProducts);\r\n\t\tself::$smarty->assign(array(\r\n\t\t'search_products' => $products,\r\n\t\t'nbProducts' => $nbProducts,\r\n\t\t'search_tag' => '',\r\n\t\t'search_query' => Tools::getValue('asbz_zipcode'),\r\n\t\t'ref' =>'',\r\n\t\t'search_zipcode' => Tools::getValue('asbz_zipcode'),\r\n\t\t'homeSize' => Image::getSize('home')));\r\n\t\tself::$smarty->assign('add_prod_display', Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'));\r\n\t}",
"public function index()\n {\n return ProductCollection::collection(Product::paginate(5));\n }",
"function __construct()\n {\n //$this->pagination_params['fields'] = \"product_flash_sale_id,product_flash_sale_category_id,product_flash_sale_subcategory_id,product_flash_sale_childcategory_id,product_flash_sale_name,product_flash_sale_stock,product_flash_sale_price,CONCAT(product_flash_sale_image_path,product_flash_sale_image) AS product_flash_sale_image,product_flash_sale_status\";\n //$this->pagination_params['fields'] = \"product_flash_sale_id,product_flash_sale_category_id,product_flash_sale_name,product_flash_sale_is_featured,product_flash_sale_status\";\n $this->pagination_params['fields'] = \"product_flash_sale_id,product_flash_sale_status\";\n\n\n /*\n $this->pagination_params['joins'][] = array(\n \"table\"=>\"category as pcat\",\n \"joint\"=>\"pcat.category_id = product_flash_sale.product_flash_sale_category_id\"\n );\n\n\n\n $this->pagination_params['joins'][] = array(\n \"table\"=>\"category as scat\",\n \"joint\"=>\"scat.category_id = product_flash_sale.product_flash_sale_subcategory_id\"\n );\n\n\n\n $this->pagination_params['joins'][] = array(\n \"table\"=>\"category as ccat\",\n \"joint\"=>\"ccat.category_id = product_flash_sale.product_flash_sale_childcategory_id\"\n );\n\n */\n\n /* $this->pagination_params['joins'][] = array(\n \"table\"=>\"category\" ,\n \"joint\"=>\"category.category_id = product_flash_sale.product_flash_sale_category_id\",\n // add left to get import records\n \"type\"=>\"left\"\n );*/\n\n\n /*$this->relations['product_flash_sale_price'] = array(\n \"type\" =>\"has_many\",\n \"own_key\" =>\"pp_product_flash_sale_id\",\n \"other_key\"=>\"pp_price_id\",\n );\n\n\n $this->relations['product_flash_sale_color'] = array(\n \"type\"=>\"has_many\",\n \"own_key\"=>\"mba_product_flash_sale_id\", // item_category column\n \"other_key\"=>\"mba_color_id\", // item_category column\n );*/\n\n /*$this->relations['product_flash_sale_prep_size'] = array(\n \"type\" =>\"has_many\",\n \"own_key\" =>\"pp_product_flash_sale_id\",\n \"other_key\"=>\"pp_prep_id\",\n );*/\n\n $this->relations['product_sale'] = array(\n \"type\"=>\"has_many\",\n \"own_key\"=>\"mba_flash_sale_id\", // item_category column\n \"other_key\"=>\"mba_product_id\", // item_category column\n );\n\n parent::__construct();\n\n }",
"function getList(&$config,&$start,&$param)\n\t{\n\t\t$Count = 0;\n\t\t$page = $this->uri->segment(3,0); // page\n\t\t$isSession = $this->uri->segment(4,0); // read data from SESSION or POST (1 == POST , 0 = SESSION )\n\t\t\n\t\t$start = 0;\n\t\t\t\t\n\t\t$sortType \t\t= $param['sortType'];\n\t\t$sortField \t\t= $param['sortField'];\n\t\t$searchField \t= $param['searchField'];\n\t\t$searchString \t= $param['searchString'];\n\t\t$searchText \t= $param['searchText']; \n\t\t$searchFromDate\t= $param['searchFromDate']; \n\t\t$searchToDate \t= $param['searchToDate']; \n\t\t$searchAlpha\t= $param['searchAlpha']; \n\t\t$searchMode\t\t= $param['searchMode'];\t\n\t\t$searchDisplay \t= $param['searchDisplay'];\n\t\t$cat \t\t\t= $param['para1']; \n\t\t$cat_val \t\t= $param['para2']; \n\t\t\n\t\tif($isSession == 0)\n\t\t{\n\t\t\t$sortType \t= $this->nsession->get_param('PRODUCT_LIST','sortType','DESC');\n\t\t\t$sortField \t= $this->nsession->get_param('PRODUCT_LIST','sortField','id');\n\t\t\t$searchField \t= $this->nsession->get_param('PRODUCT_LIST','searchField','');\n\t\t\t$searchString \t= $this->nsession->get_param('PRODUCT_LIST','searchString','');\n\t\t\t$searchText \t= $this->nsession->get_param('PRODUCT_LIST','searchText','');\n\t\t\t$searchFromDate = $this->nsession->get_param('PRODUCT_LIST','searchFromDate','');\n\t\t\t$searchToDate \t= $this->nsession->get_param('PRODUCT_LIST','searchToDate','');\n\t\t\t$searchAlpha \t= $this->nsession->get_param('PRODUCT_LIST','searchAlpha','');\n\t\t\t$searchMode \t= $this->nsession->get_param('PRODUCT_LIST','searchMode','STRING');\n\t\t\t$searchDisplay = $this->nsession->get_param('PRODUCT_LIST','searchDisplay',20);\n\t\t}\n\t\t\n\t\t//========= SET SESSION DATA FOR SEARCH / PAGE / SORT Condition etc =====================\n\t\t$sessionDataArray = array();\n\t\t$sessionDataArray['sortType'] \t\t= $sortType;\n\t\t$sessionDataArray['sortField'] \t\t= $sortField;\n\t\tif($searchField!=''){\n\t\t\t$sessionDataArray['searchField'] \t= $searchField;\n\t\t\t$sessionDataArray['searchString'] \t= $searchString ;\n\t\t}\n\t\t$sessionDataArray['searchText'] \t= $searchText;\t\t\n\t\t$sessionDataArray['searchFromDate'] = $searchFromDate;\t\t\n\t\t$sessionDataArray['searchToDate'] \t= $searchToDate;\n\t\t$sessionDataArray['searchAlpha'] \t= $searchAlpha;\t\n\t\t$sessionDataArray['searchMode'] \t= $searchMode;\n\t\t$sessionDataArray['searchDisplay'] \t= $searchDisplay;\t\t\n\t\t\n\t\t$this->nsession->set_userdata('PRODUCT_LIST', $sessionDataArray);\n\t\t//==============================================================\n\t\t$this->db->select('COUNT(product_id) as TotalrecordCount');\n\t\tif(isset($sessionDataArray['searchField'])){\n\t\t\t$this->db->like($sessionDataArray['searchField'],$sessionDataArray['searchString'],'both');\n\t\t}\n\t\t$this->db->where('product.is_active',1);\n\t\t$this->db->where($cat,$cat_val);\n\t\t$this->db->select('product.*');\n\n\t\t$recordSet = $this->db->get('product'); \n\t\t$config['total_rows'] = 0;\n\t\t$config['per_page'] = $searchDisplay;\n\t\tif ($recordSet)\n\t\t{\n\t\t\t$row = $recordSet->row();\n\t\t\t$config['total_rows'] = $row->TotalrecordCount;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tif($page > 0 && $page < $config['total_rows'] )\n\t\t\t$start = $page;\n\t\t\t$this->db->select('product.*');\n\t\t\t$this->db->where('product.is_active',1);\n\t\t\t$this->db->where($cat,$cat_val);\n\t\t\tif(isset($sessionDataArray['searchField'])){\n\t\t\t\t$this->db->like($sessionDataArray['searchField'],$sessionDataArray['searchString'],'both');\n\t\t\t}\n\t\t\t\n\t\t//$this->db->order_by($sortField,$sortType);\n\t\t$this->db->order_by('product.product_id','desc');\n\t\t$this->db->limit($config['per_page'],$start);\n\n\t\t$recordSet = $this->db->get('product');\n\t\t$rs = false;\n\n\t\tif ($recordSet->num_rows() > 0)\n {\n \t$rs = array();\n\t\t\t$isEscapeArr = array();\n\t\t\tforeach ($recordSet->result_array() as $row)\n\t\t\t{\n\t\t\t\t$picData=$this->db->select('path,path_sm')->get_where('product_images',array('product_id'=>$row['product_id'],'type'=>'main'))->row_array();\n\t\t\t\tif(isset($picData['path'])){\n\t\t\t\t\tif($picData['path_sm']!=''){\n\t\t\t\t\t\t$pic=file_upload_base_url().'product/'.$picData['path_sm'];\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$pic=file_upload_base_url().'product/'.$picData['path'];\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t//$pic=file_upload_base_url().'product/'\n\t\t\t\t\t$pic=css_images_js_base_url().'images/no_pr_img.jpg';\n\t\t\t\t}\n\t\t\t\t$row['pic']=$pic;\n\t\t\t\t$wishlist=0;\n\t\t\t\t$customer_id=0;\n\t\t\t\tif($this->nsession->userdata('member_session_id')){\n\t\t\t\t\t$customer_id=$this->nsession->userdata('member_session_id');\n\t\t\t\t}\n if($customer_id > 0){\n $wishlist_status=$this->db->select('id')->get_where('wishlist',array('customer_id'=>$customer_id,'product_id'=>$row['product_id']))->row_array();\n if(count($wishlist_status) > 0){\n $wishlist=1;\n }\n }\n $row['wishlist']=$wishlist;\n\t\t\t\tforeach($row as $key=>$val){\n\t\t\t\t\tif(!in_array($key,$isEscapeArr)){\n\t\t\t\t\t\t$recordSet->fields[$key] = outputEscapeString($val);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t$rs[] = $recordSet->fields;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn $rs;\t\t\n\t}",
"function new_loop_shop_per_page( $cols ) {\n // Return the number of products you wanna show per page.\n $cols = 12;\n return $cols;\n}",
"public function ListarProductosParaPromocion($start, $limit, $sSearch, $iSortCol_0, $sSortDir_0, $categoria_id, $marca_id, $productos_id)\n {\n $arreglo_resultado = array();\n $cont = 0;\n\n $lista = $this->getDoctrine()->getRepository('IcanBundle:Producto')\n ->ListarProductosParaPromocion($start, $limit, $sSearch, $iSortCol_0, $sSortDir_0, $categoria_id, $marca_id, $productos_id);\n\n foreach ($lista as $value) {\n $producto_id = $value->getProductoId();\n\n $nombre = $value->getNombre();\n $categoria = ($value->getCategoria() != null) ? $value->getCategoria()->getNombre() : \"\";\n $marca = ($value->getMarca() != null) ? $value->getMarca()->getNombre() : \"\";\n $estado = ($value->getEstado()) ? 1 : 0;\n $precio = $value->getPrecio();\n $fecha = $value->getFechapublicacion() != \"\" ? $value->getFechapublicacion()->format(\"d/m/Y H:i\") : \"\";\n $views = $value->getViews();\n\n $ruta = $this->ObtenerURL();\n $dir = 'uploads/productos/';\n $imagen = $ruta . $dir . $value->getImagen();\n\n\n $acciones = '<a href=\"javascript:;\" class=\"add importar-producto m-portlet__nav-link btn m-btn m-btn--hover-success m-btn--icon m-btn--icon-only m-btn--pill\" title=\"Agregar producto relacionado\"\n data-id=\"' . $producto_id . '\" data-nombre=\"' . $nombre . '\" data-categoria=\"' . $categoria . '\"\n data-marca=\"' . $marca . '\" data-estado=\"' . $estado . '\" data-imagen=\"' . $imagen . '\"\n data-precio=\"' . $precio . '\" data-fecha=\"' . $fecha . '\" data-views=\"' . $views . '\"> <i class=\"la la-plus\"></i> </a> ';\n\n $arreglo_resultado[$cont] = array(\n \"id\" => $producto_id,\n \"nombre\" => $nombre,\n \"categoria\" => $categoria,\n \"marca\" => $marca,\n \"estado\" => $estado,\n \"imagen\" => $imagen,\n \"precio\" => number_format($precio, 0, ',', '.'),\n \"fechapublicacion\" => $fecha,\n \"views\" => $views,\n \"acciones\" => $acciones\n );\n\n $cont++;\n }\n\n return $arreglo_resultado;\n }",
"function jb_dripdeals_loadmore_ajax_handler()\n{\n $args = json_decode(stripslashes($_POST['query']), true);\n $args['paged'] = $_POST['page'] + 1; // we need next page to be loaded\n $args['post_status'] = 'publish';\n\n\n //run the query\n $prop = new WP_Query($args);\n\n if ($prop->have_posts()):\n // run the loop\n \n \n while($prop->have_posts()) {\n $prop->the_post();\n $pid = get_the_ID();\n $product = wc_get_product($pid);\n ?>\n <div class=\"col-xl-4 col-lg-4 col-md-4 col-sm-6 margin product\">\n <div class=\"brand_box\">\n <a href=\"<?php the_permalink() ?>\">\n <img src=\"<?php the_post_thumbnail_url() ?>\" alt=\"<?php the_title()?>\" />\n <h3>₦<strong class=\"red\"><?php echo number_format($product->get_sale_price(), 2, '.', ','); ?></strong></h3>\n <span> <a href=\"<?php the_permalink() ?>\" ><?php the_title() ?></a></span>\n <i><img src=\"<?php echo get_theme_file_uri('images/star.png')?>\"/></i>\n <i><img src=\"<?php echo get_theme_file_uri('images/star.png')?>\"/></i>\n <i><img src=\"<?php echo get_theme_file_uri('images/star.png')?>\"/></i>\n <i><img src=\"<?php echo get_theme_file_uri('images/star.png')?>\"/></i>\n </a>\n </div>\n </div>\n <?php \n }\n endif;\n die; // here we exit the script and even no wp_reset_query() required!\n}",
"function results_are_paged()\n {\n }",
"public static function loadRecentProducts($curr_page = 1) {\n $recent_products = $_SESSION['recently_viewed_products'];\n $model_type = $_POST['model_type'];\n switch ($model_type) {\n case \"girl\":\n Db_Actions::DbSelect(\"SELECT * FROM cscart_products_categories WHERE category_id=260\");\n break;\n case \"boy\":\n Db_Actions::DbSelect(\"SELECT * FROM cscart_products_categories WHERE category_id=261\");\n break;\n default:\n Db_Actions::DbSelect(\"SELECT * FROM cscart_products_categories WHERE category_id=260\");\n break;\n }\n $products_ids = Db_Actions::DbGetResults();\n if (!isset($products_ids->empty_result)) {\n $allowed_products = array();\n foreach ($products_ids as $id) {\n array_push($allowed_products, $id->product_id);\n }\n }\n\n\n //First get the products ids from the selected category\n $product_data = array();\n if (!empty($recent_products)) {\n foreach ($recent_products as $product) {\n if (in_array($product, $allowed_products)) {\n $product_data[] = array('product_id' => $product,\n 'product_name' => self::getProductName($product),\n 'product_image_url' => $root_url . self::getProductImage($product),\n 'product_price' => self::getProductPrice($product),\n 'category_dress_type_id' => $product->category_dress_type_id,\n 'subcategory_dress_type_id' => $product->subcategory_dress_type_id);\n }\n }\n //display the products\n $max_products_per_page = 9;\n $offset = $curr_page * $max_products_per_page - $max_products_per_page;\n $slice = array_slice($product_data, $offset, $max_products_per_page);\n $counter = 0;\n foreach ($slice as $product_item) {\n $counter++;\n if ($counter == 1) {\n ?><div class=\"cs-product-row\"><?php\n }\n ?>\n <div class=\"cs-product <?php if ($counter == 2) echo 'cs-prd-middle'; ?>\" product_id=\"<?php echo $product_item['product_id'] ?>\" product_title=\"<?php echo $product_item['product_name'] ?>\" product_price=\"<?php echo $product_item['product_price'] ?>\" category_ids=\"<?php echo $product_item['category_id'] ?>\" category_dress_type_id=\"<?php echo $product_item['category_dress_type_id'] ?>\" subcategory_dress_type_id=\"<?php echo $product_item['subcategory_dress_type_id'] ?>\">\n <img src=\"<?php echo $product_item['product_image_url'] ?>\" width=\"97\" height=\"126\" alt=\"dress\" product_title=\"<?php echo $product_item['product_name'] ?>\" class=\"cs-main-product-image\" draggable=\"false\" category_dress_type_id=\"<?php echo $product_item['category_dress_type_id'] ?>\" subcategory_dress_type_id=\"<?php echo $product_item['subcategory_dress_type_id'] ?>\" />\n <h3 class=\"cs-product-title\"><?php echo substr($product_item['product_name'], 0, 14) ?></h3>\n <h4 class=\"cs-price\">$<?php echo number_format($product_item['product_price'], 2) ?></h4>\n <div class=\"cs-variations\">\n <?php //self::getProductColorVariations($product_item['product_id']); ?>\n </div>\n </div>\n <?php\n if ($counter == 3) {\n ?></div><?php\n $counter = 0;\n }\n }\n }\n else {\n echo \"<h4 class='empty-result'>Nothing found.</h4>\";\n }\n }",
"protected function itemPaging()\n {\n $controller_class_namespace = $this->controller_namespace;\n $controller = new $controller_class_namespace();\n $controller->getModelRegistry(\n $this->get('model_type', 'datasource'),\n $this->get('model_name', '', 'runtime_data'),\n 1\n );\n\n $controller->set('get_customfields', 0);\n $controller->set('use_special_joins', 0);\n $controller->set('process_events', 0);\n $controller->set('get_item_children', 0);\n\n $controller->select(\n 'a'\n . '.'\n . $controller->get('primary_key', 'id')\n );\n\n $controller->select(\n 'a'\n . '.'\n . $controller->get('name_key', 'title')\n );\n\n $controller->where(\n 'a'\n . '.' . $controller->get('primary_key', 'id')\n . ' = '\n . (int)$this->runtime_data->catalog->source_id\n );\n\n//@todo ordering\n $item = $this->runQuery();\n\n $model_registry_name = ucfirst(strtolower($this->get('model_name', '', 'runtime_data')))\n . ucfirst(strtolower($this->get('model_type', 'datasource')));\n\n if ($item === false || count($item) === 0) {\n return $this;\n }\n }",
"public function index(Request $request)\n\n {\n\n $user = auth()->user();\n\n\n\n\n\n\n $products = Product::sortable()->where('group_uid',$user->group_uid)->paginate(20);\n $productsall=Product::sortable()->paginate(20);\n \n $sort = $request->get('sort') != '' ? $request->get('sort') : 'asc';\n\n\n\n\n\n return view('products.index',compact('products','productsall'))\n\n ->with('i', (request()->input('page', 1) - 1) * 5);\n\n }",
"private function exportProducts(){\n Product::initStore($this->store_settings->store_name, config('shopify.api_key'), $this->store_settings->access_token);\n $products_count = Product::count();\n $products_per_page = 250;\n $number_of_pages = ceil($products_count/$products_per_page);\n $all_products = [];\n $products = [];\n //to init start time\n ShopifyApiThrottle::init();\n for( $page = 1; $page <= $number_of_pages; $page++ ){\n //wait for some time so it doesn't reach throttle point\n if( $page > 1 ){ ShopifyApiThrottle::wait(); }\n\n $products = Product::all([\n 'limit' => $products_per_page,\n 'page' => $page\n ]);\n if($products)\n $all_products = array_merge($all_products, $products);\n //to re-init start time\n ShopifyApiThrottle::init();\n }\n return $all_products;\n }",
"public function listProductPage(){\n\t\t\t$sql = \"SELECT * FROM products\";\n\t\t\t$listProductPage = mysqli_query($this->connect(),$sql);\n\t\t\treturn $listProductPage;\n\t\t}",
"private function paginate()\n\t{\n\t\tif ($this->_listModel) {\n\t\t\t$this->_listModel->loadNextPage();\n\t\t}\n\t}",
"abstract public function getPaginate($premiereEntree, $messageTotal, $where);",
"private function prepareExternalProduct() {\n if ($this->getSaverData()->isFirstPage()) {\n $this->setPrice();\n $this->setSKU();\n $this->setEnableReviews();\n $this->setMenuOrder();\n $this->setExternalProductDetails();\n }\n\n $this->setTags();\n $this->setAttributes();\n }",
"function getProducts($page)\n{\n // Update the API URL with the page number\n $api_url = API_URL . '?page=' . $page;\n\n // Initialize the cURL\n $curl = curl_init();\n\n // Configure the cURL\n curl_setopt($curl, CURLOPT_URL, $api_url);\n curl_setopt($curl, CURLOPT_HEADER, true);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_USERPWD, API_USERNAME . ':' . API_PASSWORD);\n curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n\n // Execute the cURL\n $response = curl_exec($curl);\n\n // Extract the headers of the response\n $header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE);\n $header = substr($response, 0, $header_size);\n $header = getHeaders($header);\n\n // Get the total pages and total products from the headers\n $total_pages = $header['X-WP-TotalPages'];\n $total_products = $header['X-WP-Total'];\n\n // Extract body of the response\n $body = substr($response, $header_size);\n\n // Convert the body from string to array\n $body = json_decode($body);\n\n // Define an array to store the products\n $products = array();\n\n // Loop through the response\n foreach ($body as $item) {\n // Only if the catalog visibility is visible\n if ($item->catalog_visibility === 'visible') {\n // Instantiate an object of Product\n $product = new Product();\n\n // Assign the values\n $product->id = $item->id;\n $product->name = $item->name;\n $product->images = $item->images;\n\n // Push the object into the array\n array_push($products, $product);\n }\n }\n\n // Destroy the cURL instance\n curl_close($curl);\n\n // Encapsulate all the data in an array\n $data = array(\n \"total_pages\" => $total_pages,\n \"total_products\" => $total_products,\n \"products\" => $products\n );\n\n return $data;\n}",
"private function _pagination()\n {\n\n if (Request::has('pq_curpage') && Request::has('pq_rpp')) {\n $columnsTemp = $this->_columnsRaw;\n $pq_curPage = Request::input('pq_curpage');\n $pq_rPP = Request::input('pq_rpp');\n $queryTemp = new \\stdClass();\n $queryTemp = $this->_getQueryStatement();\n $queryTemp->columns = null;\n\n // Verifica si existe algun filtro para aplicarlo al COUNT y determinar cuantos registros hay en la consulta\n if (property_exists($this->_filterTable, 'query')) {\n $queryTemp->whereRaw($this->_filterTable->query, $this->_filterTable->param);\n }\n\n $totalRecordQuery = $queryTemp->count();\n $this->_query->columns = $columnsTemp;\n\n $skip = ($pq_rPP * ($pq_curPage - 1));\n\n if ($skip >= $totalRecordQuery) {\n $pq_curPage = ceil($totalRecordQuery / $pq_rPP);\n $skip = ($pq_rPP * ($pq_curPage - 1));\n }\n\n // Make limit to query\n $this->_query->offset($skip)\n ->limit($pq_rPP);\n\n $this->_paginationLimit = [\n 'totalRecords' => $totalRecordQuery,\n 'curPage' => $pq_curPage,\n ];\n }\n }",
"function product()\n {\n if (($data['logedUser'] = $this->_admin_pages()))\n { \n \n $product['content'] = Modules::run('product/_index'); \n \n $data['header'] = '';\n $data['titelHeader'] = $this->lang->line('product');\n $data['content'] = Modules::run('ajaxme/ajaxmeAdminProduct',$product);\n \n \n $this->load->view('general',$data);\n \n }\n }",
"public function products()\n {\n\n }",
"function getProducts($offset,$limit){\n\t\tglobal $conn;\n\t\t$stmt = $conn->prepare(\"SELECT * FROM newproductlist LIMIT ?,?\");\n\t\tif(false===$stmt)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t$params=$stmt->bind_param('ii',$offset,$limit);\n\t\tif(false===$params)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$stmt->bind_result($pid,$pname,$pprice,$pimage,$pcat);\n\t\t$products=array();\n\t\t\n\t\t$execute=$stmt->execute();\n\t\t\n\t\tif ( false === $execute) \n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\twhile($stmt->fetch()){\n\t\t\tarray_push($products,array(\"id\"=>$pid,\"name\"=>$pname, \"price\"=>$pprice,\"image\"=>$pimage,\"dropdown\"=>$pcat));\n\t\t}\n\t\t\n\t\treturn $products;\n\t\t\n\t}",
"function onAction()\n {\n// global $application;\n// $request = &$application->getInstance('Request');\n $pag_rows = modApiFunc('request', 'getValueByKey', 'rows');\n $pag_name = modApiFunc('request', 'getValueByKey', 'pgname');\n if (strpos($pag_name, 'Catalog_ProdsList_')===0)\n {\n\t if ($pag_rows > 99) $pag_rows = 99;\n $cid = intval(substr($pag_name, 18));\n modApiFunc('CProductListFilter','changeCurrentCategoryId',$cid);\n }\n elseif (strpos($pag_name, 'Manufacturer_ProdsList_')===0)\n {\n $mnf_id = intval(substr($pag_name, 23));\n modApiFunc('CProductListFilter', 'changeCurrentManufactureId', $mnf_id, true);\n }\n $this->pPaginator->setPaginatorPage($pag_name, 1);\n $this->pPaginator->setPaginatorRows($pag_name, $pag_rows);\n// $this->pPaginator->savePaginators();\n }",
"public function loadcatproduct($subdomain,$slug,$page)\n {\n\t\t$companyid = get_company_id();\n $themename = get_theme_name();\n $language = SiteLanguage::where('company_id', $companyid)->first();\n $settings = Settings::where('company_id', $companyid)->first();\n $res = \"\";\n $min = \"0\";\n $max = \"500\";\n $mins = \"0\";\n $maxs = \"500\";\n $skip = ($page-1)*9;\n\n $sort = \"\";\n if (Input::get('sort') != \"\") {\n $sort = Input::get('sort');\n }\n\n if (Input::get('min') != \"\") {\n $min = Product::Filter(Input::get('min'));\n $mins = Input::get('min');\n $sort = \"price\";\n }\n if (Input::get('max') != \"\") {\n $max = Product::Filter(Input::get('max'));\n $maxs = Input::get('max');\n $sort = \"price\";\n }\n $category = Category::where('slug',$slug)->first();\n if ($category === null) {\n $category['name'] = \"Nothing Found\";\n $products = new \\stdClass();\n }else{\n\n if ($sort==\"old\") {\n \n $products = Product::where('status','1')->where('company_id',$companyid)->whereRaw('FIND_IN_SET(?,category)', [$category->id])\n ->orderBy('created_at','asc')\n ->skip($skip)\n ->take(9)\n ->get();\n \n }elseif ($sort==\"new\") {\n\n $products = Product::where('status','1')->where('company_id',$companyid)->whereRaw('FIND_IN_SET(?,category)', [$category->id])\n ->orderBy('created_at','desc')\n ->skip($skip)\n ->take(9)\n ->get();\n\n }elseif ($sort==\"low\") {\n\n $products = Product::where('status','1')->where('company_id',$companyid)->whereRaw('FIND_IN_SET(?,category)', [$category->id])\n ->orderBy('price','asc')\n ->skip($skip)\n ->take(9)\n ->get();\n\n }elseif ($sort==\"high\") {\n\n $products = Product::where('status','1')->where('company_id',$companyid)->whereRaw('FIND_IN_SET(?,category)', [$category->id])\n ->orderBy('price','desc')\n ->skip($skip)\n ->take(9)\n ->get();\n\n }elseif ($sort==\"price\") {\n\n $products = Product::where('status','1')\n\t\t\t\t ->where('company_id',$companyid)\n ->whereRaw('FIND_IN_SET(?,category)', [$category->id])\n ->whereBetween('price', [$min, $max])\n ->orderBy('price','asc')\n ->take(9)\n ->get();\n\n }else{\n\n $products = Product::where('status','1')->where('company_id',$companyid)->whereRaw('FIND_IN_SET(?,category)', [$category->id])\n ->orderBy('created_at','desc')\n ->skip($skip)\n ->take(9)\n ->get();\n }\n\n\n foreach($products as $product) {\n $res .= '<div class=\"col-lg-4 col-md-4 col-sm-4 col-xs-12\">\n <div class=\"single-product-carousel-item text-center\">\n <a href=\"' . url('/product') . '/' . $product->id . '/' . str_replace(' ', '-', strtolower($product->title)) . '\"> <img src=\"' . url('/assets/images/products') . '/' . $product->feature_image . '\" alt=\"Product Image\" /> </a>\n <div class=\"product-carousel-text\">\n <a href=\"' . url('/product') . '/' . $product->id . '/' . str_replace(' ', '-', strtolower($product->title)) . '\">\n <h4 class=\"product-title\">' . $product->title . '</h4>\n </a>\n <div class=\"ratings\">\n <div class=\"empty-stars\"></div>\n <div class=\"full-stars\" style=\"width:'.Review::ratings($product->id).'%\"></div>\n </div>\n <div class=\"product-price\">';\n if ($product->offer_price != \"\" && $product->offer_price != 0) {\n $res .= '<span class=\"original-price\">' .$settings->currency_sign. $product->offer_price . '</span>';\n }\n $res .= '\n \n <del class=\"offer-price\">' .$settings->currency_sign. Product::Cost($product->id) . '</del>\n </div>\n <div class=\"product-meta-area\">\n <form class=\"addtocart-form\">';\n if (Session::has('uniqueid')) {\n $res .= '<input type=\"hidden\" name=\"uniqueid\" value=\"' . Session::get('uniqueid') . '\">';\n } else {\n $res .= '<input type=\"hidden\" name=\"uniqueid\" value=\"' . str_random(7) . '\">';\n }\n\n $res .= '\n <input name=\"title\" value=\"' . $product->title . '\" type=\"hidden\">\n <input name=\"product\" value=\"' . $product->id . '\" type=\"hidden\">\n <input type=\"hidden\" name=\"shipping_cost\" value=\"'.$product->shipping_cost.'\">\n <input type=\"hidden\" name=\"tax\" value=\"'.$product->tax.'\">\n <input id=\"cost\" name=\"cost\" value=\"' . Product::Cost($product->id) . '\" type=\"hidden\">\n <input id=\"quantity\" name=\"quantity\" value=\"1\" type=\"hidden\">';\n if ($product->stock != 0){\n $res .='<button type=\"button\" onclick=\"toCart(this)\" class=\"addTo-cart to-cart\"><i class=\"fa fa-cart-plus\"></i><span>'.trans(\"app.AddCart\").'</span></button>';\n }else{\n $res .='<button type=\"button\" class=\"addTo-cart to-cart\" disabled><i class=\"fa fa-cart-plus\"></i>'.trans(\"app.OutStock\").'</button>';\n }\n $res .=' \n \n </form>\n <a href=\"javascript:;\" class=\"wish-list\" onclick=\"getQuickView('.$product->id.')\" data-toggle=\"modal\" data-target=\"#myModal\">\n <i class=\"fa fa-eye\"></i>\n </a>\n </div>\n </div>\n </div>\n </div>';\n }\n\n }\n return $res;\n }",
"public function displayAllProducts()\n {\n return $this->paginate(['category', 'subcategory', 'brand', 'reviews'], false, 12);\n }",
"function themestek_wc_loop_shop_per_page( $cols ) {\r\n\t// Return the number of products you wanna show per page.\r\n\t$woocommerce_product_per_page = themestek_get_option('woocommerce-product-per-page');\r\n\t$cols = !empty($woocommerce_product_per_page) ? trim(esc_attr($woocommerce_product_per_page)) : $cols ;\r\n\t\r\n\treturn $cols;\r\n}",
"public function getPageSize();",
"protected function paginate()\n {\n if ($this->currentItem == $this->pagerfanta->getMaxPerPage() and $this->pagerfanta->hasNextPage()) {\n $this->pagerfanta->setCurrentPage($this->pagerfanta->getNextPage());\n $this->loadData();\n }\n }",
"public function paging() {\n\t\t$pages = ceil($this->count('all') / $this->_page_length);\n\t\t$response = array('pages' => $pages, 'page' => $this->_on_page,'length' => $this->_page_length,'items' => $this->count('all'));\n\t\treturn (object) $response;\t\t\n\t}",
"public function viewAction()\n {\n $alias = $this->route['alias'];\n $category = R::findOne('category', 'alias = ?', [$alias]);\n\n $curr = \\ishop\\App::$app->getProperty('currency');\n\n if(!$category){\n throw new \\Exception('Страница не найдена', 404);\n }\n\n // 2. breadcrumbs & ids for all children categories\n $breadcrumbs = Breadcrumbs::getBreadcrumbs($category->id);\n $cat_model = new Category();\n $ids = $cat_model->getIds($category->id);\n $ids = $ids ? ($ids . $category->id) : $category->id;\n $filterData['categoryIds'] = $ids;\n\n // 3. get product sort parameters\n $productsSort = App::$app->getProperty('productsSort');\n $sort = self::productSort();\n $productSortDB = self::productSortDB();\n $productsPerPage = App::$app->getProperty('productsPerPage');\n $perpage = self::getProductPerpage();\n $productsMode = self::getProductMode();\n\n // 4. filters for products\n $filter = null; $sql_part = '';\n if(!empty($_GET['filter']))\n {\n new \\app\\widgets\\filter\\Filter($filterData);\n $filter = Filter::getFilter();\n\n if($filter){\n $countGroups = Filter::countGroups($filter);\n $sql_part = \"AND product.id IN (\n SELECT attribute_product.product_id\n FROM attribute_product \n LEFT JOIN attribute_value ON attribute_value.id = attribute_product.attr_id\n LEFT JOIN attribute_group ON attribute_group.id = attribute_value.attr_group_id\n WHERE attribute_product.attr_id IN ({$filter})\n GROUP BY attribute_product.product_id\n HAVING COUNT(DISTINCT attribute_value.attr_group_id) = {$countGroups}\n )\";\n }\n\n $filter = explode(',', $filter);\n }\n\n $filterPrice = null;\n if(!empty($_GET['minPrice']) && $_GET['maxPrice'])\n {\n $minPrice = round($_GET['minPrice'] / $curr['value']);\n $maxPrice = round($_GET['maxPrice'] / $curr['value']);\n $sql_part .= \" AND product.price >= {$minPrice} AND product.price <= {$maxPrice} \";\n }\n\n // 5. find total (with filters) & get pagination\n $page = isset($_GET['page']) ? (int)$_GET['page'] : 1;\n $total = R::count('product', \"category_id IN ($ids) AND status = 'visible' $sql_part\");\n $pagination = new Pagination($page, $perpage, $total);\n $start = $pagination->getStart();\n\n $products = R::getAll(\"SELECT product.*, GROUP_CONCAT(product_base_img.img SEPARATOR ',') AS base_img FROM product \n LEFT JOIN product_base_img ON product_base_img.product_id = product.id\n WHERE product.category_id IN ($ids) AND product.status = 'visible' $sql_part\n GROUP BY product.id ORDER BY $productSortDB LIMIT $start, $perpage\");\n\n if($products){\n for ($z=0; $z<count($products); $z++){\n $getProductSizes = R::getAll(\"SELECT GROUP_CONCAT(attribute_value.value) AS value\n FROM attribute_value\n LEFT JOIN attribute_product ON attribute_value.id = attribute_product.attr_id\n WHERE attribute_product.product_id = {$products[$z]['id']} AND attribute_value.attr_group_id = 6\");\n $products[$z]['sizes'] = $getProductSizes[0]['value'];\n }\n }\n\n $sizes = R::findAll(\"attribute_value\", 'attr_group_id = ? ', [6]);\n\n $productRangeCount = ($perpage*($pagination->currentPage-1)+1) .\" - \". ($perpage*($pagination->currentPage-1) + count($products));\n\n\n $filterPrice = R::getRow(\"SELECT MIN(price) AS minPrice, MAX(price) AS maxPrice\n FROM `product` \n WHERE category_id IN($ids) AND status = 'visible'\");\n\n $filterData['minPrice'] = round($filterPrice['minPrice'] * $curr['value']);\n $filterData['maxPrice'] = round($filterPrice['maxPrice'] * $curr['value']);\n\n if($this->isAjax())\n {\n $categoryViews['products'] = $this->loadViews('products', compact('products'));\n $categoryViews['productPagination'] = $this->loadViews('product_pagination', compact( 'pagination', 'total', 'productRangeCount'));\n $filterObj = new \\app\\widgets\\filter\\Filter($filterData);\n $categoryViews['productFilter'] = $filterObj->run();\n\n echo json_encode($categoryViews, true);\n die;\n }\n\n $title = $category->meta_title ? $category->meta_title : $category->title;\n $this->setMeta( $title.' - интернет магазин MegaShop Demo', $category->description, $category->keywords);\n $this->set(compact('breadcrumbs', 'category', 'products',\n 'pagination', 'total', 'perpage', 'productsPerPage', 'sizes',\n 'productsSort', 'sort', 'productRangeCount', 'productsMode', 'filterData'));\n\n }",
"public function getProductsFromStore(request $request)\n {\n $data = $request->all();\n if(!empty($data['store_id']))\n {\n $storeId = $data['store_id'];\n $infoCheck = StoreProduct::where(['store_id'=>$storeId])->first();\n $itemId = 1;\n\n if($infoCheck)\n {\n $itemId = $infoCheck->product_id;\n }\n\n $ShopifyResponse = shopify_call($storeId, '/admin/api/2020-04/products/count.json', array(), 'GET');\n $response = json_decode($ShopifyResponse['response']);\n $countData= $response->count;\n $pageNo = $countData/250;\n $pnoLimit = round($pageNo+0.55);\n $itemId = $itemId;\n\n for($i=1; $i <= $pnoLimit; $i++)\n {\n $urg = '/admin/api/2020-04/products.json?limit=250&since_id='.$itemId;\n $response = Getdata($storeId,$urg);\n $productCount = count($response->products);\n $j = 1;\n foreach ($response->products as $item)\n {\n if($j == $productCount)\n {\n $itemId = $item->id;\n }\n $checkProduct = StoreProduct::where(['store_id' => $storeId,'product_id' => '$item->id'])->first();\n\n if(!$checkProduct)\n {\n $postData = [\n \"product_id\" => $item->id,\n \"store_id\" => $storeId,\n \"title\" => $item->title,\n \"vendor\" => $item->vendor,\n \"product_type\" => $item->product_type,\n \"handle\" => $item->handle,\n \"tags\" => $item->tags,\n \"published_scope\" => $item->published_scope,\n ];\n $response = StoreProduct::create($postData);\n $insertProductId = $response->id;\n\n /*\n * Add product Varients\n */ \n foreach ($item->variants as $items)\n {\n $insertDataVariants = [\n \"store_products_id\" => $insertProductId,\n \"store_id\" => $storeId,\n \"variant_id\" => $items->id,\n \"product_id\" => $items->product_id,\n \"title\" => $items->title,\n \"price\" => $items->price,\n \"compare_at_price\" => $items->compare_at_price,\n \"sku\" => $items->sku,\n \"position\" => $items->position,\n \"fulfillment_service\" => $items->fulfillment_service,\n \"inventory_management\" => $items->inventory_management,\n \"inventory_quantity\" => $items->inventory_quantity,\n \"option1\" => $items->option1,\n \"option2\" => $items->option2,\n \"option3\" => $items->option3,\n \"image_id\" => $items->image_id\n ];\n StoreProductVariants::create($insertDataVariants);\n } \n\n /*\n * Add product images\n */ \n foreach ($item->images as $itemimg)\n {\n $insertProductImages = [\n \"store_products_id\" => $insertProductId,\n \"store_id\" => $storeId,\n \"image_id\" => $itemimg->id,\n \"product_id\" => $itemimg->product_id,\n \"src\" => $itemimg->src,\n \"alt\" => $itemimg->alt,\n \"position\" => $itemimg->position,\n ];\n StoreProductImages::create($insertDataVariants);\n }\n }\n $j++;\n }\n }\n return response()->json(['status' =>true, 'message' =>'Data import','data' =>\"got product\"]); \n }\n else\n {\n return response()->json(['status' =>true, 'message' =>'Data not found','data'=>[]]);\n }\n }",
"function kvell_edge_woocommerce_products_per_page() {\n\t\t$products_per_page_meta = kvell_edge_options()->getOptionValue( 'edgtf_woo_products_per_page' );\n\t\t$products_per_page = ! empty( $products_per_page_meta ) ? intval( $products_per_page_meta ) : 12;\n\t\t\n\t\tif ( isset( $_GET['woo-products-count'] ) && $_GET['woo-products-count'] === 'view-all' ) {\n\t\t\t$products_per_page = 9999;\n\t\t}\n\t\t\n\t\treturn $products_per_page;\n\t}",
"public function SetNumPages()\n\t\t{\n\t\t\t$this->_pricenumpages = ceil($this->GetNumProducts() / GetConfig('CategoryProductsPerPage'));\n\t\t}",
"public function index(Request $request)\n { \n $filter = $this->filter($request);\n \n if($filter['filter']){\n return Product::with(['details','images'])->where($filter['query'])->orderBy($filter['orderField'],$filter['order'])->paginate(10);\n }\n\n return Cache::tags(['products'])->rememberForever('products.all.page_'.$request->page.'_admin', function (){\n return Product::with(['details','images'])->orderBy('id','desc')->paginate(10);\n });\n }",
"function render_block_core_query_pagination_numbers($attributes, $content, $block)\n {\n }",
"public function user_products()\n {\n $uid = $this->session->userdata('user_id');\n\n if(!empty($uid))\n {\n $this->load->helper(\"url\");\n $this->load->model(\"products_model\");\n $this->load->library(\"pagination\");\n\n $config = array();\n $config[\"base_url\"] = base_url(\"User/user_products\");\n $config[\"total_rows\"] = $this->products_model->get_user_products_count($uid);\n $config[\"per_page\"] = 7;\n $config[\"uri_segment\"] = 3;\n $config['use_page_numbers'] = TRUE;\n $config['cur_tag_open'] = '<a>';\n $config['attributes'] = array('class' => 'btn btn-default btn-sm');\n\n $this->pagination->initialize($config);\n $page = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0;\n\n $data['title'] = 'Products';\n $data[\"results\"] = $this->products_model->\n get_user_limited_products($uid,$config[\"per_page\"], $page);\n $data[\"links\"] = $this->pagination->create_links();\n\n $this->load->view('header',$data);\n $this->load->view('nav_block',$data);\n $this->load->view(\"products\", $data);\n $this->load->view('footer',$data);\n }\n }",
"private function getNumPages() {\n //display all in one page\n if (($this->limit < 1) || ($this->limit > $this->itemscount)) {\n $this->numpages = 1;\n } else {\n //Calculate rest numbers from dividing operation so we can add one\n //more page for this items\n $restItemsNum = $this->itemscount % $this->limit;\n //if rest items > 0 then add one more page else just divide items\n //by limit\n $restItemsNum > 0 ? $this->numpages = intval($this->itemscount / $this->limit) + 1 : $this->numpages = intval($this->itemscount / $this->limit);\n }\n }",
"public function index($sort = 'id', $direction = 'asc', $page = 1) {\n $this->checkteam();\n\n $cond = '';\n if ((isset($this->data['Products']['search_submit'])) && ($this->data['Products']['search_submit'] == '1')) {\n $search_submit = $this->data['Products']['search_submit'];\n\n if ((isset($this->data['Products']['keywords'])) && ($this->data['Products']['keywords'] != '')) {\n $keywords = $this->data['Products']['keywords'];\n\n $cond .= \"Product.name LIKE '%\" . $keywords . \"%' OR Product.description LIKE '%\" . $keywords . \"%'\";\n }\n }\n\n $this->paginate = array(\n 'limit' => 10,\n 'order' => array(\n 'Product.id' => 'DESC'\n ),\n 'contain' => '',\n 'conditions' => array(\n //($cond != '' ? $cond.' AND ' : '') . \" Image.position = 'main'\"\n $cond\n ),\n //'fields' => array('Product.*', 'Category.*', 'Image.*'),\n 'fields' => array('Product.*', 'Category.*'),\n 'joins' => array(\n array(\n 'table' => 'categories',\n 'alias' => 'Category',\n 'type' => 'LEFT',\n 'conditions' => array(\n 'Product.category_id = Category.id'\n )\n )\n )\n );\n\n $products = $this->paginate('Product');\n $allproducts = $products;\n $i = 0;\n foreach ($allproducts as $product) {\n $product_id = $product['Product']['id'];\n\n $picture_main = $this->Image->find('first', array('conditions' => array('Image.product_id' => $product_id, 'Image.position' => 'main')));\n $picture_subs = $this->Image->find('first', array('conditions' => array('Image.product_id' => $product_id, 'Image.position' => 'subs')));\n\n if (!empty($picture_main)) {\n $products[$i]['Image'] = array('name' => $picture_main['Image']['name']);\n } else if (!empty($picture_subs)) {\n $products[$i]['Image'] = array('name' => $picture_subs['Image']['name']);\n } else {\n $products[$i]['Image'] = array('name' => 'no_image.gif');\n }\n $i++;\n }\n\n //$this->set('users', $users);\n $this->set(compact('products'));\n\n $sort = strtolower($sort);\n\n switch ($sort) {\n case 'id' :\n $order = array(\"Product.id\" => $direction);\n break;\n case 'name':\n $order = array(\"Product.name\" => $direction);\n break;\n case 'category':\n $order = array(\"Category.name\" => $direction);\n break;\n case 'description':\n $order = array(\"Product.description\" => $direction);\n break;\n default:\n $order = array(\"Product.id\" => $direction);\n break;\n }\n /*\n if ($sort == 'appointment_id')\n $order = array(\"User_interest.$sort\" => $direction);\n else if ($sort == 'firstname')\n $order = array(\"User.$sort\" => $direction);\n else if ($sort == 'email')\n $order = array(\"User.$sort\" => $direction);\n else\n $order = array(\"Product.name\" => $direction);\n * \n */\n\n $products = $this->Product->find('all', array(\n 'limit' => 10, //int\n 'page' => $page, //int\n 'order' => $order,\n 'conditions' => array(\n //($cond != '' ? $cond.' AND ' : '') . \" Image.position = 'main'\"\n $cond\n ),\n 'joins' => array(\n array(\n 'table' => 'categories',\n 'alias' => 'Category',\n 'type' => 'LEFT',\n 'conditions' => array(\n 'Product.category_id = Category.id'\n )\n )\n ),\n 'fields' => array('Product.*', 'Category.*'),\n ));\n\n $totalProducts = $this->Product->find('count');\n\n $this->set('sort', strtolower($sort));\n $this->set('direction', strtolower($direction));\n $this->set('page', $page);\n $this->set('totalPage', ceil($totalProducts / 10));\n $this->set('products', $products);\n }",
"public function index(Request $request){\n $products=Product::where(['user_id' => Auth::user()->id])->paginate(10);\n $sortingBy = $request->input('sortingBy');\n if($sortingBy == 'best_seller'){\n $products=Product::where(['user_id' => Auth::user()->id])\n ->withCount('review')->orderBy('review_count','desc')\n ->paginate(10);\n }elseif($sortingBy =='terbaik'){\n $products=Product::where(['user_id' => Auth::user()->id])\n ->orderBy('sold','desc')\n ->paginate(10);\n }elseif($sortingBy == 'termurah'){\n $products=Product::where(['user_id' => Auth::user()->id])\n ->orderBy('price','asc')\n ->paginate(10);\n }elseif($sortingBy == 'termahal'){\n $products=Product::where(['user_id' => Auth::user()->id])\n ->orderBy('price','desc')\n ->paginate(10);\n }elseif($sortingBy == 'terbaru'){\n $products=Product::where(['user_id' => Auth::user()->id])\n ->orderBy('created_at','desc')\n ->paginate(10);\n }\n if($request->ajax()){\n return view('admin.products.index', compact('products'))->renderSections()['content'];\n }else{\n return view('admin.products.index', compact('products'));\n\n }\n }",
"public function index(Request $request)\n {\n if ($request->search){\n $pro = Product::where('pro_name','like','%'.$request->search.'%')->simplePaginate(10);\n return view('back-end.page.product.list',compact('pro'));\n }\n if ($request->order_by){\n switch ($request->order_by){\n case 'new':\n $pro = DB::table('products')->join('category','products.pro_cate','=','category.cate_id')->orderBy('pro_id','DESC')->simplePaginate(10);\n break;\n case 'old':\n $pro = DB::table('products')->join('category','products.pro_cate','=','category.cate_id')->orderBy('pro_id','ASC')->simplePaginate(10);\n break;\n case 'price_max':\n $pro = DB::table('products')->join('category','products.pro_cate','=','category.cate_id')->orderBy('pro_price','ASC')->simplePaginate(10);\n break;\n case 'price_min':\n $pro = DB::table('products')->join('category','products.pro_cate','=','category.cate_id')->orderBy('pro_price','DESC')->simplePaginate(10);\n break;\n case 'view':\n $pro = DB::table('products')->join('category','products.pro_cate','=','category.cate_id')->orderBy('views','DESC')->simplePaginate(10);\n break;\n case 'order':\n $pro = DB::table('products')->join('category','products.pro_cate','=','category.cate_id')->orderBy('pro_done','DESC')->simplePaginate(10);\n break;\n }\n }else{\n $pro = DB::table('products')->join('category','products.pro_cate','=','category.cate_id')->orderBy('pro_id','DESC')->simplePaginate(10);\n }\n return view('back-end.page.product.list',compact('pro'));\n }",
"public function getPage($page, $filters = NULL, $options = NULL) {\n // translate $page to offset\n if (is_numeric($page) AND $page > 1) {\n $offset = self::LIMIT * ($page - 1);\n } else {\n $offset = 0;\n }\n\n // access database\n $this->db->select(\n // product\n 'product.product_id, product.name, product.price, product.quantity_in_stock, product.show, product.author, '.\n // product_type\n 'product_type.product_type_name '\n );\n $this->db->from('product');\n\n // add filters as needed\n if (isset($filters['name'])) {\n if (isset($options['search']) AND $options['search'] == 'and') {\n $this->db->like('name', $filters['name'], 'both');\n } else {\n $this->db->or_like('name', $filters['name'], 'both');\n }\n }\n if (isset($filters['author'])) {\n if (isset($options['search']) AND $options['search'] == 'and') {\n $this->db->like('author', $filters['author'], 'both');\n } else {\n $this->db->or_like('author', $filters['author'], 'both');\n }\n }\n\n $this->db->join('product_type', 'product.product_type_id = product_type.product_type_id', 'left');\n $this->db->limit(self::LIMIT, $offset);\n\n\n if (\n isset($options['quantity_order']) AND\n in_array($options['quantity_order'], ['ASC', 'DESC'])\n ) {\n $this->db->order_by('quantity_in_stock', $options['quantity_order']);\n $this->db->order_by('product_id', 'DESC');\n } else {\n $this->db->order_by('product_id', 'DESC');\n }\n return $this->db->get()->result_array();\n }",
"public function indexAction() \n {\n $form = new Core_Form_Product_Search;\n $form->populate($_GET);\n $this->view->form = $form;\n \n $paginator = $this->_model->getPaginator('',$this->_getParam('sort')); \n\n $paginator->setCurrentPageNumber($this->_getParam('page'));\n\n $this->view->paginator = $paginator;\n\t\n }",
"public function products($params)\r\n {\r\n \t$_query = array('page' => isset($params['page']) ? $params['page'] : 1);\r\n\r\n return $this->curl_execute($method = 'products', $_query);\r\n }",
"public function getPaginate(){ }",
"public function showSomeAction() \n\t{\n\t\t//récupération des produits à afficher sur la page\n\t\t$productsManager = new ProductsManager();\n\t\t$currentPage = array_key_exists('page', $_GET)? $_GET['page'] : 1;\n\t\t$numberByPage = PRODUCTS_BY_PAGE;\n\t\t$paginationStart = array_key_exists('page', $_GET)? ($_GET['page']-1)*$numberByPage : 0;\n\t\t$paginationStartShowed = array_key_exists('page', $_GET)? $paginationStart+1 : 1;\n\t\t$productsNumber = $productsManager -> count();\n\t\t$pagesNumber = ceil($productsNumber / $numberByPage);\n\t\t$paginationEnd = $paginationStart + $numberByPage > $productsNumber? $productsNumber : $paginationStart + $numberByPage;\n\t\t$products = $productsManager -> getAllOnPage($paginationStart, $numberByPage);\n\n\t\t$this->viewData['pagination'] = $pagination = \n\t\t[\n\t\t\t'currentPage' => $currentPage,\n\t\t\t'paginationStart' => $paginationStart,\n\t\t\t'paginationStartShowed' => $paginationStartShowed,\n\t\t\t'numberByPage' => $numberByPage,\n\t\t\t'productsNumber' => $productsNumber,\n\t\t\t'pagesNumber' => $pagesNumber,\n\t\t\t'paginationEnd' => $paginationEnd,\n\t\t\t'products' => $products\n\t\t];\n\n\t\t//vérification du numéro de page\n\t\tif ($pagination['currentPage'] < 1 OR $pagination['currentPage'] > $pagination['pagesNumber']) \n\t\t{\n\t\t\theader('Location:'.CLIENT_ROOT);\n\t\t\texit();\n\t\t}\n\t\t$this -> generateView('products/show-some.phtml');\n\t}",
"function prepare_items() {\n\t\t\n\t\t// Get how many records per page to show\n\t\t$per_page\t= $this->per_page;\n\t\t\n\t\t// Get All, Hidden, Sortable columns\n\t\t$columns\t= $this->get_columns();\n\t\t$hidden \t= array();\n\t\t$sortable \t= $this->get_sortable_columns();\n\t\t\n\t\t// Get final column header\n\t\t$this->_column_headers = array($columns, $hidden, $sortable);\n\t\t\n\t\t// Get Data of particular page\n\t\t$data_res \t= $this->bdpp_display_styles_list();\n\t\t$data \t\t= $data_res['data'];\n\t\t\n\t\t// Get current page number\n\t\t$current_page = $this->get_pagenum();\n\t\t\n\t\t// Get total count\n\t\t$total_items = $data_res['total'];\n\t\t\n\t\t// Get page items\n\t\t$this->items = $data;\n\t\t\n\t\t// Register pagination options and calculations.\n\t\t$this->set_pagination_args( array(\n\t\t\t\t\t\t\t\t\t\t\t'total_items' => $total_items, // Calculate the total number of items\n\t\t\t\t\t\t\t\t\t\t\t'per_page' => $per_page, // Determine how many items to show on a page\n\t\t\t\t\t\t\t\t\t\t\t'total_pages' => ceil($total_items / $per_page)\t// Calculate the total number of pages\n\t\t\t\t\t\t\t\t\t\t));\n\t}",
"public function getTop10Products($start = '2020-01-01', $end = '2021-12-31', $source = 'internal'){\n if ($source == 'internal') {\n $this->db->query('SELECT new_order_items.product_id,\n SUM(new_order_items.quantity) as total_quantity\n FROM new_order_items\n RIGHT JOIN new_customer_orders on\n new_customer_orders.order_id = new_order_items.order_id\n WHERE new_customer_orders.ordered_at >= :start and new_customer_orders.ordered_at <= :end and new_customer_orders.order_status = \"PENDING\"\n GROUP BY new_order_items.product_id\n ORDER BY total_quantity DESC\n LIMIT 10\n ;');\n } else if ($source == 'external') {\n $this->db->query('SELECT product_id,\n SUM(order_quantity) as total_quantity\n FROM new_external_orders\n WHERE ordered_at >= :start and ordered_at <= :end and order_status = \"PENDING\"\n GROUP BY product_id\n ORDER BY total_quantity DESC\n LIMIT 10\n ;');\n }\n $this->db->bind(':start', $start);\n $this->db->bind(':end', $end);\n $results = $this->db->resultSet();\n return $results;\n }",
"public function getTop25Products($start = '2020-01-01', $end = '2021-12-31', $source = 'internal'){\n if ($source == 'internal') {\n $this->db->query('SELECT new_order_items.product_id,\n SUM(new_order_items.quantity) as total_quantity\n FROM new_order_items\n RIGHT JOIN new_customer_orders on\n new_customer_orders.order_id = new_order_items.order_id\n WHERE new_customer_orders.ordered_at >= :start and new_customer_orders.ordered_at <= :end and new_customer_orders.order_status = \"PENDING\"\n GROUP BY new_order_items.product_id\n ORDER BY total_quantity DESC\n LIMIT 25\n ;');\n } else if ($source == 'external') {\n $this->db->query('SELECT product_id,\n SUM(order_quantity) as total_quantity\n FROM new_external_orders\n WHERE ordered_at >= :start and ordered_at <= :end and order_status = \"PENDING\"\n GROUP BY product_id\n ORDER BY total_quantity DESC\n LIMIT 25\n ;');\n }\n $this->db->bind(':start', $start);\n $this->db->bind(':end', $end);\n $results = $this->db->resultSet();\n return $results;\n }",
"public function index()\n\t{ \n\t\t// Get data\n\n\t $entries = ProductService::where('type','product')->paginate(10); \n\n\t $this->layout->title = 'Proizvodi | BillingCRM';\n\t \n\t $this->layout->content = View::make('backend.product.index', compact('entries'));\n\n\t}",
"public function actionIndex()\n\t{\n\t\tif (!isset(Yii::app()->session['productPageSize']))\n\t\t\tYii::app()->session['productPageSize'] = Product::PAGE_SIZE;\n\n\t\t$criteria = new CDBCriteria();\n\t\t$criteria->compare('status',true);\n\t\t$criteria->order = \"order_view desc, id desc\";\n\n\t\t$count = Product::model()->count($criteria);\n\t\t$pages = new CPagination($count);\n\t\t$pages->setPageSize(Yii::app()->session['productPageSize']);\n\t\t$item_count = ceil($count/Yii::app()->session['productPageSize']);\n\t\t$pages->applyLimit($criteria);\n\n\t\t$list_product = Product::model()->findAll($criteria);\n\n\t\t$this->iPhoenixRender('index',array(\n\t\t\t'list_product'=>$list_product,\n\t\t\t'item_count' => $item_count,\n\t\t\t'pages' => $pages,\n\t\t\t'page_size' => 1,\n\t\t\t'count' => $count\n\t\t));\n\t}",
"public function all_products()\n\t{\n\t\t$data['product_list']=$this->tbl_product->get_all_product();\n\t\t$data['page']='All Products';\n\t\tif (!$this->input->is_ajax_request()) {\n\t\t\t$view = 'admin/collection/admin_all_product_list';\n\t\t\techo Modules::run('template/admin_template', $view, $data);\t\n\t\t}else{\n\n\t\t}\n\t\t\n\t}",
"function paginateWithExtra($size = 15);",
"function products(){\n\t\tif(isset($_POST['Controller']) && $_POST['Controller'] == \"AddToCart\" && isset($_POST['qty']) && isset($_POST['id']) && isset($_POST['price']) ){\n\t\t\t$this->addToCart();\n\t\t\treturn;\n\t\t}\n\t\t$myBuff = ''; // Buffer holding HTML from our templates \n\t\t$PString = ''; // Empty string to hold our pagination\n\t\ttry {\n\t\t\tif(isset($_GET['id'])){\n\t\t\t\tif($contBuff=$this->LoadTemplate($this->rp.$this->TEMPPath.$this->TEMP['pLarge'])){\n\t\t\t\t\t$programs = new SoapClient($this->HTTP.$this->URLS['programs']); // Initiate our SOAP client\n\t\t\t\t\t\n\t\t\t\t\t$wrapper = new stdClass;\n\t\t\t\t\t$wrapper->id = new SoapVar( $_GET['id'] , XSD_STRING, \"string\"); // Set our Start date\n\t\t\t\t\t\n\t\t\t\t\t$res = $programs->Get($wrapper); // Retrieve active programs from our SOAP client\n\t\t\t\t\t//var_dump($rows);\n\t\t\t\t\t$info=&$res->GetResult;\n\t\t\t\t\t\n\t\t\t\t\t$SDate=date(\"M j, Y\",strtotime($info->NITA_StartDate)); // format our program start date\n\t\t\t\t\t$EDate=date(\"M j, Y\",strtotime($info->NITA_EndDate)); // format our program end date\n\t\t\t\t\t$Facility=array();\n\t\t\t\t\tif(!is_null($info->NITA_FacilityName)) $Facility[]=$info->NITA_FacilityName;\n\t\t\t\t\tif(!is_null($info->NITA_FacilityAddr1)) $Facility[]=$info->NITA_FacilityAddr1;\n\t\t\t\t\tif(!is_null($info->NITA_FacilityAddr2)) $Facility[]=$info->NITA_FacilityAddr2;\n\t\t\t\t\tif(!is_null($info->NITA_FacilityAddr3)) $Facility[]=$info->NITA_FacilityAddr3;\n\t\t\t\t\tif(!is_null($info->NITA_FacilityAddr4)) $Facility[]=$info->NITA_FacilityAddr4;\n\t\t\t\t\tif(!is_null($info->NITA_FacilityCity) && !is_null($info->NITA_FacilityState) && !is_null($info->NITA_FacilityZip) )\n\t\t\t\t\t\t\t$Facility[]= (!is_null($info->NITA_FacilityCity)?$info->NITA_FacilityCity.', ':'').\n\t\t\t\t\t\t\t\t\t\t\t\t\t (!is_null($info->NITA_FacilityState)?$info->NITA_FacilityState.' ':'').\n\t\t\t\t\t\t\t\t\t\t\t\t\t (!is_null($info->NITA_FacilityZip)?$info->NITA_FacilityZip:'');\n\t\t\t\t\t\n\t\t\t\t\t$CLE=array();\n\t\t\t\t\tif(!is_null($info->Nita_50MinuteCredits)) $CLE[]=\"50 Minute Credits: \".$info->Nita_50MinuteCredits;\n\t\t\t\t\tif(!is_null($info->Nita_60MinuteCredits)) $CLE[]=\"60 Minute Credits: \".$info->Nita_60MinuteCredits;\n\t\t\t\t\tif(count($CLE)==0) $CLE[]=\"No CLE Credits\";\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$this->HTML.=$this->processCodes($contBuff,array('ID'\t\t\t\t=> $this->ckNULL($info->NITA_ProgramId),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'Name'\t\t\t=> $this->ckNULL($info->NITA_Title),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'Desc'\t\t\t=> $this->ckNULL($info->NITA_Description),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'SKU'\t\t\t=> $info->NITA_name,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'SDate'\t\t=> $SDate,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'EDate'\t\t=> $EDate,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'Avail'\t\t=> 'Open to Registration',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'Fac'\t\t\t=> '<p>'.implode(\"<br />\",$Facility).'</p>',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'CLE'\t\t\t=> '<p>'.implode(\"<br />\",$CLE).'</p>',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'Price'\t\t=> '$'.number_format($this->ckNULL($info->NITA_TuitionPriceStandard),2,'.',','),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'PriceInt'\t=> $this->ckNULL($info->NITA_TuitionPriceStandard),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'Attr'\t\t\t=> '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'AddCart'\t=> $_SERVER['PHP_SELF'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'URL'\t\t\t=> $this->Files['prodDet'].'?id='.$info->NITA_ProgramId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ));\n\t\t\t\t} else throw new FatalError('Cannot open template '.$this->TEMP['pLarge']);\n\t\t\t} else { // If we have not selected a program to look at provide a list of programs.\n\t\t\t\t$programs = new SoapClient($this->HTTP.$this->URLS['programs']); // Initiate our SOAP client\n\t\t\t\t// var_dump($programs->__getFunctions() ); // Dumps the active function from our client\n\t\t\t\t$wrapper = new stdClass;\n\t\t\t\t$wrapper->startDate = new SoapVar( date(\"c\") , XSD_DATETIME, \"dateTime\"); // Set our Start date\n\t\t\t\t$wrapper->endDate = new SoapVar( date(\"c\",mktime(0,0,0,date(\"m\"),date(\"d\"),date(\"Y\")+5 ) ), XSD_DATETIME, \"dateTime\"); // Drop an end date a year out\n\t\n\t\t\t\t$rows = $programs->GetActivePrograms($wrapper); // Retrieve active programs from our SOAP client\n\t\t\t\tif(isset($_GET['s'])) $this->SKey=explode(',',$_GET['s']);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tif($contBuff=$this->LoadTemplate($this->rp.$this->TEMPPath.$this->TEMP['pListCont'])){ // Get our product list template from the server\n\t\t\t\t\t$contBuff=$this->processCodes($contBuff, array(\t'SortTitle'\t\t=>$_SERVER['PHP_SELF'].'?s=Name,'.(($this->SKey[0]=='Name' && $this->SKey[1]=='ASC')?'DESC':'ASC'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'SortDate'\t\t=>$_SERVER['PHP_SELF'].'?s=Date,'.(($this->SKey[0]=='Date' && $this->SKey[1]=='ASC')?'DESC':'ASC'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'SortLoc'\t\t\t=>$_SERVER['PHP_SELF'].'?s=Location,'.(($this->SKey[0]=='Location' && $this->SKey[1]=='ASC')?'DESC':'ASC'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'SortPrice'\t\t=>$_SERVER['PHP_SELF'].'?s=Price,'.(($this->SKey[0]=='Price' && $this->SKey[1]=='ASC')?'DESC':'ASC')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)); // Drop our sorting links into the product list\n\t\t\t\t\t//var_dump($rows);\n\t\t\t\t\t$programs=&$rows->GetActiveProgramsResult->ProgramModel;// Set our list of programs to an array for easier use\t\t\t\t\n\t\t\t\t\t$Sorting=array();// Our Sorting header\n\t\t\t\t\tif( is_array($this->SArray[$this->SKey[0]]) ) foreach($this->SArray[$this->SKey[0]] as $Sort) $Sorting[$Sort]=$this->SKey[1];\n\t\t\t\t\telse $Sorting[$this->SArray[$this->SKey[0]]]=$this->SKey[1];\n\t\t\t\t\t\n\t\t\t\t\t$this->ObjectSorter($programs, $Sorting); // Sort our array of objects based on an object property\n\t\t\t\t\t\n\t\t\t\t\tif($itemBuff=$this->LoadTemplate($this->rp.$this->TEMPPath.$this->TEMP['pList'])){// Get Item templace from the server\n\t\t\t\t\t\tif(intval($this->Limit)>0){ \n\t\t\t\t\t\t\tif(isset($_GET['p'])) $this->Page=intval($_GET['p']);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->TotalRows = count($programs); // Total number of products in the database\n\t\t\t\t\t\t\t$this->TotalPages = ceil($this->TotalRows/$this->Limit)-1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$PString=$this->Pagination(); // Get our pagination string from our class function\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$programs = array_slice($programs, ($this->Page*$this->Limit), $this->Limit); // Get the programs on our selected page\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tforeach ($programs as $row){ // For each program set the appropriate data to our hooks\n\t\t\t\t\t\t\t$SDate=date(\"M j, Y\",strtotime($row->NITA_StartDate)); // format our program start date\n\t\t\t\t\t\t\t$EDate=date(\"M j, Y\",strtotime($row->NITA_EndDate)); // format our program end date\n\t\t\t\t\t\t\t$myBuff.=$this->processCodes($itemBuff,array('ID'=>\t\t\t\t$this->ckNULL($row->NITA_ProgramId\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'Name'=>\t\t\t$this->ckNULL($row->NITA_Title\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'SDate'=>\t\t$SDate,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'EDate'=>\t\t$EDate,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'City'=>\t\t\t$this->ckNULL($row->NITA_FacilityCity\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'State'=>\t\t$this->ckNULL($row->NITA_FacilityState\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'Price'=>\t\t'$'.number_format($this->ckNULL($row->NITA_TuitionPriceStandard),2,'.',','),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'PriceInt'=>\t$this->ckNULL($row->NITA_TuitionPriceStandard),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'AddCart'=>\t$_SERVER['PHP_SELF'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'URL'=>\t\t\t$this->Files['prodDet'].'?id='.$this->ckNULL($row->NITA_ProgramId)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tunset($programs);\n\t\t\t\t\t} else throw new FatalError('Cannot open template '.$this->TEMP['pList']);\n\t\t\t\t\t$this->HTML.=str_replace(\"[List]\", $myBuff, $contBuff); // Place our products into our template\n\t\t\t\t} else throw new FatalError('Cannot open template '.$this->TEMP['pListCont']);\n\t\t\t}\n\t\t\t$this->HTML=$PString.$this->HTML.$PString;\n\t\t} catch (FatalError $e) {\n\t\t\t$this->NitaERROR(102, $e->getMessage()); // Coding fault 102\n\t\t} catch (SoapFault $fault) {\n\t\t\t//echo '<pre>';\n\t\t\t//var_dump($fault);\n\t\t\t//echo '</pre>';\n\t\t\t$this->NitaERROR(101, $fault->faultcode.\", \".$fault->faultstring); // SOAP fault 101, error to our SOAP connection\n\t\t} catch (Exception $e) {\n\t\t\t$this->NitaERROR(103, $e->getMessage()); // Catch all error 103\n\t\t}\n\t}",
"function MyMod_Paging_NPages_Set()\n {\n if ($this->NumberOfItems>$this->NItemsPerPage)\n {\n $this->MyMod_Paging_N=intval($this->NumberOfItems/$this->NItemsPerPage);\n $res=$this->NumberOfItems % $this->NItemsPerPage;\n if ($res>0) { $this->MyMod_Paging_N++; }\n }\n elseif ($this->NumberOfItems>0)\n {\n $this->MyMod_Paging_N=1;\n }\n else\n {\n $this->MyMod_Paging_N=0;\n }\n }"
] | [
"0.7094803",
"0.69295263",
"0.6808069",
"0.6734872",
"0.6727695",
"0.67153203",
"0.6694537",
"0.6688724",
"0.66794324",
"0.66738987",
"0.6614161",
"0.65810066",
"0.6577566",
"0.6577566",
"0.6577121",
"0.6550058",
"0.6549534",
"0.6529021",
"0.65032494",
"0.6491343",
"0.64868295",
"0.64845306",
"0.64522344",
"0.6449715",
"0.6431178",
"0.64209163",
"0.6364401",
"0.63529134",
"0.6284588",
"0.6283944",
"0.628291",
"0.62777877",
"0.6267473",
"0.626676",
"0.626676",
"0.6259913",
"0.6258511",
"0.62562597",
"0.6254098",
"0.6254098",
"0.6254098",
"0.6254098",
"0.6253186",
"0.6253126",
"0.62278044",
"0.62209326",
"0.61882",
"0.61792046",
"0.61671346",
"0.61615616",
"0.61590475",
"0.61510926",
"0.6140442",
"0.6097941",
"0.6089268",
"0.60707754",
"0.6068871",
"0.6068627",
"0.6063433",
"0.606155",
"0.6055639",
"0.6053285",
"0.60295933",
"0.6025899",
"0.6018542",
"0.6007929",
"0.5985645",
"0.59856105",
"0.59832555",
"0.5982731",
"0.5978907",
"0.5977401",
"0.59746563",
"0.59742963",
"0.59671557",
"0.596586",
"0.59616435",
"0.5960775",
"0.59565824",
"0.59506583",
"0.59485143",
"0.5945358",
"0.59446365",
"0.5943436",
"0.5938025",
"0.5927758",
"0.59231955",
"0.5916613",
"0.5915227",
"0.59127206",
"0.59104437",
"0.59029627",
"0.59023917",
"0.5902165",
"0.5896899",
"0.5896704",
"0.589203",
"0.5886403",
"0.5884972",
"0.58849484",
"0.5879096"
] | 0.0 | -1 |
Bootstrap any application services. | public function boot()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function bootstrap(): void\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n $this->app->loadDeferredProviders();\n }",
"public function boot()\n {\n // Boot here application\n }",
"public function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrapperList);\n }\n\n $this->app->loadDeferredProviders();\n }",
"public function boot()\r\n {\r\n // Publishing is only necessary when using the CLI.\r\n if ($this->app->runningInConsole()) {\r\n $this->bootForConsole();\r\n }\r\n }",
"public function boot()\n {\n $this->app->bind(IUserService::class, UserService::class);\n $this->app->bind(ISeminarService::class, SeminarService::class);\n $this->app->bind(IOrganizationService::class, OrganizationService::class);\n $this->app->bind(ISocialActivityService::class, SocialActivityService::class);\n }",
"public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->loadedServices, function ($s) {\n $this->bootService($s);\n });\n\n $this->booted = true;\n }",
"public function boot()\n {\n\n $this->app->bind(FileUploaderServiceInterface::class,FileUploaderService::class);\n $this->app->bind(ShopServiceInterface::class,ShopService::class);\n $this->app->bind(CategoryServiceInterface::class,CategoryService::class);\n $this->app->bind(ProductServiceInterface::class,ProductService::class);\n $this->app->bind(ShopSettingsServiceInterface::class,ShopSettingsService::class);\n $this->app->bind(FeedbackServiceInterface::class,FeedbackService::class);\n $this->app->bind(UserServiceInterface::class,UserService::class);\n $this->app->bind(ShoppingCartServiceInterface::class,ShoppingCartService::class);\n $this->app->bind(WishlistServiceInterface::class,WishlistService::class);\n $this->app->bind(NewPostApiServiceInterface::class,NewPostApiService::class);\n $this->app->bind(DeliveryAddressServiceInterface::class,DeliveryAddressService::class);\n $this->app->bind(StripeServiceInterface::class,StripeService::class);\n $this->app->bind(OrderServiceInterface::class,OrderService::class);\n $this->app->bind(MailSenderServiceInterface::class,MailSenderSenderService::class);\n }",
"public function boot()\n {\n $this->setupConfig('delta_service');\n $this->setupMigrations();\n $this->setupConnection('delta_service', 'delta_service.connection');\n }",
"public function boot()\n {\n $configuration = [];\n\n if (file_exists($file = getcwd() . '/kaleo.config.php')) {\n $configuration = include_once $file;\n }\n\n $this->app->singleton('kaleo', function () use ($configuration) {\n return new KaleoService($configuration);\n });\n }",
"public function boot()\n {\n $this->shareResources();\n $this->mergeConfigFrom(self::CONFIG_PATH, 'amocrm-api');\n }",
"public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }",
"public function boot()\n {\n // Ports\n $this->app->bind(\n IAuthenticationService::class,\n AuthenticationService::class\n );\n $this->app->bind(\n IBeerService::class,\n BeerService::class\n );\n\n // Adapters\n $this->app->bind(\n IUserRepository::class,\n UserEloquentRepository::class\n );\n $this->app->bind(\n IBeerRepository::class,\n BeerEloquentRepository::class\n );\n }",
"public function boot()\n {\n $this->setupConfig($this->app);\n }",
"public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->loadMigrations();\n }\n if(config($this->vendorNamespace. '::config.enabled')){\n Livewire::component($this->vendorNamespace . '::login-form', LoginForm::class);\n $this->loadRoutes();\n $this->loadViews();\n $this->loadMiddlewares();\n $this->loadTranslations();\n }\n }",
"public function boot()\n {\n $source = dirname(__DIR__, 3) . '/config/config.php';\n\n if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) {\n $this->publishes([$source => config_path('dubbo_cli.php')]);\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('dubbo_cli');\n }\n\n $this->mergeConfigFrom($source, 'dubbo_cli');\n }",
"public function boot()\n {\n $this->package('domain/app');\n\n $this->setApplication();\n }",
"public function boot()\n {\n $this->setUpConfig();\n $this->setUpConsoleCommands();\n }",
"public function boot()\n {\n $this->strapRoutes();\n $this->strapViews();\n $this->strapMigrations();\n $this->strapCommands();\n\n $this->registerPolicies();\n }",
"public function boot()\n {\n $this->app->singleton('LaraCurlService', function ($app) {\n return new LaraCurlService();\n });\n\n $this->loadRoutesFrom(__DIR__.'/routes/web.php');\n }",
"public function boot()\n {\n $providers = $this->make('config')->get('app.console_providers', array());\n foreach ($providers as $provider) {\n $provider = $this->make($provider);\n if ($provider && method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }",
"public function boot()\n {\n foreach (glob(app_path('/Api/config/*.php')) as $path) {\n $path = realpath($path);\n $this->mergeConfigFrom($path, basename($path, '.php'));\n }\n\n // 引入自定义函数\n foreach (glob(app_path('/Helpers/*.php')) as $helper) {\n require_once $helper;\n }\n // 引入 api 版本路由\n $this->loadRoutesFrom(app_path('/Api/Routes/base.php'));\n\n }",
"public function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n //$this->app->loadDeferredProviders();\n\n if (!$this->commandsLoaded) {\n //$this->commands();\n\n $this->commandsLoaded = true;\n }\n }",
"protected function boot()\n\t{\n\t\tforeach ($this->serviceProviders as $provider)\n\t\t{\n\t\t\t$provider->boot($this);\n\t\t}\n\n\t\t$this->booted = true;\n\t}",
"public function boot()\n {\n $this->setupConfig();\n //register rotating daily monolog provider\n $this->app->register(MonologProvider::class);\n $this->app->register(CircuitBreakerServiceProvider::class);\n $this->app->register(CurlServiceProvider::class);\n }",
"public function boot(): void\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->services, function ($service) {\n $this->bootServices($service);\n });\n\n $this->booted = true;\n }",
"public static function boot() {\n\t\tstatic::container()->boot();\n\t}",
"public function boot()\n {\n include_once('ComposerDependancies\\Global.php');\n //---------------------------------------------\n include_once('ComposerDependancies\\League.php');\n include_once('ComposerDependancies\\Team.php');\n include_once('ComposerDependancies\\Matchup.php');\n include_once('ComposerDependancies\\Player.php');\n include_once('ComposerDependancies\\Trade.php');\n include_once('ComposerDependancies\\Draft.php');\n include_once('ComposerDependancies\\Message.php');\n include_once('ComposerDependancies\\Poll.php');\n include_once('ComposerDependancies\\Chat.php');\n include_once('ComposerDependancies\\Rule.php');\n\n \n include_once('ComposerDependancies\\Admin\\Users.php');\n\n }",
"public function boot()\n {\n if ($this->app->runningInConsole()) {\n if ($this->app instanceof LaravelApplication) {\n $this->publishes([\n __DIR__.'/../config/state-machine.php' => config_path('state-machine.php'),\n ], 'config');\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('state-machine');\n }\n }\n }",
"public function boot()\n {\n $this->bootEvents();\n\n $this->bootPublishes();\n\n $this->bootTypes();\n\n $this->bootSchemas();\n\n $this->bootRouter();\n\n $this->bootViews();\n \n $this->bootSecurity();\n }",
"public function boot()\n {\n //\n Configuration::environment(\"sandbox\");\n Configuration::merchantId(\"cmpss9trsxsr4538\");\n Configuration::publicKey(\"zy3x5mb5jwkcrxgr\");\n Configuration::privateKey(\"4d63c8b2c340daaa353be453b46f6ac2\");\n\n\n $modules = Directory::listDirectories(app_path('Modules'));\n\n foreach ($modules as $module)\n {\n $routesPath = app_path('Modules/' . $module . '/routes.php');\n $viewsPath = app_path('Modules/' . $module . '/Views');\n\n if (file_exists($routesPath))\n {\n require $routesPath;\n }\n\n if (file_exists($viewsPath))\n {\n $this->app->view->addLocation($viewsPath);\n }\n }\n }",
"public function boot()\n {\n resolve(EngineManager::class)->extend('elastic', function () {\n return new ElasticScoutEngine(\n ElasticBuilder::create()\n ->setHosts(config('scout.elastic.hosts'))\n ->build()\n );\n });\n }",
"public function boot(): void\n {\n try {\n // Just check if we have DB connection! This is to avoid\n // exceptions on new projects before configuring database options\n // @TODO: refcator the whole accessareas retrieval to be file-based, instead of db based\n DB::connection()->getPdo();\n\n if (Schema::hasTable(config('cortex.foundation.tables.accessareas'))) {\n // Register accessareas into service container, early before booting any module service providers!\n $this->app->singleton('accessareas', fn () => app('cortex.foundation.accessarea')->where('is_active', true)->get());\n }\n } catch (Exception $e) {\n // Be quiet! Do not do or say anything!!\n }\n\n $this->bootstrapModules();\n }",
"public function boot()\n {\n $this->app->register(UserServiceProvider::class);\n $this->app->register(DashboardServiceProvider::class);\n $this->app->register(CoreServiceProvider::class);\n $this->app->register(InstitutionalVideoServiceProvider::class);\n $this->app->register(InstitutionalServiceProvider::class);\n $this->app->register(TrainingServiceProvider::class);\n $this->app->register(CompanyServiceProvider::class);\n $this->app->register(LearningUnitServiceProvider::class);\n $this->app->register(PublicationServiceProvider::class);\n }",
"public function boot()\n {\n Schema::defaultStringLength(191);\n\n $this->app->bindMethod([SendMailPasswordReset::class, 'handle'], function ($job, $app) {\n return $job->handle($app->make(MailService::class));\n });\n\n $this->app->bindMethod([ClearTokenPasswordReset::class, 'handle'], function ($job, $app) {\n return $job->handle($app->make(PasswordResetRepository::class));\n });\n\n $this->app->bind(AuthService::class, function ($app) {\n return new AuthService($app->make(HttpService::class));\n });\n }",
"public function boot()\n {\n $this->makeRepositories();\n }",
"public function boot(): void\n {\n $this->loadMiddlewares();\n }",
"public function boot()\n {\n $this->app->when(ChatAPIChannel::class)\n ->needs(ChatAPI::class)\n ->give(function () {\n $config = config('services.chatapi');\n return new ChatAPI(\n $config['token'],\n $config['api_url']\n );\n });\n }",
"public function boot() {\r\n\t\t$hosting_service = HostResolver::get_host_service();\r\n\r\n\t\tif ( ! empty( $hosting_service ) ) {\r\n\t\t\t$this->provides[] = $hosting_service;\r\n\t\t}\r\n\t}",
"public function boot()\n {\n if ($this->app->runningInConsole()) {\n require(__DIR__ . '/../routes/console.php');\n } else {\n // Menus for BPM are done through middleware. \n Route::pushMiddlewareToGroup('web', AddToMenus::class);\n \n // Assigning to the web middleware will ensure all other middleware assigned to 'web'\n // will execute. If you wish to extend the user interface, you'll use the web middleware\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(__DIR__ . '/../routes/web.php');\n \n // If you wish to extend the api, be sure to utilize the api middleware. In your api \n // Routes file, you should prefix your routes with api/1.0\n Route::middleware('api')\n ->namespace($this->namespace)\n ->prefix('api/1.0')\n ->group(__DIR__ . '/../routes/api.php');\n \n Event::listen(ScreenBuilderStarting::class, function($event) {\n $event->manager->addScript(mix('js/screen-builder-extend.js', 'vendor/api-connector'));\n $event->manager->addScript(mix('js/screen-renderer-extend.js', 'vendor/api-connector'));\n });\n }\n\n // load migrations\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n\n // Load our views\n $this->loadViewsFrom(__DIR__.'/../resources/views/', 'api-connector');\n\n // Load our translations\n $this->loadTranslationsFrom(__DIR__.'/../lang', 'api-connector');\n\n $this->publishes([\n __DIR__.'/../public' => public_path('vendor/api-connector'),\n ], 'api-connector');\n\n $this->publishes([\n __DIR__ . '/../database/seeds' => database_path('seeds'),\n ], 'api-connector');\n\n $this->app['events']->listen(PackageEvent::class, PackageListener::class);\n }",
"public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->bindCommands();\n $this->registerCommands();\n $this->app->bind(InstallerContract::class, Installer::class);\n\n $this->publishes([\n __DIR__.'/../config/exceptionlive.php' => base_path('config/exceptionlive.php'),\n ], 'config');\n }\n\n $this->registerMacros();\n }",
"public function boot(){\r\n $this->app->configure('sdk');\r\n $this->publishes([\r\n __DIR__.'/../../resources/config/sdk.php' => config_path('sdk.php')\r\n ]);\r\n $this->mergeConfigFrom(__DIR__.'/../../resources/config/sdk.php','sdk');\r\n\r\n $api = config('sdk.api');\r\n foreach($api as $key => $value){\r\n $this->app->singleton($key,$value);\r\n }\r\n }",
"public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n EnvironmentCommand::class,\n EventGenerateCommand::class,\n EventMakeCommand::class,\n JobMakeCommand::class,\n KeyGenerateCommand::class,\n MailMakeCommand::class,\n ModelMakeCommand::class,\n NotificationMakeCommand::class,\n PolicyMakeCommand::class,\n ProviderMakeCommand::class,\n RequestMakeCommand::class,\n ResourceMakeCommand::class,\n RuleMakeCommand::class,\n ServeCommand::class,\n StorageLinkCommand::class,\n TestMakeCommand::class,\n ]);\n }\n }",
"public function boot()\n {\n $this->app->bind(WeatherInterface::class, OpenWeatherMapService::class);\n $this->app->bind(OrderRepositoryInterface::class, EloquentOrderRepository::class);\n $this->app->bind(NotifyInterface::class, EmailNotifyService::class);\n }",
"public function boot()\n {\n $this->app->bind(DateService::class,DateServiceImpl::class);\n $this->app->bind(DisasterEventQueryBuilder::class,DisasterEventQueryBuilderImpl::class);\n $this->app->bind(MedicalFacilityQueryBuilder::class,MedicalFacilityQueryBuilderImpl::class);\n $this->app->bind(RefugeCampQueryBuilder::class,RefugeCampQueryBuilderImpl::class);\n $this->app->bind(VictimQueryBuilder::class,VictimQueryBuilderImpl::class);\n $this->app->bind(VillageQueryBuilder::class,VillageQueryBuilderImpl::class);\n }",
"public function boot()\n {\n\t\tif ( $this->app->runningInConsole() ) {\n\t\t\t$this->loadMigrationsFrom(__DIR__.'/migrations');\n\n//\t\t\t$this->publishes([\n//\t\t\t\t__DIR__.'/config/scheduler.php' => config_path('scheduler.php'),\n//\t\t\t\t__DIR__.'/console/CronTasksList.php' => app_path('Console/CronTasksList.php'),\n//\t\t\t\t__DIR__.'/views' => resource_path('views/vendor/scheduler'),\n//\t\t\t]);\n\n//\t\t\tapp('Revolta77\\ScheduleMonitor\\Conntroller\\CreateController')->index();\n\n//\t\t\t$this->commands([\n//\t\t\t\tConsole\\Commands\\CreateController::class,\n//\t\t\t]);\n\t\t}\n\t\t$this->loadRoutesFrom(__DIR__.'/routes/web.php');\n }",
"public function boot()\n {\n $this->bootPackages();\n }",
"public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->commands($this->load(__DIR__.'/../Console', Command::class));\n }\n }",
"public function boot(): void\n {\n $this->publishes(\n [\n __DIR__ . '/../config/laravel_entity_services.php' =>\n $this->app->make('path.config') . DIRECTORY_SEPARATOR . 'laravel_entity_services.php',\n ],\n 'laravel_repositories'\n );\n $this->mergeConfigFrom(__DIR__ . '/../config/laravel_entity_services.php', 'laravel_entity_services');\n\n $this->registerCustomBindings();\n }",
"public function boot()\n {\n // DEFAULT STRING LENGTH\n Schema::defaultStringLength(191);\n\n // PASSPORT\n Passport::routes(function (RouteRegistrar $router)\n {\n $router->forAccessTokens();\n });\n Passport::tokensExpireIn(now()->addDays(1));\n\n // SERVICES, REPOSITORIES, CONTRACTS BINDING\n $this->app->bind('App\\Contracts\\IUser', 'App\\Repositories\\UserRepository');\n $this->app->bind('App\\Contracts\\IUserType', 'App\\Repositories\\UserTypeRepository');\n $this->app->bind('App\\Contracts\\IApiToken', 'App\\Services\\ApiTokenService');\n $this->app->bind('App\\Contracts\\IModule', 'App\\Repositories\\ModuleRepository');\n $this->app->bind('App\\Contracts\\IModuleAction', 'App\\Repositories\\ModuleActionRepository');\n }",
"public function bootstrap(): void\n {\n $globalConfigurationBuilder = (new GlobalConfigurationBuilder())->withEnvironmentVariables()\n ->withPhpFileConfigurationSource(__DIR__ . '/../config.php');\n (new BootstrapperCollection())->addMany([\n new DotEnvBootstrapper(__DIR__ . '/../.env'),\n new ConfigurationBootstrapper($globalConfigurationBuilder),\n new GlobalExceptionHandlerBootstrapper($this->container)\n ])->bootstrapAll();\n }",
"public function boot()\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'deniskisel');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'deniskisel');\n// $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n // $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }",
"public function boot()\n {\n $this->bootingDomain();\n\n $this->registerCommands();\n $this->registerListeners();\n $this->registerPolicies();\n $this->registerRoutes();\n $this->registerBladeComponents();\n $this->registerLivewireComponents();\n $this->registerSpotlightCommands();\n\n $this->bootedDomain();\n }",
"public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->registerMigrations();\n $this->registerMigrationFolder();\n $this->registerConfig();\n }\n }",
"public function boot()\n {\n $this->bootModulesMenu();\n $this->bootSkinComposer();\n $this->bootCustomBladeDirectives();\n }",
"public function boot(): void\n {\n $this->app->bind(Telegram::class, static function () {\n return new Telegram(\n config('services.telegram-bot-api.token'),\n new HttpClient()\n );\n });\n }",
"public function boot()\n {\n\n if (! config('app.installed')) {\n return;\n }\n\n $this->loadRoutesFrom(__DIR__ . '/Routes/admin.php');\n $this->loadRoutesFrom(__DIR__ . '/Routes/public.php');\n\n $this->loadMigrationsFrom(__DIR__ . '/Database/Migrations');\n\n// $this->loadViewsFrom(__DIR__ . '/Resources/Views', 'portfolio');\n\n $this->loadTranslationsFrom(__DIR__ . '/Resources/Lang/', 'contact');\n\n //Add menu to admin panel\n $this->adminMenu();\n\n }",
"public function boot()\n {\n if (! config('app.installed')) {\n return;\n }\n\n $this->app['config']->set([\n 'scout' => [\n 'driver' => setting('search_engine', 'mysql'),\n 'algolia' => [\n 'id' => setting('algolia_app_id'),\n 'secret' => setting('algolia_secret'),\n ],\n ],\n ]);\n }",
"protected function bootServiceProviders()\n {\n foreach($this->activeProviders as $provider)\n {\n // check if the service provider has a boot method.\n if (method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }",
"public function boot(): void\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'imc');\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'imc');\n $this->registerPackageRoutes();\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }",
"public function boot()\n {\n // Larapex Livewire\n $this->mergeConfigFrom(__DIR__ . '/../configs/larapex-livewire.php', 'larapex-livewire');\n\n $this->loadViewsFrom(__DIR__ . '/../resources/views', 'larapex-livewire');\n\n $this->registerBladeDirectives();\n\n if ($this->app->runningInConsole()) {\n $this->registerCommands();\n $this->publishResources();\n }\n }",
"public function boot()\n {\n // Bootstrap code here.\n $this->app->singleton(L9SmsApiChannel::class, function () {\n $config = config('l9smsapi');\n if (empty($config['token']) || empty($config['service'])) {\n throw new \\Exception('L9SmsApi missing token and service in config');\n }\n\n return new L9SmsApiChannel($config['token'], $config['service']);\n });\n\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../config/l9smsapi.php' => config_path('l9smsapi.php'),\n ], 'config');\n }\n }",
"public function boot()\n\t{\n\t\t$this->bindRepositories();\n\t}",
"public function boot()\n {\n if (!$this->app->runningInConsole()) {\n return;\n }\n\n $this->commands([\n ListenCommand::class,\n InstallCommand::class,\n EventsListCommand::class,\n ObserverMakeCommand::class,\n ]);\n\n foreach ($this->listen as $event => $listeners) {\n foreach ($listeners as $listener) {\n RabbitEvents::listen($event, $listener);\n }\n }\n }",
"public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n MultiAuthInstallCommand::class,\n ]);\n }\n }",
"public function boot() {\n\n\t\t$this->registerProviders();\n\t\t$this->bootProviders();\n\t\t$this->registerProxies();\n\t}",
"public function boot(): void\n {\n // routes\n $this->loadRoutes();\n // assets\n $this->loadAssets('assets');\n // configuration\n $this->loadConfig('configs');\n // views\n $this->loadViews('views');\n // view extends\n $this->extendViews();\n // translations\n $this->loadTranslates('views');\n // adminer\n $this->loadAdminer('adminer');\n // commands\n $this->loadCommands();\n // gates\n $this->registerGates();\n // listeners\n $this->registerListeners();\n // settings\n $this->applySettings();\n }",
"public function boot()\n {\n $this->setupFacades();\n $this->setupViews();\n $this->setupBlades();\n }",
"public function boot()\n {\n\n $this->app->translate_manager->addTranslateProvider(TranslateMenu::class);\n\n\n\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n $this->loadMigrationsFrom(__DIR__ . '/../migrations/');\n\n\n\n }",
"public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__ . '/../config/larkeauth-rbac-model.conf' => config_path('larkeauth-rbac-model.conf.larkeauth'),\n __DIR__ . '/../config/larkeauth.php' => config_path('larkeauth.php.larkeauth')\n ], 'larke-auth-config');\n\n $this->commands([\n Commands\\Install::class,\n Commands\\GroupAdd::class,\n Commands\\PolicyAdd::class,\n Commands\\RoleAssign::class,\n ]);\n }\n\n $this->mergeConfigFrom(__DIR__ . '/../config/larkeauth.php', 'larkeauth');\n\n $this->bootObserver();\n }",
"public function boot(): void\n {\n $this->app\n ->when(RocketChatWebhookChannel::class)\n ->needs(RocketChat::class)\n ->give(function () {\n return new RocketChat(\n new HttpClient(),\n Config::get('services.rocketchat.url'),\n Config::get('services.rocketchat.token'),\n Config::get('services.rocketchat.channel')\n );\n });\n }",
"public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n $this->app->registerConfiguredProvidersInRequest();\n\n $this->fireAppCallbacks($this->bootingCallbacks);\n\n /** array_walk\n * If when a provider booting, it reg some other providers,\n * then the new providers added to $this->serviceProviders\n * then array_walk will loop the new ones and boot them. // pingpong/modules 2.0 use this feature\n */\n array_walk($this->serviceProviders, function ($p) {\n $this->bootProvider($p);\n });\n\n $this->booted = true;\n\n $this->fireAppCallbacks($this->bootedCallbacks);\n }",
"public function boot()\n {\n $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }",
"public function boot()\n\t{\n\t\t$this->package('atlantis/admin');\n\n\t\t#i: Set the locale\n\t\t$this->setLocale();\n\n $this->registerServiceAdminValidator();\n $this->registerServiceAdminFactory();\n $this->registerServiceAdminDataTable();\n $this->registerServiceModules();\n\n\t\t#i: Include our filters, view composers, and routes\n\t\tinclude __DIR__.'/../../filters.php';\n\t\tinclude __DIR__.'/../../views.php';\n\t\tinclude __DIR__.'/../../routes.php';\n\n\t\t$this->app['events']->fire('admin.ready');\n\t}",
"public function boot()\n {\n $this->app->booted(function () {\n $this->callMethodIfExists('jobs');\n });\n }",
"public function boot()\n {\n $this->bootSetTimeLocale();\n $this->bootBladeHotelRole();\n $this->bootBladeHotelGuest();\n $this->bootBladeIcon();\n }",
"public function boot(): void\n {\n $this->registerRoutes();\n $this->registerResources();\n $this->registerMixins();\n\n if ($this->app->runningInConsole()) {\n $this->offerPublishing();\n $this->registerMigrations();\n }\n }",
"public function boot()\n {\n $this->dispatch(new SetCoreConnection());\n $this->dispatch(new ConfigureCommandBus());\n $this->dispatch(new ConfigureTranslator());\n $this->dispatch(new LoadStreamsConfiguration());\n\n $this->dispatch(new InitializeApplication());\n $this->dispatch(new AutoloadEntryModels());\n $this->dispatch(new AddAssetNamespaces());\n $this->dispatch(new AddImageNamespaces());\n $this->dispatch(new AddViewNamespaces());\n $this->dispatch(new AddTwigExtensions());\n $this->dispatch(new RegisterAddons());\n }",
"public function boot(): void\n {\n $this->loadViews();\n $this->loadTranslations();\n\n if ($this->app->runningInConsole()) {\n $this->publishMultipleConfig();\n $this->publishViews(false);\n $this->publishTranslations(false);\n }\n }",
"public function boot()\n {\n $this->bootForConsole();\n $this->loadRoutesFrom(__DIR__ . '/routes/web.php');\n $this->loadViewsFrom(__DIR__ . '/./../resources/views', 'bakerysoft');\n }",
"public function boot()\n {\n $this->app->booted(function () {\n $this->defineRoutes();\n });\n $this->defineResources();\n $this->registerDependencies();\n }",
"public function boot()\n {\n $this->app->bind(CustomersRepositoryInterface::class, CustomersRepository::class);\n $this->app->bind(CountryToCodeMapperInterface::class, CountryToCodeMapper::class);\n $this->app->bind(PhoneNumbersValidatorInterface::class, PhoneNumbersRegexValidator::class);\n $this->app->bind(CustomersFilterServiceInterface::class, CustomersFilterService::class);\n $this->app->bind(CacheInterface::class, CacheAdapter::class);\n\n }",
"public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([$this->configPath() => config_path('oauth.php')], 'oauth');\n }\n\n app()->bind(ClientToken::class, function () {\n return new ClientToken();\n });\n\n app()->bind(TokenParser::class, function () {\n return new TokenParser(\n app()->get(Request::class)\n );\n });\n\n app()->bind(OAuthClient::class, function () {\n return new OAuthClient(\n app()->get(Request::class),\n app()->get(ClientToken::class)\n );\n });\n\n app()->bind(AccountService::class, function () {\n return new AccountService(app()->get(OAuthClient::class));\n });\n }",
"public function boot()\n {\n Client::observe(ClientObserver::class);\n $this->app->bind(ClientRepositoryInterface::class, function ($app) {\n return new ClientRepository(Client::class);\n });\n $this->app->bind(UserRepositoryInterface::class, function ($app) {\n return new UserRepository(User::class);\n });\n }",
"public function boot()\n {\n $this->setupFacades(); \n //$this->setupConfigs(); \n }",
"public function boot()\n {\n if ($this->app->runningInConsole()) {\n //\n }\n\n $this->loadRoutesFrom(__DIR__ . '/routes.php');\n }",
"public function boot()\n {\n $path = __DIR__.'/../..';\n\n $this->package('clumsy/cms', 'clumsy', $path);\n\n $this->registerAuthRoutes();\n $this->registerBackEndRoutes();\n\n require $path.'/helpers.php';\n require $path.'/errors.php';\n require $path.'/filters.php';\n\n if ($this->app->runningInConsole()) {\n $this->app->make('Clumsy\\CMS\\Clumsy');\n }\n\n }",
"public function boot()\n {\n $this->mergeConfigFrom(__DIR__ . '/../../config/bs4.php', 'bs4');\n $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'bs');\n $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'bs');\n\n if ($this->app->runningInConsole())\n {\n $this->publishes([\n __DIR__ . '/../../resources/views' => resource_path('views/vendor/bs'),\n ], 'views');\n\n $this->publishes([\n __DIR__ . '/../../resources/lang' => resource_path('lang/vendor/bs'),\n ], 'lang');\n\n $this->publishes([\n __DIR__ . '/../../config' => config_path(),\n ], 'config');\n }\n }",
"public function boot()\n {\n $this->client = new HttpClient([\n 'base_uri' => 'https://api.ipfinder.io/v1/',\n 'headers' => [\n 'User-Agent' => 'Laravel-GeoIP-Torann',\n ],\n 'query' => [\n 'token' => $this->config('key'),\n ],\n ]);\n }",
"public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Check::class,\n Clear::class,\n Fix::class,\n Fresh::class,\n Foo::class,\n Ide::class,\n MakeDatabase::class,\n Ping::class,\n Version::class,\n ]);\n }\n }",
"public function boot()\n {\n $app = $this->app;\n\n if (!$app->runningInConsole()) {\n return;\n }\n\n $source = realpath(__DIR__ . '/config/config.php');\n\n if (class_exists('Illuminate\\Foundation\\Application', false)) {\n // L5\n $this->publishes([$source => config_path('sniffer-rules.php')]);\n $this->mergeConfigFrom($source, 'sniffer-rules');\n } elseif (class_exists('Laravel\\Lumen\\Application', false)) {\n // Lumen\n $app->configure('sniffer-rules');\n $this->mergeConfigFrom($source, 'sniffer-rules');\n } else {\n // L4\n $this->package('chefsplate/sniffer-rules', null, __DIR__);\n }\n }",
"public function boot()\r\n\t{\r\n\t\t$this->package('estey/hipsupport');\r\n\t\t$this->registerHipSupport();\r\n\t\t$this->registerHipSupportOnlineCommand();\r\n\t\t$this->registerHipSupportOfflineCommand();\r\n\r\n\t\t$this->registerCommands();\r\n\t}",
"public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n ControllerMakeCommand::class,\n ServiceMakeCommand::class,\n RepositoryMakeCommand::class,\n ModelMakeCommand::class,\n RequestRuleMakeCommand::class,\n ]);\n }\n }",
"public function boot() {\n $srcDir = __DIR__ . '/../';\n \n $this->package('baseline/baseline', 'baseline', $srcDir);\n \n include $srcDir . 'Http/routes.php';\n include $srcDir . 'Http/filters.php';\n }",
"public function boot()\n {\n $this->app->bind('App\\Services\\ProviderAccountService', function() {\n return new ProviderAccountService;\n });\n }",
"public function boot()\n {\n $this->loadViewsFrom(__DIR__ . '/resources/views', 'Counters');\n\n $this->loadTranslationsFrom(__DIR__ . '/resources/lang', 'Counters');\n\n\n //To load migration files directly from the package\n// $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n\n\n $this->app->booted(function () {\n $loader = AliasLoader::getInstance();\n $loader->alias('Counters', Counters::class);\n\n });\n\n $this->publishes([\n __DIR__ . '/../config/counter.php' => config_path('counter.php'),\n ], 'config');\n\n\n\n $this->publishes([\n __DIR__.'/../database/migrations/0000_00_00_000000_create_counters_tables.php' => $this->app->databasePath().\"/migrations/0000_00_00_000000_create_counters_tables.php\",\n ], 'migrations');\n\n\n if ($this->app->runningInConsole()) {\n $this->commands([\\Maher\\Counters\\Commands\\MakeCounter::class]);\n }\n\n\n }",
"public function boot(Application $app)\n {\n\n }",
"public function boot()\n {\n }",
"public function boot()\n {\n }",
"public function boot()\n {\n }",
"public function boot()\n {\n }",
"public function boot()\n {\n }"
] | [
"0.7344842",
"0.7212776",
"0.7207748",
"0.7123287",
"0.7109729",
"0.70822036",
"0.7076881",
"0.70718396",
"0.7051853",
"0.7025475",
"0.7011949",
"0.70043486",
"0.6955807",
"0.69322443",
"0.69319373",
"0.69272774",
"0.6911386",
"0.69069713",
"0.6898877",
"0.6898432",
"0.6896597",
"0.6889767",
"0.6886577",
"0.6880688",
"0.6875815",
"0.6874972",
"0.68696195",
"0.6864291",
"0.6864246",
"0.68631536",
"0.68599164",
"0.6857919",
"0.685537",
"0.68552583",
"0.68522125",
"0.6839775",
"0.683261",
"0.6831196",
"0.68272495",
"0.68250644",
"0.68241394",
"0.68181944",
"0.68132496",
"0.68117976",
"0.6811785",
"0.6808445",
"0.68066794",
"0.680175",
"0.68005246",
"0.67994386",
"0.67969066",
"0.67912513",
"0.67884964",
"0.678574",
"0.678558",
"0.6783794",
"0.67782456",
"0.6773669",
"0.6766658",
"0.6766194",
"0.67617613",
"0.67611295",
"0.6758855",
"0.6756636",
"0.6754412",
"0.6751842",
"0.6747439",
"0.6744991",
"0.67441815",
"0.6743506",
"0.67400324",
"0.6739403",
"0.6738356",
"0.6738189",
"0.6731425",
"0.6730627",
"0.67293024",
"0.6726232",
"0.67261064",
"0.67192256",
"0.6716676",
"0.6716229",
"0.671442",
"0.6713091",
"0.6702467",
"0.66990495",
"0.66913867",
"0.6689953",
"0.66861963",
"0.66840357",
"0.66826946",
"0.6681548",
"0.6680455",
"0.6676407",
"0.6675645",
"0.6672465",
"0.66722375",
"0.66722375",
"0.66722375",
"0.66722375",
"0.66722375"
] | 0.0 | -1 |
Register any application services. This service provider is a great spot to register your various container bindings with the application. As you can see, we are registering our "Registrar" implementation here. You can add your own bindings too! | public function register()
{
$this->app->bind(
'Illuminate\Contracts\Auth\Registrar',
'StartMeUp\Services\Registrar'
);
$repositories = [
'Company',
];
foreach ($repositories as $repository) {
$this->bindRepository($repository);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function register()\n {\n /**\n * Register additional service\n * providers if they exist.\n */\n foreach ($this->providers as $provider) {\n if (class_exists($provider)) {\n $this->app->register($provider);\n }\n }\n }",
"public function register()\n {\n $this->app->bind(\n Services\\UserService::class,\n Services\\Implementations\\UserServiceImplementation::class\n );\n $this->app->bind(\n Services\\FamilyCardService::class,\n Services\\Implementations\\FamilyCardServiceImplementation::class\n );\n }",
"protected function registerServiceProviders()\n {\n foreach ($this->providers as $provider) {\n $this->app->register($provider);\n }\n }",
"public function register()\n {\n // Register all repositories\n foreach ($this->repositories as $repository) {\n $this->app->bind(\"App\\Repository\\Contracts\\I{$repository}\",\n \"App\\Repository\\Repositories\\\\{$repository}\");\n }\n\n // Register all services\n foreach ($this->services as $service) {\n $this->app->bind(\"App\\Service\\Contracts\\I{$service}\", \n \"App\\Service\\Modules\\\\{$service}\");\n }\n }",
"public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(MailConfigServiceProvider::class);\n }",
"public function register()\n {\n $this->app->registerDeferredProvider(GeneratorServiceProvider::class);\n $this->app->registerDeferredProvider(AccessServiceProvider::class);\n $this->app->register(ThemeServiceProvider::class);\n $this->app->register(PaymentServiceProvider::class);\n if ($this->app->runningInConsole()) {\n $this->commands([\n ClearCommand::class,\n GenerateJsRouteCommand::class,\n GeneratePermissionCommand::class,\n ]);\n }\n\n self::addMacros();\n }",
"public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'APIcoLAB\\Services\\Registrar'\n\t\t);\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Flight\\FlightRepository',\n 'APIcoLAB\\Repositories\\Flight\\SkyScannerFlightRepository'\n );\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Place\\PlaceRepository',\n 'APIcoLAB\\Repositories\\Place\\SkyScannerPlaceRepository'\n );\n\t}",
"public function register()\n {\n // Bind Credential Contract with Service\n $this->app->bind(Credentials::class, function ($app){\n return new CredentialsManger($app->make('filesystem.disk'), $app->make('encrypter'));\n });\n\n // Bind Caption Contract with Service\n $this->app->bind(Configuration::class, function ($app){\n return new ConfigurationManager($app->make('filesystem.disk'));\n });\n\n // Inject dependencies into Auth Service.\n $this->app->singleton(Post::class, function ($app){\n return new PostService(new Instagram(true, true), $app->make(Credentials::class));\n });\n\n // Inject Guzzle Into Reddit Service\n $this->app->singleton(Scraper::class, function ($app){\n return new ScraperService(new Client(['base_uri' => 'http://www.reddit.com']), $app->make(Configuration::class), $app->make('filesystem.disk'));\n });\n\n $this->app->bind(Caption::class, function ($app){\n return new CaptionManager($app->make('filesystem.disk'), $app->make('encrypter'));\n });\n }",
"public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'App\\Services\\Registrar'\n\t\t);\n\t}",
"public function register()\n {\n $this->registerConfig();\n\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\UtilitiesServiceProvider');\n $this->registerLogViewer();\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\CommandsServiceProvider');\n }",
"public function register()\n {\n\n $this->app->register(HookProvider::class);\n $this->app->register(RouteProvider::class);\n// $this->app->register(InstallModuleProvider::class);\n }",
"public function register()\n {\n $this->app->bind(\n ClientServiceInterface::class,\n ClientService::class\n );\n\n $this->app->bind(\n ProjectServiceInterface::class,\n ProjectService::class\n );\n\n $this->app->bind(\n ActionServiceInterface::class,\n ActionService::class\n );\n }",
"public function register()\n {\n $this->app->singleton('composer', function($app)\n {\n return new Composer($app['files'], $app['path.base']);\n });\n\n $this->app->singleton('forge', function($app)\n {\n return new Forge($app);\n });\n\n // Register the additional service providers.\n $this->app->register('Nova\\Console\\ScheduleServiceProvider');\n $this->app->register('Nova\\Queue\\ConsoleServiceProvider');\n }",
"public function register()\r\n {\r\n $this->app->bind(\r\n ViberServiceInterface::class,\r\n ViberService::class\r\n );\r\n\r\n $this->app->bind(\r\n ApplicantServiceInterface::class,\r\n ApplicantService::class\r\n );\r\n }",
"public function register()\n {\n $this->app->bind(HttpClient::class, function ($app) {\n return new HttpClient();\n });\n\n $this->app->bind(SeasonService::class, function ($app) {\n return new SeasonService($app->make(HttpClient::class));\n });\n\n $this->app->bind(MatchListingController::class, function ($app) {\n return new MatchListingController($app->make(SeasonService::class));\n });\n\n }",
"public function register()\n {\n // service 由各个应用在 AppServiceProvider 单独绑定对应实现\n }",
"public function register()\n {\n $this->app->register(Providers\\ConfigurationServiceProvider::class);\n $this->app->register(Providers\\ViewServiceProvider::class);\n $this->app->register(Providers\\RouteServiceProvider::class);\n $this->app->register(Providers\\TranslationServiceProvider::class);\n\n $this\n ->bindContracts()\n ->bindAliases(AliasLoader::getInstance());\n }",
"protected function registerServiceProviders()\n\t{\n\t\t// Core Bus\n\t\t// -----------------------------------------------------------------------------\n\t\t$this->app->register('Congraph\\Core\\Bus\\BusServiceProvider');\n\n\t\t// Core Event\n\t\t// -----------------------------------------------------------------------------\n\t\t$this->app->register('Congraph\\Core\\Events\\EventsServiceProvider');\n\n\t\t// Repositories\n\t\t// -----------------------------------------------------------------------------\n\t\t$this->app->register('Congraph\\Core\\Repositories\\RepositoriesServiceProvider');\n\t}",
"public function register()\n {\n $this->app->bind(\n PegawaiServiceContract::class,\n PegawaiService::class \n );\n\n $this->app->bind(\n RiwayatPendidikanServiceContract::class,\n RiwayatPendidikanService::class \n );\n\n $this->app->bind(\n ProductionHouseServiceContract::class,\n ProductionHouseService::class\n );\n\n $this->app->bind(\n MovieServiceContract::class,\n MovieService::class\n );\n\n $this->app->bind(\n PangkatServiceContract::class,\n PangkatService::class \n );\n\n }",
"public function register()\n {\n\n $this->app->register(RepositoryServiceProvider::class);\n }",
"public function register()\n {\n App::singleton(UtilsServiceCatalog::CacheService, 'services\\\\utils\\\\RedisCacheService');\n\t App::singleton(UtilsServiceCatalog::TransactionService, 'services\\\\utils\\\\EloquentTransactionService');\n\n App::resolving('redis',function($redis){\n $cache_service = App::make(UtilsServiceCatalog::CacheService);\n $cache_service->boot();\n });\n\n $this->app['serverconfigurationservice'] = App::share(function ($app) {\n return new ServerConfigurationService(App::make(UtilsServiceCatalog::CacheService),App::make(UtilsServiceCatalog::TransactionService));\n });\n\n // Shortcut so developers don't need to add an Alias in app/config/app.php\n App::booting(function () {\n $loader = AliasLoader::getInstance();\n $loader->alias('ServerConfigurationService', 'services\\\\facades\\\\ServerConfigurationService');\n });\n\n App::singleton(UtilsServiceCatalog::LogService, 'services\\\\utils\\\\LogService');\n App::singleton(UtilsServiceCatalog::LockManagerService, 'services\\\\utils\\\\LockManagerService');\n App::singleton(UtilsServiceCatalog::ServerConfigurationService, 'services\\\\utils\\\\ServerConfigurationService');\n App::singleton(UtilsServiceCatalog::BannedIpService, 'services\\\\utils\\\\BannedIPService');\n\n }",
"public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(AuthServiceProvider::class);\n }",
"public function register()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n\n $loader->alias('Laratrust', 'Laratrust\\LaratrustFacade');\n $loader->alias('Form', 'Collective\\Html\\FormFacade');\n $loader->alias('Html', 'Collective\\Html\\HtmlFacade');\n $loader->alias('Markdown', 'BrianFaust\\Parsedown\\Facades\\Parsedown');\n\n $this->app->register('Baum\\Providers\\BaumServiceProvider');\n $this->app->register('BrianFaust\\Parsedown\\ServiceProvider');\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Laravel\\Scout\\ScoutServiceProvider');\n $this->app->register('Laratrust\\LaratrustServiceProvider');\n\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\AuthServiceProvider');\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\EventServiceProvider');\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\ViewServiceProvider');\n\n $this->registerCommands();\n }",
"public function register() {\n\t\t$this->app->bind(SymfonyContract::class, function () {\n\t\t\t$api = app(GithubAPIContract::class);\n\t\t\treturn new SymfonyService($api);\n\t\t});\n\t}",
"public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n\n $this->registerCommand();\n $this->registerSchedule();\n $this->registerDev();\n\n }",
"public function register()\n {\n $this->app->register('ProAI\\Datamapper\\Providers\\MetadataServiceProvider');\n\n $this->app->register('ProAI\\Datamapper\\Presenter\\Providers\\MetadataServiceProvider');\n\n $this->registerScanner();\n\n $this->registerCommands();\n }",
"public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'App\\Services\\Registrar'\n\t\t);\n \n $this->app->bind(\"App\\\\Services\\\\ILoginService\",\"App\\\\Services\\\\LoginService\");\n \n $this->app->bind(\"App\\\\Repositories\\\\IItemRepository\",\"App\\\\Repositories\\\\ItemRepository\");\n $this->app->bind(\"App\\\\Repositories\\\\IOutletRepository\",\"App\\\\Repositories\\\\OutletRepository\");\n $this->app->bind(\"App\\\\Repositories\\\\IInventoryRepository\",\"App\\\\Repositories\\\\InventoryRepository\");\n\t}",
"protected function registerContainerProviders()\n {\n $this->container->register(new ApplicationServiceProvider());\n $this->container->register(new RepositoryServiceProvider());\n }",
"public function register()\n {\n $this->app->singleton(CriteriaInterface::class, CriteriaService::class);\n $this->app->bind(UserRepositoryContract::class, UserRepository::class);\n $this->app->bind(CheckAttributeRepositoryContract::class, CheckAttributeRepository::class);\n $this->app->bind(CheckRepositoryContract::class, CheckRepository::class);\n $this->app->bind(RatingRepositoryContract::class, RatingRepository::class);\n $this->app->bind(PharmacyRepository::class, PharmacyRepository::class);\n }",
"public function register()\n {\n $this->app->register(ModuleConfigServiceProvider::class);\n $this->app->register(ModuleKernelHandlerServiceProvider::class);\n //$this->app->register(ModuleLanguageServiceProvider::class);\n $this->app->register(ModuleViewServiceProvider::class);\n }",
"public function register() {\n $this->app->bind(\n 'Illuminate\\Contracts\\Auth\\Registrar' , 'App\\Services\\Registrar'\n );\n\n $this->app->bind(PostRepositoryContract::class, PostRepository::class);\n }",
"public function register()\n {\n $this->app->register('Anomaly\\Streams\\Addon\\Module\\Resources\\Provider\\RouteServiceProvider');\n $this->app->register('Anomaly\\Streams\\Addon\\Module\\Resources\\Provider\\ListenerServiceProvider');\n $this->app->register('Anomaly\\Streams\\Addon\\Module\\Resources\\Provider\\InterfaceServiceProvider');\n }",
"public function register()\n {\n $this->app->bind(FinanceServiceInterface::class, FinanceService::class);\n $this->app->bind(FinanceRepositoryInterface::class, FinanceRepository::class);\n }",
"public function register()\n {\n $this->mergeConfigurations();\n \n $this->registerServiceProviders();\n $this->registerComponentsServiceProviders();\n \n $this->app['jarboe'] = $this->app->share(function($app) {\n return new Jarboe();\n });\n\n $this->doCommandsRegister();\n }",
"public function register()\n {\n $this->registerAliases();\n $this->registerFormBuilder();\n\n // Register package commands\n $this->commands([\n 'CoreDbCommand',\n 'CoreSetupCommand',\n 'CoreSeedCommand',\n 'EventEndCommand',\n 'ArchiveMaxAttempts',\n 'CronCommand',\n 'ExpireInstructors',\n 'SetTestLock',\n 'StudentArchiveTraining',\n 'TestBuildCommand',\n 'TestPublishCommand',\n ]);\n\n // Merge package config with one in outer app \n // the app-level config will override the base package config\n $this->mergeConfigFrom(\n __DIR__.'/../config/core.php', 'core'\n );\n\n // Bind our 'Flash' class\n $this->app->bindShared('flash', function () {\n return $this->app->make('Hdmaster\\Core\\Notifications\\FlashNotifier');\n });\n\n // Register package dependencies\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Bootstrapper\\BootstrapperL5ServiceProvider');\n $this->app->register('Codesleeve\\LaravelStapler\\Providers\\L5ServiceProvider');\n $this->app->register('PragmaRX\\ZipCode\\Vendor\\Laravel\\ServiceProvider');\n $this->app->register('Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider');\n\n $this->app->register('Zizaco\\Confide\\ServiceProvider');\n $this->app->register('Zizaco\\Entrust\\EntrustServiceProvider');\n }",
"public function register(): void {\n $this->app->bind(ItemAffixService::class, function ($app) {\n return new ItemAffixService();\n });\n\n $this->app->bind(AssignSkillService::class, function ($app) {\n return new AssignSkillService();\n });\n\n $this->app->bind(UpdateCharacterStatsService::class, function ($app) {\n return new UpdateCharacterStatsService();\n });\n\n $this->app->bind(UserService::class, function($app) {\n return new UserService();\n });\n\n $this->app->bind(ItemsService::class, function($app) {\n return new ItemsService();\n });\n\n $this->app->bind(QuestService::class, function() {\n return new QuestService();\n });\n\n $this->app->bind(InfoPageService::class, function() {\n return new InfoPageService();\n });\n\n $this->app->bind(GuideQuestService::class, function() {\n return new GuideQuestService();\n });\n\n $this->app->bind(LocationService::class, function($app) {\n return new LocationService($app->make(CoordinatesCache::class));\n });\n\n $this->commands([CreateAdminAccount::class, GiveKingdomsToNpcs::class]);\n }",
"public function register()\n {\n // Register package dependencies' service providers and aliases (so the user doesn't have to in app/config/app.php)\n $this->app->register('Radweb\\JsonExceptionFormatter\\JsonExceptionFormatterServiceProvider');\n\n // Register package interfaces with their corresponding implementations\n $this->app->bind('Radweb\\JsonExceptionFormatter\\FormatterInterface', 'Antarctica\\JsonExceptionFormatter\\Formatter\\JsonExceptionFormatter');\n }",
"public function register()\n {\n $this->app->bind('activity', function () {\n return new ActivityService(\n $this->app->make(Activity::class),\n $this->app->make(PermissionService::class)\n );\n });\n\n $this->app->bind('views', function () {\n return new ViewService(\n $this->app->make(View::class),\n $this->app->make(PermissionService::class)\n );\n });\n\n $this->app->bind('setting', function () {\n return new SettingService(\n $this->app->make(Setting::class),\n $this->app->make(Repository::class)\n );\n });\n\n $this->app->bind('images', function () {\n return new ImageService(\n $this->app->make(Image::class),\n $this->app->make(ImageManager::class),\n $this->app->make(Factory::class),\n $this->app->make(Repository::class)\n );\n });\n }",
"public function register()\n {\n $this->app->register('Clumsy\\Assets\\AssetsServiceProvider');\n $this->app->register('Clumsy\\Utils\\UtilsServiceProvider');\n $this->app->register('Clumsy\\Eminem\\EminemServiceProvider');\n\n // Override the default router so we can add more methods to resource controllers\n $this->app['router'] = $this->app->make('Clumsy\\CMS\\Routing\\Router');\n\n $this->app->bind('\\Clumsy\\CMS\\Contracts\\ShortcodeInterface', '\\Clumsy\\CMS\\Library\\Shortcode');\n\n $this->app['clumsy.admin'] = false;\n\n if ($this->app->runningInConsole()) {\n $this->registerCommands();\n }\n }",
"public function register()\n {\n $this->app->register(RouterServiceProvider::class);\n }",
"public function register()\n {\n// bind repo\n $this->app->bind(ParcelRepositoryContract::class, ParcelRepository::class);\n $this->app->bind(ShippingRequestRepositoryContract::class, ShippingRequestRepository::class);\n $this->app->bind(ParcelImageRepositoryContract::class, ParcelImageRepository::class);\n\n// bind service\n $this->app->bind(ParcelServiceContract::class, ParcelService::class);\n }",
"public function register()\n {\n $this->registerConfig();\n\n $this->app->register(Providers\\ManagerServiceProvider::class);\n $this->app->register(Providers\\ValidationServiceProvider::class);\n }",
"public function register()\n {\n //Bind all interfaces with repositories\n $this->app->bind(UserRepository::class, UserRepositoryImpl::class);\n $this->app->bind(ProductRepository::class, ProductRepositoryImpl::class);\n }",
"public function register()\n\t{\n\t\t$this->app->register('Tlr\\Menu\\Laravel\\MenuServiceProvider');\n\t\t$this->app->register('Tlr\\Routing\\EventServiceProvider');\n\t\t$this->app->register('Tlr\\Auth\\AuthServiceProvider');\n\t\t$this->app->register('Tlr\\Types\\TypeServiceProvider');\n\n\t\t$this->commands('Tlr\\Cms\\InstallCommand');\n\n\t\t$this->app->register('Barryvdh\\Debugbar\\ServiceProvider');\n\t}",
"public function register()\n {\n // register its dependencies\n $this->app->register(\\Cviebrock\\EloquentSluggable\\ServiceProvider::class);\n }",
"public function register()\n {\n // $this->app->bind('AuthService', AuthService::class);\n }",
"public function register()\n {\n parent::register();\n\n $this->app->register(ConsoleServiceProvider::class);\n }",
"public function register()\n {\n $this->app->singleton(ApiProvider::class, ApiProvider2::class);\n $this->app->singleton(PlanningService::class, function($app){\n return new PlanningService();\n });\n }",
"public function register()\n {\n $this->app->bind(UserRepositoryContract::class, UserRepository::class);\n\n $this->app->register(UserRouteServiceProvider::class);\n }",
"public function register()\n {\n $this->app->singleton(\n FileImportServiceInterface::class,\n FileImportService::class\n );\n $this->app->singleton(\n CustomerServiceInterface::class,\n CustomerService::class\n );\n }",
"public function register()\n {\n $this->app->bind(SoapService::class, PhpSoapService::class);\n\n $this->registerSaman();\n\n $this->app->singleton(NikPayFactory::class, function () {\n return new NikPayFactory();\n });\n }",
"public function register()\n {\n // $this->app->register('Agency\\Providers\\ApiServiceProvider');\n\n // register Media Service Provider\n $this->app->register('Agency\\Media\\MediaServiceProvider');\n\n // register Cms Service Provider\n $this->app->register('Agency\\Providers\\CmsServiceProvider');\n\n $this->app->bind(\n 'Agency\\Contracts\\Repositories\\TagRepositoryInterface',\n 'Agency\\Repositories\\TagRepository');\n\n // posts\n $this->app->bind(\n 'Agency\\Contracts\\Repositories\\PostRepositoryInterface',\n 'Agency\\Repositories\\PostRepository');\n\n $this->app->bind(\n 'Agency\\Contracts\\Repositories\\ImageRepositoryInterface',\n 'Agency\\Repositories\\ImageRepository');\n\n $this->app->bind(\n 'Agency\\Contracts\\Repositories\\VideoRepositoryInterface',\n 'Agency\\Repositories\\VideoRepository');\n\n $this->app->bind(\n 'Agency\\Contracts\\Repositories\\ApplicationRepositoryInterface',\n 'Agency\\Repositories\\ApplicationRepository');\n\n $this->app->bind(\n 'Agency\\Contracts\\ApplicationInterface',\n 'Agency\\Api\\Application');\n\n $this->app->bind(\n 'Agency\\Contracts\\Repositories\\CodeRepositoryInterface',\n 'Agency\\Repositories\\CodeRepository');\n\n $this->app->bind(\n 'Agency\\Contracts\\CodeInterface',\n 'Agency\\Api\\Code');\n\n $this->app->bind(\n 'Agency\\Api\\Encryptors\\EncryptorInterface',\n 'Agency\\Api\\Encryptors\\Encryptor');\n\n $this->app->bind(\n 'Agency\\Api\\Validators\\Contracts\\EncryptorValidatorInterface',\n 'Agency\\Api\\Validators\\EncryptorValidator');\n\n $this->app->bind(\n 'Agency\\Contracts\\Api\\CodeManagerInterface',\n 'Agency\\Api\\CodeManager');\n\n $this->app->bind(\n 'Agency\\Contracts\\Api\\Validators\\CodeValidatorInterface',\n 'Agency\\Api\\Validators\\CodeValidator');\n\n $this->app->bind(\n 'Agency\\Contracts\\Cache\\CacheManagerInterface',\n 'Agency\\Cache\\CacheManager');\n\n $this->app->bind(\n 'Agency\\Contracts\\Api\\ApiInterface',\n 'Agency\\Api\\Api');\n\n $this->app->bind(\n 'Agency\\Contracts\\ImageInterface',\n 'Agency\\Image');\n\n $this->app->bind(\n 'Agency\\Contracts\\VideoInterface',\n 'Agency\\Video');\n\n\n\n\n\n\n\n $this->app->bind('Agency\\Contracts\\HelperInterface','Agency\\Support\\Helper');\n\n\n\n $this->app->bind(\n 'Agency\\Contracts\\Validators\\PostValidatorInterface', function() {\n return new \\Agency\\Validators\\PostValidator($this->app->make('validator'));\n });\n\n $this->app->bind(\n 'Agency\\Contracts\\Validators\\VideoValidatorInterface', function() {\n return new \\Agency\\Validators\\VideoValidator($this->app->make('validator'));\n });\n\n $this->app->bind(\n 'Agency\\Contracts\\Validators\\ImageValidatorInterface', function() {\n return new \\Agency\\Validators\\ImageValidator($this->app->make('validator'));\n });\n\n $this->app->bind(\n 'Agency\\Contracts\\Validators\\TagValidatorInterface', function() {\n return new \\Agency\\Validators\\TagValidator($this->app->make('validator'));\n });\n\n $this->app->bind(\n 'Agency\\Repositories\\Contracts\\VideoRepositoryInterface',\n 'Agency\\Repositories\\VideoRepository'\n );\n\n }",
"public function register()\n {\n $this->app->singleton(PlayerAuthenticationService::class, function () {\n return new PlayerAuthenticationService();\n });\n $this->app->singleton(DbTestService::class, function ($app, $parameters) {\n return new DbTestService($parameters['gameSession']);\n });\n $this->app->singleton(MedTivaService::class, function ($app, $parameters) {\n return new MedTivaService($parameters['gameSession']);\n });\n }",
"public function register()\n {\n $this->app->bind(AttributeServiceInterface::class,AttributeService::class);\n $this->app->bind(ProductServiceIntarface::class,ProductService::class);\n\n\n }",
"public function register()\n {\n $this->app->singleton(\n 'employeeService',\n function () {\n return new EmployeeService();\n }\n );\n $this->app->singleton(\n 'paymentService',\n function () {\n return new PaymentService();\n }\n );\n $this->app->singleton(\n 'transactionService',\n function () {\n return new TransactionService();\n }\n );\n $this->app->singleton(\n 'transactionChildService',\n function () {\n return new TransactionChildService();\n }\n );\n $this->app->singleton(\n 'privilegeService',\n function () {\n return new PrivilegeService();\n }\n );\n $this->app->singleton(\n 'businessService',\n function () {\n return new BusinessService();\n }\n );\n $this->app->singleton(\n 'withdrawsService',\n function () {\n return new WithdrawsService();\n }\n );\n $this->app->singleton(\n 'roleService',\n function () {\n return new RoleService();\n }\n );\n $this->app->singleton(\n 'businessPaymentService',\n function () {\n return new BusinessPaymentService();\n }\n );\n\n $this->app->singleton(\n 'roleBusinessPrivilegeService',\n function () {\n return new RoleBusinessPrivilegeService();\n }\n );\n\n //\n $this->app->singleton(\n 'myLog',\n function () {\n return new MyLog();\n }\n );\n $this->app->singleton(\n 'iCEService',\n function () {\n return ICEService::getInstance();\n }\n );\n $this->app->singleton(\n 'NewIceService',\n function () {\n return NewICEService::getInstance();\n }\n );\n $this->app->singleton(\n 'microAuthPrivilege',\n function () {\n return MicroAuthPrivilege::getInstance();\n }\n );\n $this->app->singleton(\n 'NewMicroAuthPrivilege',\n function () {\n return NewMicroAuthPrivilege::getInstance();\n }\n );\n $this->app->singleton(\n 'applicationService',\n function () {\n return new ApplicationService();\n }\n );\n }",
"public function register()\n {\n //Bind service in IoC container\n $this->app->singleton(\\Carisma\\Carisma::class, function($app){\n return new \\Carisma\\Carisma();\n });\n\n // Artisan Commands\n $this->commands([\n \\Carisma\\Console\\ResourceCommand::class,\n \\Carisma\\Console\\FilterCommand::class,\n \\Carisma\\Console\\ActionCommand::class,\n ]);\n }",
"public function register() \n { \n $this->app->bind(PoBomInterface::class, PoBomRepository::class);\n $this->app->bind(EmployeeInterface::class, EmployeeRepository::class);\n $this->app->bind(SalaryInterface::class, SalaryRepository::class);\n $this->app->bind(BonusInterface::class, BonusRepository::class);\n $this->app->bind(AttendanceProcessInterface::class, AttendanceProcessRepository::class);\n }",
"public function register()\n {\n $this->app->singleton(\n StoreRepositoryInterface::class,\n StoreRepository::class\n );\n\n $this->app->singleton(\n ProductRepositoryInterface::class,\n ProductRepository::class\n );\n\n $this->app->singleton(\n ToppingRepositoryInterface::class,\n ToppingRepository::class\n );\n\n $this->app->singleton(\n StoreServiceInterface::class,\n StoreService::class\n );\n\n $this->app->singleton(\n ProductServiceInterface::class,\n ProductService::class\n );\n\n $this->app->singleton(\n ToppingServiceInterface::class,\n ToppingService::class\n );\n\n }",
"public function register()\n {\n $this->app->bind('App\\Services\\UserService');\n $this->app->bind('App\\Services\\PostService');\n $this->app->bind('App\\Services\\MyPickService');\n $this->app->bind('App\\Services\\FacebookService');\n $this->app->bind('App\\Services\\LikeService');\n }",
"public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n\n /**\n * Bind interfaces to implmentations.\n */\n $this->app->bind(PushNotificationDeviceServiceInterface::class, PushNotificationDeviceService::class);\n $this->app->bind(PushNotificationDeviceRepositoryInterface::class, PushNotificationDeviceRepository::class);\n }",
"public function register()\n {\n foreach (static::$repositories as $repository) {\n $this->app->singleton(\n $repository[0],\n $repository[1]\n );\n }\n }",
"public function register()\n {\n $this->app->singleton(EntityCacheService::class, function ($app) {\n return new EntityCacheService();\n });\n $this->app->singleton(CampaignCacheService::class, function ($app) {\n return new CampaignCacheService();\n });\n $this->app->singleton(UserCacheService::class, function ($app) {\n return new UserCacheService();\n });\n $this->app->singleton(PostCacheService::class, function ($app) {\n return new PostCacheService();\n });\n\n $this->app->alias(EntityCacheService::class, 'entitycache');\n $this->app->alias(CampaignCacheService::class, 'campaigncache');\n $this->app->alias(UserCacheService::class, 'usercache');\n $this->app->alias(PostCacheService::class, 'postcache');\n }",
"protected function registerServiceProviders()\n {\n $this->app->register('Anomaly\\Streams\\Addon\\Module\\Settings\\Provider\\RouteServiceProvider');\n }",
"public function register()\n {\n $this->app->singleton(ISalesOrderService::class, SalesOrderServiceImpl::class);\n }",
"public function register()\n {\n $this->app->bind('App\\Services\\Contracts\\RandomGenerator','App\\Services\\RandomGeneratorService');\n $this->app->bind('App\\Services\\Contracts\\CarSharing','App\\Services\\CarSharingService');\n $this->app->bind('CarsRepository', function() {\n return new CarRepository();\n });\n }",
"public function register()\n {\n $this->app->bind(TelescopeRouteServiceContract::class, TelescopeRouteService::class);\n }",
"protected function registerServices()\n {\n $this->app->bind(SocialProvidersManager::class, SocialiteProvidersManager::class);\n\n $this->app->singleton(TwoFactor::class, function () {\n return new AuthyTwoFactor(new Client());\n });\n }",
"public function register()\n {\n parent::register();\n\n $this->app->register(RouteServiceProvider::class);\n }",
"public function register()\n {\n $this->commands(\n RepositoryCommand::class,\n EntityCommand::class,\n ControllerCommand::class,\n BindingsCommand::class,\n CriteriaCommand::class,\n PresenterCommand::class,\n TransformerCommand::class,\n ValidatorCommand::class,\n RequestCommand::class,\n ProviderCommand::class\n );\n $this->app->register('Prettus\\Repository\\Providers\\EventServiceProvider');\n }",
"protected function registerServices()\n {\n $this->app->singleton('components', function($app) {\n $path = $app['config']->get('components.paths.components');\n\n return new Repository($app, $path);\n });\n }",
"public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n }",
"public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n }",
"public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n }",
"public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n }",
"public function register()\n {\n //\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n\n\n\n\n $this->app->register(ResponseMacroServiceProvider::class);\n $this->app->register(TwitterServiceProvider::class);\n }",
"public function register()\n {\n $this->app->bind(CurrencyRepositoryInterface::class, CurrencyRepository::class);\n }",
"public function register()\n {\n /**\n * Register all third party packages first.\n */\n $this->app->register('TwigBridge\\ServiceProvider');\n $this->app->register('Barryvdh\\Debugbar\\ServiceProvider');\n $this->app->register('Barryvdh\\HttpCache\\ServiceProvider');\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Jenssegers\\Agent\\AgentServiceProvider');\n $this->app->register('Intervention\\Image\\ImageServiceProvider');\n\n /**\n * Bind composer because for some reason\n * it is not already bound sometimes..\n */\n $this->app->bind(\n 'composer',\n 'Illuminate\\Foundation\\Composer'\n );\n\n /**\n * Singleton some third party stuff.\n */\n $this->app->singleton(\n 'Robbo\\Presenter\\Decorator',\n 'Robbo\\Presenter\\Decorator'\n );\n\n /**\n * Override the default CSRF check so\n * we can handle it a little better.\n */\n $this->app->bind(\n 'App\\Http\\Middleware\\VerifyCsrfToken',\n 'Anomaly\\Streams\\Platform\\Http\\Middleware\\VerifyCsrfToken'\n );\n\n /**\n * Register the application instance. This is\n * used to determine the application state / reference.\n */\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Application\\Application',\n 'Anomaly\\Streams\\Platform\\Application\\Application'\n );\n\n /**\n * This is used often, make it a singleton.\n */\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Model\\EloquentObserver',\n 'Anomaly\\Streams\\Platform\\Model\\EloquentObserver'\n );\n\n /**\n * Register our own exception handler. This will let\n * us intercept exceptions and make them pretty if\n * not in debug mode.\n */\n $this->app->bind(\n 'Illuminate\\Contracts\\Debug\\ExceptionHandler',\n 'Anomaly\\Streams\\Platform\\Exception\\ExceptionHandler'\n );\n\n /**\n * Register our messages service. This is used for\n * error reporting and other messages.\n */\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Message\\MessageBag',\n 'Anomaly\\Streams\\Platform\\Message\\MessageBag'\n );\n\n /**\n * Register these common support instances\n * as singletons. They're used a lot.\n */\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Support\\Configurator',\n 'Anomaly\\Streams\\Platform\\Support\\Configurator'\n );\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Support\\Evaluator',\n 'Anomaly\\Streams\\Platform\\Support\\Evaluator'\n );\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Support\\Parser',\n 'Anomaly\\Streams\\Platform\\Support\\Parser'\n );\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Support\\Resolver',\n 'Anomaly\\Streams\\Platform\\Support\\Resolver'\n );\n\n /**\n * Register the assets utility.\n */\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Asset\\Asset',\n 'Anomaly\\Streams\\Platform\\Asset\\Asset'\n );\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Asset\\AssetPaths',\n 'Anomaly\\Streams\\Platform\\Asset\\AssetPaths'\n );\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Asset\\AssetParser',\n 'Anomaly\\Streams\\Platform\\Asset\\AssetParser'\n );\n\n /**\n * Register the image utility.\n */\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Image\\Image',\n 'Anomaly\\Streams\\Platform\\Image\\Image'\n );\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Image\\ImagePaths',\n 'Anomaly\\Streams\\Platform\\Image\\ImagePaths'\n );\n\n /**\n * Register the view template DTO.\n */\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\View\\ViewTemplate ',\n 'Anomaly\\Streams\\Platform\\View\\ViewTemplate'\n );\n\n /**\n * Register table UI services and components.\n */\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Ui\\Table\\Component\\View\\ViewRegistry',\n 'Anomaly\\Streams\\Platform\\Ui\\Table\\Component\\View\\ViewRegistry'\n );\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Ui\\Table\\Component\\Filter\\FilterRegistry',\n 'Anomaly\\Streams\\Platform\\Ui\\Table\\Component\\Filter\\FilterRegistry'\n );\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Ui\\Breadcrumb\\BreadcrumbCollection',\n 'Anomaly\\Streams\\Platform\\Ui\\Breadcrumb\\BreadcrumbCollection'\n );\n\n /**\n * Register button UI services.\n */\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Ui\\Icon\\IconRegistry',\n 'Anomaly\\Streams\\Platform\\Ui\\Icon\\IconRegistry'\n );\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Ui\\Button\\ButtonRegistry',\n 'Anomaly\\Streams\\Platform\\Ui\\Button\\ButtonRegistry'\n );\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Ui\\ControlPanel\\Component\\Section\\SectionCollection',\n 'Anomaly\\Streams\\Platform\\Ui\\ControlPanel\\Component\\Section\\SectionCollection'\n );\n\n /**\n * Register the entry model and repository.\n * This will help others swap it out as needed.\n */\n $this->app->bind(\n 'Anomaly\\Streams\\Platform\\Entry\\EntryModel',\n 'Anomaly\\Streams\\Platform\\Entry\\EntryModel'\n );\n\n $this->app->bind(\n 'Anomaly\\Streams\\Platform\\Entry\\Contract\\EntryRepositoryInterface',\n 'Anomaly\\Streams\\Platform\\Entry\\EntryRepository'\n );\n\n /**\n * Register the field model and repository.\n * This will help others swap it out as needed.\n */\n $this->app->bind(\n 'Anomaly\\Streams\\Platform\\Field\\FieldModel',\n 'Anomaly\\Streams\\Platform\\Field\\FieldModel'\n );\n\n $this->app->bind(\n 'Anomaly\\Streams\\Platform\\Field\\Contract\\FieldRepositoryInterface',\n 'Anomaly\\Streams\\Platform\\Field\\FieldRepository'\n );\n\n /**\n * Register the streams model and repository.\n * This will help others swap it out as needed.\n */\n $this->app->bind(\n 'Anomaly\\Streams\\Platform\\Stream\\StreamModel',\n 'Anomaly\\Streams\\Platform\\Stream\\StreamModel'\n );\n\n $this->app->bind(\n 'Anomaly\\Streams\\Platform\\Stream\\Contract\\StreamRepositoryInterface',\n 'Anomaly\\Streams\\Platform\\Stream\\StreamRepository'\n );\n\n /**\n * Register the assignments model and repository.\n * This will help others swap it out as needed.\n */\n $this->app->bind(\n 'Anomaly\\Streams\\Platform\\Assignment\\AssignmentModel',\n 'Anomaly\\Streams\\Platform\\Assignment\\AssignmentModel'\n );\n\n $this->app->bind(\n 'Anomaly\\Streams\\Platform\\Assignment\\Contract\\AssignmentRepositoryInterface',\n 'Anomaly\\Streams\\Platform\\Assignment\\AssignmentRepository'\n );\n\n /**\n * Register the addon collections and models as\n * needed. This lets us access loaded addons and\n * any state they're in at any time without reloading.\n */\n $this->app->bind(\n 'Anomaly\\Streams\\Platform\\Addon\\Module\\ModuleModel',\n 'Anomaly\\Streams\\Platform\\Addon\\Module\\ModuleModel'\n );\n\n $this->app->bind(\n 'Anomaly\\Streams\\Platform\\Addon\\Module\\Contract\\ModuleRepositoryInterface',\n 'Anomaly\\Streams\\Platform\\Addon\\Module\\ModuleRepository'\n );\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Addon\\Module\\ModuleCollection',\n 'Anomaly\\Streams\\Platform\\Addon\\Module\\ModuleCollection'\n );\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Addon\\Module\\Listener\\PutModuleInCollection',\n 'Anomaly\\Streams\\Platform\\Addon\\Module\\Listener\\PutModuleInCollection'\n );\n\n $this->app->bind(\n 'module.collection',\n 'Anomaly\\Streams\\Platform\\Addon\\Module\\ModuleCollection'\n );\n\n $this->app->bind(\n 'Anomaly\\Streams\\Platform\\Addon\\Extension\\ExtensionModel',\n 'Anomaly\\Streams\\Platform\\Addon\\Extension\\ExtensionModel'\n );\n\n $this->app->bind(\n 'Anomaly\\Streams\\Platform\\Addon\\Extension\\Contract\\ExtensionRepositoryInterface',\n 'Anomaly\\Streams\\Platform\\Addon\\Extension\\ExtensionRepository'\n );\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Addon\\Extension\\ExtensionCollection',\n 'Anomaly\\Streams\\Platform\\Addon\\Extension\\ExtensionCollection'\n );\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Addon\\Extension\\Listener\\PutExtensionInCollection',\n 'Anomaly\\Streams\\Platform\\Addon\\Extension\\Listener\\PutExtensionInCollection'\n );\n\n $this->app->bind(\n 'extension.collection',\n 'Anomaly\\Streams\\Platform\\Addon\\Extension\\ExtensionCollection'\n );\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Addon\\FieldType\\FieldTypeCollection',\n 'Anomaly\\Streams\\Platform\\Addon\\FieldType\\FieldTypeCollection'\n );\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Addon\\FieldType\\Listener\\PutFieldTypeInCollection',\n 'Anomaly\\Streams\\Platform\\Addon\\FieldType\\Listener\\PutFieldTypeInCollection'\n );\n\n $this->app->bind(\n 'field_type.collection',\n 'Anomaly\\Streams\\Platform\\Addon\\FieldType\\FieldTypeCollection'\n );\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Addon\\Plugin\\PluginCollection',\n 'Anomaly\\Streams\\Platform\\Addon\\Plugin\\PluginCollection'\n );\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Addon\\Plugin\\Listener\\AddPluginToTwig',\n 'Anomaly\\Streams\\Platform\\Addon\\Plugin\\Listener\\AddPluginToTwig'\n );\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Addon\\Plugin\\Listener\\PutPluginInCollection',\n 'Anomaly\\Streams\\Platform\\Addon\\Plugin\\Listener\\PutPluginInCollection'\n );\n\n $this->app->bind(\n 'plugin.collection',\n 'Anomaly\\Streams\\Platform\\Addon\\Plugin\\PluginCollection'\n );\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Addon\\Block\\BlockCollection',\n 'Anomaly\\Streams\\Platform\\Addon\\Block\\BlockCollection'\n );\n\n $this->app->bind(\n 'block.collection',\n 'Anomaly\\Streams\\Platform\\Addon\\Block\\BlockCollection'\n );\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Addon\\Theme\\ThemeCollection',\n 'Anomaly\\Streams\\Platform\\Addon\\Theme\\ThemeCollection'\n );\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Addon\\Theme\\Listener\\PutThemeInCollection',\n 'Anomaly\\Streams\\Platform\\Addon\\Theme\\Listener\\PutThemeInCollection'\n );\n\n $this->app->bind(\n 'theme.collection',\n 'Anomaly\\Streams\\Platform\\Addon\\Theme\\ThemeCollection'\n );\n\n /**\n * These view namespace classes are used\n * pretty often. Let's make them singletons.\n */\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\View\\ViewComposer',\n 'Anomaly\\Streams\\Platform\\View\\ViewComposer'\n );\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\View\\ViewTemplate',\n 'Anomaly\\Streams\\Platform\\View\\ViewTemplate'\n );\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\View\\ViewOverrides',\n 'Anomaly\\Streams\\Platform\\View\\ViewOverrides'\n );\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\View\\ViewMobileOverrides',\n 'Anomaly\\Streams\\Platform\\View\\ViewMobileOverrides'\n );\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\View\\Listener\\LoadTemplateData',\n 'Anomaly\\Streams\\Platform\\View\\Listener\\LoadTemplateData'\n );\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\View\\Listener\\DecorateData',\n 'Anomaly\\Streams\\Platform\\View\\Listener\\DecorateData'\n );\n\n /**\n * Change the default language path to our own.\n * This will make it easier to manage translations.\n */\n $this->app->bind(\n 'path.lang',\n function () {\n return realpath(__DIR__ . '/../resources/lang');\n }\n );\n\n /**\n * Register the path to the streams platform.\n * This is handy for helping load other streams things.\n */\n $this->app->instance(\n 'streams.path',\n $this->app->make('path.base') . '/vendor/anomaly/streams-platform'\n );\n\n /**\n * If we don't have an .env file we need to head\n * to the installer (unless that's where we're at).\n */\n if (!env('INSTALLED') && $this->app->make('request')->segment(1) !== 'installer') {\n\n $this->app->make('router')->any(\n '{url?}',\n function (Redirector $redirector) {\n return $redirector->to('installer');\n }\n )->where(['url' => '[-a-z0-9/]+']);\n\n return;\n }\n\n // Register streams console provider.\n $this->app->register('Anomaly\\Streams\\Platform\\StreamsConsoleProvider');\n\n // Register streams event provider.\n $this->app->register('Anomaly\\Streams\\Platform\\StreamsEventProvider');\n\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Support\\String',\n 'Anomaly\\Streams\\Platform\\Support\\String'\n );\n\n // Bind a string loader version of twig.\n $this->app->singleton(\n 'Anomaly\\Streams\\Platform\\Support\\String',\n function () {\n\n $twig = clone(app('TwigBridge\\Bridge'));\n\n $twig->setLoader(new \\Twig_Loader_String());\n\n return $twig;\n }\n );\n }",
"public function register()\n {\n $this->app->bind(\n CommandBus::class,\n SimpleCommandBus::class\n );\n\n $this->app->bind(\n Container::class,\n LaravelContainer::class\n );\n\n $this->app->bind(\n ArticleRepository::class,\n ArticleEloquentRepository::class\n );\n }",
"public function register()\n {\n /**\n * Sets third party service providers that are only needed on local environments\n */\n if ($this->app->environment() == 'local') {\n /**\n * Loader for registering facades\n */\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n\n /**\n * Load third party local providers and facades\n */\n $this->app->register(\\Barryvdh\\Debugbar\\ServiceProvider::class);\n $loader->alias('Debugbar', \\Barryvdh\\Debugbar\\Facade::class);\n\n $this->app->register(\\Laracasts\\Generators\\GeneratorsServiceProvider::class);\n }\n $this->app->bind('soaClient', function ($app,$params) {\n $cloud = SOA::getInstance($params[0]);\n if($cloud->getEnv()){\n return $cloud;\n }\n $cloud->setEncodeType(true, true);\n $config = config('soa.'.$params[0]);\n $cloud->putEnv('app', $config['app']);\n $cloud->putEnv('appKey', $config['appKey']);\n $cloud->setServers($config['hosts']);\n return $cloud;\n });\n $this->app['request']->server->set('HTTPS', $this->app->environment() != 'local');\n }",
"public function register()\n {\n $this->app->bind(RepositoryInterface::class, EloquentRepository::class);\n $this->app->bind(ApartmentInterfaceRepository::class, ApartmentRepository::class);\n $this->app->bind(ApartmentImagefaceRepository::class, ApartmentImageRepository::class);\n }",
"public function register()\n {\n $this->registerServices();\n }",
"public function register()\n {\n $this->app->register(RepositoryServiceProvider::class);\n\n $this->app->instance(ListGenerator::class, new ListGenerator);\n $this->app->instance(FormGenerator::class, new FormGenerator);\n }",
"public function register()\n {\n $this->app->bind('redhotmayo\\auth\\AuthorizationService', AuthorizationService::SERVICE);\n $this->app->bind('AuthorizationService', AuthorizationService::SERVICE);\n\n // Register 'api_authorizer' instance container to our ApiAuthorizer object\n $this->app['api_authorizer'] = $this->app->share(function($app)\n {\n $service = App::make('AuthorizationService');\n return new ApiAuthorizer($service);\n });\n\n // Shortcut so developers don't need to add an Alias in app/config/app.php\n $this->app->booting(function()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('ApiAuthorizer', 'redhotmayo\\api\\auth\\ApiAuthorizer');\n });\n }",
"public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'App\\Services\\Registrar'\n\t\t);\n\n\t\t$this->app->bind(\n\t\t\t'App\\Repositories\\Contact\\ContactInterface',\n\t\t\t'App\\Repositories\\Contact\\ContactRepository'\n\t\t);\n\n\t\t$this->app->bind(\n\t\t\t'App\\Repositories\\Exercise\\ExerciseInterface',\n\t\t\t'App\\Repositories\\Exercise\\ExerciseRepository'\n\t\t);\n\n\t\t$this->app->bind(\n\t\t\t'App\\Repositories\\Newsletter\\NewsletterInterface',\n\t\t\t'App\\Repositories\\Newsletter\\NewsletterRepository'\n\t\t);\n\n\t\t$this->app->bind(\n\t\t\t'App\\Repositories\\Lesson\\LessonInterface',\n\t\t\t'App\\Repositories\\Lesson\\LessonRepository'\n\t\t);\n\n\t\t$this->app->bind(\n\t\t\t'App\\Repositories\\Post\\PostInterface',\n\t\t\t'App\\Repositories\\Post\\PostRepository'\n\t\t);\n\n\t\t$this->app->bind(\n\t\t\t'App\\Repositories\\Recipe\\RecipeInterface',\n\t\t\t'App\\Repositories\\Recipe\\RecipeRepository'\n\t\t);\n\n\t\t$this->app->bind(\n\t\t\t'App\\Repositories\\Serie\\SerieInterface',\n\t\t\t'App\\Repositories\\Serie\\SerieRepository'\n\t\t);\n\n\t\t$this->app->bind(\n\t\t\t'App\\Repositories\\Theme\\ThemeInterface',\n\t\t\t'App\\Repositories\\Theme\\ThemeRepository'\n\t\t);\n\n\t\t$this->app->bind(\n\t\t\t'App\\Repositories\\Topic\\TopicInterface',\n\t\t\t'App\\Repositories\\Topic\\TopicRepository'\n\t\t);\n\n\t\t$this->app->bind(\n\t\t\t'App\\Repositories\\User\\UserInterface',\n\t\t\t'App\\Repositories\\User\\UserRepository'\n\t\t);\n\t}",
"public function register(): void\n {\n $this->app->singleton(CertificateBuilder::class, function () {\n return new CertificateBuilder(\n app(CliContract::class),\n app(Filesystem::class),\n app(Mechanic::class),\n app(PorterLibrary::class)->sslPath()\n );\n });\n\n $this->app->bind(ConsoleWriter::class);\n\n $this->app->bind(CliContract::class, Cli::class);\n $this->app->bind(Cli::class, function () {\n return (new Cli())->setTimeout(config('porter.process_timeout'));\n });\n\n $this->app->bind(ImageSetRepositoryContract::class, function () {\n return new ImageSetRepository([\n resource_path('image_sets'),\n app(PorterLibrary::class)->dockerImagesPath(),\n ]);\n });\n\n $this->app->bind(Organiser::class, function () {\n return new Organiser(\n app(Porter::class)->getDockerImageSet(),\n app(CliContract::class),\n app(FileSystem::class)\n );\n });\n\n $this->app->singleton(Porter::class);\n\n $this->app->singleton(PorterLibrary::class, function (Application $app) {\n return new PorterLibrary($app->make(FilePublisher::class), $app->make(Mechanic::class), config('porter.library_path'));\n });\n\n $this->app->singleton(ServerBag::class);\n\n $this->app->bind(Mechanic::class, function () {\n return ChooseMechanic::forOS();\n });\n }",
"public function register()\n {\n /*\n * =============== REPOSITORY ===============\n * */\n $this->app->bind(\n 'App\\Repositories\\SupplierRepositoryInterface',\n 'App\\Repositories\\Eloquent\\SupplierEloquentRepository'\n );\n\n /*\n * =============== SERVICE ===============\n * */\n $this->app->bind(\n 'App\\Services\\SupplierServiceInterface',\n 'App\\Services\\Implement\\SupplierService'\n );\n }",
"public function register()\n {\n $this->app->bind(ItemService::class, function () {\n return new ItemService();\n });\n }",
"public function register()\n { \n // out(\"::registering services::\");\n $this->app->profile_repository = new ProfileRepository(); \n $this->app->page_repository = new PageRepository();\n $this->app->user_repository = new UserRepository(); \n $this->app->entity_repository = new EntityRepositoryImpl();\n $this->app->meal_task_group_member_repo = new MealTaskGroupMemberRepository();\n $this->app->web_config_service = new WebConfigService( $this->app->entity_repository);\n $this->app->entity_service = new EntityService($this->app->entity_repository, $this->app->web_config_service);\n //Repositories//\n $this->app->bind(UserRepository::class, function ($app) {\n return $app->user_repository;\n });\n $this->app->bind(ProfileRepository::class, function ($app) {\n return $app->profile_repository;\n });\n $this->app->bind(PageRepository::class, function ($app) {\n return $app->page_repository;\n });\n $this->app->bind(EntityRepository::class, function ($app) {\n return $app->entity_repository;\n });\n\n //Services//\n $this->app->bind(AccountService::class, function ($app) {\n return new AccountService($app->user_repository);\n });\n $this->app->bind(EntityService::class, function ($app) {\n return ($app->entity_service );\n });\n $this->app->bind(ComponentService::class, function ($app) {\n $service = new ComponentService($app->profile_repository, $app->page_repository, $app->web_config_service, $app->meal_task_group_member_repo);\n $service->setEntityRepoAndEntitySvc($app->entity_repository, $app->entity_service);\n return $service;\n });\n $this->app->bind(WebConfigService::class, function ($app) {\n return $app->web_config_service;\n });\n \n \n }",
"public function register()\n {\n $contract = 'App\\\\Contracts\\\\Repositories\\\\';\n $repository = 'App\\\\Repositories\\\\';\n $this->app->bind($contract.'ProductRepository', $repository.'ProductRepository');\n $this->app->bind($contract.'StockRepository', $repository.'StockRepository');\n $this->app->bind($contract.'SupplierRepository', $repository.'SupplierRepository');\n $this->app->bind($contract.'InvoiceRepository', $repository.'InvoiceRepository');\n }",
"public function register()\n {\n $this->app->register(BootstrapServiceProvider::class);\n }",
"public function register()\n {\n $this->app->bind(ClientCredentialsClientInterface::class, function () {\n return $this->createClientCredentialsClient();\n });\n\n $this->app->bind(PasswordClientInterface::class, function () {\n return $this->createPasswordClient();\n });\n\n $this->app->bind(TokenRepositoryInterface::class, function () {\n return new SessionTokenRepository();\n });\n }",
"public function register()\n {\n $this->registerOtherProviders()->registerAliases();\n $this->loadViewsFrom(__DIR__.'/../../resources/views', 'jarvisPlatform');\n $this->app->bind('jarvis.auth.provider', AppAuthenticationProvider::class);\n $this->loadRoutes();\n }",
"public function register()\n {\n $this->app->bind(GithubApiManager::class, function ($app) {\n return (new GithubApiManager($app))->driver();\n });\n\n $this->app->bind(GitService::class, function ($app) {\n return new GitService($app['config']['gitrepository']);\n }); \n }",
"public function register()\n {\n $this->app->bind(UserRepository::class, function ($app) {\n return new UserRepository($app['em']);\n });\n $this->app->bind(FeedRepository::class, function ($app) {\n return new FeedRepository($app['em']);\n });\n $this->app->bind(ArticleRepository::class, function ($app) {\n return new ArticleRepository($app['em']);\n });\n $this->app->singleton(ArticleFactory::class, function ($app) {\n return new ArticleFactory();\n });\n $this->app->singleton(ArticleService::class, function ($app) {\n return new ArticleService($app[ArticleRepository::class]);\n });\n $this->app->singleton(ArticleBatchService::class, function ($app) {\n return new ArticleBatchService($app[ArticleRepository::class], $app[ArticleFactory::class]);\n });\n $this->app->singleton(FeedService::class, function ($app) {\n return new FeedService($app[FeedRepository::class], $app['Feeds']);\n });\n $this->app->singleton(UserService::class, function ($app) {\n return new UserService($app[UserRepository::class]);\n });\n }",
"public function register()\n {\n $this->app->bind(\n \\Foo\\Contracts\\CarRepository::class,\n \\Foo\\Repositories\\EloquentCarRepository::class\n );\n }",
"public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t\\ChimeraRocks\\User\\Repositories\\UserRepositoryInterface::class,\n\t\t\t\t\\ChimeraRocks\\User\\Repositories\\UserRepositoryEloquent::class\n\t\t);\n\n\t\t$this->app->bind(\n\t\t\t\\ChimeraRocks\\User\\Repositories\\RoleRepositoryInterface::class,\n\t\t\t\t\\ChimeraRocks\\User\\Repositories\\RoleRepositoryEloquent::class\n\t\t);\n\n\t\t$this->app->bind(\n\t\t\t\\ChimeraRocks\\User\\Repositories\\PermissionRepositoryInterface::class,\n\t\t\t\t\\ChimeraRocks\\User\\Repositories\\PermissionRepositoryEloquent::class\n\t\t);\n\n\t\t$this->app->register(\n\t\t\t\\ChimeraRocks\\User\\Providers\\EventServiceProvider::class\n\t\t);\n\n\t\t$this->app->register(\n\t\t\t\\ChimeraRocks\\User\\Providers\\AuthServiceProvider::class\n\t\t);\n\n\t\t$this->app->register(\n\t\t\t\\Laravel\\Passport\\PassportServiceProvider::class\n\t\t);\n\n\t\t$this->app->singleton('chimerarocks_user_route', function() {\n\t\t\treturn new Router();\n\t\t});\n\t}",
"public function register()\n {\n $this->app->singleton(FindTaxiDriverInterface::class, function () {\n return new FindTaxiDriverService();\n });\n $this->app->singleton(AddRatingInterface::class, function() {\n return new AddRatingService();\n });\n }",
"public function register(): void\n {\n // Bind eloquent models to IoC container\n $this->app->singleton('cortex.bookings.service', $serviceModel = $this->app['config']['cortex.bookings.models.service']);\n $serviceModel === Service::class || $this->app->alias('cortex.bookings.service', Service::class);\n\n $this->app->singleton('cortex.bookings.service_availability', $serviceAvailabilityModel = $this->app['config']['cortex.bookings.models.service_availability']);\n $serviceAvailabilityModel === ServiceAvailability::class || $this->app->alias('cortex.bookings.service_availability', ServiceAvailability::class);\n\n $this->app->singleton('cortex.bookings.service_booking', $serviceBookingModel = $this->app['config']['cortex.bookings.models.service_booking']);\n $serviceBookingModel === ServiceBooking::class || $this->app->alias('cortex.bookings.service_booking', ServiceBooking::class);\n\n $this->app->singleton('cortex.bookings.service_rate', $serviceRateModel = $this->app['config']['cortex.bookings.models.service_rate']);\n $serviceRateModel === ServiceRate::class || $this->app->alias('cortex.bookings.service_rate', ServiceRate::class);\n\n $this->app->singleton('cortex.bookings.event', $serviceAvailabilityModel = $this->app['config']['cortex.bookings.models.event']);\n $serviceAvailabilityModel === Event::class || $this->app->alias('cortex.bookings.event', Event::class);\n\n $this->app->singleton('cortex.bookings.event_ticket', $eventTicketModel = $this->app['config']['cortex.bookings.models.event_ticket']);\n $eventTicketModel === EventTicket::class || $this->app->alias('cortex.bookings.event_ticket', EventTicket::class);\n\n $this->app->singleton('cortex.bookings.event_booking', $eventBookingModel = $this->app['config']['cortex.bookings.models.event_booking']);\n $eventBookingModel === EventBooking::class || $this->app->alias('cortex.bookings.event_booking', EventBooking::class);\n\n // Register console commands\n $this->registerCommands($this->commands);\n\n // Bind eloquent models to IoC container\n $this->app->singleton('cortex.bookings.service', $serviceModel = $this->app['config']['cortex.bookings.models.service']);\n $serviceModel === Service::class || $this->app->alias('cortex.bookings.service', Service::class);\n\n $this->app->singleton('cortex.bookings.event', $eventModel = $this->app['config']['cortex.bookings.models.event']);\n $eventModel === Event::class || $this->app->alias('cortex.bookings.event', Event::class);\n }",
"public function register()\n {\n $this->app->bind(UserRepository::class, UserRepositoryEloquent::class);\n $this->app->bind(PermissionRepository::class, PermissionRepositoryEloquent::class);\n $this->app->bind(RoleRepository::class, RoleRepositoryEloquent::class);\n //:end-bindings:\n }",
"public function register()\n {\n $this->app->bind('ResponseFormat',ResponseFormat::class);\n $this->app->bind('AdminUserService',AdminUserService::class);\n $this->app->bind('GenresService', GenresService::class);\n $this->app->bind('ContentService', ContentService::class);\n $this->app->bind(AudioBookRepository::class,function($app){\n return new AudioBookRepository(new AudioBook);\n });\n $this->app->bind(PodcastRepository::class,function($app){\n return new PodcastRepository(new Podcast);\n });\n $this->app->bind(AudioBookGenreRepository::class,function($app){\n return new AudioBookGenreRepository(new AudioBookGenre); \n });\n $this->app->bind(PodcastGenreRepository::class,function($app){\n return new PodcastGenreRepository(new PodcastGenre);\n });\n $this->app->bind(TrainingGenreRepository::class,function($app){\n return new TrainingGenreRepository(new TrainingGenre);\n });\n $this->app->bind(TrainingRepository::class,function($app){\n return new TrainingRepository(new Training);\n });\n $this->app->bind(UserRepository::class,function($app){\n return new UserRepository(new User);\n });\n $this->app->bind(RegisterApplicationRepository::class,function($app){\n return new RegisterApplicationRepository(new RegisterApplication);\n });\n $this->app->bind(AdminUserRepository::class,function($app){\n return new AdminUserRepository(new AdminUser);\n });\n $this->app->bind(VolunteerApplicationRepository::class,function($app){\n return new VolunteerApplicationRepository(new VolunteerApplication);\n });\n \n }"
] | [
"0.7448802",
"0.72350603",
"0.7203969",
"0.71519727",
"0.7146342",
"0.71411484",
"0.71408015",
"0.7137989",
"0.71339524",
"0.71320623",
"0.71277446",
"0.7103666",
"0.71013707",
"0.70943624",
"0.7073023",
"0.7061431",
"0.70569307",
"0.70553035",
"0.70532185",
"0.7049688",
"0.7038071",
"0.70378184",
"0.7037037",
"0.70173323",
"0.70173323",
"0.70161194",
"0.7010755",
"0.70100176",
"0.7008177",
"0.7004432",
"0.699993",
"0.6995989",
"0.696962",
"0.6968486",
"0.6960017",
"0.69585514",
"0.694064",
"0.6938293",
"0.69343555",
"0.69307196",
"0.693039",
"0.69136447",
"0.69129354",
"0.6902383",
"0.68998605",
"0.6892974",
"0.68907267",
"0.68887854",
"0.68843204",
"0.6883401",
"0.6878267",
"0.68738735",
"0.68706214",
"0.6866703",
"0.6866302",
"0.6865532",
"0.6855435",
"0.68533355",
"0.68523157",
"0.685165",
"0.68496865",
"0.6848415",
"0.68470675",
"0.68444395",
"0.6841997",
"0.683545",
"0.68320024",
"0.6827503",
"0.6825329",
"0.68183464",
"0.68153423",
"0.68153423",
"0.68153423",
"0.68153423",
"0.6814272",
"0.68130136",
"0.6810817",
"0.6809382",
"0.68080604",
"0.680502",
"0.6802939",
"0.6798909",
"0.6794663",
"0.6791305",
"0.6788142",
"0.67880577",
"0.6787461",
"0.67873865",
"0.6786758",
"0.67803496",
"0.67801005",
"0.6775304",
"0.67743725",
"0.6773888",
"0.67727613",
"0.676994",
"0.6769071",
"0.6766312",
"0.6763822",
"0.6763667"
] | 0.715534 | 3 |
Function to sanitize values received from the form. Prevents SQL injection | function clean($str) {
$str = @trim($str);
if(get_magic_quotes_gpc()) {
$str = stripslashes($str);
}
return mysql_real_escape_string($str);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function sanitize_input_fields()\n {\n }",
"public function sanitize(){\r\n\t\t$post = array();\r\n\t\tforeach($_POST as $key => $val){\r\n\t\t\tif(!get_magic_quotes_gpc()){\r\n\t\t\t\t$post[$key] = mysql_real_escape_string($val);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $post;\r\n\t}",
"function sanitize_input($input) {\n $input = mysql_real_escape_string($input);\n return $input;\n}",
"function clean_input( $value ) {\n if ( is_numeric( $value ) ) {\n return( $value );\n }\n // Strip slashes if necessary\n if ( get_magic_quotes_gpc( ) ) {\n $value = stripslashes( $value );\n }\n // Make sure no sql-dangerous code gets through\n $value = mysql_real_escape_string( $value );\n // Strip HTML tags, to be sure\n // May need another routine to allow input of HTML\n $value = strip_tags( $value );\n \n return( $value );\n }",
"function sanitize($data){\n$data=trim($data);\n$data=htmlspecialchars($data);\n$data=mysql_real_escape_string($data);\nreturn $data;\n}",
"protected function sanitize() {}",
"public function sanitize($value);",
"function sanitize( $input ){\n $mysqli = self::dbconnect();\n $input = $mysqli->real_escape_string( $input );\n $input = trim($input);\n $input = htmlentities($input);\n $mysqli->close();\n return $input;\n }",
"function sanitizeDBData($input) {\n $halfSan = filter_var($input, FILTER_SANITIZE_EMAIL);\n\n //sets slashes infront of \" ' and \\\n $output = filter_var($halfSan, FILTER_SANITIZE_MAGIC_QUOTES);\n\n return $output;\n}",
"function sanitize($data)\n {\n $data=trim($data);\n $data=mysql_real_escape_string($data);\n return $data;\n }",
"function sanitize($data)\n{\n$data = trim($data);\n \n// apply stripslashes if magic_quotes_gpc is enabled\nif(get_magic_quotes_gpc())\n{\n$data = stripslashes($data);\n}\n \n// a mySQL connection is required before using this function\n$data = mysql_real_escape_string($data);\n \nreturn $data;\n}",
"function sanitize($input) {\n if (is_array($input)) {\n foreach($input as $var=>$val) {\n $output[$var] = sanitize($val);\n }\n }else{\n if (get_magic_quotes_gpc()) {\n $input = stripslashes($input);\n }\n $input = cleanInput($input);\n $output = mysql_real_escape_string($input);\n }\n return $output;\n}",
"function sanitize($data){\r\n $conn = db ();\r\n return mysqli_real_escape_string($conn, $data);\r\n}",
"abstract public function sanitize();",
"function clean_input( $dirty_data ){\n\t//use the DB connection already established\n\tglobal $db;\n\t//clean the data and 'return' it so we can continue working with it\n\treturn mysqli_real_escape_string($db, strip_tags( $dirty_data ));\n}",
"function antiinjection($data){\n\t$filter_sql = stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES)));\n \treturn $filter_sql;\n}",
"function sanitizeArray(&$array)\n{\n $excludeListForSanitization = array('query');\n// $excludeListForSanitization = array();\n\n foreach ($array as $k => $v) {\n\n // split to key and value\n list($key, $val) = preg_split(\"/=/\", $v, 2);\n if (!isset($val)) {\n continue;\n }\n\n // when magic quotes is on, need to use stripslashes,\n // and then addslashes\n if (PHP_VERSION_ID < 50400 && get_magic_quotes_gpc()) {\n $val = stripslashes($val);\n }\n // note that we must use addslashes here because this function is called before the db connection is made\n // and sql_real_escape_string needs a db connection\n $val = addslashes($val);\n\n // if $key is included in exclude list, skip this param\n if (!in_array($key, $excludeListForSanitization)) {\n\n // check value\n if (strpos($val, '\\\\')) {\n list($val, $tmp) = explode('\\\\', $val);\n }\n\n // remove control code etc.\n $val = strtr($val, \"\\0\\r\\n<>'\\\"\", \" \");\n\n // check key\n if (preg_match('/\\\"/i', $key)) {\n unset($array[$k]);\n continue;\n }\n\n // set sanitized info\n $array[$k] = sprintf(\"%s=%s\", $key, $val);\n }\n }\n}",
"function clean($value) {\r\n\r\n\t/*$str = @trim($str);\r\n\r\n\tif(get_magic_quotes_gpc()) {\r\n\r\n\t\t$str = stripslashes($str);\r\n\r\n\t}\r\n\r\n\treturn mysql_real_escape_string($str);*/\r\n\r\n\t\r\n\r\n\t\t//function to check for both sql injection and cross site scripting\r\n\r\n\t\t //Trim the value\r\n\r\n\t\t $value = trim($value);\r\n\r\n\t\t \r\n\r\n\t\t// Stripslashes\r\n\r\n\t\tif (get_magic_quotes_gpc()) {\r\n\r\n\t\t\t$value = stripslashes($value);\r\n\r\n\t\t}\r\n\r\n\t\t\r\n\r\n\t\t // Convert all <, > etc. to normal html and then strip these\r\n\r\n\t\t $value = strtr($value,array_flip(get_html_translation_table(HTML_ENTITIES)));\r\n\r\n\t\t\r\n\r\n\t\t // Strip HTML Tags\r\n\r\n\t\t $value = strip_tags($value);\r\n\r\n\t\t\r\n\r\n\t\t// Quote the value\r\n\r\n\t\t$value = mysql_real_escape_string($value);\r\n\r\n\t\t$value = htmlspecialchars ($value);\r\n\r\n\t\treturn $value;\r\n\r\n}",
"function sanitize($val){\n return htmlentities(stripslashes(trim($val)), ENT_QUOTES);\n}",
"function security($input)\n{\n $input = mysql_real_escape_string($input);\n $input = strip_tags($input);\n $input = stripslashes($input);\n return $input;\n}",
"function secure_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n // tbd mysql_real_escape_string\r\n return $data;\r\n}",
"function cleaninput($value, $DB) {\n\t\tif (get_magic_quotes_gpc()) {\n\t\t\t$value = stripslashes( $value );\n\t\t}\n\t\t\n\t\treturn mysql_real_escape_string( $value, $DB );\n\t}",
"function sanitizeInput(&$string){\n $string = $this->connection->real_escape_string($string);\n }",
"function sanitize($data) \n{\n\treturn htmlentities(strip_tags(mysql_real_escape_string($data)));\n}",
"function sqlsanitize($sql)\r\n{\r\n\t$trysan = str_replace(\"\\\\\", \"\\\\\\\\\", $sql);\r\n\t$trysan = str_replace(\"\\\"\", \"\\\"\\\"\", $trysan);\r\n\t$trysan = str_replace(\"'\", \"''\", $trysan);\r\n\treturn $trysan;\r\n}",
"function sanitize($conn, $val){\n\t\t$val = stripslashes($val);\n\t\t$val = mysqli_real_escape_string($conn, $val);\n\t}",
"function sanitize_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}",
"function sanitizeString($var)\n{\nglobal $connection;\n$var = strip_tags($var);\n$var = htmlentities($var);\n$var = stripslashes($var);\nreturn $connection->real_escape_string($var);\n}",
"function getSanitizedValues() {\r\n //TODO: actually clean the values. Could probably put it in the \r\n // case above...\r\n //\r\n //TDOD: consider using $_POST instead of $_GET!\r\n //\r\n // Also, this is probably overkill when we could just copy the\r\n // entirety of $_POST...not that we can guarantee people won't\r\n // jam malicious data into it.\r\n $cleanVals = array();\r\n $cleanVals['datetime'] = date(GlApp::DATE_FORMAT, strtotime($_REQUEST['datetime']));\r\n $cleanVals['mileage'] = $_REQUEST['mileage'];\r\n $cleanVals['location'] = $_REQUEST['location'];\r\n $cleanVals['pricepergallon'] = $_REQUEST['pricepergallon'];\r\n $cleanVals['gallons'] = $_REQUEST['gallons'];\r\n $cleanVals['grade'] = $_REQUEST['grade'];\r\n $cleanVals['pumpprice'] = $_REQUEST['pumpprice'];\r\n $cleanVals['notes'] = htmlspecialchars($_REQUEST['notes']);\r\n \r\n return $cleanVals;\r\n}",
"protected abstract function sanitizeQuery($query);",
"function clean_input($input){\n\n\t$clean;\t//clean version of variable\n\n\tif (is_string($input)){\n\t\t$clean = mysql_real_escape_string(stripslashes(ltrim(rtrim($input))));\n\t}\n\telse if (is_numeric($input)){\n\t\t$clean = mysql_real_escape_string(stripslashes(ltrim(rtrim($input))));\n\t}\n\telse if (is_bool($input)){\n\t\t$clean = ($input) ? true : false;\n\t}\n\telse if (is_array($input)){\n\t\tforeach ($input as $k=>$i){\n\t\t\t$clean[$k] = clean_input($i);\n\t\t}\n\t}\n\t\n\treturn $clean;\n\t\n}",
"function ATsanitize($input)\n{\n $user_input = trim($input);\n \n if (get_magic_quotesgpc())\n {\n $input = stripslashes($input);\n }\n}",
"function sanitize($data) {\n return htmlentities(strip_tags(mysql_real_escape_string($data)));\n }",
"public function sanitize($input)\n {\n $input = trim($input);\n if(!is_numeric($input))\n {\n if(get_magic_quotes_gpc())\n {\n $input = stripslashes($input);\n }\n $input = \"'\" . mysql_real_escape_string($input) . \"'\";\n }\n return($input);\n }",
"function sanitize_input($data) { \r\n $data = trim($data); \r\n $data = stripslashes($data); \r\n $data = htmlspecialchars($data); \r\n return $data; \r\n }",
"function check_input($value)\n{\n $value = strip_tags($value);\n $value = htmlentities($value);\n // remove slash\n if (get_magic_quotes_gpc())\n {\n $value = stripslashes($value);\n }\n// add '' on string\n if (!is_numeric($value))\n {\n $value =mysqli_real_escape_string($GLOBALS['conn'],$value);\n }\n return $value;\n}",
"function cleanInputs($data) {\n\t$data = trim($data);\n\t$data = stripslashes($data);\n\t$data = htmlspecialchars($data);\n\treturn $data;\n}",
"function cleanInputs($data) {\n\t$data = trim($data);\n\t$data = stripslashes($data);\n\t$data = htmlspecialchars($data);\n\treturn $data;\n}",
"function clean_quotes($value) {\r\n\r\n\t\t //Trim the value\r\n\r\n\t\t $value = trim($value);\r\n\r\n\t\t \r\n\r\n\t\t// Stripslashes\r\n\r\n\t\tif (get_magic_quotes_gpc()) {\r\n\r\n\t\t\t$value = stripslashes($value);\r\n\r\n\t\t}\r\n\r\n\t\t// Quote the value\r\n\r\n\t\t$value = mysql_real_escape_string($value);\r\n\r\n\t\t//$value = htmlspecialchars ($value);\r\n\r\n\t\treturn $value;\r\n\r\n}",
"function sanitize($input){\n\tglobal $link;\n\t$input = htmlentities(strip_tags(trim($input)));\n\t$input = mysqli_real_escape_string($link, $input);\n\treturn $input;\n}",
"public function ex_sanitize($data){\n\n\t\treturn mysql_real_escape_string(htmlentities(trim($data)));\n\n\t}",
"function input_validation($input) {\r\n\r\n global $con;\r\n $input_t = trim($input);\r\n $input_v = mysql_real_escape_string($con, $input_t);\r\n return $input_v;\r\n}",
"function sanitation($postVal){\n\t$rawinfo= $postVal;\n\t$removeSpecial = htmlspecialchars($rawinfo);\n\t$finalForm = escapeshellcmd($removeSpecial);\n\treturn $finalForm;\n}",
"function cleanInput($data){ //sanitize data \n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }",
"function sanitize_input($data)\n {\n $data = trim($data); //remove whitespaces \n $data = stripslashes($data); //such as '\n $data = htmlspecialchars($data); //such as >,<&\n return $data;\n }",
"function sanitize_form_input_values(array $fields): array\n{\n $filter_params = [];\n\n foreach ($fields['fields'] as $field_key => $field) {\n $filter_params[$field_key] = $field['filter'] ?? FILTER_SANITIZE_SPECIAL_CHARS;\n }\n\n return filter_input_array(INPUT_POST, $filter_params);\n}",
"public function sanitize( $input ) {\n }",
"function sanitise_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }",
"public static function sanitize($data){\n\t\t\t$db = new Database;\n\t\t\tif (gettype($data) === 'array') {\n\t\t\t\treturn $data;\n\t\t\t}else{\n\t\t\t\t$data = trim($data);\t\t\t\t\n\t\t\t\t$data = stripcslashes($data);\n\t\t\t\t$data = mysqli_real_escape_string($db->link, $data);\n\t\t\t\treturn $data;\n\t\t\t}\n\t\t}",
"public function sanitize() {\n }",
"function clean_input($data) \n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}",
"function sanitizeFields()\n\t{\n\t\tif(isset($this->sanitize) && isset($this->data[$this->name]))\n\t\t{\n\t\t\tforeach($this->data[$this->name] as $field => $value)\n\t\t\t{\n\t\t\t\tif(isset($this->sanitize[$field]))\n\t\t\t\t{\n\t\t\t\t\tif(!is_array($this->sanitize[$field]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data[$this->name][$field] = $this->sanitize($this->data[$this->name][$field], $this->sanitize[$field]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tforeach($this->sanitize[$field] as $action)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->data[$this->name][$field] = $this->sanitize($this->data[$this->name][$field], $action);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"function clean($str) {\n$str = @trim($str);\nif(get_magic_quotes_gpc()) {\n$str = stripslashes($str);\n}\nreturn mysql_real_escape_string($str);\n}",
"function clean_data($value, $handle) {\r\n\r\n if (get_magic_quotes_gpc()) {\r\n $value = stripslashes($value);\r\n }\r\n\r\n if (!is_numeric($value)) {\r\n $value = \"'\" . mysql_real_escape_string($value, $handle) . \"'\";\r\n }\r\n return $value;\r\n}",
"public function sanitize($data){\n\n\t\treturn mysql_real_escape_string(htmlentities($data));\n\n\t}",
"function sanitise_input($data)\n {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }",
"function sanitise_input($data)\n {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }",
"function clean_input($data){\r\n\t$data = trim($data);\r\n\t$data = stripslashes($data);\r\n\t$data = htmlspecialchars($data);\r\n\treturn $data;\t\r\n}",
"function qwe_clean($array){\r\n\r\n\t\t\t\t\t\t\t\t\t\treturn array_map('mysql_real_escape_string', $array) ;\r\n\t\t\t\t\t\t\t\t\t}",
"function clean_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}",
"function sanitizeInput($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n $data = strip_tags($data);\n return $data;\n}",
"public function sanitize_input_fields(array $where_args)\n {\n }",
"function sanitize($input) {\n\t\t$cleaning = $input;\n\t\t\n\t\tswitch ($cleaning) {\n\t\t\tcase trim($cleaning) == \"\":\n\t\t\t\t$clean = false;\n\t\t\t\tbreak;\n\t\t\tcase is_array($cleaning):\n\t\t\t\tforeach($cleaning as $key => $value) {\n\t\t\t\t\t$cleaning[] = sanitize($value);\n\t\t\t\t}\n\t\t\t\t$clean = implode(\",\", $cleaning);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif(get_magic_quotes_gpc()) {\n\t\t\t\t\t$cleaning = stripslashes($cleaning);\n\t\t\t\t}\n\t\t\t\t$cleaning = strip_tags($cleaning);\n\t\t\t\t$clean = trim($cleaning);\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn $clean;\n\t}",
"public function sanitize($data){\n\t\treturn $new_data = $this->mysql_prep($data);\n\t\t}",
"function sanitize_validate_input($data){\n\t\t \t \t$data = filter_var($data, FILTER_SANITIZE_STRING);\n\t\t \t \t//$data = filter_var($data, FILTER_VALIDATE_EMAIL);\n\t\t \t \t$data = stripcslashes($data);\n\t\t \t \t$data = trim($data);\n\t\t \t \t$data = htmlspecialchars($data);\n\t\t \t \t\n\t\t \t \treturn $data; }",
"function val_input($data){\n $data = trim($data);\n $data = str_replace(\"'\", \"\", $data);\n $data = str_replace(\"select\", \"\", $data);\n $data = str_replace(\"SELECT\", \"\", $data);\n $data = str_replace(\"Select\", \"\", $data);\n $data = str_replace(\"drop\", \"\", $data);\n $data = str_replace(\"Drop\", \"\", $data);\n $data = str_replace(\"DROP\", \"\", $data);\n $data = str_replace(\"delete\", \"\", $data);\n $data = str_replace(\"DELETE\", \"\", $data);\n $data = str_replace(\"Delete\", \"\", $data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}",
"function sql_desanitize($sql)\r\n{\r\n\t$trysan = str_replace(\"\\\\\\\\\", \"\\\\\", $sql);\r\n\t$trysan = str_replace(\"\\\"\\\"\", \"\\\"\", $trysan);\r\n\t$trysan = str_replace(\"''\", \"'\", $trysan);\r\n\treturn $trysan;\r\n}",
"public function sanitize($value)\n {\n }",
"function check_input($data){\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n $data = htmlentities($data);\n $data = mysql_real_escape_string($data);\n return $data;\n}",
"function check_input($data){\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n $data = htmlentities($data);\n $data = mysql_real_escape_string($data);\n return $data;\n}",
"public function clean($value)\n\t{\n\t\treturn mysql_real_escape_string($value);\n\t}",
"function clean_for_db_reinsert($value) {\n//$value = str_replace(\"'\", \"''\", $value);\n$value = addslashes($value);\n$value = str_replace(\"\\'\", \"''\", $value);\n\treturn $value;\n\n}",
"function cleanInput($data) { \n return htmlspecialchars(stripslashes(trim($data)));\n}",
"function clean_input($data){\r\n\t\t\t\t\t$data = trim($data);\r\n\t\t\t\t\t$data = stripslashes($data);\r\n\t\t\t\t\t$data = htmlspecialchars($data);\r\n\t\t\t\t\treturn $data;\r\n\t\t\t\t}",
"function cleanInput($data)\n{\n $data = trim($data);\n\n // gunakan stripslashes untuk elakkan double escape if magic_quotes_gpc is enabledif(get_magic_quotes_gpc()){\n $data = stripslashes($data);}",
"private function sanitize($form_data) {\n $sanitized_data = filter_var_array($form_data, FILTER_SANITIZE_STRING);\n \n // Return the sanitized datas\n return $sanitized_data;\n }",
"function clean($str){\n $str = @trim($str);\n if(get_magic_quotes_gpc()){\n $str = stripslashes($str);\n }\n return mysql_real_escape_string($str);\n}",
"public function sanitize()\n {\n $purifier = $this->_purifier;\n $this->_sanitized_data = array_map(\n function ($field) use ($purifier) {\n return $purifier->purify($field);\n },\n $this->_data\n );\n }",
"function sanitize($input) {\n if (is_array($input)) {\n foreach($input as $var=>$val) {\n $output[$var] = sanitize($val);\n }\n }\n else {\n $input = trim($input);\n if (get_magic_quotes_gpc()) {\n $input = stripslashes($input);\n }\n $output = strip_tags($input);\n }\n return $output;\n}",
"function cleanInput($data) { \n return htmlspecialchars(stripslashes(trim($data)));\n}",
"function clean_input($data) {\n $data = trim($data); // strips whitespace from beginning/end\n $data = stripslashes($data); // remove backslashes\n $data = htmlspecialchars($data); // replace special characters with HTML entities\n return $data;\n}",
"function sanitize_input($str) {\n\treturn preg_replace(\"/[?'&<>\\\"]/\", \"\", $str);\n}",
"function sanitize($input){\n $input = strip_tags($input);\n $input = htmlspecialchars($input);\n $input = trim($input);\n return $input;\n}",
"function sanitize ($data) {\n\t\treturn htmlentities (mysqli_real_escape_string ($GLOBALS['con'], $data),ENT_NOQUOTES,\"utf-8\");\n\t}",
"function sanitize($input) {\n\t\n\t\t$input = stripslashes($input);\n\t\t$input = htmlspecialchars($input);\n\t\n\t\treturn $input;\n\t}",
"function clean($str){\r\n\t\t$str = @trim($str);\r\n\t\tif(get_magic_quotes_gpc()) {\r\n\t\t\t$str = stripslashes($str);\r\n\t\t}\r\n\t\treturn mysql_real_escape_string($str);\r\n}",
"function mysql_prep($v){\n\t\tglobal $myconn;\n\t\t$v = trim($v);\n\t\t$v = $myconn->real_escape_string($v);\n\t\t\n\t\treturn $v;\n\t}",
"function sanitize($data) {\n\t$data = trim($data);\n\t$data = stripslashes($data);\n\t$data = htmlspecialchars($data);\n\treturn $data;\n}",
"function clean($str){\n\tglobal $db;\n\t$str = @trim($str);\n\tif(get_magic_quotes_gpc()) \n\t{\n\t\t$str = stripslashes($str);\n\t}\n\treturn $db->real_escape_string($str);\n}",
"function clean($array){\n\n\t\treturn array_map('mysql_real_escape_string', $array);\n\n\t}",
"function CleanPostForMysql($target) {\r\n if (get_magic_quotes_gpc()) {\r\n return $target;\r\n } else {\r\n return mysql_real_escape_string($target);\r\n } // if\r\n}",
"function mf_sanitize($input){\n\t\tif(get_magic_quotes_gpc() && !empty($input)){\n\t\t\t $input = is_array($input) ?\n\t array_map('mf_stripslashes_deep', $input) :\n\t stripslashes(trim($input));\n\t\t}\n\t\t\n\t\treturn $input;\n\t}",
"function sanitize_text_field($str)\n {\n }",
"public function anti_sql_injection( $valor ) {\n\tif (!is_numeric( $valor )) {\n\t\t $valor = get_magic_quotes_gpc() ? stripslashes( $valor ): $valor ;\n\t\t $valor = function_exists('mysql_real_escape_string') ? mysql_real_escape_string( $valor ) : mysql_escape_string( $valor );\n\t}\n\treturn $valor;\n }",
"function hash_mysql_sanitize($pdata){\n\t\nif( isset($pdata) ){\n\n\t//make sure that $pdata is cleaned. put this in a header.\n\tforeach( $pdata as $key => $value ){\n\t\t//clean up!\n\t\tmysql_real_escape_string($value);\n\t}\n}\n\nreturn $pdata;\n}",
"function sanitizeString($str_input) {\r\n $str_input = strip_tags($str_input);\r\n $str_input = htmlentities($str_input);\r\n $str_input = stripslashes($str_input);\r\n return $str_input;\r\n}",
"function clean($str) {\n $str = @trim($str);\n if(get_magic_quotes_gpc()) {\n $str = stripslashes($str);\n }\n return mysql_real_escape_string($str);\n}",
"public function sanitize($str){\n\t\tglobal $con;\n\t\t$invalid_characters = array(\"$\", \"%\", \"#\", \"<\", \">\", \"|\");\n\t\t$str = str_replace($invalid_characters, \"\", $str);\n\t\t$str=mysqli_real_escape_string($con,$str);\n\t\treturn $str;\n\t}",
"public function sanitize() {\n\n\t\t// load the tool that we want to use in the xss filtering process\n\t\t$this->loadTool();\n\n\t\tif (is_array($_GET) AND count($_GET) > 0) {\n\n\t\t\t$_GET = $this->clean_input_data($_GET);\n\t\t}\n\t\tif (is_array($_POST) AND count($_POST) > 0) {\n\n\t\t\t$_POST = $this->clean_input_data($_POST);\n\t\t}\n\t\tif (is_array($_COOKIE) AND count($_COOKIE) > 0) {\n\n\t\t\t$_COOKIE = $this->clean_input_data($_COOKIE);\n\t\t}\n\t\tif (is_array($_FILES) AND count($_FILES) > 0) {\n\n\t\t\t//$_FILES = $this->clean_input_data($_FILES, true);\n\t\t}\n\n\t}",
"function safe($fieldname)\n{\n global $db;\n $temp=$_GET[$fieldname];\n $temp=trim($temp);\n $temp=mysqli_real_escape_string($db,$temp);\n echo \"<br>$fieldname is: $temp<br>\";\n \n}",
"function clean_form_input($form_data){\n\t$temp = str_ireplace(\",\",\"@\", $form_data);\n\t$temp = str_ireplace(\"\\\"\",\"|\", $temp); \n\t$temp = str_ireplace(\"<\", \"$\", $temp);\n\t$temp = str_ireplace(\">\", \"?\", $temp);\n return $temp;\n}"
] | [
"0.7573986",
"0.74317616",
"0.7415901",
"0.7355193",
"0.733741",
"0.7241798",
"0.71910816",
"0.71896744",
"0.714539",
"0.71444225",
"0.7109398",
"0.710709",
"0.7086688",
"0.7072003",
"0.7046222",
"0.7044782",
"0.7020191",
"0.70146024",
"0.69494987",
"0.6933605",
"0.6929717",
"0.69252574",
"0.69009745",
"0.6900374",
"0.6892776",
"0.6871216",
"0.68707764",
"0.68437356",
"0.68432945",
"0.6820825",
"0.68207556",
"0.680041",
"0.6791793",
"0.6782865",
"0.6777902",
"0.6776308",
"0.6774754",
"0.6774754",
"0.6749614",
"0.6743463",
"0.6730128",
"0.67276585",
"0.6715778",
"0.6714969",
"0.6706837",
"0.670032",
"0.66961294",
"0.6688752",
"0.6686814",
"0.66838515",
"0.66749114",
"0.6671654",
"0.6658601",
"0.66576",
"0.6650564",
"0.6650212",
"0.6650212",
"0.66437656",
"0.6642396",
"0.6640557",
"0.66395754",
"0.66392696",
"0.66162896",
"0.66061527",
"0.6587375",
"0.6586546",
"0.65857416",
"0.6585732",
"0.65667576",
"0.65667576",
"0.6556166",
"0.6530042",
"0.65299666",
"0.65249527",
"0.6521825",
"0.6518307",
"0.65153885",
"0.6514669",
"0.6513139",
"0.65117973",
"0.6509637",
"0.65055174",
"0.64838237",
"0.6481729",
"0.6481492",
"0.6463585",
"0.6452947",
"0.64294755",
"0.6423694",
"0.64227676",
"0.64182615",
"0.6417527",
"0.64128476",
"0.6397946",
"0.63964015",
"0.63940215",
"0.6390595",
"0.63851595",
"0.638413",
"0.6381768",
"0.63751835"
] | 0.0 | -1 |
Lists all Genre entities. | public function indexAction()
{
$em = $this->getDoctrine()->getManager();
$genres = $em->getRepository('SerieBundle:Genre')->findAll();
return $this->render('genre/index.html.twig', array(
'genres' => $genres,
));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function index()\n {\n return GenreResource::collection(Genre::all());\n }",
"public function actionIndex()\n {\n $searchModel = new GenreSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function findAll() {\r\n $sql = \"select * from t_genre order by gen_id\";\r\n $result = $this->getDb()->fetchAll($sql);\r\n \r\n // Converts query result to an array of domain objects\r\n $genres = array();\r\n foreach ($result as $row) {\r\n $genreId = $row['gen_id'];\r\n $genres[$genreId] = $this->buildDomainObject($row);\r\n }\r\n return $genres;\r\n }",
"function getGenres(){\n $genres = $this->all('schema:genre');\n return $genres;\n }",
"public function findAllGenres()\n {\n $query = 'SELECT DISTINCT t.genre FROM ApiTracklistBundle:Track t ORDER BY t.genre';\n\n return $this->getEntityManager()\n ->createQuery($query)\n ->getResult();\n }",
"public function index()\n {\n return new GenreCollection(Genre::all()->sortBy('name'));\n }",
"public function indexAction() : array\n {\n $genres = $this->getDoctrine()->getRepository(Genre::class)->findAll();\n\n return ['genres' => $genres];\n }",
"public function findAll(){\r\n //requête à exécuter et comment il doit renvoyer les infos\r\n $sql = \"SELECT *\r\n FROM genre\";\r\n\r\n return self::getResults(\r\n self::select($sql, null, true),\r\n self::$className\r\n );\r\n }",
"public function index() {\n $genres = \\App\\Genre::get();\n return view('admin.genres.list', ['genres' => $genres]);\n }",
"public function getGenres()\n {\n $genres = Genre::orderBy('name','ASC')->get();\n\n return view('genres')->with('genres',$genres);\n }",
"public function getAll()\n {\n return \\App\\Movie::all()->load('genre');\n }",
"public function indexAction()\r\n {\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $entities = $em->getRepository('GaleriasBundle:Galeria')->findAll();\r\n\r\n return array(\r\n 'entities' => $entities,\r\n );\r\n }",
"public function index()\n {\n $genres = Genre::all();\n return view('genres', ['genres' => $genres]);\n }",
"public static function getAll() {\n $lesObjets = array();\n $requete = \"SELECT * FROM genre\";\n $stmt = Bdd::getPdo()->prepare($requete);\n $ok = $stmt->execute();\n if ($ok) {\n // Tant qu'il y a des enregistrements dans la table\n while ($enreg = $stmt->fetch(PDO::FETCH_ASSOC)) {\n //ajoute un nouveau genre au tableau\n $lesObjets[] = self::enregVersMetier($enreg);\n }\n }\n return $lesObjets;\n }",
"public function getListeGenre() {\n try {\n $lesGenres = DB::table('GENRE')\n ->Select('IDGENRE','LIBELLEGENRE')\n\n ->get();\n return $lesGenres;\n } catch (QueryException $e) {\n throw new MonException($e->getMessage());\n }\n }",
"public function getGenres()\n {\n $sql = \"select G.GEN_ID as id, GEN_NOM as nom, count(ALB_ID) AS nbAlbums \" .\n \"from T_GENRE G left join T_ALBUM A on G.GEN_ID=A.GEN_ID group by G.GEN_ID order by GEN_NOM\";\n return $this->executerRequete($sql);\n }",
"public function index()\n {\n $genres = Genre::with('books')\n ->paginate(20);\n\n return view('admin.genre.index', compact('genres'));\n }",
"public function getAllEntities();",
"public function getGenreList() {\n $data = $this->read();\n if(empty($data)){\n $error = $this->db->error();\n return false;\n }\n return $data;\n }",
"function listaAll() {\n require ROOT . \"config/bootstrap.php\";\n return $em->getRepository('models\\Equipamentos')->findby(array(), array(\"id\" => \"DESC\"));\n $em->flush();\n }",
"public function index() {\n return Jsend::success(Genre::all()->toArray());\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AppBundle:Glossary')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function get_genres()\n {\n return $this->db->get('tbl_genre')->result_array();\n }",
"public function all(){\r\n\treturn $this->getRepository()->findAll();\r\n }",
"public function index()\n {\n return view('genre.genre_index', [\n 'genres' => Genre::all()\n ]);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $gagnants = $em->getRepository('AppBundle:Gagnant')->findAll();\n\n return $this->render('gagnant/index.html.twig', array(\n 'gagnants' => $gagnants,\n ));\n }",
"public function index(){\n\n $genres = Genre::all();\n \n return view('home', compact('genre'));\n }",
"public static function liste(){\n\t\t\t$sql=\"SELECT * from Genre\";\n\t\t\t$res=DB::get_instance()->prepare($sql);\n\t\t\t$res->execute();\n\t\t\t// gérer les erreurs éventuelles\n\t\t\tif($res->rowCount()==0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$p= $res->fetchAll();\n\t\t\treturn $p;\n\t\t\t\n\t\t}",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $gardes = $em->getRepository('KidzyBundle:Garde')->findAll();\n\n return $this->render('@Kidzy/garde/index.html.twig', array(\n 'gardes' => $gardes,\n ));\n }",
"public function indexAction()\n {\n if (!$this->get('security.context')->isGranted('ROLE_ADMIN') ) {\n return $this->redirect($this->generateUrl('error'), 302); \n }\n $em = $this->getDoctrine()->getManager(); \n $entities = $em->getRepository('SytemSGBundle:Grupos')->findAll();\n\n return $this->render('SytemSGBundle:Grupos:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function index()\n {\n return response()->success($this->genreService->all());\n }",
"public function index()\n {\n $genres = $this->genreRepository->all();\n\n return response()->json([\n 'success' => true,\n 'meta' => [\n 'total' => count($genres)\n ],\n 'genres' => $this->prepareList($genres)\n ]);\n }",
"public function index()\n {\n //\n return Grupos::all();\n }",
"public function index(Request $request)\n {\n return [\n 'genre' => Genre::all(),\n ];\n }",
"public function showAllAction () {\n $products = $this->getDoctrine()\n ->getRepository('AppBundle:Product')\n ->findAll();\n\n return $this->render('product/list.html.twig', array(\n 'products' => $products,\n ));\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('JetBredaBundle:Alquiler')->findAll();\n\n return array('entities' => $entities);\n }",
"public function index()\n {\n return Entity::all();\n }",
"public function all()\n {\n return Guests::all();\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $reglements = $em->getRepository('ReglementBundle:Reglement')->findAll();\n\n return $this->render('reglement/index.html.twig', array(\n 'reglements' => $reglements,\n ));\n }",
"public function listGall()\n {\n $gall = Gallery::latest()->get();\n return view('gallery.list', compact('gall'));\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('GurmeMainBundle:Recipe')->findBy(array(), array('id'=>'desc'));\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $gallerieAnnonces = $em->getRepository('AppBundle:GallerieAnnonce')->findAll();\n\n return $this->render('gallerieannonce/index.html.twig', array(\n 'gallerieAnnonces' => $gallerieAnnonces,\n ));\n }",
"public function findAllEntities();",
"public function getAll()\n {\n $queryBuilder = $this->db->createQueryBuilder();\n $queryBuilder\n ->select('l.*')\n ->from('lignes', 'l');\n\n $statement = $queryBuilder->execute();\n $lignesData = $statement->fetchAll();\n foreach ($lignesData as $ligneData) {\n $ligneEntityList[$ligneData['id']] = new ligne($ligneData['id'], $ligneData['nom']);\n }\n\n return $ligneEntityList;\n }",
"public function getAll() {}",
"public function getAll() {}",
"public function getAll() {}",
"public static function getAll() {}",
"public function getAll() {}",
"public function getAll() {}",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $groupes = $em->getRepository('PlanBundle:Groupe')->findAll();\n\n return $this->render('@Plan/groupe/index.html.twig', array(\n 'groupes' => $groupes,\n ));\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('GarnetTaxiBeBundle:Ligne')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function getAllGenres($activeOnly = false) {\n\t\t$ret = null;\n\n\t\tif ($activeOnly) {\n\t\t\t$res = $this->pdo->query(\"SELECT title FROM genres WHERE disabled = 0 AND type = 6000 ORDER BY title\");\n\t\t} else {\n\t\t\t$res = $this->pdo->query(\"SELECT title FROM genres WHERE disabled = 1 AND type = 6000 ORDER BY title\");\n\t\t}\n\n\t\tforeach ($res as $arr => $value) {\n\t\t\t$ret[] = $value['title'];\n\t\t}\n\t\treturn $ret;\n\t}",
"public function showAction(Genre $genre) : array\n {\n $books = $genre->getBooks();\n\n return ['books' => $books, 'genre' => $genre];\n }",
"public function getAll(){\n \n // 1. Establece la conexion con la base de datos y trae todos los generos\n $query = $this->getDb()->prepare(\" SELECT * FROM genero\");\n $query-> execute(); \n return $query->fetchAll(PDO::FETCH_OBJ);\n }",
"public function getAllList(){\n $collection = new Db\\Collection($this->getProductTable());\n return $collection->load();\n }",
"public function list()\n {\n return $this->repo->getAll();\n ;\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $groupes = $em->getRepository('AppBundle:Groupe')->findAll(array(), array('nom' => 'ASC'));\n\n return $this->render('@App/groupe/tableau.html.twig', array(\n 'groupes' => $groupes,\n ));\n }",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll()\n\t{\n\t\treturn $this->getMyRepository()->findAll();\n\t}",
"public function show(Genre $genre)\n {\n \n }",
"public function index()\n {\n return Breed::all();\n }",
"public function getAll()\n {\n }",
"public function genres()\n {\n return $this->belongsToMany('App/Genre', 'eventmanager_genre', 'genres_id', 'genres_id');\n }",
"public function getGenre() {}",
"public static function getAll();",
"public static function getAll();",
"public function getAll()\n {\n return $this->findAll();\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n// $entities = $em->getRepository('uniRecetasBundle:ingrediente')->findAll();\n $entities = $em->getRepository('uniRecetasBundle:ingrediente')->findBy(\n array(), \n array('nombre' => 'ASC')\n );\n\n return $this->render('uniRecetasBundle:ingrediente:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function all()\n {\n return $this->repository->findAll();\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $furTextures = $em->getRepository('UnicornBundle:furTexture')->findAll();\n\n return $this->render('furtexture/index.html.twig', array(\n 'furTextures' => $furTextures,\n ));\n }",
"public function index()\n {\n return Guru::all();\n }",
"public function getAll()\r\n\t{\r\n\t\treturn $this->findAll();\r\n\t}",
"public function showAllAction( Request $request)\n { $em = $this->getDoctrine()->getManager();\n\n $entrepots = $em->getRepository('GererEntrepotBundle:Entrepot')->findAll();\n\n\n return $this->render('@GererEntrepot/admin/index.html.twig', array(\n 'entrepots' => $entrepots,\n ));\n\n }",
"public function getEntities();",
"public function getEntities();",
"public function allAction()\n {\n $repository = $this->getDoctrine()->getRepository('GfctBundle:Profesores');\n // find *all* pro\n $pro = $repository->findAll();\n return $this->render('GfctBundle:Profesores:all.html.twig',array(\"profesores\"=>$pro));\n }",
"public function getAll()\n {\n }",
"public function getAll()\n {\n }"
] | [
"0.70429295",
"0.70120436",
"0.6894314",
"0.6893458",
"0.68385917",
"0.67797714",
"0.67756814",
"0.66557527",
"0.65557504",
"0.6534678",
"0.6530369",
"0.64410657",
"0.6388792",
"0.6383442",
"0.6366813",
"0.6326284",
"0.6247234",
"0.6222564",
"0.6216516",
"0.6213483",
"0.6194185",
"0.61897683",
"0.61507666",
"0.61468893",
"0.61045",
"0.6079146",
"0.60236317",
"0.60080326",
"0.60068583",
"0.6003545",
"0.6002442",
"0.59873086",
"0.5983876",
"0.5957629",
"0.58824056",
"0.587565",
"0.58642834",
"0.58600485",
"0.58451545",
"0.58216256",
"0.5819253",
"0.5800941",
"0.5798069",
"0.5786262",
"0.5754106",
"0.5754106",
"0.5754106",
"0.5753804",
"0.57533294",
"0.57533294",
"0.5747601",
"0.5743361",
"0.5741039",
"0.57312596",
"0.5728351",
"0.57244444",
"0.5724039",
"0.5723858",
"0.5708736",
"0.5708736",
"0.5708736",
"0.5708736",
"0.5708736",
"0.5708736",
"0.5708736",
"0.5708736",
"0.5708736",
"0.5708736",
"0.5708736",
"0.5708736",
"0.5708736",
"0.5708736",
"0.5708736",
"0.5708736",
"0.5708736",
"0.5708736",
"0.5708736",
"0.5708736",
"0.5708736",
"0.5708736",
"0.568742",
"0.5686815",
"0.5681226",
"0.56712705",
"0.5668188",
"0.56673664",
"0.56664515",
"0.56664515",
"0.56401396",
"0.563912",
"0.56359667",
"0.5629196",
"0.56280166",
"0.5620343",
"0.56147885",
"0.5611093",
"0.5611093",
"0.56045496",
"0.56003654",
"0.56003654"
] | 0.70362043 | 1 |
Creates a form to delete a Genre entity. | private function createDeleteForm(Genre $genre)
{
return $this->createFormBuilder()
->setAction($this->generateUrl('genre_delete', array('id' => $genre->getId())))
->setMethod('DELETE')
->getForm()
;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function createDeleteForm(Reglement $reglement)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('reglement_delete', array('codeRegl' => $reglement->getCoderegl())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Recette $recette)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('recette_delete', array('id' => $recette->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id) {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('rubrique_delete', array('id' => $id)))\r\n// ->setMethod('DELETE')\r\n ->add('submit', SubmitType::class, array('label' => 'Supprimer la rubrique courante'))\r\n ->getForm()\r\n ;\r\n }",
"private function createDeleteForm(voyageur $voyageur)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('voyageur_delete', array('id' => $voyageur->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Restricciones $restriccione)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('restricciones_delete', array('id' => $restriccione->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(GestionRetour $gestionRetour)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('retours_delete', array('id' => $gestionRetour->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Hogar $hogar)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('hogar_delete', array('id' => $hogar->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(livre $livre)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('livre_delete', array('id' => $livre->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Scenaristes $scenariste)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('scenaristes_delete', array('id' => $scenariste->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"public function createDeleteForm($id){\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('rsp_delete',array('id'=>$id)))\n ->setMethod('DELETE')\n ->add('submit','submit',array('label'=>'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm(Releve $releve)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('releve_delete', array('id' => $releve->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Registro $registro)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('registro_delete', array('id' => $registro->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id){\n\t\treturn $this->createFormBuilder()\n\t\t\t->setAction($this->generateUrl('reserva_delete', array('id' => $id)))\n\t\t\t->setMethod('DELETE')\n\t\t\t->add('submit', 'submit', array('label' => 'Eliminar Reserva', 'attr' => array('class'=>'btn btn-danger btn-block')))\n\t\t\t->getForm()\n\t\t;\n\t}",
"private function createDeleteForm(Gagnant $gagnant)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('gagnant_delete', array('id' => $gagnant->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Musicien $musicien)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('musicien_delete', array('codeMusicien' => $musicien->getCodemusicien())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(RendezVous $rendezVous)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('r_delete', array('id' => $rendezVous->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Garde $garde)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('garde_delete', array('idGarde' => $garde->getIdGarde())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Clasificaciontg $clasificaciontg)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('clasificaciontg_delete', array('id' => $clasificaciontg->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Plateformes $plateforme)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('administration_plateformes_delete', array('id' => $plateforme->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }",
"private function createDeleteForm(PsychEvalFreq $psychEvalFreq)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('eval_freq_delete', array('id' => $psychEvalFreq->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Groupe $groupe)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('groupe_delete', array('id' => $groupe->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Covoiturage $covoiturage)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personnel_covoiturage_delete', array('id' => $covoiturage->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }",
"private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('galerias_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }",
"private function createDeleteForm(Nomenclature $nomenclature)\n {\n\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('nomenclature_delete', array('id' => $nomenclature->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('caracteristicasequipo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar','attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }",
"private function createDeleteForm(Proprietaire $proprietaire) {\n return $this->createFormBuilder\n ->setAction($this->generateUrl('post_admin_delete', array('id' => $proprietaire->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"public function delete() {\r\n\r\n\t\t// Does the Genre object have an ID?\r\n\t\tif ( is_null( $this->id ) ) trigger_error ( \"Genre::delete(): Attempt to delete an Genre object that does not have its ID property set.\", E_USER_ERROR );\r\n\r\n\t\t// Delete the Article\r\n\t\t$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\r\n\t\t$st = $conn->prepare ( \"DELETE FROM :table WHERE id = :id LIMIT 1\" );\r\n\t\t$st->bindValue( \":table\", DB_TBL_GENRE, PDO::PARAM_STR );\r\n\t\t$st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\r\n\t\t$st->execute();\r\n\t\t$conn = null;\r\n\t}",
"private function createDeleteForm($id,$idcupo)\n {\n\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('liquidaciones_delete', array('id' => $id,'idcupo'=>$idcupo)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete','attr' => array('class' => 'form-control')))\n ->getForm()\n ;\n }",
"private function createDeleteForm(Groupe $groupe)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('groupe_delete', array('idGroup' => $groupe->getIdgroup())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(NatureOp $priorite)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('back_natureop_delete', array('id' => $priorite->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(RhythmMaterial $rhythmMaterial)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('rhythmmaterial_delete', array('id' => $rhythmMaterial->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('medicamentossuministrados_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar', 'attr' => array('class' => 'btn')))\n ->getForm()\n ;\n }",
"private function createDeleteForm(Facture $facture)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('facture_delete', array('id' => $facture->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Acteur $acteur)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('acteur_delete_homepage', array('id' => $acteur->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }",
"private function createDeleteForm(Replacement $replacement)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('zamena_delete', array('id' => $replacement->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"public function delete($id_genre){\n $query =$this->getDb()->prepare('DELETE FROM genero WHERE id_genre = ?');\n $query->execute([$id_genre]); \n }",
"private function createDeleteForm(ArmasMedico $armasMedico)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('armasmedico_delete', array('id' => $armasMedico->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Requete $requete)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_sise_requete_delete', array('id' => $requete->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(CargoSubDivisao $vaga)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('pessoal_gerenciar_vagas_delete', array('id' => $vaga->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }",
"public function deleteForm()\n\t{\n\t\t$form = new \\IPS\\Helpers\\Form( 'form', 'delete' );\n\t\t$form->addMessage( 'node_delete_blurb_no_content' );\n\t\t\n\t\treturn $form;\n\t}",
"private function createDeleteForm(Psycho $psycho)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('psycho_delete', array('id' => $psycho->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"public function delete()\n {\n return view('backend.pages.brand.delete');\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('bien_delete', array('id' => $id)))\n ->setMethod('DELETE')\n // ->add('submit', 'submit', array('label' => 'Delete'))\n ->add('submit', 'submit', array('label' => 'Eliminar','attr' => array('class' => 'btn btn-danger'),))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('picture_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm(Contabilizar $contabilizar)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('contabilizar_delete', array('id' => $contabilizar->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Proeflessen $proeflessen)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_proeflessen_delete', array('id' => $proeflessen->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Reserva $reserva)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('reserva_delete', array('id' => $reserva->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n \n $form = $this->createFormBuilder(null, array('attr' => array('id' => 'entrada_detalles_eliminar_type')))\n ->setAction('')\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar', 'icon' => 'trash', 'attr' => array('class' => 'btn-danger')))\n ->getForm()\n ;\n \n return $form;\n \n \n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_glossary_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm(Promotion $promotion)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('promotion_delete', array('id' => $promotion->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(GallerieAnnonce $gallerieAnnonce)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('gallerieannonce_delete', array('id' => $gallerieAnnonce->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(ManejoReproductivo $manejoReproductivo)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('manejoreproductivo_delete', array('id' => $manejoReproductivo->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(EcoCardiogramaTransesofagico $ecoCardiogramaTransesofagico)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ecocardiogramatransesofagico_delete', array('id' => $ecoCardiogramaTransesofagico->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Metas $meta)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_crud_metas_delete', array('id' => $meta->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('grupos_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm(PhpposPeople $phpposPerson)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('phppospeople_delete', array('id' => $phpposPerson->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('detailsproduits_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm ( Maileguak $maileguak )\n {\n return $this->createFormBuilder()\n ->setAction( $this->generateUrl( 'maileguak_delete', array ('id' => $maileguak->getId()) ) )\n ->setMethod( 'DELETE' )\n ->getForm();\n }",
"private function createDeleteForm(Cahierdescharges $cahierdescharge) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cahierdescharges_delete', array('id' => $cahierdescharge->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Barbeiro $barbeiro)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('barbeiro_delete', array('id' => $barbeiro->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Produits $produit) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('produits_delete', array('id' => $produit->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Beer $beer)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('beer_delete', array('id' => $beer->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('admin_consulta_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }",
"private function createDeleteForm(Frequencia $frequencium)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cadastro_frequencia_delete', array('id' => $frequencium->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('envase_ingreso_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('resident_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm(Indicateur $indicateur) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('indicateur_delete', array('id' => $indicateur->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('social_admin_resource_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => '删除','attr'=>[\n 'class'=>'btn btn-danger'\n ]))\n ->getForm()\n ;\n }",
"private function createDeleteForm(GrupoDiagnostico $grupoDiagnostico)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('grupodiagnostico_delete', array('id' => $grupoDiagnostico->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"public function destroy(Genre $genre)\n {\n if(!$genre->books->count()){\n $genre->delete();\n \n return redirect()->route('admin.genres.index')\n ->with('success','Genre deleted successfully.');\n }else{\n return redirect()->route('admin.genres.index')\n ->with('success','Genre deleted fail. Create Book for this genre!');\n }\n }",
"private function createDeleteForm(Formulaire $formulaire)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('formulaire_delete', array('id' => $formulaire->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"public function deleteAction() : object\n {\n $page = $this->di->get(\"page\");\n $form = new DeleteForm($this->di);\n $form->check();\n\n $page->add(\"questions/crud/delete\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Delete an item\",\n ]);\n }",
"private function createDeleteForm(Fratura $fratura)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('fratura_delete', array('id' => $fratura->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Cancion $cancion)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cancion_delete', array('id' => $cancion->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Aspirante $aspirante)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('aspirante_delete', array('id' => $aspirante->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('object_objecttype_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Удалить'))\n ->getForm()\n ;\n }",
"private function createDeleteForm(Zakres $zakre)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('enum_zakres_delete', array('id' => $zakre->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Gift $gift)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('gift_delete', array('id' => $gift->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"public function deleteAction(Request $request, $id)\n {\n if (!$this->get('security.context')->isGranted('ROLE_ADMIN') ) {\n return $this->redirect($this->generateUrl('error'), 302); \n }\n $form = $this->createDeleteForm($id);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('SytemSGBundle:Grupos')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Grupos entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n \n $this->get('session')->getFlashBag()->set('message', 'Removido com sucesso.');\n }\n\n return $this->redirect($this->generateUrl('grupos'));\n }",
"private function createDeleteForm(Personnage $personnage)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personnage_delete', array('id' => $personnage->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_productosprogramas_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm()\n ;\n }",
"private function genDeleteForm($id)\n {\n return $this->createFormBuilder(null, array('attr' => array( 'id' => 'ct_del_form', 'style' => 'display:none')))\n ->setAction($this->generateUrl('morus_fas_contacts_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => $this->get('translator')->trans('btn.delete')))\n ->getForm();\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('userman_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('data_recipe_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm(Torniquete $torniquete)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('torniquete_delete', array('id' => $torniquete->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(TranslationBuyerType $translationBuyerType)\n\t{\n\t\treturn $this->createFormBuilder()\n\t\t\t->setAction($this->generateUrl('translationbuyertype_delete', array('id' => $translationBuyerType->getId())))\n\t\t\t->setMethod('DELETE')\n\t\t\t->getForm()\n\t\t;\n\t}",
"private function createDeleteForm(Pagos $pago)\n {\n \n return $this->createFormBuilder()\n ->setAction($this->generateUrl('pagos_delete', array('id' => $pago->getIdpagos())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n \n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('solmantenimientoidentificacion_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Borrar','attr'=>array('class'=>'btn btn-danger btn btn-danger btn-lg btn-block')))\n ->getForm()\n ;\n }",
"private function createDeleteForm(ClasseMatiere $classeMatiere)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('class_mat_delete', array('id' => $classeMatiere->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Procedencia $procedencia)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('procedencia_delete', array('id' => $procedencia->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('image_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n { \n \n return $this->createFormBuilder()\n ->setAction($this->generateUrl('aulas_aula_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ligne_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('dreams_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete','attr'=>array('class'=>'btn btn-danger')))\n ->getForm()\n ;\n }",
"private function createDeleteForm(Centro $centro)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('centro_delete', array('id' => $centro->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('visiteur_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm(Ingrerut $ingrerut)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ingresorut_delete', array('id' => $ingrerut->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Orden $orden)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('orden_delete', array('id' => $orden->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Tblyear $tblyear)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tblyear_delete', array('id' => $tblyear->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('endroit_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }"
] | [
"0.69484854",
"0.686731",
"0.6823078",
"0.67485756",
"0.6739969",
"0.6655109",
"0.6602307",
"0.6596271",
"0.6556525",
"0.655565",
"0.6552498",
"0.65520245",
"0.6529108",
"0.65102917",
"0.650087",
"0.64991164",
"0.6472959",
"0.6464222",
"0.64621615",
"0.64598924",
"0.64330435",
"0.6418187",
"0.64090204",
"0.63664395",
"0.6359348",
"0.6350632",
"0.63371485",
"0.63363284",
"0.6331776",
"0.63262224",
"0.63235617",
"0.6310516",
"0.63103646",
"0.62905115",
"0.62885994",
"0.62548983",
"0.62533253",
"0.6251755",
"0.6249988",
"0.62483",
"0.62385863",
"0.6238315",
"0.6228315",
"0.622513",
"0.6223257",
"0.62216926",
"0.6218917",
"0.6218836",
"0.62179613",
"0.621147",
"0.6211224",
"0.6207579",
"0.6205993",
"0.6204941",
"0.62036",
"0.6203555",
"0.61975724",
"0.61954397",
"0.6188925",
"0.6187116",
"0.61752665",
"0.617263",
"0.61709607",
"0.6170047",
"0.616647",
"0.6160728",
"0.61568993",
"0.61535525",
"0.61485887",
"0.613881",
"0.6133575",
"0.61330324",
"0.6130678",
"0.61303484",
"0.6126912",
"0.6126756",
"0.6122283",
"0.6121339",
"0.61180747",
"0.611409",
"0.61125165",
"0.61087674",
"0.610596",
"0.60996455",
"0.60984564",
"0.6094585",
"0.6091031",
"0.60889965",
"0.60886616",
"0.6087325",
"0.6084448",
"0.60783184",
"0.60772824",
"0.607717",
"0.607683",
"0.60750186",
"0.6073771",
"0.60716504",
"0.60696554",
"0.60682577"
] | 0.7664629 | 0 |
Display a listing of the resource. | public function __construct() {
$this->data['title'] = 'Category';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create() {
//
if (!Entrust::can('category-create')) {
return redirect('');
}
$this->data['sub_title'] = 'Create Category';
$this->data['parent'] = Category::where('parent', '=', 0)->lists('name', 'id');
return view('backend.category.create', $this->data);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
] | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(CategoryRequest $request) {
//
$thumb ='images\categories\thumb';
$full = 'images\categories\full';
$input = $request->except('image');
$input['status'] = $request->get('status') == 'on' ? 1 : 0;
if ($request->get('parent')) {
$parent_slug = Category::find($input['parent'])->slug;
$input['slug'] = $parent_slug . '/' . str_slug($input['name']);
} else {
$input['slug'] = str_slug($input['name']);
}
$input['order'] = Category::max('order') + 1;
$cat = new Category($input);
if ($request->hasFile('image')) {
$name = $input['slug'] . '.' . $request->file('image')->getClientOriginalExtension();
$cat->image = $name;
Image::make($request->file('image'))->save($full . '/' . $name);
Image::make($request->file('image'))->resize('200', '200')->save($thumb . '/' . $name);
}
if ($cat->save()) {
return redirect()->route('backend.category.index');
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437"
] | 0.0 | -1 |
Display the specified resource. | public function show($id) {
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show(Resena $resena)\n {\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function get_resource();",
"public function show()\n\t{\n\t\t\n\t}",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function display() {\n echo $this->render();\n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public abstract function display();",
"abstract public function resource($resource);",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245",
"0.60389996",
"0.6016584",
"0.598783",
"0.5961788",
"0.59606946",
"0.5954321",
"0.59295714",
"0.59182066",
"0.5904556",
"0.59036547",
"0.59036547",
"0.59036547",
"0.5891874",
"0.58688277",
"0.5868107",
"0.58676815",
"0.5851883",
"0.58144855",
"0.58124036",
"0.58112013",
"0.5803467",
"0.58012545",
"0.5791527",
"0.57901084",
"0.5781528",
"0.5779676",
"0.5757105",
"0.5756208",
"0.57561266",
"0.57453394",
"0.57435393",
"0.57422745",
"0.5736634",
"0.5736634",
"0.5730559",
"0.57259274",
"0.5724891",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5718969",
"0.5713412",
"0.57091093",
"0.5706405",
"0.57057405",
"0.5704541",
"0.5704152",
"0.57026845",
"0.57026845",
"0.56981397",
"0.5693083",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id) {
//
if (!Entrust::can('category-update')) {
return redirect('');
}
$this->data['sub_title'] = 'Edit Category';
$this->data['category'] = Category::find($id);
$this->data['parent'] = Category::where('id', '!=', $id)->where('parent', '=', 0)->lists('name', 'id');
return view('backend.category.edit', $this->data);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}",
"public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }",
"public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }",
"private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }",
"public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }",
"public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}",
"public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }",
"public function edit($model, $form);",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\r\n {\r\n return view('petro::edit');\r\n }",
"public function edit($id)\n {\n // show form edit user info\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }",
"public function edit()\n {\n return view('commonmodule::edit');\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('admincp::edit');\n }",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }",
"public function edit()\n {\n return view('Person.edit');\n }",
"public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }",
"public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}",
"public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }",
"public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}",
"public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }",
"public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }",
"public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}",
"public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}",
"public function edit($id)\n {\n return view('models::edit');\n }",
"public function edit()\n {\n return view('home::edit');\n }",
"public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }",
"public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }",
"public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }",
"public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('consultas::edit');\n }",
"public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }",
"public function edit()\n {\n return view('dashboard::edit');\n }",
"public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }",
"public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }",
"public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }",
"public function edit() {\n return view('routes::edit');\n }",
"public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }",
"public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\n }",
"public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }",
"public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function edit()\n {\n return view('inventory::edit');\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit($id)\n {\n return view('backend::edit');\n }",
"public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }",
"public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}"
] | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.68336326",
"0.6811471",
"0.68060875",
"0.68047357",
"0.68018645",
"0.6795623",
"0.6791791",
"0.6791791",
"0.6787701",
"0.67837197",
"0.67791027",
"0.677645",
"0.6768301",
"0.6760122",
"0.67458534",
"0.67458534",
"0.67443407",
"0.67425704",
"0.6739898",
"0.6735328",
"0.6725465",
"0.6712817",
"0.6693891",
"0.6692419",
"0.6688581",
"0.66879624",
"0.6687282",
"0.6684741",
"0.6682786",
"0.6668777",
"0.6668427",
"0.6665287",
"0.6665287",
"0.66610634",
"0.6660843",
"0.66589665",
"0.66567147",
"0.66545695",
"0.66527975",
"0.6642529",
"0.6633056",
"0.6630304",
"0.6627662",
"0.6627662",
"0.66192114",
"0.6619003",
"0.66153085",
"0.6614968",
"0.6609744",
"0.66086483",
"0.66060555",
"0.6596137",
"0.65950733",
"0.6594648",
"0.65902114",
"0.6589043",
"0.6587102",
"0.65799844",
"0.65799403",
"0.65799177",
"0.657708",
"0.65760696",
"0.65739626",
"0.656931",
"0.6567826",
"0.65663105",
"0.65660435",
"0.65615267",
"0.6561447",
"0.6561447",
"0.65576506",
"0.655686",
"0.6556527",
"0.6555543",
"0.6555445",
"0.65552044",
"0.65543956",
"0.65543705",
"0.6548264",
"0.65475875",
"0.65447706"
] | 0.0 | -1 |
Update the specified resource in storage. | public function update(CategoryRequest $request, $id) {
//
$thumb = 'images/categories/thumb';
$full = 'images/categories/full';
$input = $request->all();
$input['status'] = $request->get('status') == 'on' ? 1 : 0;
if ($request->get('parent')) {
$parent_slug = Category::find($input['parent'])->slug;
$input['slug'] = $parent_slug . '/' . str_slug($input['name']);
} else {
$input['slug'] = str_slug($input['name']);
}
$category = Category::find($id);
if ($request->hasFile('image')) {
if (Storage::exists('images/categories/thumb/' . $category->image)) {
Storage::delete('images/categories/thumb/' . $category->image);
}
if (Storage::exists('images/categories/full/' . $category->image)) {
Storage::delete('images/categories/full/' . $category->image);
}
$name = $input['slug'] . '.' . $request->file('image')->getClientOriginalExtension();
$input['image'] = $name;
Image::make($request->file('image'))->save($full . '/' . $name);
Image::make($request->file('image'))->resize('200', '200')->save($thumb . '/' . $name);
}
$category->update($input);
return redirect()->route('backend.category.index');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"public function update($request, $id);",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public abstract function update($object);",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update($id);",
"public function update($id);",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function put($path, $data = null);",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890722",
"0.5860816",
"0.5855127",
"0.5855127",
"0.58513457",
"0.5815068",
"0.5806887",
"0.57525045",
"0.57525045",
"0.57337505",
"0.5723295",
"0.5714311",
"0.5694472",
"0.5691319",
"0.56879413",
"0.5669989",
"0.56565005",
"0.56505877",
"0.5646085",
"0.5636683",
"0.5633498",
"0.5633378",
"0.5632906",
"0.5628826",
"0.56196684",
"0.5609126",
"0.5601397",
"0.55944353",
"0.5582592",
"0.5581908",
"0.55813426",
"0.5575312",
"0.55717176",
"0.55661047",
"0.55624634",
"0.55614686",
"0.55608666",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55573726",
"0.5556878",
"0.5554201",
"0.5553069",
"0.55530256",
"0.5543788",
"0.55435944",
"0.55412996",
"0.55393505",
"0.55368495",
"0.5535236",
"0.5534954",
"0.55237365",
"0.5520468",
"0.55163723",
"0.55125296",
"0.5511168",
"0.5508345",
"0.55072427",
"0.5502385",
"0.5502337",
"0.5501029",
"0.54995877",
"0.54979175",
"0.54949397",
"0.54949397",
"0.54946727",
"0.5494196",
"0.54941916",
"0.54925025",
"0.5491807",
"0.5483321",
"0.5479606",
"0.5479408",
"0.5478678",
"0.54667485",
"0.5463411",
"0.5460588",
"0.5458525"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id) {
//
if (!Entrust::can('category-delete')) {
$this->data['category'] = Category::getNested();
return view('backend.category.lists', $this->data);
}
$category = Category::find($id);
if ($category->delete()) {
$category->where('parent', $id)->update(['parent' => 0]);
$this->data['category'] = Category::getNested();
return view('backend.category.lists', $this->data);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
] | 0.0 | -1 |
Run the database seeds. | public function run()
{
Teacher::truncate();
$teacher1 = Teacher::create([
'first_name' => 'Markus',
'last_name' => 'Jean Raul',
'status' => '1',
]);
$teacher2 = Teacher::create([
'first_name' => 'McCan',
'last_name' => 'Isak Paul',
'status' => '0',
]);
$teacher3 = Teacher::create([
'first_name' => 'Fernandes',
'last_name' => 'Paco Dimitri',
'status' => '1',
]);
$speciality1 = Speciality::find(1);
$speciality2 = Speciality::find(2);
$speciality3 = Speciality::find(3);
$teacher1->speciality()->associate($speciality1);
$teacher2->speciality()->associate($speciality2);
$teacher3->speciality()->associate($speciality3);
$teacher1->save();
$teacher2->save();
$teacher3->save();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }",
"public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }",
"public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }",
"public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }",
"public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }",
"public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }",
"public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }",
"public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }",
"public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }",
"public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }",
"public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }",
"public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }",
"public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }",
"public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }",
"public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }",
"public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }",
"public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}",
"public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }",
"public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}",
"public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }",
"public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }",
"public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }",
"public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }",
"public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }",
"public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }",
"public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}",
"public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }",
"public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }",
"public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }",
"public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }",
"public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }",
"public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }",
"public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }",
"public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }",
"public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }",
"public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }",
"public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }",
"public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }",
"public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }",
"public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }",
"public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}",
"public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }",
"public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }",
"public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }",
"public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }",
"public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }",
"public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }",
"public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }",
"public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }"
] | [
"0.8013876",
"0.79804534",
"0.7976992",
"0.79542726",
"0.79511505",
"0.7949612",
"0.794459",
"0.7942486",
"0.7938189",
"0.79368967",
"0.79337025",
"0.78924936",
"0.78811055",
"0.78790957",
"0.78787595",
"0.787547",
"0.7871811",
"0.78701615",
"0.7851422",
"0.7850352",
"0.7841468",
"0.7834583",
"0.7827792",
"0.7819104",
"0.78088796",
"0.7802872",
"0.7802348",
"0.78006834",
"0.77989215",
"0.7795819",
"0.77903426",
"0.77884805",
"0.77862066",
"0.7778816",
"0.7777486",
"0.7765202",
"0.7762492",
"0.77623445",
"0.77621746",
"0.7761383",
"0.77606887",
"0.77596676",
"0.7757001",
"0.7753607",
"0.7749522",
"0.7749292",
"0.77466977",
"0.7729947",
"0.77289546",
"0.772796",
"0.77167094",
"0.7714503",
"0.77140456",
"0.77132195",
"0.771243",
"0.77122366",
"0.7711113",
"0.77109736",
"0.7710777",
"0.7710086",
"0.7705484",
"0.770464",
"0.7704354",
"0.7704061",
"0.77027386",
"0.77020216",
"0.77008796",
"0.7698617",
"0.76985973",
"0.76973504",
"0.7696405",
"0.7694293",
"0.7692694",
"0.7691264",
"0.7690576",
"0.76882726",
"0.7687433",
"0.7686844",
"0.7686498",
"0.7685065",
"0.7683827",
"0.7679184",
"0.7678287",
"0.76776296",
"0.76767945",
"0.76726556",
"0.76708084",
"0.76690495",
"0.766872",
"0.76686716",
"0.7666299",
"0.76625943",
"0.7662227",
"0.76613766",
"0.7659881",
"0.7656644",
"0.76539344",
"0.76535016",
"0.7652375",
"0.7652313",
"0.7652022"
] | 0.0 | -1 |
Determine if the user is authorized to make this request. | public function authorize()
{
return Auth::check();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }",
"public function authorize()\n {\n return $this->user() != null;\n }",
"public function authorize(): bool\n {\n return $this->user() !== null;\n }",
"public function authorize(): bool\n {\n return $this->isUserAuthorised();\n }",
"public function authorize()\n {\n return !is_null($this->user());\n }",
"public function authorize()\n {\n return request()->user() != null;\n }",
"public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }",
"public function isAuthorized()\n {\n return $this->cookieHelper->requestCookieExists('auth');\n }",
"public function authorize()\n {\n return !empty(Auth::user()) && ($this->user()->isAnAdmin() || $this->user()->hasRole('user'));\n }",
"public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\n }",
"public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default:\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n }\n\n return false;\n }",
"public function authorize()\n {\n if($this->user()->role == \"admin\" || $this->user()->id == $this->request->get('author_id')) return true;\n else return false;\n }",
"public function authorize()\n {\n if(\\Auth::guest())\n {\n return false;\n } else {\n // Action 1 - Check if authenticated user is a superadmin\n if(\\Auth::User()->hasRole('superadmin'))\n return true;\n\n // Action 2 - Find UUID from request and compare to authenticated user\n $user = User::where('uuid', $this->user_uuid)->firstOrFail();\n if($user->id == \\Auth::User()->id)\n return true;\n\n // Action 3 - Fail request\n return false;\n }\n }",
"public function authorize()\n {\n $this->model = $this->route('user');\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }",
"public function isAuthorized(): bool\n {\n // TODO: implement authorization check\n\n return true;\n }",
"public function isAuthorized() {}",
"public function authorize()\n {\n return request()->loggedin_role === 1;\n }",
"public function authorize()\n {\n $this->model = $this->route('user');\n\n if ($this->isEdit() && !is_null($this->model)) {\n if (!user()->hasPermissionTo('Administrations::admin.user') && $this->model->id != user()->id) {\n return false;\n }\n }\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }",
"public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }",
"public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }",
"public function authorize()\n {\n return auth()->check() ? true : false;\n }",
"public function authorize()\n {\n return auth()->check() ? true : false;\n }",
"public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }",
"public function authorize()\n {\n switch (true) {\n case $this->wantsToList():\n case $this->wantsToShow():\n if ($this->hasRoles(['owner', 'administrator'])) {\n return true;\n }\n break;\n case $this->wantsToStore():\n case $this->wantsToUpdate():\n case $this->wantsToDestroy():\n if ($this->hasRoles(['owner'])) {\n return true;\n }\n break;\n }\n\n return false;\n }",
"public function authorize()\n {\n $user = JWTAuth::parseToken()->authenticate();\n $organisation = Organization::findOrFail($this->route('organizations'));\n return $organisation->admin_id == $user->id;\n }",
"public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }",
"function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }",
"public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }",
"public function authorize()\n {\n $this->user = User::query()->find($this->route()->parameter('user'));\n $this->merge(['verified' => $this->get('verified') ? 1 : 0]);\n\n return true;\n }",
"public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }",
"public function authorize()\n {\n return is_client_or_staff();\n }",
"public function isAuthorized() {\n\t\treturn true;\n\t}",
"public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }",
"public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }",
"public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin'])) {\n return true;\n } else {\n return false;\n }\n }",
"public function isAuthorized()\n\t{\n\t\t$sessionVal = Yii::$app->session->get($this->sessionParam);\n\t\treturn (!empty($sessionVal));\n\t}",
"public function authorize() {\n\n return auth()->user() && auth()->user()->username === $this->user->username;\n }",
"public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }",
"public function authorize()\n {\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n\n }",
"public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\n }",
"public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }",
"public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }",
"public function hasAuthorized() {\n return $this->_has(1);\n }",
"public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }",
"public function authorize()\n {\n /*\n if ($this->loan_id && is_numeric($this->loan_id) && $loan = Loan::whereId($this->loan_id)->first()) {\n // loan_id belongs to requesting user\n return $loan && $this->user()->id == $loan->user_id;\n }\n */\n return true; // let rules handle it\n }",
"public function authorize()\n {\n //TODO Authorice Request (without Controller)\n return auth()->user()->role_id === 1;\n }",
"public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }",
"public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }",
"public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }",
"public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n else\n {\n return false;\n }\n }",
"public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }",
"public function authorize()\n {\n return \\Auth::check() ? true : false;\n }",
"public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}",
"public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }",
"public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }",
"public function authorize()\n {\n return !empty(Auth::user());\n }",
"public function authorize()\n {\n return $this->groupHasUser() || $this->hasSeller();\n }",
"public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}",
"public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}",
"public function isAuthorized() {\n\t\t\n\t}",
"public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }",
"public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }",
"public function authorize()\n {\n if (auth()->user()->is_admin) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }",
"public function authorize(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }",
"public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}",
"public function authorize()\n {\n if (Auth::check()) {\n \n return true;\n \n }\n return false;\n }",
"public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }",
"public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }",
"public function authorize()\n {\n if (auth()->check() && auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }",
"public function authorize()\n {\n return $this->auth->check();\n }",
"public function authorize() {\n\t\t$user = \\Auth::user();\n\n\t\tif ( $user->isAdmin() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function authorize()\n {\n if (auth()->user()->isAdmin() || auth()->user()->isCustomer()) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n return $this->container['auth']->check();\n }",
"function isAuthorized($request) {\n return true;\n }",
"public function authorize()\n {\n return Auth::guest() || isMember();\n }",
"public function authorize()\n {\n return auth()->user() && auth()->user()->isCeo();\n }",
"public function authorize(): bool\n {\n $deckId = $this->request->get('deck_id');\n $userId = Deck::whereKey($deckId)->value('user_id');\n\n return $userId === user()->id;\n }",
"public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }",
"public function authorize()\n {\n return TRUE;\n }",
"public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }",
"public function authorize()\n {\n # if it's false, it will rejected\n return true;\n }",
"public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }",
"public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }",
"public function is_authorized() {\n\t\t$authorized = true;\n\t\tif ( $this->is_access_token_expired() ) {\n\t\t\t$authorized = false;\n\t\t}\n\n\t\treturn $authorized;\n\t}",
"public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }",
"public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }",
"public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}",
"public function authorize()\n {\n $idExpense = $this->input('expense');\n $expense = Expense::find($idExpense);\n\n return $expense && $this->user()->id == $expense->user_id;\n }",
"public function authorize()\n {\n // User system not implemented\n return true;\n }",
"public function authorize() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }",
"public function authorize()\n {\n $organizationId = (string) $this->route('id');\n\n $this->organization = Organization::findByUuidOrFail($organizationId);\n\n return $this->user()->can('show', [Organization::class, $this->organization]);\n }",
"public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }",
"public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }",
"public function authorize()\n {\n $current_user = auth()->user();\n $convention = Convention::find($this->route('convention_id'));\n\n // Use ClientPolicy here to authorize before checking the fields\n return $current_user->can('store', Convention::class)\n || $current_user->can('update', $convention);\n }",
"public function authorize()\n {\n if (session()->has('user'))\n {\n $participantController = new ParticipantController();\n\n return !$participantController->isParticipating($this->input('id_user'), $this->input('id_event'));\n }\n else\n {\n return false;\n }\n }",
"public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }"
] | [
"0.8401071",
"0.8377486",
"0.8377486",
"0.8344406",
"0.8253731",
"0.824795",
"0.8213121",
"0.8146598",
"0.81115526",
"0.8083369",
"0.7991986",
"0.79907674",
"0.79836637",
"0.79604936",
"0.79516214",
"0.79494005",
"0.79265946",
"0.7915068",
"0.79001635",
"0.7894822",
"0.7891453",
"0.7890965",
"0.7862504",
"0.78414804",
"0.78414804",
"0.7837965",
"0.78248763",
"0.7812292",
"0.7809632",
"0.77928597",
"0.7788316",
"0.7781619",
"0.77815884",
"0.7763308",
"0.7754035",
"0.7717961",
"0.7717961",
"0.77171147",
"0.77138597",
"0.7705001",
"0.7693082",
"0.7692783",
"0.76915383",
"0.76909506",
"0.76733255",
"0.7667128",
"0.7665592",
"0.7656238",
"0.7650853",
"0.764326",
"0.76431626",
"0.76431614",
"0.7635147",
"0.76311624",
"0.76294273",
"0.7627076",
"0.76207024",
"0.76207024",
"0.76139116",
"0.76036394",
"0.76035625",
"0.76035625",
"0.76032084",
"0.7602515",
"0.76007926",
"0.75971127",
"0.7588128",
"0.7586303",
"0.7581912",
"0.7563037",
"0.7554785",
"0.75526226",
"0.755171",
"0.75436753",
"0.75432944",
"0.7540682",
"0.7538806",
"0.75280696",
"0.751548",
"0.75149626",
"0.7501161",
"0.74959517",
"0.74956346",
"0.74911124",
"0.7489147",
"0.74858016",
"0.748033",
"0.7478443",
"0.7472642",
"0.7472576",
"0.7465409",
"0.7464371",
"0.74630046",
"0.7462218",
"0.7461453",
"0.7449168",
"0.74399257",
"0.74358094",
"0.7433247",
"0.7432659",
"0.74248093"
] | 0.0 | -1 |
Get the validation rules that apply to the request. | public function rules()
{
return [
'dataset' => 'required|max:255',
'nazov_dataset' => 'required|max:255',
'short' => 'required|max:255',
'spravca' => 'required|max:255',
'povinna_institucia' => 'required|max:255',
'kontakt_zastupcu' => 'required|max:255',
'tel' => 'required|max:255',
'stav_elektronizacie' => 'required|max:255',
'format' => 'required|max:255',
'rozsah_udajov' => 'required|max:255',
'aktualizacia_udajov' => 'required|max:255',
'spceifikacia_obsahu' => 'required|max:255',
'zverejnitelnost' => 'required|max:255',
'odovodnenie' => 'required|max:255',
'plan_zverejnenia' => 'date'
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }",
"public function getRules()\n {\n return $this->validator->getRules();\n }",
"public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }",
"public function rules()\n {\n return $this->validationRules;\n }",
"public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }",
"public static function getRules()\n {\n return (new static)->getValidationRules();\n }",
"public function getRules()\n {\n return $this->validation_rules;\n }",
"public function getValidationRules()\n {\n return [];\n }",
"public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }",
"public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }",
"public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }",
"protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }",
"public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}",
"public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }",
"public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }",
"public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }",
"function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}",
"public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }",
"public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }",
"protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }",
"public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }",
"public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }",
"protected function getValidRules()\n {\n return $this->validRules;\n }",
"public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }",
"public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }",
"public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }",
"public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }",
"function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}",
"public function rules()\n { \n return $this->rules;\n }",
"public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }",
"public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }",
"public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }",
"public function validationRules()\n {\n return [];\n }",
"public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }",
"function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}",
"public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }",
"public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }",
"public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }",
"public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }",
"public function rules()\n {\n return static::$rules;\n }",
"function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}",
"public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }",
"public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }",
"public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }",
"protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }",
"public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }",
"public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }",
"public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }",
"public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }",
"public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }",
"public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }",
"abstract protected function getValidationRules();",
"public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}",
"public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }",
"public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }",
"public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }",
"public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }",
"public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }",
"public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }",
"public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }",
"public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }",
"public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }",
"public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }",
"public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }",
"public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }",
"public function getValidationRules() : array;",
"public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }",
"public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }",
"public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }",
"public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }",
"public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}",
"public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}",
"public function rules()\n {\n $rules = array();\n return $rules;\n }",
"public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }",
"public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }",
"protected function get_validation_rules()\n {\n }",
"public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }",
"public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }",
"public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }",
"public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }",
"public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }",
"public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }",
"public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }",
"public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }",
"public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }",
"public function defineValidationRules()\n {\n return [];\n }",
"public function rules(Request $request)\n {\n return Qc::$rules;\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }",
"public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }"
] | [
"0.8342703",
"0.80143493",
"0.7937251",
"0.79264987",
"0.79233825",
"0.79048395",
"0.78603816",
"0.7790699",
"0.77842164",
"0.77628785",
"0.7737272",
"0.7733618",
"0.7710535",
"0.7691693",
"0.76849866",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7675849",
"0.76724476",
"0.76665044",
"0.7657698",
"0.7641827",
"0.7630892",
"0.76293766",
"0.7617708",
"0.76102096",
"0.7607475",
"0.7602442",
"0.7598732",
"0.7597544",
"0.75924",
"0.75915384",
"0.7588146",
"0.7581354",
"0.7555758",
"0.755526",
"0.7551423",
"0.7546329",
"0.7541439",
"0.75366044",
"0.75363225",
"0.7530296",
"0.7517988",
"0.75155175",
"0.7508439",
"0.75069886",
"0.7505724",
"0.749979",
"0.7495976",
"0.74949056",
"0.7492888",
"0.7491117",
"0.74901396",
"0.7489651",
"0.7486808",
"0.7486108",
"0.7479687",
"0.7478561",
"0.7469412",
"0.74635684",
"0.74619836",
"0.7461325",
"0.74591017",
"0.7455279",
"0.745352",
"0.7453257",
"0.7449877",
"0.74486",
"0.7441391",
"0.7440429",
"0.7435489",
"0.7435326",
"0.74341524",
"0.7430354",
"0.7429103",
"0.7423808",
"0.741936",
"0.74152505",
"0.7414828",
"0.741382",
"0.74126065",
"0.74105227",
"0.740555",
"0.7404385",
"0.74040926",
"0.74015605",
"0.73905706",
"0.73837525",
"0.73732615",
"0.7371123",
"0.7369176",
"0.73619753",
"0.73554605",
"0.73448825",
"0.7344659",
"0.73427117",
"0.73357755"
] | 0.0 | -1 |
przekazuje baseUrl tylko do kontrolera | public function onDispatch(MvcEvent $e) {
$this->baseUrl=$this->getRequest()->getBasePath();
parent::onDispatch($e);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function bu($url='')\n{\n static $baseUrl;\n $baseUrl=Yii::app()->request->baseUrl;\n $baseUrl .= $baseUrl.'/'.ltrim($url,'/');\n if(param('root_control'))\n {\n $baseUrl = \"/\" . param('root_control') . $baseUrl;\n }\n return $baseUrl; \n}",
"public function getBaseUrl() {}",
"public function baseUrl()\n {\n return \\yii\\helpers\\Url::base(true);\n }",
"public function getBaseUrl();",
"public function getBaseUrl();",
"public function getBaseUrl();",
"public function getBaseUrl();",
"public function getBaseUrl();",
"protected function determineBaseUrl() {}",
"function baseUrl(){\n return sprintf(\n \"%s://%s\",\n isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http',\n $_SERVER['SERVER_NAME']\n );\n }",
"function getBaseUrl() {\n\t$baseUrl = ($_SERVER['HTTP_HOST'] == 'development.grafikchaos.com') ? '/catchcod/' : '/';\n\treturn $baseUrl;\n}",
"public function baseUrl()\n\t{\n\t\techo $_SERVER['SERVER_NAME'];\n\t}",
"public function baseUrl() {\n return dirname($_SERVER['PHP_SELF']) . '/';\n }",
"public function baseUrl() \n\t{\n\t\treturn $this->baseUrl;\n\t}",
"public function baseUrl()\n {\n return $this->baseUrl;\n }",
"private function setBaseUrl()\n {\n $this->baseUrl = config('gladepay.endpoint');\n }",
"function baseUrl(){\n if(isset($_SERVER['HTTPS'])){\n $protocol = ($_SERVER['HTTPS'] && $_SERVER['HTTPS'] != \"off\") ? \"https\" : \"http\";\n }\n else{\n $protocol = 'http';\n }\n return $protocol . \"://\" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n}",
"function bu($url=null) \n{\n static $baseUrl;\n if ($baseUrl===null)\n $baseUrl=Yii::app()->getRequest()->getBaseUrl();\n return $url===null ? $baseUrl : $baseUrl.'/'.ltrim($url,'/');\n}",
"protected function getBaseUrl(): string\n {\n return \"\";\n }",
"public static function baseUrl(): string\n\t{\n\t\treturn static::$baseUrl;\n\t}",
"public static function getBaseUrl() {\n return \"http://localhost:8888/Tutkit_OOP_mit_PHP/Gallery/\";\n }",
"public function setBaseUrl($baseUrl);",
"function bu($url=null)\n{\n static $baseUrl;\n if ($baseUrl===null)\n $baseUrl=Yii::app()->getRequest()->getBaseUrl();\n return $url===null ? $baseUrl : $baseUrl.'/'.ltrim($url,'/');\n}",
"protected function getBaseUrl()\n {\n return self::BASE_URL;\n }",
"private function setBaseUrl()\n {\n if (config(\"redx.sandbox\") == true) {\n $this->baseUrl = \"https://sandbox.redx.com.bd\";\n } else {\n $this->baseUrl = \"https://openapi.redx.com.bd\";\n }\n }",
"function bu($url=null)\n{\n static $baseUrl;\n if ($baseUrl===null)\n $baseUrl=Yii::app()->getRequest()->getBaseUrl();\n return $url===null ? $baseUrl : $baseUrl.'/'.ltrim($url,'/');\n}",
"public function getBaseUrl() {\r\n\t\treturn home_url();\r\n\t}",
"protected function setBaseUrl()\n {\n $this->baseUrl = 'https://api.paystack.co';\n }",
"public static function setBaseUrl(): void\n\t{\n\t\tstatic::$scriptDirectory = str_replace('\\\\', '/', dirname(Server::get('SCRIPT_NAME')));\n\t\t$protocol = Server::get('REQUEST_SCHEME') . '://';\n\t\t$hostname = Server::get('HTTP_HOST');\n\t\tstatic::$baseUrl = $protocol . $hostname . static::$scriptDirectory;\n\t}",
"function base_url(){\n return BASE_URL;\n }",
"function getBaseUrl(){\n return $_SERVER['SERVER_NAME'];\n}",
"public function baseUrl() : string\n {\n return $this->urlGenerator->to('mezzo/upload/');\n }",
"public function getBaseUrl ()\n {\n return $this->base_url;\n }",
"function api_baseurl() {\n if ($_SERVER['SERVER_NAME'] === \"localhost\") {\n $base = \"http://localhost/websites/bop-trips-api/\";\n return $base;\n } else {\n $base = \"http://boptrips.com/api/\";\n return $base;\n }\n}",
"private function getBaseUrl(): string\n {\n return $this->agentUrl . self::OPA_API_VER . \"/\";\n }",
"public function baseUrl()\n\t{\n\t\treturn sprintf('http://%s',\t$this->cluster[array_rand($this->cluster)]);\n\t}",
"public function getBaseUrl()\n {\n return self::BASE_URL;\n }",
"public function basePath();",
"public function basePath();",
"public function getBaseUrl(): string\n {\n return $this->getParameter('baseUrl');\n }",
"public function testBaseUrl()\n\t{\n \t$this->assertEquals(Util::base('foo'), 'http://localhost/www/foo');\n \t$this->assertEquals(Util::css('foo.css'), 'http://localhost/www/public/css/foo.css');\n \t$this->assertEquals(Util::js('foo.js'), 'http://localhost/www/public/js/foo.js');\n \t$this->assertEquals(Util::img('foo.png'), 'http://localhost/www/public/images/foo.png');\n // Test cached\n $this->assertEquals(Util::base('foo'), 'http://localhost/www/foo');\n\t}",
"public function getBaseUrl(): string\n {\n return $this->baseUrl;\n }",
"public function getBaseUrl()\n\t{\n\t\treturn $this->baseUrl;\n\t}",
"public static function getBaseURL(){\n return self::$baseURL;\n }",
"function getBaseUrl()\n{\n $port = ':' . $_SERVER['SERVER_PORT'];\n if (($_SERVER['REQUEST_SCHEME']=='http' && $_SERVER['SERVER_PORT']=='80')\n || ($_SERVER['REQUEST_SCHEME']=='https' && $_SERVER['SERVER_PORT']=='443')\n ) {\n $port = '';\n }\n $path = $_SERVER['SCRIPT_NAME'];\n if (strrpos($path,'index.php')==strlen($path)-9) {\n $path = substr($path,0,-9);\n }\n $baseUrl = $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['SERVER_NAME'] . $port . $path;\n return $baseUrl;\n}",
"public function getBaseUrl()\n {\n return $this->baseUrl;\n }",
"public function getBaseUrl()\n {\n return $this->baseUrl;\n }",
"public function getBaseUrl()\n {\n return $this->baseUrl;\n }",
"public function getBaseUrl()\n {\n return $this->base_url;\n }",
"public function getBaseUrl()\n {\n return $this->base_url;\n }",
"function base_url(){\n $url = BASE_URL;\n return $url;\n }",
"public function getBaseUrl() {\n\t\treturn $this->baseUrl;\n\t}",
"public function getBaseUrl()\n {\n return $this->_baseUrl;\n }",
"public static function get_baseurl()\n {\n }",
"function get_base_url() {\n return $this->base_url;\n }",
"function base_url()\n{\n return APP::getBaseUrl();\n}",
"public function getBaseUrl()\n {\n return $this->config->getBaseUrl();\n }",
"public function getBaseUrl()\n\t\t{\n\t\t\treturn $this->base_url;\n\t\t}",
"public function _initBase()\n\t{// Zend_Registry::set(\"baseUrl\",\"http://\".$_SERVER['HTTP_HOST'].Zend_Controller_Front::getInstance()->getBaseUrl());\n\t\t\t\t\tZend_Registry::set(\"baseUrl\",\"http://zfkit.com/twilio/public\".Zend_Controller_Front::getInstance()->getBaseUrl());\n\t}",
"public function getBaseUrl() {\n return $this->baseUrl;\n }",
"function getBaseUrl()\n{\n $doc_root_folders = utf8_explode(\"/\", $_SERVER['DOCUMENT_ROOT']);\n $cwd__folders = utf8_explode(\"/\", getcwd());\n //the difference between those is the path from doc root to the folder where\n //all files for this URI reside\n $path_from_doc_root = implode(\"/\", array_diff($cwd__folders, $doc_root_folders));\n return $_SERVER['HTTP_HOST'].'/'.$path_from_doc_root;\n}",
"public static function getBaseUrl() {\n\t \tif(!isset(self::$baseUrl)) {\n\t \t self::$baseUrl =\n\t \t\t\tself::getUrlBase().self::getBasePath();\n\t \t}\n\t \treturn self::$baseUrl;\n\t }",
"protected static function baseurl($path=NULL)\n {\n\t\t$res=self::base_url($path);\n\t\treturn $res;\n }",
"public function determineBaseUrl()\n {\n // why this works at all :)\n return dirname($_SERVER['SCRIPT_NAME']);\n }",
"private function detectBaseUrl() {\n $this->baseurl = empty($this->subdir) ? '/' : \"/{$this->subdir}/\";\n }",
"public function base_url()\n\t{\n\t\treturn URL::base();\n\t}",
"public function base_url(){\n return $this->plugin_url() . 'base/';\n }",
"function __construct()\n {\n parent::__construct(); //kutsume tööle http konstruktor\n //loome põhilingi\n $this->baseUrl = $this->protocol . HTTP_HOST . SCRIPT_NAME;\n }",
"function base_url($url = NULL){\n\t\tif ($url != NULL)\n\t\t{\n\t\t\t$baseurl = 'http://localhost/pkl/'.$url;\n\t\t}\n\t\telse\t\n\t\t{\n\t\t\t$baseurl = 'http://localhost/pkl/';\n\t\t}\n\t\t\n\t\treturn $baseurl;\n\t}",
"function base_url($uri=null){\n\t$base_url = 'http://localhost/KoperasiSimpanPinjam/';\n\tif($uri == null){\n\t\treturn $base_url;\n\t}else{\n\t\treturn $base_url.$uri;\n\t}\n}",
"public function getBaseUrl() {\n return self::_getBaseUrl($this->user->getId(), $this->game->getId());\n }",
"public function baseUrl($suffix = '') {\n $protocol = strpos($_SERVER['SERVER_SIGNATURE'], '443') !== false ? 'https://' : 'http://';\n//$web_root = $protocol . $_SERVER['HTTP_HOST'] . \"/\" . \"Dropbox/odesk/pos/\";\n if ($_SERVER['HTTP_HOST'] == \"localhost\") {\n $web_root = $protocol . $_SERVER['HTTP_HOST'] . \"/\" . \"ticketchaiorg/ticketchai_aj/merchant-dashboard/\";\n } elseif ($_SERVER['HTTP_HOST'] == \"192.168.1.48\") {\n $web_root = $protocol . $_SERVER['HTTP_HOST'] . \"/\" . \"ticketchaiorg/ticketchai_aj/merchant-dashboard/\";\n } \n elseif ($_SERVER['HTTP_HOST'] == \"ticketchai.org\" || $_SERVER['HTTP_HOST'] == \"https://ticketchai.com\" || $_SERVER['HTTP_HOST'] == \"http://ticketchai.com/\" ) {\n $web_root = $protocol . $_SERVER['HTTP_HOST'] . \"/\" . \"ticketchaiorg/merchant-dashboard/\";\n }else {\n $web_root = $protocol . $_SERVER['HTTP_HOST'] . \"/\" . \"ticketchaiorg/merchant-dashboard/\";\n }\n\n $suffix = ltrim($suffix, '/');\n return $web_root . trim($suffix);\n }",
"private function getBaseUrl() : string\n {\n return preg_replace(\"/(?<=\\/api\\/v\\d)(.*)/\", '', $this->request->getFullUrl());\n }",
"protected function getAbsoluteBasePath() {}",
"public function baseUrl($parts = \"\") {\n return UrlHelper::getBaseUrl($parts);\n }",
"public static function obtenerRuta()\n {\n return \"http://localhost/frontend/\";\n }",
"public function getBaseUrl() : string\n {\n return $this->base;\n }",
"public function getBaseUrl() {\n\t\treturn $this->settings['npo_api_url'];\n\t}",
"protected function getBaseUrl()\n {\n if (!empty($this->baseApiUrl)) {\n return $this->baseApiUrl;\n }\n\n return parent::getBaseUrl();\n }",
"public function getBaseUrl()\n\t{\n\t\treturn Yii::getAlias($this->baseUrl);\n\t}",
"public static function getBaseUrl()\n {\n $baseUrl = url('/');\n return $baseUrl;\n }",
"public function getBasePath();",
"public function getBasePath();",
"public function getBasePath();",
"public function getBasePath();",
"public function getPublicBasePath();",
"function website_baseurl() {\n if ($_SERVER['SERVER_NAME'] === \"localhost\") {\n $base = \"http://localhost/websites/bop-trips/\";\n return $base;\n } else {\n $base = \"http://boptrips.com/\";\n return $base;\n }\n}",
"public function getBasePath(): string;",
"public function getBasePath(): string;",
"protected static function generate_base_url()\n\t{\n\t\t$base_url = parent::generate_base_url();\n\t\treturn str_replace('htdocs/novius-os/', '', $base_url);\n\t}",
"public function UrlBase(){\n\t\treturn URL_APP;\n\t}",
"protected function getUrl(){\n\t\treturn $this->apiUrl . $this->apiVersion . '/';\n\t}",
"private static function base_url($path=NULL)\n {\n\t\tglobal $url;\n $fullurl=$url.$path;\n return $fullurl;\n\t}",
"protected function baseUrl(string $url): string\n {\n return parent::baseUrl($url) . '.json';\n }",
"public static function getBaseUrl()\n {\n if (Configuration::get(self::TEST_MODE)) {\n return self::TEST_URL;\n }\n\n return self::URL;\n }",
"public function base_url()\n {\n if (isset($_SERVER['HTTP_HOST']) && preg_match('/^((\\[[0-9a-f:]+\\])|(\\d{1,3}(\\.\\d{1,3}){3})|[a-z0-9\\-\\.]+)(:\\d+)?$/i', $_SERVER['HTTP_HOST']))\n {\n $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? \"https://\" : \"http://\";\n $baseurl = $protocol.$_SERVER['HTTP_HOST'].substr($_SERVER['SCRIPT_NAME'], 0, strpos($_SERVER['SCRIPT_NAME'], basename($_SERVER['SCRIPT_FILENAME'])));\n }\n else\n {\n $baseurl = 'http://localhost/';\n }\n\n return $baseurl;\n }",
"protected function getWebRoot() {}",
"protected function getWebRoot() {}",
"public function getBaseUrl() {\n\t\treturn 'https://nextcloud.com';\n\t}",
"function base_url() {\n return Micro::get(Config::class)->get('app.base_url');\n }",
"function getBaseURL(){\n return \"http://\" . $_SERVER['HTTP_HOST'] . \"/eRevive\";\n}"
] | [
"0.77263504",
"0.7721347",
"0.7659341",
"0.7600484",
"0.7600484",
"0.7600484",
"0.7600484",
"0.7600484",
"0.7453957",
"0.7395846",
"0.7379311",
"0.7369998",
"0.73616683",
"0.7299054",
"0.72864056",
"0.72554",
"0.72352505",
"0.7224565",
"0.7209777",
"0.7187",
"0.7177516",
"0.7163782",
"0.7155716",
"0.7148631",
"0.71472144",
"0.7122177",
"0.7118041",
"0.7101759",
"0.7076061",
"0.70758027",
"0.70646775",
"0.7001276",
"0.69979364",
"0.69331783",
"0.687378",
"0.6869043",
"0.68681955",
"0.6844531",
"0.6844531",
"0.6839234",
"0.6834005",
"0.6831672",
"0.6817945",
"0.68175614",
"0.6809154",
"0.6804552",
"0.6804552",
"0.6804552",
"0.6795907",
"0.6795907",
"0.67884624",
"0.6787634",
"0.6765001",
"0.6751114",
"0.67446774",
"0.674458",
"0.67410815",
"0.6736801",
"0.67321414",
"0.6714484",
"0.66866946",
"0.6681756",
"0.66790277",
"0.6674146",
"0.6673985",
"0.6671607",
"0.6671096",
"0.6669297",
"0.6636944",
"0.6614616",
"0.6611354",
"0.6601583",
"0.6583875",
"0.65735006",
"0.6572328",
"0.65665793",
"0.65576637",
"0.6515918",
"0.65139776",
"0.6502378",
"0.6500725",
"0.64928216",
"0.64928216",
"0.64928216",
"0.64928216",
"0.64919186",
"0.6488506",
"0.64879274",
"0.64879274",
"0.64829934",
"0.64792365",
"0.64778626",
"0.64773136",
"0.6467465",
"0.6462695",
"0.64588535",
"0.6454642",
"0.6453271",
"0.6448442",
"0.6439455",
"0.6421435"
] | 0.0 | -1 |
/ funkcja jest wykonywana przed akcjami kontrolera | public function setEventManager(EventManagerInterface $events) {
parent::setEventManager($events);
$events->attach('dispatch', function ($e) {
$controllerClass = $e->getRouteMatch()->getParam('controller', 'index');
// przekazuje do szablonu wywoływany kontroler
$e->getViewModel()->setVariable('controller', $controllerClass);
//przekazuje baseUrl do szablonu layout.phtml
$e->getViewModel()->setVariable('baseUrl', $this->getRequest()->getBasePath());
$userSession = new Session\Container('uzytkownik');
if ($userSession->details) {
$e->getViewModel()->setVariable('uzytkownik', $userSession->details);
}
}, 100);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function contrato()\r\n\t{\r\n\t}",
"public function AggiornaPrezzi(){\n\t}",
"function FotografiaControl(){\n\t\t$this->acceso=new AccesoDatos();\n\t}",
"public function accueil()\n {\n }",
"protected function editar()\n {\n }",
"private function metodo_privado() {\n }",
"public function edit_toko(){\n\t}",
"public function masodik()\n {\n }",
"public function edytujPunktAction() {\n\t\t\t$db = Zend_Registry::get('db');\n\t\t\t$this->_helper->viewRenderer('form', null, true);\n\n\t\t\t// Odczytanie id\n\t\t\t$id = (int)$this->getRequest()->getParam('id');\n\t\t\t$id_inwest = (int)$this->_request->getParam('inwestycja');\n\t\t\t$this->view->back = '<div class=\"back\"><a href=\"'.$this->view->baseUrl.'/admin/inwestycje/lokalizacja/id/'.$id_inwest.'/\">Wróć do listy</a></div>';\n\t\t\t$this->view->info = '<div class=\"info\">Wymiary obrazka: szerokość <b>1165px</b> / wysokość <b>655px</b></div>';\n\t\t\t\n\t\t\t$wpis = $this->view->mapa = $db->fetchRow($db->select()->from('inwestycje_markery')->where('id = ?', $id));\n\t\t\t$this->view->pagename = \" - Edytuj lokalizacje: \".$wpis->nazwa;\n\t\t\t$this->view->tinymce = \"1\";\n\n\t\t\t$form = new Form_LokalizacjaForm();\n\t\t\t$this->view->form = $form;\n\n\t\t\t// Załadowanie do forma\n\t\t\t$array = json_decode(json_encode($wpis), true);\n\t\t\t$form->populate($array);\n\n\t\t\t\t//Akcja po wcisnieciu Submita\n\t\t\t\tif ($this->_request->getPost()) {\n\n\t\t\t\t\t//Odczytanie wartosci z inputów\n\t\t\t\t\t$formData = $this->_request->getPost();\n\t\t\t\t\tunset($formData['MAX_FILE_SIZE']);\n\t\t\t\t\tunset($formData['obrazek']);\n\t\t\t\t\tunset($formData['submit']);\n\t\t\t\t\t$formData['id_inwest'] = $id_inwest;\n\t\t\t\t\t\n\t\t\t\t\t$obrazek = $_FILES['obrazek']['name'];\n\t\t\t\t\t$plik = zmiana($formData['nazwa']).'_'.$id_inwest.'.'.zmiennazwe($obrazek);\n\n\n\t\t\t\t\t//Sprawdzenie poprawnosci forma\n\t\t\t\t\tif ($form->isValid($formData)) {\n\n\t\t\t\t\t$db->update('inwestycje_markery', $formData, 'id = '.$id);\n\n\t\t\t\t\tif ($obrazek) {\n\t\t\t\t\t\tunlink(FILES_PATH.\"/inwestycje/lokalizacja/\".$wpis->plik);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tmove_uploaded_file($_FILES['obrazek']['tmp_name'], FILES_PATH.'/inwestycje/lokalizacja/'.$plik);\n\t\t\t\t\t\t$upfile = FILES_PATH.'/inwestycje/lokalizacja/'.$plik;\n\t\t\t\t\t\tchmod($upfile, 0755);\n\t\t\t\t\t\t\n\t\t\t\t\t\trequire_once 'kCMS/Thumbs/ThumbLib.inc.php';\n\n\t\t\t\t\t\t$options = array('jpegQuality' => 80);\n\t\t\t\t\t\t$thumb = PhpThumbFactory::create($upfile, $options)->adaptiveResizeQuadrant(1165, 655)->save($upfile);\n\n\t\t\t\t\t\t$dataImg = array('plik' => $plik);\n\t\t\t\t\t\t$db->update('inwestycje_markery', $dataImg, 'id = '.$id);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$this->_redirect('/admin/inwestycje/lokalizacja/id/'.$id_inwest.'/');\n\n\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t//Wyswietl bledy\t\n\t\t\t\t\t$this->view->message = '<div class=\"error\">Formularz zawiera błędy</div>';\n\t\t\t\t\t$form->populate($formData);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"function ingresoController(){\n\t\tif ( empty($_POST['usuariolg']) || empty($_POST['passlg'])) {\n\t\t\t//echo \"Varibles vacias\";\n\t\t}else{\n\t\t\t\n\t\t\t$respuesta = (new AdminModel) -> ingresoM($_POST['usuariolg'], $_POST['passlg']);\n\t\t\tif (strtolower($respuesta[\"usuario\"]) == strtolower($_POST['usuariolg']) && $respuesta[\"password\"] == $_POST['passlg']) {\t\n\t\t\t\techo \"<span class=''>Salió</span>\";\n\t\t\t\tif($_SESSION['usuario']){\n\t\t\t\t\techo '<br>';\n\t\t\t\t\tif (empty($_GET['Tid'])) {\n\t\t\t\t\t\theader('Location: ?');\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\theader('Location: ?action=cartelera&Tid='.$_GET['Tid']);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t\techo \"<span class='noti'>Verifique sus datos<br> \".$respuesta['usuario'].\"</span>\";\n\t\t\t\t\t}\n\t\t\t}\t\n\t}",
"public static function dodajArtikelVKosarico() {\n $id = $_SESSION[\"uporabnik_id\"];\n $uporabnik = UporabnikiDB::get($id);\n\n $id_artikla = filter_input(INPUT_POST, \"id\", FILTER_SANITIZE_SPECIAL_CHARS);\n $status = \"kosarica\";\n\n // ce narocilo ze obstaja mu samo povecamo kolicino \n // drugace narocilo ustvarimo\n $narocilo = NarocilaDB::getByUporabnikId($id, $status);\n\n if (!$narocilo) {\n\n $id_narocila = NarocilaDB::insert($id, $status);\n PodrobnostiNarocilaDB::insert($id_artikla, 1, $id_narocila);\n\n } else {\n\n $podrobnost_narocila = PodrobnostiNarocilaDB::getByNarociloAndArtikel($narocilo[\"id\"], $id_artikla);\n\n if (!$podrobnost_narocila) {\n PodrobnostiNarocilaDB::insert($id_artikla, 1, $narocilo[\"id\"]);\n } else {\n PodrobnostiNarocilaDB::edit($id_artikla, $podrobnost_narocila[\"kolicina\"] + 1, $narocilo[\"id\"]); \n } \n }\n\n echo ViewHelper::redirect(BASE_URL);\n\n }",
"function cl_editalrua() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"editalrua\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function editar()\n {\n }",
"public function truycapvao_private_cha(){\n }",
"public function sankcionisi_korisnika()\n {\n\n $sankcionisaniIme= $this->request->getVar('korisnik');\n $kazna=$this->request->getVar('kazna');\n // echo $sankcionisaniIme;\n //echo $kazna;\n $admin= $this->session->get(\"korisnik\");\n $sankcionisaniIme= $this->request->getVar('korisnik');//ili na bilo koji drugi nacin dohvatanje\n $kazna=$this->request->getVar('kazna');//ili na bilo koji drugi nacin dohvatanje\n $korisnikModel=new KorisnikModel();\n $sankcionisani=$korisnikModel->dohvati_korisnika($sankcionisaniIme);\n $korisnikModel->sankcionisi($sankcionisani, $kazna);\n return redirect()->to( $_SERVER['HTTP_REFERER']);\n \n }",
"public function acessarRelatorios(){\n\n }",
"function cl_conplanoorcamento() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"conplanoorcamento\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function pokazAction() {\n\t\t\t$db = Zend_Registry::get('db');\n\t\t\t$this->view->kat = $id = (int)$this->getRequest()->getParam('id');\n\t\t\t$this->view->katalog = $db->fetchRow($db->select()->from('galeria')->where('id =?', $id));\n\t\t\t$this->view->zdjecia = $db->fetchAll($db->select()->from('galeria_zdjecia')->order('sort ASC')->where('id_gal =?', $id));\n\t\t}",
"public function metodo_publico() {\n }",
"public function contarInventario(){\n\t}",
"function cl_tfd_situacaopedidotfd() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tfd_situacaopedidotfd\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_ouvidoriaatendimento() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"ouvidoriaatendimento\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_tipovistoriasrec() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tipovistoriasrec\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_reconhecimentocontabil() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"reconhecimentocontabil\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function execute() {\n\t\t$userLogin = null;\n\t\t$userIsAuth = false;\n\t\t$userLogin = $this->_session->userLogin;\n\t\t$userIsAuth = $this->_session->userIsAuth;\n\t\tif(empty($userLogin) || ($userIsAuth == false)) {\n\t\t\tthrow new ControllerException('Brak dostepu');\n\t\t}\t\t\t\n\t\t\n\t\t$baseUrl = $this->_request->getBaseUrl();\n\t\t$flashNotice = $this->_session->getFlashData('notice');\n\t\t$currentPageNumber = $this->_request->get('page');\n\t\t\n\t\t//pobieranie danych z modelu\n\t\t$resourceFieldsNames = $this->_resourceMapper->getFieldsNames();\n\t\t$resourceRelationsNames = $this->_resourceMapper->getRelationsNames();\n\t\t$groupFieldsNames = $this->_groupMapper->getFieldsNames();\n\t\t\n\t\t$countAll = $this->_resourceMapper->countAll();\n\t\t$this->_paginator->setLink($baseUrl.'/admin/resource/list/'); \n\t\t$this->_paginator->setNumberOfRecords($countAll);\n\t\t$this->_paginator->setCurrentPageNumber($currentPageNumber); \n\t\t$resources = $this->_resourceMapper->getAllResources($this->_paginator->getLimit(), $this->_paginator->getOffset());\n\t\t\n\t\t//przygotowanie tablicy z lista zasobow\n\t\t$resourcesToView = array();\n\t\tforeach($resources AS $resource) {\n\t\t\t$r = array();\n\t\t\t$r = $resource->toArray($resourceFieldsNames);\n\t\t\t$groups = $resource->groups->getCollection();\n\t\t\t$groupsToView = array();\n\t\t\tforeach($groups AS $group) {\n\t\t\t\t$g = array();\n\t\t\t\t$g = $group->toArray($groupFieldsNames);\n\t\t\t\t$groupsToView[] = $g;\n\t\t\t}\n\t\t\t$r['groups'] = $groupsToView;\n\t\t\t$resourcesToView[] = $r;\n\t\t}\n\t\t\n\t\t//przygotowanie dodatkowych danych dla widoku\n\t\t$links = array('view'=>array($this->_i18n->translate('view'), $baseUrl.'/admin/resource/view/id/'), 'edit'=>array($this->_i18n->translate('edit'), $baseUrl.'/admin/resource/editForm/id/'), 'delete'=>array($this->_i18n->translate('delete'), $baseUrl.'/admin/resource/delete/id/'));\n\t\t$resourceTableHeadersNames = array_map(array($this->_i18n, 'translate'), $resourceFieldsNames);\n\t\t\t\t\n\t\t//dolaczenie danych do widoku\n\t\t$this->_view->assign('resources', $resourcesToView);\n\t\t$this->_view->assign('flashNotice', $flashNotice);\n\t\t$this->_view->assign('links', $links);\n\t\t$this->_view->assign('paginator', $this->_paginator->getPaginator());\t\t\t\n\t\t$this->_view->assign('resourceTableHeadersNames', $resourceTableHeadersNames);\n\t\t$this->_view->assign('groupsString', $this->_i18n->translate($resourceRelationsNames['groups']));\t\t\n\t\t$this->_view->assign('resourceListTitle', $this->_i18n->translate('Resources list'));\n\t\t$this->_view->assign('noResourceMessage', $this->_i18n->translate('No resources in data base'));\t\t\n\t\t$this->_view->assign('noGroupMessage', $this->_i18n->translate('Resource has no group'));\n\t\t\n\t}",
"public function mostra(){\n }",
"function controlAcceso () {\n \t/*\n \techo $this->uri->segment(1);\n \techo $this->uri->segment(2);\n \techo $this->uri->segment(3);\n \techo $this->uri->segment(4);\n \techo $this->uri->segment(); \t\n*/\n\n \t$idusuario = 1;\n \t\n \tif ($this->compruebaAcceso($idusuario)) {\n\t\t\t$crud = new grocery_CRUD();\n\t\t\t\n\t\t\t$crud->set_table('USUARIO');\n\t\t\t$crud->where('IDUSUARIO',$idusuario);\n\t\t\t\n\t\t\t\n\t\t\t$output = $crud->render();\n\t\t\t\n\t\t\t$this->_example_output($output);\n\t\t\n \t} else {\n \t\t$this->load->view('usuario_no_autorizado.php');\n \t}\n \t\n \t\n }",
"function cl_conplanoconplanoorcamento() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"conplanoconplanoorcamento\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function enlacesPaginasController(){\n //Viene del templete\n //Se verifica el contenido del action desde la url\n if(isset($_GET[\"action\"])){\n //en caso de contener algo esto es almacenado para poder dirigirnos a el \n $enlacesController = $_GET[\"action\"];\n }else{\n //caso contrario nos redirige al index para una verificacion.\n $enlacesController=\"index\";\n }\n //Ingresamos a la clase EnlacesPaginas y a su metdo que nos verifica a donde queremos ir\n $respuesta = EnlacesPaginas::enlacesPaginasModel($enlacesController);\n //y lo que recibimos es el docuemtnto que se incluira en el actual.\n include $respuesta;\n }",
"function archobjet_autoriser() {\n}",
"public function execute() {\n\t\t$userLogin = null;\n\t\t$userIsAuth = false;\n\t\t$userLogin = $this->_session->userLogin;\n\t\t$userIsAuth = $this->_session->userIsAuth;\n\t\tif(empty($userLogin) || ($userIsAuth == false)) {\n\t\t\tthrow new ControllerException('Brak dostepu');\n\t\t}\t\t\t\n\t\t\n\t\t$baseUrl = $this->_request->getBaseUrl();\n\t\t$menuId = (int)$this->_request->get('id');\t\t\n\t\tif(($menuId == '') || ($menuId == null)) {\n\t\t\tthrow new ControllerException('Brak identyfikatora menu');\n\t\t}\n\n\t\t//pobieranie danych z modelu\n\t\t$menuFieldsNames = $this->_menuMapper->getFieldsNames();\n\t\t$menuRelationsNames = $this->_menuMapper->getRelationsNames();\t\n\t\t$entryFieldsNames = $this->_entryMapper->getFieldsNames();\n\t\t\n\t\t//pobieranie danych z modelu, przygotowanie tablicy z danymi menu\n\t\t$menusCollection = $this->_menuMapper->getById($menuId);\n\t\tif(count($menusCollection) != 1) {\n\t\t\tthrow new ControllerException('Menu nie istnieje w bazie danych');\n\t\t}\n\t\t$menuObject = $menusCollection[0];\n\t\t$menuToView = $menuObject->toArray($menuFieldsNames);\n\t\t$entriesCollection = $menuObject->entries->getCollection();\n\t\t$entriesToView = array();\n\t\tforeach($entriesCollection AS $entryObject) {\n\t\t\t$entry = array();\n\t\t\t$entry = $entryObject->toArray($entryFieldsNames);\n\t\t\t$entriesToView[] = $entry; \n\t\t}\n\t\t$menuToView['entries'] = $entriesToView;\n\t\t\t\t\n\t\t//przygotowanie dodatkowych danych dla widoku\n\t\t$links = array('edit'=>array($this->_i18n->translate('edit'), $baseUrl.'/admin/menu/editForm/id/'), 'delete'=>array($this->_i18n->translate('delete'), $baseUrl.'/admin/menu/delete/id/'));\n\t\t$menuTableHeadersNames = array_map(array($this->_i18n, 'translate'), $menuFieldsNames);\n\t\t\n\t\t//dolaczenie danych do widoku\n\t\t$this->_view->assign('menu', $menuToView);\n\t\t$this->_view->assign('links', $links);\n\t\t$this->_view->assign('menuTableHeadersNames', $menuTableHeadersNames);\n\t\t$this->_view->assign('entriesString', $this->_i18n->translate($menuRelationsNames['entries']));\t\t\n\t\t$this->_view->assign('menuViewTitle', $this->_i18n->translate('Menu view'));\n\t\t$this->_view->assign('noEntryMessage', $this->_i18n->translate('Menu has no entry'));\n\t\t\n\t}",
"public function trasnaction(){\n\n\t}",
"function cl_contacorrenteregravinculo() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"contacorrenteregravinculo\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function pengguna(){\n $this->authenticated();\n if($this->session->userdata('role') != 'admin') // Jika user yg login bukan admin\n show_404(); // Redirect ke halaman 404 Not found\n // function render_backend tersebut dari file core/MY_Controller.php\n $this->render_backend('pengguna'); // load view pengguna.php\n }",
"public function correu(){\n echo \" correu !\";\n }",
"public function nowyPunktAction() {\n\t\t\t$db = Zend_Registry::get('db');\n\t\t\t$this->_helper->viewRenderer('form', null, true);\n\t\t\t$this->view->pagename = \" - Nowa lokalizacja\";\n\n\t\t\t$id_inwest = (int)$this->_request->getParam('inwestycja');\n\t\t\t$this->view->back = '<div class=\"back\"><a href=\"'.$this->view->baseUrl.'/admin/inwestycje/lokalizacja/id/'.$id_inwest.'/\">Wróć do listy</a></div>';\n\t\t\t$this->view->info = '<div class=\"info\">Wymiary obrazka: szerokość <b>1165px</b> / wysokość <b>655px</b></div>';\n\t\t\t$this->view->tinymce = \"1\";\n\n\t\t\t// Wyswietl formularz\n\t\t\t$form = new Form_LokalizacjaForm();\n\t\t\t$this->view->form = $form;\n\n\t\t\t\t//Akcja po wcisnieciu Submita\n\t\t\t\tif ($this->_request->getPost()) {\n\n\t\t\t\t\t//Odczytanie wartosci z inputów \n\t\t\t\t\t$formData = $this->_request->getPost();\n\t\t\t\t\tunset($formData['MAX_FILE_SIZE']);\n\t\t\t\t\tunset($formData['obrazek']);\n\t\t\t\t\tunset($formData['submit']);\n\t\t\t\t\t$formData['id_inwest'] = $id_inwest;\n\t\t\t\t\t\n\t\t\t\t\t$obrazek = $_FILES['obrazek']['name'];\n\t\t\t\t\t$plik = zmiana($formData['nazwa']).'_'.$id_inwest.'.'.zmiennazwe($obrazek);\n\t\t\t\t\t\n\t\t\t\t\t//Sprawdzenie poprawnosci forma\n\t\t\t\t\tif ($form->isValid($formData)) {\n\n\t\t\t\t\t\t$db->insert('inwestycje_markery', $formData);\n\t\t\t\t\t\t$lastId = $db->lastInsertId();\n\n\t\t\t\t\t\tif ($obrazek) {\n\n\t\t\t\t\t\t\tmove_uploaded_file($_FILES['obrazek']['tmp_name'], FILES_PATH.'/inwestycje/lokalizacja/'.$plik);\n\t\t\t\t\t\t\t$upfile = FILES_PATH.'/inwestycje/lokalizacja/'.$plik;\n\t\t\t\t\t\t\tchmod($upfile, 0755);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\trequire_once 'kCMS/Thumbs/ThumbLib.inc.php';\n\n\t\t\t\t\t\t\t$options = array('jpegQuality' => 80);\n\t\t\t\t\t\t\t$thumb = PhpThumbFactory::create($upfile, $options)->adaptiveResizeQuadrant(1165, 655)->save($upfile);\n\n\t\t\t\t\t\t\t$dataImg = array('plik' => $plik);\n\t\t\t\t\t\t\t$db->update('inwestycje_markery', $dataImg, 'id = '.$lastId);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->_redirect('/admin/inwestycje/lokalizacja/id/'.$id_inwest.'/');\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Wyswietl bledy\t\n\t\t\t\t\t\t$this->view->message = '<div class=\"error\">Formularz zawiera błędy</div>';\n\t\t\t\t\t\t$form->populate($formData);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public function salidaAction()\n {\n \n }",
"function cl_db_projetoscliente() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"db_projetoscliente\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_evolucaodividaativa() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"evolucaodividaativa\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"private function najitNavstevu(){\n $this->tpl = \"konec-navstevy\";\n }",
"public function inativarregistroAction()\n\t{\n\n\t}",
"function cl_sau_receitamedica() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_receitamedica\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_clientesmodulosproc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"clientesmodulosproc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function formulario()\n {\n //\n }",
"function cl_rhconsignadomovimentoservidorrubrica() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhconsignadomovimentoservidorrubrica\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public static function odstraniArtikelIzKosarice() {\n $id = $_SESSION[\"uporabnik_id\"];\n $uporabnik = UporabnikiDB::get($id);\n\n $id_artikla = filter_input(INPUT_POST, \"id\", FILTER_SANITIZE_SPECIAL_CHARS);\n $status = \"kosarica\";\n\n $narocilo = NarocilaDB::getByUporabnikId($id, $status);\n $podrobnost_narocila = PodrobnostiNarocilaDB::getByNarociloAndArtikel($narocilo[\"id\"], $id_artikla);\n\n\n if (PodrobnostiNarocilaDB::delete($podrobnost_narocila[\"id_podrobnosti_narocila\"])) {\n echo ViewHelper::redirect(BASE_URL . \"kosarica\");\n } else {\n echo(\"Napaka\");\n }\n }",
"function cl_criterioavaliacaodisciplina() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"criterioavaliacaodisciplina\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_pcorcamfornelic() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"pcorcamfornelic\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_db_usuariosrhlota() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"db_usuariosrhlota\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function publicacioAction()\n {\n $idGal = (int) $this->getRequest()->getParam(\"id\",0);\n \n //passo page per quedarnos a la pàgina d'on venim\n $page = (int) $this->getRequest()->getParam(\"page\",0);\n //valor de publicar o despublicar\n $valor = (int) $this->getRequest()->getParam(\"val\",0);\n \n $controller = $this->getRequest()->getparam(\"c\",0);\n \n \n $this->_galeriaDoctrineDao->privacitat($idGal,$valor);\n \n if($controller ==='index'){\n $this->_redirect('/admin/index');\n }else{\n $this->_redirect('/admin/galeria/listado/page/'.$page);\n }\n }",
"function cl_moblevantamentoedi() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"moblevantamentoedi\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function __construct ()\n {\n // CETTE METHODE SERA APPELEE PAR TOUTES LES ROUTES\n // CAR LA ROUTE PRECISE QUELLE CLASSE ET QUELLE METHODE APPELER\n // DONC LE FRAMEWORK W DOIT CREER UN OBJET DE CETTE CLASSE\n // AVANT D'ACTIVER LA METHODE\n // ET LES CLASSES DANS LES ROUTES HERITENT DE CETTE CLASSE\n // FormController\n // DONC LA METHODE __construct DE LA CLASSE FormController\n // EST AUSSI APPELEE A LA CREATION DE L'OBJET...\n \n // ON PEUT DONC AJOUTER ICI LE CODE QU'ON VEUT ACTIVER\n // POUR TOUTES LES ROUTES...\n \n // APPELER LE CONSTRUCTEUR DU parent\n // POUR CONTINUER A GARDER LA MECANIQUE DU FRAMEWORK W\n // parent::__construct();\n \n // TRAITEMENT DU FORMULAIRE\n $idFormClasse = $this->verifierSaisie(\"idFormClasse\");\n $idFormMethode = $this->verifierSaisie(\"idFormMethode\");\n \n // UN PEU DE SECURITE...\n // JE VAIS COMPLETER LE CHEMIN VERS LE NAMESPACE DE LA CLASSE\n $idFormClasse = \"\\Controller\\Traitement\\\\$idFormClasse\";\n \n if ( ($idFormClasse != \"\") && ($idFormMethode != \"\") )\n {\n // ON A UN FORMULAIRE A TRAITER\n // ON CHERCHE SI IL Y A UNE CLASSE AVEC LA METHODE DEMANDEE\n // http://php.net/manual/fr/function.method-exists.php\n if (method_exists($idFormClasse, $idFormMethode))\n {\n // ON PEUT APPELER LA METHODE\n // ON CREE UN OBJET\n // ET AVEC L'OBJET ON APPELLE LA METHODE\n \n // ASTUCE:\n // CREATION DYNAMIQUE D'OBJET\n // ET APPEL DYNAMIQUE A UNE METHODE\n // http://php.net/manual/fr/language.oop5.basic.php\n $objet = new $idFormClasse;\n // $this EST L'OBJET DE CLASSE FormController\n $objet->$idFormMethode($this);\n }\n }\n \n }",
"public function pregledtudjegpredv() {\n $data['kor_ime']=$this->session->get('kor_tip');\n $trenprikaz='prikazprofpredv_admin'; \n $username=$this->request->uri->getSegment(3);\n $korisnikModel=new KorisnikModel();\n $data['user']=$korisnikModel->dohvati_korisnika($username);\n if(($data['user']->Username)==($this->session->get('korisnik')->Username)) {$data['user']=$this->session->get('korisnik'); $trenprikaz='profilkorisnikpredvidjanja'; }\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanja=$predvidjanjeModel->dohvati_predvidjanja_po_korisnickom_imenu($data['user']->Username);\n $data['predvidjanja']=$predvidjanja;\n $this->prikaz($trenprikaz, $data);\n }",
"public function baseSlajderi()\n {\n \n $this->linija = Slajderi::model()->findAllByAttributes(array('jezik'=>Yii::app()->session[\"lang\"]),array('order'=>'id'));\n $this->nalovSlajderi = $this->linija[0] -> naslov;\n \n \n }",
"public function index(){\n $tarjeta_rokys_service=new TarjetaRokysService;\n $tarjeta_rokys=$tarjeta_rokys_service->getFirst();\n if(isset($tarjeta_rokys)){\n $this->datos['codigo_tarjeta']=$tarjeta_rokys;\n $this->getView('registro_cliente');\n }else{\n die('Se agotaron las tarjetas!!....');\n }\n }",
"public function pasaje_abonado();",
"function cl_rhemitecontracheque() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhemitecontracheque\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_aguacorte() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"aguacorte\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function pretragaIdeja(){\n $data['kor_ime']=$this->session->get('kor_tip');\n $idejaModel=new IdejaModel();\n $korisnik= $this->request->getVar(\"pretraga\");\n $ideje=$idejaModel->dohvati_ideje_po_korisnickom_imenu($korisnik);\n $data['ideje']=$ideje;\n $this->prikaz('pregled_ideja', $data);\n }",
"public function index() {\n $this->ograniczDostepTylkoDlaAdmina();\n $db = $this->registry->db; \n $login = isset($_SESSION['user']) ? $_SESSION['user'] : '';\n if ($db::isUserInRole($login, 'admin')) {\n $this->registry->template->results = $db::getTypyUrzadzenList();\n }\n //else\n //{\n //$thisd ->registry->template->results = $db::getUrzadeniaListByLogin($login); \n //}\n $this->registry->template->show('typy_urzadzen/typy_urzadzen_index');\n }",
"function cl_condicionante() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"condicionante\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_avaliacaoestruturanota() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"avaliacaoestruturanota\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cilien_autoriser(){}",
"public function listoaAction() \n { \n // valores iniciales formulario (C)\n $id = (int) $this->params()->fromRoute('id', 0); \n if($this->getRequest()->isPost()) // Actulizar datos\n {\n $request = $this->getRequest();\n $data = $this->request->getPost();\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $u=new tipdocontrolo($this->dbAdapter); // ---------------------------------------------------------- 5 FUNCION DENTRO DEL MODELO (C) \n $u->actRegistro($data); \n }\n $view = new ViewModel(); \n $this->layout('layout/blancoC'); // Layout del login\n return $view; \n //return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin);\n\n }",
"public function hola1()\n {\n \n $prueba = UsuarioController::index();\n echo $prueba;\n\n /*\n $arr = [\n 'insert'=>true,\n 'update'=>false,\n 'delete'=>true,\n 'view'=>false\n ];\n $res = $this->hola2($arr);\n echo $res;*/\n }",
"public function relatorioAction() { \r\n \r\n }",
"public function objetivos_estrategicos(){\n $data['menu']=$this->menu(1);\n $data['configuracion']=$this->model_proyecto->configuracion_session();\n $data['resp']=$this->session->userdata('funcionario');\n $data['res_dep']=$this->tp_resp();\n $data['indi']= $this->model_proyecto->indicador(); /// indicador\n $data['obj_estrategicos']=$this->mis_objetivos_estrategicos();\n\n $this->load->view('admin/mestrategico/obj_estrategico/objetivos_estrategicos', $data);\n }",
"public function zpracuj($parametry) {\r\n $akce = \"new\";\r\n\r\n // bude-li odeslano take z formulare ma _POST prednost pred URL\r\n if (isset($_POST['akce'])&& (!empty($_POST['akce']))) {\r\n $akce = $_POST['akce'];\r\n } else {\r\n if (isset($parametry[0]) and in_array($parametry[0], ObjektKontroler::$typakce))\r\n $akce = $parametry[0];\r\n };\r\n\r\n if ((!isset($_POST['list'])) and isset($parametry[1]))\r\n $_POST['list'] = $parametry[1];\r\n\r\n\t\t//Debug::p($akce);\r\n\r\n $this->pohled = 'nabidka'; // Nastavení implicitni šablony\r\n // Hlavička stránky\r\n $this->hlavicka['titulek'] = 'Editor nabidky';\r\n $nab = new NhlavickaClass();\r\n\t\t$nab->data[\"nazev\"]=\"Nabidka XY\";\r\n\t\t$nab->data[\"id\"] = $nab->insert($nab->data);\r\n\t\t$nab->data[\"nazev\"]=\"Nabidka \".$nab->data[\"id\"] ;\r\n // Byl odeslán formulář\r\n if ($akce == \"new\") {\r\n\t\t\tif ( empty($_POST['list'])){\r\n\r\n\t\t\t}else{\r\n\t\t\t\t//je to seznam objektu oddelenych carkou \"15,12,78\"\r\n\t\t\t\t$polozky = explode(\",\",$_POST['list']);\r\n\t\t\t\tforeach ($polozky as $polID){\r\n\t\t\t\t\t$obj = new ObjektClass();\r\n\t\t\t\t\t$obj->get($polID);\r\n\t\t\t\t\t$pol = new NpolozkaClass();\r\n\t\t\t\t\t$pol->setByObjekt($obj);\r\n\t\t\t\t\t$pol->insert();\r\n\t\t\t\t}\r\n\t\t\t}\r\n $this->data = $nab->data; // Proměnné pro šablonu\r\n $this->data['titulek'] = 'Nová nabídka';\r\n\t\t\t// po odeslani formulare uloz\r\n $this->data['akce'] = 'insert';\r\n\t\t\t// $akce = 'insert'; // po odeslani formulare uloz\r\n }\r\n\r\n if ($akce == \"view\") {\r\n $nab->get($parametry[1]);\r\n $nab->data = array_intersect_key(array_merge(array_flip(NhlavickaClass::$sloupce), $nab->data), $nab->data);\r\n $this->data = $nab->data;\r\n $this->data['akce'] = 'save';\r\n $this->data['titulek'] = 'Detail nabídky ' . $nab->data['nazev'];\r\n Zprava::zobraz('Objekt k detailu byl vybrán');\r\n $this->pohled = 'DetailObjekt';\r\n }\r\n if ($akce == \"ObnovSkryj\") {\r\n DB::proved(\"UPDATE objekt SET status = (- status) WHERE objekt_id = ? \", array($parametry[1]));\r\n Zprava::zobraz('Objekt byl zneplatněn');\r\n $this->presmeruj('/objekt/edit/' . $parametry[1]);\r\n }\r\n if ($akce == \"delete\") {\r\n DB::proved(\"DELETE FROM obr WHERE id_objekt= ? \", array($parametry[1]));\r\n\t\t\tDB::proved(\"DELETE FROM objekt WHERE objekt_id = ? \", array($parametry[1]));\r\n Zprava::zobraz('Objekt byl smazán');\r\n $this->presmeruj('/');\r\n }\r\n\r\n\r\n if ($akce == \"insert\") {\r\n\r\n $nab->data = array_intersect_key($_POST, array_flip(NhlavickaClass::$sloupce));\r\n $nab->data['status'] = 1;\r\n $this->data = $nab->data;\r\n // zaloz noveho\r\n $this->data['objekt_id'] = $nab->insert($nab->data);\r\n $this->data['titulek'] = 'Editace objektu';\r\n // budu ho pak editovat\r\n $this->data['akce'] = 'edit';\r\n Zprava::zobraz('Objekt byl založen');\r\n $this->presmeruj('/nabidka/edit/' . $this->data['id']);\r\n }\r\n\r\n if ($akce == \"edit\") {\r\n //najdu objekt podle objekt_id\r\n $obj->get($_POST['objekt_id']);\r\n $obj->data = array_intersect_key(array_merge(array_flip(NhlavickaClass::$sloupce), $obj->data), $obj->data);\r\n $this->data = $obj->data;\r\n $this->data['akce'] = 'save';\r\n $this->data['titulek'] = 'Editace objektu ' . $obj->data['nazev'];\r\n Zprava::zobraz('Objekt byl vybrán');\r\n }\r\n if ($akce == \"save\") {\r\n\t\t\t//najdu objekt podle objekt_id\r\n\t\t\t// $obj->get($_POST['objekt_id']);\r\n $obj->data = array_intersect_key($_POST, array_flip(NhlavickaClass::$sloupce));\r\n $this->data = $obj->data;\r\n $obj->data['status'] = 2;\r\n $obj->update($obj->data);\r\n $this->data['akce'] = 'edit';\r\n $this->data['titulek'] = 'Editace objektu ' . $obj->data['nazev'];\r\n Zprava::zobraz('Objekt byl upraven');\r\n\t\t\t// //pridam obrazky udelam to pres Ajax\r\n\t\t\t// $img = new ObrClass();\r\n\t\t\t// $img->data['id_objekt'] = $obj->data['objekt_id'];\r\n\t\t\t// $img->insertFILES();\r\n $this->presmeruj('/nabidka/edit/' . $this->data['objekt_id']);\r\n }\r\n\r\n if ($akce == \"seznam\") {\r\n //seznam vsech objektu\r\n $obj->select( ' status >= ? ', Array(0) );\r\n // Debug::p($obj);\r\n $this->data['seznam'] = $obj->data;\r\n $this->data['akce'] = 'seznam';\r\n $this->data['titulek'] = 'Seznam objektů';\r\n Zprava::zobraz('Vybráno ' . count($this->data['seznam']) . ' objektů');\r\n // $this->presmeruj('/objekt');\r\n $this->pohled = 'objekty';\r\n if (isset($parametry[1]) and $parametry[1] === 'T')\r\n $this->pohled = 'objektyTab';\r\n }\r\n }",
"public function jalan() {\n echo \"method jalan() berisi : Hewan ini terbang\";\n }",
"public function listoAction() \n { \n $form = new Formulario(\"form\");\n // valores iniciales formulario (C)\n $id = $this->params()->fromRoute('id', 0);\n \n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter'); \n $d = new AlbumTable($this->dbAdapter);\n $pos = strpos($id, \".\"); \n $idIasp = substr($id, 0 , $pos ); // Id item aspectos \n $idCar = substr($id, $pos+1 , 100 ); // id Cargo\n $form->get(\"id\")->setAttribute(\"value\",$idIasp); \n $form->get(\"id2\")->setAttribute(\"value\",$idCar); \n \n if ($id==0)\n { \n $data = $this->request->getPost();\n $idIasp = $data->id; \n } \n $datos = $d->getGeneral(\"select a.*, b.nombre as nomAsp,c.texto, c.a, c.b, c.c, c.d, c.e, a.tipo \n from t_asp_cargo_i a \n inner join t_asp_cargo b on b.id=a.idAsp \n left join t_cargos_a c on c.idIasp=a.id \n where a.idAsp=\".$idIasp); \n \n // ------------------------ Fin valores del formulario \n if($this->getRequest()->isPost()) // Actulizar datos\n {\n $request = $this->getRequest();\n if ($request->isPost()) { \n \n $u = new CargosA($this->dbAdapter);// ------------------------------------------------- 3 FUNCION DENTRO DEL MODELO (C) \n $data = $this->request->getPost();\n $d->modGeneral(\"Delete from t_cargos_a where idAsp=\".$data->id);\n //print_r($data);\n foreach ($datos as $dato){\n $idLc = $dato['id'];\n $nombre = '';\n if ($dato['tipo'] == 1)// Texto \n {\n $texto = '$data->text'.$idLc;\n eval(\"\\$nombre = $texto;\"); \n } \n $a = 0;$b = 0;$c = 0;$d = 0;$e = 0;\n if ($dato['tipo'] == 2)// Lista de opciones \n {\n $texto = '$data->comenNa'.$idLc;\n eval(\"\\$a = $texto;\"); \n $texto = '$data->comenNb'.$idLc;\n eval(\"\\$b = $texto;\"); \n $texto = '$data->comenNc'.$idLc;\n eval(\"\\$c = $texto;\"); \n $texto = '$data->comenNd'.$idLc;\n eval(\"\\$d = $texto;\"); \n $texto = '$data->comenNe'.$idLc;\n eval(\"\\$e = $texto;\"); \n }\n $u->actRegistro( $data->id2, $data->id, $dato['id'],$nombre, $a, $b, $c, $d, $e);\n }\n $this->flashMessenger()->addMessage('');\n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin.'o/'.$data->id.\".\".$data->id2);\n } \n }else{ \n if ($id > 0) // Cuando ya hay un registro asociado\n {\n $u=new CargosA($this->dbAdapter); // ---------------------------------------------------------- 4 FUNCION DENTRO DEL MODELO (C) \n //$datos = $u->getRegistroId($id);\n } \n } \n $valores=array\n (\n \"titulo\" => $this->tfor,\n \"form\" => $form,\n \"datos\" => $datos, \n 'url' => $this->getRequest()->getBaseUrl(),\n 'id' => $id,\n 'idCar' => $idCar,\n \"ttablas\" => 'Aspecto, Item, Opciones',\n \"lin\" => $this->lin\n ); \n return new ViewModel($valores); \n }",
"function cl_tarefa_lanc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tarefa_lanc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_alunoaltcampos() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"alunoaltcampos\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_empreendimento() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empreendimento\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_iptuconstr() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"iptuconstr\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function actionPorodicni_vikend()\n\t{\n\t $this->getLang();\n\t\t$this->base('porodicni_vikend');\n $this->naslovStranice = 'Porodicni Vikend';\n\t\t$this->render('clanak');\n \n\t}",
"function __construct(){\n // debug($_SESSION) ;\n //URL taper par l'utilisateur\n $this->request = new \\Projet\\App\\Request() ;\n //parser l'URL\n //Router::parse($this->request->url,$this->request);\n //charger le controller appellé par l'utilisateur\n $controller = $this->loadController() ;\n\n //action appellé par utilisateur\n $action = $this->request->action;\n /*faire appelle aux fonctions des controleurs qui correspend aux nom des actions tapez par l'utilisateur\n comme $controller->view($this->request->params) ;*/\n }",
"function tienda(){\r\n $this->conexion = new Conexion();\r\n $this->conexion->Conexion();\r\n }",
"private function ajoutauteur() {\n\t\t$this->_ctrlAuteur = new ControleurAuteur();\n\t\t$this->_ctrlAuteur->auteurAjoute();\n\t}",
"function ToonFormulierAfspraak()\n{\n\n}",
"public function obtener()\n {\n }",
"function cl_far_listacontroladomed() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"far_listacontroladomed\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function uputstvo()\n {\n $this->prikaz(\"uputstvo\", []);\n }",
"public function index(){\n\t\t$this->accueil();\n\t}",
"public function cercaDaNome(){\n if(($_SERVER['REQUEST_METHOD']==\"POST\")){\n $view = new VRisultati();\n $nome = $view->recuperaNome(); //nome inserito nella barra di ricerca\n $pm = FPersistentManager::getInstance();\n $ricette = $pm->search(\"ricetta\", $nome, \"nome\");\n if($ricette!=null){\n $msg = \"\";\n } else {\n $msg = \"Non ci sono ricette che soddisfano questi parametri\";\n }\n $view->mostraRisultati($ricette, $msg);\n\n }\n else{\n header('HTTP/1.1 405 Method Not Allowed');\n header('Allow: POST');\n }\n\n\n }",
"function hitung()\n\t{\n\t\t$this->model->hitungMhs();\n\t\t//$this->dashboardukmapendaftar(); //controller dikembalikan ke method index setelah selesai mengakses method ini.\n\t}",
"public function istorijaRezultata() {\n $rModel = new RezultatModel();\n $igrac = $this->session->get('igrac');\n $rezultati = $rModel->nadji_rezultateigraca($igrac['idKI']);\n $this->prikaz(\"mod_istorijarezultata\", ['rezultati' => $rezultati]);\n }",
"public function dodajformAction()\n {\n $this->params->tryb='Dodawanie';\n $this->template='admin/rabat/form.html.twig';\n $this->params->rabaty=$this->model->lista();\n $this->params->samochody=$this->loadModel('Samochod')->lista();\n }",
"private function mprofil() {\n\t\t\t$this->_ctrlAdmin = new ControleurAdmin();\n\t\t\t$this->_ctrlAdmin->userProfil();\n\t}",
"function cl_rechumano() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rechumano\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function agregarUsuario(){\n \n }",
"public function accionIndex(){\n \n if(!Sistema::app()->acceso()->hayUsuario()){\n Sistema::app()->paginaError(400,\"Solos los usuarios registrados pueden acceder\");\n exit;\n }\n\n //llega el pase de la pelicula\n $codPase = intval($_GET[\"id\"]);\n \n //obtener las entradas compradas para ese pase, esa pelicula y esa hora\n $entUsuarios = new Entradas_usuarios();\n $pasePelicula = new Pases_peliculas();\n $sala = new Salas();\n $asientos = new Asientos();\n $entAnonimos = new Entradas_anonimos();\n \n \n $pasePelicula->buscarPorId($codPase);//CONTROLAR QUE EXISTE.\n //CONTROLAR TAMBIEN SI HA CADUCADO.\n \n //obtengo la sala donde se proyecta ese pase\n $sala->buscarPorId($pasePelicula->cod_sala);\n \n \n $opFil[\"select\"] = \"cod_asiento, fila, columna\";\n $opFil[\"where\"] = \"t.cod_sala =\".$pasePelicula->cod_sala;\n $opFil[\"order by\"] = \"fila, columna\";\n \n $totalAsientos = $asientos->buscarTodos($opFil);\n \n //tengo todos las entradas para ese pase.\n $opFiltrado[\"where\"] = \"t.cod_pase_pelicula = \".$codPase;\n $entradasUsu = $entUsuarios->buscarTodos($opFiltrado);\n $entradasAnon = $entAnonimos->buscarTodos($opFiltrado);\n \n $filas = $sala->n_filas;\n $columnas = $sala->n_columnas;\n $capacidad = $sala->capacidad;\n \n \n $asientosOcupados = [];\n \n //Si no hay entradas compreadas para este pase, no se ejecuta ---\n \n if(!empty($entradasUsu)||!empty($entradasAnon)){\n $asientosOcupados = $this->asientosOcupados($entradasUsu, $entradasAnon);\n }\n \n //if(!empty($entradasAnonimos)){\n // $asientosOcupados2 = $this->asientosOcupados($entradasAnonimos);\n // var_dump($asientosOcupados2);\n //}\n \n if(isset($_POST[\"butacas\"])){\n \n //llega el imput que almacena en un string creado en js\n //con un string con todos los asientos seleccionados\n $asientosSel = explode(\",\", $_POST[\"butacas\"]);\n \n Sistema::app()->sesion()->set(\"butacas\",$asientosSel);\n Sistema::app()->sesion()->set(\"codPase\",$codPase);\n \n Sistema::app()->irAPagina(array(\"entradasUsuarios\",\"mostrarResumen\"));\n exit;\n }\n \n \n $this->dibujaVista(\"mostrarCine\",array(\"asientosOcupados\"=>$asientosOcupados,\n \"filas\"=>$filas,\n \"cols\"=>$columnas,\n \"codPase\"=>$codPase,\n \"codAsientos\"=>$totalAsientos\n ),\n \"CINES MELERO\");\n \n \n \n }",
"function cl_sau_triagemavulsa() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_triagemavulsa\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function Controller_Utilisateur(){\n\t\tparent::__construct();\n\t\trequire_once './Modele/Modele_Utilisateur.php';\n\t\t$this->selfModel = new Utilisateur(); // appel du modèle correspondant à la classe Controller_Utilisateur\n\t}",
"public function generujKod(){\n\t\t//\n\t}",
"public function cercaAvanzata(){\n if(($_SERVER['REQUEST_METHOD']==\"POST\")){\n $view = new VRisultati();\n $filtri = $view->recuperaFiltri(); //filtri inseriti dall'utente\n $pm = FPersistentManager::getInstance();\n $ricette = $pm->ricercaTramiteFiltri($filtri);\n if($ricette!=null){\n $msg = \"\";\n } else {\n $msg = \"Non ci sono ricette che soddisfano questi parametri\";\n }\n $view->mostraRisultati($ricette, $msg);\n\n }\n else{\n header('HTTP/1.1 405 Method Not Allowed');\n header('Allow: POST');\n }\n\n }",
"function consultar_usuario(){\n $this->layout='_layout.perfilUsuario';\n \n if(!empty($_POST)):\n \n $api = new ApiUsuario();\n $this->dados = array(\n 'listBusca' => $api->consultas(new Usuario('POST'))\n );\n \n $this->view(); \n else :\n \n $this->view(); \n endif;\n \n }",
"public function promovisati()\n {\n \n $promovisaniIme=$this->request->getVar('korisnik');\n $korisnikModel=new KorisnikModel();\n $promovisani=$korisnikModel->dohvati_korisnika($promovisaniIme);\n $stara_uloga=$korisnikModel->pronadjiUlogu($promovisani);\n if($stara_uloga=='OBICAN' || $stara_uloga==\"ADMIN\") { \n return redirect()->to( $_SERVER['HTTP_REFERER']);\n }\n $uloga=$this->request->getVar('uloga');\n if($uloga=='admin') $nova_uloga='ADMIN';\n else if($uloga=='mod') $nova_uloga='MODERATOR';\n $korisnikModel->promovisi($promovisani, $stara_uloga, $nova_uloga);\n return redirect()->to( $_SERVER['HTTP_REFERER']);\n \n }",
"public function index($id){\n\t\t$po_prostu_pokaz = true;\n\t\t$user = $this->session->zalogowany;\n\t\tif($dane = $this->baza->czy_zlecenie_istnieje($id)){\n\t\t\t$dane[0]->nick = $this->baza->daj_nick($dane[0]->zlecajacy_id);\n\t\t\t$prace = $this->baza->prace();\n\t\t\t$aktualna_data = date('Y-m-d');\n\t\t\t$aktualna_godzina = date('H:i');\n\t\t\tif($this->baza->czy_zlecenie_aktualne($id,$aktualna_data,$aktualna_godzina)){\n\t\t\t\t//zlecenie aktualne\n\t\t\t\tif($user != null){\n\t\t\t\t\tif($dane[0]->zlecajacy_id != $user){\n\t\t\t\t\t\t//nie jesteś zlecającym\n\t\t\t\t\t\t$zwyciezca = $this->baza->dane_zwyciezcy($id);\n\t\t\t\t\t\tif(count($zwyciezca)==0){\n\t\t\t\t\t\t\t//jeszcze nie wybrano zwycięzcy\n\t\t\t\t\t\t\tif(!$this->baza->czy_juz_zgloszono($id,$user)){\n\t\t\t\t\t\t\t\t//nie zgłosiłeś się jeszcze\n\t\t\t\t\t\t\t\t$po_prostu_pokaz = false;\n\t\t\t\t\t\t\t\t$zgloszenie = $this->input->post('zlecenie_zgloszenie');\n\t\t\t\t\t\t\t\tif($zgloszenie != null){\n\t\t\t\t\t\t\t\t\t//wyświetl komunikat informujący o poprawnym zgłoszeniu się\n\t\t\t\t\t\t\t\t\t$this->baza->dodaj_zgloszenie($id,$user);\n\t\t\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'zglos_sie'=>1));\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t//wyswietl widok z możliwością zgłoszenia się do niego\n\t\t\t\t\t\t\t\t\t//aktualne - true,jestes_zlecajacym=false,zgloszono_sie=false\n\t\t\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'zglos_sie'=>0));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t//wybrano zwycięzcę\n\t\t\t\t\t\t\tif($this->baza->czy_juz_zgloszono($id,$user)){\n\t\t\t\t\t\t\t\t//zgłoszono się\n\t\t\t\t\t\t\t\tif($this->baza->czy_wygrales_zlecenie($id,$user)){\n\t\t\t\t\t\t\t\t\t//jesteś zwycięzcą\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$status = $zwyciezca[0]->status;\n\t\t\t\t\t\t\t\t\tif($status == 0){\n\t\t\t\t\t\t\t\t\t\t//zostałeś wybrany przez zlecającego\n\t\t\t\t\t\t\t\t\t\t$po_prostu_pokaz = false;\n\t\t\t\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t\t\t\t$podjecie = $this->input->post('zlecenie_podjecie');\n\t\t\t\t\t\t\t\t\t\tif($podjecie != null){\n\t\t\t\t\t\t\t\t\t\t\t//komunikat o pomyślnym podjęciu się pracy\n\t\t\t\t\t\t\t\t\t\t\t$this->baza->potwierdz_podjecie($id);\n\t\t\t\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'podjecie'=>1));\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t//strona z możliwością potwierdzenia podjecia się pracy\n\t\t\t\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'podjecie'=>0));\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//zalogowany jest zlecajacym\n\t\t\t\t\t\t$jestes_zlecajacym = true;\n\t\t\t\t\t\t$dane_zwyciezcy = $this->baza->dane_zwyciezcy($id);\n\t\t\t\t\t\tif(count($dane_zwyciezcy)==0){\n\t\t\t\t\t\t\t//nie wybrano zwycięzcy\n\t\t\t\t\t\t\t$po_prostu_pokaz = false;\n\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t$wybrany = $this->input->post('zlecenie_zwyciezca');\n\t\t\t\t\t\t\tif($wybrany != null){\n\t\t\t\t\t\t\t\t$this->baza->wybierz_zwyciezce($id,$wybrany);\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'zgloszenia'=>1));\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t//wyświetl listę zgłoszeń\n\t\t\t\t\t\t\t\t//daj możliwość wybrania jednego\n\t\t\t\t\t\t\t\t$zgloszenia = $this->baza->lista_zgloszen($id);\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'zgloszenia'=>$zgloszenia));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t//zlecenie po czasie wykonania\n\t\t\t\t$user = $this->session->zalogowany;\n\t\t\t\tif($dane[0]->zlecajacy_id == $user){\n\t\t\t\t\t//jesteś zleceniodawcą\n\t\t\t\t\t$dane_zwyciezcy = $this->baza->dane_zwyciezcy($id);\n\t\t\t\t\tif(count($dane_zwyciezcy)>0){\n\t\t\t\t\t\t//ktoś wygrał\n\t\t\t\t\t\t$status = $dane_zwyciezcy[0]->status;\n\t\t\t\t\t\tif($status == 1){\n\t\t\t\t\t\t\t$po_prostu_pokaz = false;\n\t\t\t\t\t\t\t//daj możliwość potwierdzenia wykonania\n\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t$potwierdzono = $this->input->post('zlecenie_potwierdzenie');\n\t\t\t\t\t\t\tif($potwierdzono != null){\n\t\t\t\t\t\t\t\t$this->baza->potwierdz_wykonanie($id);\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'ocena'=>0));\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'potwierdzenie'=>0));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if($status == 2){\n\t\t\t\t\t\t\t$po_prostu_pokaz = false;\n\t\t\t\t\t\t\t//daj możliwość ocenienia\n\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t$ocena = $this->input->post('zlecenie_ocena');\n\t\t\t\t\t\t\t$komentarz = $this->input->post('zlecenie_komentarz');\n\t\t\t\t\t\t\tif($ocena != null && $komentarz != null){\n\t\t\t\t\t\t\t\t$this->baza->ocen($id,$dane_zwyciezcy[0]->zglaszajacy_id,$ocena,$komentarz);\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'ocena'=>1));\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'ocena'=>0));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($po_prostu_pokaz){\n\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace));\n\t\t\t}\n\t\t}else{\n\t\t\t$this->load->view('blad',array('komunikat'=>'Nie ma takiego zlecenia!'));\n\t\t}\n\t}",
"function cl_conplanosis() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"conplanosis\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_moblevantamento() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"moblevantamento\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"private function mauteur() {\n\t\t$id = intval(Utils::getGet('id'));\n\t\tif($id > 0) {\n\t\t\t$this->_ctrlAuteur = new ControleurAuteur();\n\t\t\t$this->_ctrlAuteur->auteurModifie($id);\n\t\t} else {\n\t\t\tthrow new Exception('Id incorrect !!!');\n\t\t\t}\n\t}"
] | [
"0.65372866",
"0.64477366",
"0.6423411",
"0.6368704",
"0.62858874",
"0.6274564",
"0.62723154",
"0.6250783",
"0.61720794",
"0.61577755",
"0.61488384",
"0.6109094",
"0.6093255",
"0.60749316",
"0.607078",
"0.60268474",
"0.60112166",
"0.6008805",
"0.6003453",
"0.6000231",
"0.59980994",
"0.5997825",
"0.59761906",
"0.5971148",
"0.59702885",
"0.595653",
"0.59565043",
"0.59531397",
"0.5949353",
"0.59339046",
"0.59299845",
"0.59237474",
"0.5921237",
"0.5918525",
"0.59054136",
"0.5904641",
"0.58999044",
"0.5899009",
"0.5895913",
"0.589035",
"0.5867117",
"0.58669657",
"0.5864257",
"0.586304",
"0.58603925",
"0.585877",
"0.58568287",
"0.5843741",
"0.5843341",
"0.58419496",
"0.5837497",
"0.5837057",
"0.5834574",
"0.5834301",
"0.58323073",
"0.58320606",
"0.58310163",
"0.582548",
"0.58252263",
"0.58168334",
"0.5816039",
"0.58121556",
"0.5809188",
"0.5807438",
"0.5807345",
"0.5806863",
"0.5802982",
"0.5798999",
"0.5797288",
"0.57903844",
"0.57884866",
"0.57854384",
"0.57844406",
"0.57789356",
"0.57775664",
"0.57722276",
"0.5769097",
"0.576802",
"0.5763258",
"0.5760578",
"0.57550305",
"0.5754994",
"0.575116",
"0.5747223",
"0.57349294",
"0.572764",
"0.57223386",
"0.5719698",
"0.5719412",
"0.5717456",
"0.57141584",
"0.5713028",
"0.57110584",
"0.5709825",
"0.5707542",
"0.5705781",
"0.57047486",
"0.570251",
"0.5701118",
"0.56976914",
"0.5697634"
] | 0.0 | -1 |
/ === quick & dirty PHP prettyprinter for arrays ========================================================== | public function pp($arr){
$retStr = "<dl>\n";
if (is_array($arr)){
foreach ($arr as $key=>$val){
if (is_array($val)){
$retStr .= "<dt>" . $key . " => </dt>\n<dd>" . $this->pp($val) . "</dd>\n";
}
else{
$retStr .= "<dt>" . $key . " => </dt>\n<dd>" . $val . "</dd>\n";
}
}
}
$retStr .= "</dl>\n";
return $retStr;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function _pre($array) { echo '<pre>'; print_r ($array); echo '</pre>'; }",
"function dump_array($the_array)\n{\n echo \"<ul>\";\n\n foreach ($the_array as $key1 => $value1) {\n echo \"<li><span class='key'>$key1</span>\";\n\n # If the value is itself an array, then print that as well.\n if (is_array($value1)) {\n echo \"<ul>\";\n foreach ($value1 as $key2 => $value2) {\n $pvalue = $value2;\n if (is_array($value2)) {\n $pvalue = \"<an array>\";\n }\n echo \"<li><span class='key'>$key2</span><span class='value'> $pvalue</span></li>\\n\";\n } # end inner foreach ($value1 as $key2 => $value2)\n echo \"</ul></li>\\n\";\n } else {\n echo \"<span class='value'> $value1</span></li>\\n\";\n }\n } # end outer foreach ($the_array as $key1 => $value1)\n echo \"</ul>\\n\";\n}",
"function dump_array($array)\n{\n\n\t$_str = \"<table bgcolor = '%s'>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t%s\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table><br>\";\n\n\tif(is_array($array)){\n\n\t\t$size = count($array);\n\t\t$string = \"\";\n\n\t\tif($size) {\n\n\t\t\t$string .= \"{ <br>\";\n\n\t\t\tforeach($array as $a => $b) {\n\n\t\t\t\tif(is_array($b)) { $b = dump_array($b); }\n\t\t\t\tif(is_object($b)) { $b = dump_array(object_to_array($b)); }\n\t\t\t\t$string .= \" <b>$a = '$b'</b><br>\";\n\n \t\t}\n\n\t\t\t$string .= \" }<br>\";\n\t\t}\n\n\t\t$r = sprintf($_str, '#DACE0B', $string);\n\n\t\treturn $r;\n\n } else { return $array; }\n}",
"function dump($array) {\n\treturn \"<pre>\" . htmlentities(print_r($array, 1)) . \"</pre>\";\n}",
"function pre_print_r($array){\n\n\techo '<pre style=\"font-family: monospace; font-size: 14px; text-align:left!important\">';\n\tprint_r($array);\n\techo '</pre>';\n\n}",
"function htmldump ( $array ) {\r\n\t\tforeach($array as $key => $val) {\r\n\t\t\t$return .= $this->ul(\r\n\t\t\t\t\t\t$this->li($this->font($key)) .\r\n\t\t\t\t\t\t\t$this->ul(\r\n\t\t\t\t\t\t\t\t$this->font(is_array($val) ? $this->htmldump($val) : $this->li($val))\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t);\r\n\t\t}\r\n\t\t\r\n\t\treturn $return;\r\n\t}",
"function pprint($a) {\n\t\techo '<pre>'.print_r($a,1).'</pre>';\n\t}",
"protected function prettyDump(array $arr)\r\n {\r\n echo '<pre>', var_dump($arr), '</pre>';\r\n }",
"function pre_r($array){\n echo '<pre>';\n print_r($array);\n echo '</pre>';\n}",
"protected function prettyPrint(array $arr)\r\n {\r\n echo '<pre>', print_r($arr, 1), '</pre>';\r\n }",
"function print_pre($array){\n\t\techo '<pre>';\n\t\tprint_r($array);\n\t\techo '</pre>';\n\t}",
"function dumpArray($elements) {\n $result = \"<ol>\\n\";\n foreach ($elements as $key => $value) {\n if (is_array($value)) {\n $result .= \"<li>Key <b>$key</b> is an array\n containing:\\n\" . dumpArray($value) . \"</li>\";\n } else {\n $value = nl2br(htmlspecialchars($value));\n $result .= \"<li>Key <b>$key</b> has value [<b>$value</b>]</li>\\n\";\n }\n }\n return $result . \"</ol>\\n\";\n}",
"function print_r_slim($arr, $no_print=false)\r\n{\r\n $out = print_r($arr, true);\r\n\r\n $out = str_replace(\" \", \"\", $out);\r\n $out = str_replace(\"\\n\", \", \", $out);\r\n $out = str_replace(\", )\", \"), \", $out);\r\n $out = str_replace(\", , \", \"\", $out);\r\n $out = str_replace(\", (, \", \"(\", $out);\r\n $out = str_replace(\"Array, \", \"Array\", $out);\r\n $out = str_replace(\"Object\", \" Object\", $out);\r\n\r\n if (!$no_print)\r\n {\r\n echo $out;\r\n return;\r\n }\r\n\r\n return $out;\r\n}",
"function printarr($a, $descr = '') \r\n{\r\n\tif (!is_array($a)) \r\n\t{\r\n\t\tob_start();\r\n\t\tif (!empty($descr))\r\n\t\t{\r\n\t\t\tprintbr('<b>' . $descr . '</b>');\r\n\t\t}\r\n\t\tvar_dump($a);\r\n\t\t$str = ob_get_clean();\r\n\t\tprintNicely($str);\r\n\t} else {\r\n\t\tob_start();\r\n\t\tprint '<pre>';\r\n\t\tif (!empty($descr))\r\n\t\t{\r\n\t\t\tprint('<b>' . $descr . '</b>' . \"\\n\");\r\n\t\t}\r\n\t\tprint_r($a);\r\n\t\tprint '</pre>';\r\n\t\t$str = ob_get_clean();\r\n\t\tprintNicely($str);\r\n\t}\r\n}",
"function print_r_html ($arr) {\n\techo \"<pre>\";\n print_r($arr);\n echo \"</pre>\";\n}",
"function pre_r ( $array ) {\n\t\t\t\t\techo '<pre>';\n\t\t\t\t\tprint_r($array);\n\t\t\t\t\techo'</pre>';\n\n\t\t\t\t\t//hhahahahahahahhahahahah borges\n\t\t\t\t}",
"function _d($x, $die = false, $display = true, $tab = 6, $deep = 50, $level = 0) {\n if ($level == 0) $con = \"<pre>\\n{\\n\"; //1st start\n $level++;\n if ($level == $deep) return serialize($x);\n if (is_array($x) || is_object($x)) {\n foreach ($x as $k => $v) {\n if (is_array($v)) {\n $con.= str_pad($level, 5, '.') . str_pad('', $level * $tab, '.', STR_PAD_LEFT) . \"$k=>[\\n\";\n $con.= _d($v, '', $display, $tab, $deep, $level);\n $con.= str_pad($level, 5, '.') . str_pad('', $level * $tab, '.', STR_PAD_LEFT) . \"]\\n\";\n } else {\n $con.= str_pad($level, 5, '.') . str_pad('', $level * $tab, '.', STR_PAD_LEFT) . \"$k=>\";\n $con.= $v . \"\\n\";\n }\n }\n } else {\n $con.= str_pad($level, 5, '.') . str_pad('', $level * $tab, '.', STR_PAD_LEFT) . \"$x\\n\";\n }\n if ($level == 1) {\n $con.= \"} TIME=\" . round((microtime(true) - $_SERVER['REQUEST_TIME_FLOAT']) * 1, 4) . \"s\\n \\n</pre>\\n\"; //end\n if ($display) {\n echo $con; //display\n if ($die) {\n foreach (debug_backtrace() as $k => $v) {\n $r = xpAS::clean(array('#' . ($k + 1) . ': ', $v['class'], $v['type'], $v['function'] . '()', ' ' . $v['file'] . ' [' . $v['line'] . ']'));\n $rs.= implode(\"\", $r) . \"\\n\";\n }\n }\n echo \"<pre>\";\n print_r($rs);\n echo \"</pre>\";\n if ($die) die();\n ob_implicit_flush();\n }\n }\n return $con;\n}",
"function printr($array, $print = true) { //imprime o devuelve la cadena\n if ($print)\n return print_r($array, true);\n else\n echo '<pre>' . print_r($array, true) . '</pre>'; //tabula bien gracias a los <pre>\n }",
"static function printr($array)\n {\n echo '<pre>' . print_r($array, true) . '</pre>';\n }",
"function printArray($array){\n print '<pre>';\n print_r($array);\n print '</pre>';\n}",
"function array_contents(&$array, $max_depth=0, $depth=0, $ignore_ints=false)\n{\n\t$string = $indent = \"\";\n\tfor ($i = 0; $i < $depth; $i++) {\n\t\t$indent .= \"\\t\";\n\t}\n\tif (!empty($max_depth) && $depth >= $max_depth) {\n\t\treturn $indent.\"[Max Depth Reached]\\n\";\n\t}\n\tif (empty($array)) {\n\t\treturn $indent.\"[Empty]\\n\";\n\t}\n\treset($array);\n\twhile ( list($key,$value) = each($array) ) {\n\t\t$print_key = str_replace(\"\\n\",\"\\\\n\",str_replace(\"\\r\",\"\\\\r\",str_replace(\"\\t\",\"\\\\t\",addslashes($key))));\n\t\tif ($ignore_ints && gettype($key) == \"integer\") {\n\t\t\tcontinue;\n\t\t}\n\t\t$type = gettype($value);\n\t\tif ($type == \"array\" || $type == \"object\") {\n\t\t\t$string .= $indent\n\t\t\t\t\t. ((is_string($key)) ? \"\\\"$print_key\\\"\": $key) . \" => \"\n\t\t\t\t\t. (($type == \"array\")?\"array (\\n\":\"\")\n\t\t\t\t\t. (($type == \"object\")?\"new \".get_class($value).\" Object (\\n\":\"\");\n\t\t\t$string .= array_contents($value, $max_depth, $depth + 1, $ignore_ints);\n\t\t\t$string .= $indent . \"),\\n\";\n\t\t} else {\n\t\t\tif (is_string($value)) {\n\t\t\t\t$value = str_replace(\"\\n\",\"\\\\n\",str_replace(\"\\r\",\"\\\\r\",str_replace(\"\\t\",\"\\\\t\",addslashes($value))));\n\t\t\t}\n\t\t\t$string .= $indent\n\t\t\t\t\t. ((is_string($key)) ? \"\\\"$print_key\\\"\": $key) . \" => \"\n\t\t\t\t\t. ((is_string($value)) ? \"\\\"$value\\\"\": $value) . \",\\n\";\n\t\t}\n\t}\n\t$string[ strlen($string) - 2 ] = \" \";\n\treturn $string;\n}",
"function pr ($arr) \n{\n echo '<pre>'; print_r($arr); echo '</pre>';\n}",
"function pr($array)\n{\n echo \"<pre>\";\n print_r($array);\n echo \"</pre>\";\n}",
"function angela_print_array($arr, $spaces = 0)\n{\n\t$sp=$spaces+1;\n\t\n\tif (is_array($arr))\n\t\tforeach ( $arr as $arrkey => $arrval )\n\t\t{\n\t\t\tfor ($i=0; $i<$spaces; $i++) echo \" \"; \n\t\t\techo \"[$arrkey] => <br>\\n\";\n\t\t\tangela_print_array($arrval, $sp);\n\t\t}\n\telse\n\t{\n\t\tfor ($i=0; $i<$spaces; $i++) echo \" \"; \n\t\tif (!isset($arr))\n\t\t\techo \"-- empty --<br>\";\n\t\telse\n\t\t\techo \"$arr <br>\";\n\t}\n}",
"public static function pretty_debug_array($glue,$array,$indent='',$keystring='')\n {\n $result = '';\n foreach($array as $key=>$item)\n {\n $newkeystring = $keystring.'[\\''.$key.'\\']';\n if(strlen($key) > 80)\n {\n $padded = $newkeystring;\n } else {\n $padded = str_pad($newkeystring, 80);\n }\n $result .= $glue . '@' . $padded.\"=\\t\" . $indent;\n if(is_array($item))\n {\n $result .= 'ARRAY(count='.count($item).')' . $glue . Context::pretty_debug_array($glue, $item, $indent.' ',$newkeystring);\n } else {\n $result .= print_r($item, TRUE);\n }\n }\n return $result;\n }",
"function dump($name, $array) {\n\t\tif(!is_array($array)) {\n\t\t\tprint \"\\$\".$name.\" = \".$array.\"<br>\\n\";\n\t\t\treturn;\n\t\t}\n\t\tforeach($array as $key=>$val) {\n\t\t\tif(is_array($val)) {\n\t\t\t\tdump($name.\"[\".$key.\"]\", $val);\n\t\t\t} else {\n\t\t\t\tprint $name.\"[\".$key.\"] = \";\n if(is_object($val) && !method_exists($val, \"__toString\")) {\n print get_class($val).\"<br>\\n\";\n } else {\n print $val.\"<br>\\n\";\n }\n\t\t\t}\n\t\t}\n\t}",
"function array_pp($arr){\n\t$retStr = '<ul>';\n\tif (is_array($arr)){\n\t\tforeach ($arr as $key=>$val){\n\n\t\t\t$key = str_replace('_', ' ', $key);\n\t\t\t$key = ucwords($key);\n\n\t\t\tif (is_array($val)){\n\t\t\t\t$retStr .= '<li>' . $key . ': ' . array_pp($val) . '</li>';\n\t\t\t}else{\n\t\t\t\t$retStr .= '<li>' . $key . ': ' . $val . '</li>';\n\t\t\t}\n\t\t}\n\t}\n\t$retStr .= '</ul>';\n\treturn $retStr;\n}",
"function print_array($array)\r\n{\r\n\techo '<pre>';\r\n\tprint_r($array);\r\n\techo '</pre>';\r\n}",
"function pa($arr) {\n\t\techo '<pre>';\n\t\tprint_r($arr);\n\t\techo '</pre>';\n\t}",
"function debug($arr) {\n echo \"<pre>\" . print_r($arr, true) . \"</pre>\";\n}",
"function preShow( $arr, $returnAsString=false ) {\n $ret = '<pre>' . print_r($arr, true) . '</pre>';\n if ($returnAsString)\n return $ret;\n else\n echo $ret;\n}",
"function debug($arr)\n{\n echo '<pre>' . print_r($arr, true) . '</pre>';\n}",
"function debug($arr)\n{\n echo '<pre>' . print_r($arr, true) . '</pre>';\n}",
"function print_array($data){\n echo '<pre>';\n print_r($data);\n echo '</pre>';\n }",
"function diplayArray($array){\n echo '<pre>';\n var_dump($array);\n echo'</pre>';\n}",
"function pp( $a ){\n echo \"<pre>\";\n print_r( $a );\n echo \"</pre>\";\n }",
"function printArray($data)\r\n{\r\n\techo \"<pre>\";\r\n\tprint_r($data);\r\n\techo \"</pre>\";\r\n}",
"public function outputFunction($array, $depth=0, $tab=\" \") {\n foreach ($array as $key=>$value) {\n // line break\n for ($i=0; $i<$depth; $i++) echo $tab;\n if (is_numeric($key)) {\n echo $key.' => ';\n }\n else {\n echo '\\''.$key.'\\' => ';\n }\n if (is_array($value)) {\n echo 'array('.\"\\n\";\n $this->outputFunction($value, $depth+1);\n // line break\n for ($i=0; $i<$depth; $i++) echo $tab;\n echo '),'.\"\\n\";\n }\n else {\n // value\n if (is_numeric($value)) {\n echo $value.','.\"\\n\";\n }\n else {\n echo '\\''.$value.'\\','.\"\\n\";\n }\n }\n }\n }",
"function print_array($array) {\n\n echo \"<pre>\";\n\n print_r($array);\n\n echo \"</pre>\";\n\n }",
"function printArray($array, $indent = ' > ', $withKey = true)\n{\n if($withKey)\n {\n foreach($array as $key => $value)\n {\n if(is_array($value))\n {\n echo \"$indent$key \\t=> {\" . PHP_EOL;\n printArray($value, \"$indent\\t\");\n echo \"$indent}\" . PHP_EOL;\n }\n else\n {\n echo \"$indent$key \\t=> $value\" . PHP_EOL;\n }\n }\n }\n}",
"function printr($array, $return = false) {\n $str = '<pre>' . print_r($array, true) . '</pre>';\n if (!$return) {\n echo $str;\n } else {\n return $str;\n }\n}",
"private function prettyPrintArray($arr, $indent = 0, $indentModifier = 4)\n {\n if (!is_array($arr)) {\n return $arr;\n }\n\n $string = \"\";\n\n foreach ($arr as $key => $value) {\n $string = $string . str_repeat(\" \", $indent) . \"[\" . $key . \"]\" . \": \";\n\n if (is_array($value)) {\n $string .= PHP_EOL . $this->prettyPrintArray($value, $indent + $indentModifier) . PHP_EOL;\n } elseif (is_string($value) || settype($item, 'string') !== false || (is_object($value) && method_exists($value, '__toString'))) {\n $string .= $value . PHP_EOL;\n } else {\n throw new \\InvalidArgumentException('Current value cannot be converted to string: value=' . $value);\n }\n }\n return $string;\n }",
"public function prettyPrint($data)\n {\n echo \"<pre>\";\n print_r($data);\n echo \"</pre>\"; \n }",
"function printArray($array){\n echo \"<pre>\";\n print_r($array);\n echo \"</pre>\";\n }",
"function pr($a) {\n\techo '<pre>', gettype($a), ' - ', print_r($a, true), '</pre>';\n}",
"function pr($data) {\n echo \"<pre>\" . print_r($data, true) . \"</pre>\";\n}",
"function dump($data){\n\n $data=print_r($data,true);\n $html=\"<pre>$data</pre>\";\n return $html;\n}",
"function _yamlizeArray($array,$indent) {\n\tif (is_array($array)) {\n\t\t$string = '';\n\t\tforeach ($array as $key => $value) {\n\t\t$string .= $this->_yamlize($key,$value,$indent);\n\t\t}\n\t\treturn $string;\n\t} else {\n\t\treturn false;\n\t}\n\t}",
"function print_r_xml($arr,$first=true)\r\n{\r\n $output = \"\";\r\n if ($first) $output .= \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<data>\\n\";\r\n foreach($arr as $key => $val)\r\n {\r\n if (is_numeric($key)) $key = \"arr_\".$key; // <0 is not allowed\r\n switch (gettype($val))\r\n {\r\n case \"array\":\r\n $output .= \"<\".htmlspecialchars($key).\" type='array' size='\".count($val).\"'>\".\r\n print_r_xml($val,false).\"</\".htmlspecialchars($key).\">\\n\";\r\n break;\r\n case \"boolean\":\r\n $output .= \"<\".htmlspecialchars($key).\" type='bool'>\".($val?\"true\":\"false\").\r\n \"</\".htmlspecialchars($key).\">\\n\";\r\n break;\r\n case \"integer\":\r\n $output .= \"<\".htmlspecialchars($key).\" type='integer'>\".\r\n htmlspecialchars($val).\"</\".htmlspecialchars($key).\">\\n\";\r\n break;\r\n case \"double\":\r\n $output .= \"<\".htmlspecialchars($key).\" type='double'>\".\r\n htmlspecialchars($val).\"</\".htmlspecialchars($key).\">\\n\";\r\n break;\r\n case \"string\":\r\n $output .= \"<\".htmlspecialchars($key).\" type='string' size='\".strlen($val).\"'>\".\r\n htmlspecialchars($val).\"</\".htmlspecialchars($key).\">\\n\";\r\n break;\r\n default:\r\n $output .= \"<\".htmlspecialchars($key).\" type='unknown'>\".gettype($val).\r\n \"</\".htmlspecialchars($key).\">\\n\";\r\n break;\r\n }\r\n }\r\n if ($first) $output .= \"</data>\\n\";\r\n return $output;\r\n}",
"function getDump ($value)\n{\n\n if (is_bool($value))\n return \"bool(\". ($value?\"TRUE\":\"FALSE\") .\")\";\n\n else if (is_null($value))\n return \"null()\";\n\n else if (is_int($value))\n return \"int(\". $value .\")\";\n\n else if (is_float($value))\n return \"float(\". $value .\")\";\n\n else if (is_string($value)) {\n return \"string('\"\n .str_replace(\n Array(\"\\n\", \"\\r\", \"\\t\"),\n Array('\\n', '\\r', '\\t'),\n \\r8\\str\\truncate( addslashes($value), 50, \"'...'\")\n )\n .\"')\";\n }\n\n else if (is_array($value)) {\n\n if ( count($value) == 0 )\n return \"array(0)\";\n\n $output = array();\n\n $i = 0;\n foreach( $value AS $key => $val ) {\n\n $i++;\n\n $output[] =\n getDump($key)\n .\" => \"\n . ( is_array($val) ? \"array(\". count($val) .\")\" : getDump($val) );\n\n if ( $i == 2 )\n break;\n }\n\n return \"array(\". count($value) .\")(\"\n .implode(\", \", $output)\n .( count($value) > 2 ? \",...\" : \"\" )\n .\")\";\n\n\n }\n\n else if (is_object($value))\n return \"object(\". get_class($value) .\")\";\n\n else if (is_resource($value))\n return \"resource(\". get_resource_type($value) .\")\";\n\n // @codeCoverageIgnoreStart\n else\n return \"unknown(\". gettype($value) .\")\";\n // @codeCoverageIgnoreEnd\n\n}",
"private function printArray($array){\n\t\techo \"<pre>\".print_r($array,true).\"</pre>\";\n\t}",
"function format_print_r($output) {\n echo '<pre>';\n print_r($output);\n echo '</pre>';\n}",
"function pprint($array, $file_name='array'){\n /**\n * Pretty print Arrays - in collapsible and scrollable boxes\n *\n * @param Array to be printed\n * @param String as name of the printed box\n *\n * @return HTML non semantic...\n */\n $id = random_int(0, 999);\n echo '<style type=\"text/css\">input#'.$id.':checked ~ div.ijwe {display: none;}</style>';\n echo '<br><div style=\"background-color:#b1b1b1; border: 1px solid #949494; width:96%; margin: auto;\">';\n echo '<input type=\"checkbox\" id=\"toggle-'.$id.'\" style=\"display:inline; width:15px; background-color:transparent;\"><label style=\" white-space:nowrap; clear: both; width:0px;\" for=\"toggle-'.$id.'\"><h3 style=\"display:inline; line-height: 2px; margin: 1em;\">'.$file_name.':</h3></label>';\n echo '<div class=\"ijwe\" style=\"background-color:#c4c4c4; overflow-y: scroll; padding: 0.3em; max-height:400px;\"><pre><xmp>';\n print_r($array);\n echo '</xmp></pre></div>';\n echo '</div>';\n}",
"function\teeps_printr($a, $level)\t{\n if (is_array($a))\t{\n $name = key($a);\n echo\t\"<br>\";\n for ($i = 0; $i < $level*2; $i++)\techo \" \";\n echo \"<strong>ARRAY $name</strong>\";\n foreach ($a as $e)\t{\n eeps_printr($e, $level + 1);\n }\n }\n else {\n if (strlen($a) != 0)\t{\n echo\t\"<br>\";\n for ($i = 0; $i < $level*2; $i++)\techo \" \";\n echo \"$a\";\n }\n }\n}",
"function get_a($object, $html_format = true)\n{\n if (is_array($object)) {\n $content = print_r($object, true);\n } else {\n ob_start();\n var_dump($object);\n $content = ob_get_contents();\n ob_end_clean();\n }\n if ($html_format) {\n $content = \"<pre>\".htmlentities($content).\"</pre>\";\n }\n return $content;\n}",
"function printArray($objArray) {\r\n\t\tglobal $global_config;\r\n\t\tif($global_config[\"debug_mode\"] == \"1\"){\r\n\t\t\tif(is_array($objArray)) {\r\n\t\t\t\tprint \"<PRE>\";\r\n\t\t\t\tprint_r($objArray);\r\n\t\t\t\tprint \"</PRE>\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tprint $objArray.\" <br> \";\r\n\t\t}\t\r\n\t}",
"static function DisplayArray($array)\r\n {\r\n $depth = 0;\r\n if (is_array($array))\r\n {\r\n echo \"Array (<br />\";\r\n for($i = 0; $i < count($array); $i ++)\r\n {\r\n if (is_array($array[$i]))\r\n {\r\n DisplayInlineArray($array[$i], $depth + 1, $i);\r\n }\r\n else\r\n {\r\n echo \"[\" . $i . \"] => \" . $array[$i];\r\n echo \"<br />\";\r\n $depth = 0;\r\n }\r\n }\r\n echo \")<br />\";\r\n }\r\n else\r\n {\r\n echo \"Variabele is geen array\";\r\n }\r\n }",
"function webmoney_get_dump($var){\n//dump of array\n$s = \"\";\nforeach ((array)$var as $k=>$v)\n $s .= \"$k => $v<br />\\n\";\nreturn $s;\n}",
"function pre($data)\n{\n echo \"<pre>\";\n print_r($data);\n echo \"</pre>\";\n}",
"function pretty_json($json, $ret= \"\\n\", $ind=\"\\t\") {\n $beauty_json = '';\n $quote_state = FALSE;\n $level = 0; \n $json_length = strlen($json);\n for ($i = 0; $i < $json_length; $i++)\n { \n $pre = '';\n $suf = '';\n switch ($json[$i])\n {\n case '\"': \n $quote_state = !$quote_state; \n break;\n case '[': \n $level++; \n break;\n case ']':\n $level--; \n $pre = $ret;\n $pre .= str_repeat($ind, $level); \n break;\n case '{':\n if ($i - 1 >= 0 && $json[$i - 1] != ',')\n {\n $pre = $ret;\n $pre .= str_repeat($ind, $level); \n } \n $level++; \n $suf = $ret; \n $suf .= str_repeat($ind, $level); \n break;\n case ':':\n $suf = ' ';\n break;\n case ',':\n if (!$quote_state)\n { \n $suf = $ret; \n $suf .= str_repeat($ind, $level);\n }\n break;\n case '}':\n $level--; \n\n case ']':\n $pre = $ret;\n $pre .= str_repeat($ind, $level);\n break;\n }\n $beauty_json .= $pre.$json[$i].$suf;\n }\n return $beauty_json;\n }",
"function prettyPrint($moves) {\n echo '<pre>',print_r($moves,1),'</pre>';\n\n}",
"static protected function dumpArray($value) {\n\t\t// array\n\t\t$keys = array_keys ( $value );\n\t\tif ((1 == count ( $keys ) && '0' == $keys [0]) || (count ( $keys ) > 1 && array_reduce ( $keys, create_function ( '$v,$w', 'return (integer) $v + $w;' ), 0 ) == count ( $keys ) * (count ( $keys ) - 1) / 2)) {\n\t\t\t$output = array ();\n\t\t\tforeach ( $value as $val ) {\n\t\t\t\t$output [] = self::dump ( $val );\n\t\t\t}\n\t\t\t\n\t\t\treturn sprintf ( '[%s]', implode ( ', ', $output ) );\n\t\t}\n\t\t\n\t\t// mapping\n\t\t$output = array ();\n\t\tforeach ( $value as $key => $val ) {\n\t\t\t$output [] = sprintf ( '%s: %s', self::dump ( $key ), self::dump ( $val ) );\n\t\t}\n\t\t\n\t\treturn sprintf ( '{ %s }', implode ( ', ', $output ) );\n\t}",
"function do_dump(&$var, $var_name = NULL, $indent = NULL, $reference = NULL)\n{\n\t$do_dump_indent = \"<span style='color:#eeeeee;'>|</span> \";\n\t$reference = $reference.$var_name;\n\t$keyvar = 'the_do_dump_recursion_protection_scheme'; $keyname = 'referenced_object_name';\n\n\tif (is_array($var) && isset($var[$keyvar]))\n\t{\n\t\t$real_var = &$var[$keyvar];\n\t\t$real_name = &$var[$keyname];\n\t\t$type = ucfirst(gettype($real_var));\n\t\techo \"$indent$var_name <span style='color:#a2a2a2'>$type</span> = <span style='color:#e87800;'>&$real_name</span><br>\";\n\t}\n\telse\n\t{\n\t\t$var = array($keyvar => $var, $keyname => $reference);\n\t\t$avar = &$var[$keyvar];\n\n\t\t$type = ucfirst(gettype($avar));\n\t\tif($type == \"String\") $type_color = \"<span style='color:green'>\";\n\t\telseif($type == \"Integer\") $type_color = \"<span style='color:red'>\";\n\t\telseif($type == \"Double\"){ $type_color = \"<span style='color:#0099c5'>\"; $type = \"Float\"; }\n\t\telseif($type == \"Boolean\") $type_color = \"<span style='color:#92008d'>\";\n\t\telseif($type == \"NULL\") $type_color = \"<span style='color:black'>\";\n\n\t\tif(is_array($avar))\n\t\t{\n\t\t\t$count = count($avar);\n\t\t\techo \"$indent\" . ($var_name ? \"$var_name => \":\"\") . \"<span style='color:#a2a2a2'>$type ($count)</span><br>$indent(<br>\";\n\t\t\t$keys = array_keys($avar);\n\t\t\tforeach($keys as $name)\n\t\t\t{\n\t\t\t\t$value = &$avar[$name];\n\t\t\t\tdo_dump($value, \"['$name']\", $indent.$do_dump_indent, $reference);\n\t\t\t}\n\t\t\techo \"$indent)<br>\";\n\t\t}\n\t\telseif(is_object($avar))\n\t\t{\n\t\t\techo \"$indent$var_name <span style='color:#a2a2a2'>$type</span><br>$indent(<br>\";\n\t\t\tforeach($avar as $name=>$value) do_dump($value, \"$name\", $indent.$do_dump_indent, $reference);\n\t\t\techo \"$indent)<br>\";\n\t\t}\n\t\telseif(is_int($avar)) echo \"$indent$var_name = <span style='color:#a2a2a2'>$type(\".strlen($avar).\")</span> $type_color$avar</span><br>\";\n\t\telseif(is_string($avar)) echo \"$indent$var_name = <span style='color:#a2a2a2'>$type(\".strlen($avar).\")</span> $type_color\\\"$avar\\\"</span><br>\";\n\t\telseif(is_float($avar)) echo \"$indent$var_name = <span style='color:#a2a2a2'>$type(\".strlen($avar).\")</span> $type_color$avar</span><br>\";\n\t\telseif(is_bool($avar)) echo \"$indent$var_name = <span style='color:#a2a2a2'>$type(\".strlen($avar).\")</span> $type_color\".($avar == 1 ? \"TRUE\":\"FALSE\").\"</span><br>\";\n\t\telseif(is_null($avar)) echo \"$indent$var_name = <span style='color:#a2a2a2'>$type(\".strlen($avar).\")</span> {$type_color}NULL</span><br>\";\n\t\telse echo \"$indent$var_name = <span style='color:#a2a2a2'>$type(\".strlen($avar).\")</span> $avar<br>\";\n\n\t\t$var = $var[$keyvar];\n\t}\n}",
"function dump($array,$indent = false,$wordwrap = false) {\n\t// Dumps to some very clean YAML. We'll have to add some more features\n\t// and options soon. And better support for folding.\n\n\t// New features and options.\n\tif ($indent === false or !is_numeric($indent)) {\n\t\t$this->_dumpIndent = 2;\n\t} else {\n\t\t$this->_dumpIndent = $indent;\n\t}\n\n\tif ($wordwrap === false or !is_numeric($wordwrap)) {\n\t\t$this->_dumpWordWrap = 40;\n\t} else {\n\t\t$this->_dumpWordWrap = $wordwrap;\n\t}\n\n\t// New YAML document\n\t$string = \"---\\n\";\n\n\t// Start at the base of the array and move through it.\n\tforeach ($array as $key => $value) {\n\t\t$string .= $this->_yamlize($key,$value,0);\n\t}\n\treturn $string;\n\t}",
"public function print(bool $html = true, int $level = 0) : Arr {\n \n $arr = $this;\n\n $br = $html ? '<br>' : \"\\n\";\n $sp = $html ? ' ' : ' ';\n\n foreach($arr as $k => $v) {\n for($i = 0; $i<$level; ++$i) {\n echo $sp;\n }\n echo \"$k = \";\n\n if (is_array($v)) {\n\n $arrv = arr($v);\n\n if (!$arrv->isAssoc()) {\n\n if (!$arrv->isEmpty()) {\n\n echo '[';\n\n $arrv->foreach(function($key, $value) use($arrv, $html, $level, $sp, $br) {\n\n if (is_string($value)) {\n echo \"'$value'\";\n }\n\n else if (is_bool($value)) {\n echo $value ? 'true' : 'false';\n }\n\n else if (is_array($value)) {\n\n $arr = arr($value);\n $assoc = $arr->isAssoc();\n $b = $assoc ? '{' : '[';\n\n echo $br;\n forn($level+1, function($index) use($sp) {\n echo $sp;\n });\n\n echo \"$b $br\";\n\n arr($value)->print($html, $level + 2);\n\n forn($level + 1, function($index) use($sp) {\n echo $sp;\n });\n\n echo \"$b $br\";\n\n } else echo $value;\n\n });\n\n forn($level, function() use($sp) {\n echo $sp;\n });\n\n echo \"]$sp\";\n } else {\n echo \"{ }$sp\";\n }\n\n } else {\n\n if (!$arrv->isEmpty()) {\n echo \"{ $br\";\n $arrv->print($html, $level + 1);\n forn($level, function() use($sp) {\n echo $sp;\n });\n echo \"}$br\";\n\n } else {\n echo \"{ }$br\";\n }\n\n }\n\n } else if (is_bool($v)) {\n\n echo $v ? 'true' : 'false';\n echo $br;\n\n } else if (is_string($v)) {\n echo \"'$v'$br\";\n\n } else {\n echo \"$v $br\";\n }\n }\n\n return $this;\n }",
"function pre($data){\n echo '<pre>';\n print_r($data);\n echo '</pre>';\n}",
"function pre($data){\n echo '<pre>';\n print_r($data);\n echo '</pre>';\n}",
"function stringifyArray ($p_aData, $p_iLvl = 0) {\r\n\t\t\t$sData = '';\r\n\t\t\t$bFirst = true;\r\n\t\t\tif (is_array($p_aData)) {\r\n\t\t\t\t$sData .= str_repeat('\t', $p_iLvl) . ' => Array (';\r\n\t\t\t\tforeach($p_aData as $k => $v) {\r\n\t\t\t\t\tif ($bFirst) {\r\n\t\t\t\t\t\t$sData = \"\\n\";\r\n\t\t\t\t\t\t$bFirst = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t$sData .= \",\\n\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (is_array($v)) {\r\n\t\t\t\t\t\t$sData .= str_repeat('\t', $p_iLvl) . $k . ' => Array ('\r\n\t\t\t\t\t\t\t . __stringifyArray($v, $p_iLvl + 1) . \"\\n\"\r\n\t\t\t\t\t\t\t . str_repeat('\t', $p_iLvl) . ')';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t$sData .= str_repeat('\t', $p_iLvl) . $k . ' => ' . $v;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$sData .= str_repeat('\t', $p_iLvl) . ')';\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$sData .= $p_aData;\r\n\t\t\t}\r\n\t\t\treturn $sData;\r\n\t\t}",
"function dumpHelper($para, $string = '', $addArray = false)\n{\n global $tree, $element;\n\n if ($addArray) {\n eval(\"\\$res=array(\".$para.');');\n } else {\n eval(\"\\$res=\".$para.';');\n }\n echo '<strong>' . $para . ' </strong><i><u><span style=\"color: #008000;\">' . $string . '</span></u></i><br>';\n // this method dumps to the screen, since print_r or var_dump dont\n // work too good here, because the inner array is recursive\n // well, it looks ugly but one can see what is meant :-)\n $tree->varDump($res);\n echo '<br />';\n\n}",
"function pre($data) {\n echo '<pre>';\n print_r($data);\n echo '</pre>';\n}",
"function YAMLDump($array,$indent = false,$wordwrap = false) {\n\t\t$spyc = new Spyc;\n\t\treturn $spyc->dump($array,$indent,$wordwrap);\n\t}",
"function myShowArray($data)\n{\n echo '<pre>';\n print_r($data);\n echo '</pre>';\n}",
"function pre($data){\r\n echo \"<pre>\";\r\n print_r($data);\r\n echo \"</pre>\";\r\n return FALSE;\r\n}",
"function dump($title, $array) {\n echo '---=[ ' . $title . ' ]=---'. PHP_EOL;\n var_dump($array);\n}",
"function printJSON($array){\n\t\t\techo '<code>'. json_encode($array) .'</code>';\n\t\t}",
"function drush_drushutils_array_dump() {\n $fn = array_pop(drush_get_arguments());\n drush_print(dt('Function: @function', array('@function' => $fn)));\n\n $info = call_user_func($fn);\n if ($info) {\n if (is_array($info)) {\n $lines = _drush_utils_array_fold($info);\n array_walk($lines, function(&$item, $key) {\n drush_print(\"$key = $item\");\n });\n }\n else {\n drush_set_error('ERROR', dt('The return value from @function() was not an array (@type found).', array(\n '@function' => $fn,\n '@type' => gettype($info),\n )));\n }\n }\n else {\n drush_set_error('ERROR', dt('An error occurred when calling @function() or @function() returned NULL.', array(\n '@function' => $fn,\n )));\n }\n}",
"function printArray($array){\n // will accept arrays of values or arrays of arrays\n\n $c = \"\"; // for the comma :)\n $o = \"\"; // the output\n\n foreach($array as $item){\n if (is_array($item)){\n $o .= $c . printArray($item);\n }\n else{\n $o .= $c . $item;\n }\n $c = ',';\n }\n \n $o = \"[\" . $o . \"]\";\n\n return $o;\n}",
"private function _yamlizeArray($array, $indent) {\n\t//--\n\tif(is_array($array)) {\n\t\t//--\n\t\t$string = '';\n\t\t$previous_key = -1;\n\t\t//--\n\t\tforeach($array as $key => $value) {\n\t\t\t//--\n\t\t\tif(!isset($first_key)) {\n\t\t\t\t$first_key = $key;\n\t\t\t} //end if\n\t\t\t//--\n\t\t\t$string .= $this->_yamlize($key, $value, $indent, $previous_key, $first_key, $array);\n\t\t\t$previous_key = $key;\n\t\t\t//--\n\t\t} //end foreach\n\t\t//--\n\t\treturn $string;\n\t\t//--\n\t} else {\n\t\t//--\n\t\treturn false;\n\t\t//--\n\t} //end if else\n\t//--\n}",
"function stringify_array ($array_obj, $value_separator)\n{\n\tif(is_array($array_obj))\n\t{\n\t\tforeach($array_obj as $val)\n\t\t{\n\t\t\tif(is_array($val))\n\t\t\t{\n\t\t\t\t$value_separator .= stringify_array($val, $value_separator);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$value_separator .= $val. \"|\";\n\t\t\t}\n \t\n\t\t}\n\t\treturn $value_separator;\n\t}\n\telse\n\t{\n\t\treturn $value_separator = \"ERROR : $array_obj is not an array\";\n\t}\n}",
"public function summary(array $array);",
"function prettyPrint( $json )\n\t{\n \t$result = '';\n \t$level = 0;\n\t $in_quotes = false;\n \t$in_escape = false;\n\t $ends_line_level = NULL;\n \t$json_length = strlen( $json );\n\n\t for( $i = 0; $i < $json_length; $i++ ) {\n \t $char = $json[$i];\n \t$new_line_level = NULL;\n\t $post = \"\";\n \t if( $ends_line_level !== NULL ) {\n \t $new_line_level = $ends_line_level;\n \t$ends_line_level = NULL;\n\t }\n \t if ( $in_escape ) {\n \t $in_escape = false;\n\t } else if( $char === '\"' ) {\n \t $in_quotes = !$in_quotes;\n \t} else if( ! $in_quotes ) {\n\t switch( $char ) {\n \t case '}': case ']':\n \t $level--;\n \t $ends_line_level = NULL;\n \t $new_line_level = $level;\n \tbreak;\n\n\t case '{': case '[':\n \t $level++;\n \t case ',':\n \t $ends_line_level = $level;\n \t break;\n\n\t case ':':\n \t $post = \" \";\n \t break;\n\n \t case \" \": case \"\\t\": case \"\\n\": case \"\\r\":\n \t $char = \"\";\n \t$ends_line_level = $new_line_level;\n\t $new_line_level = NULL;\n \t break;\n \t }\n\t } else if ( $char === '\\\\' ) {\n \t $in_escape = true;\n\t }\n \t if( $new_line_level !== NULL ) {\n\t $result .= \"\\n\".str_repeat( \"\\t\", $new_line_level );\n \t }\n\t $result .= $char.$post;\n \t}\n\n\t return $result;\n\t}",
"function preint_r($var){\n\techo '<pre>';\n\tprint_r($var);\n\techo '</pre>';\n}",
"private static function parseArray(array $array, int $level): string {\n $output = '';\n\n if (static::$depth <= $level) $output .= '[...]';\n else if (empty($array)) $output .= '[]';\n else {\n $keys = array_keys($array);\n $spaces = str_repeat(' ', $level * 4);\n $output .= '[';\n foreach ($keys as $key) $output .= PHP_EOL . \"{$spaces} [$key] => \" . self::parseVariable($array[$key], $level + 1). ',';\n $output .= PHP_EOL . \"{$spaces}]\";\n }\n\n return $output;\n }",
"function arraytostring($array){\r\n\t$text = \"array(\";\r\n\t$x = 0;\r\n\t$count = count($array);\r\n\tforeach ($array as $key => $value) {\r\n\t\t$x++;\r\n\t\tif (is_array($value)) {\r\n\t\t\t$text .= $key.\"=>\".arraytostring($value);\r\n\t\t\tif ($count != $x) $text .= \",\";\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\t$text .= \"\\\"$key\\\"=>\\\"$value\\\"\";\r\n\t\tif ($count != $x) $text .= \",\";\r\n\t}\r\n\t$text .= \")\";\r\n\treturn $text;\r\n}",
"function var_dump_pre($var)\n{\n echo '<pre>';\n echo var_dump($var);\n echo '</pre>';\n}",
"function myVar_dump($var)\n{\n echo sprintf('<pre>%s</pre>', print_r($var, true));\n}",
"private function _yamlize($key, $value, $indent, $previous_key=-1, $first_key=0, $source_array=null) {\n\t//--\n\tif(is_array($value)) {\n\t\t//--\n\t\tif(empty ($value)) {\n\t\t\treturn $this->_dumpNode($key, array(), $indent, $previous_key, $first_key, $source_array);\n\t\t} //end if\n\t\t//-- It has children. What to do? Make it the right kind of item\n\t\t$string = $this->_dumpNode($key, $this->REMPTY, $indent, $previous_key, $first_key, $source_array);\n\t\t//-- Add the indent\n\t\t$indent += $this->yaml_dump_indent;\n\t\t//-- Yamlize the array\n\t\t$string .= $this->_yamlizeArray($value, $indent);\n\t} elseif (!is_array($value)) {\n\t\t//-- It doesn't have children.\n\t\t$string = $this->_dumpNode($key, $value, $indent, $previous_key, $first_key, $source_array);\n\t\t//--\n\t} //end if else\n\t//--\n\treturn $string;\n\t//--\n}",
"function text_pretty($data){\n\t\tif(!Tool::is_scalar($data)){\n\t\t\treturn htmlspecialchars(\\Grithin\\Debug::json_pretty($data));\n\t\t}else{\n\t\t\treturn htmlspecialchars($data);\n\t\t}\n\t}",
"public function dump(): array;",
"function pr($data) {\n echo '<pre>';\n print_r($data);\n echo '</pre>';\n}",
"function print_r2($val){\n echo '<pre>';\n print_r($val);\n echo '</pre>';\n}",
"static public function exportArray(array $array, $indent)\n {\n $code = array();\n foreach ($array as $key => $value) {\n if (is_array($value)) {\n $value = self::exportArray($value, $indent + 4);\n } else {\n $value = null === $value ? 'null' : var_export($value, true);\n }\n\n $code[] = sprintf('%s%s => %s,', str_repeat(' ', $indent), var_export($key, true), $value);\n }\n\n return sprintf(\"array(\\n%s\\n%s)\", implode(\"\\n\", $code), str_repeat(' ', $indent - 4));\n }",
"function printFormatted($return=false){\n\t\t\tif($return){\n\t\t\t\treturn '<pre>'.print_r( $this->asArray(), true ).'</pre>';\n\t\t\t}else{\n\t\t\t\techo '<pre>'.print_r( $this->asArray(), true ).'</pre>';\n\t\t\t}\n\t\t}",
"function print_array($array,$exit = false) {\n echo '<pre>';\n print_r($array);\n echo '</pre>';\n if($exit) {\n exit();\n }\n}",
"function tfjecho($array) {\r\n die(json_encode($array));\r\n }",
"function pre($value) {\n echo \"<pre>\";\n print_r($value);\n echo \"</pre>\";\n }",
"function dumpAllNicely($string = '')\n{\n global $tree;\n\n echo '<i><span style=\"color: #008000; text-decoration: underline;\">' . $string . '</span></i><br>';\n $all = $tree->getBranch(); // get the entire structure sorted as the tree is, so we can simply foreach through it and show it\n foreach ($all as $aElement) {\n for ($i = 0; $i < $aElement['level']; ++$i) {\n echo ' ';\n }\n echo '<span style=\"color: red\">' . $aElement['name'] . '</span> ===> ';\n $tree->varDump(array($aElement));\n }\n echo '<br />';\n\n}",
"function p($data){\n echo \"<pre>\";\n echo \"<hr>\";\n print_r($data);\n}",
"function de($arr, $backtrace_depth=1) {\n if (!DEV_MODE) {return; }\n\n $msg = array();\n $msg[] = \"<div class='debug'><code><pre>\";\n $msg[] = get_caller($backtrace_depth);\n $msg[] = '<br/>';\n $var_name = get_var_name($arr);\n $msg[] = ($var_name !== false) ? $var_name.' ' : '';\n $msg[] = var_export($arr, true);\n //$msg[] = nl2br(var_export($arr, true));\n $msg[] = \"</pre></code></div>\";\n echo join('', $msg);\n }",
"function printc($data)\n{\n if(is_array($data)) {\n print_r($data);\n } else {\n print($data.\"\\n\");\n }\n}"
] | [
"0.71115845",
"0.7043661",
"0.7000103",
"0.69114006",
"0.67974585",
"0.6767884",
"0.6694972",
"0.6639608",
"0.663276",
"0.66135705",
"0.6610518",
"0.6606194",
"0.6480899",
"0.6375793",
"0.63615245",
"0.6360632",
"0.6349452",
"0.6348594",
"0.6342662",
"0.63387275",
"0.6331262",
"0.63018167",
"0.6272905",
"0.6212315",
"0.6207637",
"0.6204988",
"0.6202098",
"0.6200565",
"0.6178571",
"0.61650455",
"0.61638594",
"0.6159048",
"0.6159048",
"0.6143705",
"0.61382943",
"0.61348164",
"0.61162317",
"0.60828763",
"0.60632676",
"0.6050291",
"0.60454565",
"0.60377103",
"0.6033826",
"0.6031295",
"0.6002526",
"0.59969",
"0.59744036",
"0.5968591",
"0.5963829",
"0.5963667",
"0.59492886",
"0.5942431",
"0.5938232",
"0.5931381",
"0.59285414",
"0.58998805",
"0.58919066",
"0.5880972",
"0.58772194",
"0.586147",
"0.5859375",
"0.5850854",
"0.58420503",
"0.5838382",
"0.58264583",
"0.5798353",
"0.5798353",
"0.579632",
"0.57936716",
"0.5772136",
"0.5770113",
"0.5768849",
"0.5759664",
"0.5752062",
"0.574209",
"0.57292706",
"0.57104963",
"0.56963885",
"0.5665762",
"0.5652916",
"0.56076276",
"0.5606613",
"0.55886316",
"0.5567169",
"0.5562079",
"0.55447257",
"0.5542185",
"0.5537135",
"0.5517441",
"0.55170405",
"0.5515959",
"0.55083376",
"0.55040675",
"0.54887813",
"0.5486435",
"0.54812866",
"0.54722124",
"0.545432",
"0.5453205",
"0.5448404"
] | 0.59548545 | 50 |
rtrn_default_value is a function that returns a default value. This function is used to allow workflow to operate properly even if there are missing active dashboards. The function accepts the paramter id (used to specify which module to update), and value (taken from the modules relational "value" property). | function imageselector_rtrn_default_value($sid, $options)
{
//Specify the database to connect to
//use to find default value
global $db;
//read database, find default value
$sql='select '.$options['desccolumnname'].' as description,'.$options['urlcolumnname'].' as url,'.$options['idcolumnname'].' as id from '.$options['tablename'];
if($options['lookuptablename']!='')
$sql='select '.$options['desccolumnname'].' as description,'.$options['urlcolumnname'].' as url,'.$options['idcolumnname'].' as id from '.$options['tablename'].' where '.$options['lookupidcolumnname'].'::text=(select '.$options['lookupcolumnname'].' from '.$options['lookuptablename']." where ".$options['lookupsearchcolumnname']."=".$options['lookupsearchvalue'].')::text;';
if($options['lookupinputmodulesid']!='')
$sql='select '.$options['desccolumnname'].' as description,'.$options['urlcolumnname'].' as url,'.$options['idcolumnname'].' as id from '.$options['tablename'].' where '.$options['lookupidcolumnname']."::text=(select value from station_variables where (name='value') and (sid=".$options['lookupinputmodulesid']."))::text;";
$result = $db->fetchAll($sql);
$sql = 'update station_variables set value=\''.$result[0]['id'].'\' where sid='.$sid.' and name=\'value\';';
$result = $db->fetchAll($sql);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDefaultValue();",
"public function getDefaultValue();",
"public function getDefaultValue() {}",
"public function getDefaultValue() {}",
"public function getDefaultValue(): mixed;",
"function define_default($param, $value) {\n\t\t//\n\t}",
"function mm_default($field, $value='', $roles='', $templates='', $eval=false) {\n\t\n\t\n\tglobal $mm_fields, $modx;\n\t$e = &$modx->Event;\n\t\t\n\t// if we aren't creating a new document or folder, we don't want to do this\n\t// Which action IDs so we want to do this for?\n\t// 85 =\n\t// 4 =\n\t// 72 = Create new weblink\n\t\n\t$allowed_actions = array('85','4','72');\n\tif (!in_array($modx->manager->action, $allowed_actions)) {\n\t\treturn;\n\t} \n\t\n\tif ($e->name == 'OnDocFormRender' && useThisRule($roles, $templates)) {\n\t\t\n\t\t// What's the new value, and does it include PHP?\n\t\t$new_value = ($eval) ? eval($value) : $value;\n\t\t\n\t\t$output = \" // ----------- Change defaults -------------- \\n\";\n\t\t\n\t\t\n\t\t// Work out the correct date time format based on the config setting\n\t\tswitch($modx->config['date_format']) {\n\t\t\tcase 'dd-mm-yy':\n\t\t\t\t$date_format = 'd-m-Y';\n\t\t\tbreak;\t\n\t\t\tcase 'mm/dd/yy':\n\t\t\t\t$date_format = 'm-d-Y';\n\t\t\tbreak;\n\t\t\tcase 'yy/mm/dd':\n\t\t\t\t$date_format = 'Y-m-d';\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\tswitch ($field) {\n\t\t\tcase 'pub_date':\n\t\t\t\t$new_value = ($new_value=='') ? date(\"$date_format H:i:s\") : $new_value;\n\t\t\t\t$output .= '$(\"input[name=pub_date]\").val(\"'.jsSafe($new_value).'\"); '.\"\\n\";\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'unpub_date':\n\t\t\t\t$new_value = ($new_value=='') ? date(\"$date_format H:i:s\") : $new_value;\n\t\t\t\t$output .= '$(\"input[name=unpub_date]\").val(\"'.jsSafe($new_value).'\"); '.\"\\n\";\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'published':\n\t\t\t\t$new_value = ($value)?'1':'0';\n\t\t\t\t$output .= '$(\"input[name=published]\").val(\"'.$new_value.'\"); '.\"\\n\";\n\t\t\t\tif ($value) {\n\t\t\t\t\t$output .= '$(\"input[name=publishedcheck]\").attr(\"checked\", \"checked\"); '.\"\\n\";\n\t\t\t\t} else {\n\t\t\t\t\t$output .= '$(\"input[name=publishedcheck]\").removeAttr(\"checked\"); '.\"\\n\";\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'hide_menu':\n\t\t\t\t$new_value = ($value)?'1':'0';\n\t\t\t\t$output .= '$(\"input[name=hidemenu]\").val(\"'.$new_value.'\"); '.\"\\n\";\n\t\t\t\tif (!$value) {\n\t\t\t\t\t$output .= '$(\"input[name=hidemenucheck]\").attr(\"checked\", \"checked\"); '.\"\\n\";\n\t\t\t\t} else {\n\t\t\t\t\t$output .= '$(\"input[name=hidemenucheck]\").removeAttr(\"checked\"); '.\"\\n\";\n\t\t\t\t}\t\t\t\t\t\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'show_in_menu':\n\t\t\t\t$new_value = ($value)?'0':'1'; // Note these are reversed from what you'd think\n\t\t\t\t$output .= '$(\"input[name=hidemenu]\").val(\"'.$new_value.'\"); '.\"\\n\";\n\t\t\t\tif ($value) {\n\t\t\t\t\t$output .= '$(\"input[name=hidemenucheck]\").attr(\"checked\", \"checked\"); '.\"\\n\";\n\t\t\t\t} else {\n\t\t\t\t\t$output .= '$(\"input[name=hidemenucheck]\").removeAttr(\"checked\"); '.\"\\n\";\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'searchable':\n\t\t\t\t$new_value = ($value)?'1':'0';\n\t\t\t\t$output .= '$(\"input[name=searchable]\").val(\"'.$new_value.'\"); '.\"\\n\";\n\t\t\t\tif ($value) {\n\t\t\t\t\t$output .= '$(\"input[name=searchablecheck]\").attr(\"checked\", \"checked\"); '.\"\\n\";\n\t\t\t\t} else {\n\t\t\t\t\t$output .= '$(\"input[name=searchablecheck]\").removeAttr(\"checked\"); '.\"\\n\";\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'cacheable':\n\t\t\t\t$new_value = ($value)?'1':'0';\n\t\t\t\t$output .= '$(\"input[name=cacheable]\").val(\"'.$new_value.'\"); '.\"\\n\";\n\t\t\t\tif ($value) {\n\t\t\t\t\t$output .= '$(\"input[name=cacheablecheck]\").attr(\"checked\", \"checked\"); '.\"\\n\";\n\t\t\t\t} else {\n\t\t\t\t\t$output .= '$(\"input[name=cacheablecheck]\").removeAttr(\"checked\"); '.\"\\n\";\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'clear_cache':\n\t\t\t\t$new_value = ($value)?'1':'0';\n\t\t\t\t$output .= '$(\"input[name=syncsite]\").val(\"'.$new_value.'\"); '.\"\\n\";\n\t\t\t\tif ($value) {\n\t\t\t\t\t$output .= '$(\"input[name=syncsitecheck]\").attr(\"checked\", \"checked\"); '.\"\\n\";\n\t\t\t\t} else {\n\t\t\t\t\t$output .= '$(\"input[name=syncsitecheck]\").removeAttr(\"checked\"); '.\"\\n\";\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'container':\n\t\t\tcase 'is_folder':\n\t\t\t\t$new_value = ($value)?'1':'0';\n\t\t\t\t$output .= '$(\"input[name=isfolder]\").val(\"'.$new_value.'\"); '.\"\\n\";\n\t\t\t\tif ($value) {\n\t\t\t\t\t$output .= '$(\"input[name=isfoldercheck]\").attr(\"checked\", \"checked\"); '.\"\\n\";\n\t\t\t\t} else {\n\t\t\t\t\t$output .= '$(\"input[name=isfoldercheck]\").removeAttr(\"checked\"); '.\"\\n\";\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'is_richtext':\n\t\t\tcase 'richtext':\n\t\t\t\t$new_value = ($value)?'1':'0';\n\t\t\t\t$output .= 'var originalRichtextValue = $(\"#which_editor:first\").val(); '.\"\\n\";\n\t\t\t\t$output .= '$(\"input[name=richtext]\").val(\"'.$new_value.'\"); '.\"\\n\";\n\t\t\t\tif ($value) {\n\t\t\t\t\t$output .= '$(\"input[name=richtextcheck]\").attr(\"checked\", \"checked\"); '.\"\\n\";\n\t\t\t\t} else {\n\t\t\t\t\t$output .= '\n\t\t\t\t\t$(\"input[name=richtextcheck]\").removeAttr(\"checked\");\n\t\t\t\t\t// Make the RTE displayed match the default value that has been set here\n\t\t\t\t\tif (originalRichtextValue != \"none\") {\n\t\t\t\t\t\t$(\"#which_editor\").val(\"none\");\n\t\t\t\t\t\tchangeRTE();\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t';\n\t\t\t\t\t$output .= ''.\"\\n\";\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\tbreak;\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tcase 'log':\n\t\t\t\t$new_value = ($value)?'0':'1';\t// Note these are reversed from what you'd think\n\t\t\t\t$output .= '$(\"input[name=donthit]\").val(\"'.$new_value.'\"); '.\"\\n\";\n\t\t\t\tif ($value) {\n\t\t\t\t\t$output .= '$(\"input[name=donthitcheck]\").attr(\"checked\", \"checked\"); '.\"\\n\";\n\t\t\t\t} else {\n\t\t\t\t\t$output .= '$(\"input[name=donthitcheck]\").removeAttr(\"checked\"); '.\"\\n\";\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t\tcase 'content_type':\n\t\t\t\t$output .= '$(\"select[name=contentType]\").val(\"'.$new_value.'\");' . \"\\n\";\t\t\t\n\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t$output .= '$(\"*[name='.$field.']\").val(\"'.$new_value.'\");' . \"\\n\"; //return;\n\t\t\tbreak;\n\t\t}\t\n\t\t$e->output($output . \"\\n\");\t\n\t\n\t} \n\t\n}",
"function get_value_or_default($value,$default='')\n{\n\treturn (!empty($value)) ? $default : $value;\n}",
"protected function get_root_value($default_value = \\null)\n {\n }",
"function wpv_default($value, $default) {\n\tif (empty($value))\n\t\treturn $default;\n\treturn $value;\n}",
"function progress_default_value(&$var, $def = null) {\n return isset($var)?$var:$def;\n}",
"function getDefaultValue() \n {\n return $this->getValueByFieldName( 'statevar_default' );\n }",
"public function getDefaultElementValue($element_id) {\n $type = $this->entity->type;\n $value = variable_get(\"cdb_{$type}_{$element_id}_default_value\", '');\n return $value;\n }",
"public function getDefaultValue()\n {\n\treturn $this->default;\n }",
"public function getDefaultValue()\n {\n if (empty($this->argList)) {\n $products = self::executeMethod('productsList')->getResponse();\n $this->argList = isset($products[0]) ? [$products[0]['id']] : [];\n }\n \n if (empty($this->defaultId)) {\n $categories = self::executeMethod('categoriesList')->getResponse();\n $delivery = self::executeMethod('deliveryVariantsList')->getResponse();\n $payment = self::executeMethod('paymentGatewaysList')->getResponse();\n $collection = self::executeMethod('collectionsList')->getResponse();\n $collect = self::executeMethod('collectsList')->getResponse();\n $statuses = self::executeMethod('customStatusesList')->getResponse();\n\n $this->defaultId = [\n 'product_id' => isset($products[0]) ? $products[0]['id'] : null,\n 'category_id' => isset($categories[0]) ? $categories[0]['id'] : null,\n 'delivery_variant_id' => isset($delivery[0]) ? $delivery[0]['id'] : null,\n 'payment_gateway_id' => isset($payment[0]) ? $payment[0]['id'] : null,\n 'parent_id' => isset($collection[0]) ? $collection[0]['id'] : null,\n 'collection_id' => isset($collect[0]) ? $collect[0]['id'] : null,\n 'permalink' => isset($statuses[0]) ? $statuses[0]['permalink'] : null,\n ];\n }\n }",
"public function getDefault($var);",
"public final function post_value($default_value = \\null)\n {\n }",
"function cspm_get_field_default($option_id, $default_value = ''){\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * We'll check if the default settings can be found in the array containing the \"(shared) plugin settings\".\r\n\t\t\t * If found, we'll use it. If not found, we'll use the one in [@default_value] instead. */\r\n\t\t\t \r\n\t\t\t$default = $this->cspm_setting_exists($option_id, $this->plugin_settings, $default_value);\r\n\t\t\t\r\n\t\t\treturn $default;\r\n\t\t\t\r\n\t\t}",
"function default_value(&$var, $def = null) {\n return isset($var)?$var:$def;\n}",
"public function actionDefault($id)\n\t{\n\t\t$model = $this->findModel($id);\n\t\t$replace = $model->default == 1 ? 0 : 1;\n\t\t$model->default = $replace;\n\t\t\n if ($model->save(false, ['default', 'modified_id'])) {\n\t\t\tYii::$app->session->setFlash('success', Yii::t('app', 'User level success updated.'));\n\t\t\treturn $this->redirect(['index']);\n\t\t}\n\t}",
"public function getDefault();",
"public function getDefaultIdValue(): RawValue\n {\n return new RawValue('default');\n }",
"function get($id,$default=''){\n\n if ($id == '_post_bForm_ID_once') return $default;\n\n $record = $this->getMembers(array('lm_key'=>$id));\n if (empty($record)){\n $this->addMember(array('lm_key'=>$id,'lm_value'=>$default));\n return $default;\n }else{\n foreach($record as $id=>$descr) $reply = $descr;\n if (empty($reply)) b_debug::internalError(b_debug::__());\n b_debug::xxx($reply['lm_value'],array('M',2, (bool)$this->debug));\n return $reply['lm_value'];\n }\n }",
"public function getValidDefaultValue(): mixed;",
"function coalescenull($value, $default1) {\n if (is_null($value)) {\n return $default1;\n } else {\n return $value;\n }\n }",
"private function get_resource_value($field,$default) {\n\n\t\tif(!isset($this->settings[$field])) {\n\t\t\treturn false;\n\t\t}\n\n\t\tswitch($this->settings[$field]) {\n\n\t\t\tcase 'EECK_DEFAULT':\n\t\t\t\treturn $default;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\treturn $this->settings[$field];\n\t\t\t\tbreak;\n\t\t}\n\n\t}",
"function usp_ews_default_value(&$var, $def = null) {\n return isset($var)?$var:$def;\n}",
"function update_value($value, $post_id, $field) {\n\t\t//$value = \"this overrides\";\n\t\treturn $value;\n\t}",
"function acf_with_default($value, $default_value)\n{\n}",
"public function getDefaultValue()\n {\n return $this->default_value;\n }",
"public static function get_input_value($id, $default = NULL) {\n global $TFUSE;\n return ( $TFUSE->request->isset_GET($id) ? $TFUSE->request->GET($id) : $default );\n }",
"function getAttributeDefault( $attribId )\n\t{\n\t\t$success = false;\n\t\t$database = PhplistHelperPhplist::getDBO();\n\t\t$tablename_attributes = PhplistHelperAttribute::getTableName();\n\t\tPhplist::load( 'PhplistQuery', 'library.query' );\n\t\tJTable::addIncludePath( JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_phplist' . DS . 'tables' );\n\t\t\n\t\t$query = new PhplistQuery( );\n\t\t$query->select( \"default_value\" );\n\t\t$query->from( $tablename_attributes . \" AS tbl\" );\t\t\n\t\t$query->where( 'tbl.id = '.$attribId );\n\t\t\n\t\t$database->setQuery( ( string ) $query );\n\t\t$data = $database->loadObject();\n\t\t$success = $data->default_value;\n\t\treturn $success;\n\t}",
"public static function setDefault(mixed $valueRequired = null, array $arguments = []):mixed {\n\n # Set result\n $result = null;\n\n # Check valueRequired\n if($valueRequired === null)\n\n # Return null\n return $result;\n\n # Check id the string is value\n if(is_callable($valueRequired)){\n\n $result = $valueRequired($arguments);\n\n }else{\n\n # Set result\n $result = $valueRequired;\n\n }\n\n # Return result\n return $result;\n\n }",
"private function get_resource_value($field,$default) {\n\n\t\tif(!isset($this->eeck_settings[$field])) {\n\t\t\treturn false;\n\t\t}\n\n\t\tswitch($this->eeck_settings[$field]) {\n\n\t\t\tcase 'EECK_DEFAULT':\n\t\t\t\treturn $default;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\treturn $this->eeck_settings[$field];\n\t\t\t\tbreak;\n\t\t}\n\n\t}",
"public function default() {\n return \"No param given...\";\n }",
"static public function getValue($name,$default=null)\n {\n $p=self::findOne(['id'=>$name]);\n if($p===null){\n return $default;\n }\n else{\n return $p->value;\n }\n }",
"public function getDefaultValue() {\n\t\treturn $this->data[$this->defaultLanguagePageID];\n\t}",
"public function setDefaultValue($value);",
"function get_default($setting_id) {\n if (isset($this->default_values[$setting_id])) {\n return $this->default_values[$setting_id];\n } else {\n return '';\n }\n }",
"protected function getDefaultValue( $value )\n\t{\n\t\tif ( $value instanceof Expression )\n\t\t{\n\t\t\treturn $value;\n\t\t}\n\n\t\tif ( is_bool( $value ) )\n\t\t{\n\t\t\treturn \"'\" . (int) $value . \"'\";\n\t\t}\n\n\t\treturn \"'\" . strval( $value ) . \"'\";\n\t}",
"public function getDefaultValue() \n\t\t{\n\t\t\treturn $this->defaultValue;\n\t\t}",
"public function testGetValueWithDefault()\n {\n $repository = new Repository($this->values);\n\n $this->assertSame('default', $repository->get('nothere', 'default'));\n $this->assertTrue($repository->get('nothereeither', true));\n $this->assertSame([], $repository->get('array.100', []));\n }",
"function get_setting($setting_id, $default_value = '') {\n //it doesn't requiers the tds_ prefix\n if (td_util::get_option('tds_' . $setting_id) == $this->get_default($setting_id)) {\n return $default_value;\n } else {\n return td_util::get_option('tds_' . $setting_id);\n }\n }",
"function getDefault()\n {\n return $this->_defValue;\n }",
"public function defaultValue($value = null)\n\t{\n\t\treturn $this->getSet(\"defaultValue\", $value);\n\t}",
"public function getDefaultValue()\n {\n return $this->defaultValue;\n }",
"public function getDefaultValue()\n {\n return $this->defaultValue;\n }",
"function getDefaultValue() {\n return $this->getProperty('default_value');\n }",
"public function setDefaultValue($value=null);",
"public function get_default(){\n\t\treturn $this->default;\n\t}",
"protected function _getDefaultValueByInput($nhtd0a3e7f81a9885e99049d1cae0336d269d5e47a9)\n {\n $nht2da0b68df8841752bb747a76780679bcd87c6215 = '';\n switch ($nhtd0a3e7f81a9885e99049d1cae0336d269d5e47a9) {\n case 'select':\n case 'gallery':\n case 'media_image':\n break;\n case 'multiselect':\n $nht2da0b68df8841752bb747a76780679bcd87c6215 = null;\n break;\n\n case 'text':\n case 'price':\n case 'image':\n case 'weight':\n $nht2da0b68df8841752bb747a76780679bcd87c6215 = 'default_value_text';\n break;\n\n case 'textarea':\n $nht2da0b68df8841752bb747a76780679bcd87c6215 = 'default_value_textarea';\n break;\n\n case 'date':\n $nht2da0b68df8841752bb747a76780679bcd87c6215 = 'default_value_date';\n break;\n\n case 'boolean':\n $nht2da0b68df8841752bb747a76780679bcd87c6215 = 'default_value_yesno';\n break;\n\n default:\n break;\n }\n\n return $nht2da0b68df8841752bb747a76780679bcd87c6215;\n }",
"public function post_value($setting, $default_value = \\null)\n {\n }",
"public function setDefault($value);",
"public static function getEtchingValue($id){\n\t\treturn (constant('ETCHING_VALUE_'.$id) ? : 0);\n\t}",
"public function setDefaultValue ($name, $value) {\n // xxx finish\n }",
"public function getDefaultValue() {\n return $this->_default_value;\n }",
"private function get_meta_value( $id, $meta_name, $default_460_value, $default_pre_460_value ) {\n\n\t\t$status = get_post_meta( $id, $meta_name, true );\n\t\tif ( empty( $status ) ) {\n\t\t\tif ( true === $this->is_460_or_later( $id ) ) {\n\t\t\t\t$status = $default_460_value;\n\t\t\t} else {\n\t\t\t\t$status = $default_pre_460_value;\n\t\t\t}\n\t\t}\n\n\t\treturn $status;\n\n\t}",
"public function getDefaultValue()\n {\n return $this->DefaultValue;\n }",
"public function __invoke($id, $default = null)\n {\n $view = $this->getView();\n\n $asset = $view->themeSettingAsset($id);\n\n if ($asset === null) {\n return $default;\n }\n\n return $asset->assetUrl();\n }",
"protected function _getValue($name, $default) {}",
"function getDefaultValue( $data, $repeatCounter = 0, $opts = array() )\r\n\t{\r\n\t\t//cludge for 2 scenarios\r\n\t\tif (array_key_exists('rowid', $data)) {\r\n\t\t\t//when validating the data on form submission\r\n\t\t\t$key = 'rowid';\r\n\t\t} else {\r\n\t\t\t//when rendering the element to the form\r\n\t\t\t$key = '__pk_val';\r\n\t\t}\r\n\r\n\t\t//empty(data) when you are saving a new record and this element is in a joined group\r\n\t\t// $$$ hugh - added !array_key_exists(), as ... well, rowid doesn't always exist in the query string\r\n\r\n\t\t// $$$ rob replaced ALL references to rowid with __pk_val as rowid doesnt exists in the data :O\r\n\r\n\t\t//$$$ rob\r\n\t\t//($this->_inRepeatGroup && $this->_inJoin && $this->_repeatGroupTotal == $repeatCounter)\r\n\t\t//is for saying that the last record in a repeated join group should be treated as if it was in a new form\r\n\r\n\t\tif (empty( $data ) || !array_key_exists($key, $data) || (array_key_exists($key, $data) && $data[$key] == '') || ($this->_inRepeatGroup && $this->_inJoin && $this->_repeatGroupTotal == $repeatCounter)){\r\n\t\t\t//new record\r\n\t\t\tif($this->_inRepeatGroup && $this->_inJoin && $this->_repeatGroupTotal == $repeatCounter && $this->_editable){\r\n\t\t\t\t\t\r\n\t\t\t\t$user =& JFactory::getUser();\r\n\t\t\t\t// $$$ hugh - need to actually set $this->default\r\n\t\t\t\t$element =& $this->getElement();\r\n\t\t\t\t$element->default = $user->get('id');\r\n\t\t\t\treturn $element->default;\r\n\t\t\t}else{\r\n\t\t\t\t$user =& JFactory::getUser();\r\n\t\t\t\t// $$$ hugh - need to actually set $this->default\r\n\t\t\t\t$element =& $this->getElement();\r\n\t\t\t\t$element->default = $user->get('id');\r\n\t\t\t\treturn $element->default;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn parent::getDefaultValue( $data, $repeatCounter );\r\n\t}",
"protected function func_default() {}",
"public function getWarehouseDefaultValue() {\n //initialize dummy value.. no content header.pure html\n $sql = null;\n $warehouseId = null;\n if ($this->getVendor() == self::MYSQL) {\n $sql = \"\n SELECT `warehouseId`\n FROM `warehouse`\n WHERE `isActive` = 1\n AND `companyId` = '\" . $this->getCompanyId() . \"'\n AND \t `isDefault` =\t 1\n LIMIT 1\";\n } else {\n if ($this->getVendor() == self::MSSQL) {\n $sql = \"\n SELECT TOP 1 [warehouseId],\n FROM [warehouse]\n WHERE [isActive] = 1\n AND [companyId] = '\" . $this->getCompanyId() . \"'\n AND \t [isDefault] = 1\";\n } else {\n if ($this->getVendor() == self::ORACLE) {\n $sql = \"\n SELECT WAREHOUSEID AS \\\"warehouseId\\\",\n FROM WAREHOUSE\n WHERE ISACTIVE = 1\n AND COMPANYID = '\" . $this->getCompanyId() . \"'\n AND \t ISDEFAULT\t =\t 1\n AND \t\t ROWNUM\t =\t 1\";\n } else {\n header('Content-Type:application/json; charset=utf-8');\n echo json_encode(array(\"success\" => false, \"message\" => $this->t['databaseNotFoundMessageLabel']));\n exit();\n }\n }\n }\n try {\n $result = $this->q->fast($sql);\n } catch (\\Exception $e) {\n echo json_encode(array(\"success\" => false, \"message\" => $e->getMessage()));\n exit();\n }\n if ($result) {\n $row = $this->q->fetchArray($result);\n $warehouseId = $row['warehouseId'];\n }\n return $warehouseId;\n }",
"public function value(/*$default = \\Unicity\\Core\\Data\\Undefined::instance(), $eval = 'ifUndefined'*/) {\n\t\t\t$argc = func_num_args();\n\t\t\tif ($argc > 0) {\n\t\t\t\t$args = func_get_args();\n\t\t\t\t$default = $args[0];\n\t\t\t\t$function = ($argc > 1) ? $args[1] : 'ifUndefined';\n\t\t\t\treturn call_user_func_array(array('\\\\Unicity\\\\MappingService\\\\Data\\\\ToolKit', $function), array($this->value, $default));\n\t\t\t}\n\t\t\treturn $this->value;\n\t\t}",
"public function getDefaultVal(): string\n {\n return $this->defaultText;\n }",
"public static function set_default_value( $data, $object_id, $a, $field ) {\n if ( ! empty( $field->args['custom_value'] ) ) {\n return $field->args['custom_value'];\n }\n\n return $data;\n }",
"public function getDefaultValue() {\n return new qti_variable($this->cardinality, $this->type, array('value' => $this->defaultValue));\n }",
"function getDefaultValue($data = array())\r\n\t{\r\n\t\tif (!isset($this->_default)) {\r\n\t\t\t$w = new FabrikWorker();\r\n\t\t\t$params = $this->getParams();\r\n\t\t\t$link = $params->get('link_default_url');\r\n\t\t\t// $$$ hugh - no idea what this was here for, but it was causing some BIZARRE bugs!\r\n\t\t\t//$formdata = $this->getForm()->getData();\r\n\t\t\t// $$$ rob only parse for place holder if we can use the element\r\n\t\t\t// otherwise for encrypted values store raw, and they are parsed when the\r\n\t\t\t// form in processsed in form::addEncrytedVarsToArray();\r\n\t\t\tif ($this->canUse()) {\r\n\t\t\t\t$link = $w->parseMessageForPlaceHolder($link, $data);\r\n\t\t\t}\r\n\t\t\t$element = $this->getElement();\r\n\t\t\t$default = $w->parseMessageForPlaceHolder($element->default, $data);\r\n\t\t\tif ($element->eval == \"1\") {\r\n\t\t\t\t$default = @eval(stripslashes($default));\r\n\t\t\t}\r\n\t\t\t$this->_default = array('label'=>$default, 'link'=>$link);\r\n\t\t}\r\n\t\treturn $this->_default;\r\n\t}",
"public function getValue(string $field, mixed $default = null): mixed;",
"public function getDefaultValue()\n {\n return $this->_defaultValue;\n }",
"protected function getModuleVar($var, $default=null, $opts=Config::LOG_ERRORS) {\n $config = $this->getModuleConfig();\n $value = $config->getVar($var, Config::EXPAND_VALUE| $opts);\n return is_null($value) ? $default :$value;\n }",
"public function defaultValue(Driver $driver);",
"public static function loadDefaultValues($input = ''){\n\t\t\n $parent = Content::find($input['parent_id']);\n\n if(!@$input['template_id']){\n $parentTemplate = Template::find($parent->template_id);\n\n// dd($parent->template_id);\n if($parentTemplate){\n //since we occasionally want to process a looped back tree (which makes the whole tree \n //invalid, we can't use baum's built in functions to get the first child.\n if($parentTemplate->loopback){\n $parentTemplateChild = Template::find($parentTemplate->loopback);\n }\n else{\n $parentTemplateChild = @$parentTemplate->getImmediateDescendants()->first(); \n } \n $input['template_id'] = @$parentTemplateChild->id; \n \n }\n if(!@$input['template_id']){\n //if it's still nothing we can safely set this to 0;\n $input['template_id'] = null;\n }\n }\n $template = Template::find($input['template_id']);\n\t\t\n\t\t//dd($template->name);\n //TODO: replace with something like this: dd($this->default_fields()->first()->id);\n //$contentDefaultFields = Contentdefaultfield::where('content_type_id', '=', $this->content_type_id)->get();\n \n //plug in the fields we wanted..\n if(!@$input['template_id'])$input['template_id'] = @$template->id;\n if(!@$input['name'])$input['name'] = @$template->name;\n if(!@$input['view'])$input['view'] = @$template->view;\n if(!@$input['identifier'])$input['identifier'] = @$template->identifier;\n\n if(!@$input['package'])$input['package'] = @$template->package;\n\n if(!@$input['edit_view'])$input['edit_view'] = @$template->edit_view;\n if(!@$input['edit_package'])$input['edit_package'] = @$template->edit_package;\n if(!@$input['edit_action'])$input['edit_action'] = @$template->edit_action;\n\n //work out the slug if not manually set\n if(!@$input['slug']){\n $input['slug'] = Content::createSlug($input, $parent);\n }\n\t\t\n\t\t\n //and the user_id (author)\n $input['user_id'] = Auth::user()->id;\n \n //and the application:\n if(!@$input['application_id']){\n $application = Application::getApplication();\n $input['application_id'] = $application->id;\n }\n\t\t\n\t\t//set language\n\t\t\n\t\tif(!@$input['language']){\n $input['language'] = App::getLocale();\n }\n \n\t\t\n \n //and the package if not set\n if(!@$input['package']){\n //set it as parent one..\n $input['package'] = @$parent->package;\n \n //still nothing - set from application\n $application = Application::getApplication();\n if($application->package){\n $input['package'] = $application->package;\n }\n \n //still nothing - we have to set it to default.\n if(!$input['package']){\n //last ditch attempt to put something sensible in here\n $input['package'] = Content::PACKAGE;\n }\n }\n\n\n \n if(!@$input['edit_package']){\n //set it as parent one..\n $input['edit_package'] = @$parent->edit_package;\n \n //still nothing - we have to set it to default.\n if(!$input['edit_package']){\n //last ditch attempt to put something sensible in here\n $input['edit_package'] = Content::PACKAGE;\n }\n }\n\n if(!@$input['edit_view']){\n //set it as parent one..\n $input['edit_view'] = @$parent->edit_view;\n \n //still nothing - we have to set it to default.\n if(!$input['edit_view']){\n //last ditch attempt to put something sensible in here\n $input['edit_view'] = Content::EDIT_VIEW;\n }\n }\n\n if(!@$input['view']){\n $input['view'] = Content::VIEW;\n }\n\t\treturn($input);\n }",
"public function getUserDefaultStatus();",
"function getDefaultValue($fieldname){\n\t\t$field =& $this->getField($fieldname);\n\t\t$tablename = $this->getTableName($fieldname);\n\t\tif ( !isset($tablename) ) return null;\n\t\t$table =& $this->getTableOrView($tablename);\n\t\t$delegate =& $table->getDelegate();\n\t\tif ( isset($delegate) and method_exists($delegate, $fieldname.'__default') ){\n\t\t\treturn call_user_func(array(&$delegate, $fieldname.'__default'));\n\t\t} else if ( $field['Default'] ){\n\t\t\treturn $field['Default'];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"public function value($key, $default = null)\n {\n }",
"function acf_update_value($value = \\null, $post_id = 0, $field)\n{\n}",
"public function getBusinessPartnerDefaultValue() {\n //initialize dummy value.. no content header.pure html\n $sql = null;\n $businessPartnerId = null;\n if ($this->getVendor() == self::MYSQL) {\n $sql = \"\n\t\t\tSELECT `businessPartnerId`\n\t\t\tFROM \t`businesspartner`\n\t\t\tWHERE `isActive` = 1\n\t\t\tAND `companyId` = '\" . $this->getCompanyId() . \"'\n\t\t\tAND \t `isDefault` =\t 1\n LIMIT 1\";\n } else if ($this->getVendor() == self::MSSQL) {\n $sql = \"\n\t\t\tSELECT TOP 1 [businessPartnerId],\n\t\t\tFROM [businessPartner]\n\t\t\tWHERE [isActive] = 1\n\t\t\tAND [companyId] = '\" . $this->getCompanyId() . \"'\n\t\t\tAND \t [isDefault] = 1\";\n } else if ($this->getVendor() == self::ORACLE) {\n $sql = \"\n\t\t\tSELECT BUSINESSPARTNERID AS \\\"businessPartnerId\\\",\n\t\t\tFROM BUSINESSPARTNER\n\t\t\tWHERE ISACTIVE = 1\n\t\t\tAND COMPANYID = '\" . $this->getCompanyId() . \"'\n\t\t\tAND \t ISDEFAULT\t =\t 1\n\t\t\tAND \t\t ROWNUM\t =\t 1\";\n } else {\n header('Content-Type:application/json; charset=utf-8');\n echo json_encode(array(\"success\" => false, \"message\" => $this->t['databaseNotFoundMessageLabel']));\n exit();\n }\n\n try {\n $result = $this->q->fast($sql);\n } catch (\\Exception $e) {\n echo json_encode(array(\"success\" => false, \"message\" => $e->getMessage()));\n exit();\n }\n if ($result) {\n $row = $this->q->fetchArray($result);\n $businessPartnerId = $row['businessPartnerId'];\n }\n return $businessPartnerId;\n }",
"public function getBusinessPartnerDefaultValue() {\n //initialize dummy value.. no content header.pure html\n $sql = null;\n $businessPartnerId = null;\n if ($this->getVendor() == self::MYSQL) {\n $sql = \"\n\t\t\tSELECT `businessPartnerId`\n\t\t\tFROM \t`businesspartner`\n\t\t\tWHERE `isActive` = 1\n\t\t\tAND `companyId` = '\" . $this->getCompanyId() . \"'\n\t\t\tAND \t `isDefault` =\t 1\n\t\t\tLIMIT 1\";\n } else if ($this->getVendor() == self::MSSQL) {\n $sql = \"\n\t\t\tSELECT TOP 1 [businessPartnerId],\n\t\t\tFROM [businessPartner]\n\t\t\tWHERE [isActive] = 1\n\t\t\tAND [companyId] = '\" . $this->getCompanyId() . \"'\n\t\t\tAND \t [isDefault] = 1\";\n } else if ($this->getVendor() == self::ORACLE) {\n $sql = \"\n\t\t\tSELECT BUSINESSPARTNERID AS \\\"businessPartnerId\\\",\n\t\t\tFROM BUSINESSPARTNER\n\t\t\tWHERE ISACTIVE = 1\n\t\t\tAND COMPANYID = '\" . $this->getCompanyId() . \"'\n\t\t\tAND \t ISDEFAULT\t =\t 1\n\t\t\tAND \t\t ROWNUM\t =\t 1\";\n } else {\n header('Content-Type:application/json; charset=utf-8');\n echo json_encode(array(\"success\" => false, \"message\" => $this->t['databaseNotFoundMessageLabel']));\n exit();\n }\n\n try {\n $result = $this->q->fast($sql);\n } catch (\\Exception $e) {\n echo json_encode(array(\"success\" => false, \"message\" => $e->getMessage()));\n exit();\n }\n if ($result) {\n $row = $this->q->fetchArray($result);\n $businessPartnerId = $row['businessPartnerId'];\n }\n return $businessPartnerId;\n }",
"public static function setDefaultVersion($id)\n {\n static::where('default', true)->update(['default' => false]);\n static::find($id)->update(['default' => true]);\n }",
"public function getdefaultStatus()\n {\n return $this->defaultstatus;\n }",
"function update_value( $value, $post_id, $field )\n\t{\n\t\t// Note: This function can be removed if not used\n\t\treturn $value;\n\t}",
"function get_default_page_id()\r\n{\r\n\treturn getField('SELECT defaultpage.id\r\n\t\t\t\tFROM\r\n\t\t\t\t\t((select id from tpl_pages where default_page=1 limit 0,1)\r\n\t\t\t\t\tUNION\r\n\t\t\t\t\t(select id from tpl_pages order by id limit 0,1))\r\n\t\t\t\t\tAS defaultpage\r\n\t\t\t\tLIMIT 0,1');\r\n}",
"public static function getDefault()\r\n {\r\n return self::get('default');\r\n }",
"function getDefaultSnoTransChillingPlantAssign($transporter,$status1,$DbConnection)\n{\n\t$query =\"SELECT\tsno FROM transporter_chilling_plant_assignment WHERE account_id=$transporter AND status='$status1'\";\n\t$result = mysql_query($query, $DbConnection);\t\n $NumRowCount = mysql_num_rows($result);\n\tif($NumRowCount>0)\n\t{\n\t\t$row=mysql_fetch_row($result);\n\t\t$default_sno=$row[0];\n\t}\n\telse\n\t{\n\t\t$default_sno=\"\";\n\t}\n\treturn $default_sno;\t\n}",
"function makedefault()\n {\n $msg='';\n $status=0;\n \n if (isset($_POST['sms_gateway'])) {\n \n if (DEMO) {\n $this->prepare_flashmessage(get_languageword('CRUD_operations_disabled_in_DEMO_version'), 2);\n redirect(URL_SMS_GATEWAYS);\n }\n \n $details = $this->base_model->fetch_records_from(TBL_SMS_GATEWAYS);\n \n if (!empty($details)) {\n \n $this->db->query('UPDATE '.TBL_PREFIX.TBL_SMS_GATEWAYS.' SET is_default=\"No\"');\n \n $sms_gateway_id = $this->input->post('sms_gateway_id');\n \n if ($sms_gateway_id > 0) {\n if ($this->db->query('UPDATE '.TBL_PREFIX.TBL_SMS_GATEWAYS.' SET is_default=\"Yes\" WHERE sms_gateway_id = '.$sms_gateway_id)) {\n $msg .= get_languageword('updated_successfully');\n $status = 0;\n } else {\n $msg .= get_languageword('not_updated');\n $status = 1;\n }\n } else {\n $msg .= get_languageword('invalid_updated');\n $status = 1;\n }\n }\n }\n \n if ($msg != '') {\n $this->prepare_flashmessage($msg, $status);\n }\n redirect(URL_SMS_GATEWAYS, REFRESH); \n }",
"public function getDefaultValue()\n {\n return $this->domain->getDefaultValue();\n }",
"function load_value( $value, $post_id, $field )\n\t{\n\t\t// Note: This function can be removed if not used\n\t\treturn $value;\n\t}",
"static function get_default_state();",
"function thrive_customizer_radio_mod( $mod_name = '', $default = '') {\n\n\t$theme_mod_value = get_theme_mod( $mod_name );\n\n\tif ( empty ( $theme_mod_value ) ) {\n\n\t\treturn $default;\n\n\t}\n\n\treturn $theme_mod_value;\n\n}",
"protected function getDefaultValue()\n {\n return new Value( array() );\n }",
"function power_user_meta_default_on( $value, $user_id ) {\n\n\t// If a real value exists, simply return it.\n\tif ( $value ) {\n\t\treturn $value;\n\t}\n\n\t// Get the name of the field by removing the prefix from the active filter.\n\t$field = str_replace( 'get_the_author_', '', current_filter() );\n\n\t// Setup user data.\n\tif ( ! $user_id ) {\n\t\tglobal $authordata;\n\t} else {\n\t\t// phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited -- same pattern used in` get_the_author_meta()\n\t\t$authordata = get_userdata( $user_id );\n\t}\n\n\t// Just in case.\n\t$user_field = \"user_$field\";\n\tif ( isset( $authordata->$user_field ) ) {\n\t\treturn $authordata->user_field;\n\t}\n\n\t// If an empty or false value exists, return it.\n\tif ( isset( $authordata->$field ) ) {\n\t\treturn $value;\n\t}\n\n\t// If all that fails, default to true.\n\treturn 1;\n\n}",
"function setDefault($value)\n {\n $this->_defValue = $value;\n }",
"public function get($id, $default = null)\n\t{\n\t\treturn $this->params[$id] ?? $default;\n\t}",
"public function getJournalTypeDefaultValue() {\n //initialize dummy value.. no content header.pure html\n $sql = null;\n $journalTypeId = null;\n if ($this->getVendor() == self::MYSQL) {\n $sql = \"\n SELECT `journalTypeId`\n FROM `journaltype`\n WHERE `isActive` = 1\n AND `companyId` = '\" . $this->getCompanyId() . \"'\n AND `isDefault` =\t 1\n LIMIT 1\";\n } else\n if ($this->getVendor() == self::MSSQL) {\n $sql = \"\n SELECT TOP 1 [journalTypeId],\n FROM [journalType]\n WHERE [isActive] = 1\n AND [companyId] = '\" . $this->getCompanyId() . \"'\n AND \t [isDefault] = 1\";\n } else\n if ($this->getVendor() == self::ORACLE) {\n $sql = \"\n SELECT JOURNALTYPEID AS \\\"journalTypeId\\\",\n FROM JOURNALTYPE\n WHERE ISACTIVE = 1\n AND COMPANYID = '\" . $this->getCompanyId() . \"'\n AND \t ISDEFAULT\t =\t 1\n AND \t ROWNUM\t =\t 1\";\n } else {\n header('Content-Type:application/json; charset=utf-8');\n echo json_encode(array(\"success\" => false, \"message\" => $this->t['databaseNotFoundMessageLabel']));\n exit();\n }\n\n try {\n $result = $this->q->fast($sql);\n } catch (\\Exception $e) {\n echo json_encode(array(\"success\" => false, \"message\" => $e->getMessage()));\n exit();\n }\n if ($result) {\n $row = $this->q->fetchArray($result);\n $journalTypeId = $row['journalTypeId'];\n }\n return $journalTypeId;\n }",
"protected function compute($recordid, $argument, $default=null) {\n global $CFG, $DB, $USER;\n if ($argument === null && is_string($default)) {\n $argument = (object)array('type' => 'constant',\n 'value' => $default);\n }\n if ($argument === null || is_string($argument)) {\n return $argument;\n }\n if (is_object($argument) && property_exists($argument, 'type')) {\n if ($argument->type == 'function') {\n if (property_exists($argument, 'name') == false || preg_match('/^\\w+$/', $argument->name) == false) {\n return get_string('errorunknownfunction', 'datafield_report', $argument->name);\n }\n if (property_exists($argument, 'arguments') == false || is_array($argument->arguments) == false) {\n return \"Oops, arguments are missing for function $argument->name\";\n }\n $method = 'compute_'.strtolower($argument->name);\n if (method_exists($this, $method)) {\n return $this->$method($recordid, $argument->arguments);\n } else {\n die(get_string('errorunknownfunction', 'datafield_report', $argument->name));\n return get_string('errorunknownfunction', 'datafield_report', $argument->name);\n }\n }\n if ($argument->type == 'string' || $argument->type == 'integer') {\n return $argument->value;\n }\n if ($argument->type == 'constant') {\n switch ($argument->value) {\n\n case 'RECORD_USER':\n if (empty($recordid)) {\n // A new record is being created.\n return optional_param('uid', $USER->id, PARAM_INT);\n }\n return $DB->get_field('data_records', 'userid', array('id' => $recordid));\n\n case 'CURRENT_VALUE':\n $params = array('recordid' => $recordid, 'fieldid' => $this->field->id);\n return $DB->get_field('data_content', 'content', $params);\n\n case 'CURRENT_FIELD':\n return $this->field->id;\n\n case 'CURRENT_USER':\n return $USER->id;\n\n case 'CURRENT_RECORD':\n return $recordid;\n\n case 'CURRENT_RECORDS':\n $params = array('dataid' => $this->data->id, 'userid' => $USER->id);\n return $DB->get_records_menu('data_records', $params, 'id', 'id,userid');\n\n case 'CURRENT_COURSE':\n return $this->data->course;\n\n case 'CURRENT_DATABASE':\n return $this->data->id;\n\n case 'PREVIOUS_DATABASE':\n return $this->find_cm($recordid, array(), -1);\n\n case 'NEXT_DATABASE':\n return $this->find_cm($recordid, array(), 1);\n\n case 'CURRENT_GROUP':\n return groups_get_activity_group($this->cm);\n\n case 'CURRENT_GROUPS':\n $groups = groups_get_activity_allowed_groups($this->cm);\n return array_keys($groups);\n\n case 'CURRENT_USERS':\n return $this->valid_userids();\n\n case 'CURRENT_STUDENTS':\n return array_intersect($this->valid_userids(),\n $this->valid_studentids());\n\n case 'CURRENT_TEACHERS':\n return array_intersect($this->valid_userids(),\n $this->valid_teacherids());\n\n case 'DEFAULT_NAME_FORMAT':\n if (empty($CFG->fullnamedisplay)) {\n $format = '';\n } else {\n $format = $CFG->fullnamedisplay;\n }\n if ($format == '' || $format == 'language') {\n $format = get_string('fullnamedisplay');\n }\n return preg_replace('/\\{\\$a->(\\w+)\\}/', '$1', $format);\n\n default:\n return 'Unknown constant: '.$argument->value;\n }\n }\n return 'Unknown argument type: '.$argument->type;\n }\n return null;\n }",
"public function setUserDefaultStatus($userDefaultStatus);",
"public function get(string $id, mixed $default = null): mixed;",
"protected function get_rest_base( $rest_slug = '', $default_value = '' ) {\n\t\t\t$rest_base_value = null;\n\t\t\tif ( ! empty( $rest_slug ) ) {\n\t\t\t\t$rest_slug .= '_' . $this->version;\n\t\t\t\t$rest_base_value = LearnDash_Settings_Section::get_section_setting( 'LearnDash_Settings_Section_General_REST_API', $rest_slug, $default_value );\n\t\t\t}\n\n\t\t\tif ( is_null( $rest_base_value ) ) {\n\t\t\t\t$rest_base_value = $default_value;\n\t\t\t}\n\n\t\t\treturn $rest_base_value;\n\t\t}",
"public function setDefault($id)\n {\n $company = app('app_user')->member->company;\n CompanyPaymentMethod::where('company_id', $company->id)->update(['is_default' => 0]);\n $data = ['is_default' => true];\n $company_payment_method = $this->update($id, $data);\n\n // update record in stripe\n $stripe_customer = \\Stripe\\Customer::retrieve($company->stripe_customer_id);\n $stripe_customer->default_source = $company_payment_method->stripe_source_id;\n $stripe_customer->save();\n\n return $company_payment_method;\n }"
] | [
"0.608201",
"0.608201",
"0.60247",
"0.6024106",
"0.58687603",
"0.58345205",
"0.5822871",
"0.561045",
"0.5571496",
"0.5551484",
"0.5543126",
"0.5433066",
"0.54206157",
"0.53860533",
"0.5348922",
"0.5331395",
"0.5321716",
"0.5308049",
"0.5298644",
"0.52762187",
"0.5266832",
"0.5260088",
"0.52453655",
"0.52372116",
"0.52100027",
"0.5207108",
"0.5183266",
"0.517457",
"0.5147013",
"0.51459",
"0.512725",
"0.5103819",
"0.5096375",
"0.50672114",
"0.50614756",
"0.5052685",
"0.50395286",
"0.50369096",
"0.50332946",
"0.5029522",
"0.50048774",
"0.49892667",
"0.49832886",
"0.49830568",
"0.4981194",
"0.4977644",
"0.4977644",
"0.49616095",
"0.49595398",
"0.4956725",
"0.4955931",
"0.49502704",
"0.49487102",
"0.4938342",
"0.4917003",
"0.49152133",
"0.49017134",
"0.49015054",
"0.48963985",
"0.48917568",
"0.4889451",
"0.48853827",
"0.4881593",
"0.4867623",
"0.485442",
"0.48530915",
"0.4846644",
"0.48464948",
"0.4843446",
"0.48406082",
"0.48380616",
"0.48348284",
"0.48347944",
"0.48320183",
"0.4828745",
"0.48282045",
"0.48210484",
"0.48145843",
"0.48102182",
"0.4794494",
"0.47911826",
"0.4790777",
"0.47878692",
"0.47806427",
"0.47802463",
"0.47720578",
"0.47633967",
"0.4740778",
"0.47384354",
"0.47371146",
"0.47317553",
"0.47313988",
"0.47193408",
"0.47178638",
"0.47169575",
"0.4715339",
"0.47144935",
"0.47110218",
"0.47026148",
"0.4677945"
] | 0.5750242 | 7 |
Retrieves the collection of ReflectionProperties for the object. | public static function ofThe(object $object): self
{
$theClass = theClassOfThe($object);
if (!alreadyCached($theClass, ReflectionProperties::$cache)) {
$reflection = new ReflectionObject($object);
$properties = [];
$level = 0;
do {
$properties = self::addTo($properties, $level, $reflection);
++$level;
$reflection = $reflection->getParentClass();
} while($reflection);
ReflectionProperties::$cache[$theClass] = new self(...$properties);
}
return ReflectionProperties::$cache[$theClass];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getReflectionProperties($object)\n {\n return self::getReflectionClass($object)->getProperties();\n }",
"protected function getReflectedProperties()\n {\n if (is_null($this->_ReflectedPropertiesCache)) {\n $this->_ReflectedPropertiesCache = array();\n\n $refectionClass = new ReflectionClass($this);\n $propertiesArray = $refectionClass->getProperties();\n if (is_array($propertiesArray) and count($propertiesArray) > 0) {\n while (list(, $property) = each($propertiesArray)) {\n $refectionProperty = new ReflectionProperty($property->class, $property->name);\n if ($refectionProperty->isPublic() || $refectionProperty->isProtected()) {\n $this->_ReflectedPropertiesCache[] = $property->name;\n }\n }\n }\n }\n\n return $this->_ReflectedPropertiesCache;\n }",
"public function getProperties(): Collection\n {\n return collection($this->reflectionObject->getImmediateProperties())->map(function (ReflectionProperty $property) {\n return new PropertyEntity($property);\n });\n }",
"public function getProperties($object): array\n {\n if (!is_object($object)) {\n return [];\n }\n\n $reflectedClass = new \\ReflectionClass($object);\n $classProperties = $this->getClassProperties($reflectedClass);\n\n // Also get (private) variables from parent class.\n $privateProperties = [];\n while ($reflectedClass = $reflectedClass->getParentClass()) {\n $privateProperties[] = $this->getClassProperties($reflectedClass, static::GET_ONLY_PRIVATES);\n }\n\n return array_merge($classProperties, ...$privateProperties);\n }",
"private static function getProperties($object) {\n\t\t$properties = array();\n\t\ttry {\n\t\t\t$reflect = new \\ReflectionClass(get_class($object));\n\t\t\tforeach ($reflect->getProperties(\\ReflectionProperty::IS_PUBLIC) as $property) {\n\t\t\t\t$properties[$property->getName()] = $property->getValue($object);\n\t\t\t}\n\t\t} catch (\\ReflectionException $ex) {\n\t\t\tErrorHandler::logException($ex);\n\t\t}\n\t\treturn $properties;\n\t}",
"public function properties()\r\n {\r\n $props = $this->class->getProperties();\r\n \r\n sort( $props );\r\n \r\n foreach ( $props as $key => $property )\r\n {\r\n // Only show public properties, because Reflection can't get the private ones\n if ( $property->isPublic() )\r\n {\r\n $props[$key] = new Docs_Property( $this->class->name, $property->name );\r\n }\r\n else\r\n {\r\n unset( $props[$key] );\r\n }\r\n }\r\n \r\n return $props;\r\n }",
"public static function getProperties($object, $filter = null){\r\n\r\n if(!is_object($object)){\r\n throw new \\RuntimeException(sprintf('Obj::getProperties() expects parameter 1 to be object, %s given', gettype($object)));\r\n }\r\n \r\n if(is_null($filter)){\r\n $filter = \\ReflectionProperty::IS_PUBLIC | \r\n \\ReflectionProperty::IS_PROTECTED | \r\n \\ReflectionProperty::IS_PRIVATE |\r\n \\ReflectionProperty::IS_STATIC;\r\n }\r\n \r\n $refClass = new \\ReflectionObject($object);\r\n $properties = $refClass->getProperties($filter);\r\n $array = array();\r\n\r\n foreach($properties as $property){\r\n $property->setAccessible(true);\r\n $array[$property->getName()] = $property->getValue($object);\r\n }\r\n return $array;\r\n }",
"public function getProperties()\n {\n $class = get_called_class();\n $reflection = new \\ReflectionClass($class);\n $members = array_keys($reflection->getdefaultProperties());\n return $members;\n }",
"public function getProperties()\n {\n return get_object_vars($this);\n }",
"public function get_properties()\r\n\t{\r\n\t\treturn get_object_vars($this);\r\n\t}",
"public function getAllProperties(): array\n {\n return get_object_vars($this);\n }",
"public function getProperties(): CollectionInterface\n {\n return $this->properties;\n }",
"public function reflections()\n {\n return $this->_reflections;\n }",
"protected function properties()\n {\n // return get_object_vars($this);\n\n $properties = array();\n foreach (self::$db_table_fields as $db_field) {\n if (property_exists($this, $db_field)) {\n $properties[$db_field] = $this->$db_field;\n }\n }\n\n return $properties;\n }",
"protected function properties()\n {\n // return get_object_vars($this);\n\n $properties = array();\n foreach (self::$db_table_fields as $db_field) {\n if (property_exists($this, $db_field)) {\n $properties[$db_field] = $this->$db_field;\n }\n }\n\n return $properties;\n }",
"public function getProperties()\n {\n return $this->_propDict;\n }",
"public function getProperties()\n {\n return $this->_propDict;\n }",
"public function getProperties(): array\n {\n return array_keys(get_object_vars($this));\n }",
"public function getPropertiesAnnotations()\n {\n if (is_object($this->_propertyAnnotations) === false) {\n if (isset($this->_reflectionData['properties']) === true) {\n $this->_propertyAnnotations = array();\n if (empty($this->_reflectionData['properties']) === false) {\n foreach ($this->_reflectionData['properties'] as $property => $reflectionProperty) {\n $collection = new Collection($reflectionProperty);\n $this->_propertyAnnotations[$property] = $collection;\n }\n\n return $this->_propertyAnnotations;\n }\n }\n\n $this->_propertyAnnotations = false;\n return false;\n }\n\n return $this->_propertyAnnotations;\n }",
"public static function getProperties()\n {\n return static::$properties;\n }",
"public function getProperties() {\n\t\treturn $this->_properties;\n\t}",
"protected function getProperties($obj)\n {\n $class = new ReflectionClass(get_class($obj));\n $properties = $class->getProperties();\n $propertyArray = array();\n\n foreach ($properties as $property)\n {\n $pos1 = strpos($property, \"$\");\n $tmp = substr($property, $pos1 + 1);\n $pos2 = strpos($tmp, \" \");\n $propertyName = substr($tmp, 0, $pos2);\n if ($propertyName != '_entityMap'\n && $propertyName != '_entityKey'\n && $propertyName != '_baseURI'\n && $propertyName != '_relLinks'\n && $propertyName != '_objectID')\n {\n $propertyArray[] = $propertyName;\n }\n }\n return $propertyArray;\n }",
"public function getProperties()\r\n\t{\r\n\t\treturn $this->_properties;\r\n\t}",
"public function getProperties(): PropertyCollection;",
"public function getProperties()\n {\n return $this->properties;\n }",
"public function getProperties()\n {\n return $this->properties;\n }",
"public function getProperties()\n {\n return $this->properties;\n }",
"public function getProperties()\n {\n return $this->properties;\n }",
"public function getProperties()\n {\n return $this->properties;\n }",
"public function getProperties()\n {\n return $this->properties;\n }",
"public function getProperties()\n {\n return $this->properties;\n }",
"public function getProperties()\n {\n return $this->properties;\n }",
"public function getProperties()\n {\n return $this->properties;\n }",
"public function getProperties()\n {\n return $this->properties;\n }",
"public function getProperties()\n {\n return $this->properties;\n }",
"public function getProperties()\n {\n return $this->properties;\n }",
"public static function getProperties()\n\t\t{\n\t\t\treturn self::$properties;\n\t\t}",
"public function getProperties()\n\t{\n\t\treturn $this->_properties;\n\t}",
"public function getProperties($filter = -1): array\n {\n return \\array_map(\n function (\\ReflectionProperty $property) {\n return new ReflectionProperty($property->class, $property->name);\n },\n parent::getProperties($filter)\n );\n }",
"public function get_properties(): array {\n\t\t$properties = array();\n\n\t\tforeach ( $this->properties as $key => $property ) {\n\t\t\tif ( self::REF__KEY === $key ) {\n\t\t\t\t$properties = array_merge( $properties, $property->get_properties() );\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$properties[ $key ] = $property;\n\t\t}\n\n\t\treturn $properties;\n\t}",
"public static function getProperties() : array {\r\n return self::$properties;\r\n }",
"public function getProperties() {}",
"public function getProperties() {}",
"public function getProperties() {}",
"public function getProperties() {}",
"public function getProperties(): array\n {\n return $this->properties;\n }",
"public function properties() {\n return array_keys($this->propertyDefs());\n }",
"public function getProperties() {\n return array_keys($this->_properties);\n }",
"public function getProperties();",
"public function getProperties();",
"public function getProperties();",
"public function getProperties();",
"public function getProperties() {\n if (is_array($this->_props)) {\n return $this->_props;\n } else {\n return array();\n }\n }",
"public function getProperties() {\n $modifiable_properties = [];\n $fields = $this->getFields();\n foreach (Framework::instance()->entityProperties($this->getEntity()) as $property => $info) {\n if (!in_array($property, array_keys($fields)) && $this->filter($property)) {\n $this->addModifier($modifiable_properties, 'property', $property);\n }\n }\n return $modifiable_properties;\n }",
"protected function getPublicProperties() {\n\t\t$getPublicProperties = function($obj) { return get_object_vars($obj); };\n\t\treturn $getPublicProperties($this);\n\t}",
"public function properties()\n {\n // Fetch all properties existing in the database\n $properties = Property::all();\n\n // return list of properties;\n return $properties;\n\n }",
"public function properties()\n\t{\n\t\treturn $this->properties;\n\t}",
"public function _getProperties() {}",
"private function getProperties($className)\n {\n $classInfos = $this->getClassInfos($className);\n\n return $classInfos->{'hydra:supportedProperty'} ?? [];\n }",
"public function getProperties(): array {\n\t\treturn array_keys($this->properties);\n\t}",
"private function possibleFieldsReflections(object $resource): array\n {\n $objRef = new ReflectionObject($resource);\n\n return array_merge(\n [$objRef],\n $objRef->getMethods(ReflectionMethod::IS_STATIC | ReflectionMethod::IS_PUBLIC),\n $objRef->getProperties(ReflectionProperty::IS_STATIC | ReflectionProperty::IS_PUBLIC),\n );\n }",
"protected function properties(){\n //return get_object_vars($this);\n $properties = array();\n //foreach(self::$db_table_fields as $db_field){\n foreach(static::$db_table_fields as $db_field){\n if(property_exists($this, $db_field)){\n \n $properties[$db_field] = $this->$db_field;\n }\n }\n return $properties;\n\n }",
"protected function getAllProperties(ReflectionClass $reflectionClass): array\n {\n $properties = $reflectionClass->getProperties();\n $parentClass = $reflectionClass->getParentClass();\n\n if ($parentClass) {\n $parentProperties = $this->getAllProperties($parentClass);\n\n $properties = array_merge($properties, $parentProperties);\n }\n\n return $properties;\n }",
"public function getProperties()\n {\n return $this->getProperty();\n }",
"private function getClassProperties(\\ReflectionClass $reflectedClass, bool $onlyPrivates = false): array\n {\n if ($onlyPrivates) {\n return $reflectedClass->getProperties(\\ReflectionProperty::IS_PRIVATE);\n }\n\n return $reflectedClass->getProperties(\n \\ReflectionProperty::IS_PUBLIC |\n \\ReflectionProperty::IS_PROTECTED |\n \\ReflectionProperty::IS_PRIVATE\n );\n }",
"public function &getProperties($includePrimaryKey = false)\n\t{\n\t\t$pk =& $this->primaryKey;\n\t\t$props = array();\n\t\t\n\t\tforeach($this->__reflection()->getProperties() as $prop) {\n\t\t\tif($prop->isPublic() && !$prop->isStatic()) {\n\t\t\t\t$name = $prop->getName();\n\t\t\t\tif(!$includePrimaryKey && $name == $pk)\n\t\t\t\t\tcontinue;\n\t\t\t\t$props[$name] =& $this->$name;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $props;\n\t}",
"public function properties() : array\n {\n return array_keys($this->_properties);\n }",
"public static function getProperties()\n {\n return [\n 'id' => [true, self::PROPERTY_TYPE_STRING, null, false, false],\n 'endDate' => [false, self::PROPERTY_TYPE_DATE, null, false, false],\n 'startDate' => [true, self::PROPERTY_TYPE_DATE, null, false, false],\n 'status' => [true, self::PROPERTY_TYPE_ENUM, null, false, false],\n 'price' => [true, self::PROPERTY_TYPE_OBJECT, '\\\\Price', false, false],\n 'product' => [true, self::PROPERTY_TYPE_OBJECT, '\\\\Product', false, false],\n ];\n }",
"public function jsonSerialize()\n {\n $class = new ReflectionClass($this);\n $properties = $class->getProperties();\n $results = [];\n foreach ($properties as $property) {\n $propertyName = $property->getName();\n // Build getter method of the property\n $getter = 'get' . join(\n '', array_map('ucfirst', explode('_', $propertyName))\n );\n if (method_exists($this, $getter)) {\n $results[$property->getName()] = $this->$getter();\n }\n }\n return $results;\n }",
"public function getProperties()\n {\n return array_keys($this->toArray());\n }",
"public function getProperties(): array\n {\n $properties = $this->properties;\n\n $typeRequiredProperties = $this->type->getRequiredProperties();\n\n if ($typeRequiredProperties) {\n $properties = array_intersect_key(\n $properties,\n array_flip(array_merge($this->requiredProperties, $typeRequiredProperties))\n );\n }\n\n // Append the control information prefix to the metadata keys\n $requestedODataVersion = (string) $this->type->getVersion();\n\n $result = [];\n\n foreach ($properties as $key => $value) {\n if (version_compare('4.0', $requestedODataVersion, '=')) {\n $result[$this->prefix.'@odata.'.$key] = $value;\n } else {\n $result[$this->prefix.'@'.$key] = $value;\n }\n }\n\n return $result;\n }",
"public static function getReflectionMethods($object)\n {\n return self::getReflectionClass($object)->getMethods();\n }",
"public function getProperties() {\n if ($this->properties === null) {\n // try to get from cache\n $cacheKey = \"document_properties_\" . $this->getId();\n $properties = Cache::load($cacheKey);\n if (!is_array($properties)) {\n $properties = $this->getResource()->getProperties();\n $elementCacheTag = $this->getCacheTag();\n $cacheTags = array(\"document_properties\" => \"document_properties\", $elementCacheTag => $elementCacheTag);\n Cache::save($properties, $cacheKey, $cacheTags);\n }\n\n $this->setProperties($properties);\n }\n return $this->properties;\n }",
"function get_properties()\r\n {\r\n return $this->properties;\r\n }",
"public static function getProperties()\n {\n return [\n 'Type' => [false, self::PROPERTY_TYPE_ENUM, null, false, false],\n 'Name' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'ABN' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'BSB' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'AccountNumber' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'AccountName' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'ElectronicServiceAddress' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'SuperFundID' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'EmployerNumber' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'SPIN' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n ];\n }",
"public function getProperties($objectId, $options = array ()) {\n\t\t// May need to set the options array default -- \n\t\treturn $this->getObject($objectId, $options);\n\t}",
"public function __debugInfo()\n {\n $properties = $this->_properties;\n foreach ($this->_virtual as $field) {\n $properties[$field] = $this->$field;\n }\n\n return $properties;\n }",
"public function getProperties()\n {\n $vars = get_object_vars($this);\n\n foreach ($vars as $key => $value) {\n if (strcmp(\"db\", $key) == 0) {\n unset($vars[$key]);\n break;\n }\n }\n\n return $vars;\n }",
"public function getReflectionData()\n {\n return $this->_reflectionData;\n }",
"public function getProperties() : array;",
"public function collection()\n\t{\n\t\t$properties = Property::PropertyReport($this->request)->get();\n\t\treturn $properties;\n\t}",
"public function getObjectDescriptors()\n {\n return $this->getObjectManager()->getObjectDescriptors();\n }",
"public function getCachedProperties() {\n return $this->cachedProperties ?? [];\n }",
"public function getPropertiesDescription(): static\n {\n foreach ($this->attributes as $class => $methods) {\n $reflectionMethod = new ReflectionClass($class);\n foreach ($reflectionMethod->getProperties() as $property) {\n $attributes = $this->getAttributesDescription($property);\n if (count($attributes) > 0) {\n $this->attributes[$class]['properties'][$property->getName()] = $attributes;\n }\n }\n }\n\n return $this;\n }",
"protected function properties(){\n\t\t$properties = array();\n\t\tforeach(static::$db_table_fields as $db_field){\n\t\t\tif(property_exists($this,$db_field)){\n\t\t\t$properties[$db_field]= $this->$db_field;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $properties;\t\n\t}",
"public function Properties($visible=true){\r\n $reflection=new ReflectionClass($this);\r\n $properties=$reflection->getProperties();\r\n $result=array();\r\n if($visible){\r\n foreach ($properties as $property) {\r\n $result[$property->getName()]=$property->getValue($this);\r\n }\r\n }\r\n else{\r\n foreach ($properties as $property) {\r\n $result[]=$property->getName();\r\n }\r\n }\r\n return $result;\r\n }",
"public function getProperties($public = true)\n {\n $vars = get_object_vars($this);\n\n if ($public) {\n foreach ($vars as $key => $value) {\n if ('_' == substr($key, 0, 1)) {\n unset($vars[$key]);\n }\n }\n }\n\n return $vars;\n }",
"public function getProperties(): array;",
"public function getProperties(): array;",
"public function getAttributesFromClass($object): array\n {\n return get_object_vars($object);\n }",
"private function findAllInstanceProperties(?ReflectionClass $class = null): array\n {\n if ($class === null) {\n return [];\n }\n\n return array_merge(\n $this->findAllInstanceProperties($class->getParentClass() ?: null), // of course PHP is shit.\n array_filter(\n $class->getProperties(),\n static function (ReflectionProperty $property): bool {\n return !$property->isStatic();\n }\n )\n );\n }",
"public function getInjectProperties() {}",
"public function getPropertiesList() : array;",
"public function inspect()\n\t\t{\n\t\t\t$reflector = new \\ReflectionObject($this);\n\t\t\t$properties = $reflector->getProperties();\n\t\t\t$methods = $reflector->getMethods();\n\t\t\t$name = $reflector->getName();\n\n\t\t\treturn [\n\t\t\t\t$name => [\n\t\t\t\t\t'properties' => $properties,\n\t\t\t\t\t'methods' => $methods\n\t\t\t\t]\n\t\t\t];\n\t\t}",
"function dismount($object) {\n $reflectionClass = new \\ReflectionClass(get_class($object));\n $array = array();\n foreach ($reflectionClass->getProperties() as $property) {\n $property->setAccessible(true);\n $array[$property->getName()] = $property->getValue($object);\n $property->setAccessible(false);\n }\n return $array;\n }",
"public function visibleProperties()\n {\n return array_keys($this->_properties);\n }",
"public function getProperties(): array\n {\n return $this->propertyRepository->findEnabledByChannel($this->channelContext->getChannel());\n }",
"function _getProperties() ;",
"public function getDeclaredPropertyDefinitions()\n {\n return is_null($this->declaredPropertyDefinitions) ? null : $this->declaredPropertyDefinitions->getArrayCopy();\n }",
"function getProperties($public = true) {\n\t\t$vars = get_object_vars ( $this );\n\n\t\tif ($public) {\n\t\t\tforeach ( $vars as $key => $value ) {\n\t\t\t\tif ('_' == substr ( $key, 0, 1 )) {\n\t\t\t\t\tunset ( $vars [$key] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $vars;\n\t}",
"abstract protected function getProperties();"
] | [
"0.7943348",
"0.79229677",
"0.7331014",
"0.7136801",
"0.711634",
"0.6825437",
"0.6774929",
"0.67694074",
"0.6713741",
"0.6633608",
"0.65743434",
"0.6465461",
"0.64167017",
"0.64146894",
"0.64146894",
"0.64107394",
"0.64107394",
"0.63095707",
"0.6307349",
"0.6272798",
"0.6254207",
"0.6252285",
"0.62451583",
"0.62206274",
"0.6214372",
"0.6214372",
"0.6214372",
"0.6214372",
"0.6214372",
"0.6214372",
"0.6214372",
"0.6214372",
"0.6214372",
"0.6214372",
"0.6214372",
"0.6214372",
"0.6196461",
"0.61828005",
"0.6163358",
"0.6154111",
"0.6145589",
"0.61428183",
"0.61398053",
"0.61398053",
"0.61398053",
"0.61138713",
"0.6113103",
"0.6088325",
"0.60828453",
"0.60828453",
"0.60828453",
"0.60828453",
"0.60744756",
"0.6025557",
"0.6018726",
"0.6008972",
"0.5935152",
"0.59320265",
"0.5916061",
"0.5907971",
"0.5878416",
"0.58630633",
"0.58571",
"0.5831244",
"0.5824071",
"0.57911205",
"0.57743526",
"0.57599795",
"0.5756923",
"0.57337743",
"0.57259333",
"0.56959105",
"0.56714714",
"0.56609875",
"0.5641564",
"0.56230706",
"0.5611997",
"0.5609615",
"0.55960023",
"0.5562402",
"0.55163276",
"0.55162245",
"0.55018145",
"0.5489216",
"0.54791296",
"0.5478754",
"0.54500586",
"0.5435893",
"0.5435893",
"0.54290867",
"0.54229933",
"0.5420681",
"0.54193306",
"0.54144883",
"0.5413297",
"0.53838664",
"0.5381247",
"0.53780776",
"0.53306973",
"0.5329169",
"0.5320223"
] | 0.0 | -1 |
Handle error to exception. | public static function handle()
{
set_error_handler([ErrorHandler::class, 'errorToException'], E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED & ~E_USER_DEPRECATED);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function handleError(\\Exception $e);",
"public function handle(\\Exception $error);",
"public function handleException($exception);",
"public function handle_error() {\n $last_operation = $this->add_last_operation;\n $data = array(\n 'function_name' => is_array($last_operation[0]) ? $last_operation[0][1] : $last_operation[0],\n 'function_name_complete' => is_array($last_operation[0]) ? (is_string($last_operation[0][0]) ? $last_operation[0][0].':' : get_class($last_operation[0][0]).'->').$last_operation[0][1] : $last_operation[0],\n 'args' => $last_operation[1]\n );\n\n switch (strtolower($data['function_name'])) {\n case 'autoexecute':\n $data['table'] = $data['args'][0];\n $data['fields'] = $data['args'][1];\n $data['operation'] = $data['args'][2];\n break;\n }\n\n $data['debug'] = $last_operation;\n if (class_exists('e_database'))\n throw new e_database($this->adodb->ErrorMsg(),$data,$this->adodb->ErrorNo());\n else\n throw new Exception($this->adodb->ErrorMsg(),$this->adodb->ErrorNo());\n }",
"public function error()\n {\n throw new Exception('Something went wrong!');\n }",
"function exception_error_handler($errno, $errstr, $errfile, $errline ) {\n throw new \\ErrorException($errstr, 0, $errno, $errfile, $errline);\n}",
"public static function handleException($exception) {\n\t\t$error = new Error(\n\t\t\tError::ERROR, $exception->getCode(),\n\t\t\t$exception->getMessage(), $exception->getFile(),\n\t\t\t$exception->getLine()\n\t\t);\n\n\t\tself::onError($error);\n\t}",
"abstract public function handleFatalError($e);",
"function handle_error($exception) {\n try {\n print $this->encode(array(\n 'error' => $exception->getMessage(),\n 'message' => $exception->getMessage(), // Should be a i18n end user message\n 'data' => @$exception->data,\n 'status' => @$exception->status\n ));\n } catch(Exception $e) {\n echo 'Error: '.$e->getmessage();\n }\n }",
"public function handle() {\n throw new Exception(\"This is a test exception.\");\n }",
"function as_exception_handler($e){\n\t\t$msg = 'Error('.$e->getCode().') '. $e->getMessage().' in '. $e->getFile().':'. $e->getLine();\n\t\t$this->catch_error($msg, 'clickgs plugin crashed');\n\t}",
"private function handleException($e)\n {\n // TODO: test coverage\n if ($e instanceof ClientException) {\n // will catch all 4xx errors\n if ($e->getResponse()->getStatusCode() == 403) {\n throw new AuthenticationException(\n $this->apiKey,\n $this->apiSecret,\n null,\n $e\n );\n } else {\n throw new DomainException(\n 'The OpenTok API request failed: ' . json_decode($e->getResponse()->getBody(true))->message,\n null,\n $e\n );\n }\n } else if ($e instanceof ServerException) {\n // will catch all 5xx errors\n throw new UnexpectedValueException(\n 'The OpenTok API server responded with an error: ' . json_decode($e->getResponse()->getBody(true))->message,\n null,\n $e\n );\n } else {\n // TODO: check if this works because Exception is an interface not a class\n throw new Exception('An unexpected error occurred');\n }\n }",
"public function handleException(\\Exception $exception): void;",
"function exception_error_handler( $errno, $errstr, $errfile, $errline ) {\n throw new ErrorException( $errstr, $errno, 0, $errfile, $errline );\n}",
"function error_handler($errno, $string, $file, $line, $context) {\n throw new Trails_Exception(500, $string);\n }",
"function exception_error_handler($errno, $errstr, $errfile, $errline ) {\n throw new ErrorException($errstr, 0, $errno, $errfile, $errline);\n}",
"private function handleException(\\Exception $exception)\n {\n $contents = json_decode($exception->getResponse()->getBody()->getContents());\n\n $errors = $contents->errors ?? [];\n\n foreach ($errors as $key => $error) {\n $errors[$key] = $error->code . ': ' . $error->message;\n }\n\n $this->api->setErrors($errors);\n }",
"public function getException();",
"protected function onHandleError($exception)\n {\n $message = $exception->getMessage();\n Yii::log($message, CLogger::LEVEL_ERROR);\n throw $exception;\n }",
"public static function handleException($exception) {\n $file = $exception->getFile();\n $line = $exception->getLine();\n $errMessage = $exception->getMessage();\n $trace = $exception->getTraceAsString();\n $error = \"$file:$line $errMessage $trace\";\n $logger = Container::getService('Logger');\n $logger->excpt($error);\n self::sendError($errMessage);\n exit;\n }",
"public static function handle_exception($e) {\n\t\tswitch ( get_class($e) ) {\n\t\t\tcase 'NumbatDBError':\n\t\t\tcase 'PDOException':\n\t\t\t\t$type = 'db';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$type = 'uncaught';\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$config = array();\n\t\tif($type == 'db' && get_class($e) == 'NumbatDBError')\n\t\t\t$config = $e->getConfig();\n\n\t\tnumbat_primative_die($e->getMessage(), $type, $config);\n\t}",
"public function handleException($exception)\n {\n //if application is on production keep silent\n if (\\App::environment('production'))\n \\Log::error($exception->getMessage());\n\n //Eloquent Model Exception\n else if ($exception instanceof ModelNotFoundException)\n throw new ModelNotFoundException($exception->getMessage());\n\n //DB Error\n else if ($exception instanceof PDOException)\n throw new PDOException($exception->getMessage());\n\n else if ($exception instanceof BadMethodCallException)\n throw new BadMethodCallException($exception->getMessage());\n\n //Through general Exception\n else\n throw new Exception($exception->getMessage());\n\n }",
"function exception_handler($ex) {\n // now let the plugin send the exception to client\n $this->send_error($ex);\n // not much else we can do now, add some logging later\n exit(1);\n }",
"protected function handleException(\\Exception $e)\n {\n if ($cb = $this->errorHandler) {\n $cb($e);\n }\n }",
"public function apply(Exception $ex);",
"function error_handler ($errno, $error, $file, $line)\r\n{\r\n\tthrow new Error ($error . sprintf (' (%s %u)', $file, $line));\r\n}",
"function rescue($exception) {\n return $this->dispatcher->trails_error($exception);\n }",
"protected function initializeErrorHandling() {}",
"private function handleException($e) \n {\n $res = json_encode(\n [ 'error' => $e->getResponse()->getReasonPhrase() ]\n );\n\n return $this->decode($res);\n }",
"function as_error_handler($errno, $errstr, $errfile, $errline){\n\t\t$msg = 'Error('.$errno.') '.$errstr.' in '. $errfile.':'. $errline;\n\t\t$this->catch_error( $msg, 'clickgs plugin crashed');\n\t}",
"public function handleException(\\Throwable $exception) : void\n {\n throw $exception;\n }",
"public function handleException(Exception $exception)\n {\n newrelic_notice_error($exception->getMessage(), $exception);\n }",
"public function _handleException($e)\n\t{\n\t\tif(!$this->_inError && $handler = $this->_application->errorHandler())\n\t\t{\n\t\t\t$this->_inError = true;\n\t\t\t$handler->handle($e);\n\t\t\t$this->_inError = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(php_sapi_name() == 'cli')\n\t\t\t{\n\t\t\t\techo $e->__toString();\n\t\t\t\texit(1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\theader('HTTP/1.1 500 Internal Server Error');\n\n\t\t\t\techo \"<h1>Error: \".$e->getMessage().'</h1>';\n\t\t\t\techo '<pre>'.$e->__toString().'</pre>';\n\t\t\t\texit(1);\n\t\t\t}\n\t\t}\n\t}",
"private function processException($exception)\n {\n $response = $exception->getResponse();\n $statusCode = isset($response) ? $response->getStatusCode() : null;\n\n throw new ApiException(\n sprintf('[%d] Error connecting to the API (%s); Message: (%s)', $statusCode, $exception->getRequest()->getUri(), $exception->getMessage()), $statusCode\n );\n }",
"protected function executeActionWithErrorHandling() {\n \n }",
"protected function handleException(Exception $e)\n\t{\n\t\t// use it's toArray function to ger all errors\n\t\tif( $e instanceOf CongraphException )\n\t\t{\n\t\t\treturn $this->handleCongraphException($e);\n\t\t}\n\n\t\t// if it's some other exception return 500 error from exception\n\t\treturn $this->handleGenericException($e);\n\t}",
"function handleError($errno, $errstr, $errfile, $errline, array $errcontext)\n{\n // error was suppressed with the @-operator\n if (0 === error_reporting()) {\n return false;\n }\n\n throw new ErrorException($errstr, 0, $errno, $errfile, $errline);\n}",
"public function exception_handler( $error_message, $error_type, $exception ) {\n\n\t\t// Let's do different things, based on the type of the error\n\n\t\tif ( $exception instanceof ActiveRecordValidationException ) {\n\t\t\t// Grab our validation errors from our exception\n\t\t\t$error_data = $exception->get_errors( true );\n\n\t\t\t$verbose_exception = new InvalidApiParameters( $exception->getMessage(), null, $exception );\n\t\t\t$verbose_exception->set_more_info( $error_data );\n\n\t\t\t// Handle the rest with our parent. :)\n\t\t\tparent::exception_handler(\n\t\t\t\t$verbose_exception->getMessage(),\n\t\t\t\tget_class( $verbose_exception ),\n\t\t\t\t$verbose_exception\n\t\t\t);\n\t\t}\n\t\telseif ( $exception instanceof RedisConnectionException ) {\n\t\t\t// Let's handle the exception gracefully\n\t\t\t$this->app->abort( 502, 'REDIS_EXCEPTION', $exception->getMessage() );\n\t\t}\n\t\telseif ( $exception instanceof HTTPBasicUnauthorized ) {\n\t\t\t// Grab our \"realm\"\n\t\t\t$realm = $this->config[ 'app-meta' ][ 'app_url' ];\n\n\t\t\t// Tell the device/consumer that they must pass auth data\n\t\t\t$this->response->header( 'WWW-Authenticate', 'Basic realm=\"' . $realm . '\"' );\n\n\t\t\t// Handle the rest with our parent. :)\n\t\t\tparent::exception_handler( $error_message, $error_type, $exception );\n\t\t}\n\t\t// Any other exceptions\n\t\telse {\n\t\t\tparent::exception_handler( $error_message, $error_type, $exception );\n\t\t}\n\t}",
"public function handleException(Exception $e)\n {\n watchdog('Award Force API', $e->getMessage(), array(), WATCHDOG_ERROR);\n\n exit(t('An error has occurred. Please try again, and if the problem persists, contact the system administrator.'));\n }",
"public function error(Connection $connection, Exception $exception);",
"protected function error()\n {\n $this->response = $this->response->withStatus(500);\n $this->jsonBody([\n 'input' => $this->payload->getInput(),\n 'error' => $this->payload->getOutput(),\n ]);\n }",
"public function setErrorFromException(\\Exception $exception)\n {\n $this->error = $exception->__toString();\n }",
"protected function manageError( string $message )\n {\n $this->logger->error($message);\n throw new \\Exception($message);\n }",
"function handle_error($errno, $error){\r\n $res = new Result('array');\r\n $res->error_number = $errno;\r\n $res->error_desc = $error;\r\n $res->print_result();\r\n Logger::close();\r\n die;\r\n}",
"function exceptionCatcher($exception) {\n\tstopForError($exception->getMessage(), $exception->getCode(), $exception->getFile(), $exception->getLine(), $exception->getTraceAsString());\n}",
"public static function exception_handler($exception) { \n ResponseFactory::send($exception->getMessage()); //Send exception message as response.\n }",
"protected function handle_exception($exception) {\n $this->redis_connected = false;\n\n // When Redis is unavailable, fall back to the internal cache by forcing all groups to be \"no redis\" groups\n $this->ignored_groups = array_unique(array_merge($this->ignored_groups, $this->global_groups));\n\n if (! $this->fail_gracefully) {\n throw $exception;\n }\n\n error_log($exception);\n\n if (function_exists('do_action')) {\n do_action('redis_object_cache_error', $exception);\n }\n }",
"function error(){}",
"private function error($response) {\n\t\tif(property_exists($response, \"error\") AND $response->code != 200) {\n\t\t\tthrow new MystoreAPI_exception(\"Error \".$response->code.\"<br />\".$response->error->message);\n\t\t}\n\t}",
"function myErrorHandler($errno, $errstr, $errfile, $errline) {\n throw new ErrorException($errstr, 0, $errno, $errfile, $errline);\n}",
"function errorHandler($errno,$errstr){\n\t global $errors;\n\n\t raiseError(\"We are working to solve an internal issue in our service. Please, try later.\", Constants::HTTP_INTERNAL_SERVER_ERROR);\n\t}",
"function handleException(Exception $ex)\n{\n\techo \"There was an error: {$ex}\";\n}",
"private function throwException()\n {\n throw new CacheException(\\odbc_errormsg(), (int) \\odbc_error());\n }",
"private function _handleError($result, $method)\n {\n if ($this->errorCode() != '00000')\n throw new \\Exception(\"Error: \" . implode(',', $this->errorInfo()));\n \n if ($result === false) \n {\n echo $this->errorInfo();\n $error = $method . \" did not execute properly\";\n throw new \\Exception($error);\n }\n }",
"public function _handleError($errno, $errstr, $errfile, $errline, $context=null)\n\t{\n\t\t// process errors based on the error reporting settings\n\t\tif (error_reporting() & $errno)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// bit of a hack to consolidate errors to exceptions\n\t\t\t\t$message = $this->_errorNumberString($errno).': '.$errstr;\n\t\t\t\tthrow new \\ErrorException($message,0,$errno,$errfile,$errline);\n\t\t\t}\n\t\t\tcatch(\\ErrorException $e)\n\t\t\t{\n\t\t\t\t$this->_handleException($e);\n\t\t\t}\n\t\t}\n\t}",
"function handler($ex) {\n echo \"In exception handler\\n\";\n}",
"function handleError($error_level,$error_message,$error_file,$error_line,$error_context)\n{\n}",
"public function handleError($e)\n {\n $code = (int) $e->getCode();\n $message = $e->getMessage();\n if ( !in_array($code, $this->_allowedErrorCodes) && $this->isDebugging ) {\n $code = self::ERROR_UNKNOWN;\n }\n \n $this->_server->fault($message, $code, null);\n \n /*\n * Due to a bug in Zend_Json_Server_Error, we have to modify the error\n * response to make sure the custom error code makes it to the client.\n */\n $badJson = $this->_server->getResponse()->toJson();\n \n $decoded = Zend_Json::decode($badJson);\n if ( isset($decoded['error']) \n && isset($decoded['error']['code']) ) {\n $decoded['error']['code'] = $code;\n }\n \n $json = Zend_Json::encode($decoded);\n \n if ($code == self::ERROR_CREDENTIALS_INVALID \n || $code == self::ERROR_DIGEST_INVALID \n || $code == self::ERROR_DIGEST_MISSING) {\n $this->sendAuthChallengeHeader();\n }\n \n header('Content-Type: application/json');\n if (isset($_GET['d'])) die($_GET['jsoncallback'].\"(\".$json.\")\");\n else die($json);\n }",
"public function support(\\Exception $exception);",
"private function error(\\Exception $e)\n {\n if (!$this->optionMuteAllErrors) {\n if ($this->errorHandler) {\n $errorHandler = $this->errorHandler;\n $errorHandler($e);\n } else {\n throw $e;\n }\n }\n }",
"public function handleError($e, $remotePath) {\n $this->data = NULL;\n $this->bufferSize = NULL;\n $this->fileSize = NULL;\n }",
"function exception_error_handler($errno, $errstr, $errfile, $errline ) {\n // Don't catch suppressed errors with '@' sign\n // @link http://stackoverflow.com/questions/7380782/error-supression-operator-and-set-error-handler\n $error_reporting = ini_get('error_reporting');\n if (!($error_reporting & $errno)) {\n return;\n }\n throw new ErrorException($errstr, $errno, 0, $errfile, $errline);\n}",
"function act() {\n throw $this->exception;\n }",
"protected static function catchException($query, $e) {\n self::destroyCon();\n $err = \"<p>Problem running this query: $query </p>\";\n $err .= \"<p>Exception: $e</p>\";\n trigger_error($err);\n }",
"public function handleError($e, $remotePath) {\n $this->fileSize = NULL;\n }",
"public function handleException(\\Throwable $exception)\n {\n $handlerException = null;\n\n if (!$this->loggedErrors) {\n if (false !== strpos($message = $exception->getMessage(), \"@anonymous\\0\")) {\n $message = \"Anonymous Class Exception\"; //call class not found exception here\n }\n\n if ($exception::ERROR == self::PERMISSION_DENIED) \n $message = self::PERMISSION_DENIED . '<br>';\n elseif($exception::ERROR == self::NOT_FOUND)\n $message = self::NOT_FOUND . '<br>';\n if (strpos($exception->getMessage(), \"FatalError\")) {\n $message .= '<br>Fatal Error: ';\n } elseif ($exception instanceof \\Error) {\n $message .= '<br>Uncaught Error: ';\n } elseif ($exception instanceof ErrorException) {\n $message .= '<br>Uncaught ';\n } elseif ($exception instanceof BaseForbiddenException) {\n $message .= 'Permission Error: ';\n }elseif($exception instanceof PageNotFoundException){\n $message .= 'Not Found Error: ';\n } else{\n $message .= '<br>Uncaught Exception: ';\n }\n\n try {\n $this->log($message, ['exception' => $exception]);\n } catch (\\Throwable $handlerException) {\n echo $handlerException->getMessage();\n }\n }\n\n if ($exception instanceof OutOfMemoryError) {\n $this->log($exception->getMessage(), ['exception' => $exception, 'type' => 'OutOfMemoryError']);\n }\n $loggedErrors = $this->loggedErrors;\n $this->loggedErrors = $exception === $handlerException ? 0 : $this->loggedErrors;\n }",
"public static function handleException( $e )\n\t{\n\t\t$details['type'] = get_class( $e );\n\t\t$details['code'] = $e->getCode();\n\t\t$details['message'] = $e->getMessage();\n\t\t$details['line'] = $e->getLine();\n\t\t$details['file'] = $e->getFile();\n\t\t$details['trace'] = $e->getTrace();\n\t\t\n\t\tself::bluescreen( $details );\n\t}",
"protected function handleException($e)\n {\n switch (ENV) {\n case 'production':\n $this->renderException($e);\n break;\n default:\n $this->reportException($e);\n break;\n\n }\n }",
"abstract protected function logException(\\Exception $ex);",
"protected function error($msg) {\n \t parent::error($msg); //log in error msg\n throw new Exception ($msg); // <-- TESTS php4\n }",
"function handler(Error $error)\n {\n }",
"abstract public function error();",
"public static function handleException($e)\n {\n self::setHeader($e);\n //TODO quitar el extract, que el view pida los que necesite\n extract(Router::get(), EXTR_OVERWRITE);\n // Registra la autocarga de helpers\n spl_autoload_register('kumbia_autoload_helper', true, true);\n\n $Controller = Util::camelcase($controller);\n ob_start();\n if (PRODUCTION) { //TODO: añadir error 500.phtml\n include APP_PATH . 'views/_shared/errors/404.phtml';\n return;\n }\n if ($e instanceof KumbiaException) {\n $view = $e->view;\n $tpl = $e->template;\n } else {\n $view = 'exception';\n $tpl = 'views/templates/exception.phtml';\n }\n //Fix problem with action name in REST\n $action = $e->getMessage() ? $e->getMessage() : $action;\n\n include CORE_PATH . \"views/errors/{$view}.phtml\";\n \n $content = ob_get_clean();\n\n // termina los buffers abiertos\n while (ob_get_level ()) {\n ob_end_clean();\n }\n include CORE_PATH . $tpl;\n }",
"function error_handler($exception) {\n\tglobal $config;\n\theader('HTTP/1.0 404 Not Found');\n\textract(array('error'=>$exception->getMessage()));\n\trequire($config['VIEW_PATH'].'404.php');\n\tdie();\n}",
"function handleException( $exception ) {\n echo \"Sorry, a problem occurred. Please try later.\";\n error_log( $exception->getMessage() );\n}",
"protected abstract function send_error($ex=null) ;",
"public function handleException(Exception $exception) {\n\t\t// perform normal error handling (logging)\n\t\t$this->handleProblem(get_class($exception), $exception->getMessage(), $exception->getFile(), $exception->getLine(), $exception->getCode());\n\n\t\t// always die away if *really* severe\n\t\t$this->aaaauuuggghhhh($exception);\n\t}",
"public static function handler(Exception $e)\n\t{\n\t\ttry\n\t\t{\t\t\t\n\t\t\t// Get the exception information\n\t\t\t$code = $e->getCode();\n\t\t\t\n\t\t\tif ($e instanceof ErrorException)\n\t\t\t{\n\t\t\t\t//some exceptions not have http code\n\t\t\t\tself::$http_code = Rest_Response::HTTP_SERVER_ERROR;\n\t\t\t\tself::$error['error'] = $e->getMessage();\n\t\t\t}\n\n\t\t\t//从其他异常抛出\n\t\t\tif(empty(self::$error['error'])) {\n\t\t\t\tself::$http_code = Rest_Response::HTTP_SERVER_ERROR;\n\t\t\t\tself::$error['error'] = $e->getMessage();\n\t\t\t}\n\n\t\t\tself::log($e);\n\n\t\t\tself::output($e);\n\n\t\t} catch (Exception $e)\n\t\t{\n\t\t\tself::output($e);\n\t\t}\n\t}",
"function api_error_setup() {\n\tset_exception_handler(function(Throwable $e) {\n\t\ttry {\n\t\t\techo APIException::make_json_string(APIException::map_to_code($e), $e);\n\t\t\tls_log($e->__toString(), LOGERR);\n\t\t} catch (Exception $e) {\n\t\t\t/*\n\t\t\t* Exceptions thrown in the exception handler\n\t\t\t* cause hard to debug fatal errors. Handle them.\n\t\t\t*/\n\t\t\techo '{\"error\":'.API_E_INTERNAL.', \"e_msg\":\"'.$e->getMessage().\n\t\t\t\t' (in exception handler, '.$e->getFile().' '.$e->getLine().')\"}';\n\t\t}\n\t\texit(1);\n\t});\n}",
"public function throwError();",
"function error(Throwable $error);",
"function uncaught_exception($o){\n $o['message'] = Trace::exceptionToText($o['exception']);\n $o['trace'] = Trace::exFullTrace($o['exception']);\n unexpected_failure($o);\n }",
"public static function exceptionHandler($exception)\n {\n // Determine and set the error response code\n $code = $exception->getCode();\n if($code != 404) {\n $code = 500;\n }\n http_response_code($code);\n\n // set up the error array\n $error = [\n 'class' => get_class($exception),\n 'message' => $exception->getMessage(),\n 'stack_trace' => $exception->getTraceAsString(),\n 'file' => $exception->getFile(),\n 'line' => $exception->getLine(),\n 'code' => $code\n ];\n // render to the page or to logs depending on server settings.\n if(Config::SHOW_ERRORS)\n {\n View::render('Errors/dev_error.html.twig', ['error' => $error]);\n } else {\n self::logError($error);\n }\n }",
"function handler(\\Throwable $error)\n{\n $message = $error->getMessage();\n\n // die(var_dump($message));\n if ($error instanceof \\Exception) {\n $code = $error->getCode();\n } else {\n $code = 500;\n }\n\n return Router::response()\n ->httpCode($code)\n ->json([\n 'message' => $message,\n 'error' => $error\n ]);\n}",
"public function handleExceptions($e)\n {\n if (!$e instanceof Exception) {\n $e = new FatalThrowableError($e);\n }\n }",
"protected function getExceptionError(Exception $exception)\n {\n $status = 500;\n $error = null;\n if ($exception instanceof TokenMismatchException) {\n $status = 406;\n $error = Helper::makeJsonapiObject($this->jsonapiVersion, 'error', [\n 'status' => \"$status\",\n 'title' => Helper::trans('lalu-jdr::messages.token_mismatch.title'),\n 'detail' => Helper::trans('lalu-jdr::messages.token_mismatch.detail'),\n ]);\n } elseif ($exception instanceof ValidationException) {\n $status = 406;\n $error = [];\n $messages = $exception->validator->messages();\n foreach ($messages->toArray() as $field => $messageArr) {\n foreach ($messageArr as $message) {\n $error[] = Helper::makeJsonapiObject($this->jsonapiVersion, 'error', [\n 'title' => Helper::trans('lalu-jdr::messages.validation_error.title'),\n 'detail' => $message,\n 'source' => Helper::makeJsonapiObject($this->jsonapiVersion, 'source', [\n 'pointer' => $field,\n ]),\n ]);\n }\n }\n } elseif ($exception instanceof AuthorizationException) {\n $status = 401;\n $error = Helper::makeJsonapiObject($this->jsonapiVersion, 'error', [\n 'status' => \"$status\",\n 'title' => Helper::trans('lalu-jdr::messages.authorization_error.title'),\n 'detail' => Helper::trans('lalu-jdr::messages.authorization_error.detail'),\n ]);\n } else {\n $status = method_exists($exception, 'getStatusCode') ? $exception->getStatusCode() : (method_exists($exception, 'getCode') ? $exception->getCode() : 500);\n if (!in_array($status, JsonResponse::$HTTP_ERROR_STATUS_CODES)) {\n $status = 500;\n }\n $message = $exception->getMessage();\n $error = Helper::makeJsonapiObject($this->jsonapiVersion, 'error', [\n 'status' => \"$status\",\n 'title' => Helper::trans(\"lalu-jdr::messages.$status.title\"),\n 'detail' => empty($message) ? Helper::trans(\"lalu-jdr::messages.$status.detail\") : $message,\n ]);\n }\n\n return [$status, $error];\n }",
"protected function throwErrorWhileSavingResponseException()\n {\n throw new InvalidScreenForNewSessionException('An error occured while saving data.');\n }",
"public function getError() {}",
"public function catchException()\n {\n // get the current exception\n $e = $this->getException();\n\n // throw a copy, with the original as the previous exception so that\n // we can see a full trace.\n $class = get_class($e);\n throw new $class($e->getMessage(), $e->getCode(), $e);\n }",
"function handleError()\n{\n\tglobal $g_error_msg, $g_debug_msg;\n\tinclude_once(atkconfig('atkroot'). 'atk/errors/class.atkerrorhandlerbase.inc');\n\t$errorHandlers = atkconfig('error_handlers', array('mail'=>array('mailto' => atkconfig('mailreport'))));\n\tforeach ($errorHandlers as $key => $value)\n\t{\n\t\tif (is_numeric($key))\n\t\t$key = $value;\n\t\t$errorHandlerObject = atkErrorHandlerBase::get($key, $value);\n\t\t$errorHandlerObject->handle($g_error_msg, $g_debug_msg);\n\t}\n}",
"function exception_handler(Exception $exception)\n{\n\tglobal $config;\n\n\t$message = $exception->getMessage() . \" on line \" . $exception->getLine() . \" in file \" . $exception->getFile();\n\terror_log(date('r') . ' ' . $message . PHP_EOL, 3, $config['log']);\n}",
"function exceptionHandler($exception) {\n\t$errno = E_USER_ERROR;\n\t$type = get_class($exception);\n\t$message = \"Uncaught \" . $type . \": \" . $exception->getMessage();\n\t$file = $exception->getFile();\n\t$line = $exception->getLine();\n\t$context = $exception->getTrace();\n\tDebug::fatalHandler($errno, $message, $file, $line, $context);\n}",
"public function errorOccured();",
"public function handleError(Start $server, Request $request, Exception $error): void\n {\n\n if ($request->getUrl()->contains('/api')) {\n\n response()->json([\n 'error' => $error->getMessage(),\n 'code' => $error->getCode(),\n ]);\n\n }\n\n /* The router will throw the NotFoundHttpException on 404 */\n else if($error instanceof NotFoundHttpException) {\n\n /*\n * Render your own custom 404-view, rewrite the request to another route,\n * or simply return the $request object to ignore the error and continue on rendering the route.\n *\n * The code below will make the router render our page.notfound route.\n */\n\n // $request->setRewriteCallback('Controllers\\DefaultController@notFound');\n //or you can set a custome 404 view\n //or you can use Valkyrie interface to print out the message\n //aria()->getValkyrie()->invoke('<b>'.$error->getCode().'</b> '.$error->getMessage());\n // return;\n var_dump($error);\n\n }\n else {\n aria()->getLog()->log($error,ILogger::ERROR);\n view()->config = aria()->getConfig();\n view()->render('maintenance', false);\n }\n\n throw $error;\n\n }",
"public function exceptionHandler(\\Exception $exception)\n {\n $this->displayException($exception);\n }",
"public function exceptionHandler($exception)\n {\n try {\n if (!$this->getClient())\n return;\n\n // Send the exception!\n return $this->getClient()->SendException($exception, $this->getTags());\n } catch (Exception $e) {\n // Welp, most likely the database is missing so we can't get the Raygun API key.\n // Let Magento log this to file and we will get it later.\n }\n }",
"function errorHandler($errno, $errstr, $errfile, $errline) {\n if ($errno != 2 && $errno != 8) {\n throw new Exception(\"Fatal Error Detected: [$errno] $errstr line: $errline\", 1);\n }\n }",
"private function handleError($error)\n {\n $status = $this->response->getStatusCode();\n if (! $status || $status < 400) {\n $this->response->setStatusCode(500);\n }\n\n if ($error instanceof Exception\n && ($error->getCode() >= 400 && $error->getCode() < 600)\n ) {\n $this->response->setStatusCode($error->getCode());\n }\n\n $escaper = new Escaper();\n $message = $this->response->getReasonPhrase() ?: 'Unknown Error';\n if (! isset($this->options['env'])\n || $this->options['env'] !== 'production'\n ) {\n if ($error instanceof Exception) {\n $message = $error->getTraceAsString();\n } elseif (is_object($error) && ! method_exists($error, '__toString')) {\n $message = sprintf('Error of type \"%s\" occurred', get_class($error));\n } else {\n $message = (string) $error;\n }\n $message = $escaper->escapeHtml($message);\n }\n\n if (isset($this->options['onerror'])\n && is_callable($this->options['onerror'])\n ) {\n $onError = $this->options['onerror'];\n $onError($error, $this->request, $this->response);\n }\n\n $this->response->end($message);\n }",
"protected function handleException(Exception $exception) {\n\n $client = $this->startClient();\n\n Yii::log('sending exception report to Airbrake');\n $client->notifyOnException($exception);\n \n parent::handleException($exception);\n }",
"protected function throwRedirectException() {}",
"public function handle_exceptions($exception)\n\t{\n\t\t\\Sentry\\captureLastError();\n\n\t\t$message = \"\\nError Type: \".get_class($exception).\"\\n\";\n\t\t$message .= \"Error Message: \".$exception->getMessage().\"\\n\";\n\t\t$message .= \"In File: \".$exception->getFile().\"\\n\";\n\t\t$message .= \"At Line: \".$exception->getLine().\"\\n\";\n\t\t$message .= \"Platform: \" . PHP_VERSION . \" (\" . PHP_OS . \")\\n\";\n\n\t\t$message .= \"\\nBACKTRACE\\n\";\n\t\t$message .= $exception->getTraceAsString();\n\t\t$message .= \"\\nEND\\n\";\n\n\t\t$this->_forward_error($message);\n\t}"
] | [
"0.8004618",
"0.7790179",
"0.7080405",
"0.67256945",
"0.66817313",
"0.6642069",
"0.661947",
"0.65872926",
"0.6553732",
"0.652721",
"0.6494951",
"0.648108",
"0.646394",
"0.6461653",
"0.64553684",
"0.64196056",
"0.63927585",
"0.6285294",
"0.62603825",
"0.625788",
"0.6238074",
"0.62273586",
"0.61876553",
"0.61852545",
"0.61846364",
"0.6140425",
"0.61401385",
"0.61378735",
"0.6082691",
"0.6077919",
"0.6072122",
"0.6031537",
"0.6029181",
"0.5995939",
"0.5995914",
"0.5984712",
"0.59822303",
"0.5981252",
"0.59761125",
"0.5964323",
"0.5963727",
"0.5955381",
"0.5950354",
"0.5944191",
"0.5926692",
"0.5918837",
"0.5917523",
"0.5915837",
"0.5903128",
"0.5888844",
"0.5888383",
"0.5876098",
"0.58710015",
"0.5870197",
"0.58648044",
"0.5864663",
"0.58598524",
"0.58584046",
"0.5857742",
"0.5857589",
"0.585302",
"0.58447444",
"0.58352906",
"0.583376",
"0.58228046",
"0.5815857",
"0.5815775",
"0.58147055",
"0.5813161",
"0.58054703",
"0.58048195",
"0.57955205",
"0.5793763",
"0.5793721",
"0.57792306",
"0.5771729",
"0.57688296",
"0.5767852",
"0.5762819",
"0.5756109",
"0.5749776",
"0.5744739",
"0.57420725",
"0.5739111",
"0.57386506",
"0.5731031",
"0.5727587",
"0.5726069",
"0.57235074",
"0.5720238",
"0.57074684",
"0.5706385",
"0.5699958",
"0.56974673",
"0.5686005",
"0.56832695",
"0.56818324",
"0.5681146",
"0.56607467",
"0.5658626",
"0.564463"
] | 0.0 | -1 |
LLAMADA A LA PLANTILLA | public function plantilla(){
include "views/template.php";#include(): Se utiliza para invocar el archivo que contiene el código html (es decir, incluye el template que está en la carpeta views)
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function graficoLinha() {\n $maxValue = $this->desenhaBase();\n\n $labelY = $this->margem;\n $idx = 0;\n foreach ($this->vetor as $label => $item) {\n $idx++;\n $color = $this->getColor($idx);\n $this->desenhaLinha($item, $color, $maxValue);\n $this->desenhaLabel($label, $color, $labelY);\n $labelY += ($this->margem * 2);\n }\n }",
"public function luas()\n {\n return $this->panjang * $this->lebar;\n }",
"function luasLingkaran($nilai){\r\n return pi() * pow($nilai, 2);\r\n }",
"private function CsomagHozzaadasa()\r\n {\r\n foreach (Lap::Nevkeszlet() as $nev)\r\n {\r\n foreach (Lap::Szinkeszlet() as $szin)\r\n {\r\n $this->lapok[]=new Lap($szin,$nev);\r\n }\r\n }\r\n }",
"function busca_hueco_almacen(&$Localizaciones,$numero_huecos){\n\tfor($i = 1;$i < $numero_huecos['n_planta'];$i++)\n\t\t for($j = 1;$j < $numero_huecos['n_pasillo'];$j++)\n\t\t\t\t for($k = 1;$k < $numero_huecos['n_fila'];$k++)\n\t\t\t\t\t\tfor($l = 1;$l < $numero_huecos['n_columna'];$l++)\n\t\t\t\t\t\t\t\t if($Localizaciones[$i][$j][$k][$l] != 1){\n\t\t\t\t\t\t\t\t\t $Localizaciones[$i][$j][$k][$l] = 1;\n\t\t\t\t\t\t\t\t\t return array( \"planta\" => $i ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"pasillo\" => $j ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"fila\" => $k ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"columna\" => $l ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t }\n}",
"function analisaCaminho($lab, $qtdL, $qtdC, $pLI, $pCI, $pLF, $pCF, $pLA, $pCA){ \n if ($pLA == $pLF && $pCA == $pCF){\n exibelab($lab, $qtdL, $qtdC);\n }else{\n $lab[$pLA][$pCA] = 5;\n\n //define vizinhança\n for($c = -1; $c <= +1; $c++){\n for($l = -1; $l <= +1; $l++){\n $liA = $pLA+ $c; // linha atual\n $coA = $pCA+ $l; // coluna atual\n \n //verifica se está dentro dos limites\n if ( ($liA > 0 && $liA <=$qtdL-1) && ($coA > 0 && $coA <= $qtdC-1) ){ \n // verifica se EXISTE, e se é caminho ou saida\n if (isset($lab[$liA][$coA]) && ( $lab[$liA][$coA] == 0 || $lab[$liA][$coA] == 3 )){ \n // exclui diagonais\n if ($c * $l == 0){\n //exclui limites\n if ($lab[$liA][$coA] != 4){ \n analisaCaminho($lab, $qtdL, $qtdC, $pLI, $pCI, $pLF, $pCF, $liA,$coA);\n }\n }\n }\n } // fim limites\n \n }\n }\n // e se eu resetar o caminho aqui? \n }\n }",
"private function lagon ($a)\n {\n $idL = $a->getIdLagon();\n foreach ($this->lagons as $l) {\n if ($l->getId() == $idL) {\n return $l;\n }\n }\n return null;\n }",
"public function getLinha();",
"function gl_dijagonala_sve_jedinice($matrica)\n{\n\t// echo ( napravi_tabelu( $matrica ) );\n\t/*\t\n\tif($matrica[$r][$r] != 1)\n\t{\n\t\t$x = $matrica[$r][$r];\n\t\t// print_r($matrica[$r][$r]); echo \", \";\n\t\t// exit();\n\t\t\n\t\tfor($k = 0; $k < count($matrica) + 1; $k++)\n\t\t{\n\t\t\tif($matrica[$r][$k] != 0)\n\t\t\t{\n\t\t\t\t$matrica[$r][$k] = $matrica[$r][$k] / $x;\n\t\t\t}\n\t\t}\n\t}*/\n\t\n\t\n\tfor($r = 0; $r < count($matrica); $r++)\n\t{\n\t\tif($matrica[$r][$r] != 1)\n\t\t{\n\t\t\t$x = $matrica[$r][$r];\n\t\t\t// print_r($matrica[$r][$r]); echo \", \";\n\t\t\t// exit();\n\n\t\t\t// podela citavog reda matrice sa vrednoscu njegove glavne idjagonale\n\t\t\tfor($k = 0; $k < count($matrica) + 1; $k++)\n\t\t\t{\n\t\t\t\tif($matrica[$r][$k] != 0)\n\t\t\t\t{\n\t\t\t\t\t$matrica[$r][$k] = $matrica[$r][$k] / $x;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn $matrica;\n}",
"public function getPlanilha() {\n return $this->iPlanilha;\n }",
"function redfearnGridtoLL($Easting, $Northing, $Zone = 55, $TmDefinition = \"GDA-MGA\")\n{\n switch ($TmDefinition) {\n case \"GDA-MGA\":\n $FalseEasting = 500000.0000;\n $FalseNorthing = 10000000.0000;\n $CentralScaleFactor = 0.9996;\n $ZoneWidthDegrees = 6;\n $LongitudeOfTheCentralMeridianOfZone1Degrees = -177;\n $EllipsoidDefinition = \"GRS80\";\n break;\n default:\n $TmDefinition = \"GDA-MGA\";\n $FalseEasting = 500000.0000;\n $FalseNorthing = 10000000.0000;\n $CentralScaleFactor = 0.9996;\n $ZoneWidthDegrees = 6;\n $LongitudeOfTheCentralMeridianOfZone1Degrees = -177;\n $EllipsoidDefinition = \"GRS80\";\n }\n\n switch ($EllipsoidDefinition) {\n case \"GRS80\":\n $SemiMajorAxis = 6378137.000;\n $InverseFlattening = 298.257222101000;\n break;\n default:\n $EllipsoidDefinition = \"GRS80\";\n $SemiMajorAxis = 6378137.000;\n $InverseFlattening = 298.257222101000;\n }\n\n $Flattening = 1 / $InverseFlattening;\n $SemiMinorAxis = $SemiMajorAxis * (1 - $Flattening);\n $Eccentricity = (2 * $Flattening) - ($Flattening * $Flattening);\n $n = ($SemiMajorAxis - $SemiMinorAxis) / ($SemiMajorAxis + $SemiMinorAxis);\n $n2 = pow($n, 2);\n $n3 = pow($n, 3);\n $n4 = pow($n, 4);\n $G = $SemiMajorAxis * (1 - $n) * (1 - $n2) * (1 + (9 * $n2) / 4 + (225 * $n4) / 64) * PI() / 180;\n $LongitudeOfWesternEdgeOfZoneZeroDegrees = $LongitudeOfTheCentralMeridianOfZone1Degrees - (1.5 * $ZoneWidthDegrees);\n $CentralMeridianOfZoneZeroDegrees = $LongitudeOfWesternEdgeOfZoneZeroDegrees + ($ZoneWidthDegrees / 2);\n\n $NewE = ($Easting - $FalseEasting);\n $NewEScaled = $NewE / $CentralScaleFactor;\n $NewN = ($Northing - $FalseNorthing);\n $NewNScaled = $NewN / $CentralScaleFactor;\n $Sigma = ($NewNScaled * PI()) / ($G * 180);\n $Sigma2 = 2 * $Sigma;\n $Sigma4 = 4 * $Sigma;\n $Sigma6 = 6 * $Sigma;\n $Sigma8 = 8 * $Sigma;\n\n $FootPointLatitudeTerm1 = $Sigma;\n $FootPointLatitudeTerm2 = ((3 * $n / 2) - (27 * $n3 / 32)) * sin($Sigma2);\n $FootPointLatitudeTerm3 = ((21 * $n2 / 16) - (55 * $n4 / 32)) * sin($Sigma4);\n $FootPointLatitudeTerm4 = (151 * $n3) * sin($Sigma6) / 96;\n $FootPointLatitudeTerm5 = 1097 * $n4 * sin($Sigma8) / 512;\n $FootPointLatitude = $FootPointLatitudeTerm1 + $FootPointLatitudeTerm2 + $FootPointLatitudeTerm3 + $FootPointLatitudeTerm4 + $FootPointLatitudeTerm5;\n\n $SinFootPointLatitude = sin($FootPointLatitude);\n $SecFootPointLatitude = 1 / cos($FootPointLatitude);\n\n $Rho = $SemiMajorAxis * (1 - $Eccentricity) / pow(1 - $Eccentricity * pow($SinFootPointLatitude, 2), 1.5);\n $Nu = $SemiMajorAxis / pow(1 - $Eccentricity * pow($SinFootPointLatitude, 2), 0.5);\n\n $x1 = $NewEScaled / $Nu;\n $x3 = pow($x1, 3);\n $x5 = pow($x1, 5);\n $x7 = pow($x1, 7);\n\n $t1 = tan($FootPointLatitude);\n $t2 = pow($t1, 2);\n $t4 = pow($t1, 4);\n $t6 = pow($t1, 6);\n\n $Psi1 = $Nu / $Rho;\n $Psi2 = pow($Psi1, 2);\n $Psi3 = pow($Psi1, 3);\n $Psi4 = pow($Psi1, 4);\n\n $LatitudeTerm1 = -(($t1 / ($CentralScaleFactor * $Rho)) * $x1 * $NewE / 2);\n $LatitudeTerm2 = ($t1 / ($CentralScaleFactor * $Rho)) * ($x3 * $NewE / 24) * (-4 * $Psi2 + 9 * $Psi1 * (1 - $t2) + 12 * $t2);\n $LatitudeTerm3 = -($t1 / ($CentralScaleFactor * $Rho)) * ($x5 * $NewE / 720) * (8 * $Psi4 * (11 - 24 * $t2) - 12 * $Psi3 * (21 - 71 * $t2) + 15 * $Psi2 * (15 - 98 * $t2 + 15 * $t4) + 180 * $Psi1 * (5 * $t2 - 3 * $t4) + 360 * $t4);\n $LatitudeTerm4 = ($t1 / ($CentralScaleFactor * $Rho)) * ($x7 * $NewE / 40320) * (1385 + 3633 * $t2 + 4095 * $t4 + 1575 * $t6);\n $LatitudeRadians = $FootPointLatitude + $LatitudeTerm1 + $LatitudeTerm2 + $LatitudeTerm3 + $LatitudeTerm4;\n $LatitudeDegrees = ($LatitudeRadians / PI()) * 180;\n\n $CentralMeridianDegrees = ($Zone * $ZoneWidthDegrees) + $LongitudeOfTheCentralMeridianOfZone1Degrees - $ZoneWidthDegrees;\n $CentralMeridianRadians = ($CentralMeridianDegrees / 180) * PI();\n $LongitudeTerm1 = $SecFootPointLatitude * $x1;\n $LongitudeTerm2 = -$SecFootPointLatitude * ($x3 / 6) * ($Psi1 + 2 * $t2);\n $LongitudeTerm3 = $SecFootPointLatitude * ($x5 / 120) * (-4 * $Psi3 * (1 - 6 * $t2) + $Psi2 * (9 - 68 * $t2) + 72 * $Psi1 * $t2 + 24 * $t4);\n $LongitudeTerm4 = -$SecFootPointLatitude * ($x7 / 5040) * (61 + 662 * $t2 + 1320 * $t4 + 720 * $t6);\n $LongitudeRadians = $CentralMeridianRadians + $LongitudeTerm1 + $LongitudeTerm2 + $LongitudeTerm3 + $LongitudeTerm4;\n $LongitudeDegrees = ($LongitudeRadians / PI()) * 180;\n\n $GridConvergenceTerm1 = -($x1 * $t1);\n $GridConvergenceTerm2 = ($t1 * $x3 / 3) * (-2 * $Psi2 + 3 * $Psi1 + $t2);\n $GridConvergenceTerm3 = -($t1 * $x5 / 15) * ($Psi4 * (11 - 24 * $t2) - 3 * $Psi3 * (8 - 23 * $t2) + 5 * $Psi2 * (3 - 14 * $t2) + 30 * $Psi1 * $t2 + 3 * $t4);\n $GridConvergenceTerm4 = ($t1 * $x7 / 315) * (17 + 77 * $t2 + 105 * $t4 + 45 * $t6);\n $GridConvergenceRadians = $GridConvergenceTerm1 + $GridConvergenceTerm2 + $GridConvergenceTerm3 + $GridConvergenceTerm4;\n $GridConvergenceDegrees = ($GridConvergenceRadians / PI()) * 180;\n\n $PointScaleFactor1 = pow($NewEScaled, 2) / ($Rho*$Nu);\n $PointScaleFactor2 = pow($PointScaleFactor1, 2);\n $PointScaleFactor3 = pow($PointScaleFactor1, 3);\n $PointScaleTerm1 = 1 + $PointScaleFactor1 / 2;\n $PointScaleTerm2 = ($PointScaleFactor2 / 24) * (4 * $Psi1 * (1 - 6 * $t2) - 3 * (1 - 16 * $t2) - 24 * $t2 / $Psi1);\n $PointScaleTerm3 = $PointScaleFactor3 / 720;\n $PointScale = $CentralScaleFactor * ($PointScaleTerm1 + $PointScaleTerm2 + $PointScaleTerm3);\n\n $Point[\"Latitude\"] = $LatitudeDegrees;\n $Point[\"Longitude\"] = $LongitudeDegrees;\n $Point[\"GridConvergence\"] = $GridConvergenceDegrees;\n $Point[\"PointScale\"] = $PointScale;\n\n return $Point;\n}",
"function redfearnGridtoLL($Easting, $Northing, $Zone = 55, $TmDefinition = \"GDA-MGA\")\n{\n switch ($TmDefinition) {\n case \"GDA-MGA\":\n $FalseEasting = 500000.0000;\n $FalseNorthing = 10000000.0000;\n $CentralScaleFactor = 0.9996;\n $ZoneWidthDegrees = 6;\n $LongitudeOfTheCentralMeridianOfZone1Degrees = -177;\n $EllipsoidDefinition = \"GRS80\";\n break;\n default:\n $TmDefinition = \"GDA-MGA\";\n $FalseEasting = 500000.0000;\n $FalseNorthing = 10000000.0000;\n $CentralScaleFactor = 0.9996;\n $ZoneWidthDegrees = 6;\n $LongitudeOfTheCentralMeridianOfZone1Degrees = -177;\n $EllipsoidDefinition = \"GRS80\";\n }\n\n switch ($EllipsoidDefinition) {\n case \"GRS80\":\n $SemiMajorAxis = 6378137.000;\n $InverseFlattening = 298.257222101000;\n break;\n default:\n $EllipsoidDefinition = \"GRS80\";\n $SemiMajorAxis = 6378137.000;\n $InverseFlattening = 298.257222101000;\n }\n\n $Flattening = 1 / $InverseFlattening;\n $SemiMinorAxis = $SemiMajorAxis * (1 - $Flattening);\n $Eccentricity = (2 * $Flattening) - ($Flattening * $Flattening);\n $n = ($SemiMajorAxis - $SemiMinorAxis) / ($SemiMajorAxis + $SemiMinorAxis);\n $n2 = pow($n, 2);\n $n3 = pow($n, 3);\n $n4 = pow($n, 4);\n $G = $SemiMajorAxis * (1 - $n) * (1 - $n2) * (1 + (9 * $n2) / 4 + (225 * $n4) / 64) * PI() / 180;\n $LongitudeOfWesternEdgeOfZoneZeroDegrees = $LongitudeOfTheCentralMeridianOfZone1Degrees - (1.5 * $ZoneWidthDegrees);\n $CentralMeridianOfZoneZeroDegrees = $LongitudeOfWesternEdgeOfZoneZeroDegrees + ($ZoneWidthDegrees / 2);\n\n $NewE = ($Easting - $FalseEasting);\n $NewEScaled = $NewE / $CentralScaleFactor;\n $NewN = ($Northing - $FalseNorthing);\n $NewNScaled = $NewN / $CentralScaleFactor;\n $Sigma = ($NewNScaled * PI()) / ($G * 180);\n $Sigma2 = 2 * $Sigma;\n $Sigma4 = 4 * $Sigma;\n $Sigma6 = 6 * $Sigma;\n $Sigma8 = 8 * $Sigma;\n\n $FootPointLatitudeTerm1 = $Sigma;\n $FootPointLatitudeTerm2 = ((3 * $n / 2) - (27 * $n3 / 32)) * sin($Sigma2);\n $FootPointLatitudeTerm3 = ((21 * $n2 / 16) - (55 * $n4 / 32)) * sin($Sigma4);\n $FootPointLatitudeTerm4 = (151 * $n3) * sin($Sigma6) / 96;\n $FootPointLatitudeTerm5 = 1097 * $n4 * sin($Sigma8) / 512;\n $FootPointLatitude = $FootPointLatitudeTerm1 + $FootPointLatitudeTerm2 + $FootPointLatitudeTerm3 + $FootPointLatitudeTerm4 + $FootPointLatitudeTerm5;\n\n $SinFootPointLatitude = sin($FootPointLatitude);\n $SecFootPointLatitude = 1 / cos($FootPointLatitude);\n\n $Rho = $SemiMajorAxis * (1 - $Eccentricity) / pow(1 - $Eccentricity * pow($SinFootPointLatitude, 2), 1.5);\n $Nu = $SemiMajorAxis / pow(1 - $Eccentricity * pow($SinFootPointLatitude, 2), 0.5);\n\n $x1 = $NewEScaled / $Nu;\n $x3 = pow($x1, 3);\n $x5 = pow($x1, 5);\n $x7 = pow($x1, 7);\n\n $t1 = tan($FootPointLatitude);\n $t2 = pow($t1, 2);\n $t4 = pow($t1, 4);\n $t6 = pow($t1, 6);\n\n $Psi1 = $Nu / $Rho;\n $Psi2 = pow($Psi1, 2);\n $Psi3 = pow($Psi1, 3);\n $Psi4 = pow($Psi1, 4);\n\n $LatitudeTerm1 = -(($t1 / ($CentralScaleFactor * $Rho)) * $x1 * $NewE / 2);\n $LatitudeTerm2 = ($t1 / ($CentralScaleFactor * $Rho)) * ($x3 * $NewE / 24) * (-4 * $Psi2 + 9 * $Psi1 * (1 - $t2) + 12 * $t2);\n $LatitudeTerm3 = -($t1 / ($CentralScaleFactor * $Rho)) * ($x5 * $NewE / 720) * (8 * $Psi4 * (11 - 24 * $t2) - 12 * $Psi3 * (21 - 71 * $t2) + 15 * $Psi2 * (15 - 98 * $t2 + 15 * $t4) + 180 * $Psi1 * (5 * $t2 - 3 * $t4) + 360 * $t4);\n $LatitudeTerm4 = ($t1 / ($CentralScaleFactor * $Rho)) * ($x7 * $NewE / 40320) * (1385 + 3633 * $t2 + 4095 * $t4 + 1575 * $t6);\n $LatitudeRadians = $FootPointLatitude + $LatitudeTerm1 + $LatitudeTerm2 + $LatitudeTerm3 + $LatitudeTerm4;\n $LatitudeDegrees = ($LatitudeRadians / PI()) * 180;\n\n $CentralMeridianDegrees = ($Zone * $ZoneWidthDegrees) + $LongitudeOfTheCentralMeridianOfZone1Degrees - $ZoneWidthDegrees;\n $CentralMeridianRadians = ($CentralMeridianDegrees / 180) * PI();\n $LongitudeTerm1 = $SecFootPointLatitude * $x1;\n $LongitudeTerm2 = -$SecFootPointLatitude * ($x3 / 6) * ($Psi1 + 2 * $t2);\n $LongitudeTerm3 = $SecFootPointLatitude * ($x5 / 120) * (-4 * $Psi3 * (1 - 6 * $t2) + $Psi2 * (9 - 68 * $t2) + 72 * $Psi1 * $t2 + 24 * $t4);\n $LongitudeTerm4 = -$SecFootPointLatitude * ($x7 / 5040) * (61 + 662 * $t2 + 1320 * $t4 + 720 * $t6);\n $LongitudeRadians = $CentralMeridianRadians + $LongitudeTerm1 + $LongitudeTerm2 + $LongitudeTerm3 + $LongitudeTerm4;\n $LongitudeDegrees = ($LongitudeRadians / PI()) * 180;\n\n $GridConvergenceTerm1 = -($x1 * $t1);\n $GridConvergenceTerm2 = ($t1 * $x3 / 3) * (-2 * $Psi2 + 3 * $Psi1 + $t2);\n $GridConvergenceTerm3 = -($t1 * $x5 / 15) * ($Psi4 * (11 - 24 * $t2) - 3 * $Psi3 * (8 - 23 * $t2) + 5 * $Psi2 * (3 - 14 * $t2) + 30 * $Psi1 * $t2 + 3 * $t4);\n $GridConvergenceTerm4 = ($t1 * $x7 / 315) * (17 + 77 * $t2 + 105 * $t4 + 45 * $t6);\n $GridConvergenceRadians = $GridConvergenceTerm1 + $GridConvergenceTerm2 + $GridConvergenceTerm3 + $GridConvergenceTerm4;\n $GridConvergenceDegrees = ($GridConvergenceRadians / PI()) * 180;\n\n $PointScaleFactor1 = pow($NewEScaled, 2) / ($Rho*$Nu);\n $PointScaleFactor2 = pow($PointScaleFactor1, 2);\n $PointScaleFactor3 = pow($PointScaleFactor1, 3);\n $PointScaleTerm1 = 1 + $PointScaleFactor1 / 2;\n $PointScaleTerm2 = ($PointScaleFactor2 / 24) * (4 * $Psi1 * (1 - 6 * $t2) - 3 * (1 - 16 * $t2) - 24 * $t2 / $Psi1);\n $PointScaleTerm3 = $PointScaleFactor3 / 720;\n $PointScale = $CentralScaleFactor * ($PointScaleTerm1 + $PointScaleTerm2 + $PointScaleTerm3);\n\n $Point[\"Latitude\"] = $LatitudeDegrees;\n $Point[\"Longitude\"] = $LongitudeDegrees;\n $Point[\"GridConvergence\"] = $GridConvergenceDegrees;\n $Point[\"PointScale\"] = $PointScale;\n\n return $Point;\n}",
"public function getLlx() {}",
"public function getAnchoPaneles()\r\n\t{\r\n\t\t$getPisosAletaVen = $this->getPisosAletaVen();\r\n\t\t$getPisosAletaAdicional7 = $this->getPisosAletaAdicional7();\r\n\t\t$getPisosAletaFlu = $this->getPisosAletaFlu();\r\n\t\t$getCantidadChapaIntermedia = $this->getCantidadChapaIntermedia();\r\n\t\t$getCantidadChapaPiso = $this->getCantidadChapaPiso();\r\n\t\t$getCantidadChapaAdicional = $this->getCantidadChapaAdicional();\r\n\t\t\r\n\t\t\t\t$anchoP1 = $getPisosAletaVen['pisosAletaVenP1'] * $this->getEspesorAletaVen() + $getPisosAletaAdicional7['pisosP1Aleta7'] * $this->espesorAire7Flu + \r\n\t\t\t\t$getPisosAletaFlu['pisosP1AletaFlu'] * $this->getEspesorAletaFlu() + $getCantidadChapaIntermedia['cantidadP1ChapaIntermedia'] * $this->getEspesorChapaIntermedia() +\r\n\t\t\t\t$getCantidadChapaPiso['cantP1Piso'] * $this->getEspesorChapaPiso() + $getCantidadChapaAdicional['cantP1PisoAd'] * $this->getEspesorChapaAdicional();\r\n\t\t\t\t\r\n\t\t\t\t$anchoP2 = $getPisosAletaVen['pisosAletaVenP2'] * $this->getEspesorAletaVen() + $getPisosAletaAdicional7['pisosP2Aleta7'] * $this->espesorAire7Flu + \r\n\t\t\t\t$getPisosAletaFlu['pisosP2AletaFlu'] * $this->getEspesorAletaFlu() + $getCantidadChapaIntermedia['cantidadP2ChapaIntermedia'] * $this->getEspesorChapaIntermedia() +\r\n\t\t\t\t$getCantidadChapaPiso['cantP2Piso'] * $this->getEspesorChapaPiso() + $getCantidadChapaAdicional['cantP2PisoAd'] * $this->getEspesorChapaAdicional();\r\n\t\t\t\t\r\n\t\t\t\t$anchoP3 = $getPisosAletaVen['pisosAletaVenP3'] * $this->getEspesorAletaVen() + $getPisosAletaAdicional7['pisosP3Aleta7'] * $this->espesorAire7Flu + \r\n\t\t\t\t$getPisosAletaFlu['pisosP3AletaFlu'] * $this->getEspesorAletaFlu() + $getCantidadChapaIntermedia['cantidadP3ChapaIntermedia'] * $this->getEspesorChapaIntermedia() +\r\n\t\t\t\t$getCantidadChapaPiso['cantP3Piso'] * $this->getEspesorChapaPiso() + $getCantidadChapaAdicional['cantP3PisoAd'] * $this->getEspesorChapaAdicional();\r\n\t\t\t\t\r\n\t\t\t\t$anchoP4 = $getPisosAletaVen['pisosAletaVenP4'] * $this->getEspesorAletaVen() + $getPisosAletaAdicional7['pisosP4Aleta7'] * $this->espesorAire7Flu + \r\n\t\t\t\t$getPisosAletaFlu['pisosP4AletaFlu'] * $this->getEspesorAletaFlu() + $getCantidadChapaIntermedia['cantidadP4ChapaIntermedia'] * $this->getEspesorChapaIntermedia() +\r\n\t\t\t\t$getCantidadChapaPiso['cantP4Piso'] * $this->getEspesorChapaPiso() + $getCantidadChapaAdicional['cantP4PisoAd'] * $this->getEspesorChapaAdicional();\r\n\t\t\t\t\n\t\t\t\t$res = array(\r\n\t\t\t\t\t'anchoTotal' => $anchoP1 + $anchoP2 + $anchoP3 + $anchoP4,\r\n\t\t\t\t\t'anchoP1' => $anchoP1,\r\n\t\t\t\t\t'anchoP2' => $anchoP2,\r\n\t\t\t\t\t'anchoP3' => $anchoP3,\r\n\t\t\t\t\t'anchoP4' => $anchoP4,\r\n\t\t\t\t);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\treturn $res;\t\t\r\n\t}",
"function getTunjLain($conn) {\n $last = self::getLastDataPeriodeGaji($conn);\n\n $sql = \"select g.nominal as tunjlain,g.idpegawai,g.kodetunjangan\n\t\t\t\tfrom \" . static::table('ga_pegawaitunjangan') . \" g\n\t\t\t\tleft join \" . static::table('ms_tunjangan') . \" t on t.kodetunjangan=g.kodetunjangan\n\t\t\t\twhere g.tmtmulai <= '\" . $last['tglawalhit'] . \"' and t.carahitung = 'M' and t.isbayargaji = 'Y' and t.isaktif = 'Y' and g.nominal is not null and g.isaktif = 'Y'\n order by g.tmtmulai asc\";\n $rs = $conn->Execute($sql);\n\n while ($row = $rs->FetchRow()) {\n $a_tunjlain[$row['kodetunjangan']][$row['idpegawai']] = $row['tunjlain'];\n }\n\n return $a_tunjlain;\n }",
"function listarPlanArb()\n {\n $node = $this->objParam->getParametro('node');\n\n //$clasificacion = $this->objParam->getParametro('clasificacion');\n $id_plan = $this->objParam->getParametro('id_plan');\n //\n $tipo_nodo = $this->objParam->getParametro('tipo_nodo');\n\n\n if ($node == 'id') {\n $this->objParam->addParametro('id_padre', '%');\n } else {\n $this->objParam->addParametro('id_padre', $id_plan);\n }\n\n\n //$this->objParam->addParametro('clasificacion', $clasificacion);\n\n //creamos el modelo\n $this->objFunc = $this->create('MODPlan');\n $this->res = $this->objFunc->listarPlanArb();\n\n $this->res->setTipoRespuestaArbol();\n\n $arreglo = array();\n\n //$arreglo_valores=array();\n\n //para cambiar un valor por otro en una variable\n // array_push($arreglo_valores,array('variable'=>'checked','val_ant'=>'true','val_nue'=>true));\n // array_push($arreglo_valores,array('variable'=>'checked','val_ant'=>'false','val_nue'=>false));\n // $this->res->setValores($arreglo_valores);\n\n\n array_push($arreglo, array('nombre' => 'id', 'valor' => 'id_plan'));\n array_push($arreglo, array('nombre' => 'id_p', 'valor' => 'id_plan_padre'));\n\n array_push($arreglo, array('nombre' => 'text', 'valores' => '#nombre_plan# <font color=\"blue\">PESO:#peso#%</font> #porcentaje_acum# #porcentaje_rest#'));\n array_push($arreglo, array('nombre' => 'cls', 'valor' => 'peso'));\n array_push($arreglo, array('nombre' => 'qtip', 'valores' => '<b>ID PLAN:</b> #id_plan# <br><b>NOMBRE:</b> #nombre_plan#<br/><b>PESO:</b> #peso# %'));\n\n /*Estas funciones definen reglas para los nodos en funcion a los tipo de nodos que contenga cada uno*/\n $this->res->addNivelArbol('tipo_nodo', 'raiz', array('leaf' => false, 'draggable' => false, 'allowDelete' => true, 'allowEdit' => true, 'cls' => 'folder', 'tipo_nodo' => 'raiz', 'icon' => '../../../lib/imagenes/orga32x32.png'), $arreglo);\n\n $this->res->addNivelArbol('tipo_nodo', 'hijo', array('leaf' => false, 'draggable' => false, 'allowDelete' => true, 'allowEdit' => true, 'tipo_nodo' => 'hijo', 'icon' => '../../../lib/imagenes/alma32x32.png'), $arreglo);\n\n $this->res->addNivelArbol('tipo_nodo', 'hoja', array('leaf' => true, 'draggable' => false, 'allowDelete' => true, 'allowEdit' => true, 'tipo_nodo' => 'hoja', 'icon' => '../../../lib/imagenes/a_form.png'), $arreglo);\n \n\n //Se imprime el arbol en formato JSON\n //var_dump($this->res->generarJson());exit;\n $this->res->imprimirRespuesta($this->res->generarJson());\n }",
"public function getLargura() \r\n\t{\r\n\t\treturn $this->iLargura;\r\n\t}",
"function listar_plantillas_por_palabra($letra) {\n\t\t\t\n\t\tif ($letra=='') { $sql_letra=''; } else { $sql_letra=$letra; }\n\t\t\n\t\t$query = \"SELECT paneles_templates.*\n\t\tFROM paneles_templates\n\t\tWHERE (paneles_templates.nombre_panel LIKE '%%$sql_letra%%' OR paneles_templates.tags_panel LIKE '%%$sql_letra%%')\n\t\tGROUP BY paneles_templates.id_template_panel\n\t\tORDER BY paneles_templates.nombre_panel asc\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}",
"function largura($nPorcentagem = 0) {\n\n $iColuna = 0;\n $iTotalLinha = 276;\n\n if ( $nPorcentagem == 0 ) {\n return $iTotalLinha;\n }\n\n $iColuna = $nPorcentagem / 100 * $iTotalLinha;\n $iColuna = round($iColuna, 2);\n\n return $iColuna;\n}",
"function graficoPoligno() {\n $maxValue = $this->desenhaBase();\n\n $labelY = $this->margem;\n\n $idx = 0;\n foreach ($this->vetor as $label => $item) {\n $points = array();\n $arPonto = array();\n $arValor = array();\n $idx++;\n\n $color = $this->getColor($idx, 0, 0, 0, 60);\n $x = $this->margem;\n $y = $this->gtamanho + $this->margem;\n\n foreach ($item as $referencia => $value) {\n $val = ($this->gtamanho + ($this->margem * 1)) - (floor((($this->gtamanho) * $value) / $maxValue));\n\n $points[] = $x;\n $points[] = $y;\n $points[] = ($x + $this->columSize);\n $points[] = $val;\n\n $arPonto[] = array(\n 'x' => ($x + $this->columSize),\n 'y' => $val\n );\n\n $arValor[] = array(\n 'x' => ($x + ($this->columSize + $this->margem)),\n 'y' => ($val - 3),\n 'value' => $value\n );\n\n $y = $val;\n $x += $this->columSize;\n }\n\n $points[] = $this->gtamanho + $this->margem;\n $points[] = $this->gtamanho + $this->margem;\n\n imagefilledpolygon($this->image, $points, (count($points) / 2), $color);\n\n if($this->opMostrarPontoValor) {\n foreach ($arPonto as $item) {\n $this->desenhaPonto($item['x'], $item['y'], null);\n }\n\n foreach ($arValor as $item) {\n imagestring($this->image, 2, $item['x'], ($item['y'] - $this->margem), utf8_decode($item['value']), null);\n }\n }\n\n $this->desenhaLabel($label, $color, $labelY);\n $labelY += ($this->margem * 2);\n }\n }",
"function listar_paneles_por_palabra($letra,$id_usuario) {\n\t\t\t\n\t\tif ($letra=='') { $sql_letra=''; } else { $sql_letra=$letra; }\n\t\t\n\t\t$query = \"SELECT paneles_usuarios.*\n\t\tFROM paneles_usuarios\n\t\tWHERE (paneles_usuarios.nombre_panel LIKE '%%$sql_letra%%' OR paneles_usuarios.tags_panel LIKE '%%$sql_letra%%')\n\t\tAND paneles_usuarios.id_usuario='$id_usuario'\n\t\tGROUP BY paneles_usuarios.id_panel\n\t\tORDER BY paneles_usuarios.nombre_panel asc\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}",
"function lattice4($aa,$bb,$cc,$alfie,$betie,$gammie,$l,$m,$n,$psi4,$phi4,$tetha4)\n{\n $ax=array();\n $ay=array();\n $az=array();\n $alti5=deg2rad($alfie);\n $beti5=deg2rad($betie);\n $gati5=deg2rad($gammie);\n $doublealfa=pow(cos($alti5),2);\n $doublebeta=pow(cos($beti5),2);\n $doublegamma=pow(cos($gati5),2);\n $prevol1=$aa*$bb*$cc;\n $prevol2=2*cos($alti5)*cos($beti5)*cos($gati5);\n $vol=$prevol1*sqrt(1-$doublealfa-$doublebeta-$doublegamma+$prevol2);\n $a11=$aa;\n $a12=$bb*cos($gati5);\n $a13=$cc*cos($beti5);\n $a21=0;\n $a22=$bb*sin($gati5);\n $a23=$cc*((cos($alti5)-cos($beti5)*cos($gati5))/sin($gati5));\n $a31=0;\n $a32=0;\n $a33=$vol/($aa*$bb*sin($gati5));\n $rotated=rotativeMatrix($phi4,$tetha4,$psi4);\n $b11=$rotated[0];\n $b12=$rotated[1];\n $b13=$rotated[2];\n $b21=$rotated[3];\n $b22=$rotated[4];\n $b23=$rotated[5];\n $b31=$rotated[6];\n $b32=$rotated[7];\n $b33=$rotated[8];\n $c11=($b11*$a11)+($b12*$a21)+($b13*$a31);\n $c12=($b11*$a12)+($b12*$a22)+($b13*$a32);\n $c13=($b11*$a13)+($b12*$a23)+($b13*$a33);\n $c21=($b21*$a11)+($b22*$a21)+($b23*$a31);\n $c22=($b21*$a12)+($b22*$a22)+($b23*$a32);\n $c23=($b21*$a13)+($b22*$a23)+($b23*$a33);\n $c31=($b31*$a11)+($b32*$a21)+($b33*$a31);\n $c32=($b31*$a12)+($b32*$a22)+($b33*$a32);\n $c33=($b31*$a13)+($b32*$a23)+($b33*$a33);\n for($i=-$l;$i<$l;$i++)\n {\n for($j=-$m;$j<$m;$j++)\n {\n for($k=-$n;$k<$n;$k++)\n {\n $bas1=($j*$c11)+($i*$c12)+($k*$c13);\n $bas2=($j*$c21)+($i*$c22)+($k*$c23);\n $bas3=($j*$c31)+($i*$c32)+($k*$c33);\n $ax[]=$bas1;\n $ay[]=$bas2;\n $az[]=$bas3;\n }\n }\n }\nreturn [$ax,$ay,$az];\n}",
"public function leerPlanes()\n {\n include_once 'controlador/util/bd_conexion_pdo.php';\n\n $conexion = (new Conexion())->conectarPDO();\n\n $sentencia = $conexion->query('SELECT * FROM plan;');\n $resultado = $sentencia->fetchAll(PDO::FETCH_ASSOC);\n\n $sentencia = null;\n $conexion = null;\n\n return $resultado;\n }",
"function calculerSurfaceMurs ($largeur, $longueur, $hauteur)\n {\n // $surface = ($largeur * $hauteur + $longueur * $hauteur) * 2;\n $surface = 2 * $hauteur * ($largeur + $longueur);\n\n return $surface; \n }",
"public function show(Lagoa $lagoa)\n {\n //\n }",
"function tabelaLegenda($totaliza = \"nao\")\n {\n $linhas = array();\n foreach ($this->visiveis as $l) {\n $layer = $this->mapa->getlayerbyname($l);\n // verifica se é wms ou wfs\n $c = $layer->connectiontype;\n\n $s = $layer->getmetadata(\"wms_sld_url\");\n $im = $layer->getmetadata(\"legendaimg\");\n $nc = $layer->numclasses;\n //\n // se for wms e tiver classes define o tipo de layer para poder gerar a legenda corretamente\n //\n if ($c == 7 && $nc > 0) {\n $tipotemp = $layer->type;\n $tiporep = $layer->getmetadata(\"tipooriginal\");\n $layer->set(\"type\", MS_LAYER_POLYGON);\n if ($tiporep == \"linear\") {\n $layer->set(\"type\", MS_LAYER_LINE);\n }\n if ($tiporep == \"pontual\") {\n $layer->set(\"type\", MS_LAYER_POINT);\n }\n }\n //\n // se for WMS e não tiver classes, tenta pegar a legenda via requisição WMS\n //\n if ($c == 7) {\n if ($c == 7) {\n $con = $layer->connection;\n $ver = $layer->getmetadata(\"wms_server_version\");\n $lwms = $layer->getmetadata(\"wms_name\");\n $f = $layer->getmetadata(\"wms_formatlist\");\n $f = explode(\",\", $f);\n $f = $f[0];\n $imgLeg = $con . \"&request=GetLegendGraphic&version=\" . $ver . \"&service=wms&layer=\" . $lwms . \"&format=\" . $f . \"&SLD=\" . $s;\n if ($layer->getmetadata(\"legendawms\") != \"\") {\n $imgLeg = $layer->getmetadata(\"legendawms\");\n }\n } else {\n $imgLeg = $im;\n }\n $linhas[] = array(\n \"tema\" => $l,\n \"idclasse\" => \"\",\n \"nomeclasse\" => \"\",\n \"expressao\" => \"\",\n \"expressao\" => \"\",\n \"imagem\" => $imgLeg,\n \"minScale\" => 0,\n \"maxScale\" => 0\n );\n } else {\n for ($c = 0; $c < $nc; $c ++) {\n $classe = $layer->getclass($c);\n $imgi = $classe->createlegendicon(30, 15);\n $classe->drawlegendicon(30, 15, $imgi, 0, 0);\n $nomes = nomeRandomico(12);\n $nomer = ($imgi->imagepath) . \"icone\" . $nomes . \".png\";\n $imgi->saveImage($nomer);\n $i = ($imgi->imageurl) . basename($nomer);\n $nomeclasse = $classe->name;\n\n // if (function_exists(\"mb_convert_encoding\"))\n // {$nomeclasse = mb_convert_encoding($nomeclasse,\"UTF-8\",\"ISO-8859-1\");}\n $nomeclasse = $this->converte($nomeclasse);\n $nomeexp = $classe->getExpressionString();\n if (function_exists(\"mb_convert_encoding\")) {\n $nomeexp = mb_convert_encoding($nomeexp, \"UTF-8\", \"ISO-8859-1\");\n }\n $linhas[] = array(\n \"tema\" => $l,\n \"idclasse\" => $c,\n \"nomeclasse\" => $nomeclasse,\n \"expressao\" => $nomeexp,\n \"imagem\" => $i,\n \"proc\" => \"\",\n \"minScale\" => $classe->minscaledenom,\n \"maxScale\" => $classe->maxscaledenom\n );\n }\n if (($totaliza == \"sim\") && ($nc > 1)) {\n $layer->set(\"template\", \"none.htm\");\n $sopen = $layer->open();\n if ($sopen == MS_FAILURE) {\n return \"erro\";\n }\n $itens = $layer->getitems();\n $total = 0;\n $nreg = array();\n for ($c = 0; $c < $nc; $c ++) {\n $exp = $linhas[$c];\n $exp = $exp[\"expressao\"];\n if ($exp !== \"\") {\n if ($this->layer->connectiontype == MS_POSTGIS) {\n $exp = str_replace(\"eq\", \" = \", $exp);\n $exp = str_replace(\"ne\", \" != \", $exp);\n $exp = str_replace(\"lt\", \" < \", $exp);\n $exp = str_replace(\"gt\", \" < \", $exp);\n $exp = str_replace(\"(\", \"\", $exp);\n $exp = str_replace(\")\", \"\", $exp);\n $exp = str_replace(\"'[\", \"\", $exp);\n $exp = str_replace(\"]'\", \"\", $exp);\n $exp = str_replace(\"' [\", \"\", $exp);\n $exp = str_replace(\"] '\", \"\", $exp);\n $exp = str_replace(\"and\", \" and \", $exp);\n $exp = str_replace(\"or\", \" or \", $exp);\n $exp = str_replace(\"[\", \"\", $exp);\n $exp = str_replace(\"]\", \"\", $exp);\n }\n $teste = $layer->queryByAttributes($itens[0], $exp, 1);\n if ($teste != MS_SUCCESS) {\n $teste = $layer->queryByAttributes($itens[0], mb_convert_encoding($exp, \"ISO-8859-1\", \"UTF-8\"), 1);\n }\n if ($teste != MS_SUCCESS) {\n $teste = $layer->queryByAttributes($itens[0], mb_convert_encoding($exp, \"UTF-8\", \"ISO-8859-1\"), 1);\n }\n } else {\n $teste = 0;\n }\n if ($teste == MS_SUCCESS) {\n $n = $layer->getNumResults();\n $nreg[] = $n;\n } else {\n $nreg[] = \"erro\";\n }\n $total = $total + $n;\n }\n $layer->close();\n for ($c = 0; $c < $nc; $c ++) {\n $classe = $layer->getclass($c);\n $nome = $linhas[$c][\"nomeclasse\"];\n $nome = explode(\" - n=\", $nome);\n $nome = $nome[0] . \" - n=\" . $nreg[$c] . \"(\" . (round(($nreg[$c] * 100 / $total))) . \"%)\";\n $classe->set(\"name\", $nome);\n $linhas[$c][\"nomeclasse\"] = $nome;\n $linhas[$c][\"nreg\"] = $nreg[$c];\n $linhas[$c][\"totalreg\"] = $total;\n }\n }\n if ($layer->type == MS_LAYER_RASTER && $nc == 1) {\n $proc = \"\";\n $linhas = array();\n if ($layer->num_processing > 0) {\n $proc = $layer->getProcessing();\n }\n if ($layer->type == MS_LAYER_RASTER && $proc == \"\") {\n $proc = array(\n \"RESAMPLE=NEAREST\"\n );\n }\n $linhas[] = array(\n \"tema\" => $l,\n \"idclasse\" => \"\",\n \"nomeclasse\" => \"\",\n \"expressao\" => \"\",\n \"imagem\" => \"\",\n \"proc\" => $proc,\n \"minScale\" => 0,\n \"maxScale\" => 0\n );\n }\n }\n }\n return $linhas;\n }",
"function convert_pnml_to_lola($pnml_filename) {\n global $output;\n \n $return_code = null;\n $process_output = [];\n \n exec($petri . \" -ipnml -olola \".$pnml_filename, $process_output, $return_code);\n if ($return_code != 0) {\n foreach ($process_output as $line) {\n $output[\"petri_output\"][] = htmlspecialchars($line);\n }\n terminate(\"petri exited with status \" . $return_code . \" -- probably the input is malformed.\");\n }\n \n $lola_filename = $pnml_filename . \".lola\";\n return $lola_filename;\n }",
"public function getLly() {}",
"function Linha(){\n\t\tswitch ($this->intBanco){\n\t\t\tcase INT_SQLSERVER:\n\t\t\t\t$this->rs = mssql_fetch_array($this->cursor);\n\t\t\t\t$a1 = $this->rs;\n\t\t\t\tbreak;\n\t\t\tcase INT_ORACLE:\n\t\t\t\t$a1 = oci_fetch_array ($this->cursor, OCI_BOTH);\n\t\t\t\t$this->rs = $a1;\n\t\t\t\tif ($this->rs == false){\n\t\t\t\t\t$this->liberaStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase INT_POSTGRE:\n\t\t\t\t$this->rs = pg_fetch_array($this->cursor);\n\t\t\t\t$a1 = $this->rs;\n\t\t\t\tbreak;\n\t\t\tcase INT_MYSQL:\n\t\t\t\t$this->rs = mysql_fetch_array($this->cursor, MYSQL_BOTH);\n\t\t\t\t$a1 = $this->rs;\n\t\t\t\tbreak;\n\t\t}\n\t\t//echo \"Cria Linha <br />\";\n\t\treturn $a1;\n\t}",
"public function laporanPilih()\n {\n $laporan_status = 'pantau_individual';\n $status = User::select('status')->where('status','<>','super_admin')->where('status','<>','direktur')->groupBy('status')->get();\n return view('admin.laporanPilih',compact(['status','laporan_status']));\n }",
"public function videoconferenciaLlamando( ) {\n $this->setComando(\"LLAMANDO\");\n }",
"private function findLapsoModel()\r\n\t\t{\r\n\t\t\treturn PagoDetalle::find()->alias('D')\r\n\t\t\t\t\t\t\t\t\t ->where('id_impuesto=:id_impuesto',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t[':id_impuesto' => $this->_objeto->id_impuesto])\r\n\t\t\t\t\t\t\t\t\t ->andWhere(['IN', 'pago', [0, 1, 7]])\r\n\t\t\t\t\t\t\t\t\t ->andWhere('trimestre >:trimestre',['trimestre' => 0])\r\n\t\t\t\t\t\t\t\t\t ->andWhere('impuesto =:impuesto',[':impuesto' => self::IMPUESTO])\r\n\t\t\t\t\t\t\t\t\t ->joinWith('pagos P', true, 'INNER JOIN')\r\n\t\t\t\t\t\t\t\t\t ->joinWith('exigibilidad E')\r\n\t\t\t\t\t\t\t\t\t ->joinWith('estatus S', true, 'INNER JOIN')\r\n\t\t\t\t\t\t\t\t\t ->orderBy([\r\n\t\t\t\t\t\t\t\t\t \t\t'ano_impositivo' => SORT_DESC,\r\n\t\t\t\t\t\t\t\t\t \t\t'trimestre' => SORT_DESC,\r\n\t\t\t\t\t\t\t\t\t \t]);\r\n\t\t}",
"public function getMataPelajaran();",
"function llenarMatrizPlaneServicios(){\n\t\t\t\n\t\t\tunset($matriz); \n\t\t\tglobal $matriz;\t\n\t\t\t$res = llamarRegistrosMySQLPlaneServicios();\n\t\t\t$posicion=0;\n\t\t\t\t\n\t\t\t\twhile ($fila = mysql_fetch_array($res))\n\t\t\t\t{\t\n\t\t\t\t\t\n\t\t\t\t\t$matriz[\"nombreplan\"][$posicion] = $fila[\"Nombre\"];\n\t\t\t\t\t$matriz[\"autoid\"][$posicion] = $fila[\"AutoId\"];\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$posicion++;\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t}",
"public function laporan()\n {\n return $this->hasMany(Laporan::class, 'id_kegiatan');\n }",
"public static function inferensi($nilaiIPK, $nilaiPenghasilan, $nilaiJarak, $nilaiTanggungan, $nilaiRumah, $nilaiMotor, $nilaiMobil, $nilaiListrik, $nilaiAir) {\n\n echo \"Rule yang digunakan : \\n\";\n $x = 0;\n $kondisi = [];\n\n for ($ip = 0; $ip < count($nilaiIPK); $ip++) {\n for ($pn = 0; $pn < count($nilaiPenghasilan); $pn++) {\n for ($jr = 0; $jr < count($nilaiJarak); $jr++) {\n for ($tg = 0; $tg < count($nilaiTanggungan); $tg++) {\n for ($rm = 0; $rm < count($nilaiRumah); $rm++) {\n for ($mt = 0; $mt < count($nilaiMotor); $mt++) {\n for ($mb = 0; $mb < count($nilaiMobil); $mb++) {\n for ($ls = 0; $ls < count($nilaiListrik); $ls++) {\n for ($ai = 0; $ai < count($nilaiAir); $ai++) {\n if (($nilaiIPK[$ip] > 0) && ($nilaiPenghasilan[$pn] > 0) && ($nilaiJarak[$jr] > 0) && ($nilaiTanggungan[$tg] > 0) && ($nilaiRumah[$rm] > 0) && ($nilaiMotor[$mt] > 0) && ($nilaiMobil[$mb] > 0) && ($nilaiListrik[$ls] > 0) && ($nilaiAir[$ai] > 0)) {\n $alpha[$x] = min($nilaiIPK[$ip], $nilaiPenghasilan[$pn], $nilaiJarak[$jr], $nilaiTanggungan[$tg], $nilaiRumah[$rm], $nilaiMotor[$mt], $nilaiMobil[$mb], $nilaiListrik[$ls], $nilaiAir[$ai]);\n if ($ip == 2 && $jr == 2 && $pn == 1 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 2 && $pn == 1 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 2 && $pn == 0 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 2 && $pn == 0 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 1 && $pn == 1 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 1 && $pn == 1 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 1 && $pn == 0 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 1 && $pn == 0 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 0 && $pn == 1 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 0 && $pn == 1 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 0 && $pn == 0 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 0 && $pn == 0 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else {\n $z[$x] = self::z_tidakDapat($alpha, $x);\n $kondisi[$x] = \"tidak dapat\";\n }\n echo \"IF IPK = {$nilaiIPK[$ip]} AND Penghasilan = {$nilaiPenghasilan[$pn]} AND Jarak = {$nilaiJarak[$jr]} AND Tanggungan = {$nilaiTanggungan[$tg]} AND Rumah = {$nilaiRumah[$rm]} AND Motor = {$nilaiMotor[$mt]} AND Mobil = {$nilaiMobil[$mb]} AND Listrik = {$nilaiListrik[$ls]} AND Air = {$nilaiAir[$ai]} THEN a_predikat = {$alpha[$x]} z = {$z[$x]} kondisi = {$kondisi[$x]} \\n\";\n $x++;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n self::defuzzifikasi($alpha, $z);\n }",
"function dividirPalabraEnLetras($palabra){\n \n /*>>> Completar para generar la estructura de datos b) indicada en el enunciado. \n recuerde que los string pueden ser recorridos como los arreglos. <<<*/\n \n}",
"function xVoisinDroite($x, $y, $largeurPlateau, $hauteurPlateau, $tab_plateau) {\r\n //error_log(var_export(\"xVoisinDroite(\".$x.\", \".$y.\", \".$largeurPlateau.\", \".$hauteurPlateau.\")\", true));\r\n //error_log(var_export($tab_plateau, true));\r\n $xRetour = -1;\r\n $i = $x + 1;\r\n while (($i < $largeurPlateau) && ($xRetour == -1)) {\r\n //error_log(var_export(\"i: \".$i.\", y: \".$y.\" => \".$tab_plateau[$y][$i], true));\r\n if ($tab_plateau[$y][$i] == \"0\") {\r\n $xRetour = $i;\r\n }\r\n $i++;\r\n }\r\n \r\n return $xRetour;\r\n}",
"public function matricular(Aluno $a){\n $this->alunos[] = $a;\n \n }",
"function mod_l_luv($delta_l) {\n\t\t$luv=$this->get_luv();\n\t\t$l=$luv[0];\n\t\tif ($delta_l>0)\n\t\t\t$l=$l+(1-$l)*(($delta_l>1)?1:$delta_l);\n\t\tif ($delta_l<0)\n\t\t\t$l=-$l*(($delta_l<-1)?-1:$delta_l);\n\t\t$this->set_from_luv($l,$luv[1],$hsl[2]);\n\t}",
"public function laporan()\n\t{\n\n\t\t$data['halaman'] = 'view_laporan';\n\t\t$this->load->view('admin/page', $data);\n\t}",
"public function getParcela()\n {\n return $this->parcela;\n }",
"function compte_planet($iduser, $nbpla, $game)\r\n{\r\n\r\n\tglobal $user_data, $mod_flottes_lang, $db, $members_data, $table_prefix, $nb_planet;\r\n\r\n\tif (!isset($nbpla) || $nbpla == 0) $nbpla = $nb_planet;\r\n\r\n\t$request = \"select planet_id \";\r\n\t$request .= \" from \" . TABLE_USER_BUILDING;\r\n\t$request .= \" where user_id = \" . $iduser;\r\n\t$request .= \" and planet_id < 299 \";\r\n\t$request .= \" order by planet_id\";\r\n\r\n\t$result = $db->sql_query($request);\r\n\r\n\t$nbplanet = $db->sql_numrows($result);\r\n\r\n\tif ($nbplanet < $nbpla) {\r\n\t\t$page = 0;\r\n\t} elseif ($game == 'OGAME') {\r\n\t\t$page = 1;\r\n\t} else {\r\n\t\t$page = floor($nbplanet / $nbpla);\r\n\t}\r\n\r\n\t$nbpla++;\r\n\t$col = floor($nbpla / ($page + 1));\r\n\t$affpla = array($nbplanet, $page, $col, $nbpla);\r\n\treturn $affpla;\r\n}",
"function LANDINGSIDE($pid,$posx,$posz){\n// =69.GIAP=TUSHKA\n// 2011-2014\n// BOSWAR version 1.03\n// May 16, 2014\n\n\tglobal $PLID; // player plane id \n\tglobal $numplayers; // number of players\n\tglobal $Pline; // lines that define players\n\tglobal $COUNTRY; // country ID\n\tglobal $CoalID; // coalition ID\n\tglobal $numiaheaders; // number of influence area headers\n\tglobal $IAHline; // lines defining Influence Area Headers\n\tglobal $numB; // number of boundary definitions\n\tglobal $Bline; // lines defining area boundaries\n\tglobal $AID; // area ID in this context\n\tglobal $BoundaryArray; // array of point pairs defining a boundary\n\n\tif ($numiaheaders < 2 ) { // don't have two sides\n\t\t$side = \"neutral\";\n\t\treturn $side;\n\t}\n\n\t// format location the way the pointLocation class needs\n\t$location = \"$posx $posz\";\n\n\t// get player's country from PLAYERPLANE lines\n\t// loop through PLAYERPLANE lines to get the country.\n\tfor ($i = 0; $i < $numplayers; ++$i) {\n\t\t$j = $Pline[$i];\n\t\tif ( $pid == $PLID[$j] ) {\n\t\t\t$pcountry = $COUNTRY[$j];\n\t\t}\n\t}\n\n\t// get playerplane's coalition\n\tCOALITION($pcountry); \n\t$pcoalition = $CoalID;\n//\techo \"LANDINGSIDE A: pcountry = $pcountry, pcoalition = $pcoalition<br>\\n\";\n\n\t// get influence areas' countries and coalitions \n\t// get country of each area\n\tfor ($i = 0; $i < $numB; ++$i) {\n\t\t$j = $Bline[$i];\n\t\tfor ($k = 0; $k < $numB; ++$k) { // peek at each of the IAHlines\n\t\t\t$l = $IAHline[$k];\n//\t\t\techo \"LANDINGSIDE B0: i = $i, AreaID[$i] = $AID[$j]<br>\\n\";\n//\t\t\techo \"LANDINGSIDE B0.1: IAHeader AreaID[$i] = $AID[$l]<br>\\n\";\n\t\t\tif ($AID[$j] == $AID[$l]) {\n//\t\t\t\techo \"LANDINGSIDE B0.2: $AID[$j] = $AID[$l]<br>\\n\";\n//\t\t\t\techo \"LANDINGSIDE B0.3: k=$k, l=$l, COUNTRY[l]=$COUNTRY[$l]<br>\\n\";\n\t\t\t\tif (isset($COUNTRY[$l])) {\n\t\t\t\t\t@$acountry[$k] == $COUNTRY[$l]; // @ suppresses notices\n\t\t\t\t\tCOALITION($COUNTRY[$l]); \n\t\t\t\t\t$acoalition[$k] = $CoalID;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n//\t\techo \"LANDINGSIDE B1: i = $i, AreaID[$i] = $AID[$j]<br>\\n\";\n//\t\techo \"LANDINGSIDE B2: areacountry[$i] = $acluntry[$i], acoalition[$i] = $acoalition[$i]<br>\\n\";\n\t}\n\n\t// New logic\n\t// loop through defined boundaries using the $numB index\n\n\tfor ($i = 0; $i < $numB; ++$i) {\n\t\t// define the current polygon\n\t\t$polygon = $BoundaryArray[$i];\n\n\t\t// Now test whether landed inside this polygon\n// in situ test: \"20 20\" is \"inside\" this polygon\n//$polygon = array(\"10 0\", \"0 10\", \"0 20\", \"10 30\", \"20 30\", \"30 20\", \"30 10\", \"20 0\", \"10 0\");\n//$location = \"20 20\";\n\t\t$pointLocation = new pointLocation();\n//\t\techo \"($location) is \" . $pointLocation->pointInPolygon($location, $polygon) . \"<br>\";\n\t\t$place = $pointLocation->pointInPolygon($location, $polygon);\n\n\t\t// interpret result\n\t\tif ($place == \"inside\") {\n//\t\t\techo \"i = $i ,LANDINGSIDE reports inside.<br>\\n\";\n\t\t\tif ($pcoalition == @$acoalition[$i]) { // @ suppresses notices\n\t\t\t\t$side = \"friendly\"; \n\t\t\t\t$i = $numB; // we are done\n\t\t\t\t$k = $numB; // we are done\n\t\t\t} else {\n\t\t\t\t$side = \"enemy\"; \n\t\t\t\t$i = $numB; // we are done\n\t\t\t\t$k = $numB; // we are done\n\t\t\t}\n\t\t} else { // if not in either area, must be neutral\n\t\t\t$side = \"neutral\"; // but keep checking until done\n\t\t}\n\t}\n//\techo \"LANDINGSIDE reports $side<br>\\n\";\n\treturn $side;\n}",
"protected function _getLancamento(){\n if (!is_object($this->_lancamento)){\n $this->_lancamento = new Financeiro_Model_Lancamento_Mapper();\n }\n return $this->_lancamento;\n }",
"public function getLadas()\n {\n try {\n\n $conn = $this->makeConn->makeConnection();\n\n $res = $conn->query('select * from Ladas;');\n\n $array_result = [];\n\n foreach ($res->fetchAll() as $item) {\n array_push(\n $array_result,\n [\n 'lada' => $item['lada'],\n 'city' => $item['city'],\n 'state' => $item['state'],\n 'lada' => $item['lada'],\n 'id' => $item['id']\n ]\n );\n }\n\n echo json_encode($array_result);\n } catch (Exception $e) {\n echo 'Ocurrió un error al obtener las ladas';\n }\n }",
"function get_status_lima($nilai) {\r\n\t\t\r\n\t\tif ($nilai < 0.6)\r\n\t\t\t$hasil = \"LoS A\";\r\n\t\telse if ($nilai >= 0.6 && $nilai < 0.7)\r\n\t\t\t$hasil = \"LoS B\";\r\n\t\telse if ($nilai >= 0.7 && $nilai < 0.8)\r\n\t\t\t$hasil = \"LoS C\";\r\n\t\telse if ($nilai >= 0.8 && $nilai < 0.9)\r\n\t\t\t$hasil = \"LoS D\";\r\n\t\telse if ($nilai >= 0.9 && $nilai < 1.0)\r\n\t\t\t$hasil = \"LoS E\";\r\n\t\telse if ($nilai >= 1.0)\r\n\t\t\t$hasil = \"LoS F\";\r\n\r\n\t\treturn $hasil;\r\n\t}",
"public function keliling()\n {\n return 2*($this->panjang + $this->lebar);\n }",
"public function tampilDataGalang(){\n\t\t\n\t}",
"public function lap( $name = null ) {\n $lapTime = $this->getCurrentTime();\n\n # end the last lap\n $this->endLap();\n\n # Create new lap\n $this->laps[] = array(\n \"name\" => ( $name ? $name : $this->lapCount ),\n \"start\" => $lapTime,\n \"end\" => -1,\n \"total\" => -1,\n );\n\n $this->lapCount += 1;\n }",
"public function nuevap5()\n {\n \t$sitios=request('pois');\n $mod=session('mod');\n $consult=DB::select('select poi.id_poi,poi.tiempoestancia,poi.nombre as pn,poi.coordenaday as cy,poi.coordenadax as cx\n from poi where poi.id_poi in('.$sitios.')');\n $poi=explode(\",\",$sitios);\n $cd=[];\n $pois=array();\n $ban=9999999;\n $vmin=[];\n for ($i=0; $i <count($poi); $i++) { \n foreach ($consult as $key) {\n if ($poi[$i]==$key->id_poi) {\n $cd[]=$key->cy.','.$key->cx;\n $this->pn[$key->id_poi]=$key->pn.\" \";\n }\n }\n }\n for($a=0;$a<count($cd);$a++){\n for ($b=0;$b<count($cd);$b++) { \n if ($a==$b) {\n $pois[$a][$b]=-1;\n }else{\n // se arma la tabla de distancias con todos los puntos de interes que pasaron los filtros anteriores\n $data = file_get_contents('https://api.mapbox.com/optimized-trips/v1/mapbox/'.$mod.'/'.$cd[$a].';'.$cd[$b].'?access_token=pk.eyJ1IjoidHVyaXN0cm91dGUiLCJhIjoiY2tuYjY3N2t4MDR5MjJ2cGhyYjFibGc1YSJ9.VhhVvZdDGKvZG75AhvHWsw', null, stream_context_create([\n 'http' => [\n 'header' => [\n 'Connection: close',],],]));\n $data=json_decode($data);\n \n $pois[$a][$b]=$data->trips[0]->distance; \n }\n }\n \n }\n for ($i=0; $i <count($pois) ; $i++) { \n for ($j=0; $j <count($pois) ; $j++) { \n if ($i!=$j) {\n if (bccomp($pois[$i][$j],$ban,10)==-1) {\n $min=($pois[$i][$j]);\n $ban=($pois[$i][$j]);\n }\n }\n }\n \n $vmin[]=$min;\n $ban=99999999;\n }\n for ($i=0; $i <count($pois) ; $i++) { \n for ($j=0; $j <count($pois) ; $j++) {\n if ($i!=$j) {\n $pois[$i][$j]=($pois[$i][$j])-$vmin[$i];\n }\n\n }}\n $vmin=[];\n for ($i=0; $i <count($pois) ; $i++) { \n for ($j=0; $j <count($pois) ; $j++) { \n if ($j!=$i) {\n if (bccomp($pois[$j][$i],$ban,10)==-1) {\n $min=($pois[$j][$i]);\n $ban=($pois[$j][$i]);\n }\n }\n }\n $vmin[]=$min;\n $ban=99999999;\n }\n for ($i=0; $i <count($pois) ; $i++) { \n for ($j=0; $j <count($pois) ; $j++) { \n if ($j!=$i) {\n $pois[$j][$i]=($pois[$j][$i])-$vmin[$i];\n }\n }\n } \n\n $a=0;\n // Luego de eliminar de la tabla de distancias los caminos mas largos,se envia la matriz al metodo formar_posi\n $this->lista_rutas[] = new route();\n $this->n_poi=count($poi);\n $this->poi=$poi;\n $this->matriz=$pois; \n $this->poi_conectados[] = new Conexion(); \n for($i = 0; $i < count($this->matriz); $i++) {\n $poi_c = new Conexion();\n for ($j = 0; $j < count($this->matriz); $j++) {\n if ($this->matriz[$i][$j]!=\"-1\") { \n $poi_c->setConexiones($j);\n $poi_c->setValor($this->matriz[$i][$j]);\n \n }\n }\n $this->poi_conectados[]=($poi_c);\n \n }\n \n $this->formar_posi($x=Array(),$y=Array(), 0, \"0\");\n //Finalmente envia al recorrido a la siguiente vista\n $result=$this->rutas_aptas();\n return view('guardarr')->with('rt',$result)->with('p',$this->pn);\n\n }",
"function getAllLeaflets(){\n\t\t//$queryEbsLeaflets = db_select('ebs_leaflets_final_static', 'elf')\n\t\t$queryEbsLeaflets = db_select('ebs_leaflets_final', 'elf')\n\t\t->fields('elf');\n\t\t//->condition('leaflet_code', 'L16302');//Plastering\n\t\t//->range(0,10);\n\t\t$results = $queryEbsLeaflets->execute();\n\t\t//dsm($results->rowCount());\n\t\t\n\t\tforeach ($results as $row) :\n\t\t\t$this->leaflets[$row->leaflet_code] = $row;\n\t\tendforeach;\n\t\t\n\t}",
"private function getLigado()\n {\n return $this->ligado;\n }",
"public function llamadas( $llamadas ) {\n $this->setComando(\"LLAMADAS:LISTA\",$llamadas);\n }",
"public function listarlapaz(){\n $persona=\"SELECT p.*,c.nombre as caja FROM persona as p\n LEFT JOIN cajalapaz as c ON c.id=p.id_caja where p.ciudad='lapaz' AND p.estado=1\";\n $bajas=\"SELECT p.*,c.nombre as caja FROM persona as p\n LEFT JOIN cajalapazretirado as c ON c.id=p.id_caja where p.ciudad='lapaz' AND p.estado=0\";\n $cajas=\"SELECT * FROM cajalapaz WHERE estado = 1\";\n $cajaretirados=\"SELECT * FROM cajalapazretirado WHERE estado = 1\";\n $result=[\n \"personal\"=> parent::consultaRetorno($persona),\n \"bajas\"=>parent::consultaRetorno($bajas),\n \"cajas\"=>parent::consultaRetorno($cajas),\n \"cajasretirados\"=>parent::consultaRetorno($cajaretirados)\n ];\n return $result;\n }",
"function redfearnGridtoLLDebug($Easting, $Northing, $Zone = 55, $TmDefinition = \"GDA-MGA\")\n{\n switch ($TmDefinition) {\n case \"GDA-MGA\":\n $FalseEasting = 500000.0000;\n $FalseNorthing = 10000000.0000;\n $CentralScaleFactor = 0.9996;\n $ZoneWidthDegrees = 6;\n $LongitudeOfTheCentralMeridianOfZone1Degrees = -177;\n $EllipsoidDefinition = \"GRS80\";\n break;\n default:\n $TmDefinition = \"GDA-MGA\";\n $FalseEasting = 500000.0000;\n $FalseNorthing = 10000000.0000;\n $CentralScaleFactor = 0.9996;\n $ZoneWidthDegrees = 6;\n $LongitudeOfTheCentralMeridianOfZone1Degrees = -177;\n $EllipsoidDefinition = \"GRS80\";\n }\n\n switch ($EllipsoidDefinition) {\n case \"GRS80\":\n $SemiMajorAxis = 6378137.000;\n $InverseFlattening = 298.257222101000;\n break;\n default:\n $EllipsoidDefinition = \"GRS80\";\n $SemiMajorAxis = 6378137.000;\n $InverseFlattening = 298.257222101000;\n }\n\n $Flattening = 1 / $InverseFlattening;\n $SemiMinorAxis = $SemiMajorAxis * (1 - $Flattening);\n $Eccentricity = (2 * $Flattening) - ($Flattening * $Flattening);\n $n = ($SemiMajorAxis - $SemiMinorAxis) / ($SemiMajorAxis + $SemiMinorAxis);\n $n2 = pow($n, 2);\n $n3 = pow($n, 3);\n $n4 = pow($n, 4);\n $G = $SemiMajorAxis * (1 - $n) * (1 - $n2) * (1 + (9 * $n2) / 4 + (225 * $n4) / 64) * PI() / 180;\n $LongitudeOfWesternEdgeOfZoneZeroDegrees = $LongitudeOfTheCentralMeridianOfZone1Degrees - (1.5 * $ZoneWidthDegrees);\n $CentralMeridianOfZoneZeroDegrees = $LongitudeOfWesternEdgeOfZoneZeroDegrees + ($ZoneWidthDegrees / 2);\n\n\techo(\"Flattening = $Flattening<br>\");\n\techo(\"SemiMinorAxis = $SemiMinorAxis<br>\");\n\techo(\"Eccentricity = $Eccentricity<br>\");\n\techo(\"n = $n<br>\");\n\techo(\"n2 = $n2<br>\");\n\techo(\"n3 = $n3<br>\");\n\techo(\"n4 = $n4<br>\");\n\techo(\"G = $G<br>\");\n\techo(\"LongitudeOfWesternEdgeOfZoneZeroDegrees = $LongitudeOfWesternEdgeOfZoneZeroDegrees<br>\");\n\techo(\"CentralMeridianOfZoneZeroDegrees = $CentralMeridianOfZoneZeroDegrees<br>\");\n\n $NewE = ($Easting - $FalseEasting);\n $NewEScaled = $NewE / $CentralScaleFactor;\n $NewN = ($Northing - $FalseNorthing);\n $NewNScaled = $NewN / $CentralScaleFactor;\n $Sigma = ($NewNScaled * PI()) / ($G * 180);\n $Sigma2 = 2 * $Sigma;\n $Sigma4 = 4 * $Sigma;\n $Sigma6 = 6 * $Sigma;\n $Sigma8 = 8 * $Sigma;\n\n\techo(\"NewE = $NewE<br>\");\n\techo(\"NewEScaled = $NewEScaled<br>\");\n\techo(\"NewN = $NewN<br>\");\n\techo(\"NewNScaled = $NewNScaled<br>\");\n\techo(\"Sigma = $Sigma<br>\");\n\techo(\"Sigma2 = $Sigma2<br>\");\n\techo(\"Sigma4 = $Sigma4<br>\");\n\techo(\"Sigma6 = $Sigma6<br>\");\n\techo(\"Sigma8 = $Sigma8<br>\");\n\n $FootPointLatitudeTerm1 = $Sigma;\n $FootPointLatitudeTerm2 = ((3 * $n / 2) - (27 * $n3 / 32)) * sin($Sigma2);\n $FootPointLatitudeTerm3 = ((21 * $n2 / 16) - (55 * $n4 / 32)) * sin($Sigma4);\n $FootPointLatitudeTerm4 = (151 * $n3) * sin($Sigma6) / 96;\n $FootPointLatitudeTerm5 = 1097 * $n4 * sin($Sigma8) / 512;\n $FootPointLatitude = $FootPointLatitudeTerm1 + $FootPointLatitudeTerm2 + $FootPointLatitudeTerm3 + $FootPointLatitudeTerm4 + $FootPointLatitudeTerm5;\n\n\techo(\"FootPointLatitudeTerm1 = $FootPointLatitudeTerm1<br>\");\n\techo(\"FootPointLatitudeTerm2 = $FootPointLatitudeTerm2<br>\");\n\techo(\"FootPointLatitudeTerm3 = $FootPointLatitudeTerm3<br>\");\n\techo(\"FootPointLatitudeTerm4 = $FootPointLatitudeTerm4<br>\");\n\techo(\"FootPointLatitudeTerm5 = $FootPointLatitudeTerm5<br>\");\n\techo(\"FootPointLatitude = $FootPointLatitude<br>\");\n\t\n $SinFootPointLatitude = sin($FootPointLatitude);\n $SecFootPointLatitude = 1 / cos($FootPointLatitude);\n\n\techo(\"SinFootPointLatitude = $SinFootPointLatitude<br>\");\n\techo(\"SecFootPointLatitude = $SecFootPointLatitude<br>\");\n\n $Rho = $SemiMajorAxis * (1 - $Eccentricity) / pow(1 - $Eccentricity * pow($SinFootPointLatitude, 2), 1.5);\n $Nu = $SemiMajorAxis / pow(1 - $Eccentricity * pow($SinFootPointLatitude, 2), 0.5);\n\n\techo(\"Rho = $Rho<br>\");\n\techo(\"Nu = $Nu<br>\");\n\n $x1 = $NewEScaled / $Nu;\n $x3 = pow($x1, 3);\n $x5 = pow($x1, 5);\n $x7 = pow($x1, 7);\n\t\n\techo(\"x1 = $x1<br>\");\n\techo(\"x3 = $x3<br>\");\n\techo(\"x5 = $x5<br>\");\n\techo(\"x7 = $x7<br>\");\n\n $t1 = tan($FootPointLatitude);\n $t2 = pow($t1, 2);\n $t4 = pow($t1, 4);\n $t6 = pow($t1, 6);\n\n\techo(\"t1 = $t1<br>\");\n\techo(\"t2 = $t2<br>\");\n\techo(\"t4 = $t4<br>\");\n\techo(\"t6 = $t6<br>\");\n\n $Psi1 = $Nu / $Rho;\n $Psi2 = pow($Psi1, 2);\n $Psi3 = pow($Psi1, 3);\n $Psi4 = pow($Psi1, 4);\n\n\techo(\"Psi1 = $Psi1<br>\");\n\techo(\"Psi2 = $Psi2<br>\");\n\techo(\"Psi3 = $Psi3<br>\");\n\techo(\"Psi4 = $Psi4<br>\");\n\n $LatitudeTerm1 = -(($t1 / ($CentralScaleFactor * $Rho)) * $x1 * $NewE / 2);\n $LatitudeTerm2 = ($t1 / ($CentralScaleFactor * $Rho)) * ($x3 * $NewE / 24) * (-4 * $Psi2 + 9 * $Psi1 * (1 - $t2) + 12 * $t2);\n $LatitudeTerm3 = -($t1 / ($CentralScaleFactor * $Rho)) * ($x5 * $NewE / 720) * (8 * $Psi4 * (11 - 24 * $t2) - 12 * $Psi3 * (21 - 71 * $t2) + 15 * $Psi2 * (15 - 98 * $t2 + 15 * $t4) + 180 * $Psi1 * (5 * $t2 - 3 * $t4) + 360 * $t4);\n $LatitudeTerm4 = ($t1 / ($CentralScaleFactor * $Rho)) * ($x7 * $NewE / 40320) * (1385 + 3633 * $t2 + 4095 * $t4 + 1575 * $t6);\n $LatitudeRadians = $FootPointLatitude + $LatitudeTerm1 + $LatitudeTerm2 + $LatitudeTerm3 + $LatitudeTerm4;\n $LatitudeDegrees = ($LatitudeRadians / PI()) * 180;\n\n\techo(\"LatitudeTerm1 = $LatitudeTerm1<br>\");\n\techo(\"LatitudeTerm2 = $LatitudeTerm2<br>\");\n\techo(\"LatitudeTerm3 = $LatitudeTerm3<br>\");\n\techo(\"LatitudeTerm4 = $LatitudeTerm4<br>\");\n\techo(\"LatitudeRadians = $LatitudeRadians<br>\");\n\techo(\"LatitudeDegrees = $LatitudeDegrees<br>\");\n\t\n $CentralMeridianDegrees = ($Zone * $ZoneWidthDegrees) + $LongitudeOfTheCentralMeridianOfZone1Degrees - $ZoneWidthDegrees;\n $CentralMeridianRadians = ($CentralMeridianDegrees / 180) * PI();\n $LongitudeTerm1 = $SecFootPointLatitude * $x1;\n $LongitudeTerm2 = -$SecFootPointLatitude * ($x3 / 6) * ($Psi1 + 2 * $t2);\n $LongitudeTerm3 = $SecFootPointLatitude * ($x5 / 120) * (-4 * $Psi3 * (1 - 6 * $t2) + $Psi2 * (9 - 68 * $t2) + 72 * $Psi1 * $t2 + 24 * $t4);\n $LongitudeTerm4 = -$SecFootPointLatitude * ($x7 / 5040) * (61 + 662 * $t2 + 1320 * $t4 + 720 * $t6);\n $LongitudeRadians = $CentralMeridianRadians + $LongitudeTerm1 + $LongitudeTerm2 + $LongitudeTerm3 + $LongitudeTerm4;\n $LongitudeDegrees = ($LongitudeRadians / PI()) * 180;\n\n\techo(\"CentralMeridianDegrees = $CentralMeridianDegrees<br>\");\n\techo(\"CentralMeridianRadians = $CentralMeridianRadians<br>\");\n\techo(\"LongitudeTerm1 = $LongitudeTerm1<br>\");\n\techo(\"LongitudeTerm2 = $LongitudeTerm2<br>\");\n\techo(\"LongitudeTerm3 = $LongitudeTerm3<br>\");\n\techo(\"LongitudeTerm4 = $LongitudeTerm4<br>\");\n\techo(\"LongitudeRadians = $LongitudeRadians<br>\");\n\techo(\"LongitudeDegrees = $LongitudeDegrees<br>\");\n\t\n $GridConvergenceTerm1 = -($x1 * $t1);\n $GridConvergenceTerm2 = ($t1 * $x3 / 3) * (-2 * $Psi2 + 3 * $Psi1 + $t2);\n $GridConvergenceTerm3 = -($t1 * $x5 / 15) * ($Psi4 * (11 - 24 * $t2) - 3 * $Psi3 * (8 - 23 * $t2) + 5 * $Psi2 * (3 - 14 * $t2) + 30 * $Psi1 * $t2 + 3 * $t4);\n $GridConvergenceTerm4 = ($t1 * $x7 / 315) * (17 + 77 * $t2 + 105 * $t4 + 45 * $t6);\n $GridConvergenceRadians = $GridConvergenceTerm1 + $GridConvergenceTerm2 + $GridConvergenceTerm3 + $GridConvergenceTerm4;\n $GridConvergenceDegrees = ($GridConvergenceRadians / PI()) * 180;\n\n\techo(\"GridConvergenceTerm1 = $GridConvergenceTerm1<br>\");\n\techo(\"GridConvergenceTerm2 = $GridConvergenceTerm2<br>\");\n\techo(\"GridConvergenceTerm3 = $GridConvergenceTerm3<br>\");\n\techo(\"GridConvergenceTerm4 = $GridConvergenceTerm4<br>\");\n\techo(\"GridConvergenceRadians = $GridConvergenceRadians<br>\");\n\techo(\"GridConvergenceDegrees = $GridConvergenceDegrees<br>\");\n\t\n $PointScaleFactor1 = pow($NewEScaled, 2) / ($Rho*$Nu);\n $PointScaleFactor2 = pow($PointScaleFactor1, 2);\n $PointScaleFactor3 = pow($PointScaleFactor1, 3);\n $PointScaleTerm1 = 1 + $PointScaleFactor1 / 2;\n $PointScaleTerm2 = ($PointScaleFactor2 / 24) * (4 * $Psi1 * (1 - 6 * $t2) - 3 * (1 - 16 * $t2) - 24 * $t2 / $Psi1);\n $PointScaleTerm3 = $PointScaleFactor3 / 720;\n $PointScale = $CentralScaleFactor * ($PointScaleTerm1 + $PointScaleTerm2 + $PointScaleTerm3);\n\n\techo(\"PointScaleFactor1 = $PointScaleFactor1<br>\");\n\techo(\"PointScaleFactor2 = $PointScaleFactor2<br>\");\n\techo(\"PointScaleFactor3 = $PointScaleFactor3<br>\");\n\techo(\"PointScaleTerm1 = $PointScaleTerm1<br>\");\n\techo(\"PointScaleTerm2 = $PointScaleTerm2<br>\");\n\techo(\"PointScaleTerm3 = $PointScaleTerm3<br>\");\n\techo(\"PointScale = $PointScale<br>\");\n\t\n $Point[\"Latitude\"] = $LatitudeDegrees;\n $Point[\"Longitude\"] = $LongitudeDegrees;\n $Point[\"GridConvergence\"] = $GridConvergenceDegrees;\n $Point[\"PointScale\"] = $PointScale;\n\n return $Point;\n}",
"public function obtlamce($id_biopsia){\n $stmt=$this->objPDO->prepare(\"SELECT num_laminas from sisanatom.detalle_bioce where id_biopsia=:id_biopsia\");\n $stmt->execute(array('id_biopsia'=>$id_biopsia));\n $ltpq=$stmt->fetchAll(PDO::FETCH_OBJ);\n return $ltpq[0]->num_laminas;\n }",
"public function lu() {\n $ipiv = vector::factory($this->col, vector::INT);\n $ar = $this->copyMatrix();\n $lp = core\\lapack::sgetrf($ar, $ipiv);\n if ($lp != 0) {\n return null;\n }\n $l = self::factory($this->col, $this->col);\n $u = self::factory($this->col, $this->col);\n $p = self::factory($this->col, $this->col);\n for ($i = 0; $i < $this->col; ++$i) {\n for ($j = 0; $j < $i; ++$j) {\n $l->data[$i * $this->col + $j] = $ar->data[$i * $this->col + $j];\n }\n $l->data[$i * $this->col + $i] = 1.0;\n for ($j = $i + 1; $j < $this->col; ++$j) {\n $l->data[$i * $this->col + $j] = 0.0;\n }\n }\n for ($i = 0; $i < $this->col; ++$i) {\n for ($j = 0; $j < $i; ++$j) {\n $u->data[$i * $this->col + $j] = 0.0;\n }\n for ($j = $i; $j < $this->col; ++$j) {\n $u->data[$i * $this->col + $j] = $ar->data[$i * $this->col + $j];\n }\n }\n for ($i = 0; $i < $this->col; ++$i) {\n for ($j = 0; $j < $this->col; ++$j) {\n if ($j == $ipiv->data[$i] - 1) {\n $p->data[$i * $this->col + $j] = 1;\n } else {\n $p->data[$i * $this->col + $j] = 0;\n }\n }\n }\n unset($ar);\n unset($ipiv);\n return (object) ['l' => $l, 'u' => $u, 'p' => $p];\n }",
"public function layanannya($link_article){\n\t\treturn $this->getlayanan($link_article);\n\t}",
"function display($map,$longeur,$largeur)\n{\n for($x_x = 0 ; $x_x < $largeur ; $x_x++)\n {\n for($y_y = 0 ; $y_y < $longeur ; $y_y++)\n {\n echo \" \".$map[$x_x][$y_y].\" \";//affichage de la valeur\n }\n echo \"<br>\";\n }\n}",
"private function tauxGlobal ()\n {\n $lambda = 0;\n foreach ($this->anemones as $a) {\n $a_id = $a->getId();\n \n $t = $this->tauxAnemone($this->horloge, $a_id);\n $lambda += $t;\n }\n return $lambda;\n }",
"public function show(Plazomatricula $plazomatricula)\n {\n //\n }",
"function getPaal(){\r\n $this->sql = mysqli_query($this->conn, \"SELECT DISTINCT id, Adres, `Longitude`, `Latitude` FROM `paal` ORDER BY Adres\");\r\n\r\n if ($this->sql->num_rows > 0)\r\n {\r\n while($row = $this->sql->fetch_assoc()) {\r\n ?>\r\n <a href=\"?page=SelectPlace&id=?page=SelectPlace&id=<?php print $row[\"id\"]?>&kind=paal\" class=\"button\"><?php print $row[\"Adres\"]?></a>\r\n <br>\r\n <?php\r\n }\r\n }\r\n }",
"private function telaPerfilLoja()\r\n {\r\n //Carregando os anos do banco de dados\r\n $repositorio = $this->getDoctrine()->getRepository('DCPBundle:Quebra');\r\n\r\n $sql = $repositorio->createQueryBuilder('q')\r\n ->select('q.data')\r\n ->groupBy('q.data')\r\n ->getquery();\r\n\r\n $resultado = $sql->getResult();\r\n\r\n $anoGeral = array();\r\n $contAnoGeral = 0;\r\n foreach ($resultado as $data)\r\n {\r\n $anoGeral[$contAnoGeral] = $data[\"data\"]->format(\"Y\");\r\n $contAnoGeral++;\r\n }\r\n\r\n $ano = array();\r\n $contAno = 0;\r\n foreach ($anoGeral as $anoAPesquisar)\r\n {\r\n if (!in_array($anoAPesquisar, $ano))\r\n {\r\n $ano[$contAno] = $anoAPesquisar;\r\n $contAno++;\r\n }\r\n }\r\n\r\n return $ano;\r\n }",
"public function laporan($id=null){\n\t\t$sql = \"SELECT * FROM laporan\";\n\t\tif ($id !=null) {\n\t\t\t$sql .= \" WHERE id='$id' AND jenis_laporan='laporan_tahunan' ORDER BY id DESC\";\n\t\t}else{\n\t\t\t$sql .= \" WHERE jenis_laporan='laporan_tahunan' ORDER BY id DESC\";\n\t\t}\n\t\t$query = $this->db->query($sql) or die ($this->db->error);\n\t\treturn $query;\n\t}",
"function criaLegenda()\n {\n $l = \"\";\n $numlayers = $this->mapa->numlayers;\n if ($this->nome != \"\") {\n // verifica se é wms ou se o metadata legendaimg está definido\n $c = $this->layer->connectiontype;\n if ($c == 7 || $this->layer->getmetadata(\"legendaimg\") != \"\") {\n return ($this->tabelaLegenda());\n }\n for ($i = 0; $i < $numlayers; ++ $i) {\n $la = $this->mapa->getlayer($i);\n if ($la->name != $this->nome) {\n $la->set(\"status\", MS_OFF);\n }\n if ($la->group == $this->nome) {\n $la->set(\"status\", MS_DEFAULT);\n }\n $la->set(\"minscaledenom\", 0);\n $la->set(\"maxscaledenom\", 0);\n }\n $this->layer->set(\"status\", MS_DEFAULT);\n }\n $desligar = array();\n for ($i = 0; $i < $numlayers; ++ $i) {\n $la = $this->mapa->getlayer($i);\n if (strtoupper($la->getmetadata(\"ESCONDIDO\")) == \"SIM\") {\n $la->set(\"status\", MS_OFF);\n }\n $desligarLayer = array();\n if ($la->status == MS_DEFAULT) {\n $nc = $la->numclasses;\n for ($c = 0; $c < $nc; $c ++) {\n $classe = $la->getclass($c);\n if ($classe->status == MS_OFF) {\n $desligarLayer[] = $c;\n }\n // remove o offset em simbolos do tipo imagem\n if ($classe->numstyles > 0) {\n $estilo = $classe->getstyle(0);\n if ($estilo->symbolname != \"\" && file_exists($estilo->symbolname)) {\n $estilo->set(\"offsetx\", 0);\n $estilo->set(\"offsety\", 0);\n }\n }\n }\n $la->set(\"minscaledenom\", 0);\n $la->set(\"maxscaledenom\", 0);\n }\n $desligar[$la->name] = $desligarLayer;\n }\n $legenda = $this->mapa->legend;\n $legenda->set(\"template\", $this->templateleg);\n $tmparray[\"my_tag\"] = \"value_of_my_tag\";\n if (! $l = @$this->mapa->processlegendtemplate($tmparray)) {\n return (\"erro\");\n }\n // e necessario explodir as partes da legenda para converter os caracteres\n $pedacos = explode(\"<tr>\", $l);\n $n = count($pedacos);\n for ($i = 0; $i < $n; $i ++) {\n $pedacos[$i] = $this->converte($pedacos[$i]);\n }\n $l = implode(\"<tr>\", $pedacos);\n return (array(\n \"legenda\" => $l,\n \"desativar\" => $desligar\n ));\n }",
"function f_app_lov_return_label($lov)\n {\n//############################################ HELP #############################################################################\n/*\n $lov[\"name\"] = \"procesi\"; \t\t\t//DS -> sherben vetem per funksionin lov_name_default_values();\n $lov[\"obj_or_label\"] = \"label\"; \t\t\t//DS -> sherben vetem per funksionin lov_name_default_values(); pranon vetem vlerat object, label; default = object;\n $lov[\"type\"] = \"dinamik\"; \t\t//*DS -> pranon vlerat dinamik, statik;\n $lov[\"tab_name\"] = \"proces\"; \t\t//*D -> per tipin=\"dinamik\" emri tabeles ku do behet select | per tipin=\"statik\" sduhet;\n $lov[\"id\"] = \"id_proces\"; \t\t//*DS -> per tipin=\"dinamik\" emri i fushes qe ruan kodin | per tipin=\"statik\" lista e kodeve te ndara me ndaresin perkates, default ,;\n $lov[\"field_name\"] = \"name_proces\"; \t\t//*DS -> per tipin=\"dinamik\" emri i fushes qe ruan emertimin, mund te perdoret p.sh: Concat(id_proces, ' ', name_proces) | per tipin=\"statik\" lista e emertimeve te ndara me ndaresin perkates, default ,;\n\n $lov[\"layout_forma\"] = \"\"; \t\t//DS -> ka kuptim vetem kur kthehet me shume se nje etikete; ne rast se vendoset vlera 'table' elementet strukturohen ne nje tabele; vlera te ndryshme jane: <br> = elementet thyhen njeri poshte tjetrit;   = elementet ndahen me nje ose me shume spacio; default = <br>; ;\n\n $lov[\"distinct\"] = \"F\"; \t\t//D -> per tipin=\"dinamik\", pranon vlerat T,F (pra true ose false), default = 'F', pra ti beje distinct vlerat apo jo;\n\n $lov[\"filter\"] = \"WHERE id_proces < 30\";//D -> per tipin=\"dinamik\" kushti i filtrimit te te dhenave, default = '', p.sh: WHERE status = 1 AND id > 0 (mos haroni 'WHERE'); kur kjo ka vlere $lov[\"id_select\"] i shtohet si fitrim shtese;\n $lov[\"filter_plus\"] = \"\"; //D -> per tipin=\"dinamik\" kusht filtrimi shtese, default = '', p.sh: AND status = 1 AND id > 0 (mos haroni qe 'WHERE' ne kete rast nuk duhet sepse duhet ta kete variabli $filter); meret parasysh vetem kur $filter != ''; filtrimi i vlerave kryhet: $filter.\" \".$filter_plus\n\n $lov[\"id_select\"] = \"1\"; \t\t//DS -> vlerat e kodit per te cilat duhet te meren emertimet te ndara me ndaresin perkates default ,(presje); bosh kur i duam te gjitha vlerat; kur eshte vetem nje vlere vendoset vetem vlera e kodit pa presje; selektimi behet me id IN ($lov[\"id_select\"]), per id te tipit stringe mos haroni ti mbyllni ne thonjeza teke;\n $lov[\"order_by\"] = \"name_proces\"; \t\t//D -> emri i kolones qe do perdoret per order, default = $lov[\"name\"] | per tipin=\"statik\" sduhet;\n\n $lov[\"ndares_vlerash\"] = \",\"; \t\t//S -> stringa qe ndan vlerat e listes statike (kod dhe emertim), default = ,(presje);\n $lov[\"class_etiketa\"] = \"\"; \t\t//DS -> emri i klases ne style per etiketat, vetem ne rastet kur strukturohen ne tabele; po spati vlere nuk meret parasysh;\n $lov[\"isdate\"] = \"\"; \t\t//D -> pranon vlerat T,F (pra true ose false), default = 'F'; perdoret kur etiketa eshte e tipit date;\n $lov[\"asc_desc\"] = \"\"; \t\t//D -> per orderin, pranon vlerat ASC,DESC; default = 'ASC';;\n*/\n//###############################################################################################################################\n\n $lov_array_id = \"\";\n $lov_array_name = \"\";\n\n IF (!isset($lov[\"ndares_vlerash\"]) OR ($lov[\"ndares_vlerash\"]==\"\"))\n {$lov[\"ndares_vlerash\"] = \",\";}\n\n //PER LISTEN DINAMIKE ---------------------------------------------------------------------------------------------------------\n IF ($lov[\"type\"] == \"dinamik\")\n {\n IF (!isset($lov[\"order_by\"]) OR ($lov[\"order_by\"]==\"\"))\n {$lov[\"order_by\"] = $lov[\"field_name\"];}\n\n IF (!isset($lov[\"asc_desc\"]) OR ($lov[\"asc_desc\"]==\"\"))\n {$lov[\"asc_desc\"] = \" ASC\";}\n\n $filter = \"\";\n IF (ISSET($lov[\"filter\"]) AND ($lov[\"filter\"] != \"\"))\n {\n $filter = $lov[\"filter\"];\n \n IF (ISSET($lov[\"filter_plus\"]) AND ($lov[\"filter_plus\"] != \"\"))\n {$filter .= \" \".$lov[\"filter_plus\"];}\n }\n\n IF ((isset($lov[\"id_select\"])) AND ($lov[\"id_select\"] != \"\"))\n {\n IF ($filter == \"\")\n {$filter = \" WHERE \".$lov[\"id\"].\" IN (\".$lov[\"id_select\"].\") \";}\n ELSE\n {$filter .= \" AND \".$lov[\"id\"].\" IN (\".$lov[\"id_select\"].\") \";}\n }\n\n $lov_distinct = \"\";\n IF (ISSET($lov[\"distinct\"]) AND ($lov[\"distinct\"] == \"T\"))\n {$lov_distinct = \"DISTINCT\";}\n\n IF ($lov[\"isdate\"] == \"T\")\n {$sql = \"SELECT \".$lov_distinct.\" \".$lov[\"id\"].\" as id_as, IF(\".$lov[\"field_name\"].\" IS NULL, '',DATE_FORMAT(\".$lov[\"field_name\"].\",'%d.%m.%Y')) AS fusha_as_as, \".$lov[\"field_name\"].\" as field_name_order FROM \".$lov[\"tab_name\"].\" \".$filter.\" ORDER BY field_name_order \".$lov[\"asc_desc\"];}\n ELSE\n {$sql = \"SELECT \".$lov_distinct.\" \".$lov[\"id\"].\" as id_as, IF(\".$lov[\"field_name\"].\" IS NULL, '',\".$lov[\"field_name\"].\") AS fusha_as_as FROM \".$lov[\"tab_name\"].\" \".$filter.\" ORDER BY \".$lov[\"order_by\"].\" \".$lov[\"asc_desc\"];}\n\n $i = -1;\n $rs = WebApp::execQuery($sql);\n $rs->MoveFirst();\n while (!$rs->EOF())\n {\n $id = $rs->Field(\"id_as\");\n $name = $rs->Field(\"fusha_as_as\");\n\n $i = $i + 1;\n $lov_array_id[$i] = $id;\n $lov_array_name[$i] = $name;\n \n $lov_array_id_id[$id] = $id;\n $lov_array_id_name[$id] = $name;\n\n $rs->MoveNext();\n }\n }\n //PER LISTEN DINAMIKE =========================================================================================================\n\n //PER LISTEN STATIKE ----------------------------------------------------------------------------------------------------------\n IF ($lov[\"type\"] == \"statik\")\n {\n $lov_array_id_temp = EXPLODE($lov[\"ndares_vlerash\"], $lov[\"id\"]);\n $lov_array_name_temp = EXPLODE($lov[\"ndares_vlerash\"], $lov[\"field_name\"]);\n\n IF ((ISSET($lov[\"id_select\"])) AND ($lov[\"id_select\"] != \"\"))\n {\n $kaloje_kushtin_stristr = \"N\";\n }\n ELSE\n {\n $kaloje_kushtin_stristr = \"Y\";\n }\n\n $k = -1;\n $id_select_txt = $lov[\"ndares_vlerash\"].$lov[\"id_select\"].$lov[\"ndares_vlerash\"];\n FOR ($i=0; $i < count($lov_array_id_temp); $i++)\n {\n $lov_array_id_txt = $lov[\"ndares_vlerash\"].$lov_array_id_temp[$i].$lov[\"ndares_vlerash\"];\n\n IF (STRISTR($id_select_txt, $lov_array_id_txt) OR ($kaloje_kushtin_stristr == \"Y\"))\n {\n $k = $k + 1;\n $lov_array_id[$k] = $lov_array_id_temp[$i];\n $lov_array_name[$k] = $lov_array_name_temp[$i];\n\n $lov_array_id_id[$lov_array_id_temp[$i]] = $lov_array_id_temp[$i];\n $lov_array_id_name[$lov_array_id_temp[$i]] = $lov_array_name_temp[$i];\n }\n }\n }\n //PER LISTEN STATIKE ==========================================================================================================\n\n //FORMOHET HTML E LOV ---------------------------------------------------------------------------------------------------------\n IF (($lov[\"all_data_array\"] == \"Y\") OR ($lov[\"only_ids\"] == \"Y\"))\n {\n IF ($lov[\"all_data_array\"] == \"Y\")\n {\n $lov_html = $lov_array_id_name;\n }\n \n IF ($lov[\"only_ids\"] == \"Y\")\n {\n $lov_html = $lov_array_id_id;\n }\n }\n ELSE\n {\n $lov_html = \"\";\n\n IF (!isset($lov[\"class_etiketa\"]) OR ($lov[\"class_etiketa\"]==\"\"))\n {$lov[\"class_etiketa\"] = \"\";}\n ELSE\n {$lov[\"class_etiketa\"] = \"class='\".$lov[\"class_etiketa\"].\"'\";}\n\n IF (!isset($lov[\"layout_forma\"]) OR ($lov[\"layout_forma\"]==\"\"))\n {$lov[\"layout_forma\"] = \"<br>\";}\n\n IF ($lov[\"layout_forma\"] == \"table\")\n {$lov_html .= \"<Table border=0 cellspacing=0 cellpadding=0>\";}\n\n FOR ($i=0; $i < count($lov_array_id); $i++)\n {\n IF ($lov[\"layout_forma\"] == \"table\")\n {\n $lov_html .= \"<TR><TD \".$lov[\"class_etiketa\"].\">\".$lov_array_name[$i].\"</TD></TR>\";\n }\n ELSE\n {\n IF ($lov[\"layout_forma\"] == \"<br>\")\n {\n IF ($i == 0)\n {$lov_html .= $lov_array_name[$i];}\n ELSE\n {$lov_html .= $lov[\"layout_forma\"].$lov_array_name[$i];}\n }\n ELSE\n {\n $lov_html .= $lov[\"layout_forma\"].$lov_array_name[$i];\n }\n }\n }\n \n IF ($lov[\"layout_forma\"] == \"table\")\n {\n $lov_html .= \"</Table>\";\n }\n \n }\n //FORMOHET HTML E LOV =========================================================================================================\n\n RETURN $lov_html;\n }",
"public function acelerar($velocidade);",
"function llenar_detalle_egreso($id_com){\n\t$sql = \"SELECT \n\tprosic_detalle_comprobante.id_comprobante\n\t, prosic_detalle_comprobante.tipo_digito\n\t, prosic_detalle_comprobante.id_plan_contable\n\t, prosic_plan_contable.cuenta_plan_contable\n\t, prosic_detalle_comprobante.cargar_abonar\n\t, prosic_detalle_comprobante.importe_soles\n\t, prosic_detalle_comprobante.importe_dolares\n\t, prosic_detalle_comprobante.id_anexo\n\t, prosic_anexo.codigo_anexo\n\t, prosic_detalle_comprobante.id_tipo_comprobante\n\t, prosic_tipo_comprobante.codigo_tipo_comprobante\n\t, prosic_detalle_comprobante.nro_doc_comprobante\n\t, prosic_detalle_comprobante.fecha_doc_comprobante\n\t, prosic_detalle_comprobante.id_moneda\n\t, prosic_moneda.codigo_moneda\n\t, prosic_comprobante.cuenta_costo\n\t, prosic_comprobante.detalle_comprobante\n\t, prosic_detalle_comprobante.ser_doc_comprobante\n\tFROM prosic_detalle_comprobante\n\tINNER JOIN prosic_comprobante ON ( prosic_detalle_comprobante.id_comprobante = prosic_comprobante.id_comprobante )\n\tINNER JOIN prosic_plan_contable ON ( prosic_detalle_comprobante.id_plan_contable = prosic_plan_contable.id_plan_contable)\n\tINNER JOIN prosic_anexo ON (prosic_detalle_comprobante.id_anexo = prosic_anexo.id_anexo )\n\tINNER JOIN prosic_tipo_comprobante ON (prosic_detalle_comprobante.id_tipo_comprobante = prosic_tipo_comprobante.id_tipo_comprobante )\n\tINNER JOIN prosic_moneda ON (prosic_detalle_comprobante.id_moneda = prosic_moneda.id_moneda )\n\tWHERE prosic_detalle_comprobante.tipo_digito ='D'\n\t AND prosic_comprobante.id_comprobante= \" . $id_com .\" \";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n}",
"public function getLovCivilite()\n\t{\n\t\tfor ($i=OACCOUNT_MADAME; $i<=OACCOUNT_MONSIEUR; $i++)\n\t\t{\n\t\t\t$civilites[$i] = constant('LABEL_' . $i);\n\t\t}\n\t\treturn $civilites;\n\t}",
"function ambil_soal() { \n $tampil = $this->db->query(\"SELECT * FROM IKD.IKD_D_SOAL_QUISIONER ORDER BY KD_SOAL ASC\")->result_array();\n\t\treturn $tampil;\n }",
"function existeLetra(/*>>> Completar parámetros <<<*/ ){\n \n /*>>> Completar cuerpo de la función <<<*/\n\n}",
"public function actionKnprLapresPulau() {\n return $this->render('knpr/knpr-lapres-pulau');\n }",
"public function getUltimoLapsoLiquidado()\r\n\t\t{\r\n\t\t\t$findModel = self::findLapsoModel();\t// Modelo general de consulta.\r\n\r\n\t\t\treturn $model = $findModel->asArray()->one();\r\n\t\t}",
"public function forward( $p ) {\n \n $lon = $p->x;\n $lat = $p->y;\n\n $delta_lat = $lat - $this->lat0;\n $delta_lon = $lon - $this->long0;\n\n // 1. Calculate d_phi and d_psi ... // and d_lambda\n // For this algorithm, delta_latitude is in seconds of arc x 10-5, so we need to scale to those units. Longitude is radians.\n $d_phi = $delta_lat / Proj4php::$common->SEC_TO_RAD * 1E-5;\n $d_lambda = $delta_lon;\n $d_phi_n = 1; // d_phi^0\n\n $d_psi = 0;\n for( $n = 1; $n <= 10; $n++ ) {\n $d_phi_n = $d_phi_n * $d_phi;\n $d_psi = $d_psi + $this->A[$n] * $d_phi_n;\n }\n\n // 2. Calculate theta\n $th_re = $d_psi;\n $th_im = $d_lambda;\n\n // 3. Calculate z\n $th_n_re = 1;\n $th_n_im = 0; // theta^0\n #$th_n_re1;\n #$th_n_im1;\n\n $z_re = 0;\n $z_im = 0;\n for( $n = 1; $n <= 6; $n++ ) {\n $th_n_re1 = $th_n_re * $th_re - $th_n_im * $th_im;\n $th_n_im1 = $th_n_im * $th_re + $th_n_re * $th_im;\n $th_n_re = $th_n_re1;\n $th_n_im = $th_n_im1;\n $z_re = $z_re + $this->B_re[$n] * $th_n_re - $this->B_im[$n] * $th_n_im;\n $z_im = $z_im + $this->B_im[$n] * $th_n_re + $this->B_re[$n] * $th_n_im;\n }\n\n // 4. Calculate easting and northing\n $p->x = ($z_im * $this->a) + $this->x0;\n $p->y = ($z_re * $this->a) + $this->y0;\n\n return $p;\n }",
"public function getFasilitasLayananId()\n {\n return $this->fasilitas_layanan_id;\n }",
"public function listarPacientes(){\n\t\t\t$list= oci_parse($conn,\"BEGIN Nombre_paquete.NOmbre.funvion(Aqui los values) END \");\n\t\t\t// $list= oci_parse($conn,\"SELECT * FROM CITAS\");\n\t\t\toci_execute($list);\n\t\t}",
"function luas_alas_balok($nilai1, $nilai2) {\n\t\n\t\n\t\n\t\n\t}",
"function lancar_notas_aluno($id_federado){\n //pegar movimentos da faixa candidata\n $dados['aluno']= $this->coordenador->get_aluno_faixa($id_federado);\n \n \n $id_faixa = $dados['aluno']['0']['ordem']+1;\n \n $dados['movimentos'] = $this->coordenador->movimentos($id_faixa);\n $dados['ultimo_evento'] = $this->coordenador->get_ultimo_evento($id_federado);\n \n// $this->funcoes->imprimir($dados['movimentos']);\n $this->load->view('header');\n $this->load->view('/coordenador/lancar_notas_aluno',$dados);\n $this->load->view('footer');\n \n //preparar o prontuário com notas do aluno\n //inclui-lo automáticamente no evento de graduação\n \n }",
"public function lcargarTablaUnidadesxTipoxMaterialLaboratorio($parametros) {\n $oDLaboratorio = new DLaboratorio();\n $rs = $oDLaboratorio->dcargarTablaUnidadesxTipoxMaterialLaboratorio($parametros);\n\n\n// foreach ($rs as $i => $valuey) {\n// array_push($rs[$i], \"../../../../fastmedical_front/imagen/icono/editar.png ^ Editar Examen\");\n// }\n//\n// foreach ($rs as $j => $valuem) {\n// array_push($rs[$j], \"../../../../fastmedical_front/imagen/icono/cancel.png ^ Eliminar Examen\");\n// }\n\n return $rs;\n }",
"final function velcom(){\n }",
"public function getLivres()\r\n\t{\r\n\t\treturn $this->livres;\r\n\t}",
"public function getGrafikLab()\n {\n $tgl_skrg = Time::now('Asia/Jakarta')->toDateString();\n $id_jad = $this->db->table('jadwal')->select('id_jadwal')->get()->getResultArray();\n $id_kat = $this->db->table('jadwal')->get()->getRowArray(); \n\n if ($id_jad == NULL) {\n \n $grafik_lab = $this->db->table('hsl_survei')->select('jadwal.id_jadwal, opsi.opsi')\n ->join('pertanyaan','pertanyaan.id_pert=hsl_survei.id_pert', 'left')\n ->join('jadwal','jadwal.id_jadwal=hsl_survei.id_jadwal', 'left')\n ->join('opsi','opsi.id_ops=hsl_survei.opsi')\n ->where('hsl_survei.id_jadwal')\n ->where('pertanyaan.id_unit', 4)->get()->getResultArray();\n\n }elseif (($id_kat['tgl_mulai'] <= $tgl_skrg) && ($id_kat['tgl_akhir'] >= $tgl_skrg)){\n\n $grafik_lab = $this->db->table('hsl_survei')->select('jadwal.id_jadwal, opsi.opsi')\n ->join('pertanyaan','pertanyaan.id_pert=hsl_survei.id_pert', 'left')\n ->join('jadwal','jadwal.id_jadwal=hsl_survei.id_jadwal', 'left')\n ->join('opsi','opsi.id_ops=hsl_survei.opsi')\n ->where('jadwal.tgl_mulai <=', $tgl_skrg)->where('jadwal.tgl_akhir >=', $tgl_skrg)\n ->where('pertanyaan.id_unit', 4)\n ->get()->getResultArray();\n }else {\n $row =$this->db->table('jadwal')->limit(1)->orderBy('id_jadwal',\"DESC\")->get()->getRowArray();\n $roow = $row['id_jadwal'];\n\n $grafik_lab = $this->db->table('hsl_survei')->select('jadwal.id_jadwal, opsi.opsi')\n ->join('pertanyaan','pertanyaan.id_pert=hsl_survei.id_pert', 'left')\n ->join('jadwal','jadwal.id_jadwal=hsl_survei.id_jadwal', 'left')\n ->join('opsi','opsi.id_ops=hsl_survei.opsi')\n ->where('hsl_survei.id_jadwal', $roow)\n ->where('pertanyaan.id_unit', 4)->get()->getResultArray();\n }\n\n $sangatBaik = 0;\n $baik = 0;\n $tidakBaik = 0;\n $sangatTidakBaik = 0;\n foreach ($grafik_lab as $grafik):\n if ($grafik['opsi'] == \"Sangat Baik\") {\n $sangatBaik = $sangatBaik + 1;\n }\n elseif($grafik['opsi'] == \"Baik\"){\n $baik = $baik + 1;\n }\n elseif($grafik['opsi'] == \"Tidak Baik\"){\n $tidakBaik = $tidakBaik + 1;\n }\n elseif($grafik['opsi'] == \"Sangat Tidak Baik\"){\n $sangatTidakBaik = $sangatTidakBaik + 1;\n }\n endforeach;\n\n $data = [$sangatBaik, $baik, $tidakBaik, $sangatTidakBaik];\n return $data;\n }",
"function visites_mensuelles_chiffres($global_jour) {\r\n\tglobal $couleur_foncee, $couleur_claire;\r\n\r\n\t$periode = date('m/y'); // mois /annee en cours (format de $date)\r\n\t$dday = date('j'); // numero du jour\r\n\t$nb_mois = $GLOBALS['actijour']['nbl_mensuel']; // nombre mois affiche\r\n\r\n\t$requete = \"FROM_UNIXTIME(UNIX_TIMESTAMP(date),'%m') AS d_mois, \r\n\t\t\tFROM_UNIXTIME(UNIX_TIMESTAMP(date),'%y') AS d_annee, \r\n\t\t\tFROM_UNIXTIME(UNIX_TIMESTAMP(date),'%m/%y') AS date_unix, \r\n\t\t\tSUM(visites) AS visit_mois \r\n\t\t\tFROM spip_visites WHERE date > DATE_SUB(NOW(),INTERVAL 2700 DAY) \r\n\t\t\tGROUP BY date_unix ORDER BY date DESC LIMIT 0,$nb_mois\";\r\n\r\n\t// calcul du $divis : MAX de visites_mois\r\n\t$r = sql_select($requete);\r\n\t$tblmax = array();\r\n\twhile ($rmx = @sql_fetch($r)) {\r\n\t\t$tblmax[count($tblmax) + 1] = $rmx['visit_mois'];\r\n\t}\r\n\treset($tblmax);\r\n\r\n\tif (count($tblmax) == 0) {\r\n\t\t$tblmax[] = 1;\r\n\t}\r\n\t$divis = max($tblmax) / 100;\r\n\r\n\t//le tableau a jauges horizontales\r\n\t$aff .= debut_cadre_relief(\"\", true)\r\n\t\t. \"<span class='arial2'>\" . _T('actijour:entete_tableau_mois', array('nb_mois' => $nb_mois)) . \"\\n</span>\"\r\n\t\t. \"<table width='100%' cellpadding='2' cellspacing='0' border='0' class='arial2'>\\n\"\r\n\t\t. \"<tr><td align='left'>\" . _T('actijour:mois_pipe')\r\n\t\t. \"</td><td width='50%'>\" . _T('actijour:moyenne_mois') . \"</td>\\n\"\r\n\t\t. \"<td><b>\" . _T('actijour:visites') . \"</b></td></tr>\";\r\n\r\n\t$ra = sql_select($requete);\r\n\twhile ($row = sql_fetch($ra)) {\r\n\t\t$val_m = $row['d_mois'];\r\n\t\t$val_a = $row['d_annee'];\r\n\t\t$date = $row['date_unix'];\r\n\t\t$visit_mois = $row['visit_mois'];\r\n\t\t$idefix = '';\r\n\r\n\t\t//nombre de jours du mois $mois\r\n\t\t$mois = mktime(0, 0, 0, $val_m, 1, $val_a);\r\n\t\t$nbr_jours = intval(date(\"t\", $mois));\r\n\r\n\t\t// nombre de jours, moyenne, si mois en cours\r\n\t\tif ($date != $periode) {\r\n\t\t\t$nbj = $nbr_jours;\r\n\t\t\t$moy_mois = floor($visit_mois / $nbj);\r\n\t\t\t$totvisit = $visit_mois;\r\n\t\t} else {\r\n\t\t\t$nbj = ($dday == 1) ? $dday : $dday - 1;\r\n\t\t\t$moy_mois = floor(($visit_mois - $global_jour) / $nbj);\r\n\t\t\t$totvisit = $visit_mois - $global_jour;\r\n\t\t\t$idefix = \"*\";\r\n\t\t}\r\n\t\t$totvisit = number_format($totvisit, 0, ',', '.');\r\n\r\n\t\t//longeur jauge (ne tiens pas compte du jour en cour)\r\n\t\t$long = floor($visit_mois / $divis);\r\n\r\n\t\t// couleur de jauge pour mois le plus fort\r\n\t\t$color_texte = '';\r\n\t\tif ($long == 100) {\r\n\t\t\t$coul_jauge = $couleur_foncee;\r\n\t\t\t$color_texte = \"style='color:#ffffff;'\";\r\n\t\t} else {\r\n\t\t\t$coul_jauge = $couleur_claire;\r\n\t\t}\r\n\r\n\t\t$aff .= \"<tr><td class='arial2' colspan='3'>\"\r\n\t\t\t. \"<div style='position:relative; z-index:1; width:100%;'>\"\r\n\t\t\t. \"<div class='cell_info_mois'>$date</div>\"\r\n\t\t\t. \"<div class='cell_moymens'>$moy_mois</div>\"\r\n\t\t\t. \"<div class='cell_info_tot' $color_texte><b>$totvisit</b>$idefix</div>\"\r\n\t\t\t. \"</div>\";\r\n\t\t# barre horiz \r\n\t\t$aff .= \"<div class='fond_barre'>\\n\"\r\n\t\t\t. \"<div style='width:\" . $long . \"%; height:11px; background-color:\" . $coul_jauge . \";'></div>\\n\"\r\n\t\t\t. \"</div>\\n\"\r\n\t\t\t. \"</td></tr>\\n\";\r\n\r\n\t}\r\n\t$aff .= \"<tr><td colspan='3'><span class='verdana1'>\"\r\n\t\t. _T('actijour:pied_tableau_mois') . \"</span></td></tr>\\n\"\r\n\t\t. \"</table></span>\\n\";\r\n\t$aff .= fin_cadre_relief(true);\r\n\r\n\treturn $aff;\r\n\r\n}",
"public function rgveda_verse_modern($gra) {\n $data = [\n [1,191,1,1,191],\n [192,234,2,1,43],\n [235,295,3,1,62],\n [297,354,4,1,58],\n [355,441,5,1,87],\n [442,516,6,1,75],\n [517,620,7,1,104],\n [621,668,8,1,48],\n [1018,1028,8,59,59], //Vālakhilya hymns 1—11\n [669,712,8,60,103],\n [713,826,9,1,114],\n [827,1017,10,1,191]\n ];\n for($i=0;$i<count($data);$i++) {\n list($gra1,$gra2,$mandala,$hymn1,$hymn2) = $data[$i];\n if (($gra1 <= $gra) && ($gra<=$gra2)) {\n $hymn = $hymn1 + ($gra - $gra1);\n $x = \"$mandala.$hymn\";\n return $x;\n }\n }\n return \"?\"; // algorithm failed\n}",
"function planilha($a,$b,$c,$d,$e){\r\n\t\t$fPlanilha=new fachada_planilha();\r\n\t\t$oPlanilha=$fPlanilha->planilha($a,$b,$c,$d,$e);\r\n\t\treturn $oPlanilha;\r\n\t}",
"function palabras_asociadas($id_imagen,$id_palabra) {\n\t\n\t\t$query = \"SELECT palabras.*, palabra_imagen.*\n\t\tFROM palabras, palabra_imagen\n\t\tWHERE palabra_imagen.id_imagen='$id_imagen' \n\t\tAND palabra_imagen.id_palabra=palabras.id_palabra\n\t\tAND palabra_imagen.id_palabra <> '$id_palabra'\n\t\tORDER BY palabras.palabra asc\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\t\t\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t\t\n\t\n\t}",
"public function getPosicoesDasColunasDaPlanilha($rows)\n {\n $index = array(\n 'columns' => array(\n 'nome_completo' => false,\n 'email' => false,\n 'cpf' => false,\n 'data_nascimento' => false,\n 'instituicao' => false\n )\n );\n $x = 0;\n \n while ($row = current($rows)) {\n \n if (in_array('CPF', $row) && in_array('Nome completo', $row) && in_array('Data de nascimento', $row)) {\n $index['row'] = $x + 1;\n \n // buscar índice do campo cpf\n foreach (array(\n 'Data de nascimento',\n 'data de nascimento',\n 'DATA DE NASCIMENTO',\n 'NASCIMENTO'\n ) as $value) {\n if ($index['columns']['data_nascimento'] === false) {\n $index['columns']['data_nascimento'] = array_search($value, $row, false);\n }\n }\n \n // buscar índice do campo cpf\n foreach (array(\n 'CPF',\n 'cpf',\n 'Cpf'\n ) as $value) {\n \n if ($index['columns']['cpf'] === false) {\n $index['columns']['cpf'] = array_search($value, $row, false);\n }\n }\n \n // buscar índice do campo Nome completo\n foreach (array(\n 'Nome completo',\n 'nome completo',\n 'Nome Completo',\n 'NOME COMPLETO'\n ) as $value) {\n if ($index['columns']['nome_completo'] === false) {\n $index['columns']['nome_completo'] = array_search($value, $row, false);\n }\n }\n \n // buscar índice do campo email\n foreach (array(\n 'Email',\n 'email',\n 'e-mail',\n 'EMAIL',\n 'E-MAIL'\n ) as $value) {\n if ($index['columns']['email'] === false) {\n $index['columns']['email'] = array_search($value, $row, false);\n }\n }\n \n // buscar índice do campo Instituição\n foreach (array(\n 'É Estudante do IFBA/Vitória da Conquista',\n 'É Estudante do IFBA/Vitória da Conquista',\n 'É Estudante do IFBA/Vitória da Conquista',\n 'É Estudante do IFBA/Vitória da Conquista'\n ) as $value) {\n if ($index['columns']['instituicao'] === false) {\n $index['columns']['instituicao'] = array_search($value, $row, false);\n }\n }\n }\n $x ++;\n next($rows);\n }\n \n return $index;\n }",
"public function getJmlJambanLpG()\n {\n return $this->jml_jamban_lp_g;\n }",
"public function getListeVisiteurs(){\n\t\t$req = \"select * from visiteur order by VIS_MATRICULE\";\n\t\t$rs = PdoGsb::$monPdo->query($req);\n\t\t$ligne = $rs->fetchAll();\n\t\treturn $ligne;\n\t}",
"public function avulsasLivres()\n\t{\n\t\t$stmt = $this->pdo->prepare(\"SELECT * FROM vagas where tipo = 'A' and status = 'L' order by vaga\");\n \t\t$stmt->execute();\n \t\t$vagas = $stmt->fetchall(PDO::FETCH_ASSOC);\n \t\treturn $vagas;\n\t}",
"public function getLr() {}",
"function li_isvedimas($masyvas, $mas_link){\n $ilgis = count($masyvas);\n for ($i=0; $i < $ilgis; $i++) { ?>\n <li><?php echo($masyvas[$i][$mas_link]); ?></li>\n <?php\n } \n}",
"public function getLinkplan() {\n $sql = \"SELECT sm_planFloor FROM `SM_FLOOR` WHERE sm_idBuilding='$this->idBuilding' AND sm_idFloor = '$this->idFloor'\";\n $result = $this->mysqli->query($sql)->fetch_array();\n return $result['sm_planFloor'];\n }",
"public function laptops()\n {\n return static::randomElement(static::$laptops);\n }",
"abstract public function ln();",
"public function getPanose() {}",
"public function latihan() {\n $date = null;\n $var = [\n 'page' => 'admin/laporan/latihan',\n 'title' => 'Jadwal Latihan',\n 'latihan' => $this->m_app->getLatihan(null, null, $date)->result(),\n 'user' => $this->m_app->getPelatih()->result(),\n 'anggota' => $this->m_app->getAnggota()->result(),\n ];\n $this->load->view('layout/admin', $var);\n }",
"function niveles($area){\n\t\tif ($area->cveentidad2=='0') return 1;\n\t\tif ($area->cveentidad3=='0') return 2;\n\t\tif ($area->cveentidad4=='0') return 3;\n\t\tif ($area->cveentidad5=='0') return 4;\n\t\tif ($area->cveentidad6=='0') return 5;\n\t\tif ($area->cveentidad7=='0') return 6;\n\t}",
"function setLlamadasDiariasCreditosNo360($fecha_operacion, $recibo = 0){\n$msg\t= \"====================== GENERAR_LLAMADAS_POR_CREDITOS_NO_360 \\r\\n\";\n$msg\t.= \"====================== GENERAR LLAMADAS POR PRIMERA PARCIALIDAD \\r\\n\";\n$msg\t.= \"====================== GENERAR LLAMADAS CON \" . DIAS_DE_ANTICIPACION_PARA_LLAMADAS . \" DIAS DE ANTICIPACION \\r\\n\";\n$msg\t.= \"====================== GENERAR LLAMADAS PARA EL \" . getFechaLarga(sumardias($fecha_operacion, DIAS_DE_ANTICIPACION_PARA_LLAMADAS)) . \"\\r\\n\";\n$msg\t.= \"\\tSocio\\tCredito\\tObservaciones\\r\\n\";\n//obtener una muestra de la letra\n/**\n * seleccionar\n */\n$sucursal\t\t= getSucursal();\n\n$sql = \"SELECT\n\t`operaciones_mvtos`.`socio_afectado`,\n\t`operaciones_mvtos`.`docto_afectado`,\n\t`operaciones_mvtos`.`tipo_operacion`,\n\t`operaciones_mvtos`.`fecha_afectacion`,\n\t`operaciones_mvtos`.`periodo_socio`,\n\t`operaciones_mvtos`.`afectacion_real`,\n\t`operaciones_mvtos`.`docto_neutralizador`\nFROM\n\t`operaciones_mvtos` `operaciones_mvtos`\n\nWHERE\n\t(`operaciones_mvtos`.`tipo_operacion` = 410) AND\n\t(`operaciones_mvtos`.`fecha_afectacion` = DATE_ADD('$fecha_operacion', INTERVAL \" . DIAS_DE_ANTICIPACION_PARA_LLAMADAS . \" DAY) ) AND\n\t(`operaciones_mvtos`.`periodo_socio` =1) AND\n\t(`operaciones_mvtos`.`docto_neutralizador` = 1)\n\tAND\n\t(`operaciones_mvtos`.`sucursal` ='$sucursal')\nORDER BY\n\t`operaciones_mvtos`.`fecha_afectacion`,\n\t`operaciones_mvtos`.`socio_afectado`\";\n//$msg\t.= \"$sql\\r\\n\";\n\n$rs = mysql_query($sql, cnnGeneral());\n\twhile($rw = mysql_fetch_array($rs)){\n\t\t$socio\t\t= $rw[\"socio_afectado\"];\n\t\t$credito\t= $rw[\"docto_afectado\"];\n\t\t$oficial\t= $_SESSION[\"SN_b80bb7740288fda1f201890375a60c8f\"];\n\t\t$txt\t\t= setNewLlamadaBySocio($socio, $credito, $fecha_operacion, date(\"H:i:s\"), \"LLAMADAS AUTOMATICAS : $recibo\" );\n\t\t$msg \t\t.= date(\"H:i:s\") . \"\\t\" . $txt . \"\\r\\n\";\n\t}\n\n\treturn $msg;\n}",
"public function getLigos()\n {\n return $this->ligos;\n }"
] | [
"0.59238005",
"0.5835028",
"0.57242537",
"0.5703667",
"0.5633615",
"0.5587144",
"0.5474995",
"0.54482603",
"0.53998995",
"0.53949934",
"0.5367377",
"0.5363346",
"0.526598",
"0.52410316",
"0.5219348",
"0.5209642",
"0.52086306",
"0.5202947",
"0.51796204",
"0.5159445",
"0.5141969",
"0.51407796",
"0.5135198",
"0.5124071",
"0.51177627",
"0.5102541",
"0.50778025",
"0.50731957",
"0.50569654",
"0.50420004",
"0.50385505",
"0.50369775",
"0.50280386",
"0.50263095",
"0.5008732",
"0.5008556",
"0.5001667",
"0.49910206",
"0.49824646",
"0.49741736",
"0.49668458",
"0.49589545",
"0.49564734",
"0.4941977",
"0.49330634",
"0.49267107",
"0.49264848",
"0.49067965",
"0.48798335",
"0.48749584",
"0.48611453",
"0.48533225",
"0.48503348",
"0.48434818",
"0.4843278",
"0.48401064",
"0.4828701",
"0.48187798",
"0.48032653",
"0.47828323",
"0.4778095",
"0.47744873",
"0.47741747",
"0.4773394",
"0.47629172",
"0.47491235",
"0.47463822",
"0.4744651",
"0.47388852",
"0.47327834",
"0.47300306",
"0.4723945",
"0.47226846",
"0.47205782",
"0.47142854",
"0.47133526",
"0.47116822",
"0.47066626",
"0.4692302",
"0.46893093",
"0.46878737",
"0.468643",
"0.4681966",
"0.4669952",
"0.4662982",
"0.46591216",
"0.46582448",
"0.46566767",
"0.4656035",
"0.4651539",
"0.46470577",
"0.46422687",
"0.46394062",
"0.46379772",
"0.4636787",
"0.46362373",
"0.46259558",
"0.46216032",
"0.46203166",
"0.46179107",
"0.4617284"
] | 0.0 | -1 |
Merge $defaultCrudConfig with crudConfig array and return the merged array | private function getCrudConfig($action) {
$config = isset($this->crudConfig) ? $this->crudConfig : [];
$config = array_replace_recursive($this->defaultCrudConfig, $config);
if (! isset($config[$action])) {
throw new \Exception("Invalid config for $action.");
}
return $config[$action];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static protected function mergeConfig($config)\r\n {\r\n $config['all']['stylesheets'] = array_merge(isset($config['default']['stylesheets']) && is_array($config['default']['stylesheets']) ? $config['default']['stylesheets'] : array(), isset($config['all']['stylesheets']) && is_array($config['all']['stylesheets']) ? $config['all']['stylesheets'] : array());\r\n unset($config['default']['stylesheets']);\r\n\r\n $config['all']['javascripts'] = array_merge(isset($config['default']['javascripts']) && is_array($config['default']['javascripts']) ? $config['default']['javascripts'] : array(), isset($config['all']['javascripts']) && is_array($config['all']['javascripts']) ? $config['all']['javascripts'] : array());\r\n unset($config['default']['javascripts']);\r\n\r\n $config['all']['metas']['title'] = array_merge(\r\n isset($config['default']['metas']['title']) && is_array($config['default']['metas']['title']) ? $config['default']['metas']['title'] \r\n : (isset($config['default']['metas']['title']) ? array($config['default']['metas']['title']) : array()), \r\n isset($config['all']['metas']['title']) && is_array($config['all']['metas']['title']) ? $config['all']['metas']['title'] \r\n : (isset($config['all']['metas']['title']) ? array($config['all']['metas']['title']) : array())\r\n );\r\n unset($config['default']['metas']['title']);\r\n \r\n // merge default and all\r\n $config['all'] = sfToolkit::arrayDeepMerge(\r\n isset($config['default']) && is_array($config['default']) ? $config['default'] : array(),\r\n isset($config['all']) && is_array($config['all']) ? $config['all'] : array()\r\n );\r\n unset($config['default']);\r\n return self::replaceConstants($config);\r\n }",
"private function mergeDefaultSettings(){\n\t\t//Get a copy of the default configuration.\n\t\t$defaultConfig = $this->getDefaultConfig();\n\t\t//Check for a 'general' section\n\t\tif(array_key_exists('general', $this->configuration)){\n\t\t\t//If it exists, compare the default keys to the loaded config for missing values\n\t\t\t$missingGeneral = array_diff_key($defaultConfig['general'], $this->configuration['general']);\n\t\t\t//Iterate through the missing values and attach them to the running configuration.\n\t\t\tif(count($missingGeneral) > 0){\n\t\t\t\tforeach($missingGeneral as $key=>$parameter){\n\t\t\t\t\t$this->configuration['general'][$key] = $parameter;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t//Section doesn't exist, so we need to set it to the defaults.\n\t\t\t$this->configuration['general'] = $defaultConfig['general'];\n\t\t}\n\t\t//Check for a 'options' section\n\t\tif(array_key_exists('options', $this->configuration)){\n\t\t\t//If it exists, compare the default keys to the loaded config for missing values\n\t\t\t$missingOptions = array_diff_key($defaultConfig['options'], $this->configuration['options']);\n\t\t\t//Iterate through the missing values and attach them to the running configuration.\n\t\t\tif(count($missionOptions) > 0){\n\t\t\t\tforeach($missingOptions as $key=>$parameter){\n\t\t\t\t\t$this->configuration['options'][$key] = $parameter;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t//Section doesn't exist, so we need to set it to the defaults.\n\t\t\t$this->configuration['options'] = $defaultConfig['options'];\n\t\t}\n\t}",
"protected function merge(array $rawConfiguration, array $defaultConfiguration)\n {\n foreach($defaultConfiguration as $section=>$configuration)\n {\n if($this->isNegotiationConfiguration($section))\n {\n if(isset($rawConfiguration[$section]))\n {\n if(count($rawConfiguration[$section]) > 0)\n {\n $defaultConfiguration[$section] = $rawConfiguration[$section];\n }\n }\n $appendSection = 'append_'.$section;\n if(isset($rawConfiguration[$appendSection]))\n {\n if(count($rawConfiguration[$appendSection]) > 0)\n {\n $defaultConfiguration[$section] = $this->mergeSection($rawConfiguration[$appendSection],$defaultConfiguration[$section]);\n }\n }\n }\n else\n {\n if(isset($rawConfiguration[$section]))\n {\n if(is_array($rawConfiguration[$section]))\n {\n foreach($configuration as $index=>$item)\n {\n if(isset($rawConfiguration[$section][$index]))\n {\n $defaultConfiguration[$section][$index] = $rawConfiguration[$section][$index];\n }\n }\n }\n else\n {\n $defaultConfiguration[$section] = $rawConfiguration[$section];\n }\n }\n }\n }\n $this->negotiationEnabled = $defaultConfiguration['negotiation']['enabled'];\n $this->serializerEnabled = $defaultConfiguration['serializer']['enabled'];\n $this->normalizerEnabled = $defaultConfiguration['normalizer']['enabled'];\n $this->validatorEnabled = $defaultConfiguration['validator']['enabled'];\n return $defaultConfiguration;\n }",
"static function merge($config, $newConfigName) \n {\n if (empty($config)) {\n $config = array(); \n }\n\n if ($newConfigName != self::CONFIG_DEFAULT) {\n $newConfig = self::load($newConfigName);\n\n foreach (self::$available_setting as $key => $type) {\n if (isset($newConfig[$key]) && !isset($config[$key])) {\n $config[$key] = $newConfig[$key];\n } else if (isset($newConfig[$key]) && isset($config[$key])) {\n switch ($type) {\n case self::SETTING_TYPE_ARRAY:\n $config[$key] = array_merge($config[$key], $newConfig[$key]);\n break;\n default:\n $config[$key] = $newConfig[$key];\n break;\n } \n }\n } \n\n // Override default setting for some websites that using bad class name\n foreach ($config[self::IGNORED_CLASSES] as $key => $class) {\n if (isset($newConfig[self::OVERRIDE_CLASSES]) && in_array($class, $newConfig[self::OVERRIDE_CLASSES])) {\n unset($config[self::IGNORED_CLASSES][$key]);\n }\n }\n }\n\n return $config;\n }",
"protected function mergeSection(array $raw, array $default)\n {\n foreach($raw as $rawItem)\n {\n if($this->isValidNegotiationNode($rawItem))\n {\n $append = true;\n foreach($default as $defaultIndex=>$defaultItem)\n {\n if($defaultItem['name'] == $rawItem['name'])\n {\n $default[$defaultIndex] = $rawItem;\n $append = false;\n break;\n }\n }\n if($append)\n {\n $default[] = $rawItem;\n }\n }\n }\n return $default;\n }",
"public static function crudSettings()\n {\n return[\n 'hasPicture'=>false,\n 'attributes' => [\n 'url',\n 'heading',\n 'content',\n ],\n 'relationships' => [\n 'userId' => null,\n 'topicId' => null\n ],\n 'parentRel' => [\n 'userId' => null\n ]\n ];\n }",
"protected function mergeConfigs(array $defaultConfig)\n {\n if (empty($this->attributesInputs)) {\n return $defaultConfig;\n }\n\n $config = [];\n foreach ($this->attributesInputs as $attribute => $params) {\n if (is_array($params)) {\n $config[$attribute] = $params;\n } elseif (isset($defaultConfig[$params])) {\n $config[$params] = $defaultConfig[$params];\n } else {\n throw new InvalidConfigException('Each \"attributesInputs\" item must be string or array.');\n }\n }\n\n return $config;\n }",
"protected function defaults()\n {\n return [\n // use / for indicate to the Configurable Trait that this path don't need to be prefixed with prefixes['view']\n 'rows_actions_template' => '/app.includes.datatable.default_actions',\n\n // use / for indicate to the Configurable Trait that this path don't need to be prefixed with prefixes['view']\n 'rows_checkbox_template' => '/app.includes.datatable.default_checkbox',\n\n // by default the datatable will have the filter bar\n 'filter' => true,\n 'where' => [],\n 'join' => [],\n 'views' => [\n // the default template for datatable view\n 'index' => '/app.includes.datatable.default_index',\n // the default template for create view\n 'create' => 'form',\n // the default template for update view\n 'update' => 'form',\n ],\n 'bulk' => [\n 'excel' => [\n 'route' => 'export.excel',\n 'icon' => 'fas fa-download',\n 'text' => trans('app.export_excel'),\n 'confirm-text' => trans('app.confirms.bulk.excel.text'),\n 'ajax' => true,\n ],\n 'import-excel' => [\n 'route' => 'import.excel',\n 'icon' => 'fa fa-file',\n 'text' => trans('app.import_excel'),\n 'ajax' => false,\n ],\n 'active' => [\n 'route' => 'bulk.active',\n 'icon' => 'fas fa-check',\n 'text' => trans('app.activate'),\n ],\n 'unactive' => [\n 'route' => 'bulk.unactive',\n 'icon' => 'fas fa-times',\n 'text' => trans('app.disactivate'),\n 'confirm' => true,\n 'confirm-title' => trans('app.confirms.bulk.unactive.title'),\n 'confirm-text' => trans('app.confirms.bulk.unactive.text'),\n ],\n 'delete' => [\n 'route' => 'bulk.delete',\n 'icon' => 'fas fa-trash',\n 'text' => trans('app.delete'),\n 'divider' => true,\n 'confirm' => true,\n 'confirm-title' => trans('app.confirms.bulk.delete.title'),\n 'confirm-text' => trans('app.confirms.bulk.delete.text'),\n ],\n ],\n ];\n }",
"protected function mergeConfig(array $original, array $merging)\n\t{\n\t\t$array = array_merge($original, $merging);\n\t\tforeach ($original as $key => $value) {\n\t\t\tif (! is_array($value)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (! Arr::exists($merging, $key)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (is_numeric($key)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$array[$key] = $this->mergeConfig($value, $merging[$key]);\n\t\t}\n\t\treturn $array;\n\t}",
"protected function mergeDefaults($settings, $defaultSettings)\n {\n foreach ($defaultSettings as $id => $defaultSetting) {\n // Do not merge the defaults for group filters, if this widget already had group filters.\n // Merging would prevent the user from deleting a default option.\n if ($id == 'group_filters' && isset($settings['group_filters']) ||\n ($id == 'facility_filters' && isset($settings['facility_filters']))) {\n continue;\n }\n\n if (!isset($settings[$id])) {\n $settings[$id] = $defaultSetting;\n } elseif (is_array($settings[$id]) && is_array($defaultSetting)) {\n $settings[$id] = $this->mergeDefaults($settings[$id], $defaultSetting);\n }\n }\n\n return $settings;\n }",
"public static function getConfig($class = 'default'){\n\t\tif(!$class){\n\t\t\t$class = 'default';\n\t\t}\n\t\t$default_config = sfConfig::get('app_history_default', array());\n\t\t$config = sfConfig::get('app_history_'.$class, array());\n\t\t//$final = array_merge_recursive($default_config, $config); //Not exactly what we want\n\t\t//$final = array_replace($default_config, $config);//Nope, but almost\n\t\t$final = array_merge_array($default_config, $config);//This one is worse but looks like array_merge_recursive()\n\t\t//var_dump($final);\n\t\treturn $final;\n\t}",
"protected function resolveDefaultConfig(): array\n {\n foreach ($this->getDefaultConfigPaths() as $path) {\n if (! $this->filesystem->has($path)) {\n continue;\n }\n\n return [$this->resolveConfigFromPath($path), $path];\n }\n\n return [ConsoleConfig::make()->toArray(), null];\n }",
"protected function mergeConfig(array $original, array $merging)\n {\n $array = array_merge($original, $merging);\n foreach ($original as $key => $value) {\n if (!is_array($value)) {\n continue;\n }\n if (!Arr::exists($merging, $key)) {\n continue;\n }\n if (is_numeric($key)) {\n continue;\n }\n $array[$key] = $this->mergeConfig($value, $merging[$key]);\n }\n\n return $array;\n }",
"private function formatDefaultConfig($defaultConfig = null)\n\t{\n\t\tif (is_null($defaultConfig))\n\t\t\t$defaultConfig = config('upload.defaults');\n\n\t\t$formatted = [];\n\t\tforeach ($defaultConfig as $configItem => $value)\n\t\t{\n\t\t\t$formatted[camel_case($configItem)] = is_array($value) ? $this->formatDefaultConfig($value) : $value;\n\t\t}\n\n\t\treturn $formatted;\n\t}",
"protected function baseConfigurationDefaults() {\n return array(\n 'id' => $this->getPluginId(),\n 'label' => '',\n 'cache' => DRUPAL_CACHE_PER_ROLE,\n );\n }",
"public function configureCrud(Crud $crud): Crud\n {\n return $crud\n ->setDefaultSort(['createdAt' => 'DESC'])\n // ...\n ;\n }",
"private static function defaultConfig(): array\n {\n return [\n 'base_uri' => self::$baseUri,\n 'http_errors' => false,\n 'headers' => [\n 'Accept' => 'application/json',\n 'Content-Type' => 'application/json',\n 'User-Agent' => 'evoliz-php/' . Config::VERSION,\n ],\n 'verify' => true,\n ];\n }",
"public function applyConfigDefaults(array $config)\n {\n $defaults = array(\n 'arch' => 'all',\n 'buildId' => gmdate(self::DEFAULT_BUILDTIME_FORMAT),\n 'description' => '',\n 'depends' => array(),\n 'exclude' => array(),\n 'maintainer' => '',\n 'postinst' => '',\n 'priority' => 'optional',\n 'sources' => array(),\n 'workspaceBasedir' => self::DEFAULT_WORKSPACE_BASEDIR\n );\n $config = array_merge($defaults, $config);\n\n if ($config['postinst']) {\n $config['postinst'] = rtrim($config['postinst']) . \"\\n\";\n }\n $config['sources'] = array();\n\n $config['fullName'] = sprintf(\n '%s_%s_%s',\n $config['shortName'], $config['version'], $config['arch']\n );\n $config['versionDir'] = sprintf(\n '%s/%s/%s',\n $config['workspaceBasedir'], $config['shortName'], $config['version']\n );\n $config['buildDir'] = \"{$config['versionDir']}/\" . $config['buildId'];\n $config['pkgDir'] = \"{$config['buildDir']}/{$config['fullName']}\";\n\n return $config;\n }",
"protected function getListItems($config, $default = array())\n {\n if (!isset($config['items'])) {\n $config['items'] = $default;\n if (!empty($config['items_table'])) {\n $table = $this->driver->createTable(\n (string) $config['items_table']\n );\n $config['items'] = $table->select()->fetchAll(\\PDO::FETCH_ASSOC);\n }\n }\n return $config['items'];\n }",
"function addingRecordDefaultSettings(){\n\n $settings = parent::addingRecordDefaultSettings();\n\n for($i=0; $i< count($settings); $i++){\n\n switch($settings[$i][\"name\"]){\n\n case \"reportTitle\":\n $settings[$i][\"defaultValue\"] = \"Packing List\";\n\n }//endswitch\n\n }//end foreach\n\n return $settings;\n\n }",
"function get_default_values() {\n\t\t$output = array();\n\t\t$config = & lcars_Framework::_lcarsframework_lcars();\n\t\tforeach ( (array) $config as $option ) {\n\t\t\tif ( ! isset( $option['id'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( ! isset( $option['std'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( ! isset( $option['type'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( has_filter( 'of_sanitize_' . $option['type'] ) ) {\n\t\t\t\t$output[$option['id']] = apply_filters( 'of_sanitize_' . $option['type'], $option['std'], $option );\n\t\t\t}\n\t\t}\n\t\treturn $output;\n\t}",
"public function defaultConfig();",
"public static function mergeConfig(): array\n {\n $args = \\func_get_args();\n $res = array_shift($args) ?: [];\n foreach ($args as $items) {\n if (!\\is_array($items)) {\n continue;\n }\n foreach ($items as $k => $v) {\n if ($v instanceof \\yii\\helpers\\UnsetArrayValue || $v instanceof \\Yiisoft\\Arrays\\UnsetArrayValue) {\n unset($res[$k]);\n } elseif ($v instanceof \\yii\\helpers\\ReplaceArrayValue || $v instanceof \\Yiisoft\\Arrays\\ReplaceArrayValue) {\n $res[$k] = $v->value;\n } elseif (\\is_int($k)) {\n /// XXX skip repeated values\n if (\\in_array($v, $res, true)) {\n continue;\n }\n if (isset($res[$k])) {\n $res[] = $v;\n } else {\n $res[$k] = $v;\n }\n } elseif (\\is_array($v) && isset($res[$k]) && \\is_array($res[$k])) {\n $res[$k] = self::mergeConfig($res[$k], $v);\n } else {\n $res[$k] = $v;\n }\n }\n }\n\n return $res;\n }",
"public static function mergeConfigs(array ...$configs): array;",
"private function getDefaultConfig()\n {\n return [\n 'auth' => $this->clientConfig->getAuthorizationArray(),\n 'headers' => $this->clientConfig->getRequestHeaders(),\n ];\n }",
"private function getDefaultConfig(){\n\t\t//Pretty simple. Multidimensional array of configuration values gets returned\n\t $defaultConfig = array();\n\t\t$defaultConfig['general'] = array('start_path'=>'.', 'disallowed'=>'php, php4, php5, phps',\n\t\t\t\t\t\t\t\t\t\t 'page_title'=>'OMFG!', 'files_label'=>'', 'folders_label'=>'');\n\t\t$defaultConfig['options'] = array('thumb_height'=>75, 'files_per_page'=>25, 'max_columns'=>3, \n\t\t\t\t\t\t\t\t\t\t 'enable_ajax'=>false, 'memory_limit'=>'256M', 'cache_thumbs'=>false, \n\t\t\t\t\t\t\t\t\t\t\t'thumbs_dir'=>'/.thumbs', 'icons_dir'=>'/.icons');\n\t\treturn $defaultConfig;\n\t}",
"public function getMergedConfig()\n {\n return $this->mergedConfig;\n }",
"static function merge() {\n\t\t$base = array();\n\t\t$args = func_get_args();\n\n\t\tforeach ( $args as $arg ) {\n\t\t\tself::array_merge( $base, $arg );\n\t\t}\n\n\t\treturn $base;\n\t}",
"public function merge(array $config)\n {\n $this->data = array_replace_recursive($this->get(), $config);\n }",
"public function getConfig(array $defaults = []);",
"private function getDefaultConfig() {\n\t\treturn array(\n\t\t\t'client_id' => '',\n\t\t\t'client_secret' => '',\n\t\t\t'base_url' => '',\n\t\t\t'default_type' => 'user',\n\t\t);\n\t}",
"public function merge(array $config): self;",
"public function getDefaults() {\n\n\t\treturn [\n\t\t\t'module' => $this->_defaultModule,\n\t\t\t'controller' => $this->_defaultController,\n\t\t\t'action' => $this->_defaultAction,\n\t\t\t'params' => $this->_defaultParams\n\t\t];\n\t}",
"public static function get_settings_defaults(){\r\n\t\t\r\n\t\t$defaults = array();\r\n\t\tforeach( self::init_settings() as $settings ){\r\n\t\t\tforeach( $settings as $setting ){\r\n\t\t\t\tif( isset( $setting['id'] ) && isset( $setting['default'] ) ){\r\n\t\t\t\t\t$defaults[$setting['id']] = $setting['default'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $defaults;\r\n\t\t\r\n\t}",
"protected function getDefaults()\n {\n $defaults = [\n \"query\" => [],\n \"headers\" => [\n \"Content-Type\" => \"application/json\",\n \"Accept\" => \"application/hal+json\",\n ],\n ];\n\n if (!empty($this->defaults)) {\n $defaults = call_user_func($this->defaults, $defaults);\n }\n\n return $defaults;\n }",
"protected function mergeWithCurrentConfig($config)\n {\n $currentConfigFilePath = $this->getCurrentConfigFilePath();\n if (File::isFile($currentConfigFilePath)) {\n $currentConfig = include $currentConfigFilePath;\n if (is_array($currentConfig)) {\n foreach ($currentConfig as $key => $value) {\n if (isset($config[$key])) {\n $config[$key]['value'] = $value;\n }\n }\n }\n };\n\n return $config;\n }",
"protected function _defaults($arr)\n\t{\n\t\t$defaults = array(\n\t\t\t'enable_realtime' => false, \n\t\t\t'check_callbacks' => true, \n\t\t\t'qbxml_version' => '4.0',\n\t\t\t'qbxml_onerror' => 'stopOnError', \n\t\t\t'map_create_handler' => null, \n\t\t\t'map_to_quickbooks_handler' => null,\n\t\t\t'map_to_application_handler' => null,\n\t\t\t'map_to_editsequence_handler' => null, \n\t\t\t);\n\t\t\t\n\t\treturn array_merge($defaults, $arr);\n\t}",
"private function buildConfig($runtimeConfig = [])\n {\n // Merge all configs\n return array_merge($this->app['config']['fixerio'], $runtimeConfig);\n }",
"protected function getArrayableAppends()\n {\n $defaults = ['settings'];\n\n if (!count($this->appends)) {\n return $defaults;\n }\n\n return array_merge($defaults, $this->appends);\n }",
"private function getAllConfig() {\n $this->user_panel->checkAuth();\n $this->config->findAll();\n }",
"function defaults() {\n\t\t$ret = array();\n\t\tforeach($this->schema() as $key => $field) {\n\t\t\tif(!$field['primary'] && !is_null($field['default'])) {\n\t\t\t\t$ret[$key] = $field['default'];\n\t\t\t}\n\t\t}\n\n\t\treturn $ret;\n\t}",
"public function getAddDefaultsExplicitlyOnInsert();",
"public function getDefaultSettings() {\n $defaults = array();\n $fields = $this->getFields();\n foreach ($fields as $field) {\n $default = '';\n if (array_key_exists('default', $field) && $field['default']) {\n $default = $field['default'];\n }\n $defaults[$field['name']] = $default;\n }\n return $defaults;\n }",
"public function getConfigDefaults()\n {\n // $file = realpath(__DIR__ . '/../../data/distribution/config.dist.php');\n $file = __DIR__ . '/../../data/distribution/config.dist.php';\n\n return $this->getConfigFromFile($file);\n }",
"function get_all_configuracion()\n {\n $this->db->order_by('id', 'desc');\n return $this->db->get('configuracion')->result_array();\n }",
"public function getAll()\n {\n return $this->config;\n }",
"function apsa_merge_config() {\n global $apsa_uninstall;\n global $apsa_child_uninstall;\n if (!empty($apsa_child_uninstall)) {\n $apsa_uninstall = array_merge_recursive($apsa_uninstall, $apsa_child_uninstall);\n }\n}",
"function data_preprocessing(&$default_values){\n parent::data_preprocessing($default_values);\n if (!empty($default_values['config'])) {\n $values = json_decode($default_values['config'], true);\n foreach ($values as $key => $value) {\n $default_values['config_' . $key] = $value;\n }\n unset($default_values['config']);\n }\n }",
"protected function getDefaultParameters()\n {\n return [\n 'core.root_path' => './../',\n 'core.php_ext' => 'php',\n 'core.environment' => 'production',\n 'core.debug' => false,\n 'core.cache_dir' => './../cache/production/',\n 'passwords.driver.argon2_memory_cost' => 1024,\n 'passwords.driver.argon2_threads' => 2,\n 'passwords.driver.argon2_time_cost' => 2,\n 'passwords.driver.bcrypt_cost' => 10,\n 'text_formatter.cache.dir' => './../cache/production/',\n 'text_formatter.cache.parser.key' => '_text_formatter_parser',\n 'text_formatter.cache.renderer.key' => '_text_formatter_renderer',\n 'core.template.cache_path' => './../cache/production/twig/',\n 'tables.acl_groups' => 'phpbb_acl_groups',\n 'tables.acl_options' => 'phpbb_acl_options',\n 'tables.acl_roles' => 'phpbb_acl_roles',\n 'tables.acl_roles_data' => 'phpbb_acl_roles_data',\n 'tables.acl_users' => 'phpbb_acl_users',\n 'tables.attachments' => 'phpbb_attachments',\n 'tables.auth_provider_oauth_token_storage' => 'phpbb_oauth_tokens',\n 'tables.auth_provider_oauth_states' => 'phpbb_oauth_states',\n 'tables.auth_provider_oauth_account_assoc' => 'phpbb_oauth_accounts',\n 'tables.banlist' => 'phpbb_banlist',\n 'tables.bbcodes' => 'phpbb_bbcodes',\n 'tables.bookmarks' => 'phpbb_bookmarks',\n 'tables.bots' => 'phpbb_bots',\n 'tables.captcha_qa_questions' => 'phpbb_captcha_questions',\n 'tables.captcha_qa_answers' => 'phpbb_captcha_answers',\n 'tables.captcha_qa_confirm' => 'phpbb_qa_confirm',\n 'tables.config' => 'phpbb_config',\n 'tables.config_text' => 'phpbb_config_text',\n 'tables.confirm' => 'phpbb_confirm',\n 'tables.disallow' => 'phpbb_disallow',\n 'tables.drafts' => 'phpbb_drafts',\n 'tables.ext' => 'phpbb_ext',\n 'tables.extensions' => 'phpbb_extensions',\n 'tables.extension_groups' => 'phpbb_extension_groups',\n 'tables.forums' => 'phpbb_forums',\n 'tables.forums_access' => 'phpbb_forums_access',\n 'tables.forums_track' => 'phpbb_forums_track',\n 'tables.forums_watch' => 'phpbb_forums_watch',\n 'tables.groups' => 'phpbb_groups',\n 'tables.icons' => 'phpbb_icons',\n 'tables.lang' => 'phpbb_lang',\n 'tables.log' => 'phpbb_log',\n 'tables.login_attempts' => 'phpbb_login_attempts',\n 'tables.migrations' => 'phpbb_migrations',\n 'tables.moderator_cache' => 'phpbb_moderator_cache',\n 'tables.modules' => 'phpbb_modules',\n 'tables.notification_types' => 'phpbb_notification_types',\n 'tables.notifications' => 'phpbb_notifications',\n 'tables.poll_options' => 'phpbb_poll_options',\n 'tables.poll_votes' => 'phpbb_poll_votes',\n 'tables.posts' => 'phpbb_posts',\n 'tables.privmsgs' => 'phpbb_privmsgs',\n 'tables.privmsgs_folder' => 'phpbb_privmsgs_folder',\n 'tables.privmsgs_rules' => 'phpbb_privmsgs_rules',\n 'tables.privmsgs_to' => 'phpbb_privmsgs_to',\n 'tables.profile_fields' => 'phpbb_profile_fields',\n 'tables.profile_fields_data' => 'phpbb_profile_fields_data',\n 'tables.profile_fields_options_language' => 'phpbb_profile_fields_lang',\n 'tables.profile_fields_language' => 'phpbb_profile_lang',\n 'tables.ranks' => 'phpbb_ranks',\n 'tables.reports' => 'phpbb_reports',\n 'tables.reports_reasons' => 'phpbb_reports_reasons',\n 'tables.search_results' => 'phpbb_search_results',\n 'tables.search_wordlist' => 'phpbb_search_wordlist',\n 'tables.search_wordmatch' => 'phpbb_search_wordmatch',\n 'tables.sessions' => 'phpbb_sessions',\n 'tables.sessions_keys' => 'phpbb_sessions_keys',\n 'tables.sitelist' => 'phpbb_sitelist',\n 'tables.smilies' => 'phpbb_smilies',\n 'tables.sphinx' => 'phpbb_sphinx',\n 'tables.styles' => 'phpbb_styles',\n 'tables.styles_template' => 'phpbb_styles_template',\n 'tables.styles_template_data' => 'phpbb_styles_template_data',\n 'tables.styles_theme' => 'phpbb_styles_theme',\n 'tables.styles_imageset' => 'phpbb_styles_imageset',\n 'tables.styles_imageset_data' => 'phpbb_styles_imageset_data',\n 'tables.teampage' => 'phpbb_teampage',\n 'tables.topics' => 'phpbb_topics',\n 'tables.topics_posted' => 'phpbb_topics_posted',\n 'tables.topics_track' => 'phpbb_topics_track',\n 'tables.topics_watch' => 'phpbb_topics_watch',\n 'tables.user_group' => 'phpbb_user_group',\n 'tables.user_notifications' => 'phpbb_user_notifications',\n 'tables.users' => 'phpbb_users',\n 'tables.warnings' => 'phpbb_warnings',\n 'tables.words' => 'phpbb_words',\n 'tables.zebra' => 'phpbb_zebra',\n 'core.disable_super_globals' => true,\n 'datetime.class' => '\\\\phpbb\\\\datetime',\n 'mimetype.guesser.priority.lowest' => -2,\n 'mimetype.guesser.priority.low' => -1,\n 'mimetype.guesser.priority.default' => 0,\n 'mimetype.guesser.priority.high' => 1,\n 'mimetype.guesser.priority.highest' => 2,\n 'passwords.algorithms' => [\n 0 => 'passwords.driver.argon2id',\n 1 => 'passwords.driver.argon2i',\n 2 => 'passwords.driver.bcrypt_2y',\n 3 => 'passwords.driver.bcrypt',\n 4 => 'passwords.driver.salted_md5',\n 5 => 'passwords.driver.phpass',\n ],\n 'allow_install_dir' => false,\n 'debug.exceptions' => false,\n 'debug.load_time' => false,\n 'debug.sql_explain' => false,\n 'debug.memory' => false,\n 'debug.show_errors' => false,\n 'session.log_errors' => false,\n 'tables' => [\n 'acl_groups' => 'phpbb_acl_groups',\n 'acl_options' => 'phpbb_acl_options',\n 'acl_roles' => 'phpbb_acl_roles',\n 'acl_roles_data' => 'phpbb_acl_roles_data',\n 'acl_users' => 'phpbb_acl_users',\n 'attachments' => 'phpbb_attachments',\n 'auth_provider_oauth_token_storage' => 'phpbb_oauth_tokens',\n 'auth_provider_oauth_states' => 'phpbb_oauth_states',\n 'auth_provider_oauth_account_assoc' => 'phpbb_oauth_accounts',\n 'banlist' => 'phpbb_banlist',\n 'bbcodes' => 'phpbb_bbcodes',\n 'bookmarks' => 'phpbb_bookmarks',\n 'bots' => 'phpbb_bots',\n 'captcha_qa_questions' => 'phpbb_captcha_questions',\n 'captcha_qa_answers' => 'phpbb_captcha_answers',\n 'captcha_qa_confirm' => 'phpbb_qa_confirm',\n 'config' => 'phpbb_config',\n 'config_text' => 'phpbb_config_text',\n 'confirm' => 'phpbb_confirm',\n 'disallow' => 'phpbb_disallow',\n 'drafts' => 'phpbb_drafts',\n 'ext' => 'phpbb_ext',\n 'extensions' => 'phpbb_extensions',\n 'extension_groups' => 'phpbb_extension_groups',\n 'forums' => 'phpbb_forums',\n 'forums_access' => 'phpbb_forums_access',\n 'forums_track' => 'phpbb_forums_track',\n 'forums_watch' => 'phpbb_forums_watch',\n 'groups' => 'phpbb_groups',\n 'icons' => 'phpbb_icons',\n 'lang' => 'phpbb_lang',\n 'log' => 'phpbb_log',\n 'login_attempts' => 'phpbb_login_attempts',\n 'migrations' => 'phpbb_migrations',\n 'moderator_cache' => 'phpbb_moderator_cache',\n 'modules' => 'phpbb_modules',\n 'notification_types' => 'phpbb_notification_types',\n 'notifications' => 'phpbb_notifications',\n 'poll_options' => 'phpbb_poll_options',\n 'poll_votes' => 'phpbb_poll_votes',\n 'posts' => 'phpbb_posts',\n 'privmsgs' => 'phpbb_privmsgs',\n 'privmsgs_folder' => 'phpbb_privmsgs_folder',\n 'privmsgs_rules' => 'phpbb_privmsgs_rules',\n 'privmsgs_to' => 'phpbb_privmsgs_to',\n 'profile_fields' => 'phpbb_profile_fields',\n 'profile_fields_data' => 'phpbb_profile_fields_data',\n 'profile_fields_options_language' => 'phpbb_profile_fields_lang',\n 'profile_fields_language' => 'phpbb_profile_lang',\n 'ranks' => 'phpbb_ranks',\n 'reports' => 'phpbb_reports',\n 'reports_reasons' => 'phpbb_reports_reasons',\n 'search_results' => 'phpbb_search_results',\n 'search_wordlist' => 'phpbb_search_wordlist',\n 'search_wordmatch' => 'phpbb_search_wordmatch',\n 'sessions' => 'phpbb_sessions',\n 'sessions_keys' => 'phpbb_sessions_keys',\n 'sitelist' => 'phpbb_sitelist',\n 'smilies' => 'phpbb_smilies',\n 'sphinx' => 'phpbb_sphinx',\n 'styles' => 'phpbb_styles',\n 'styles_template' => 'phpbb_styles_template',\n 'styles_template_data' => 'phpbb_styles_template_data',\n 'styles_theme' => 'phpbb_styles_theme',\n 'styles_imageset' => 'phpbb_styles_imageset',\n 'styles_imageset_data' => 'phpbb_styles_imageset_data',\n 'teampage' => 'phpbb_teampage',\n 'topics' => 'phpbb_topics',\n 'topics_posted' => 'phpbb_topics_posted',\n 'topics_track' => 'phpbb_topics_track',\n 'topics_watch' => 'phpbb_topics_watch',\n 'user_group' => 'phpbb_user_group',\n 'user_notifications' => 'phpbb_user_notifications',\n 'users' => 'phpbb_users',\n 'warnings' => 'phpbb_warnings',\n 'words' => 'phpbb_words',\n 'zebra' => 'phpbb_zebra',\n ],\n 'core.adm_relative_path' => 'adm/',\n 'core.table_prefix' => 'phpbb_',\n 'cache.driver.class' => 'phpbb\\\\cache\\\\driver\\\\file',\n 'dbal.new_link' => false,\n ];\n }",
"function _default($defaults, $options)\n\t{\n\t\treturn array_merge($defaults, $options);\n\t}",
"protected function defaults() {\n\t\t\t$config = array(\n\t\t\t\t'version' => $this->version,\n\t\t\t\t'autoshowpt' => array(\n\t\t\t\t\t//'post'=> true\n\t\t\t\t),\n\t\t\t\t'usept' => array(\n\t\t\t\t\t'post' => true\n\t\t\t\t),\n\t\t\t\t'usetax' => array(),\n\t\t\t\t'autoshowrss' => false,\n\t\t\t\t'do_c2c' => 1,\n\t\t\t\t'do_t2t' => 0,\n\t\t\t\t'do_t2c' => 0,\n\t\t\t\t'do_k2c' => 0,\n\t\t\t\t'do_k2t' => 0,\n\t\t\t\t'do_x2x' => 1,\n\t\t\t\t'minscore' => 50,\n\t\t\t\t'maxresults' => 5,\n\t\t\t\t'cachetime' => 60,\n\t\t\t\t'filterpriority' => 10,\n\t\t\t\t'log' => false,\n\t\t\t\t'loglevel' => false,\n\t\t\t\t'storage' => 'postmeta',\n\t\t\t\t'storage_id' => 'better-related-',\n\t\t\t\t'querylimit' => 1000,\n\t\t\t\t't_querylimit' => 10000,\n\t\t\t\t'mtime' => time(),\n\t\t\t\t'relatedtitle' => sprintf(\n\t\t\t\t\t\"<strong>%s</strong>\",\n\t\t\t\t\t__( 'Related content:', 'better-related' )\n\t\t\t\t),\n\t\t\t\t'relatednone' => sprintf(\n\t\t\t\t\t\"<p>%s</p>\",\n\t\t\t\t\t__( 'No related content found.', 'better-related' )\n\t\t\t\t),\n\t\t\t\t'thanks' => 'below',\n\t\t\t\t'stylesheet' => true,\n\t\t\t\t'showdetails' => false\n\t\t\t);\n\t\t\treturn $config;\n\t\t}",
"protected function get_default_settings()\n {\n return [\n 'default' => [\n 'id' => '',\n 'url' => '',\n 'size' => '',\n 'name' => '',\n ],\n ];\n }",
"public static function flattenConfigurationWithEnvironment($config)\n {\n return array_merge(\n isset($config['default']) && is_array($config['default']) ? $config['default'] : array(),\n isset($config['all']) && is_array($config['all']) ? $config['all'] : array(),\n isset($config[sfConfig::get('sf_environment')]) && is_array($config[sfConfig::get('sf_environment')]) ? $config[sfConfig::get('sf_environment')] : array()\n );\n }",
"public function mergeRaw(array $raw)\n {\n return $this->setRaw(Arrays::merge($this->config, $raw, 'allowRemoval'));\n }",
"public function setDefaultValues() {\n $defaults = [];\n if (($this->_action & CRM_Core_Action::DELETE)) {\n return;\n }\n if ($this->_id) {\n foreach (civicrm_api3(\n 'Address',\n 'getsingle',\n ['id' => $this->_id]\n ) as $key => $value) {\n $defaults[\"address[1][{$key}]\"] = $value;\n }\n $defaults['is_active'] = CRM_EventLocations_Utils::isActive($this->_locId);\n }\n else {\n $defaults['is_active'] = TRUE;\n }\n return $defaults;\n }",
"protected function getConfigDefaults() {\n\t\treturn [\n\t\t\t'dbname' => 'gamemonitor',\n\t\t];\n\t}",
"protected function getDefaults(){\n\t\treturn array();\n\t}",
"public function configAll() {\n \n return $this->config;\n \n }",
"public function get_default_config() {\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'key' => 'name',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'label' => esc_html__( 'Name', 'themeisle-companion' ),\n\t\t\t\t'requirement' => 'required',\n\t\t\t\t'placeholder' => esc_html__( 'Name', 'themeisle-companion' ),\n\t\t\t\t'field_width' => '100',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'key' => 'email',\n\t\t\t\t'type' => 'email',\n\t\t\t\t'label' => esc_html__( 'Email', 'themeisle-companion' ),\n\t\t\t\t'requirement' => 'required',\n\t\t\t\t'placeholder' => esc_html__( 'Email', 'themeisle-companion' ),\n\t\t\t\t'field_width' => '100',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'key' => 'phone',\n\t\t\t\t'type' => 'number',\n\t\t\t\t'label' => esc_html__( 'Phone', 'themeisle-companion' ),\n\t\t\t\t'requirement' => 'optional',\n\t\t\t\t'placeholder' => esc_html__( 'Phone', 'themeisle-companion' ),\n\t\t\t\t'field_width' => '100',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'key' => 'message',\n\t\t\t\t'type' => 'textarea',\n\t\t\t\t'label' => esc_html__( 'Message', 'themeisle-companion' ),\n\t\t\t\t'requirement' => 'required',\n\t\t\t\t'placeholder' => esc_html__( 'Message', 'themeisle-companion' ),\n\t\t\t\t'field_width' => '100',\n\t\t\t),\n\t\t);\n\t}",
"public function load()\r\n {\r\n if (!$this->loaded)\r\n {\r\n $this->loadDefault();\r\n $this->loadDoctrine();\r\n\r\n foreach ($this->settings['default'] as $groupName => $group)\r\n {\r\n $this->short[$groupName] = [];\r\n\r\n foreach ($group->getEntries() as $k => $entry)\r\n {\r\n // set default value from\r\n $this->short[$groupName][$k] = $entry->getValue();\r\n\r\n // if settings group does not exist in stored settings, continue\r\n if (!array_key_exists($groupName, $this->settings['doctrine'])) continue;\r\n\r\n // if entry with current key does not exist in stored settings, continue\r\n if (!$this->settings['doctrine'][$groupName]->hasEntryWithKey($k)) continue;\r\n\r\n $this->short[$groupName][$k] = $this->settings['doctrine'][$groupName]->getEntryWithKey($k)->getValue();\r\n }\r\n }\r\n\r\n $this->loaded = true;\r\n }\r\n\r\n return $this->short;\r\n }",
"function defaultValues(&$conf)\t{\n\t\t// Addition of default values\n\t\tif (is_array($conf[$conf['cmdKey'].'.']['defaultValues.']))\t{\n\t\t\treset($conf[$conf['cmdKey'].'.']['defaultValues.']);\n\t\t\twhile(list($theField,$theValue)=each($conf[$conf['cmdKey'].'.']['defaultValues.']))\t{\n\t\t\t\tif (strpos($theValue,\":\")) {\n\t\t\t\t\t$data=tx_metafeedit_lib::getData($theValue,0,$this->cObj);\n\t\t\t\t\tif (!$data) $data=$this->dataArr[$theField];\n\t\t\t\t} else {\n\t\t\t\t\t$data=$theValue;\n\t\t\t\t}\n\t\t\t\t$this->dataArr[$theField] = $data;\n\t\t\t}\n\t\t}\n\t}",
"protected function restoreDefaults(){\n\t\t$rmvStmt = \"DELETE FROM `\" . _DB_NAME_ . \"`.`mc_select_config` WHERE `merchant_id` = '\" . _MERCHANTID_ . \"'\"; \n\t\tmysql_query($rmvStmt);\n\n\t\t//create an array of the insert and all the default values from the individual classes\n\t\t$a = array();\n\t\t$insrtStmt = \"INSERT INTO `\" . _DB_NAME_ . \"`.`mc_select_config` (`merchant_id`, `report_field_name`, `static_value`, `custom_function`, `function_command`, `enabled`, `order`) VALUES \";\n\t\tarray_push($a,$insrtStmt);\n\t\t\n\t\tforeach(callAllMerchantClassDefaults(_MERCHANTID_) AS $fieldrow){\n\t\t\tarray_push($a, $fieldrow . \",\");\n\t\t}\n\t\t//run the insert of the default data\n\t\tmysql_query(substr(implode(\"\",$a),0,(strlen(implode(\"\",$a))-1)));\n\n\t}",
"protected function defaultValues() : array\n {\n return [\n 'limit' => 20,\n 'offset' => 0,\n 'order_by_dir' => 'DESC',\n ];\n }",
"function get_all_configuracion()\n {\n $configuracion = $this->db->query(\"\n SELECT\n *\n FROM\n `configuracion`\n ORDER BY num ASC\n \")->result_array();\n\n return $configuracion;\n }",
"protected function getDefaultFields()\n {\n try {\n\n $default = array(\n 'brand',\n 'categories',\n 'category_names',\n 'date_add',\n 'description',\n 'id',\n 'image',\n 'in_stock',\n 'list_price',\n 'name',\n 'on_sale',\n 'price',\n 'qty',\n 'sku',\n 'stock',\n 'url'\n );\n\n if (Configuration::get('CLERK_INCLUDE_VARIANT_REFERENCES', $this->language_id, null, $this->shop_id) == '1') {\n array_push($default, 'variant_images');\n }\n\n //Get custom fields from configuration\n $fieldsConfig = Configuration::get('CLERK_DATASYNC_FIELDS', $this->getLanguageId(), null, $this->getShopId());\n\n $fields = explode(',', $fieldsConfig);\n\n return array_merge($default, $fields);\n\n } catch (Exception $e) {\n\n $this->logger->error('ERROR getDefaultFields', ['error' => $e->getMessage()]);\n\n }\n }",
"public function refreshConfig()\n {\n $this->_data = $this->_reader->read();\n $this->merge($this->_dbReader->get());\n }",
"public function get_default_list_config()\n {\n return '[[' . C__PROPERTY_TYPE__DYNAMIC . ',\"_id\",false,\"LC__CMDB__OBJTYPE__ID\",\"isys_cmdb_dao_category_g_global::get_dynamic_properties\",[\"isys_cmdb_dao_category_g_global\",\"dynamic_property_callback_id\"]],' . '[' . C__PROPERTY_TYPE__DYNAMIC . ',\"_title\",false,\"LC__UNIVERSAL__TITLE_LINK\",\"isys_cmdb_dao_category_g_global::get_dynamic_properties\",[\"isys_cmdb_dao_category_g_global\",\"dynamic_property_callback_title\"]],' . '[' . C__PROPERTY_TYPE__STATIC . ',\"its_type\",\"isys_its_type__title\",\"LC__CMDB__CATG__TYPE\",\"isys_cmdb_dao_category_g_its_type::get_properties\",false],' . '[' . C__PROPERTY_TYPE__DYNAMIC . ',\"_created\",false,\"LC__TASK__DETAIL__WORKORDER__CREATION_DATE\",\"isys_cmdb_dao_category_g_global::get_dynamic_properties\",[\"isys_cmdb_dao_category_g_global\",\"dynamic_property_callback_created\"]],' . '[' . C__PROPERTY_TYPE__DYNAMIC . ',\"_changed\",false,\"LC__CMDB__LAST_CHANGE\",\"isys_cmdb_dao_category_g_global::get_dynamic_properties\",[\"isys_cmdb_dao_category_g_global\",\"dynamic_property_callback_changed\"]],' . '[' . C__PROPERTY_TYPE__STATIC . ',\"purpose\",\"isys_purpose__title\",\"LC__CMDB__CATG__GLOBAL_PURPOSE\",\"isys_cmdb_dao_category_g_global::get_properties\",false],' . '[' . C__PROPERTY_TYPE__STATIC . ',\"category\",\"isys_catg_global_category__title\",\"LC__CMDB__CATG__GLOBAL_CATEGORY\",\"isys_cmdb_dao_category_g_global::get_properties\",false],' . '[' . C__PROPERTY_TYPE__DYNAMIC . ',\"_cmdb_status\",false,\"LC__UNIVERSAL__CMDB_STATUS\",\"isys_cmdb_dao_category_g_global::get_dynamic_properties\",[\"isys_cmdb_dao_category_g_global\",\"dynamic_property_callback_cmdb_status\"]]]';\n }",
"public function getCategoryDefaults()\n {\n $defaults = $this->_config->get('category_defaults');\n\n if (is_array($defaults)) {\n return $defaults;\n }\n\n return [];\n }",
"public function getDefaultDetailFieldsConfig()\n {\n if (is_array($this->owner->config()->default_detail_fields)) {\n return $this->owner->config()->default_detail_fields;\n }\n \n return [];\n }",
"function config()\n\t{\n\t\t$rows=$GLOBALS['SITE_DB']->query_select('pstore_customs',array('*'),NULL,'ORDER BY id');\n\t\t$out=array();\n\t\tforeach ($rows as $i=>$row)\n\t\t{\n\t\t\t$fields=new ocp_tempcode();\n\t\t\t$hidden=new ocp_tempcode();\n\t\t\t$fields->attach($this->get_fields('_'.strval($i),get_translated_text($row['c_title']),get_translated_text($row['c_description']),$row['c_enabled'],$row['c_cost'],$row['c_one_per_member']));\n\t\t\t$fields->attach(do_template('FORM_SCREEN_FIELD_SPACER',array('TITLE'=>do_lang_tempcode('ACTIONS'))));\n\t\t\t$fields->attach(form_input_tick(do_lang_tempcode('DELETE'),do_lang_tempcode('DESCRIPTION_DELETE'),'delete_custom_'.strval($i),false));\n\t\t\t$hidden->attach(form_input_hidden('custom_'.strval($i),strval($row['id'])));\n\t\t\t$out[]=array($fields,$hidden,do_lang_tempcode('EDIT_CUSTOM_PRODUCT'));\n\t\t}\n\n\t\treturn array($out,do_lang_tempcode('ADD_NEW_CUSTOM_PRODUCT'),$this->get_fields());\n\t}",
"protected function getDefaults()\n {\n return $this->transbankConfig->getDefaults(\n lcfirst(Helpers::classBasename(static::class))\n ) ?? [];\n }",
"protected function addDefaultConfigurationForConfigGeneration() {\n if (!isset($this->configuration['disabled_field_types'])) {\n /** @var \\Drupal\\search_api_solr\\Controller\\AbstractSolrEntityListBuilder $solr_field_type_list_builder */\n $solr_field_type_list_builder = $this->entityTypeManager->getListBuilder('solr_field_type');\n $this->configuration['disabled_field_types'] = array_keys($solr_field_type_list_builder->getAllNotRecommendedEntities());\n }\n\n if (!isset($this->configuration['disabled_caches'])) {\n /** @var \\Drupal\\search_api_solr\\Controller\\AbstractSolrEntityListBuilder $solr_cache_list_builder */\n $solr_cache_list_builder = $this->entityTypeManager->getListBuilder('solr_cache');\n $this->configuration['disabled_caches'] = array_keys($solr_cache_list_builder->getAllNotRecommendedEntities());\n }\n\n if (!isset($this->configuration['disabled_request_handlers'])) {\n /** @var \\Drupal\\search_api_solr\\Controller\\AbstractSolrEntityListBuilder $solr_request_handler_list_builder */\n $solr_request_handler_list_builder = $this->entityTypeManager->getListBuilder('solr_request_handler');\n $this->configuration['disabled_request_handlers'] = array_keys($solr_request_handler_list_builder->getAllNotRecommendedEntities());\n }\n\n if (!isset($this->configuration['disabled_request_dispatchers'])) {\n /** @var \\Drupal\\search_api_solr\\Controller\\AbstractSolrEntityListBuilder $solr_request_dispatcher_list_builder */\n $solr_request_dispatcher_list_builder = $this->entityTypeManager->getListBuilder('solr_request_dispatcher');\n $this->configuration['disabled_request_dispatchers'] = array_keys($solr_request_dispatcher_list_builder->getAllNotRecommendedEntities());\n }\n }",
"private function lazy_get_config(): array\n\t{\n\t\treturn array_merge_recursive($this->configs['app'], $this->construct_options);\n\t}",
"public function mergeSettings()\n {\n $actionName = preg_replace('/Action$/', '', $this->actionMethodName);\n $controllerKey = $this->settingsUtility->getControllerKey($this);\n $controllerSettings = [];\n $actionSettings = [];\n if (!empty($this->settings[$controllerKey])) {\n $controllerSettings = $this->settings[$controllerKey];\n }\n $allowedControllerSettingKeys = ['search', 'notify'];\n foreach ($controllerSettings as $key=>$value) {\n if (!in_array($key, $allowedControllerSettingKeys)) {\n unset($controllerSettings[$key]);\n }\n }\n if (!empty($this->settings[$controllerKey][$actionName])) {\n $actionSettings = $this->settings[$controllerKey][$actionName];\n }\n\n $typoScriptSettings = ArrayUtility::arrayMergeRecursiveOverrule($controllerSettings, $actionSettings, false, false);\n return ArrayUtility::arrayMergeRecursiveOverrule($typoScriptSettings, $this->settings, false, false);\n }",
"public static function get_defaults() {\n\n\t\t$defaults = array(\n\t\t\t'title' => 'Contact Us',\n\t\t\t'description' => \"Phone:||1800 123 123\\nFax:||1800 321 321\\nAddress:||Sydney, Australia\",\n\t\t\t'icon_size' => 'large',\n\t\t\t'align' => '',\n\t\t\t'icons' => array(),\n\t\t\t'enabled_icons' => array(),\n\t\t);\n\n $svg_files = glob(trailingslashit(dirname(__FILE__)).'webicons/*.svg');\n if(is_array($svg_files)){\n foreach($svg_files as $icon){\n // format [icon name] => [urm]\n $defaults['icons'][str_replace('webicon-','',str_replace('.svg','',basename($icon)))] = '';\n $defaults['description'] .= '[webicon icon=\"'.str_replace('webicon-','',str_replace('.svg','',basename($icon))).'\"] ';\n }\n // sort some popular icons above others.\n foreach(array('tumblr','flickr','foursquare','linkedin','mail','pinterest','youtube','twitter','facebook') as $priority){\n if(isset($defaults['icons'][$priority])){\n unset($defaults['icons'][$priority]);\n $defaults['icons'] = array($priority => '') + $defaults['icons'];\n }\n }\n }\n\n $defaults['icons'] = json_encode($defaults['icons']);\n $defaults['enabled_icons'] = json_encode($defaults['enabled_icons']);\n\n\t\treturn $defaults;\n\t}",
"protected function getDefaultMapping()\n\t{\n\t\treturn array(\n\t\t\t'subscription' => array(\n\t\t\t\t2 => 'subscription.interval',\n\t\t\t\t3 => 'subscription.datenext',\n\t\t\t\t4 => 'subscription.dateend',\n\t\t\t),\n\t\t\t'address' => array(\n\t\t\t\t2 => 'subscription.base.address.type',\n\t\t\t\t3 => 'subscription.base.address.salutation',\n\t\t\t\t4 => 'subscription.base.address.company',\n\t\t\t\t5 => 'subscription.base.address.vatid',\n\t\t\t\t6 => 'subscription.base.address.title',\n\t\t\t\t7 => 'subscription.base.address.firstname',\n\t\t\t\t8 => 'subscription.base.address.lastname',\n\t\t\t\t9 => 'subscription.base.address.address1',\n\t\t\t\t10 => 'subscription.base.address.address2',\n\t\t\t\t11 => 'subscription.base.address.address3',\n\t\t\t\t12 => 'subscription.base.address.postal',\n\t\t\t\t13 => 'subscription.base.address.city',\n\t\t\t\t14 => 'subscription.base.address.state',\n\t\t\t\t15 => 'subscription.base.address.countryid',\n\t\t\t\t16 => 'subscription.base.address.languageid',\n\t\t\t\t17 => 'subscription.base.address.telephone',\n\t\t\t\t18 => 'subscription.base.address.telefax',\n\t\t\t\t19 => 'subscription.base.address.email',\n\t\t\t\t20 => 'subscription.base.address.website',\n\t\t\t\t21 => 'subscription.base.address.longitude',\n\t\t\t\t22 => 'subscription.base.address.latitude',\n\t\t\t),\n\t\t\t'product' => array(\n\t\t\t\t2 => 'subscription.base.product.type',\n\t\t\t\t3 => 'subscription.base.product.stocktype',\n\t\t\t\t4 => 'subscription.base.product.suppliercode',\n\t\t\t\t5 => 'subscription.base.product.prodcode',\n\t\t\t\t6 => 'subscription.base.product.productid',\n\t\t\t\t7 => 'subscription.base.product.quantity',\n\t\t\t\t8 => 'subscription.base.product.name',\n\t\t\t\t9 => 'subscription.base.product.mediaurl',\n\t\t\t\t10 => 'subscription.base.product.price',\n\t\t\t\t11 => 'subscription.base.product.costs',\n\t\t\t\t12 => 'subscription.base.product.rebate',\n\t\t\t\t13 => 'subscription.base.product.taxrate',\n\t\t\t\t14 => 'subscription.base.product.status',\n\t\t\t\t15 => 'subscription.base.product.position',\n\t\t\t\t16 => 'subscription.base.product.attribute.type',\n\t\t\t\t17 => 'subscription.base.product.attribute.code',\n\t\t\t\t18 => 'subscription.base.product.attribute.name',\n\t\t\t\t19 => 'subscription.base.product.attribute.value',\n\t\t\t),\n\t\t);\n\t}",
"function getConfigParameters() {\n $sync_sugarcrm_users_parameters = array(\n 'crm_user_name' => '', \n 'crm_user_hash' => '', \n 'crm_url' => '', \n 'crm_auto_create_user' => 0, \n 'crm_auto_create_user1' => 0, \n 'crm_auto_create_module' => 'Users', \n );\n $devOptions = get_option($this->config_parameters_name);\n if (!empty($devOptions)) {\n foreach ($devOptions as $key => $option)\n $sync_sugarcrm_users_parameters[$key] = $option;\n }\t\t\t\t\n //update_option($this->config_parameters_name, $sync_sugarcrm_users_parameters);\n return $sync_sugarcrm_users_parameters;\n }",
"protected function mergeWithExistingConfiguration(array $defaultConfiguration, $extensionKey)\n {\n try {\n $currentExtensionConfig = unserialize(\n $this->objectManager->get(\\TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager::class)\n ->getConfigurationValueByPath('EXT/extConf/' . $extensionKey)\n );\n if (!is_array($currentExtensionConfig)) {\n $currentExtensionConfig = [];\n }\n } catch (\\RuntimeException $e) {\n $currentExtensionConfig = [];\n }\n $flatExtensionConfig = ArrayUtility::flatten($currentExtensionConfig);\n $valuedCurrentExtensionConfig = [];\n foreach ($flatExtensionConfig as $key => $value) {\n $valuedCurrentExtensionConfig[$key]['value'] = $value;\n }\n ArrayUtility::mergeRecursiveWithOverrule($defaultConfiguration, $valuedCurrentExtensionConfig);\n return $defaultConfiguration;\n }",
"public function config()\n {\n $rows = $GLOBALS['SITE_DB']->query_select('pstore_customs', array('*'), null, 'ORDER BY id');\n $out = array();\n foreach ($rows as $i => $row) {\n $fields = new Tempcode();\n $hidden = new Tempcode();\n $fields->attach($this->get_fields('_' . strval($i), get_translated_text($row['c_title']), get_translated_text($row['c_description']), $row['c_enabled'], $row['c_cost'], $row['c_one_per_member'], get_translated_text($row['c_mail_subject']), get_translated_text($row['c_mail_body'])));\n $fields->attach(do_template('FORM_SCREEN_FIELD_SPACER', array('_GUID' => '01362c21b40d7905b76ee6134198a128', 'TITLE' => do_lang_tempcode('ACTIONS'))));\n $fields->attach(form_input_tick(do_lang_tempcode('DELETE'), do_lang_tempcode('DESCRIPTION_DELETE'), 'delete_custom_' . strval($i), false));\n $hidden->attach(form_input_hidden('custom_' . strval($i), strval($row['id'])));\n $out[] = array($fields, $hidden, do_lang_tempcode('_EDIT_CUSTOM_PRODUCT', escape_html(get_translated_text($row['c_title']))));\n }\n\n return array($out, do_lang_tempcode('ADD_NEW_CUSTOM_PRODUCT'), $this->get_fields(), do_lang_tempcode('CUSTOM_PRODUCT_DESCRIPTION'));\n }",
"protected function getConfigDbUser(): array\n {\n $ConfigDb = new \\Rdb\\Modules\\RdbAdmin\\Models\\ConfigDb($this->Container);\n $configNames = [\n 'rdbadmin_UserRegisterDefaultRoles',\n ];\n $configDefaults = [\n '3',\n ];\n\n $output = $ConfigDb->get($configNames, $configDefaults);\n\n unset($ConfigDb, $configDefaults, $configNames);\n return $output;\n }",
"protected function defaultRawConfiguration()\n {\n return [\n 'negotiation' => [\n 'enabled' => false,\n ],\n 'serializer' => [\n 'enabled' => true\n ],\n 'normalizer' => [\n 'enabled' => false\n ],\n 'validator' => [\n 'enabled' => false\n ],\n 'types' =>\n [\n [\n 'name' => 'json',\n 'values'=> [\n 'application/json','text/json'\n ],\n 'restrict' => null\n ],\n [\n 'name' => 'xml',\n 'values' => [\n 'application/xml','text/xml'\n ],\n 'restrict' => null\n ]\n ],\n 'headers' =>\n [\n 'content_type' => 'content-type',\n 'accept_type' => 'accept'\n ]\n ];\n }",
"public function getDefaults(): array;",
"public function merge(array $config)\n {\n // override defaults with given config\n if (!empty($config['config']) && is_array($config['config'])) {\n $this->config = array_replace_recursive($this->config, $config['config']);\n }\n }",
"function copyDefaultConfig($datadir)\r\n{\r\n\r\n $default_config_file = __DIR__ . \"/../../php/functions/default.json\";\r\n $new_config_file = $datadir . 'config.json';\r\n $old_config_file = __DIR__ . \"/../../config/config.php\";\r\n $old_config_file_renamed = __DIR__ . \"/../../config/config.old.php\";\r\n $old_config_file_note = __DIR__ . \"/../../config/remove_this_dir.txt\";\r\n\r\n appendLog(\"Logarr is copying the default config file to the new data directory: \" . $new_config_file);\r\n\r\n if (is_file($old_config_file) && !is_file($new_config_file)) {\r\n appendLog(\"Logarr legacy config file detected - attempting to convert\");\r\n include_once($old_config_file);\r\n\r\n //Copy default files if conversion fails:\r\n\r\n if ((!isset($config) || empty($config)) || !isset($logs)) {\r\n phpLog($phpLogMessage = \"Logarr ERROR: Legacy config file detected, failed to convert\");\r\n appendLog(\"ERROR: Logarr legacy config file detected and failed to convert. The default config file will be created.\");\r\n\r\n $copyDefaults = copy($default_config_file, $new_config_file);\r\n\r\n appendLog(\"Logarr created new default config file (Legacy config file conversion failed): \" . $new_config_file);\r\n appendLog(\"Logarr Setup is complete!\");\r\n\r\n //TODO: Add config file and dir fail note\r\n //TODO: Add datadir and data dir warning (From Monitorr functions)\r\n\r\n return true;\r\n }\r\n\r\n $new_config = json_decode(file_get_contents($default_config_file), 1);\r\n\r\n $old_config_converted = array(\r\n 'settings' => array(\r\n 'rftime' => $config['rftime'],\r\n 'rflog' => $config['rflog'],\r\n 'maxLines' => $config['max-lines'],\r\n ),\r\n 'preferences' => array(\r\n \"sitetitle\" => $config['title'],\r\n \"timezone\" => $config['timezone'],\r\n \"timestandard\" => ($config['timestandard'] == 0 ? \"False\" : \"True\"),\r\n \"updateBranch\" => $config['updateBranch'],\r\n ),\r\n \"logs\" => array()\r\n );\r\n\r\n if (!empty($logs)) {\r\n foreach ($logs as $logTitle => $path) {\r\n array_push(\r\n $old_config_converted['logs'],\r\n array(\r\n \"logTitle\" => $logTitle,\r\n \"path\" => $path,\r\n \"enabled\" => \"Yes\",\r\n \"category\" => \"Uncategorized\"\r\n )\r\n );\r\n }\r\n }\r\n\r\n $old_config_converted['logs'] = array_merge($old_config_converted[\"logs\"], $new_config[\"logs\"]);\r\n\r\n $old_new_merged = array_replace_recursive($new_config, $old_config_converted);\r\n\r\n $json = json_encode($old_new_merged, JSON_PRETTY_PRINT);\r\n file_put_contents($new_config_file, $json);\r\n $copyDefaults = true;\r\n appendLog(\"Logarr converted legacy config file to new config file: \" . $new_config_file);\r\n\r\n //if (unlink($old_config_file)) {\r\n if (rename($old_config_file, $old_config_file_renamed)) {\r\n appendLog(\"Logarr legacy config file has been converted and renamed to config.old.php. The '/assets/config' directory and all contents can be safely removed. \");\r\n file_put_contents($old_config_file_note, \"Logarr legacy config file was converted to new format and renamed to config.old.php, this file and the 'config' directory can be safely removed.\");\r\n } else {\r\n appendLog(\"WARNING: Logarr legacy config file was converted to new format, however, could not be renamed. The 'assets/config' directory and all contents can be safely removed\");\r\n file_put_contents($old_config_file_note, \"Logarr legacy config file was converted to new format, however, could not be renamed. This file and the 'config' directory can be safely removed.\");\r\n }\r\n\r\n appendLog(\"Logarr Setup is complete!\");\r\n } else {\r\n $copyDefaults = copy($default_config_file, $new_config_file);\r\n appendLog(\"Logarr created new default config file: \" . $new_config_file);\r\n appendLog(\"Logarr Setup is complete!\");\r\n }\r\n\r\n return $copyDefaults;\r\n}",
"function default_configuration()\r\n {\r\n return array();\r\n }",
"function mergeConfig($aConfigs)\r\n\t{\r\n\t\tglobal $gXpConfig;\r\n\r\n\t\t$merged = array_merge($gXpConfig, $aConfigs);\r\n\t\t\r\n\t\tforeach($merged as $key => $value)\r\n\t\t{\r\n\t\t\t$config[$key] = stripslashes($value);\r\n\t\t}\r\n\r\n\t\treturn $config;\r\n\t}",
"protected function retrieveConfigUpdates(&$config) {\n $config['updates'] = array();\n $updates = $this->GenomeUpdate->find('all', array(\n 'conditions' => array(\n 'config_id' => $config['id']\n )\n ));\n // Parses uploads retrieved\n foreach($updates as $update) {\n $update = $update['GenomeUpload'];\n $index = $update['id'];\n if($index) {\n $config['updates'][$index] = $update;\n }\n }\n }",
"public function getDefaultConfig($fileName = null)\n {\n $configHelper = \\Fci_Helper_Config::getInstance();\n if (!$fileName) {\n $configHelper->load('default.xml.dist');\n } else {\n try {\n $configHelper->load($fileName . '.xml');\n } catch (ParserException $e) {\n $configHelper->load('default.xml.dist');\n }\n }\n\n $default = [\n 'file' => [\n 'path' => $configHelper->getFilePath(),\n 'delimiter' => $configHelper->getFileDelimiter(),\n 'enclosure' => $configHelper->getFileEnclosure(),\n 'archive_with_datetime' => (int)$configHelper->getArchiveWithDateTime(),\n ],\n 'general' => [\n 'reload_cache' => (int)$configHelper->getReloadCache(),\n 'disable_products' => (int)$configHelper->getDisableProducts(),\n 'delete_disabled_products' => (int)$configHelper->getDeleteDisabledProducts(),\n 'disable_conditions' => $configHelper->getDisableConditions(),\n 'delete_products_not_in_csv' => (int)$configHelper->getDeleteProductsNotInCsv(),\n 'unset_special_price' => (int)$configHelper->getUnsetSpecialPrice(),\n 'delete_all_special_prices' => (int)$configHelper->getDeleteAllSpecialPrices(),\n 'scripts' => $configHelper->getScripts(),\n ],\n 'dataprocessing' => [\n 'general' => [\n 'mode' => $configHelper->getMode(),\n 'import' => $configHelper->getImportType(),\n 'cache_lines' => $configHelper->getLinesToCache(),\n 'mappings' => $configHelper->getMappingsValue(),\n 'strip_html_tags' => (int)$configHelper->getStripHtmlTags(),\n 'import_globally' => (int)$configHelper->getImportGallery(),\n 'date_time_format' => $configHelper->getDateTimeFormat(),\n ],\n 'images' => [\n 'image_prefix' => $configHelper->getImagePrefix(),\n 'image_split' => $configHelper->getImageSeparator(),\n 'sku_fallback' => (int)$configHelper->getUseSkuImageFallback(),\n 'import_gallery' => (int)$configHelper->getImportGallery(),\n ],\n 'mandatory' => $configHelper->getMandatoryFields(),\n 'products' => [\n 'identifier' => $configHelper->getProductIdentifier(),\n 'clear_existing_websites' => (int)$configHelper->getClearExistingWebsites(),\n ],\n ],\n 'general_defaults' => [\n 'websites' => $configHelper->getWebsitesValue(),\n 'store' => $configHelper->getStoreValue(),\n ],\n 'product_defaults' => $configHelper->getProductDefaults(),\n 'category_defaults' => $configHelper->getCategoryDefaults(),\n 'category_settings' => [\n 'root_category' => $configHelper->getRootCategory(),\n 'category_separate' => $configHelper->getCategorySeparate(),\n 'sub_category_separate' => $configHelper->getSubCategorySeparate(),\n 'create_categories' => (int)$configHelper->createCategories(),\n 'default_product_position' => $configHelper->getDefaultProductPosition(),\n ],\n ];\n\n return $default;\n }",
"public static function loadConfig()\n {\n\t\tstatic $configClass;\n\t\tif ($configClass == null)\n\t\t{\n\t\t\t$db = Jfactory::getDbo();\n\t\t\t$db->setQuery(\"Select * from #__osrs_configuration\");\n\t\t\t$configs = $db->loadObjectList();\n\t\t\t$configClass = array();\n\t\t\tforeach ($configs as $config) {\n\t\t\t\t$configClass[$config->fieldname] = $config->fieldvalue;\n\t\t\t}\n\n\t\t\t$curr = $configClass['general_currency_default'];\n\t\t\t$arrCode = array();\n\t\t\t$arrSymbol = array();\n\n\t\t\t$db->setQuery(\"Select * from #__osrs_currencies where id = '$curr'\");\n\t\t\t$currency = $db->loadObject();\n\t\t\t$symbol = $currency->currency_symbol;\n\t\t\t$index = -1;\n\t\t\tif ($symbol == \"\") {\n\t\t\t\t$symbol = '$';\n\t\t\t}\n\t\t\t$configClass['curr_symbol'] = $symbol;\n\t\t}\n return $configClass;\n }",
"public function getProductDefaults()\n {\n $defaults = $this->_config->get('product_defaults');\n\n if (is_array($defaults)) {\n return $defaults;\n }\n\n return [];\n }",
"private function prepareConfiguration()\n {\n $configuration = array();\n\n foreach ($this->configProvider->getIds() as $entityConfigId) {\n $className = $entityConfigId->getClassName();\n $fields = $this->configProvider->filter(\n function (ConfigInterface $fieldConfig) {\n return $fieldConfig->is('available_in_template');\n },\n $className\n );\n\n if (count($fields)) {\n $configuration[$className] = array();\n foreach ($fields as $fieldConfig) {\n $configuration[$className][] = 'get' . strtolower($fieldConfig->getId()->getFieldName());\n }\n }\n }\n\n return $configuration;\n }",
"public function getDefaults();",
"public function merge(ContainerConfig $containerConfig): ContainerConfig;",
"function getDefaultImageConfiguration()\n {\n global $serendipity;\n\n if (($this->defaultImageConfigurationdefault ?? null) === null) {\n $this->defaultImageConfigurationdefault = array(\n 'defaultavatar' => ($this->get_config('defaultavatar')==''?'': $this->get_config('defaultavatar', '')),\n 'size' => $this->get_config('size', '40'),\n 'rating' => $this->get_config('rating', '-')\n );\n }\n return $this->defaultImageConfigurationdefault;\n }",
"protected function _merge_relationship_index_config($old_config, $overriding_config, $relationship_index) {\n $merge_properties = [ 'entity_type', 'index_singular' ];\n foreach ($merge_properties as $property) {\n if ($old_config[ $property ] ?? false) {\n if (($old_config[ $property ] == $overriding_config[ $property ]) ||\n (is_array($old_config[ $property ]) && in_array($overriding_config[ $property ], $old_config[ $property ]))\n ) {\n } else {\n $old_config[ $property ] = is_array($old_config[ $property ]) ? $old_config[ $property ] : [ $old_config[ $property ] ];\n $old_config[ $property ][] = $overriding_config[ $property ];\n }\n } else {\n $old_config[ $property ] = $overriding_config[ $property ];\n }\n }\n \n if (!isset($old_config['linked_entities'])) {\n $old_config['linked_entities'] = $overriding_config['linked_entities'];\n } else {\n $old_config['linked_entities'] = array_merge($old_config['linked_entities'], $overriding_config['linked_entities']);\n }\n $old_config['relationship_index'] = $relationship_index;\n return $old_config;\n }",
"public function fillableConfig()\n {\n return array_merge(\n config('easyjoke.category_fields')\n );\n }",
"public function getAllConfigs()\r\n\t{\r\n\t\treturn $this->arrConfig;\r\n\t}",
"protected function getConfigDefaults() {\n\t\treturn array(\n\t\t\t// @todo add description strings\n\t\t\t'servers' => '127.0.0.1',\n\t\t\t'port'\t\t\t\t\t=> 6379,\n\t\t\t'maxconnperserv'\t\t=> 32,\n\t\t);\n\t}",
"public static function mergeConfig(array $parentConfig, array $childConfig)\r\n {\r\n $outConfig = $parentConfig;\r\n\r\n $foundStringKey = false;\r\n foreach ($childConfig as $key => $value) {\r\n if (is_string($key)) {\r\n $foundStringKey = true;\r\n\r\n if (array_key_exists($key, $parentConfig)) {\r\n\r\n if (is_array($value) && is_array($parentConfig[$key])) {\r\n /*\r\n * Apply a recursive step if the array key is a string\r\n * and thus this is an associative array\r\n */\r\n $outConfig[$key] = self::mergeConfig($parentConfig[$key], $value);\r\n } else {\r\n /*\r\n * When there is a mismatch between the types\r\n * of the values, just use the value in the child\r\n */\r\n $outConfig[$key] = $value;\r\n }\r\n\r\n } else {\r\n /*\r\n * Just override what's in the parent with what\r\n * is in the child\r\n */\r\n $outConfig[$key] = $value;\r\n }\r\n }\r\n }\r\n\r\n /*\r\n * When all the keys are integers, then we aren't really mapping keys to each\r\n * other and should just use the values in the child\r\n */\r\n if (! $foundStringKey && (count($childConfig) > 0)) {\r\n $outConfig = $childConfig;\r\n }\r\n\r\n return $outConfig;\r\n }",
"public function defaultSettings()\n {\n return $this->repository->get( $this->repoOptionString($this->settingsKey, $this->defaultSettingsKey), array());\n }",
"protected function defaultConfig()\n\t{\n\t\t$this->config=array(\n\t\t\t'code'=>'1',\n\t\t\t'scanning'=>\"\",\n\t\t\t'scanCodes'=>array()\n\t\t);\n\t}"
] | [
"0.629771",
"0.6081072",
"0.5964614",
"0.564848",
"0.5647698",
"0.5608753",
"0.55674237",
"0.5514988",
"0.55116916",
"0.549727",
"0.5490413",
"0.54854226",
"0.54098266",
"0.53893554",
"0.52684885",
"0.5228975",
"0.5226455",
"0.5202413",
"0.5170636",
"0.5148066",
"0.5141824",
"0.51294017",
"0.51191247",
"0.5118469",
"0.50876516",
"0.50811344",
"0.50794595",
"0.5057911",
"0.50450754",
"0.5030805",
"0.50296",
"0.50235873",
"0.49846607",
"0.49792984",
"0.4978893",
"0.4973231",
"0.4964159",
"0.49549866",
"0.4947697",
"0.49442333",
"0.492277",
"0.49227047",
"0.49076122",
"0.49068704",
"0.48980722",
"0.48954844",
"0.48895594",
"0.48879436",
"0.48840293",
"0.48775315",
"0.48707464",
"0.486928",
"0.48681444",
"0.48649678",
"0.4851864",
"0.48447198",
"0.4833008",
"0.4831541",
"0.48223108",
"0.48208597",
"0.48120254",
"0.48062524",
"0.48061907",
"0.48054925",
"0.479856",
"0.47878513",
"0.47849715",
"0.47833312",
"0.47797292",
"0.47774407",
"0.47673202",
"0.47669303",
"0.47653753",
"0.47622254",
"0.47614852",
"0.47563785",
"0.47476518",
"0.47475785",
"0.47417524",
"0.47403687",
"0.4737986",
"0.47271037",
"0.47233447",
"0.47192866",
"0.4711661",
"0.47103402",
"0.46898243",
"0.4689606",
"0.4686811",
"0.4673365",
"0.46730214",
"0.46676102",
"0.46659625",
"0.4658767",
"0.46563226",
"0.46520936",
"0.46442345",
"0.46396706",
"0.46389765",
"0.46382338",
"0.4629569"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
$model = $this->getClassName();
$config = $this->getCrudConfig('create');
$item = app('App\\' . $model);
$viewVars = [
'model' => $model,
$config['viewVar'] => $item,
'viewVar' => $config['viewVar']
];
foreach ($config['relatedModels'] as $var => $relatedModel) {
$viewVars[$var] = app($relatedModel)::pluck('name', 'id');
}
return view(strtolower($model) . '.form', $viewVars);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
] | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
] | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
$model = $this->getClassName();
$config = $this->getCrudConfig('show');
$item = app('App\\' . $model)::where('id', $id)
->first();
return view(strtolower($model) . '.show', [
'model' => $model,
$config['viewVar'] => $item
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show(Resena $resena)\n {\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function get_resource();",
"public function show()\n\t{\n\t\t\n\t}",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function display() {\n echo $this->render();\n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public abstract function display();",
"abstract public function resource($resource);",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245",
"0.60389996",
"0.6016584",
"0.598783",
"0.5961788",
"0.59606946",
"0.5954321",
"0.59295714",
"0.59182066",
"0.5904556",
"0.59036547",
"0.59036547",
"0.59036547",
"0.5891874",
"0.58688277",
"0.5868107",
"0.58676815",
"0.5851883",
"0.58144855",
"0.58124036",
"0.58112013",
"0.5803467",
"0.58012545",
"0.5791527",
"0.57901084",
"0.5781528",
"0.5779676",
"0.5757105",
"0.5756208",
"0.57561266",
"0.57453394",
"0.57435393",
"0.57422745",
"0.5736634",
"0.5736634",
"0.5730559",
"0.57259274",
"0.5724891",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5718969",
"0.5713412",
"0.57091093",
"0.5706405",
"0.57057405",
"0.5704541",
"0.5704152",
"0.57026845",
"0.57026845",
"0.56981397",
"0.5693083",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
$model = $this->getClassName();
$config = $this->getCrudConfig('edit');
$item = app('App\\' . $model)::where('id', $id)
->first();
$viewVars = [
'model' => $model,
$config['viewVar'] => $item,
'viewVar' => $config['viewVar']
];
foreach ($config['relatedModels'] as $var => $relatedModel) {
$viewVars[$var] = app($relatedModel)::pluck('name', 'id');
}
return view(strtolower($model) . '.form', $viewVars);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}",
"public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }",
"public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }",
"private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }",
"public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }",
"public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}",
"public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }",
"public function edit($model, $form);",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\r\n {\r\n return view('petro::edit');\r\n }",
"public function edit($id)\n {\n // show form edit user info\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }",
"public function edit()\n {\n return view('commonmodule::edit');\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('admincp::edit');\n }",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }",
"public function edit()\n {\n return view('Person.edit');\n }",
"public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }",
"public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}",
"public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }",
"public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}",
"public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }",
"public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }",
"public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}",
"public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}",
"public function edit($id)\n {\n return view('models::edit');\n }",
"public function edit()\n {\n return view('home::edit');\n }",
"public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }",
"public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }",
"public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }",
"public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('consultas::edit');\n }",
"public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }",
"public function edit()\n {\n return view('dashboard::edit');\n }",
"public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }",
"public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }",
"public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }",
"public function edit() {\n return view('routes::edit');\n }",
"public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }",
"public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\n }",
"public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }",
"public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function edit()\n {\n return view('inventory::edit');\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit($id)\n {\n return view('backend::edit');\n }",
"public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }",
"public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}"
] | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.68336326",
"0.6811471",
"0.68060875",
"0.68047357",
"0.68018645",
"0.6795623",
"0.6791791",
"0.6791791",
"0.6787701",
"0.67837197",
"0.67791027",
"0.677645",
"0.6768301",
"0.6760122",
"0.67458534",
"0.67458534",
"0.67443407",
"0.67425704",
"0.6739898",
"0.6735328",
"0.6725465",
"0.6712817",
"0.6693891",
"0.6692419",
"0.6688581",
"0.66879624",
"0.6687282",
"0.6684741",
"0.6682786",
"0.6668777",
"0.6668427",
"0.6665287",
"0.6665287",
"0.66610634",
"0.6660843",
"0.66589665",
"0.66567147",
"0.66545695",
"0.66527975",
"0.6642529",
"0.6633056",
"0.6630304",
"0.6627662",
"0.6627662",
"0.66192114",
"0.6619003",
"0.66153085",
"0.6614968",
"0.6609744",
"0.66086483",
"0.66060555",
"0.6596137",
"0.65950733",
"0.6594648",
"0.65902114",
"0.6589043",
"0.6587102",
"0.65799844",
"0.65799403",
"0.65799177",
"0.657708",
"0.65760696",
"0.65739626",
"0.656931",
"0.6567826",
"0.65663105",
"0.65660435",
"0.65615267",
"0.6561447",
"0.6561447",
"0.65576506",
"0.655686",
"0.6556527",
"0.6555543",
"0.6555445",
"0.65552044",
"0.65543956",
"0.65543705",
"0.6548264",
"0.65475875",
"0.65447706"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
$model = $this->getClassName();
$config = $this->getCrudConfig('delete');
$item = app('App\\' . $model)::where('id', $id)
->first();
preg_match('/\\\([a-z]+)Controller$/i', static::class, $matches);
$indexAction = '/';
if (isset($matches[1])) {
$indexAction = '/'. strtolower(Inflector::pluralize($matches[1]));
}
if (empty($item)) {
return redirect($indexAction);
}
$item->delete();
return redirect($indexAction);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
] | 0.0 | -1 |
Returns a collection with all items | public function collection(): ItemCollection
{
if ($this->collection) {
return $this->collection;
}
return $this->collection = new ItemCollection($this->app, $this->path);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAll()\n\t{\n\t\treturn new Collection($this->items);\n\t}",
"public function all(): Collection;",
"public function all(): Collection;",
"public function all(): Collection;",
"public function all(): Collection;",
"public function getAll() : Collection;",
"public function all(): Collection\n {\n }",
"public function all() : Collection;",
"public function collection()\n {\n return collect($this->all());\n }",
"public function all()\n {\n return $this->resource::collection(\n $this->repository->all()\n );\n }",
"public function all(){\r\n return $this->items;\r\n }",
"public function all(): Collection\n {\n return $this->model->all();\n }",
"public function all(): Collection\n {\n return clone $this->entries;\n }",
"public function getCollection();",
"public function getCollection();",
"public function getCollection();",
"public function getCollection();",
"public function getAll()\n {\n \tif(!$this->isEmpty()){\n \t\treturn $this->items;\n \t}\n }",
"public function getAll(): Collection\n {\n return $this->model->newQuery()->orderBy('disporder')->all();\n }",
"protected function all()\n\t{\n\t\treturn $this->items;\n\t}",
"public function all() {\n\t\treturn $this->items;\n\t}",
"public function getAll(): Collection\n {\n return $this->model->all();\n }",
"public function asCollection();",
"public function getItems(): CollectionInterface;",
"public function all()\n\t{\n\t\treturn $this->items;\n\t}",
"public function all()\n {\n return $this->items;\n }",
"public function all()\n {\n return $this->items;\n }",
"public function all()\n {\n return $this->items;\n }",
"public function all()\n {\n return $this->items;\n }",
"public function all()\n {\n return $this->items;\n }",
"public function all()\n {\n return $this->items;\n }",
"public function getAllCollection() \n\n\t{\n\n\t\treturn $this->db->get('tb_collection')->result_array();\n\t}",
"public function all()\n {\n return $this->refresh()->getItems();\n }",
"public function getCollection() ;",
"public function getCollection() {\n return $this->gateway->find(\n $this->getFilter(),\n $this->order,\n $this->relations,\n $this->pager,\n !$this->excludeRepo\n );\n }",
"public function listAll()\n {\n $collectionClassName = $this->getInstanceCollectionClassName();\n return $collectionClassName::create($this, $this->getTable());\n }",
"public function getAll(): IteratorAggregate\n {\n return $this->items;\n }",
"public function collection()\n {\n return collect($this->toArray());\n }",
"public function content(): Collection\n {\n return $this->items->values();\n }",
"public function all(): \\app\\domain\\interfaces\\EntityCollection {\n $collection = new \\app\\domain\\interfaces\\EntityCollection;\n \n return $collection;\n }",
"public function all() : Collection\n {\n return Order::all();\n }",
"public function getAll()\n {\n return $this->get();\n }",
"public function collection() {\n \t$db = $this->db;\n\t\t$sql = $this->sql();\n\t\t$rows = $db::execute($sql);\n\t\t$model = $this->model;\n\t\treturn new \\Collection($model::arrayFactoryFromRows($rows));\n\t}",
"public function all()\n {\n $objects = SevDeskApi::getFromSevDesk($this->objectName);\n $this->collection = collect();\n\n foreach($objects as $object)\n $this->collection->push($this->newInstance($object));\n\n return $this->collection;\n }",
"public function all()\n {\n return new CategoryCollection(Category::whereUserId(Auth::id())->ordered()->get());\n }",
"public function getAllItems()\n {\n if($this->itemsCollection === null)\n {\n $this->_prepareData();\n }\n\n return $this->itemsCollection->getItems();\n }",
"public function getAll()\n {\n return array_values($this->collection->getAll());\n }",
"public function itemsQuery()\n {\n return $this->items(null);\n }",
"public function getAll()\n {\n $model = new static::$model;\n\n $per_page = request('per_page');\n $query = $model::with($model::$localWith);\n $this->qualifyCollectionQuery($query);\n\n // Handle pagination, if applicable\n if( $per_page ) $model->setPerPage($per_page);\n\n $perPage = $model->getPerPage();\n if ($perPage) {\n $paginator = $query->paginate($perPage);\n return $this->response->paginator($paginator, $this->getTransformer());\n } else {\n $resources = $query->get();\n\n return $this->response->collection($resources, $this->getTransformer());\n }\n }",
"public function all() : Collection\n {\n return Category::all();\n }",
"public function getAll()\n {\n $resultSet = $this->oMapper->getAll();\n\n $className = get_class($this);\n\n// $return = array();\n $dto = new EntityDTO($this->oDb, $this->oLogger);\n foreach ($resultSet as $key => $row) {\n $obj = new $className($dto);\n $obj->fillByObject($row);\n\n $this->aCollection[] = $obj;\n }\n unset($resultSet);\n\n return $this->aCollection;\n }",
"public function get() : Collection\n {\n $records = $this->applyScopes()->query->get();\n $records = $this->getTree()->loadInto($records);\n\n return $this->mapper->makeEntities($records);\n }",
"public function entities(): Collection;",
"public function all()\n {\n return $this->service->all();\n }",
"public function all(): Collection\n {\n $collection = collect();\n foreach ($this->items as $messages) {\n $collection->push(...array_values($messages));\n }\n\n return $collection;\n }",
"public function all(): array\n {\n return $this->items;\n }",
"public function all(): array\n {\n return $this->items;\n }",
"public function all()\n {\n return parent::all();\n }",
"public function getAll()\n {\n return $this->wrapper(\n $this->model->getAll()\n );\n }",
"protected function all(): Collection\n {\n return parent::all()->map(function ($coupon) {\n return new self($coupon);\n });\n }",
"public function getItems();",
"public function getItems();",
"public function getItems();",
"public function getItems();",
"public function getItems();",
"public function getItems();",
"public function getItems();",
"public function getItems();",
"public function getItems();",
"public function getItems();",
"public function getItems();",
"public function getItems();",
"public function getItems();",
"public function getAll()\n {\n return $this->all;\n }",
"public function getAll(): Collection\n {\n if (count($this->catalog)) {\n return $this->catalog;\n }\n if ($this->attached) {\n return $this->attached->getAll();\n }\n throw new \\Exception(\"Missing catalog data\");\n }",
"public function all()\n {\n return $this->query()->get();\n }",
"public static function getAll()\n\t{\n\t\treturn self::find()->asArray()->all();\n\t}",
"public static function all() {\n\t\treturn with(new static)->query()->get();\n\t}",
"public function getAll()\n\t{\n\t\treturn $this->all;\n\t}",
"public function all(): Collection\n {\n return $this->localeCollection;\n }",
"public function all() : array\n {\n return $this->items;\n }",
"public function all() : array\n {\n return $this->items;\n }",
"public function getAll()\n {\n return parent::getAll();\n }",
"public function getAll()\n {\n return parent::getAll();\n }",
"public function getAll()\n {\n return parent::getAll();\n }",
"public function getAll()\n {\n return parent::getAll();\n }",
"public function all()\n {\n return $this->item;\n }",
"public function all()\n {\n return $this->repository->all();\n }",
"public function all()\n {\n return $this->repository->all();\n }",
"public function getItems()\n {\n return $this->_itemCollection;\n }",
"public function getAll(): Collection\n {\n return $this->categoryRepository->getAll();\n }",
"public function getAll()\r\n\t{\r\n\t\treturn $this->findAll();\r\n\t}",
"public function getCollection(): array\n {\n return $this->collection;\n }",
"public function get_all ();",
"public function getAll()\n {\n return $this->findAll();\n }",
"public function all(){\n return $this;\n }",
"public final function get_all()\n {\n }",
"public function Items() {\n\t\t$output = new ArrayList();\n\t\t$output->merge($this->getPages());\n\t\t$output->merge($this->getDataObjects());\n\n\t\t$this->extend('updateItems', $output);\n\n\t\treturn $output;\n\t}",
"public function getCollection()\n {\n if (!$this->_collection) {\n $this->_prepareCollection();\n }\n\n return $this->_collection;\n }",
"public function all()\n {\n $item = new Item;\n $items = $item->all();\n View::renderJson($items);\n }",
"public function collection()\n {\n return Product::all();\n }"
] | [
"0.8674736",
"0.82896125",
"0.82896125",
"0.82896125",
"0.82896125",
"0.81310076",
"0.8089803",
"0.80866605",
"0.78209794",
"0.78171456",
"0.7706342",
"0.7691358",
"0.76245475",
"0.76195467",
"0.76195467",
"0.76195467",
"0.76195467",
"0.7616132",
"0.76082325",
"0.75934744",
"0.758243",
"0.7554952",
"0.7551338",
"0.7545383",
"0.74926496",
"0.7489816",
"0.7489816",
"0.7489816",
"0.7489816",
"0.7489816",
"0.7489816",
"0.74871594",
"0.7480288",
"0.74235094",
"0.73791766",
"0.73592824",
"0.73256606",
"0.7311971",
"0.72340953",
"0.72300047",
"0.7216446",
"0.72116715",
"0.7183236",
"0.7173651",
"0.715637",
"0.7141502",
"0.71197367",
"0.7117114",
"0.71097016",
"0.70942104",
"0.708421",
"0.70787674",
"0.70642287",
"0.7054691",
"0.70517087",
"0.70480055",
"0.70480055",
"0.7019174",
"0.699846",
"0.6983491",
"0.6977698",
"0.6977698",
"0.6977698",
"0.6977698",
"0.6977698",
"0.6977698",
"0.6977698",
"0.6977698",
"0.6977698",
"0.6977698",
"0.6977698",
"0.6977698",
"0.6977698",
"0.69687",
"0.69607687",
"0.69357306",
"0.69342",
"0.6926171",
"0.6922592",
"0.6921057",
"0.6910855",
"0.6910855",
"0.69054306",
"0.69054306",
"0.69054306",
"0.69054306",
"0.69004536",
"0.68719107",
"0.68719107",
"0.68663615",
"0.68584394",
"0.6845969",
"0.6835858",
"0.6834403",
"0.6832724",
"0.6826865",
"0.68202126",
"0.6817259",
"0.68071413",
"0.6805665",
"0.6805155"
] | 0.0 | -1 |
Checks if a specified item exists | public function exists(string $item): bool
{
$path = $this->path . '/' . $item . '.json';
return is_file($path);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function itemExists($key);",
"function itemExists(Array $args = array())\n {\n $itemid = isset($args['itemid']) ? $args['itemid'] : $this->object->itemid;\n\n // Make sure we have a primary field\n if (empty($this->object->primary)) throw new Exception(xarML('The object #(1) has no primary key', $this->object->name));\n\n $q = $this->object->dataquery;\n $primary = $this->object->properties[$this->object->primary]->source;\n $q->eq($primary, (int)$itemid);\n\n // Run it\n if (!$q->run()) throw new Exception(xarML('Query failed'));\n $result = $q->output();\n return !empty($result);\n \n }",
"protected function itemExists( string $item ): bool {\n if ( isset( $this->items[ $item ] ) ):\n return TRUE;\n endif;\n return FALSE;\n }",
"protected function _checkExistence($item = null)\n { \n if (empty($item)) {\n $this->_showError(__('Item does not exist'));\n return;\n }\n }",
"public function check_item_exists($params)\n {\n $this->db->select(\"1\");\n $this->db->from('m_komoku');\n $this->db->where('del_flg', '0');\n $this->db->where('komoku_id', $params['komoku_id']);\n $this->db->where('kubun', $params['kubun']);\n \n $query = $this->db->get();\n if ($query->num_rows() > 0) {\n return TRUE;\n } else {\n return FALSE;\n }\n }",
"public function exists($key){return array_key_exists($key,$this->items_array);}",
"public function hasItem(string $key): bool;",
"public function hasItem(string $key): bool;",
"public function containsItem($item): bool;",
"function exists($key) {\n\t\treturn array_key_exists($key,$this->item);\n\t}",
"public function testHasItem()\n {\n self::assertFalse($this->object->hasItem('test'));\n }",
"function check_exists()\r\n\t{\r\n\t\t$name = url_title($this->input->post('name'));\r\n\r\n\t\t$exists = $this->item_definition_model->check_exists(\r\n\t\t\t'name',\r\n\t\t\t$name,\r\n\t\t\t$this->input->post('id_item_definition')\r\n\t\t);\r\n\r\n\t\t$this->xhr_output($exists);\r\n\t}",
"function existsItem ($name) {\n\t\tif ($this->existsItemStrict ($name, STRING)) {\n\t\t\treturn true;\n\t\t} elseif ($this->existsItemStrict ($name, BOOL)) {\n\t\t\treturn true;\n\t\t} elseif ($this->existsItemStrict ($name, NUMERIC)) {\n\t\t\treturn true;\n\t\t} elseif ($this->existsItemStrict ($name, REAL)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function existAuthItem()\n {\n if ($this->type === Item::TYPE_PERMISSION) {\n $authItem = Yii::$app->authManager->getPermission($this->name);\n } else {\n $authItem = Yii::$app->authManager->getRole($this->name);\n }\n if ($this->getIsNewRecord()) {\n if (!empty($authItem)) {\n $this->addError('name', \"This name has already been taken.\");\n }\n } else {\n if (!empty($authItem) && $authItem->name !== $this->item->name) {\n $this->addError('name', \"This name has already been taken.\");\n }\n }\n }",
"public function containsItemWithKey($key, $item): bool;",
"public function hasItem( $key ) {\n return false;\n }",
"public function contains($item);",
"public function contains($item);",
"public function contains($item);",
"function exists($item_kit_id)\n\t{\n\t\t// echo $item_kit_id;\n\t\t$query = $this->db->where(\"category\", \"tickets\")\n\t\t\t\t->where('item_kit_id',$item_kit_id)\n\t\t\t\t->get(\"item_kits\");\n\n\t\treturn ($query->num_rows() == 1);\n\t}",
"public function hasItemId(){\n return $this->_has(7);\n }",
"function MenuItemExists($item_id) \n\t{\n\t\t\t//use sprintf to make sure that $item_id is inserted into the query as a number - to prevent SQL injection\n\t\t\t$query = sprintf(\"SELECT * FROM MenuItem WHERE ItemID = %d;\",\n\t\t\t\t\t\t\t$item_id); \n\n\t\t\t$db = connect_db();\t\t\t\t\t\t\n\n\t\t\t$rows = mysqli_num_rows ( mysqli_query($db, $query));\t\t\t\n\n\t\t\tclose_db($db);\n\n\t\t\treturn $rows;\n\t\t\t\n\t}",
"function existsItemStrict ($name, $type) {\n\t\tif (array_key_exists ('/'.$type.$name, $this->allConfigItems) or\n\t\t\tarray_key_exists ('/'.$type.$name, $this->allUserItems)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"protected function exists() {}",
"public function Exists();",
"public function hasItem($key)\n\t{\n\t\t$this->checkKeyName($key);\n\n\t\t$item = new Item($this->redisClient, $key);\n\n\t\treturn $item->isHit();\n\t}",
"public function itemExists($item_name, $parent_item_id, $language_code = 'en')\n {\n $this->db->where('item_name', $item_name)\n ->where('parent_item_id', $parent_item_id)\n ->where('language_code', $language_code)\n ->from($this->config->item('database_table_menu'));\n\n return ($this->db->count_all_results() == 0 ? false : true);\n }",
"public function contains(self $item, $checkAgainstThis = true) {}",
"private function checkIsExists(): bool\n {\n $id = $this->readImproved([\n 'what' => [$this->table. '.id'],\n 'where' => [\n $this->table. '.listId' => $this->listId,\n $this->table. '.campaignId' => $this->campaignId,\n ]\n ]);\n\n return !is_null($id);\n }",
"abstract public function exists();",
"abstract public function exists();",
"public function hasItemInfo(){\n return $this->_has(3);\n }",
"public function hasItem($key)\n {\n return $this->getItem($key) !== false;\n }",
"public function contains( $item )\n\t{\n\t\treturn in_array( $item , $this->items );\n\t}",
"private function item_section_exist( $section_id, $item_id ) {\n\t\tglobal $wpdb;\n\n\t\t$section_id = intval( $section_id );\n\t\t$item_id = intval( $item_id );\n\n\t\t$query = $wpdb->prepare( \"SELECT * FROM {$wpdb->learnpress_section_items} WHERE section_id = %d AND item_id = %d\", $section_id, $item_id );\n\t\t$item = $wpdb->get_row( $query, ARRAY_A );\n\n\t\treturn ! ! $item;\n\t}",
"function exists()\n {\n return false;\n }",
"public function hasItem(CartItemInterface $item);",
"public function exists() {}",
"public function exists()\r\n {\r\n }",
"public static function exist($key) ;",
"function exists($key, $key2 = null)\n {\n $this->rest->initialize(array('server' => REST_SERVER));\n $this->rest->option(CURLOPT_PORT, REST_PORT);\n $result = $this->rest->get('recipe/maintenance/item/id/' . $key . '-' . $key2);\n return ! empty($result);\n }",
"function isItem( $var );",
"public function exists($key)\n {\n return isset($this->items[$key]);\n }",
"public function contains($item) {\n foreach ($this->items as $i) {\n if ($i == $item) {\n return true;\n }\n }\n return false;\n }",
"public function contains( $item )\n\t\t{\n\t\t\treturn in_array( $item, $this->items );\n\t\t}",
"public function hasItemdata(){\n return $this->_has(22);\n }",
"private function checkIsExists(): bool\n {\n $where = [\n $this->table. '.vendorId' => $this->vendorId,\n $this->table. '.campaign' => $this->campaign,\n ];\n\n if (!is_null($this->id)) {\n $where[$this->table. '.id !='] = $this->id;\n }\n\n $id = $this->readImproved([\n 'what' => [$this->table. '.id'],\n 'where' => $where\n ]);\n\n return !is_null($id);\n }",
"public function exists();",
"public function exists();",
"public function exists();",
"public function contains ($item)\n {\n return in_array($item, $this->data);\n }",
"public function exists()\n {\n }",
"public function exists()\n {\n }",
"public function exist($key);",
"public function has($itemIdentifier)\n {\n return $this->store->has($itemIdentifier);\n }",
"function contains($item) {\r\n return in_array($item, $this->list);\r\n }",
"public function has($itemId)\n {\n return $this->getContent()->has($itemId);\n }",
"public function has($itemId)\n {\n return $this->getContent()->has($itemId);\n }",
"public function has($name)\n\t{\n\t\treturn (isset($this->items[$name]));\n\t}",
"public function has(string $key): bool\n {\n return \\array_key_exists($key, $this->items);\n }",
"public function has($key)\n {\n // return array_has($this->item, $key);\n }",
"public function query_exists($key) {\n\t\t\treturn \\uri\\query::exists($this->object, $key);\n\t\t}",
"public function item_exists( $meta_value ) {\n\t\t$results = get_posts( [\n\t\t\t'post_type' => $this->post_type,\n\t\t\t'meta_key' => $this->meta_key,\n\t\t\t'meta_value' => $meta_value,\n\t\t\t'posts_per_page' => 1,\n\t\t] );\n\n\t\tif ( ! empty( $results ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function exists(): bool;",
"public function exists(): bool;",
"public function exists(): bool;",
"function exists($id);",
"public function hasItem(Item $item)\n {\n if (!$item->exists()) {\n throw new InvalidArgumentException(\"Item does not exist (is not persisted).\");\n }\n if (!$this->exists()) {\n throw new RuntimeException(\"Cannot call hasItem() on a new (non-persisted) exhibit.\");\n }\n return $this->getTable()->exhibitHasItem($this->id, $item->id);\n }",
"public function if_item_is_in_list( $user_id, $list, $item ) {\n \n // Verify if list's meta exists\n $this->db->select('*');\n $this->db->from('lists_meta');\n $this->db->where(['user_id' => $user_id, 'list_id' => $list, 'body' => $item]);\n $query = $this->db->get();\n \n if ( $query->num_rows() > 0 ) {\n \n return true;\n \n } else {\n \n $this->db->select('*');\n $this->db->from($this->table);\n $this->db->where(['user_id' => $user_id, 'list_id' => $list]);\n $query = $this->db->get();\n \n if ( $query->num_rows() > 0 ) {\n \n return false;\n \n } else {\n \n return true;\n \n }\n \n }\n \n }",
"private function _exists() {\n // taky typ uz existuje ?\n $id = $this->equipment->getID();\n if ($id > 0) {\n $this->flash(\"Také vybavenie už existuje.<br/>Presmerované na jeho editáciu.\", \"error\");\n $this->redirect(\"ape/equipment/edit/$id\");\n }\n }",
"function checkCartForItem($addItem, $cartItems) {\n if (is_array($cartItems) && !(is_null($cartItems)))\n {\n foreach($cartItems as $key => $item) \n {\n if($item['productId'] == $addItem)\n return true;\n }\n }\n return false;\n}",
"public function testHasItemInBox()\n {\n $box = new Box(['cat', 'toy', 'torch']);\n //Se espera que para esta entrada se regrese un True como respuesta,\n //puesto que el elemento toy existe.\n $this->assertTrue($box->has('toy'));\n //Se espera que para esta entrada se regrese un False como respuesta,\n //puesto que el elemento ball no existe.\n $this->assertFalse($box->has('ball'));\n }",
"function exists($id) {\n $this->db->from('items_collection');\n $this->db->where('id', $id);\n $query = $this->db->get();\n\n return ($query->num_rows() == 1);\n }",
"function exists() {\n\t\tif ($this->exists) return true;\n\t\treturn false;\n\t}",
"public function has(string $key): bool\n {\n if (is_null($this->items)) {\n return false;\n }\n return array_key_exists($key, $this->items);\n }",
"public function exists()\n {\n return false;\n }",
"static function exists($id) {\n $result = self::get($id);\n if (count($result) > 0) return true;\n return false;\n }",
"public function hasUseradditem(){\n return $this->_has(24);\n }",
"public function hasItem($item)\n {\n\n if ($item instanceof Item)\n {\n return in_array($item->getName(), $this->_registeredElements);\n }\n\n return in_array($item, $this->_registeredElements);\n }",
"public function exists(){\n\t\treturn ($this->count() > 0);\n\t}",
"public function hasItem(Item $item = null)\n {\n return $item ? $this->item == $item : $this->item !== null;\n }",
"public function hasMember(int|float|null|object|bool|string $item): bool\n {\n return key_exists($this->hash($item), $this->internalMap);\n }",
"public function has(string $key) : bool\n {\n return array_key_exists($key, $this->items);\n }",
"public function exists($key){\n\n //get exists\n if($this->client->exists($key)){\n return true;\n }\n return false;\n }",
"public function has_items()\n {\n }",
"public function exists($key);",
"public function exists($key): bool;",
"function contains($item) {\n\t\t\t\n\t\t\tforeach($this->items as $_item) {\n\n\t\t\t\tif($_item->equals($item)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}",
"public function has(string $entryIdentifier): bool;",
"public function checkIfItemExists($id, $data) {\n $items = Cart::getCart()->items;\n\n foreach ($items as $item) {\n if ($id == $item->product_id && $item->seller_product_id == $data['seller_info']['product_id']) {\n $product = $this->product->findOnebyField('id', $id);\n\n if ($product->type == 'configurable') {\n $variant = $this->product->findOneByField('id', $data['selected_configurable_option']);\n\n if ($item->child->product_id == $data['selected_configurable_option']) {\n return $item->id;\n }\n } else {\n return $item->id;\n }\n }\n }\n\n return 0;\n }",
"public function exists(string $key);",
"function exists() {\n\t return !empty($this->id);\n\t}",
"public static function isExistsPaymentItem($id){\n //print_r($id);exit;\n $result = DB::table('payment_cost_item')\n ->where('fk_payment_id', '=', $id)\n ->get();\n return $result;\n }",
"public function hasKey($key)\n {\n return isset($this->items[ $key ]);\n }",
"public static function exists(&$object, $key) {\n\t\t\t$qarray = \\uri\\generate::query_array($object);\n\t\t\treturn isset($qarray[$key]);\n\t\t}",
"public function hasItemdata(){\n return $this->_has(6);\n }",
"public function containsKey($key): bool\n {\n return isset($this->items[$key]) || \\array_key_exists($key, $this->items);\n }",
"public function exists($id);",
"public function exists($id);",
"public static function checkOwnItem\n\t(\n\t\t$uniID\t\t\t// <int> The Uni-Account to check the item for.\n\t,\t$itemID\t\t\t// <int> The item to check if you own.\n\t)\t\t\t\t\t// RETURNS <bool> TRUE on success, or FALSE if failed.\n\t\n\t// AppAvatar::checkOwnItem($uniID, $itemID);\n\t{\n\t\treturn (Database::selectValue(\"SELECT item_id FROM user_items WHERE uni_id=? AND item_id=? LIMIT 1\", array($uniID, $itemID))) ? true : false;\n\t}"
] | [
"0.7817557",
"0.7751124",
"0.7649958",
"0.75421745",
"0.74676985",
"0.74314886",
"0.7398742",
"0.7398742",
"0.7326359",
"0.71478736",
"0.706621",
"0.70564634",
"0.69869924",
"0.69680256",
"0.69623107",
"0.69395345",
"0.6919507",
"0.6919507",
"0.6919507",
"0.6864059",
"0.6799915",
"0.6789722",
"0.6771777",
"0.6721388",
"0.67134047",
"0.6709041",
"0.66975033",
"0.6660311",
"0.66453373",
"0.6619964",
"0.6619964",
"0.6618447",
"0.6611005",
"0.65936124",
"0.6582183",
"0.6579196",
"0.6565559",
"0.6563437",
"0.6552438",
"0.6543567",
"0.6541199",
"0.6537615",
"0.65341175",
"0.6513169",
"0.6500381",
"0.64954436",
"0.64879507",
"0.6485791",
"0.6485791",
"0.6485791",
"0.64734423",
"0.64660096",
"0.6465169",
"0.64620435",
"0.6456593",
"0.6447091",
"0.6442265",
"0.6442265",
"0.6441167",
"0.64154845",
"0.64112335",
"0.63546985",
"0.63498145",
"0.63491863",
"0.63491863",
"0.63491863",
"0.63479155",
"0.63402605",
"0.6333032",
"0.632704",
"0.6323731",
"0.63095045",
"0.6304633",
"0.63008666",
"0.6286748",
"0.6282137",
"0.6279374",
"0.62783265",
"0.6276874",
"0.627151",
"0.62694496",
"0.6267936",
"0.62598675",
"0.62518835",
"0.6247266",
"0.62464994",
"0.62443006",
"0.62365407",
"0.62358403",
"0.62302405",
"0.6228269",
"0.6215351",
"0.619792",
"0.61855525",
"0.6171355",
"0.61682916",
"0.61671174",
"0.6136258",
"0.6136258",
"0.61321276"
] | 0.709157 | 10 |
Gets an item object by ID | public function get(string $item): ?Item
{
// check if the item exists
if (!$this->exists($item)) {
return null;
}
return new Item($this->app, $this->path . '/' . $item . '.json');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getItem( $id );",
"public function getItem ($id);",
"public function getItem($id)\n {\n return $this->where('id', $id)->first();\n }",
"public function getItem($id) {\n foreach($this->all as $item) {\n if ($id == $item->getId()) {\n return $item;\n }\n }\n }",
"public function get($id)\n {\n $item = Item::findOrFail($id);\n\n\n return $item;\n }",
"public function retrieveItem($id) {\n return $this->itemsDB->retrieve($id);\n }",
"public function getOneItem($id)\n {\n $item = Item::find($id);\n // dd($item);\n return $item;\n }",
"public function getItemById($id)\n {\n return $this->type->find($id);\n }",
"public function getById($id) {\n foreach ($this->items as $item) {\n if ($item->id() == $id) {\n return $item;\n }\n }\n \n return null;\n }",
"public function show($id)\n {\n return Item::find($id);\n }",
"function getItem( $id = null ){\r\n\t\tif( $id === null ){\r\n\t\t\t$id = rsgInstance::getInt( 'id', null );\r\n\r\n\t\t\tif( $id === null ){\r\n\t\t\t\t// there is no item set, return the first value from getItems()\r\n\t\t\t\t$items = $this->items();\r\n\r\n\t\t\t\treturn array_shift( $items );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$items = $this->items();\r\n\t\treturn $items[$id];\r\n\t}",
"public function getItem( $id )\n\t{\n\t\treturn $this->controller->getItem( $id );\n\t}",
"public function show($id)\n {\n $item = Item::findOrFail($id);\n\n\n return $item;\n }",
"public function getItemById($it_id)\n\t{\n\t\treturn \\ORM::for_table($this->table)->where('it_id', $it_id)->find_one();\n\t}",
"public function getItem($id) {\n $item_url = $this->constructItemUrl($id);\n // Get the JSON object at the specified URL\n $json = $this->loadJSONUrl($item_url);\n if ($json) {\n return $json;\n }\n else {\n $migration = Migration::currentMigration();\n $message = t('Loading of !objecturl failed:', array('!objecturl' => $item_url));\n $migration->getMap()->saveMessage(\n array($id), $message, MigrationBase::MESSAGE_ERROR);\n return NULL;\n }\n }",
"public function getById( $id );",
"abstract protected function get_item_from_db($item_id);",
"public function getItemById($id)\n\t{\n\t\treturn $this->find((int) $id)->current();\n\t}",
"public function getItemById($id)\n\t{\n\t\treturn $this->find((int) $id)->current();\n\t}",
"public function get( $id );",
"public function getItem($id)\n {\n $this->loadItems();\n return isset($this->items[$id]) ? $this->items[$id] : null;\n }",
"public function item($id)\n {\n $content = $this->itemRequest($id);\n return $this->apiResponse($content[0]);\n }",
"public function getItem( int $id ) {\n\t\treturn User::where( 'id', $id )->first();\n\t}",
"abstract protected function getObject($id);",
"static public function getItemById($id) {\n $rq = \"SELECT * FROM \" . PREFIX . \"shop.`item` \n WHERE `id` =\" . $id . \" LIMIT 1;\";\n\n $aItem = Sql::Get($rq, 1);\n // MemCacheManager::Set($sKey, $aItems, 900); //900s = 15 min\n\n return $aItem[0];\n }",
"public function obtenerItem($id) {\n return $this\n ->reiniciar()\n ->donde([\n 'id'=>$id\n ])\n ->obtenerUno();\n }",
"public function getItem() \n {\n $this->checkUserIsLogged();\n $params = Route::getUrlParameters();\n $id = $params['id'];\n try {\n $item = new Item;\n $item->getItem($id);\n View::renderJson($item);\n } catch (Exception $e) {\n View::renderJson(['status' => 0, 'message' => $e]);\n }\n }",
"public abstract function getById($id);",
"public abstract function get($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"abstract public function getByItemId($itemId);",
"public function getItem($ID)\n {\n $Item = $this->mysql->QUERY(\n 'SELECT player_equipment.*,\n server_items.NAME,\n server_items.CATEGORY,\n server_items.LOOT_ID,\n server_items.SLOTS,\n server_items.DAMAGE,\n server_items.SHIELD,\n server_items.SHIELD_ABSORBATION,\n server_items.SPEED,\n server_items.SELLING_CREDITS\n FROM player_equipment, server_items\n WHERE player_equipment.USER_ID = ?\n AND player_equipment.PLAYER_ID = ?\n AND server_items.ID = player_equipment.ITEM_ID\n AND player_equipment.ID = ?',\n [$this->user->USER_ID, $this->user->PLAYER_ID, $ID]);\n\n if (!isset($Item[0])) {\n return false;\n } else {\n return new Item($Item[0], $this->mysql);\n }\n }",
"public function getById(string $id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get(string $id);",
"public function get( $id ){}",
"public function getById($id) {\n return $this->getBy(id, \"id\");\n }",
"public function getById(int $id);",
"abstract public function getById($id);",
"abstract public function getById($id);",
"function getItemById($id) {\n \n $connection = getConnection();\n \n // TODO Prevent SQL injection. Prepared statement?\n $data = mysqli_query($connection, \"SELECT * FROM inventory WHERE item_id = $id\");\n\n $result = mysqli_fetch_assoc($data);\n \n mysqli_close($connection);\n\n return $result;\n }",
"function get_item_by_id($id) {\n\tglobal $wpdb;\n\tglobal $webgrain2;\n\t$sql = \"SELECT * FROM \" . $webgrain2->second_menu_table . \" WHERE id = $id\";\n\t$result = $wpdb->get_results($wpdb->prepare($sql, 0));\n\tif(!empty($result)) { foreach($result as $r) { return $r; } }\n}",
"abstract public function get($id);",
"abstract public function get($id);",
"abstract public function get($id);",
"public function item($id)\n {\n foreach (static::$basket[$this->id] as $item) {\n if ($item->id == $id) return $item;\n }\n return false;\n }",
"public function get_by_id($id)\r\n\t{\r\n\t\treturn $this->findByPoperty(array($this->id_field => $id));\r\n\t}",
"function get_by_id($id)\n {\n $this->db2->where($this->id, $id);\n return $this->db2->get($this->table)->row();\n }",
"public function getItemByID($id){\r\n $this->db->query('SELECT *,\r\n items.id as itemID,\r\n categories.id as categoryID,\r\n items.name as itemName,\r\n categories.name as categoryName,\r\n items.user_id as itemUserID,\r\n categories.user_id as categoryUserID,\r\n items.created_at as itemCreated,\r\n categories.created_at as categoryCreated\r\n FROM items\r\n INNER JOIN categories\r\n WHERE items.id = :id');\r\n $this->db->bind(':id', $id);\r\n\r\n $row = $this->db->single();\r\n\r\n return $row;\r\n }",
"public function getMediaItem($id);",
"public function byId($id)\n\t{\n\t\treturn $this->find('id', $id)->first();\n\t}",
"public function get_item_by_item_id($itemID) {\n return $this->query(\"SELECT * FROM items WHERE item_id = '\" . $itemID . \"'\");\n }",
"public function show($id)\n {\n return $this->commandBus->execute(new \\Sailr\\Item\\GetSingleItemCommand($id));\n }",
"public function retrieve(int $id);",
"public function get($id) {\r\n\treturn $this->getRepository()->find($id);\r\n }",
"public function getById($id)\n {\n return self::where('id', (int) $id)->first();\n }",
"public function retrieveById($id);",
"function getItemById($itemID) {\n global $dbh;\n $stmt = $dbh->prepare(\"SELECT * FROM ITEM WHERE itemID = ?\");\n $stmt->execute(array($itemID));\n return $stmt->fetch();\n }",
"public function get( $iId );",
"abstract public function retrieve($id);",
"function get(string $id);",
"public function getById() {}",
"public function getId($item);",
"public function getItemById($id)\n {\n $dataProvider = new CActiveDataProvider('ARTICULOS', array(\n 'criteria' => array(\n 'condition' => 'id='.$id,\n ),\n ));\n $return = $dataProvider->getData();\n return $return[0];\n }",
"public function GetById($id);",
"public function GetById($id);",
"public function show($id)\n {\n $item = Item::find($id);\n $item->user_name = $item->user->name;\n $item->user_phone = $item->user->phone;\n $item->user_address = $item->user->address;\n $item->user_email = $item->user->email;\n $item->currentBid = $item->currentBid() ? $item->currentBid()->amount : 0;\n return $item;\n }",
"public function get($itemId)\n {\n return $this->getContent()->get($itemId);\n }"
] | [
"0.8447974",
"0.8445204",
"0.8359441",
"0.82213354",
"0.8212603",
"0.81223804",
"0.80825126",
"0.80374664",
"0.7828867",
"0.7577514",
"0.7553535",
"0.75347316",
"0.74788094",
"0.7472165",
"0.7471226",
"0.7467295",
"0.74409056",
"0.7429152",
"0.7429152",
"0.74074715",
"0.73905",
"0.7385188",
"0.7349185",
"0.7345479",
"0.73405397",
"0.7323877",
"0.7319593",
"0.7308403",
"0.7306551",
"0.7304497",
"0.7304497",
"0.7304497",
"0.7304497",
"0.7304497",
"0.7304497",
"0.7304497",
"0.7304497",
"0.7304497",
"0.7304497",
"0.7304497",
"0.7304497",
"0.7304497",
"0.7304497",
"0.7304497",
"0.73044306",
"0.7294896",
"0.72855014",
"0.7271211",
"0.7271211",
"0.7271211",
"0.7271211",
"0.7271211",
"0.7271211",
"0.7271211",
"0.7271211",
"0.7271211",
"0.7271211",
"0.7271211",
"0.7271211",
"0.7271211",
"0.7271211",
"0.7271211",
"0.7271211",
"0.7271211",
"0.7271211",
"0.7271211",
"0.7271211",
"0.72641695",
"0.7263214",
"0.7259911",
"0.725321",
"0.72341204",
"0.72341204",
"0.7217854",
"0.72070134",
"0.71913636",
"0.71913636",
"0.71913636",
"0.7183786",
"0.7179562",
"0.71747226",
"0.71557283",
"0.71363616",
"0.71317106",
"0.7127511",
"0.71248055",
"0.7122106",
"0.71191245",
"0.7116224",
"0.71145123",
"0.71131223",
"0.710738",
"0.7101285",
"0.70723546",
"0.70406413",
"0.70378304",
"0.7034912",
"0.70250285",
"0.70250285",
"0.70136356",
"0.70047474"
] | 0.0 | -1 |
Creates a new item | public function create($props): Item
{
return Item::create($this->app, $this->path, $props);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function createNewItem();",
"public function createItem($data);",
"public function create()\n {\n // Not needed cause this is coming from the item listing\n }",
"public function createItem (Item $item) {\n $this->itemsDB->create($item);\n $item->setId($this->retrieveLastItemId());\n }",
"public function createNewItem()\n {\n return null;\n }",
"public function createItem( $preparedItem ) {\n\t}",
"protected function createItem()\n {\n return $this->_setUpNewNode(\n new Item()\n );\n }",
"abstract public function add_item();",
"public function createItem($item) {\n\t\treturn tdb::insert(self::$tablename,$item);\n\t}",
"function createItem($item) {\n\t\tglobal $dbh;\n\t\t$stmt = $dbh->prepare('INSERT INTO ITEM VALUES (NULL, ?, ?, ?, ?)');\n\t\t$success = $stmt->execute(array($item['content'],\n\t\t\t\t\t\t\t\t\t\t$item['image'],\n\t\t\t\t\t\t\t\t\t\t$item['checked'],\n\t\t\t\t\t\t\t\t\t\t$item['listID']));\n\t\treturn $success;\n\t}",
"public function actionCreateItem()\r\n {\r\n $catalogItem = new CatalogItem(['scenario' => 'create']);\r\n\r\n if($catalogItem->load(Yii::$app->request->post()) && $catalogItem->save())\r\n {\r\n $this->redirect(['/admin/catalog/index', 'id' => $catalogItem->id]);\r\n }\r\n\r\n $catalog = new Catalog();\r\n\r\n return $this->render(\r\n 'create',\r\n [\r\n 'catalog' => $catalog,\r\n 'catalogItem' => $catalogItem,\r\n ]\r\n );\r\n }",
"public function create()\n {\n $form = [\n \"name\" => [\n \"label\" => \"Name\",\n \"type\" => \"text\",\n \"value\" => old(\"name\"),\n \"required\" => true\n\n ],\n \"slug\" => [\n \"label\" => \"Code\",\n \"type\" => \"text\",\n \"value\" => old(\"slug\"),\n \"required\" => true\n ],\n \n \"icon\" => [\n \"label\" => \"Icon\",\n \"type\" => \"file\",\n \"attr\" => [\n \"accept\" => \"image/*\"\n ]\n ],\n \"status\" => [\n \"label\" => \"Status\",\n \"type\" => \"radio\",\n \"value\" => old(\"status\"),\n \"options\" => [[\"id\" => 1 ,\"name\" => \"Active\"],[\"id\" => 0 ,\"name\" => \"Deactive\"]],\n \"options_value\" => \"id\",\n \"options_label\" => \"name\",\n \"required\" => true,\n \"value\" => 1\n ]\n ];\n $this->_DATA[\"_ROUTE\"] = route($this->_ROUTE_FIX.\".\".$this->_ROUTE.\".store\");\n $this->_DATA[\"_PAGETILE\"] = $this->_DATA[\"_PAGETILE\"]; \n return $this->_CreateItem($form);\n }",
"public function action_create_item($id = NULL)\n {\n if ($id === NULL)\n {\n $id = $this->request->param('id');\n }\n\n $this->action_edit_item(FALSE, $id);\n }",
"public function createNewItem() {\n\t\treturn new FeedItem($this->type);\n\t}",
"public function createAction()\n {\n $entity = new Item();\n $request = $this->getRequest();\n $form = $this->createForm(new ItemType(), $entity);\n $form->handleRequest ($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n\n $photo = $entity->getPhoto();\n if(!empty($photo))\n {\n $media = $this->get('striide_inventory.service.media')->save($entity->getPhoto());\n $entity->setPhoto($media->getId());\n }\n\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('StriideInventoryBundle_admin_item_show', array('id' => $entity->getId())));\n\n }\n\n return $this->render('StriideInventoryBundle:Item:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'json_types' => json_encode($this->get('striide_inventory.types')->getInventoryTypesArray()),\n 'form_theme' => 'StriideTwitterbootstrapBundle:Form:form_theme.html.twig',\n 'crumbs' => array(\n array('href' => $this->get('router')->generate('StriideInventoryBundle_homepage'),\n 'label' => $this->get('translator')->trans('Inventory')),\n array('href' => $this->get('router')->generate('StriideInventoryBundle_admin_item_new'),\n 'label' => $this->get('translator')->trans('Create new Item'))\n )\n ));\n }",
"public function createNewItem()\n {\n $Item = new FeedItem($this->version);\n return $Item;\n }",
"abstract protected function createItem(string $name): Item;",
"abstract public function createItem($name, $type, $description = '', $bizRule = null, $data = null);",
"function newItem() {\n\t\tglobal $HTML;\n\t\tglobal $page;\n\t\t$HTML->details(1);\n\n\t\tif($this->validator->validateList(\"itemtype_id\")) {\n\n\t\t\t$this->setItemtype($this->vars[\"itemtype_id\"]);\n\t\t\treturn $this->getTypeObject()->newItem();\n\t\t}\n\t\t// only one itemtype? skip selection\n\t\telse if(count($this->itemtypes[\"id\"]) == 1) {\n\n\t\t\t$this->setItemtype($this->itemtypes[\"id\"][0]);\n\t\t\treturn $this->getTypeObject()->newItem();\n\t\t}\n\t\telse {\n\t\t\t$default_value = array(\"0\", $this->translate(\"Select\"));\n\t\t\t$_ = '';\n\t\t\t$_ .= $this->head($this->translate(\"Choose Itemtype for new item\"));\n\t\t\t$_ .= $this->p($this->translate(\"Select an itemtype and click create!\"), \"info\");\n\t\t\t$_ .= $HTML->select($this->varnames[\"itemtype_id\"], \"itemtype_id\", $this->itemtypes, $this->vars[\"itemtype_id\"], $default_value);\n\t\t\t$_ .= HTML::smartButton($this->translate(\"Create\"), \"new\", \"new\", \"fright key:s\");\n\n\t\t\treturn $_;\n\t\t}\n\t\t\n\t}",
"public function add($item);",
"public function add($item);",
"public function actionCreate()\n {\n $model = new Item();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function create_item( \\WP_REST_Request $request ) {\n\t\treturn $this->not_yet_response();\n\t}",
"function add($item);",
"function setupNewItem()\n {\n $item = array(\n 'id' => null,\n 'pending_id' => null,\n 'content_id' => null,\n 'created' => date( 'Y-m-d H:i:s'),\n 'createdBy' => $_SESSION['isLoggedUID'],\n 'updated' => null,\n 'updatedBy' => null,\n 'status' => 'create',\n 'topic' => null,\n 'subtopic' => null,\n 'heading' => null,\n 'date' => date( 'Y-m-d H:i:s'),\n 'caption' => null,\n 'text' => null,\n 'download_src' => null,\n 'download_name' => null,\n 'images' => array(),\n 'tags' => array(),\n 'terms' => array());\n $_SESSION['cropId'] = null;\n\n return($item);\n }",
"public function createNewItem()\n {\n return new Phone(\n new TouchKeyboardB(),\n new TouchDisplayB(),\n 'Slyva',\n 'S2'\n );\n }",
"public function actionCreate()\n {\n $model = new AuthItem(null);\n $model->type = $this->type;\n if ($model->load(Yii::$app->getRequest()->post(),'') && $model->save()) {\n return $this->success();\n } else {\n return $this->fail($model->getErrors(),Yii::t('rbac-admin', 'Name'));\n }\n }",
"public function create()\n\t{\n\t\treturn view('item.create');\n\t}",
"public function testCreatesAValidItem()\n {\n $item = $this->createItem();\n $this->assertInstanceOf('App\\Domain\\Entity\\Item', $item);\n }",
"public function create(array $data): ChainableItemInterface;",
"public function create()\n {\n\t\treturn view('item.create');\n }",
"public function addItem(Collection $collection, ItemCreateStruct $itemCreateStruct): Item;",
"public function createNewItem()\n {\n return new Phone(\n new TouchKeyboardA(),\n new TouchDisplayA(),\n 'Abrykos',\n 'A2'\n );\n }",
"public function create()\n {\n return view('items::create_item');\n }",
"public function create()\n {\n //\n return view('backend.item.new');\n }",
"private function makeNewItem( $file )\r\n {\r\n $item = new Item();\r\n $item->setKey ( $file['key'] );\r\n $item->setReal ( $file['real'] );\r\n $item->setUri ( $file['uri'] );\r\n $item->setName ( $file['name'] );\r\n $item->setExtension ( $file['extension'] );\r\n $item->setType ( $file['type'] );\r\n $item->setSize ( $file['size'] );\r\n $item->setMtime ( $file['mtime'] );\r\n $item->resetSearchKeys( UrlManager::baseIndexPath() );\r\n return $item;\r\n }",
"public function actionCreate()\n {\n $userData = $this->request->post();\n\n $user = $this->userService->save($userData);\n\n return $this->responseItem(new Item($user, $this->userTransformer));\n }",
"public function created(Item $item)\n {\n //\n }",
"public function createAction()\n {\n\n if (!$this->request->isPost()) {\n return $this->dispatcher->forward(array(\n \"action\" => \"index\"\n ));\n }\n\n $itemsType = new ItemsType();\n\n $itemsType->code = $this->request->getPost(\"code\");\n $itemsType->name = $this->request->getPost(\"name\");\n \n\n if (!$itemsType->save()) {\n foreach ($itemsType->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n return $this->dispatcher->forward(array(\n \"action\" => \"new\"\n ));\n }\n\n $this->flash->success(\"Items Type was created successfully\");\n\n return $this->dispatcher->forward(array(\n \"action\" => \"index\"\n ));\n\n }",
"public function create()\n {\n return view('items.createitem');\n }",
"public function testItemWithoutIdShouldBeConsideredNew()\n {\n $item = $this->createItem();\n $this->assertTrue($item->isNew());\n }",
"public function add($item, $id = null);",
"public function add_item()\n {\n $request = new Types\\AddItemRequestType();\n\n // An user token is required when using the Trading service.\n $request->RequesterCredentials = new Types\\CustomSecurityHeaderType();\n $request->RequesterCredentials->eBayAuthToken = $this->config->item('authToken');\n\n\n // Begin creating the auction item.\n $item = new Types\\ItemType();\n\n $item->DispatchTimeMax = 3;\n /**\n * We want a single quantity auction.\n * Otherwise known as a Chinese auction.\n */\n $item->ListingType = Enums\\ListingTypeCodeType::C_CHINESE;\n $item->Quantity = 1;\n\n $item->ProductListingDetails = new Types\\ProductListingDetailsType();\n $item->ProductListingDetails->ISBN = $ISBN;\n $item->ProductListingDetails->UPC = $UPC;\n $item->ProductListingDetails->EAN = $EAN;\n\n $item->ProductListingDetails->BrandMPN = new DTS\\eBaySDK\\Trading\\Types\\BrandMPNType();\n $item->ProductListingDetails->BrandMPN->Brand = '';\n $item->ProductListingDetails->BrandMPN->MPN = '';\n\n $item->ListingDuration = Enums\\ListingDurationCodeType::C_DAYS_7;\n\n }",
"public function insert()\n {\n $this->_checkItem();\n $service = $this->getService();\n $entry = $service->newItemEntry();\n $this->setEntry($entry);\n $this->_prepareEnrtyForSave();\n $this->getEntry()->setItemType($this->_getItemType());\n $entry = $service->insertGbaseItem($this->getEntry());\n $this->setEntry($entry);\n $entryId = $this->getEntry()->getId();\n $published = $this->gBaseDate2DateTime($this->getEntry()->getPublished()->getText());\n $this->getItem()\n ->setGbaseItemId($entryId)\n ->setPublished($published);\n\n if ($expires = $this->_getAttributeValue('expiration_date')) {\n $expires = $this->gBaseDate2DateTime($expires);\n $this->getItem()->setExpires($expires);\n }\n }",
"public function store(CreateItemRequest $request)\n {\n // --\n // Check role/permission\n if (!AdminHelper::can_action(115, 'created')) {\n return response()->json(\"Access denied\", 403);\n }\n\n if ($this->itemRepo->create($request)) {\n return response()->json('success');\n } else {\n return response()->json('error', 401);\n }\n }",
"public function getNewItem():Item {\r\n\t\t$item = new Item($this);\r\n\t\t$this->items[] = $item;\r\n\t\treturn $item;\r\n\t}",
"public function create()\n {\n return view('items.create', ['item' => new Item]);\n }",
"protected function create_item( $name ) {\n\t\t// Check whether the item name is still available\n\t\tif ( ThumbsUp_Database::item_name_exists( $name ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Initialize the item fields\n\t\t$this->item = array(\n\t\t\t'name' => (string) $name,\n\t\t\t'closed' => 0,\n\t\t\t'date' => time(),\n\t\t);\n\n\t\t// Insert the item into the database\n\t\t/*sqlite_escape_string repalce with mysqli_escape_string PHP7 Compatibility*/\n\t\tThumbsUp_Database::db()->queryExec(\"\n\t\t\tINSERT INTO items (id, name, closed, date)\n\t\t\tVALUES (NULL, '\" . mysqli_escape_string( $this->item['name'] ) . \"', {$this->item['closed']}, {$this->item['date']})\");\n\n\t\t// Load the item id\n\t\t$this->item['id'] = ThumbsUp_Database::db()->lastInsertRowid();\n\n\t\t// All done successfully\n\t\treturn true;\n\t}",
"public function createItem($data) {\n // the queue table yet, so we cannot rely on drupal_write_record().\n $query = db_insert('queue')\n ->fields(array(\n 'name' => $this->name,\n 'data' => serialize($data),\n // We cannot rely on REQUEST_TIME because many items might be created\n // by a single request which takes longer than 1 second.\n 'created' => time(),\n ));\n return (bool) $query->execute();\n }",
"public function create()\n\t{\n\t\t$brand = null;\n\t\t$model = null;\n\t\t$itemtype = null;\n\n\t\tif(Input::has('brand'))\n\t\t{\n\t\t\t$brand = $this->sanitizeString(Input::get('brand'));\n\t\t}\n\t\t\n\t\tif(Input::has('model'))\n\t\t{\n\t\t\t$model = $this->sanitizeString(Input::get('model'));\n\t\t}\n\t\t\n\t\tif(Input::has('itemtype'))\n\t\t{\n\t\t\t$itemtype = $this->sanitizeString(Input::get('itemtype'));\n\t\t\t$itemtype = ItemType::type($itemtype)->pluck('id')->first();\n\t\t}\n\n\t\treturn view('inventory.item.create')\n\t\t\t\t\t->with('brand',$brand)\n\t\t\t\t\t->with('model',$model)\n\t\t\t\t\t->with('itemtype',$itemtype);\n\t}",
"function backup_migrate_crud_create_item($type, $params) {\n if ($type = backup_migrate_crud_type_load($type)) {\n return $type->create($params);\n }\n}",
"public function CreateItem($request)\n {\n return $this->makeRequest(__FUNCTION__, $request);\n }",
"public function add()\n {\n $item = new stdClass();\n $item->item_id = null;\n $item->barcode = null;\n $item->price = null;\n $item->stock = null;\n $item->name = null;\n $item->category_id = null;\n $query_category = $this->categorys_m->get();\n $query_unit = $this->units_m->get();\n $unit[null] = '-Pilih-';\n foreach ($query_unit->result() as $u) {\n\n $unit[$u->unit_id] = $u->name;\n };\n $data = [\n 'page' => 'add',\n 'row' => $item,\n 'category' => $query_category,\n 'unit' => $unit,\n 'selectedunit' => null\n ];\n $this->template->load('template', 'product/item/item_add', $data);\n }",
"public function create()\n {\n // Create new item\n $listBtn = ['title'=>'All Items', 'action' => 'items', 'icon' => 'icon md-format-list-bulleted'];\n $buttons =[];\n array_push($buttons, $listBtn);\n return view('backend.items.create', compact('buttons'));\n }",
"public function create()\n {\n /* display create form */\n return view('item.item');\n }",
"public function create()\n {\n # code...\n return view('item/create');\n }",
"public function testRequestCreateItem()\n {\n\t\t$response = $this\n\t\t\t\t\t->json('POST', '/api/items', [\n\t\t\t\t\t\t'name' => 'Produkt dodany przez test PHPUnit', \n\t\t\t\t\t\t'amount' => 0\n\t\t\t\t\t]);\n\n $response->assertStatus(200);\n }",
"public function itemCreate(Event $event)\n {\n $request = $event->getParam('request');\n $operation = $request->getOperation();\n $em = $this->getServiceLocator()->get('Omeka\\EntityManager');\n\n\n if ($operation == 'create'){\n\n $response = $event->getParam('response');\n\n $resource = $response->getContent();\n $media = $resource->getMedia();\n\n if (array_key_exists('team', $request->getContent())){\n $teams = $request->getContent()['team'];\n\n //add items to team\n foreach ($teams as $team_id):\n $team = $em->getRepository('Teams\\Entity\\Team')->findOneBy(['id'=>$team_id]);\n $tr = new TeamResource($team, $resource);\n $em->persist($tr);\n\n //if there is media, add those to the team as well\n if (count($media) > 0) {\n foreach ($media as $m):\n $tr = new TeamResource($team, $m);\n $em->persist($tr);\n endforeach;}\n\n endforeach;\n $em->flush();\n }\n }\n }",
"public function create()\n {\n return view('backend.items.create');\n }",
"public function create()\n {\n return view('item.create');\n }",
"function method_createitem($request)\n{\n $log = Loggermanager::getLogger('swim.createitem');\n $user = Session::getUser();\n \n checkSecurity($request, true, true);\n \n RequestCache::setNoCache();\n \n if (($user->isLoggedIn())&&($user->hasPermission('documents',PERMISSION_WRITE)))\n {\n if ($request->hasQueryVar('targetvariant') && $request->hasQueryVar('targetsection')\n && $request->hasQueryVar('class'))\n {\n $class = FieldSetManager::getClass($request->getQueryVar('class'));\n $section = FieldSetManager::getSection($request->getQueryVar('targetsection'));\n if (($section !== null) && ($class !== null))\n {\n $item = Item::createItem($section, $class);\n if ($item !== null)\n {\n $variant = $item->createVariant($request->getQueryVar('targetvariant'));\n if ($variant !== null)\n {\n $version = $variant->createNewVersion();\n if ($version !== null)\n {\n if ($request->hasQueryVar('parentitem') && $request->hasQueryVar('parentsequence'))\n {\n $parent = Item::getItem($request->getQueryVar('parentitem'));\n $sequence = $parent->getSequence($request->getQueryVar('parentsequence'));\n if ($sequence !== null)\n $sequence->appendItem($item);\n }\n $req = new Request();\n $req->setMethod('admin');\n $req->setPath('items/edit.tpl');\n $req->setQueryVar('item', $item->getId());\n $req->setQueryVar('version', $version->getVersion());\n redirect($req);\n }\n else\n {\n $log->warn('Unable to create version');\n displayServerError($request);\n }\n }\n else\n {\n $log->warn('Unable to create variant');\n displayServerError($request);\n }\n }\n else\n {\n $log->warn('Unable to create item');\n displayServerError($request);\n }\n }\n else\n {\n $log->warn('Section does not exist.');\n displayNotFound($request);\n }\n }\n else\n {\n $log->error('Invalid paramaters specified.');\n displayServerError($request);\n }\n }\n else\n {\n displayAdminLogin($request);\n }\n}",
"public function create()\n {\n return View('Item.create');\n }",
"public function newAction()\n {\n $entity = new Item();\n $form = $this->createForm(new ItemType(), $entity);\n\n return $this->render('StriideInventoryBundle:Item:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'json_types' => json_encode($this->get('striide_inventory.types')->getInventoryTypesArray()),\n 'form_theme' => 'StriideTwitterbootstrapBundle:Form:form_theme.html.twig',\n 'crumbs' => array(\n array('href' => $this->get('router')->generate('StriideInventoryBundle_homepage'),\n 'label' => $this->get('translator')->trans('Inventory')),\n array('href' => $this->get('router')->generate('StriideInventoryBundle_admin_item_new'),\n 'label' => $this->get('translator')->trans('Create new Item'))\n )\n ));\n }",
"public function insert($item): void;",
"public function create() //添加\n {\n\t\t//\n }",
"public function add($item) {\n $this->items[$item->id()] = $item;\n }",
"public function store(ItemFormRequest $request)\n {\n $item = Item::create($request->all());\n flash('New item has been added!', 'success');\n return redirect('items');\n }",
"public function actionAdd_new($item = 'product')\n {\n if (Yii::app()->params->testenv === '') { // This condition need to bypass security in test mode\n $this->initAction($item);\n }\n \n $Model = ucfirst($item); // $Model @var string is name for initialise of current Model\n $this->_model = new $Model();\n $formName = 'new_item';\n \n $this->performAjaxValidation($this->_model, $formName);\n \n if (isset($_POST[$Model])) {\n $this->_model->name = $_POST[$Model]['name'];\n \n if (Yii::app()->params->testenv !== '') { // This condition forcibly sets \"1\" the value of model's\n $this->_model->manager_id = 1; // attribute \"manager_id\" when app run in test mode\n } else {\n $this->_model->manager_id = (int)Yii::app()->user->id;\n }\n\n if ($this->_model->validate()) {\n $this->_model->save();\n\n $this->redirect(Yii::app()->params->testenv // in test mode redirect link should be preceded by \"/index-test.php\"\n . '/service/admin/review/item/'\n . $item);\n }\n } \n $this->render('new_item', array('newItem' => $this->_model,\n 'item' => $item,\n 'formName' => $formName,));\n }",
"public function addAction() {\t\t\n\t\t$arUser = $this->authenticate();\n\t\tif( !$this->_request->isPost()) {\n\t\t\t$this->view->channel_id = $this->_getParam('channel_id');\n\t\t\t$this->view->formAction = $this->getRequest()->getBaseUrl().'/item/add';\n\t\t} else {\n\t\t\t$channelID = (int)$this->_getParam('channel_id');\n\t\t\t$item = new Items();\t\t\t\n\t\t\t$item->addItem($channelID, $this->_getParam('title'), $arUser['id']);\n\t\t\t$this->_helper->redirector->goto('add', 'item', null, array('channel_id'=>$channelID));\n\t\t}\t\t\n\t}",
"public function create()\n {\n return view('item.create');\n }",
"public function create()\n {\n return view('grn_items.create');\n }",
"protected function handle_post_item_create($Item, $args = array())\n {\n return $Item;\n }",
"function create() {\r\n\t\tglobal $ufoSession;\r\n\t\tglobal $ufoDb;\r\n\t\t$link = $ufoDb->getLink();\r\n\t\t$this->uid = $ufoSession->userId();\r\n\r\n\t\t// insert\r\n\t\t$query = \"INSERT INTO ufo_product (uid, name, description) VALUES ($this->uid, '$this->name', '$this->description')\";\r\n\t\t$result = pg_query($query) or die(\"Query failed : \" . pg_last_error());\r\n\t\t/* Get the auto increment Id of the last insert. */\r\n\t\t$this->oid = $ufoDb->insert_id(\"ufo_product_seq\");\r\n\t\t$this->initialized = True;\r\n\t}",
"function insert_item($metadata = array(), $elementTexts = array(), $fileMetadata = array())\n{\n $builder = new Builder_Item(get_db());\n $builder->setRecordMetadata($metadata);\n $builder->setElementTexts($elementTexts);\n $builder->setFileMetadata($fileMetadata);\n return $builder->build();\n}",
"public function create()\n {\n return view('items.create');\n }",
"public function create()\n {\n return view('items.create');\n }",
"public function actionCreate()\n\t{\n\t\t$type = $this->getType();\n\t\t\n\t\t// Create the authorization item form\n\t\t$formModel = new AuthItemForm('create');\n\n\t\tif( isset($_POST['AuthItemForm'])===true )\n\t\t{\n\t\t\t$formModel->attributes = $_POST['AuthItemForm'];\n\t\t\tif( $formModel->validate()===true )\n\t\t\t{\n\t\t\t\t// Create the item\n\t\t\t\t$item = $this->_authorizer->createAuthItem($formModel->name, $type, $formModel->description, $formModel->bizRule, $formModel->data);\n\t\t\t\t$item = $this->_authorizer->attachAuthItemBehavior($item);\n\n\t\t\t\t// Set a flash message for creating the item\n\t\t\t\tYii::app()->user->setFlash($this->module->flashSuccessKey,\n\t\t\t\t\tRights::t('core', ':name created.', array(':name'=>$item->getNameText()))\n\t\t\t\t);\n\n\t\t\t\t// Redirect to the correct destination\n\t\t\t\t$this->redirect(Yii::app()->user->getRightsReturnUrl(array('authItem/permissions')));\n\t\t\t}\n\t\t}\n\n\t\t// Render the view\n\t\t$this->render('create', array(\n\t\t\t'formModel'=>$formModel,\n\t\t));\n\t}",
"public static function storeItem($item)\n {\n //return DB::table('employees')->insertGetId($item); //RETURN ID\n return self::create($item); //RETURN OBJECT\n }",
"public function actionCreate($tipo_item, $id_projeto)\n {\n $model = new Item();\n $model->tipo_item = $tipo_item;\n $model->id_projeto = $id_projeto;\n\n $professores = User::find()->where(['professor' => 1, 'administrador' => 0])->orderBy('nome ASC')->all();\n $professores_nomes = ArrayHelper::map($professores, 'nome', 'nome');\n\n if ($model->tipo_item == 2){\n $model->natureza = 'Capital';\n }\n else{\n $model->natureza = 'Custeio';\n }\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $this->mensagens('success', 'Item criado', 'Item criado com sucesso.');\n return $this->redirect(['index', 'id_projeto' => $model->id_projeto]);\n }\n\n return $this->render('create', [\n 'tipo_item' => $tipo_item,\n 'id_projeto' => $id_projeto,\n 'model' => $model,\n 'professores_nomes' => $professores_nomes,\n ]);\n }",
"public function store(Request $request)\n {\n $this->validate($request, [\n 'name' => 'required|unique:items',\n 'type' => 'required',\n ]);\n\n $item = new Item([\n 'name' => $request->get('name'),\n 'description'=> $request->get('description'),\n 'type'=> $request->get('type')\n ]);\n\n $item->save();\n\n // Go back to items list\n return redirect('/items')->with('success', 'Object '.$item.' has been added');\n }",
"public function ITEM($itemid) { $this->__construct($itemid); }",
"public function createNew() {\n\t}",
"public function create()\n {\n access_is_allowed('create.item');\n\n $view = view('framework::app.master.item.create');\n $inventories_account = CoaCategory::where('name', 'Inventories')->first();\n $view->list_account_asset = $inventories_account->coa;\n $view->list_item_category = ItemCategory::active()->get();\n $view->list_warehouse = Warehouse::active()->get();\n $view->list_unit = Unit::all();\n $view->converter = TempDataHelper::get('converter', app('request')->user()->id, ['is_pagination' => false]);\n $view->list_petty_cash_account = Coa::joinCategory()->where('coa_category.name', '=', 'Petty Cash')->selectOriginal()->get();\n\n return $view;\n }",
"public function createNew();",
"public function newAction()\n {\n global $config;\n\n if(empty($this->crumbs->crumbs['new']['label']))\n $this->crumbs->add('New', '/', 'New', false); \n\n $form = new ItemsTypeForm(new ItemsType(), array('new' => true));\n $this->view->setVar(\"form\", $form);\n }",
"public function createItemType($user_id)\n {\n $data = array(\n 'name' => $this->input->post('name'),\n 'description' => $this->input->post('description'),\n );\n\n return $this->db->insert('item_type', $data);\n }",
"public function store(Requests\\StoreItemRequest $request)\n {\n // $input = $request->all();\n // dd($input);\n // $item = new Item;\n // $item->name = $input['name'];\n // $item->unit = $input['unit'];\n // $item->description = $input['description'];\n // $item->save();\n \t\tItem::create($request->all());\n return redirect()->route('items.index')\n \t\t\t\t\t\t\t\t ->with('success', 'Item created successfully.');\n }",
"public function create()\n {\n return view('backend.pages.items.create');\n }",
"function addItem($data)\n\t{\n\t\t$title_url = $data['uri'] ? url_title($data['uri'], 'dash', TRUE) : url_title($data['name'], 'dash', TRUE);\n\t\t$published = $data['published'] == \"yes\" ? true : false;\n\t\t\n\t\t$qStr = \"INSERT INTO portfolio (name, description, marked_up_description, short_description, uri, live_url, image, image_small, time, published)\n\t\t\t\tVALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";\n\t\t$q = $this->db->query($qStr, array($data['name'], $data['description'], $data['marked_up_description'], $data['short_description'], \n\t\t\t\t\t\t\t\t\t\t\t$title_url, $data['live_url'], $data['image'], $data['image_small'], $data['time'], $published));\n\t\t\n\t\tif ($q)\n\t\t\treturn $this->getItem($this->db->insert_id());\n\t\telse\n\t\t\treturn array('success'=>false, 'error'=>\"There was an error adding this item\");\n\t}",
"public function store(ItemRequest $request)\n {\n Item::create($request->all());\n\n return back();\n }",
"public function createAction($menu_id)\n {\n $item = new Item();\n $request = $this->getRequest();\n $form = $this->createForm(new ItemType(), $item);\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $item->setMenu($em->getReference('SmgMenuBundle:Menu', $menu_id));\n $em->persist($item);\n $em->flush();\n\n return $this->redirect($this->generateUrl('menu'));\n \n }\n\n return $this->render('SmgMenuBundle:Item:new.html.twig', array(\n 'form' => $form->createView()\n ));\n }",
"public function addItem(){\r\n //角色或者权限名会在实例化这个model的时候load给该model\r\n $auth = \\Yii::$app->authManager;\r\n //如果添加的是角色\r\n if($this->type == self::T_ROLE){\r\n $item = $auth->createRole($this->name);\r\n $item->description = $this->description?:'创建['.$this->name.']角色';\r\n }else{\r\n $item = $auth->createPermission($this->name);\r\n $item->description = $this->description?:'创建['.$this->name.']权限';\r\n\r\n }\r\n return $auth->add($item);\r\n }",
"public function create(array $new_mealitem_data): MealItem\n {\n $meal_item = MealItem::create($new_mealitem_data);\n Cache::put(\"meal-item-$meal_item->id\",$meal_item);\n Cache::forget(\"meal-items-all\");\n\n return $meal_item;\n }",
"public function createItem(string $key): CacheItemInterface;",
"public function create()\n {\n return view(\"resturant.controladmin.items.create\");\n }",
"public function create()\n {\n return Inertia::render('Items/create');\n }",
"public function index_post()\n {\n $input = $this->input->post();\n $this->db->insert('items',$input);\n \n $this->response(['Item created successfully.'], REST_Controller::HTTP_OK);\n }",
"public function createAction() : object\n {\n $page = $this->di->get(\"page\");\n $form = new CreateForm($this->di);\n $form->check();\n\n $page->add(\"questions/crud/create\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Create a item\",\n ]);\n }",
"public function addItem($item){\n $this->items[] = $item;\n }",
"public function test_create_item() {}"
] | [
"0.896043",
"0.812573",
"0.8045087",
"0.7690441",
"0.73969585",
"0.73680484",
"0.73546934",
"0.7256986",
"0.7255335",
"0.7243418",
"0.723289",
"0.7186418",
"0.71463406",
"0.71209294",
"0.70673144",
"0.70545524",
"0.70542413",
"0.700561",
"0.6986255",
"0.696522",
"0.696522",
"0.6898759",
"0.6878423",
"0.6869224",
"0.6846424",
"0.683365",
"0.6829444",
"0.6817225",
"0.6805242",
"0.68014103",
"0.67805815",
"0.675888",
"0.67565936",
"0.6755364",
"0.6747443",
"0.6698186",
"0.669343",
"0.66931444",
"0.6691694",
"0.6690943",
"0.668149",
"0.6677468",
"0.6663625",
"0.66606915",
"0.6658804",
"0.663062",
"0.6611531",
"0.6603537",
"0.66020846",
"0.6586159",
"0.65836316",
"0.6581132",
"0.6574906",
"0.6572759",
"0.65682447",
"0.65591913",
"0.6555298",
"0.65510684",
"0.65279454",
"0.6527835",
"0.6485418",
"0.6479162",
"0.64597017",
"0.64524955",
"0.6445084",
"0.64329535",
"0.64185387",
"0.64090586",
"0.6407097",
"0.6404761",
"0.6383935",
"0.63601214",
"0.63552505",
"0.6348158",
"0.6341427",
"0.6341427",
"0.6336676",
"0.63366354",
"0.6315822",
"0.6314195",
"0.6313263",
"0.6307809",
"0.63063693",
"0.6301924",
"0.6299975",
"0.62857026",
"0.6283752",
"0.627681",
"0.6272519",
"0.6271044",
"0.62664455",
"0.6261116",
"0.6258729",
"0.6248401",
"0.62445855",
"0.6244065",
"0.6243656",
"0.6234764",
"0.6231243",
"0.62310934"
] | 0.6596427 | 49 |
Verifies the integrity of the items and files and cleans up expired items | public function cleanUp(): string
{
$warnings = '';
$files = [];
// verify validity of the items
foreach ($this->collection() as $itemName => $item) {
if ($item->isExpired()) {
// delete expired item and its file
$item->delete();
} else {
// item is not expired, verify if its file is still there
$file = $this->app->filePath($item->filename());
if (is_file($file)) {
// note the file path down for later
$files[] = $file;
} else {
$warnings .= sprintf(
'File "%s" for item "%s" does not exist' . "\n",
$file,
$itemName
);
}
}
}
// find orphaned files
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->app->filePath()));
foreach ($iterator as $file) {
// skip dotfiles like .gitignore
if (substr($file->getFilename(), 0, 1) === '.') {
continue;
}
// check if we encountered the file in any item before
if (!in_array($file->getPathname(), $files)) {
$warnings .= sprintf('File "%s" is orphaned' . "\n", $file->getPathname());
}
}
return $warnings;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function deleteExpiredFiles(){\r\n $dir = $this->emailVerify->getDataFolder().self::FOLDER_PATH;\r\n foreach (glob($dir.\"*.token\") as $file) {\r\n $uF = unserialize(gzdecode(file_get_contents($file)));\r\n $tee = new TokenExpireEvent($this->emailVerify, $uF[\"token\"]);\r\n $this->emailVerify->getServer()->getPluginManager()->callEvent($tee);\r\n if (!$uF[\"valid\"] and filemtime($file) < time() - 60*60*24*7) {\r\n unlink($file);\r\n }\r\n }\r\n }",
"public function purgeAll() {\n\t\tset_time_limit(300);\n\t\t$this->load->model(\"filehandlerbase\");\n\t\t$fileList = $this->filehandlerbase->findDeletedItems();\n\t\t$mfa = $this->input->post(\"mfa\");\n\t\t$serial = $this->input->post(\"arn\");\n\n\t\t/**\n\t\t * we need to cache this because MFA is only good once\n\t\t */\n\t\t$lastUsedToken = null;\n\t\tforeach($fileList as $fileEntry) {\n\t\t\t$fileHandler = $this->filehandler_router->getHandlerForObject($fileEntry->getFileObjectId());\n\t\t\tif(!$fileHandler) { \n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif(!$fileHandler->loadFromObject($fileEntry)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($lastUsedToken)) {\n\t\t\t\t$fileHandler->s3model->sessionToken = $lastUsedToken;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif(!$fileHandler->deleteSource($serial,$mfa)) {\n\t\t\t\t\t$this->logging->logError(\"purgeAll\",\"Could not delete asset with key\" . $fileEntry->getFileObjectId());\n\t\t\t\t}\n\t\t\t\t$lastUsedToken = $fileHandler->s3model->sessionToken;\n\t\t\t}\n\t\t\tcatch (Exception $e) {\n\t\t\t\techo $e;\n\t\t\t\techo \"Deletion fail\";\n\t\t\t}\n\n\t\t}\n\n\t\tinstance_redirect(\"/admin\");\n\t}",
"public function test_purge() {\n\t\t$purgedFilesInt = Cdnmd5::purge('-1 day');\n\t\t// ensure THIS file exists as a valid hash\n\t\t$this->assertEqual($this->testfile_js_hash, Cdnmd5::makeHash($this->testfile_js));\n\t\t$purgedFilesInt = Cdnmd5::purge('-1 day');\n\t\t$this->assertEqual(0, $purgedFilesInt);\n\t\t// remove THIS file as a valid hash\n\t\t@unlink(Cdnmd5::getConfigFile($this->testfile_js));\n\t\t$purgedFilesInt = Cdnmd5::purge('+1 day');\n\t\t// NOTE: this may not work, if this file was modified and uploaded in\n\t\t// less than 1 sec... (hash/modified timstampes will differ)\n\t\t// also there are a few hours timezone discrepancies...\n\t\t#$this->assertEqual(1, $purgedFilesInt);\n\t\t$this->assertTrue($purgedFilesInt > 0 && $purgedFilesInt < 10);\n\t\t// TODO: idea for better test, upload some \"trash\" files and ensure those are purged\n\t}",
"private function clean() {\n foreach (glob($this->dir . '/*') as $file) {\n $name = basename($file);\n if (!preg_match('/^\\d{10}/', $name))\n throw new \\Exception('Unexpected filename. Make sure \"' . $this->dir . '\" contains only build artefacts (and is thus safe to clean) and try again.');\n $deleted = unlink($file);\n if (!$deleted)\n throw new \\Exception('Failed to delete \"' . $file . '\". Make sure target directory is writable to allow delete of other users files.');\n }\n }",
"public function purgeInvalidatedArchives()\n { $store = new InvalidatedReports();\n $idSitesByYearMonth = $store->getSitesByYearMonthArchiveToPurge();\n foreach ($idSitesByYearMonth as $yearMonth => $idSites) {\n if(empty($idSites)) {\n continue;\n }\n\n $date = Date::factory(str_replace('_', '-', $yearMonth) . '-01');\n $numericTable = ArchiveTableCreator::getNumericTable($date);\n\n $archiveIds = $this->model->getInvalidatedArchiveIdsSafeToDelete($numericTable, $idSites);\n\n if (count($archiveIds) == 0) {\n continue;\n }\n $this->deleteArchiveIds($date, $archiveIds);\n\n $store->markSiteIdsHaveBeenPurged($idSites, $yearMonth);\n }\n }",
"public function deleteExpiredCache() {\n $this->logger->debug('Deleting of expired cache files');\n $list = glob($this->cacheFilePath . '*.cache');\n if (!$list) {\n $this->logger->info('No cache files were found skipping');\n return;\n }\n $this->logger->info('Found [' . count($list) . '] cache files to remove if expired');\n foreach ($list as $file) {\n $this->logger->debug('Processing the cache file [' . $file . ']');\n $data = $this->getCacheFileContent($file);\n if ($data === false) {\n $this->logger->warning('Can not get cache data for file [' . $file . ']');\n } else if (time() > $data['expire']) {\n $this->logger->info('The cache data for file [' . $file . '] already expired remove it');\n unlink($file);\n } else {\n $this->logger->info('The cache data for file [' . $file . '] not yet expired skip it');\n }\n }\n }",
"function flush(){\n $path = $this->cachePath .'/'. $this->prefix .'*';\n $files = glob($path);\n $rm_total = 0;\n if (is_array($files) && !empty($files)){\n foreach($files as $file){\n $fp = fopen($file, \"r\");\n $meta = $this->_readMeta($fp);\n if ($meta['expired']!=0 && $meta['expired']<time()){\n fclose($fp);\n unlink($file);\n ++$rm_total;\n }\n }\n }\n return $rm_total;\n }",
"public function cleanFiles()\n { \n $this->zip();\n // $this->unzip();\n\n if (!empty($this->files)) {\n foreach ($files as $file) {\n $this->clean($file);\n }\n }\n }",
"public function deleteExpiredLogs()\n {\n $client = $this->createLocalStorageDriver();\n\n $allFiles = $client->files();\n\n foreach ($allFiles as $file) {\n $fileDate = new DateTime(str_replace('.json', '', $file));\n\n $currentDate = new DateTime(date('d-m-Y'));\n\n $interval = $fileDate->diff($currentDate);\n\n if ($interval->days > $this->expireDays) {\n $client->delete($file);\n }\n }\n }",
"public function testExpireTrashByRetentionAndSpace() {\n\t\t// create some files\n\t\t\\OC\\Files\\Filesystem::file_put_contents('file1.txt', 'file1');\n\t\t\\OC\\Files\\Filesystem::file_put_contents('file2.txt', 'file2');\n\t\t\\OC\\Files\\Filesystem::file_put_contents('file3.txt', 'file3');\n\n\t\t// delete them so that they end up in the trash bin\n\t\t\\OC\\Files\\Filesystem::unlink('file1.txt');\n\t\t\\OC\\Files\\Filesystem::unlink('file2.txt');\n\t\t\\OC\\Files\\Filesystem::unlink('file3.txt');\n\n\t\t//make sure that files are in the trash bin\n\t\t$filesInTrash = Helper::getTrashFiles('/', self::TEST_TRASHBIN_USER1, 'mtime', false);\n\t\t$this->assertCount(3, $filesInTrash);\n\n\t\t// simulate as 1 out of 3 files expired\n\t\t$this->expiration->expects($this->exactly(3))\n\t\t\t->method('isExpired')\n\t\t\t->willReturnOnConsecutiveCalls(\n\t\t\t\ttrue,\n\t\t\t\tfalse,\n\t\t\t\t// in this case we are over quota, so true will be returned\n\t\t\t\t// even though file expiration date is ok\n\t\t\t\ttrue\n\t\t\t);\n\n\t\t// simulate as only 2 files need to be cleaned to satisfy quota\n\t\t$this->quota->expects($this->exactly(1))\n\t\t\t->method('calculateFreeSpace')\n\t\t\t->willReturn(-8);\n\n\t\t// call expire by retention\n\t\t$this->trashExpiryManager->expireTrash(self::TEST_TRASHBIN_USER1);\n\n\t\t$remainingFiles = Helper::getTrashFiles('/', self::TEST_TRASHBIN_USER1, 'mtime', false);\n\t\t$this->assertCount(1, $remainingFiles);\n\n\t\t$this->assertEquals(\n\t\t\t\\array_slice($filesInTrash, 2),\n\t\t\t$remainingFiles\n\t\t);\n\t}",
"private function checkFileUpdates() {\n\n if ($this->request->params['controller'] != 'acos' || ($this->request->params['action'] != 'admin_synchronize' && $this->request->params['action'] != 'admin_prune_acos' && $this->request->params['action'] != 'admin_build_acl')) {\n if ($this->AclManager->isControllerHashFileOutOfSync()) {\n $missingAcoNodes = $this->AclManager->getMissingAcos();\n $nodesToPrune = $this->AclManager->getAcosToPrune();\n\n $hasUpdates = false;\n\n if (count($missingAcoNodes) > 0) {\n $hasUpdates = true;\n }\n\n if (count($nodesToPrune) > 0) {\n $hasUpdates = true;\n }\n\n $this->set('nodesToPrune', $nodesToPrune);\n $this->set('missingAcoNodes', $missingAcoNodes);\n\n if ($hasUpdates) {\n $this->render('Acl.Acos/admin_has_updates');\n $this->response->send();\n $this->AclManager->updateControllerHashFile();\n exit();\n } else {\n $this->AclManager->updateControllerHashFile();\n }\n \t\t\n \t\t$this->AclManager->update_controllers_hash_file();\n }\n }\n }",
"public function clean_expired_keys()\n {\n }",
"public function cleanContrexxCaching()\n {\n $this->_deleteAllFiles();\n }",
"public function actionClean() {\n $deletedArr=[];\n $errorArr=[];\n foreach(Finder::find('*')->in(CACHE_DIRECTORY) as $file=>$info){\n try{\n FileSystem::delete($file);\n $deletedArr[]=$file;\n }catch (\\Exception $e){\n $errorArr[]=$file;\n }\n }\n $response=[\n 'state'=>(empty($errorArr)?'OK':'error'),\n 'deleted'=>$deletedArr,\n 'errors'=>$errorArr\n ];\n $this->sendJson($response);\n }",
"protected function tidyUpFiles() {\n\t\t/* load valid ids */\n\t\t$validIds = array();\n\t\t$result = $this->db->query('SELECT id FROM image');\n\t\tif ($result) {\n\t\t\twhile ($entry = $result->fetchArray(SQLITE3_NUM)) {\n\t\t\t\t$validIds[] = $entry[0];\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* remove entries with missing file */\n\t\tforeach ($validIds as $id) {\n\t\t\tif (!is_file(self::getPath($id))) {\n\t\t\t\t$this->delete($id);\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* delete from list what is not in the database */\n\t\tif ($dh = opendir(self::FILES_DIR)) {\n\t\t\twhile (($id = readdir($dh)) !== false) {\n\t\t\t\tif (preg_match('#^[0-9a-zA-Z]+$#', $id) && !in_array($id, $validIds) && $id != self::DATABASE_FILE) {\n\t\t\t\t\t$this->delete($id);\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($dh);\n\t\t}\n\t}",
"public static function invalidate() {\n if (is_dir(self::$fileBased))\n {\n $dir = opendir(self::$fileBased);\n while ($file = readdir($dir)) {\n @unlink(YPFramework::getFileName(self::$fileBased, $file));\n }\n }\n }",
"public function cleanup() {\n $dirIt = new DirectoryIterator($this->path);\n // Convert days to seconds\n $lifetimeSeconds = self::$lifetime * 3600 * 24;\n /** @var DirectoryIterator $fileInfo */\n foreach ($dirIt as $fileInfo) {\n if ($fileInfo->isDot()) {\n continue;\n }\n $fileAge = time() - $fileInfo->getMTime();\n if ($fileAge > $lifetimeSeconds) {\n $this->deleteFile();\n }\n }\n }",
"public function testExpireTrashByRetention() {\n\t\t// create some files\n\t\t\\OC\\Files\\Filesystem::file_put_contents('file1.txt', 'file1');\n\t\t\\OC\\Files\\Filesystem::file_put_contents('file2.txt', 'file2');\n\t\t\\OC\\Files\\Filesystem::file_put_contents('file3.txt', 'file3');\n\n\t\t// delete them so that they end up in the trash bin\n\t\t\\OC\\Files\\Filesystem::unlink('file1.txt');\n\t\t\\OC\\Files\\Filesystem::unlink('file2.txt');\n\t\t\\OC\\Files\\Filesystem::unlink('file3.txt');\n\n\t\t//make sure that files are in the trash bin\n\t\t$filesInTrash = Helper::getTrashFiles('/', self::TEST_TRASHBIN_USER1, 'mtime', false);\n\t\t$this->assertCount(3, $filesInTrash);\n\n\t\t// simulate as 1 out of 3 files expired,\n\t\t// and next 2 do not need expiration\n\t\t$this->expiration->expects($this->exactly(2))\n\t\t\t->method('isExpired')\n\t\t\t->willReturnOnConsecutiveCalls(\n\t\t\t\ttrue,\n\t\t\t\tfalse\n\t\t\t);\n\n\t\t// call expire by retention\n\t\t$this->trashExpiryManager->expireTrashByRetention(self::TEST_TRASHBIN_USER1);\n\n\t\t$remainingFiles = Helper::getTrashFiles('/', self::TEST_TRASHBIN_USER1, 'mtime', false);\n\t\t$this->assertCount(2, $remainingFiles);\n\n\t\t$this->assertEquals(\n\t\t\t\\array_slice($filesInTrash, 1),\n\t\t\t$remainingFiles\n\t\t);\n\t}",
"function CleanupTickets(){\n\t\t\n\t\tglobal $mainframe;\n\t\t\n\t\t$db = JFactory::getDBO();\n\n\t\t## Create a new date NOW()-1h. (database session is not longer than 2 hours in global config.\n\t\t$cleanup = date('Y-m-d H:i:s', mktime(date('H')-1, date('i'), date('s'), date('m'), date('d'), date('Y')));\n\n\t\t## Pickup the items that will be deleted. We need to update the ticketcounter.\n\t\t## First getting the selected item in an object.\n\t\t$update = 'SELECT ticketid \n\t\t\t\t FROM #__ticketmaster_orders \n\t\t\t\t WHERE orderdate < \"'.$cleanup.'\" AND userid = 0';\n\t\n\t\t\n\t\t$db->setQuery($update);\n\t\t$this->data = $db->loadObjectList();\t\n\t\t\n\t\t$count = count($this->data);\n\t\t\n\t\tif ($count < 1){\n\t\t\texit();\n\t\t}\t\t\n\t\t\n\t\t## Now go on with the delete functions. All expired orders have been saved.\n\t\t$query = 'DELETE FROM #__ticketmaster_orders WHERE orderdate < \"'.$cleanup.'\" AND userid = 0';\n\t\t\n\t\t## Do the query now\tand delete all selected invoices.\n\t\t$db->setQuery( $query );\n\t\t\n\t\t## When query goes wrong.. Show message with error.\n\t\tif (!$db->query()) {\n\t\t\t$this->setError($db->getErrorMsg());\n\t\t\treturn false;\n\t\t}\t\n\n\t\t## Tickets have been removed successfull\n\t\t## Now we need to update the totals from the Object earlier this script.\n\t\t$k = 0;\n\t\tfor ($i = 0, $n = count($this->data); $i < $n; $i++ ){\n\t\t\n\t\t\t$row = &$this->data[$i];\n\t\t\t\n\t\t\t## Update the tickets-totals that where removed.\n\t\t\t$query = 'UPDATE #__ticketmaster_tickets'\n\t\t\t\t. ' SET totaltickets = totaltickets+1'\n\t\t\t\t. ' WHERE ticketid = '.$row->ticketid.' ';\n\t\t\t\n\t\t\t## Do the query now\t\n\t\t\t$db->setQuery( $query );\n\t\t\t\n\t\t\t## When query goes wrong.. Show message with error.\n\t\t\tif (!$db->query()) {\n\t\t\t\t$this->setError($db->getErrorMsg());\n\t\t\t\treturn false;\n\t\t\t}\t\t\n\t\t\t\n\t\t$k=1 - $k;\n\t\t}\t\t\t\n\t\n\t}",
"private function purgefiles()\n\t{\n\t\t$params=JComponentHelper::getParams('com_jbolo');\n\t\t$uploaddir=JPATH_COMPONENT.DS.'uploads';\n\t\t$exp_file_time=3600*24*$params->get('purge_days');\n\t\t$currts=time();\n\t\techo \"<div class='alert alert-success'>\".\n\t\tJText::_('COM_JBOLO_PURGE_OLD_FILES');\n\t\t/*\n\t\t * JFolder::files($path,$filter,$recurse=false,$full=false,$exclude=array('.svn'),$excludefilter=array('^\\..*'))\n\t\t*/\n\t\t$current_files=JFolder::files($uploaddir,'',1,true,array('index.html'));\n\t\t//print_r($current_files);die;\n\t\tforeach($current_files as $file)\n\t\t{\n\t\t\tif( $file != \"..\" && $file != \".\" )\n\t\t\t{\n\t\t\t\t$diffts=$currts-filemtime($file);\n\t\t\t\tif($diffts > $exp_file_time )\n\t\t\t\t{\n\t\t\t\t\techo '<br/>'.JText::_('COM_JBOLO_PURGE_DELETING_FILE').$file;\n\t\t\t\t\tif(!JFile::delete($file)){\n\t\t\t\t\t\techo '<br/>'.JText::_('COM_JBOLO_PURGE_ERROR_DELETING_FILE').'-'.$file;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\techo \"</div>\";\n\t}",
"public function apply() {\r\n chdir(APP_PATH . '/tmp/');\r\n\r\n //Get the files whose name begins from 'vdumes_', these files are VDUMES should be updated. If they begins from 'wwoffice_', they mean used by WWOffice.\r\n $array = glob(\"vdumes_*.txt\");\r\n $count = count($array);\r\n\r\n if ($count == 0) {\r\n exit();\r\n }\r\n\r\n //cycle each file for update\r\n foreach ($array as $val) {\r\n //The files's content seperated by semicolon, from left to right is domain,address,quota.\r\n $str = file_get_contents(APP_PATH . '/tmp/' . $val);\r\n $arr = explode(';', $str);\r\n\r\n //The update data\r\n $arr[] = array(\r\n 'quota' => $arr[2]\r\n );\r\n\r\n //The condition for update\r\n $conditions = array(\r\n 'username' => $arr[1],\r\n );\r\n $mx = spClass('lib_mailbox');\r\n $bl = $mx->update($conditions, $arr);\r\n\r\n //Get the affected rows.\r\n $rows = $mx->affectedRows();\r\n\r\n //If the affected rows equal -1, it means update failure, otherwise it means success.\r\n if ($rows == -1) {\r\n $this->spArgs('msg') = 'Update quota failure.';\r\n $this->writelog();\r\n } else {\r\n //If update success, then delete the txt file. If it failed, jump the error message then jump to the index page of mailbox controller.\r\n if (!unlink($val)) {\r\n $this->spArgs('msg') = 'The file is failed by deleting.';\r\n $this->writelog();\r\n }\r\n return TRUE;\r\n }\r\n }\r\n }",
"function deleteOldInvs() {\n\tif ($handle = opendir('./')) {\n\t\twhile (false !== ($file = readdir($handle))) { \n\t\t\t$ext = substr($file, -3);\n\t\t\tif ($ext != 'inv')\n\t\t\t\tcontinue;\n\t\t\tif((time() - filemtime($file)) > 86400)\n\t\t\t\tunlink($file);\n\n\t\t}\n\t\tclosedir($handle); \n\t}\n}",
"public function purgeAction()\n\t{\n\t\t$this->instanceBucket();\n\n\t\tif ($this->bucket instanceof \\CCloudStorageBucket)\n\t\t{\n\t\t\t$dirFiles = $this->bucket->ListFiles($this->generateUploadDir(), true);\n\n\t\t\t$now = new \\DateTime('now');\n\t\t\tforeach ($dirFiles['file'] as $fileName)\n\t\t\t{\n\t\t\t\tif (preg_match('/^([^_]+)_([0-9]{8})_([^_]+)_.+$/i', $fileName, $parts))\n\t\t\t\t{\n\t\t\t\t\t//$type = $parts[1];\n\t\t\t\t\t//$hash = $parts[3];\n\t\t\t\t\t$date = \\DateTime::createFromFormat('Ymd', $parts[2]);\n\t\t\t\t\t$interval = $now->diff($date);\n\t\t\t\t\tif ($interval->d > self::EXPIRE_DAYS)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->bucket->DeleteFile($this->generateUploadDir(). $fileName);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this->finishAction();\n\t}",
"private function gc()\n\t{\n\t\tif ($handle = opendir(DIR_SERVER_ROOT . DIR_TMP_NAME . '/' . DIR_DATASTORE_NAME . '/'))\n\t\t{ \n\t\t\t$dir_array = array(); \n\t\t\twhile (false !== ($file = readdir($handle)))\n\t\t\t{ \n\t\t\t\tif ($file != '.' AND $file != '..')\n\t\t\t\t{\n\t\t\t\t\tif (file_exists(DIR_SERVER_ROOT . DIR_TMP_NAME . '/' . DIR_DATASTORE_NAME . '/' . $file))\n\t\t\t\t\t{\n\t\t\t\t\t\t$lastmod = @filemtime(DIR_SERVER_ROOT . DIR_TMP_NAME . '/' . DIR_DATASTORE_NAME . '/' . $file);\n\t\t\t\t\t\tif (($lastmod + ($this->ttl)) < time())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t@unlink(DIR_SERVER_ROOT . DIR_TMP_NAME . '/' . DIR_DATASTORE_NAME . '/' . $file);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t} \n\t\t\tclosedir($handle);\n\t\t}\n\t}",
"public function actionPurgeExpiredTokens()\n {\n $now = Carbon::now();\n\n $this->cleanUpExpiredTokens($now);\n\n $this->cleanUpExpiredAuthorizationCodes($now);\n }",
"function clean(){\n global $wpdb;\n global $DOPBSP;\n \n $wpdb->query('DELETE FROM '.$DOPBSP->tables->reservations. ' WHERE token <> \"\" AND ((check_out < \"'.date('Y-m-d').'\" AND check_out <> \"\") OR (check_in < \"'.date('Y-m-d').'\" AND check_out = \"\"))');\n $wpdb->query('UPDATE '.$DOPBSP->tables->reservations.' SET status=\"expired\" WHERE status <> \"expired\" AND ((check_out < \"'.date('Y-m-d').'\" AND check_out <> \"\") OR (check_in < \"'.date('Y-m-d').'\" AND check_out = \"\"))');\n }",
"public static function maintain() {\n// self::maintainItem($item, $fields);\n\n $db = JFactory::getDBO();\n\n $query = '\n SELECT DISTINCT v.fieldid, v.itemid\n FROM #__k2_extra_fields_values AS v,\n (\n SELECT DISTINCT vv.itemid, vv.fieldid\n FROM #__k2_extra_fields_values AS vv, #__k2_extra_fields_definition vf\n WHERE\n vv.itemid NOT IN (SELECT id FROM #__k2_items) AND\n vv.fieldid = vf.id AND\n vf.definition LIKE \"%valid=media%\" AND\n vv.partindex = 0 AND\n vv.value = \"upload\"\n ) AS f\n WHERE v.itemid = f.itemid AND v.fieldid = f.fieldid AND v.partindex = ' . (K2FieldsMedia::SRCPOS - 1);\n\n $db->setQuery($query);\n $entries = $db->loadObjectList();\n\n if (!empty($entries)) {\n $_entries = array();\n\n foreach ($entries as $entry) {\n if (!isset($_entries[$entry->fieldid])) $_entries[$entry->fieldid] = array();\n\n $_entries[$entry->fieldid][] = $entry->itemid;\n }\n\n $model = K2Model::getInstance('fields', 'K2FieldsModel');\n $fields = $model->getFieldsById(array_keys($_entries));\n\n foreach ($fields as $fieldid => $field) {\n $items = $_entries[$fieldid];\n\n foreach ($items as $item) {\n $dir = self::getStorageDirectory($field, $item);\n $thumbdir = K2FieldsModelFields::setting('thumbfolder', $field);\n\n if (JFolder::exists($dir.'/'.$thumbdir)) JFolder::delete($dir.'/'.$thumbdir);\n\n if (JFolder::exists($dir)) JFolder::delete($dir);\n }\n }\n }\n }",
"public static function cleanCache()\n {\n $tempDir = sys_get_temp_dir() . \"/\";\n $filePointer = fopen(\n $tempDir . \"giftpromo_cleancache.lock\",\n \"w+\"\n );\n try {\n if (flock(\n $filePointer,\n LOCK_EX | LOCK_NB\n )) {\n // clear out any stale cache entries\n $useCache = Mage::app()->useCache('giftpromo_product_valid');\n if ($useCache) {\n $cacheModel = Mage::app()->getCache();\n // clear out any old cache for this.\n /** @noinspection PhpUndefinedMethodInspection */\n self::getHelper()->debug(\"Giftpromo - clean cache cron\");\n $cacheModel->clean(\n Zend_Cache::CLEANING_MODE_OLD,\n array('GIFTPROMO_PRODUCT_VALID')\n );\n }\n flock(\n $filePointer,\n LOCK_UN\n );\n unlink($tempDir . \"giftpromo_cleancache.lock\");\n } else {\n self::getHelper()->debug(\n \"Could not execute cron for clean cache - file lock '{$filePointer}' is in place, job may be running.\"\n );\n }\n } catch (Exception $e) {\n flock(\n $filePointer,\n LOCK_UN\n );\n unlink($tempDir . \"giftpromo_cleancache.lock\");\n mage::logException($e);\n self::getHelper()->debug($e->getMessage());\n mage::throwException($e->getMessage());\n }\n }",
"public function clean() {\n $this->logger->debug('Deleting of all cache files');\n $list = glob($this->cacheFilePath . '*.cache');\n if (!$list) {\n $this->logger->info('No cache files were found skipping');\n return;\n }\n $this->logger->info('Found [' . count($list) . '] cache files to remove');\n foreach ($list as $file) {\n $this->logger->debug('Processing the cache file [' . $file . ']');\n unlink($file);\n }\n }",
"public function cleanRepair() {}",
"public function cleanup()\n\t{\n\t\t$ArticlesLatest = Article::where('status', 'read')->where('star_ind', '0')->orderBy('created_at', 'desc')->select('id')->take(10000)->get();\n\t\t$ArticlesStar = Article::where('star_ind', '1')->select('id')->get();\n\t\t$ArticlesUnread = Article::where('status', 'unread')->select('id')->get();\n\n\t\t//create new empty array to store id's\n\t\t$cleanup_item_ids = [];\n\n\t\t//store id's from ArticlesStar in cleanup_item_ids\n\t\tif (!empty($ArticlesStar)) {\n\t\t\tforeach ($ArticlesStar as $Article) {\n\t\t\t\tarray_push($cleanup_item_ids, $Article->id);\n\t\t\t}\n\t\t}\n\n\t\t//store id's from ArticlesLatest in cleanup_item_ids\n\t\tif (!empty($ArticlesLatest)) {\n\t\t\tforeach ($ArticlesLatest as $Article) {\n\t\t\t\tarray_push($cleanup_item_ids, $Article->id);\n\t\t\t}\n\t\t}\n\n\t\t//store id's from ArticlesUnread in cleanup_item_ids\n\t\tif (!empty($ArticlesUnread)) {\n\t\t\tforeach ($ArticlesUnread as $Article) {\n\t\t\t\tarray_push($cleanup_item_ids, $Article->id);\n\t\t\t}\n\t\t}\n\n\t\t//delete items that are not in cleanup_item_ids array\n\t\tArticle::whereNotIn('id', $cleanup_item_ids)->delete();\n\t}",
"public function cleanUploadedFiles(): void\n {\n foreach ($this->uploadedFiles as $file) {\n @unlink($file['tmp_name']);\n }\n }",
"public function cleanupFiles()\n {\n\n echo 'Cleaning ' . $this->accountID . ' - ' . $this->accountName . ' File Directories' . PHP_EOL;\n\n foreach (glob(\"{$this->commissionsOutPath}/*.txt\") as $filename) {\n if (filemtime($filename) < strtotime('1 months ago')) {\n unlink($filename);\n }\n }\n\n foreach (glob(\"{$this->dailyFileOutPath}/*.txt\") as $filename) {\n if (filemtime($filename) < strtotime('1 months ago')) {\n unlink($filename);\n }\n }\n\n foreach (glob(\"{$this->monthlyFileOutPath}/*.txt\") as $filename) {\n if (filemtime($filename) < strtotime('2 months ago')) {\n unlink($filename);\n }\n }\n\n foreach (glob(\"{$this->metaFileOutPath}/*.txt\") as $filename) {\n if (filemtime($filename) < strtotime('1 months ago')) {\n unlink($filename);\n }\n }\n\n foreach (glob(self::EXPORT_TMP_DIR . \"/*.txt\") as $filename) {\n unlink($filename);\n }\n\n echo 'Finished cleaning ' . $this->accountName . ' File Directories' . PHP_EOL;\n }",
"private function checkExpirated() {\n\n }",
"public function validateExpiredTests()\n {\n try\n {\n $tests = AnswerHeader::query()->where('estado', 'A')->get();\n if ($tests->count() > 0)\n {\n foreach ($tests as $test)\n {\n $limitTime = (float)$test->parameter->duracion_examen;\n $startTime = strtotime($test->fecha_inicio);\n $currentTime = strtotime(date('Y-m-d H:i:s'));\n $time = round(($currentTime - $startTime)/60, 2);\n\n // Valida si tiempo esta expirado\n if($time > $limitTime)\n $expiredIds[] = $test->id;\n }\n\n if (isset($expiredIds))\n {\n AnswerHeader::whereIn('id', $expiredIds)\n ->update(['estado' => 'E', 'modificado_por' => 0, 'fecha_modificacion' => date('Y-m-d H:i:s')]);\n }\n }\n }\n catch (\\Exception $ex)\n {\n Log::error(\"[DashboardController][validateExpiredTests] Exception: \".$ex);\n }\n }",
"private function validateAccessToken()\n\t{\n\t\tif (file_exists($this->accessToken))\n\t\t{\n\t\t\t$fileAge = filemtime($this->accessToken);\n\t\t\t$now = time();\n\n\t\t\tif ($now - $fileAge > 3600)\n\t\t\t{\n\t\t\t\tunlink($this->accessToken);\n\t\t\t\t$this->fetchAccessToken();\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\t\t$this->fetchAccessToken();\n\t}",
"public function test_delete_item(): void\n {\n // Arrange\n $user = UserFactory::createOne()->object();\n $collectionLevel1 = CollectionFactory::createOne(['owner' => $user]);\n $collectionLevel2 = CollectionFactory::createOne(['parent' => $collectionLevel1, 'owner' => $user]);\n $collectionLevel3 = CollectionFactory::createOne(['parent' => $collectionLevel2, 'owner' => $user]);\n $item = ItemFactory::createOne(['collection' => $collectionLevel3, 'owner' => $user]);\n\n // Act\n $item->remove();\n\n $this->refreshCachedValuesQueue->process();\n\n // Assert\n $this->assertSame(0, $collectionLevel1->getCachedValues()['counters']['items']);\n $this->assertSame(0, $collectionLevel2->getCachedValues()['counters']['items']);\n $this->assertSame(0, $collectionLevel3->getCachedValues()['counters']['items']);\n }",
"public function checkForOldFiles()\n {\n $path = $this->getPath();\n $life_time = 24 * 3600;\n if ($handle = opendir($path)) {\n\n while (false !== ($file = readdir($handle))) {\n $filelastmodified = filemtime($path . $file);\n if ((time() - $filelastmodified) > $life_time) {\n $this->deleteFile($path . $file);\n }\n\n }\n closedir($handle);\n }\n }",
"protected function deleteUnusedItems(){\n $items=Item::where('serial_number','')->get();\n foreach($items as $item){\n $item->delete();\n }\n }",
"public function deleteAllExpired()\n {\n $repository = $this->doctrine->getRepository(Report::class);\n $deleteList = $repository->findAllExpired();\n\n foreach ($deleteList as $report){\n\n if($report->getPictRef()!== null){\n unlink(\"../public/userImages/{$report->getPictRef()}\");\n }\n\n $this->doctrine->remove($report);\n }\n\n $this->doctrine->flush();\n }",
"public function invalidateAll() : void\n {\n $files = glob($this->path . \"/*\"); // get all file names\n foreach ($files as $file) { // iterate files\n if (is_file($file)) {\n unlink($file); // delete file\n }\n }\n }",
"function cleanTrash() {\n\t\t$result = $this->select(\"logo_url\", \"status=2\");\n\t\tif ($result)\n\t\tforeach ($result as $image){\n\t\t\tunlink(ROOT_PATH.\"gallery/avatar_upload/flash/storage/\".$image['logo_url']);\n\t\t}\n\t\t$results = $this->delete(\"status=2\");\n\t\tif ($results)\n\t\t\treturn 1;\n\t\treturn 0;\n\t}",
"protected function utilPurgeOrphans()\n {\n if (!$this->confirmToProceed('This will PERMANENTLY DELETE files in \"system_files\" that do not belong to any other model.')) {\n return;\n }\n\n $orphanedFiles = 0;\n\n // Locate orphans\n $files = FileModel::whereNull('attachment_id')->get();\n\n foreach ($files as $file) {\n $file->delete();\n $orphanedFiles += 1;\n }\n\n if ($orphanedFiles > 0) {\n $this->comment(sprintf('Successfully deleted %d orphaned record(s).', $orphanedFiles));\n }\n else {\n $this->comment('No records to purge.');\n }\n }",
"private function cleanup()\n\t{\n\t\tee()->sync_db = ee()->load->database('sync_db', true);\n\n\t\t// delete 14 day old processed product records, always leaving at least 5\n\t\tee()->sync_db->query(\"DELETE FROM products WHERE processed = 1 AND timestamp < DATE_SUB(NOW(), INTERVAL 14 DAY) AND id NOT IN (SELECT id FROM ( SELECT id FROM `products` WHERE processed = 1 ORDER BY id DESC LIMIT 5 ) keepers)\");\n\t\t\n\t\t// delete old inventory records\t\n\t\tee()->sync_db->query(\"DELETE FROM products_inventory WHERE processed = 1 AND timestamp < DATE_SUB(NOW(), INTERVAL 2 DAY)\");\n\n\t\t// delete old shipping records\n\t\tee()->sync_db->query(\"DELETE FROM orders_shipping WHERE processed = 1 AND timestamp < DATE_SUB(NOW(), INTERVAL 14 DAY)\");\n\n\t\t// delete old processed records\n\t\tee()->sync_db->query(\"DELETE FROM orders_processed WHERE processed = 1 AND timestamp < DATE_SUB(NOW(), INTERVAL 14 DAY)\");\n\t\t\n\t}",
"function expunge()\n\t{\n\t\t$ret = FALSE;\n\t\tif ($this->isValid() ) {\n\t\t\t$this->mDb->StartTrans();\n\t\t\t$query = \"DELETE FROM `\".BIT_DB_PREFIX.\"irlist` WHERE `content_id` = ?\";\n\t\t\t$result = $this->mDb->query($query, array($this->mContentId ) );\n\t\t\tif (LibertyAttachable::expunge() ) {\n\t\t\t$ret = TRUE;\n\t\t\t\t$this->mDb->CompleteTrans();\n\t\t\t} else {\n\t\t\t\t$this->mDb->RollbackTrans();\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}",
"public function gc()\n {\n $expired = $this->find('toGc')->all();\n foreach ($expired as $block) {\n $this->unblock($block->get('id'));\n }\n }",
"public function clean($expiration)\n {\n $this->dba->clean();\n\n if (filemtime($this->dba->getFile()) < $expiration) {\n $this->dba->flush();\n }\n }",
"public function cleanTempFiles()\n\t{\n\t\t$manifestData = $this->_getManifestData();\n\n\t\tforeach ($manifestData as $row)\n\t\t{\n\t\t\tif (UpdateHelper::isManifestVersionInfoLine($row))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$rowData = explode(';', $row);\n\n\t\t\t// Delete any files we backed up.\n\t\t\t$backupFilePath = IOHelper::normalizePathSeparators(blx()->path->getAppPath().$rowData[0].'.bak');\n\n\t\t\tif (($file = IOHelper::getFile($backupFilePath)) !== false)\n\t\t\t{\n\t\t\t\tBlocks::log('Deleting backup file: '.$file->getRealPath(), \\CLogger::LEVEL_INFO);\n\t\t\t\t$file->delete();\n\t\t\t}\n\t\t}\n\n\t\t// Delete the temp patch folder\n\t\tIOHelper::deleteFolder($this->_unzipFolder);\n\n\t\t// Delete the downloaded patch file.\n\t\tIOHelper::deleteFile($this->_downloadFilePath);\n\t}",
"protected function _actionUnverify($context)\n {\n $context->response->status = KHttpResponse::RESET_CONTENT;\n $this->getItem()->unverify();\n return;\n }",
"static function cleanup()\n {\n $db = eZDB::instance();\n $rows = $db->arrayQuery( \"SELECT productcollection_id FROM ezorder\" );\n\n $db = eZDB::instance();\n $db->begin();\n if ( count( $rows ) > 0 )\n {\n $productCollectionIDList = array();\n foreach ( $rows as $row )\n {\n $productCollectionIDList[] = $row['productcollection_id'];\n }\n eZProductCollection::cleanupList( $productCollectionIDList );\n }\n // Who deletes which order in shop should be logged.\n eZAudit::writeAudit( 'order-delete', array( 'Comment' => 'Removed all orders from the database: eZOrder::cleanup()' ) );\n\n eZOrderItem::cleanup();\n $db->query( \"DELETE FROM ezorder_status_history\" );\n $db->query( \"DELETE FROM ezorder\" );\n $db->commit();\n }",
"private function cleanFiles($files) {\n foreach ($files as $v) {\n $file = $this->tmpFolder . '/' . $v;\n if(file_exists($file)) {\n unlink($file);\n }\n }\n }",
"function validate_update_cart_item(){\n\t\t$total = count($this->cart->contents());\n\t\t \n\t\t// Retrieve the posted information\n\t\t$item = $this->input->post('rowid');\n\t\t$qty = $this->input->post('qty');\n\t \n\t\t// Cycle true all items and update them\n\t\tfor($i=0;$i < $total;$i++)\n\t\t{\n\t\t\t// Create an array with the products rowid's and quantities. \n\t\t\t$data = array(\n\t\t\t 'rowid' => $item[$i],\n\t\t\t 'qty' => $qty[$i]\n\t\t\t);\n\t\t\t \n\t\t\t// Update the cart with the new information\n\t\t\t$this->cart->update($data);\n\t\t}\n\t \n\t}",
"public function should_not_clean_expired_transients_more_than_once_per_request() {\n\t\t// Reset the transient clearing state.\n\t\ttribe_set_var( 'should_delete_expired_transients', false );\n\t\ttribe_set_var( 'has_deleted_expired_transients', false );\n\t\t/** @var Cache $provided_cache */\n\t\t$provided_cache = tribe( 'cache' );\n\t\t$cache_instance_one = new \\Tribe__Cache();\n\t\t$cache_instance_two = new \\Tribe__Cache();\n\n\t\t$passed = 0;\n\t\tadd_filter( 'tribe_cache_delete_expired_transients_sql', static function () use ( & $passed ) {\n\t\t\t$passed ++;\n\n\t\t\t// Return a real query to make sure the \"cancellation\" will go through.\n\t\t\treturn 'SELECT 1';\n\t\t} );\n\n\t\t$provided_cache->flag_required_delete_transients( true );\n\n\t\t$provided_cache->maybe_delete_expired_transients();\n\t\t$provided_cache->delete_expired_transients();\n\t\t$provided_cache->maybe_delete_expired_transients();\n\t\t$cache_instance_one->maybe_delete_expired_transients();\n\t\t$cache_instance_one->delete_expired_transients();\n\t\t$cache_instance_one->maybe_delete_expired_transients();\n\t\t$cache_instance_two->maybe_delete_expired_transients();\n\t\t$cache_instance_two->delete_expired_transients();\n\t\t$cache_instance_two->maybe_delete_expired_transients();\n\n\t\t$this->assertEquals( 1, $passed );\n\t}",
"public function processItem($data)\n {\n $this->unpublishExpiredContents();\n }",
"public function cleanCaches()\n {\n require_once \"include/MetaDataManager/MetaDataManager.php\";\n\n $this->log(\"Cleaning cache\");\n $this->cleanFileCache();\n $this->cleanDir($this->cacheDir(\"smarty\"));\n $this->cleanDir($this->cacheDir(\"modules\"));\n $this->cleanDir($this->cacheDir(\"jsLanguage\"));\n $this->cleanDir($this->cacheDir(\"Expressions\"));\n $this->cleanDir($this->cacheDir(\"themes\"));\n $this->cleanDir($this->cacheDir(\"include/api\"));\n\n // as far as database schema hasn't been rebuilt yet, it's needed to check\n // if metadata manager is operable\n if (MetaDataManager::isCacheOperable()) {\n MetaDataManager::clearAPICache(true, true);\n } else {\n // otherwise, disable it until the schema has been rebuilt\n MetaDataManager::disableCache();\n }\n\n $this->log(\"Cache cleaned\");\n }",
"public function beforeDelete(){\n $files = $this->getFiles()->all();\n foreach($files as $file)\n $file->delete();\n\n return parent::beforeDelete();\n }",
"private function cleanupFiles() {\n\t\t$this -> loadModel('Archivo');\n\t\t$items = $this -> Archivo -> find('all');\n\t\t$db_files = array();\n\t\tforeach ($items as $key => $item) {\n\t\t\t$db_files[] = $item['Archivo']['ruta'];\n\t\t}\n\t\t$dir_files = array();\n\t\t$dir_path = APP . 'webroot/files/uploads/solicitudesTitulacion';\n\t\tif ($handle = opendir($dir_path)) {\n\t\t\twhile (false !== ($entry = readdir($handle))) {\n\t\t\t\tif ($entry != 'empty' && is_file($dir_path . DS . $entry))\n\t\t\t\t\t$dir_files[] = 'files/uploads/solicitudesTitulacion/' . $entry;\n\t\t\t}\n\t\t\tclosedir($handle);\n\t\t}\n\t\tforeach ($dir_files as $file) {\n\t\t\tif (!in_array($file, $db_files)) {\n\t\t\t\t$file = explode('/', $file);\n\t\t\t\t$file = $file[count($file) - 1];\n\t\t\t\t$tmp_file_path = $dir_path . DS . $file;\n\t\t\t\tunlink($tmp_file_path);\n\t\t\t}\n\t\t}\n\t}",
"function cleanImages()\r\n {\r\n if (!count($this->imagesContent)) return true;\r\n $this->_echo('<br>Очистка не используемых файлов картинок...');\r\n foreach ($this->imagesContent as $file) {\r\n @unlink($this->rootPath.$file);\r\n }\r\n }",
"public function deleteExpired() {\n\n\t\t\t// Retrieve cache\n\t\t\t$filename = $this->_getFileName();\n\t\t\t$cachedData = $this->_loadCache($filename);\n\n\t\t\t// Filter out and remove all expired objects\n\t\t\tif (is_array($cachedData)) {\n\t\t\t\t$counter = 0;\n\t\t\t\tforeach ($cachedData as $key => $value) {\n\t\t\t\t\t$age = time() - $value['time'];\n\t\t\t\t\tif ($age > $this->_duration) {\n\t\t\t\t\t\tunset($cachedData[$key]);\n\t\t\t\t\t\t$counter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($counter > 0) {\n\t\t\t\t\t$cachedData = json_encode($cacheData);\n\t\t\t\t\tif (true !== file_put_contents($filename, $cacheData)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t\treturn $counter;\n\t\t\t}\n\t\t}",
"public function tearDown()\n {\n foreach ($this->files as $file) {\n if (file_exists($file)) {\n unlink($file);\n }\n }\n }",
"protected function deleteExpired() {\n\t\t$result = $this->db->query('SELECT id FROM image WHERE delete_time < '.time());\n\t\tif ($result) {\n\t\t\twhile ($entry = $result->fetchArray(SQLITE3_NUM)) {\n\t\t\t\t$this->delete($entry[0]);\n\t\t\t}\n\t\t}\n\t}",
"public function cleanAll()\n {\n $this->filesystem->remove(self::getFilesList());\n }",
"private function removeOldMasterPDF()\n {\n foreach (File::files(storage_path('files')) as $file) {\n if ($file->getMTime() < Carbon::now()->AddDays(-config('app.exportFileTimeout', 5))->timestamp) {\n unlink($file->getPathname());\n }\n }\n }",
"public function clean()\n {\n $fileSystem = new Filesystem();\n \n if ($fileSystem->exists($this->getCacheDir())) {\n $fileSystem->remove($this->getCacheDir());\n }\n }",
"function clean_old_files(){\n\t$files = scandir(OUTPUT_FOLDER);\n\tforeach($files as $file){\n\t\tif($file != '.' && $file != '..'){\n\t\t\t$ext = substr($file,-4,4);\n\t\t\tif($ext == 'json'){\n\t\t\t\t$filemtime = filemtime(OUTPUT_FOLDER.'/'.$file);\n\t\t\t\t$diff = time() - $filemtime;\n\t\t\t\tif($diff >= FILE_LIFETIME){\n\t\t\t\t\t@unlink(OUTPUT_FOLDER.'/'.$file);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}",
"protected function delete_old() {\n // this will delete anything odler than 30 days\n $search = 'BEFORE \"' . date(\"j F Y\", strtotime(\"-30 days\")) . '\"';\n $emails = imap_search($this->mbox, $search, SE_UID);\n if(!empty($emails)){\n foreach($emails as $email){\n try {\n imap_delete($this->mbox, $email, FT_UID);\n }\n catch (\\Exception $e) {\n print \"Error processing email (UID $email): \" . $e->getMessage() . \"\\n\";\n }\n }\n }\n\n imap_expunge($this->mbox);\n }",
"private function cleanHashs() {\n\t\t//$sql = \"DELETE FROM `*PREFIX*ocDashboard_usedHashs` WHERE `timestamp` < '\".(time()-60*60*24).\"'\";\n\t\t$sql = \"DELETE FROM `*PREFIX*ocDashboard_usedHashs` WHERE `timestamp` < ?\";\n\t\t$query = \\OCP\\DB::prepare($sql);\n\t\t$params = Array(time()-60*60*24);\n\t\tif(!$query->execute($params)) {\n\t\t\tOCP\\Util::writeLog('ocDashboard',\"Can't delete usedHashs\", \\OCP\\Util::WARN);\n\t\t}\n\t}",
"static function check_expired_cache(){\n\n\t\tglobal $wpdb;\n\t\t$limit = 2000;\n\t\tif ( class_exists( 'WRC_Logger' ) ) {\n\t\t\tself::$logger = new WRC_Logger( get_called_class() );\n\t\t\t$cron_limit = get_option( WRC_Logger::SETTING_FLAG . '_limit', '2000' );\n\t\t\tif ( is_numeric( $cron_limit ) ) {\n\t\t\t\t$limit = $cron_limit;\n\t\t\t}\n\t\t}\n\n\t\t$expiredBefore = date('Y-m-d', strtotime('-1 year'));\n\n\t\t$query = '\nDELETE FROM ' . REST_CACHE_TABLE . ' \nWHERE rest_expires < \"' . $expiredBefore . '\" AND rest_to_update=0\nLIMIT ' . $limit;\n\n\t\ttry {\n\t\t\tif ( $wpdb->query( $query ) ) {\n\t\t\t\t// executed successfully\n\t\t\t} else {\n\t\t\t\tif ( function_exists( 'newrelic_notice_error' ) ) {\n\t\t\t\t\tnewrelic_notice_error( 'CRON FAIL: Unable to perform cleanup on un-requested old API cache. Limit ' . $limit . ', Expired ' . $expiredBefore );\n\t\t\t\t}\n\t\t\t}\n\t\t}catch( \\Exception $e){\n\t\t\tif ( function_exists( 'newrelic_notice_error' ) ) {\n\t\t\t\tnewrelic_notice_error( 'CRON FAIL: '.$e->getMessage().'. Limit ' . $limit . ', Expired ' . $expiredBefore );\n\t\t\t}\n\t\t}\n\t\treturn;\n\n\t}",
"public function cleanFileCache()\n {\n if (is_callable(array('SugarAutoLoader', 'buildCache'))) {\n SugarAutoLoader::buildCache();\n } else {\n // delete dangerous files manually\n @unlink(\"cache/file_map.php\");\n @unlink(\"cache/class_map.php\");\n }\n }",
"function cmc_framework_markets_landing_process_uploaded_file($form, &$form_state) {\n \n for ($i=1; $i<=5; $i++) {\n $tab = 'tab' . $i;\n $image_key = 'cmc_framework_markets_tab' . $i . '_image';\n $image_key_delete = 'cmc_framework_markets_tab' . $i . '_image_delete';\n \n if ($form_state['values'][$image_key] != 0) {\n // The new file's status is set to 0 or temporary and in order to ensure\n // that the file is not removed after 6 hours we need to change it's status\n // to 1.\n $file = file_load($form_state['values'][$image_key]);\n $file->status = FILE_STATUS_PERMANENT;\n file_save($file);\n \n // delete current file\n $image_fid = variable_get($image_key, '');\n if ($image_fid) {\n $f = file_load($image_fid);\n if (!empty($f->fid) && file_delete($f)) {\n drupal_set_message($f->filename . ' deleted');\n }\n }\n \n }\n else {\n $image_delete = $form_state['values'][$image_key_delete];\n if (!$image_delete) {\n unset($form_state['values'][$image_key]);\n }\n else {\n $image_fid = variable_get($image_key, '');\n $file = file_load($image_fid);\n \n if (file_delete($file)) {\n drupal_set_message($file->filename . ' deleted');\n }\n else {\n drupal_set_message($file->filename . ' could not be deleted. ');\n \n // so we still keep a record fo the file\n unset($form_state['values'][$image_key]);\n }\n }\n }\n }\n\n}",
"public function destroy($id)\n {\n $data = InventoryPurchaseReturn::findOrFail($id);\n $purchase = InventoryProductAdd::findOrFail($data->fk_purchase_id);\n $purchase->update([\n 'total_amount'=>$purchase->total_amount+$data->total_return,\n 'total_paid'=>$purchase->total_paid+$data->back_amount,\n ]);\n $items = InventoryPurchaseReturnItem::where('fk_return_id',$id)->get();\n foreach($items as $item){\n $purchasaeItem = InventoryProductAddItem::where('id',$item->fk_purchase_item_id)->first();\n $purchasaeItem->update([\n 'qty'=>$purchasaeItem->qty+$item->qty,\n 'payable_amount'=>$purchasaeItem->payable_amount+$item->sub_total,\n ]);\n// Item return to inventory\n $inventoryItem = InventoryItem::where('id',$item->inventory_item_id)->first();\n $inventoryItem->update([\n 'available_qty'=>$inventoryItem->available_qty+$item->qty,\n ]);\n\n\n $getInventory = Inventory::where('id',$inventoryItem->fk_inventory_id)->first();\n $getInventory->update([\n 'available_qty' => $getInventory->available_qty+$item->qty,\n ]);\n\n// \\Item Return to Inventory\n\n }\n InventoryPurchaseReturnItem::where('fk_return_id',$id)->delete();\n $data->delete();\n try {\n\n $bug=0;\n } catch (\\Exception $e) {\n $bug = $e->errorInfo[1];\n $bug1 = $e->errorInfo[2];\n }\n\n if($bug == 0){\n return redirect()->back()->with('success','Deleted Successfully.');\n }else{\n return redirect()->back()->with('error','Something Error Found !, Please try again.'.$bug1);\n }\n\n }",
"public static function clean()\n {\n try {\n Mage::getModel('hackathon_ordertransaction/mongo')->clean();\n } catch (Exception $e) {\n Mage::logException($e);\n }\n }",
"public function clean() {\n\t\t$sess = ORM::for_table($this->session_type)\n\t\t\t->where_lt('expired', date('Y-m-d H:i:s'))\n\t\t\t->find_many();\n\t\tif($sess != false) {\n\t\t\tforeach($sess as $s) {\n\t\t\t\t$s->delete();\n\t\t\t}\n\t\t}\n\t}",
"public function deleteUnusedFiles(){\n \n }",
"protected function _actionVerify($context)\n {\n $context->response->status = KHttpResponse::RESET_CONTENT;\n $this->getItem()->verify();\n return;\n }",
"public function autoPostOpenQueueItems()\n\t{\n\t\t$helper = Mage::helper('fw_queue');\n\t\tif($helper->isQueueEnabled())\n\t\t{\n\t\t\t$start = -microtime(true);\n\t\t\t$collection = Mage::getModel('fw_queue/queue')->getCollection();\n\t\t\t$collection->addFieldToSelect('*');\n\t\t\t$collection->addFieldToFilter('status', array(array('eq' => '1'),array('eq' => '4')));\n\t\t\tforeach($collection as $queue_item){\n\t\t\t\t$queue = Mage::getModel('fw_queue/queue')->load($queue_item->getId());\n\t\t\t\t$queue->process();\n\t\t\t}\n\t\t\t//CLEAN-UP AND STOP ERROR QUEUE ITEMS\n\t\t\t$expired = Mage::getModel('fw_queue/queue')->getCollection();\n\t\t\t$expired->addFieldToSelect('*');\n\t\t\t$expired->addFieldToFilter('status', array(array('eq' => '4')));\n\t\t\t$expired->addFieldToFilter('number_attempts', array(array('gteq' => '75')));\n\t\t\tforeach($expired as $expire_item){\n\t\t\t\t$queue = Mage::getModel('fw_queue/queue')->load($queue_item->getId());\n\t\t\t\t//STATUS_ABORTED_NOTIFIED = 5\n\t\t\t\t$queue->changeStatus('5');\n\t\t\t}\n\n\t\t\t//CLEAN-UP OLD ITEMS\n\t\t\t$date = date('Y-m-d H:i:s', time());\n\t\t\t$queueLastAttemptDate = strtotime ( '-90 day' , strtotime ( $date ) ) ;\n\t\t\t$queueLastAttemptDate = date ( 'Y-m-d H:i:s' , $queueLastAttemptDate );\n\n\t\t\ttry {\n\t\t\t\t$queueItems = Mage::getModel('fw_queue/queue')\n\t\t\t\t->getCollection()\n\t\t\t\t->addFieldToSelect('*')\n\t\t\t\t->addFieldToFilter('last_attempt', array('to' => $queueLastAttemptDate));\n\n\t\t\t\t$queueItems->getSelect()->limit(10000);\n\n\t\t\t\tforeach ($queueItems as $queueItem)\n\t\t\t\t{\n\t\t\t\t\t$queueItem->delete();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(Exception $e){\n\t\t\t\tMage::logException($e->getMessage());\n\t\t\t}\n\t\t\t$totalTime = microtime(true) + $start;\n\t\t\t$span = gmdate(\"H:i:s\",$totalTime);\n\t\t\t$micro = substr($totalTime - floor($totalTime),2);\n\t\t\t$logLine = \"Queue executed in {$span}.{$micro}\\r\\n\";\n\t\t\tMage::Log($logLine,null,'fw_queue.log');\n\n\t\t\t//Dispatch Event to let fw_orderpublish know when queue is done running\n\t\t\t$eventData = array('queue_complete' => 'true');\n\t\t\tMage::dispatchEvent('fw_queue_run_complete');\n\t\t}\n\n\t}",
"protected function removeExpiredCacheEntries() {}",
"function cleanDBonPurge() {\n $sl = new SoftwareLicense();\n $sl->deleteByCriteria(['softwares_id' => $this->fields['id']]);\n\n $this->deleteChildrenAndRelationsFromDb(\n [\n Item_Project::class,\n SoftwareVersion::class,\n ]\n );\n }",
"function delete_expired_transients($force_db = \\false)\n {\n }",
"public function clean() {\n\t\t\tif( !$items = $this->getStats( 'items' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$memcache = $this->getMemcache();\n\t\t\tforeach( $items['items'] as $key => $item ) {\n\t\t\t\t$dump = $memcache->getStats( 'cachedump', $key, $item['number'] * 2 );\n\t\t\t\tforeach( array_keys( $dump ) as $ckey ) {\n\t\t\t\t\t$memcache->get( $ckey );\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->stats = null;\n\t\t}",
"function checkKeys()\n{\n global $cache_file;\n if (file_exists($cache_file)) {\n $fp = fopen($cache_file, \"r+\");\n if (flock($fp, LOCK_SH)) {\n $contents = fread($fp, filesize($cache_file));\n if ($contents > time()) {\n flock($fp, LOCK_UN);\n } elseif (flock($fp, LOCK_EX)) { // upgrading the lock to exclusive (write)\n // here we need to revalidate since another process could've got to the LOCK_EX part before this\n if (fread($fp, filesize($cache_file)) <= time()) \n {\n refreshKeys($fp);\n }\n flock($fp, LOCK_UN);\n } else {\n throw new \\RuntimeException('Cannot refresh keys: file lock upgrade error.');\n }\n } else {\n // you need to handle this by signaling error\n throw new \\RuntimeException('Cannot refresh keys: file lock error.');\n }\n fclose($fp);\n } else {\n refreshKeys();\n }\n}",
"public function clean(Request $request){\n if($request->password !== \\Auth::user()->password && $request->email !== \\Auth::user()->email){\n return redirect()->back()->withError('Pogrešni podaci.');\n }\n $toDelete = self::toDelete();\n foreach ($toDelete as $nameOfImage) {\n self::deleteImage($nameOfImage);\n }\n // dd($toDelete);\n\n return redirect()->route('adminBussines')->withSuccess('Ocišćeno: obrisano '. count($toDelete). \" slika!\");\n // dd($filesInPublicFolder);\n }",
"function purge( $files, &$results ) {\n\t\ttry {\n\t\t\t$this->_init();\n\t\t\t$dist = $this->_get_distribution();\n\t\t} catch ( \\Exception $ex ) {\n\t\t\t$results = $this->_get_results( $files, W3TC_CDN_RESULT_HALT, $ex->getMessage() );\n\t\t\treturn false;\n\t\t}\n\n\t\t$paths = array();\n\n\t\tforeach ( $files as $file ) {\n\t\t\t$remote_file = $file['remote_path'];\n\t\t\t$paths[] = '/' . $remote_file;\n\t\t}\n\n\t\ttry {\n\t\t\t$invalidation = $this->api->createInvalidation( array(\n\t\t\t\t\t'DistributionId' => $dist['Id'],\n\t\t\t\t\t'InvalidationBatch' => array(\n\t\t\t\t\t\t'CallerReference' => 'w3tc-' . \tmicrotime(),\n\t\t\t\t\t\t'Paths' => array(\n\t\t\t\t\t\t\t'Items' => $paths,\n\t\t\t\t\t\t\t'Quantity' => count( $paths ),\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t} catch ( \\Exception $ex ) {\n\t\t\t$results = $this->_get_results( $files, W3TC_CDN_RESULT_HALT,\n\t\t\t\tsprintf( 'Unable to create invalidation batch (%s).',\n\t\t\t\t$ex->getMessage() ) );\n\n\t\t\treturn false;\n\t\t}\n\n\t\t$results = $this->_get_results( $files, W3TC_CDN_RESULT_OK, 'OK' );\n\t\treturn true;\n\t}",
"public function testDestroy()\n {\n Item::factory()->create(\n ['email' => '[email protected]', 'name' => 'test']\n );\n Item::factory()->count(10)->create();\n\n //test item not found\n $this->delete('/items/11111')\n ->seeJson([\n 'error' => 'Item Not Found',\n ])\n ->seeJson([\n 'code' => 404,\n ]);\n\n //test success deleted item\n $this->delete('/items/1')\n ->seeJson([\n 'message' => 'Item 1 deleted',\n ])\n ->seeJson([\n 'status' => 'ok',\n ]);\n\n $this->notSeeInDatabase('items', array('id' => 1));\n }",
"public static function cleanupTempFolder(){\r\n\t\t$files = glob($_SERVER[\"DOCUMENT_ROOT\"] . \"/tmp/*\");\r\n\t\t$now = time();\r\n\r\n\t\tforeach($files as $file){\r\n\t\t\tif(is_file($file) && basename($file) != \".keep\"){\r\n\t\t\t\tif($now - filemtime($file) >= 60*60*24){\r\n\t\t\t\t\tunlink($file);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function __destruct()\n {\n $iMax = count($this->aFiles);\n for ($iFor = 0; $iFor < $iMax; $iFor++) {\n\n if (true === file_exists($this->aFiles[$iFor])) {\n\n unlink($this->aFiles[$iFor]);\n }\n\n $sMessage = 'delete: ' . $this->aFiles[$iFor];\n $this->oLog->writeLog(Log::HF_DEBUG, $sMessage);\n }\n }",
"public function cleanOldCards() {\r\n\t\t$cards = Mage::getModel('authnetcim/card')->getCollection()\r\n\t\t\t\t\t\t->addFieldToFilter( 'added', array( 'lt' => (time() - (120*86400)) ) );\r\n\t\t\r\n\t\tforeach( $cards as $card ) {\r\n\t\t\tif( $this->deletePaymentProfile( $card->getPaymentId(), $card->getProfileId() ) ) {\r\n\t\t\t\t$card->delete();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static function cleanPurchases() {\n\n // TODO (fix) remove the key and the purchaseid\n Session::delete('key');\n Session::delete('purchaseid');\n\n // get incomplete purchases\n return Admin::deleteOldPurchases();\n }",
"private function clearOldFiles()\r\n {\r\n // Buscando itens na pasta\r\n $files = new \\DirectoryIterator( $this->backupFolder );\r\n\r\n // Passando pelos itens\r\n $sortedFiles = array();\r\n foreach ($files as $file) {\r\n // Se for um arquivo\r\n if ($file->isFile()) {\r\n // Adicionando em um vetor, sendo o índice a data de modificação\r\n // do arquivo, para assim ordenarmos posteriormente\r\n $sortedFiles[$file->getMTime()] = $file->getPathName();\r\n }\r\n }\r\n\r\n // Ordena o vetor em ordem decrescente\r\n arsort( $sortedFiles );\r\n\r\n // Passando pelos arquivos\r\n $numberFiles = 0;\r\n foreach ($sortedFiles as $file) {\r\n $numberFiles++;\r\n // Se a quantidade de arquivo for maior que a quantidade\r\n // máxima definida\r\n if ($numberFiles > $this->maxNumberFiles) {\r\n // Removemos o arquivo da pasta\r\n unlink( $file );\r\n echo \"Apagado backup '{$file}'\" . PHP_EOL;\r\n }\r\n }\r\n\r\n }",
"public function clean() {\n // Clean Temporary Files\n if (is_dir($this->tmpPath)) {\n $objects = new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($this->tmpPath), \\RecursiveIteratorIterator::SELF_FIRST\n );\n foreach ($objects as $name => $object) {\n if (!$object->isDir()) {\n @unlink($name);\n }\n }\n }\n\n // Clean Cache Files\n if (is_dir($this->cachePath)) {\n $objects = new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($this->cachePath), \\RecursiveIteratorIterator::SELF_FIRST\n );\n foreach ($objects as $name => $object) {\n if (!$object->isDir()) {\n @unlink($name);\n }\n }\n }\n }",
"function execute_filecheck( $auto = true ) {\n\t\t\n\t\t\tglobal $wpdb, $bwpsoptions, $logid;\n\n\t\t\t//set base memory\n\t\t\t$this->startMem = @memory_get_usage();\n\t\t\t$this->maxMemory = $this->startMem;\n\t\t\t\n\t\t\t//get old file list\n\t\t\tif ( is_multisite() ) {\n\t\t\t\t\t\n\t\t\t\tswitch_to_blog( 1 );\n\t\t\t\t\t\n\t\t\t\t$logItems = maybe_unserialize( get_option( 'bwps_file_log' ) );\n\t\t\t\t\t\n\t\t\t\trestore_current_blog();\n\t\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t$logItems = maybe_unserialize( get_option( 'bwps_file_log' ) );\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//if there are no old files old file list is an empty array\n\t\t\tif ( $logItems === false ) {\n\t\t\t\n\t\t\t\t$logItems = array();\n\t\t\t\n\t\t\t} \n\t\t\t\n\t\t\t$currItems = $this->scanfiles(); //scan current files\n\t\t\t\n\t\t\t$added = @array_diff_assoc( $currItems, $logItems ); //files added\n\t\t\t$removed = @array_diff_assoc( $logItems, $currItems ); //files deleted\n\t\t\t$compcurrent = @array_diff_key( $currItems, $added ); //remove all added files from current filelist\n\t\t\t$complog = @array_diff_key( $logItems, $removed ); //remove all deleted files from old file list\n\t\t\t$changed = array(); //array of changed files\n\t\t\t\n\t\t\t//compare file hashes and mod dates\n\t\t\tforeach ( $compcurrent as $currfile => $currattr) {\n\t\t\t\n\t\t\t\tif ( array_key_exists( $currfile, $complog ) ) {\n\t\t\t\t\n\t\t\t\t\t//if attributes differ added to changed files array\n\t\t\t\t\tif ( strcmp( $currattr['mod_date'], $complog[$currfile]['mod_date'] ) != 0 || strcmp( $currattr['hash'], $complog[$currfile]['hash'] ) != 0 ) {\n\t\t\t\t\t\t$changed[$currfile]['hash'] = $currattr['hash'];\n\t\t\t\t\t\t$changed[$currfile]['mod_date'] = $currattr['mod_date'];\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//get count of changes\n\t\t\t$addcount = sizeof( $added );\n\t\t\t$removecount = sizeof( $removed );\n\t\t\t$changecount = sizeof( $changed );\n\t\t\t\n\t\t\t//create single array of all changes\n\t\t\t$combined = array(\n\t\t\t\t'added' => $added,\n\t\t\t\t'removed' => $removed,\n\t\t\t\t'changed' => $changed\n\t\t\t);\n\t\t\t\n\t\t\t//save current files to log\n\t\t\t//Get the options\n\t\t\tif ( is_multisite() ) {\n\t\t\t\t\t\n\t\t\t\tswitch_to_blog( 1 );\n\t\t\t\t\t\n\t\t\t\tupdate_option( 'bwps_file_log', serialize( $currItems ) );\n\t\t\t\t\t\n\t\t\t\trestore_current_blog();\n\t\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\tupdate_option( 'bwps_file_log', serialize( $currItems ) );\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//log check to database\n\t\t\t$wpdb->insert(\n\t\t\t\t$wpdb->base_prefix . 'bwps_log',\n\t\t\t\tarray(\n\t\t\t\t\t'type' => '3',\n\t\t\t\t\t'timestamp' => current_time( 'timestamp' ),\n\t\t\t\t\t'host' => '',\n\t\t\t\t\t'user' => '',\n\t\t\t\t\t'url' => '',\n\t\t\t\t\t'referrer' => '',\n\t\t\t\t\t'data' => serialize( $combined )\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\t$logid = $wpdb->insert_id;\n\t\t\t\n\t\t\t//if not the first check and files have changed warn about changes\n\t\t\tif ( $bwpsoptions['id_filechecktime'] != '' ) {\n\t\t\t\n\t\t\t\tif ( $addcount != 0 || $removecount != 0 || $changecount != 0 ) {\n\t\t\t\n\t\t\t\t\t//Update the right options\n\t\t\t\t\tif ( is_multisite() ) {\n\t\t\t\t\t\n\t\t\t\t\t\tswitch_to_blog( 1 );\n\t\t\t\t\t\n\t\t\t\t\t\tupdate_option( 'bwps_intrusion_warning', 1 );\n\t\t\t\t\t\n\t\t\t\t\t\trestore_current_blog();\n\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t\tupdate_option( 'bwps_intrusion_warning', 1 );\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tif ( $bwpsoptions['id_fileemailnotify'] == 1 ) {\n\t\t\t\t\t\t$this->fileemail();\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t//get new max memory\n\t\t\t\t$newMax = @memory_get_peak_usage();\n\t\t\t\tif ( $newMax > $this->maxMemory ) {\n\t\t\t\t\t$this->maxMemory = $newMax;\n\t\t\t\t}\n\n\t\t\t\t//log memory usage\n\t\t\t\t$wpdb->update(\n\t\t\t\t\t$wpdb->base_prefix . 'bwps_log',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'mem_used' => ( $this->maxMemory - $this->startMem )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => $logid\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\n\t\t\t//set latest check time\n\t\t\t$bwpsoptions['id_filechecktime'] = current_time( 'timestamp' );\n\t\t\t\t\n\t\t\t//Update the right options\n\t\t\tif ( is_multisite() ) {\n\t\t\t\t\t\t\n\t\t\t\tswitch_to_blog( 1 );\n\t\t\t\t\t\t\n\t\t\t\tupdate_option( $this->primarysettings, $bwpsoptions );\n\t\t\t\t\t\n\t\t\t\trestore_current_blog();\n\t\t\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\tupdate_option( $this->primarysettings, $bwpsoptions );\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}",
"public function testDestroyData()\n {\n $store = new Storage(TESTING_STORE);\n\n // get id from our first item\n $id = $store->read()[0]['_id'];\n\n // destroy the data by id\n $store->destroy($id);\n\n // get the rest of data after destroy\n $rest_of_items = $store->read();\n\n // since our data is only one (no data left) the results must be === 0\n $this->assertEquals(0, count($rest_of_items));\n }",
"protected function cleanup() {\n\t\tif(isset($this->data['attachment'])) {\n\t\t\tunlink($this->data['attachment']);\n\t\t}\n\t\tparent::cleanup();\n\t}",
"private function purgeExisting() {\n $paths = array('tax/calculation', 'tax/calculation_rate', 'tax/calculation_rule');\n\n foreach( $paths as $path ) {\n $existingRecords = Mage::getModel($path)->getCollection();\n\n foreach( $existingRecords as $record ) {\n\n try {\n $record->delete();\n }\n catch (Exception $e) {\n Mage::getSingleton('core/session')->addError(\"There was an error deleting from Magento model \" . $path);\n }\n\n }\n\n }\n\n }",
"protected function cleanup()\n {\n foreach ($this->temp_files as $file) {\n $this->filesystem->remove($file);\n }\n $this->temp_files = [];\n }",
"public function rejectExpiredRequests()\n {\n try {\n $expiredRequests = CustomRequest::where('status', RequestStatus::Verification)\n ->whereDate('expiry_date', Carbon::today())\n ->where('type', CreationType::KP)\n ->get();\n\n foreach ($expiredRequests as $key => $expiredRequest) {\n $expiredRequest->status = RequestStatus::RejectBySistem;\n $expiredRequest->expiry_date = null;\n $expiredRequest->save();\n Log::info('Sedang menolak pendaftaran '. CreationType::getString($expiredRequest->type) .' : '. $expiredRequest->student()->first()->npm . ' | '. $expiredRequest->student()->first()->name);\n }\n } catch(\\Exception $e) {\n $errorStr = method_exists($e, 'getMessage') ? json_decode($e->getMessage()) : json_encode($e);\n Log::info($errorStr);\n }\n }",
"private function runAutoMaintenance() {\n\t\tglobal $wgRejectedAccountMaxAge, $wgConfirmAccountFSRepos;\n\n\t\t$dbw = wfGetDB( DB_MASTER );\n\t\t# Select all items older than time $cutoff\n\t\t$cutoff = $dbw->timestamp( time() - $wgRejectedAccountMaxAge );\n\t\t$accountrequests = $dbw->tableName( 'account_requests' );\n\t\t$sql = \"SELECT acr_storage_key,acr_id FROM $accountrequests WHERE acr_rejected < '{$cutoff}'\";\n\t\t$res = $dbw->query( $sql );\n\n\t\t$repo = new FSRepo( $wgConfirmAccountFSRepos['accountreqs'] );\n\t\t# Clear out any associated attachments and delete those rows\n\t\twhile( $row = $dbw->fetchObject( $res ) ) {\n\t\t\t$key = $row->acr_storage_key;\n\t\t\tif( $key ) {\n\t\t\t\t$path = $repo->getZonePath( 'public' ).'/'.\n\t\t\t\t\t$key[0].'/'.$key[0].$key[1].'/'.$key[0].$key[1].$key[2].'/'.$key;\n\t\t\t\tif( $path && file_exists($path) ) {\n\t\t\t\t\tunlink($path);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$dbw->query( \"DELETE FROM $accountrequests WHERE acr_id = {$row->acr_id}\" );\n\t\t}\n\n\t\t# Select all items older than time $cutoff\n\t\tglobal $wgConfirmAccountRejectAge;\n\t\t$cutoff = $dbw->timestamp( time() - $wgConfirmAccountRejectAge );\n\t\t# Old stale accounts will count as rejected. If the request was held, give it more time.\n\t\t$dbw->update( 'account_requests',\n\t\t\tarray( 'acr_rejected' => $dbw->timestamp(),\n\t\t\t\t'acr_user' => 0, // dummy\n\t\t\t\t'acr_comment' => wfMsgForContent('confirmaccount-autorej'),\n\t\t\t\t'acr_deleted' => 1 ),\n\t\t\tarray( \"acr_rejected IS NULL\", \"acr_registration < '{$cutoff}'\", \"acr_held < '{$cutoff}'\" ),\n\t\t\t__METHOD__ );\n\n\t\t# Clear cache for notice of how many account requests there are\n\t\tglobal $wgMemc;\n\t\t$key = wfMemcKey( 'confirmaccount', 'noticecount' );\n\t\t$wgMemc->delete( $key );\n\t}",
"public function flushesExpiredFiles(UnitTester $I)\n {\n\n $create_file = function () {\n $file_contents = str_repeat(\"0123456789\", 1000);\n\n $uploaded_file_path = \"{$this->temp_dir}/\" . self::FILENAME;\n\n file_put_contents($uploaded_file_path, $file_contents);\n\n return new UploadedFile(\n new Stream($uploaded_file_path),\n strlen($file_contents),\n UPLOAD_ERR_OK,\n self::FILENAME,\n self::MEDIA_TYPE\n );\n };\n\n $uploaded_file = $create_file();\n\n // bootstrap a mock service for test:\n\n $service = new MockTempFileService($this->filesystem, \"tmp\", 1, 100); // always flush after 1 minute\n\n $service->time = time(); // fake time\n\n // collect the uploaded file as a temporary file:\n\n $uuid = $service->collect($uploaded_file);\n\n $I->assertInstanceOf(TempFile::class, $service->recover($uuid), \"can recover temporary file\");\n\n // advance time by 1 minute:\n\n $service->time += 61;\n\n // trigger flushing by collecting another file:\n\n $another_file = $create_file();\n\n $service->collect($another_file);\n\n // recover the uploaded file:\n\n $exception = null;\n\n try {\n $service->recover($uuid);\n } catch (TempFileRecoveryException $exception) {\n // caught!\n }\n\n $I->assertInstanceOf(TempFileRecoveryException::class, $exception);\n\n $I->assertCount(2, $this->filesystem->listPaths(\"tmp\"), \"temp dir contains only one json/tmp file pair\");\n }",
"public function clearItems()\n\t{\n\t\t$this->storage->clear();\n\t}",
"public function deleteExpire($files_list){\r\n $data_dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Data';\r\n foreach($files_list as $key => $file){\r\n if($key >= Config::get(\"ipnet.expire_num\")){\r\n unlink($data_dir. DIRECTORY_SEPARATOR . $file['name']);\r\n }\r\n }\r\n }"
] | [
"0.6432089",
"0.6081106",
"0.587504",
"0.58073884",
"0.58016634",
"0.5795249",
"0.579096",
"0.577308",
"0.57053995",
"0.56975317",
"0.56790584",
"0.5670454",
"0.56674725",
"0.56099015",
"0.5606711",
"0.5599495",
"0.5563707",
"0.5554562",
"0.55514324",
"0.5541887",
"0.5532494",
"0.5506106",
"0.5471444",
"0.5463424",
"0.54521936",
"0.5449211",
"0.5445398",
"0.5434512",
"0.54219747",
"0.540097",
"0.53868544",
"0.5375262",
"0.5372176",
"0.535394",
"0.533873",
"0.5337144",
"0.53286827",
"0.53224164",
"0.5322055",
"0.5318005",
"0.5315669",
"0.52926993",
"0.5291988",
"0.52815324",
"0.527776",
"0.52659947",
"0.5261192",
"0.5245176",
"0.52320045",
"0.52180135",
"0.52049714",
"0.52028733",
"0.51811475",
"0.5180441",
"0.51741576",
"0.51720726",
"0.5167615",
"0.5164044",
"0.5163276",
"0.51628554",
"0.5161545",
"0.51540583",
"0.51533306",
"0.51517713",
"0.5149854",
"0.5137565",
"0.5132098",
"0.512483",
"0.51115954",
"0.5110223",
"0.5110156",
"0.5090514",
"0.5089908",
"0.50849646",
"0.50840497",
"0.5078548",
"0.5075426",
"0.50735164",
"0.50706536",
"0.5069171",
"0.50682735",
"0.5068002",
"0.50637305",
"0.50636023",
"0.5062134",
"0.50609994",
"0.5058451",
"0.5058123",
"0.50519454",
"0.5048938",
"0.50483507",
"0.5047422",
"0.50287515",
"0.5028525",
"0.50189376",
"0.5018028",
"0.5015462",
"0.5007341",
"0.50057435",
"0.50051844"
] | 0.62844634 | 1 |
Run the database seeds. | public function run()
{
SearchList::create([
'class_path' => News::class,
'field' => 'title',
'module_slug' => 'news',
'route_name' => 'show_news',
'is_require_slug' => 1,
'is_active' => 1
]);
SearchList::create([
'class_path' => Video::class,
'field' => 'name',
'module_slug' => 'news',
'route_name' => 'show_videos',
'is_require_slug' => 1,
'is_active' => 1
]);
SearchList::create([
'class_path' => Photo::class,
'field' => 'name',
'module_slug' => 'news',
'route_name' => 'show_photo',
'is_require_slug' => 1,
'is_active' => 1
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }",
"public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }",
"public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }",
"public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }",
"public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }",
"public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }",
"public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }",
"public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }",
"public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }",
"public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }",
"public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }",
"public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }",
"public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }",
"public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }",
"public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }",
"public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }",
"public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}",
"public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }",
"public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}",
"public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }",
"public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }",
"public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }",
"public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }",
"public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }",
"public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }",
"public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}",
"public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }",
"public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }",
"public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }",
"public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }",
"public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }",
"public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }",
"public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }",
"public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }",
"public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }",
"public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }",
"public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }",
"public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }",
"public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }",
"public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }",
"public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}",
"public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }",
"public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }",
"public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }",
"public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }",
"public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }",
"public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }",
"public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }",
"public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }"
] | [
"0.8013876",
"0.79804534",
"0.7976992",
"0.79542726",
"0.79511505",
"0.7949612",
"0.794459",
"0.7942486",
"0.7938189",
"0.79368967",
"0.79337025",
"0.78924936",
"0.78811055",
"0.78790957",
"0.78787595",
"0.787547",
"0.7871811",
"0.78701615",
"0.7851422",
"0.7850352",
"0.7841468",
"0.7834583",
"0.7827792",
"0.7819104",
"0.78088796",
"0.7802872",
"0.7802348",
"0.78006834",
"0.77989215",
"0.7795819",
"0.77903426",
"0.77884805",
"0.77862066",
"0.7778816",
"0.7777486",
"0.7765202",
"0.7762492",
"0.77623445",
"0.77621746",
"0.7761383",
"0.77606887",
"0.77596676",
"0.7757001",
"0.7753607",
"0.7749522",
"0.7749292",
"0.77466977",
"0.7729947",
"0.77289546",
"0.772796",
"0.77167094",
"0.7714503",
"0.77140456",
"0.77132195",
"0.771243",
"0.77122366",
"0.7711113",
"0.77109736",
"0.7710777",
"0.7710086",
"0.7705484",
"0.770464",
"0.7704354",
"0.7704061",
"0.77027386",
"0.77020216",
"0.77008796",
"0.7698617",
"0.76985973",
"0.76973504",
"0.7696405",
"0.7694293",
"0.7692694",
"0.7691264",
"0.7690576",
"0.76882726",
"0.7687433",
"0.7686844",
"0.7686498",
"0.7685065",
"0.7683827",
"0.7679184",
"0.7678287",
"0.76776296",
"0.76767945",
"0.76726556",
"0.76708084",
"0.76690495",
"0.766872",
"0.76686716",
"0.7666299",
"0.76625943",
"0.7662227",
"0.76613766",
"0.7659881",
"0.7656644",
"0.76539344",
"0.76535016",
"0.7652375",
"0.7652313",
"0.7652022"
] | 0.0 | -1 |
Determine if the user is authorized to make this request. | public function authorize()
{
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }",
"public function authorize()\n {\n return $this->user() != null;\n }",
"public function authorize(): bool\n {\n return $this->user() !== null;\n }",
"public function authorize(): bool\n {\n return $this->isUserAuthorised();\n }",
"public function authorize()\n {\n return !is_null($this->user());\n }",
"public function authorize()\n {\n return request()->user() != null;\n }",
"public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }",
"public function isAuthorized()\n {\n return $this->cookieHelper->requestCookieExists('auth');\n }",
"public function authorize()\n {\n return !empty(Auth::user()) && ($this->user()->isAnAdmin() || $this->user()->hasRole('user'));\n }",
"public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\n }",
"public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default:\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n }\n\n return false;\n }",
"public function authorize()\n {\n if($this->user()->role == \"admin\" || $this->user()->id == $this->request->get('author_id')) return true;\n else return false;\n }",
"public function authorize()\n {\n if(\\Auth::guest())\n {\n return false;\n } else {\n // Action 1 - Check if authenticated user is a superadmin\n if(\\Auth::User()->hasRole('superadmin'))\n return true;\n\n // Action 2 - Find UUID from request and compare to authenticated user\n $user = User::where('uuid', $this->user_uuid)->firstOrFail();\n if($user->id == \\Auth::User()->id)\n return true;\n\n // Action 3 - Fail request\n return false;\n }\n }",
"public function authorize()\n {\n $this->model = $this->route('user');\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }",
"public function isAuthorized(): bool\n {\n // TODO: implement authorization check\n\n return true;\n }",
"public function isAuthorized() {}",
"public function authorize()\n {\n return request()->loggedin_role === 1;\n }",
"public function authorize()\n {\n $this->model = $this->route('user');\n\n if ($this->isEdit() && !is_null($this->model)) {\n if (!user()->hasPermissionTo('Administrations::admin.user') && $this->model->id != user()->id) {\n return false;\n }\n }\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }",
"public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }",
"public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }",
"public function authorize()\n {\n return auth()->check() ? true : false;\n }",
"public function authorize()\n {\n return auth()->check() ? true : false;\n }",
"public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }",
"public function authorize()\n {\n switch (true) {\n case $this->wantsToList():\n case $this->wantsToShow():\n if ($this->hasRoles(['owner', 'administrator'])) {\n return true;\n }\n break;\n case $this->wantsToStore():\n case $this->wantsToUpdate():\n case $this->wantsToDestroy():\n if ($this->hasRoles(['owner'])) {\n return true;\n }\n break;\n }\n\n return false;\n }",
"public function authorize()\n {\n $user = JWTAuth::parseToken()->authenticate();\n $organisation = Organization::findOrFail($this->route('organizations'));\n return $organisation->admin_id == $user->id;\n }",
"public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }",
"function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }",
"public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }",
"public function authorize()\n {\n $this->user = User::query()->find($this->route()->parameter('user'));\n $this->merge(['verified' => $this->get('verified') ? 1 : 0]);\n\n return true;\n }",
"public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }",
"public function authorize()\n {\n return is_client_or_staff();\n }",
"public function isAuthorized() {\n\t\treturn true;\n\t}",
"public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }",
"public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }",
"public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin'])) {\n return true;\n } else {\n return false;\n }\n }",
"public function isAuthorized()\n\t{\n\t\t$sessionVal = Yii::$app->session->get($this->sessionParam);\n\t\treturn (!empty($sessionVal));\n\t}",
"public function authorize() {\n\n return auth()->user() && auth()->user()->username === $this->user->username;\n }",
"public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }",
"public function authorize()\n {\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n\n }",
"public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\n }",
"public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }",
"public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }",
"public function hasAuthorized() {\n return $this->_has(1);\n }",
"public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }",
"public function authorize()\n {\n /*\n if ($this->loan_id && is_numeric($this->loan_id) && $loan = Loan::whereId($this->loan_id)->first()) {\n // loan_id belongs to requesting user\n return $loan && $this->user()->id == $loan->user_id;\n }\n */\n return true; // let rules handle it\n }",
"public function authorize()\n {\n //TODO Authorice Request (without Controller)\n return auth()->user()->role_id === 1;\n }",
"public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }",
"public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }",
"public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }",
"public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n else\n {\n return false;\n }\n }",
"public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }",
"public function authorize()\n {\n return \\Auth::check() ? true : false;\n }",
"public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}",
"public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }",
"public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }",
"public function authorize()\n {\n return !empty(Auth::user());\n }",
"public function authorize()\n {\n return $this->groupHasUser() || $this->hasSeller();\n }",
"public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}",
"public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}",
"public function isAuthorized() {\n\t\t\n\t}",
"public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }",
"public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }",
"public function authorize()\n {\n if (auth()->user()->is_admin) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }",
"public function authorize(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }",
"public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}",
"public function authorize()\n {\n if (Auth::check()) {\n \n return true;\n \n }\n return false;\n }",
"public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }",
"public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }",
"public function authorize()\n {\n if (auth()->check() && auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }",
"public function authorize()\n {\n return $this->auth->check();\n }",
"public function authorize() {\n\t\t$user = \\Auth::user();\n\n\t\tif ( $user->isAdmin() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function authorize()\n {\n if (auth()->user()->isAdmin() || auth()->user()->isCustomer()) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n return $this->container['auth']->check();\n }",
"function isAuthorized($request) {\n return true;\n }",
"public function authorize()\n {\n return Auth::guest() || isMember();\n }",
"public function authorize()\n {\n return auth()->user() && auth()->user()->isCeo();\n }",
"public function authorize(): bool\n {\n $deckId = $this->request->get('deck_id');\n $userId = Deck::whereKey($deckId)->value('user_id');\n\n return $userId === user()->id;\n }",
"public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }",
"public function authorize()\n {\n return TRUE;\n }",
"public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }",
"public function authorize()\n {\n # if it's false, it will rejected\n return true;\n }",
"public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }",
"public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }",
"public function is_authorized() {\n\t\t$authorized = true;\n\t\tif ( $this->is_access_token_expired() ) {\n\t\t\t$authorized = false;\n\t\t}\n\n\t\treturn $authorized;\n\t}",
"public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }",
"public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }",
"public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}",
"public function authorize()\n {\n $idExpense = $this->input('expense');\n $expense = Expense::find($idExpense);\n\n return $expense && $this->user()->id == $expense->user_id;\n }",
"public function authorize()\n {\n // User system not implemented\n return true;\n }",
"public function authorize() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }",
"public function authorize()\n {\n $organizationId = (string) $this->route('id');\n\n $this->organization = Organization::findByUuidOrFail($organizationId);\n\n return $this->user()->can('show', [Organization::class, $this->organization]);\n }",
"public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }",
"public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }",
"public function authorize()\n {\n $current_user = auth()->user();\n $convention = Convention::find($this->route('convention_id'));\n\n // Use ClientPolicy here to authorize before checking the fields\n return $current_user->can('store', Convention::class)\n || $current_user->can('update', $convention);\n }",
"public function authorize()\n {\n if (session()->has('user'))\n {\n $participantController = new ParticipantController();\n\n return !$participantController->isParticipating($this->input('id_user'), $this->input('id_event'));\n }\n else\n {\n return false;\n }\n }",
"public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }"
] | [
"0.8401071",
"0.8377486",
"0.8377486",
"0.8344406",
"0.8253731",
"0.824795",
"0.8213121",
"0.8146598",
"0.81115526",
"0.8083369",
"0.7991986",
"0.79907674",
"0.79836637",
"0.79604936",
"0.79516214",
"0.79494005",
"0.79265946",
"0.7915068",
"0.79001635",
"0.7894822",
"0.7891453",
"0.7890965",
"0.7862504",
"0.78414804",
"0.78414804",
"0.7837965",
"0.78248763",
"0.7812292",
"0.7809632",
"0.77928597",
"0.7788316",
"0.7781619",
"0.77815884",
"0.7763308",
"0.7754035",
"0.7717961",
"0.7717961",
"0.77171147",
"0.77138597",
"0.7705001",
"0.7693082",
"0.7692783",
"0.76915383",
"0.76909506",
"0.76733255",
"0.7667128",
"0.7665592",
"0.7656238",
"0.7650853",
"0.764326",
"0.76431626",
"0.76431614",
"0.7635147",
"0.76311624",
"0.76294273",
"0.7627076",
"0.76207024",
"0.76207024",
"0.76139116",
"0.76036394",
"0.76035625",
"0.76035625",
"0.76032084",
"0.7602515",
"0.76007926",
"0.75971127",
"0.7588128",
"0.7586303",
"0.7581912",
"0.7563037",
"0.7554785",
"0.75526226",
"0.755171",
"0.75436753",
"0.75432944",
"0.7540682",
"0.7538806",
"0.75280696",
"0.751548",
"0.75149626",
"0.7501161",
"0.74959517",
"0.74956346",
"0.74911124",
"0.7489147",
"0.74858016",
"0.748033",
"0.7478443",
"0.7472642",
"0.7472576",
"0.7465409",
"0.7464371",
"0.74630046",
"0.7462218",
"0.7461453",
"0.7449168",
"0.74399257",
"0.74358094",
"0.7433247",
"0.7432659",
"0.74248093"
] | 0.0 | -1 |
Get the validation rules that apply to the request. | public function rules()
{
return [
'order_id' => 'required|array',
'order_id.*' => 'required|exists:orders,id',
'product_code' => 'required|array',
'product_code.*' => 'required|exists:products,code',
'product_color' => 'required|array',
'product_color.*' => 'required',
'product_qtyp' => 'required|array',
'product_qtyp.*' => 'required|numeric',
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }",
"public function getRules()\n {\n return $this->validator->getRules();\n }",
"public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }",
"public function rules()\n {\n return $this->validationRules;\n }",
"public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }",
"public static function getRules()\n {\n return (new static)->getValidationRules();\n }",
"public function getRules()\n {\n return $this->validation_rules;\n }",
"public function getValidationRules()\n {\n return [];\n }",
"public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }",
"public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }",
"public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }",
"protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }",
"public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}",
"public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }",
"public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }",
"public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }",
"function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}",
"public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }",
"public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }",
"protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }",
"public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }",
"public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }",
"protected function getValidRules()\n {\n return $this->validRules;\n }",
"public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }",
"public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }",
"public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }",
"public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }",
"function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}",
"public function rules()\n { \n return $this->rules;\n }",
"public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }",
"public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }",
"public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }",
"public function validationRules()\n {\n return [];\n }",
"public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }",
"function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}",
"public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }",
"public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }",
"public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }",
"public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }",
"public function rules()\n {\n return static::$rules;\n }",
"function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}",
"public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }",
"public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }",
"public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }",
"protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }",
"public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }",
"public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }",
"public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }",
"public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }",
"public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }",
"public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }",
"abstract protected function getValidationRules();",
"public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}",
"public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }",
"public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }",
"public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }",
"public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }",
"public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }",
"public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }",
"public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }",
"public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }",
"public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }",
"public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }",
"public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }",
"public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }",
"public function getValidationRules() : array;",
"public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }",
"public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }",
"public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }",
"public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }",
"public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}",
"public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}",
"public function rules()\n {\n $rules = array();\n return $rules;\n }",
"public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }",
"public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }",
"protected function get_validation_rules()\n {\n }",
"public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }",
"public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }",
"public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }",
"public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }",
"public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }",
"public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }",
"public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }",
"public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }",
"public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }",
"public function defineValidationRules()\n {\n return [];\n }",
"public function rules(Request $request)\n {\n return Qc::$rules;\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }",
"public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }"
] | [
"0.8342703",
"0.80143493",
"0.7937251",
"0.79264987",
"0.79233825",
"0.79048395",
"0.78603816",
"0.7790699",
"0.77842164",
"0.77628785",
"0.7737272",
"0.7733618",
"0.7710535",
"0.7691693",
"0.76849866",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7675849",
"0.76724476",
"0.76665044",
"0.7657698",
"0.7641827",
"0.7630892",
"0.76293766",
"0.7617708",
"0.76102096",
"0.7607475",
"0.7602442",
"0.7598732",
"0.7597544",
"0.75924",
"0.75915384",
"0.7588146",
"0.7581354",
"0.7555758",
"0.755526",
"0.7551423",
"0.7546329",
"0.7541439",
"0.75366044",
"0.75363225",
"0.7530296",
"0.7517988",
"0.75155175",
"0.7508439",
"0.75069886",
"0.7505724",
"0.749979",
"0.7495976",
"0.74949056",
"0.7492888",
"0.7491117",
"0.74901396",
"0.7489651",
"0.7486808",
"0.7486108",
"0.7479687",
"0.7478561",
"0.7469412",
"0.74635684",
"0.74619836",
"0.7461325",
"0.74591017",
"0.7455279",
"0.745352",
"0.7453257",
"0.7449877",
"0.74486",
"0.7441391",
"0.7440429",
"0.7435489",
"0.7435326",
"0.74341524",
"0.7430354",
"0.7429103",
"0.7423808",
"0.741936",
"0.74152505",
"0.7414828",
"0.741382",
"0.74126065",
"0.74105227",
"0.740555",
"0.7404385",
"0.74040926",
"0.74015605",
"0.73905706",
"0.73837525",
"0.73732615",
"0.7371123",
"0.7369176",
"0.73619753",
"0.73554605",
"0.73448825",
"0.7344659",
"0.73427117",
"0.73357755"
] | 0.0 | -1 |
/ / Fixtures / | protected function setUp () : void {
$this->range = IPRange::from("216.66.0.0/18");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setUp()\n\t{\n\t\tparent::setUp();\n if(is_array($this->fixtures)){\n foreach($this->fixtures as $fixtureName=>$modelClass)\n {\n $tableName=WF_Table::model($modelClass)->tableName();\n $this->resetTable($tableName);\n $rows=$this->loadFixtures($modelClass, $tableName);\n if(is_array($rows) && is_string($fixtureName))\n {\n $this->_rows[$fixtureName]=$rows;\n if(isset($modelClass))\n {\n foreach(array_keys($rows) as $alias)\n $this->_records[$fixtureName][$alias]=$modelClass;\n }\n }\n }\n }\n }",
"public function fixtures() \n {\n return [\n 'categories' => CategoryFixture::className(),\n ];\n }",
"public function setUp()\n {\n $this->fixtures('articles');\n }",
"public function setUp() {\n\t\t$options = [\n\t\t\t'db' => [\n\t\t\t\t'adapter' => 'Connection',\n\t\t\t\t'connection' => $this->_connection,\n\t\t\t\t'fixtures' => $this->_fixtures\n\t\t\t]\n\t\t];\n\n\t\tFixtures::config($options);\n\t\tFixtures::save('db');\n\t}",
"public function testFixturesSetup() {\n $this->assertCount(3, $this->databaseDumpFiles);\n }",
"public function setUp()\n {\n $this->loadFixtures([]);\n }",
"public function setUp(){\n \tparent::setUp();\n \t//factory(Category::class)->create();\n \tArtisan::call('migrate:refresh');\n \t$this->seed();\n }",
"abstract protected function getFixtures();",
"public function setupFixtures()\n {\n if ($this->_fixtures === null) {\n $loadedFixtures = [];\n foreach ($this->fixtures() as $fixtureClass) {\n $loadedFixtures[$fixtureClass] = Yii::createObject($fixtureClass);\n }\n\n $this->_fixtures = $loadedFixtures;\n }\n }",
"public function testFixtureLoadOnDemand(): void\n {\n $this->loadFixtures('Categories');\n }",
"protected function getFixtures()\n {\n return array(\n __DIR__ . '/card.yml',\n );\n }",
"public function _fixtures()\n {\n return [\n 'user' => [\n 'class' => BookFixture::class,\n 'dataFile' => codecept_data_dir() . 'book.php'\n ],\n ];\n }",
"protected function postFixtureSetup()\n {\n }",
"protected function getFixtures()\n {\n return array(\n // __DIR__ . '/../../Resources/fixtures/majora_entitys.yml',\n );\n }",
"public function setUp()\n {\n parent::setUp();\n factory('App\\User', 'admin', 1)->create();\n factory(User::class, self::NUMBER_RECORD_CREATE)->create();\n factory(Order::class, self::NUMBER_RECORD_CREATE)->create();\n factory(Category::class, 'parent', self::NUMBER_RECORD_CREATE)->create();\n factory(Category::class, self::NUMBER_RECORD_CREATE)->create();\n factory(Product::class, self::NUMBER_RECORD_CREATE)->create();\n factory(UserInfo::class, self::NUMBER_RECORD_CREATE)->create();\n factory(OrderDetail::class, self::NUMBER_RECORD_CREATE)->create();\n }",
"public function setUp()\n {\n parent::setUp();\n factory(Store::class)->create();\n factory(Category::class, 1)->create();\n factory(Category::class, 1)->states('parent')->create();\n factory(Product::class)->create();\n }",
"public function _fixtures()\n\t{\n\t\treturn [\n\t\t\t'user' => [\n\t\t\t\t'class' => UserFixture::className(),\n\t\t\t\t'dataFile' => codecept_data_dir() . 'login_data.php'\n\t\t\t],\n\t\t\t'models' => [\n\t\t\t\t'class' => ModelsFixture::className(),\n\t\t\t\t'dataFile' => codecept_data_dir() . 'models.php'\n\t\t\t],\n\t\t\t'files' => [\n\t\t\t\t'class' => FilesFixture::className(),\n\t\t\t\t'dataFile' => codecept_data_dir() . 'files.php'\n\t\t\t]\n\n\t\t];\n\t}",
"public function setUp(): void\n {\n parent::setUp();\n $user = factory(User::class)->create();\n // Create album with 5 pictures in each.\n factory(Album::class)->create(['user_id' => $user->id])\n ->each(function ($album) use ($user) {\n $album->pictures()->attach(factory(Picture::class, 5)->create(['user_id' => $user->id]));\n });\n }",
"protected function fixture(){\n $this->clearAll();\n \n $venue_id = $this->createVenue('Pool');\n \n $this->createUser('foo');\n\n\n $seller = $this->createUser('seller');\n \n $evt = $this->createEvent('Barcelona vs Real Madrid', $seller->id, $this->createLocation()->id, date('Y-m-d H:i:s', strtotime('+1 day')));\n $this->setEventId($evt, 'aaa');\n $this->setEventGroupId($evt, '0010');\n $this->setEventVenue($evt, $venue_id);\n $this->setEventOtherTaxes($evt, 'VAT', 17.5, 'barb4d0s');\n $this->catA = $this->createCategory('Category A', $evt->id, 25.00, 100);\n $catB = $this->createCategory('Category B', $evt->id, 10.00);\n $catC = $this->createCategory('Category C', $evt->id, 5.00);\n \n /*\n $loc = $this->createLocation();\n $evt = $this->createEvent('Water March', $this->seller->id, $loc->id, date('Y-m-d H:i:s', strtotime('+1 day')));\n $this->setEventId($evt, 'bbb');\n $this->createCategory('Zamora Branch', $evt->id, 14.00);\n \n $evt = $this->createEvent('Third Event', $this->seller->id, $loc->id, date('Y-m-d H:i:s', strtotime('+1 day')));\n $this->setEventId($evt, 'ccc');\n $this->createCategory('Heaven', $evt->id, 22.50);\n $this->createCategory('Limbo', $evt->id, 22.50);\n \n \n $this->seller = $this->createUser('seller2');\n $loc = $this->createLocation();\n $evt = $this->createEvent('Transformers Con', $this->seller->id, $loc->id, date('Y-m-d H:i:s', strtotime('+1 day')));\n $this->setEventId($evt, 'ttt');\n $this->createCategory('Autobots', $evt->id, 55.00);*/\n }",
"public function _fixtures()\n {\n return [\n 'user' => [\n 'class' => UserFixture::className(),\n 'dataFile' => codecept_data_dir() . 'login_data.php',\n ],\n ];\n }",
"private function determineFixturesPath() {}",
"public function _fixtures()\n {\n return [\n 'user' => [\n 'class' => TicketsFixture::className(),\n 'dataFile' => codecept_data_dir() . 'tickets.php'\n ]\n ];\n }",
"public function setUp()\n {\n parent::setUp();\n factory(Category::class, 17)->create();\n }",
"public function setUp()\n {\n $this->fixtures('unit_tests');\n }",
"public function _fixtures()\n {\n return [\n 'user' => [\n 'class' => AdminUserFixture::class,\n 'dataFile' => codecept_data_dir() . 'admin_user.php',\n ],\n 'auth' => [\n 'class' => AuthItemFixture::class,\n 'dataFile' => codecept_data_dir() . 'auth_data.php',\n ],\n 'auth_child' => [\n 'class' => AuthItemChildFixture::class,\n 'dataFile' => codecept_data_dir() . 'auth_child_data.php',\n ],\n 'authAssignment' => [\n 'class' => AuthAssignmentFixture::class,\n 'dataFile' => codecept_data_dir() . 'auth_assigment_data.php',\n ],\n 'category' => [\n 'class' => CategoryFixture::class,\n 'dataFile' => codecept_data_dir() . 'category_data.php',\n ],\n 'category_company_type' => [\n 'class' => CategoryCompanyTypeFixture::class,\n 'dataFile' => codecept_data_dir() . 'category_company_type_data.php',\n ],\n 'company_type' => [\n 'class' => CompanyTypeFixture::class,\n 'dataFile' => codecept_data_dir() . 'company_type_data.php',\n ],\n\n ];\n }",
"public function setUp()\n {\n $this->reloadSchema();\n $this->reloadDataFixtures();\n }",
"public function setUp()\n {\n $this->fixture = new Finder();\n }",
"protected function setUp()\n {\n $this->fixture = new Record();\n }",
"public function run()\n {\n // $faker = \\Faker\\Factory::create();\n // $faker->addProvider(new \\Bezhanov\\Faker\\Provider\\Commerce($faker));\n\n // factory(App\\Category::class, 8)->create()->each(function($u) {\n // $u->question()\n // ->saveMany(\n // factory(App\\Question::class, rand(1, 5))->make()\n // )\n // ->each(function ($q) {\n // $q->answers()->saveMany(factory(App\\Answer::class, rand(1, 5))->make());\n // });\n // });\n // // $faker->promotionCode; // KillerPromotion257835\n // // $faker->department; // Kids & Games\n // // $faker->department(6); // Games, Industrial, Books & Automotive\n // // $faker->department(3, true); // Jewelry, Music & Shoes\n // $faker->productName; //\n}",
"protected function getFixtures()\n {\n return array(\n __DIR__ . '/../../Resources/fixtures/BlogArticle.yml',\n );\n }",
"public function setup()\n {\n parent::setup();\n \n // Build some fuxture values\n $this->userName = 'fixture';\n $this->firstName = 'Test';\n $this->lastName = 'User';\n $this->email = '[email protected]';\n $this->password = '123123';\n $this->roleName = 'Fixture';\n // Generate the fixture\n $this->createAdminUserFixture(); \n }",
"public function setUp()\n {\n parent::setUp();\n $this->migrate();\n $this->withFactories(__DIR__.'/factories');\n }",
"protected function setupTestEntities() {\n // Create 4 entities with name1 and 3 entities with name2.\n $entity_1 = [\n 'name' => 'name1',\n ];\n\n $this->storage->create($entity_1)->save();\n $this->storage->create($entity_1)->save();\n $this->storage->create($entity_1)->save();\n $this->storage->create($entity_1)->save();\n\n $entity_2 = [\n 'name' => 'name2',\n ];\n $this->storage->create($entity_2)->save();\n $this->storage->create($entity_2)->save();\n $this->storage->create($entity_2)->save();\n }",
"protected function setUp()\r\n {\r\n self::bootKernel();\r\n\r\n //Apply the primer\r\n DatabasePrimer::prime(self::$kernel);\r\n\r\n //Set entity manager\r\n $this->em = DatabasePrimer::$entityManager;\r\n\r\n $fixture = new ProfileFixtures();\r\n $fixture->load($this->em);\r\n }",
"public function testLoadAllFixtures(): void\n {\n $this->loadFixtures();\n $article = $this->getTableLocator()->get('Articles')->get(1);\n $this->assertSame(1, $article->id);\n $category = $this->getTableLocator()->get('Categories')->get(1);\n $this->assertSame(1, $category->id);\n }",
"public function setUp():void\n {\n parent::setUp();\n\n //se crea el primer usuario sin permisos para acceder al sistema\n //segundo usuario que se cree en las pruebas tendra por defecto todos los permisos\n $this->artisan('db:seed');\n }",
"protected function setUp(): void\n {\n \tparent::setUp();\n\n \t$this->authorize();\n\n \t$this->loadFixtures([\n \t\t'product'=>ProductFixture::class\n \t]);\n }",
"public function setUp()\n {\n \tparent::setUp();\n \t$this->seed('UserTableSeeder');\n }",
"public static function loadFixture()\n {\n //include __DIR__ .'/../_files/customer.php';\n include __DIR__ .'/../_files/order_fee_variation.php';\n\n }",
"public function setUp(): void\n {\n $this->fixture = new Finder();\n }",
"protected function setUp(): void\n {\n parent::setUp();\n $this->withFactories(__DIR__.'/Fixtures/Factories');\n $this->loadMigrationsFrom(__DIR__ . '/Fixtures/Migrations');\n require __DIR__.'/Fixtures/routes.php';\n }",
"public function setUp()\n {\n parent::setUp();\n\n $this->accounts = Resistance::factory('\\ActiveCollab\\Resistance\\Test\\Storage\\Accounts');\n $this->users = Resistance::factory('\\ActiveCollab\\Resistance\\Test\\Storage\\Users');\n }",
"protected function setUp(): void\n {\n parent::setUp();\n\n $this->seed(AppACLSeeder::class);\n $this->seed(TestCategorySeeder::class);\n\n $this->createProdut();\n }",
"public function setUp()\n {\n $faker = new Generator();\n $faker->addProvider(new Animals($faker));\n $this->faker = $faker;\n }",
"public function setUp() {\n parent::setUp();\n Artisan::call('migrate:refresh');\n Artisan::call('db:seed');\n }",
"public function setUp(): void\n {\n parent::setUp();\n\n // Create model factories\n $this->models = People::factory()\n ->count(20)\n ->create();\n\n // Add custom factories\n $this->addCustomFactories();\n }",
"public function setUp()\n {\n\n parent::setUp();\n\n $this->entity_type = factory(EntityType::class)->create();\n $this->keyword_type = factory(KeywordType::class)->create();\n $this->entity = factory(Entity::class)->create([\n 'entity_type_id' => $this->entity_type->id\n ]);\n\n $this->account = factory(Account::class)->create([\n 'entity_id' => $this->entity->id,\n ]);\n\n $this->keyword = factory(EntityKeyword::class)->create([\n 'entity_id' => $this->entity->id,\n 'keyword_type_id' => $this->keyword_type->id\n ]);\n\n $this->tweet = factory(Tweet::class)->create([\n 'account_id' => $this->account->id\n ]);\n }",
"public function setUp() {\n\t\t$this->getConnection();\n\t\tforeach($this->fixtureData() as $row) {\n\t\t\t$record = new ExampleSolrActiveRecord();\n\t\t\tforeach($row as $attribute => $value) {\n\t\t\t\t$record->{$attribute} = $value;\n\t\t\t}\n\t\t\t$this->assertTrue($record->save());\n\t\t}\n\t}",
"protected function createFixtures()\n {\n // Due to a dubious bug(?) in doctrine - product types need to be loaded first.\n $typeFixtures = new LoadProductTypes();\n $typeFixtures->load($this->entityManager);\n $this->productType = $this->getProductTypeRepository()->find(self::PRODUCT_TYPE_ID);\n $this->addonProductType = $this->getProductTypeRepository()->find(self::PRODUCT_TYPE_ADDON_ID);\n\n $countries = new LoadCountries();\n $countries->load($this->entityManager);\n\n $this->contactTestData = new ContactTestData($this->container);\n\n $loadCurrencies = new LoadCurrencies();\n $loadCurrencies->load($this->entityManager);\n\n $this->currency = $this->getCurrencyRepository()->findByCode($this->defaultCurrencyCode);\n\n $unitFixtures = new LoadUnits();\n $unitFixtures->load($this->entityManager);\n $this->orderUnit = $this->getProductUnitRepository()->find(self::ORDER_UNIT_ID);\n\n $this->contentUnit = $this->getProductUnitRepository()->find(self::CONTENT_UNIT_ID);\n\n $taxClasses = new LoadTaxClasses();\n $taxClasses->load($this->entityManager);\n $this->taxClass = $this->getTaxClassRepository()->find(self::TAX_CLASS_ID);\n\n $countryTaxes = new LoadCountryTaxes();\n $countryTaxes->load($this->entityManager);\n\n $collectionTypes = new LoadCollectionTypes();\n $collectionTypes->load($this->entityManager);\n\n $mediaTypes = new LoadMediaTypes();\n $mediaTypes->load($this->entityManager);\n\n $attributeTypes = new LoadAttributeTypes();\n $attributeTypes->load($this->entityManager);\n $this->attributeType = $this->getAttributeTypeRepository()->find(self::ATTRIBUTE_TYPE_ID);\n\n $statusFixtures = new LoadProductStatuses();\n $statusFixtures->load($this->entityManager);\n $this->productStatus = $this->getProductStatusRepository()->find(Status::ACTIVE);\n $this->productStatusChanged = $this->getProductStatusRepository()->find(Status::CHANGED);\n $this->productStatusImported = $this->getProductStatusRepository()->find(Status::IMPORTED);\n $this->productStatusSubmitted = $this->getProductStatusRepository()->find(Status::SUBMITTED);\n\n $deliveryStatusFixtures = new LoadDeliveryStatuses();\n $deliveryStatusFixtures->load($this->entityManager);\n }",
"public function setUp()\n {\n $folder = dirname(__DIR__) . '/fixtures';\n\n $this->keyVal(true);\n $this->_mutableLoader = new Loader($folder);\n $this->_immutableLoader = new Loader($folder, true);\n }",
"public function setUp()\n {\n $this->data = array(\n 'folder_name_1' => array(\n 'src' => 'source_1',\n 'dst' => 'destination_1',\n ),\n 'folder_name_2' => array(\n 'src' => 'source_2',\n 'dst' => 'destination_2',\n 'client' => 'test'\n )\n );\n }",
"public function setUp() {\n $this->fixture= new RestJsonSerializer();\n }",
"public function setUp()\n {\n parent::setUp();\n // Create admin\n $this->admin = factory(User::class)->create([\n 'username' => 'admin',\n 'email' => '[email protected]',\n 'password' => '123123',\n 'role' => User::ADMIN_USER,\n 'address' => 'Da Nang',\n 'phone' => '01223499433',\n ]);\n // Create user\n $this->user = factory(User::class)->create([\n 'username' => 'user',\n 'email' => '[email protected]',\n 'password' => '123123',\n 'role' => User::NORMAL_USER,\n 'address' => 'Da Nang',\n 'phone' => '01223499433',\n ]);\n }",
"public static function loadProductFixtures(): void\n {\n include __DIR__ . '/../../../_files/productFixtures.php';\n }",
"public function setUp(): void\n {\n parent::setUp();\n $this->setUpFaker();\n }",
"public function testExample()\n { \n /*\n //テーブルテスト\n $data = [\n 'name' => '111',\n 'email' => '[email protected]',\n ];\n\n //create\n $user = new User(); \n $user->fill($data)->save();\n $this->assertDatabaseHas('users', $data);\n\n //update\n $user->name = 'Dummy';\n $user->save();\n $data['name'] = $user->name = 'Dummy';\n $this->assertDatabaseHas('users', $data);\n\n //serach\n\n //serach_by\n\n //delete\n $user->delete();\n $this->assertDatabaseMissing('users', $data);\n\n //シーダー利用\n $this->seed(DatabaseSeeder::class);\n $user = User::find(1);\n $data = $user->toArray();\n $this->assertDatabaseHas('users', $data);\n\n $user->delete();\n $this->assertDatabaseMissing('users', $data);\n */\n\n //ランダムテスト\n /*\n for ($i = 0; $i < 100; $i ++ ) {\n factory(User::class)->create();\n }\n $count = User::get()->count();\n $user = User::find(rand(1, $count));\n $data = $user->toArray();\n print_r($data);\n\n $this->assertDatabaseHas('users', $data);\n $user->delete();\n $this->assertDatabaseMissing('users', $data);\n */\n\n //ランダムテスト state版\n $list = [];\n for ($i = 0; $i < 10; $i ++ ) {\n $p1 = factory(User::class)->create();\n $p2 = factory(User::class)->states('upper')->create();\n $p3 = factory(User::class)->states('lower')->create();\n $p4 = factory(User::class)->states('upper')->states('lower')->create();\n $list = array_merge($list, [$p1->id, $p2->id, $p3->id, $p4->id]);\n }\n for ($i = 0; $i < 10; $i ++ ) {\n shuffle($list);\n\n $item = array_shift($list);\n $user = User::find($item);\n $data = $user->toArray();\n print_r($data);\n\n $this->assertDatabaseHas('users', $data);\n \n $user->delete();\n $this->assertDatabaseMissing('users', $data);\n\n }\n \n }",
"protected function setUp(): void\n {\n parent::setUp();\n\n $this->seed(TestCategorySeeder::class);\n }",
"public function testGetFixture()\n {\n $this->assertNull(SeederTask::getFixtureFile());\n }",
"public function run()\n {\n $faker = Factory::create();\n Template::factory()->count(500)->has(\n TemplateChecklist::factory()->count(1),\n 'checklist'\n )->has(\n TemplateItem::factory()->count($faker->numberBetween(1, 100)),\n 'items'\n )->create();\n }",
"protected function setUp()\n {\n $this->fixture = new Configuration();\n }",
"public function setUp(): void\n {\n parent::setUp();\n\n $this->createTables();\n }",
"public function setUp(){\n parent::setUp();\n }",
"public function setUp()\n {\n parent::setUp();\n $this->setupDatabase();\n }",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}"
] | [
"0.71607834",
"0.71281236",
"0.7115191",
"0.7110753",
"0.70805305",
"0.707585",
"0.7060482",
"0.7035313",
"0.6984477",
"0.6838064",
"0.6749169",
"0.67430943",
"0.6680036",
"0.666387",
"0.66508746",
"0.6641702",
"0.66233236",
"0.66230315",
"0.65836895",
"0.6583572",
"0.65708894",
"0.65669614",
"0.65635145",
"0.6553838",
"0.6535463",
"0.6533812",
"0.6530789",
"0.6528637",
"0.65080225",
"0.64862597",
"0.6475838",
"0.64591676",
"0.6445468",
"0.6445067",
"0.6440215",
"0.6435191",
"0.6434891",
"0.6423678",
"0.641771",
"0.63893795",
"0.6386413",
"0.63819927",
"0.6310724",
"0.6310031",
"0.62954843",
"0.6294145",
"0.62938505",
"0.6285357",
"0.6284",
"0.6280998",
"0.6276864",
"0.6264016",
"0.62535286",
"0.62532526",
"0.6247164",
"0.6237007",
"0.6233546",
"0.623087",
"0.62199765",
"0.621972",
"0.6219415",
"0.6219242",
"0.6212601",
"0.619786",
"0.619786",
"0.619786",
"0.619786",
"0.619786",
"0.619786",
"0.619786",
"0.619786",
"0.619786",
"0.619786",
"0.619786",
"0.619786",
"0.619786",
"0.619786",
"0.61973834",
"0.61973834",
"0.61973834",
"0.61973834",
"0.61973834",
"0.61973834",
"0.61973834",
"0.61973834",
"0.61973834",
"0.61973834",
"0.61973834",
"0.61973834",
"0.61973834",
"0.61973834",
"0.61973834",
"0.6197105",
"0.6197105",
"0.61970377",
"0.61970377",
"0.61970377",
"0.61970377",
"0.61970377",
"0.61970377",
"0.61970377"
] | 0.0 | -1 |
/ / Tests / | public function testGetBase () : void {
$this->assertEquals("216.66.0.0", $this->range->getBase());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testBasicTest()\n {\n\n }",
"public function run_tests()\n {\n }",
"private static function test()\n {\n $files = ['TestCase'];\n $folder = static::$root.'Testing'.'/';\n\n self::call($files, $folder);\n }",
"public static function get_tests()\n {\n }",
"public function preTest() {}",
"function test(){\r\n //placeholder for future test functions\r\n }",
"public function testGetExpert()\n {\n }",
"public function testExample()\n {\n }",
"public function appTests()\n {\n }",
"public function test() {\n\n\t}",
"function test_all () {\n\n\t\t$this->layout = 'test';\n\n\t\t$tests_folder = new Folder('../tests');\n\n\t\t$results = array();\n\t\t$total_errors = 0;\n\t\tforeach ($tests_folder->findRecursive('.*\\.php') as $test) {\n\t\t\tif (preg_match('/^(.+)\\.php/i', basename($test), $r)) {\n\t\t\t\trequire_once($test);\n\t\t\t\t$test_name = Inflector::Camelize($r[1]);\n\t\t\t\tif (preg_match('/^(.+)Test$/i', $test_name, $r)) {\n\t\t\t\t\t$module_name = $r[1];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$module_name = $test_name;\n\t\t\t\t}\n\t\t\t\t$suite = new TestSuite($test_name);\n\t\t\t\t$result = TestRunner::run($suite);\n\n\t\t\t\t$total_errors += $result['errors'];\n\n\t\t\t\t$results[] = array(\n\t\t\t\t\t'name'=>$module_name,\n\t\t\t\t\t'result'=>$result,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t$this->set('success', !$total_errors);\n\t\t$this->set('results', $results);\n\t}",
"public function setUp(){\n $this->testCases = Files::listFilesInFolder(__DIR__.\"/../../examples/sections/components\",\"ExamplePanel.php\");\n }",
"protected function test9() {\n\n }",
"public function testGetAll() {\n }",
"public function getTests();",
"public function preTesting() {}",
"public function _TestMultipleFiles()\n {\n\n }",
"public function testMain()\n {\n echo \"\\n >----------- Test Main : ---------> \\n\";\n// $this->getRandomNumber();\n// $this->getLoggedUserMail();\n// $this->saveVerificationCode();\n// $this->verification();\n// $this->checkEmailVerification();\n// $this->checkSendCode();\n }",
"function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite(__CLASS__);\n\t\t$result = PHPUnit_TextUI_TestRunner::run($suite);\n\t}",
"function test_sample() {\n\n\t\t$this->assertTrue( true );\n\n\t}",
"static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}",
"static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}",
"static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}",
"static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}",
"static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}",
"static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}",
"public function testGetUnitDetails()\n {\n }",
"public function testGetFolders()\n {\n\n }",
"public function test_method()\n\t{\n\n\t}",
"public function test()\n {\n $this->executeScenario();\n }",
"function setUp()\n {\n }",
"public function testGetSurvey0()\n {\n }",
"public function testGetSurvey0()\n {\n }",
"static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite(__CLASS__);\n\t\t$result = PHPUnit_TextUI_TestRunner::run($suite);\n\t}",
"function runTests() {\n\tAssertFileMatches('The.Tv.Show.S24E13.720p.HDTV.X264-GROUPNAME.torrent');\n\tAssertFileMatches('Another.Tv.Show.S11E13.720p.HDTV.X264-GROUPNAME.torrent');\n\tAssertFileDoesNotMatch('boring.tv.show.torrent');\n}",
"public function testSomething()\n {\n }",
"protected function _initTest(){\n }",
"function setUp() {\n }",
"public function testIndex()\n {\n\n\n\n\n\n }",
"public static function main() \n {\n require_once \"PHPUnit/TextUI/TestRunner.php\";\n\n $suite = new PHPUnit_Framework_TestSuite(\"Zend_Filter_Word_UnderscoreToPathSeparatorTest\");\n $result = PHPUnit_TextUI_TestRunner::run($suite);\n }",
"public function testInit()\n {\n\n }",
"public function getTestDirectory();",
"public function testGetSuperfunds()\n {\n }",
"public function testRuns()\n {\n $this->assertTrue(true);\n }",
"public function testGetSurveys0()\n {\n }",
"public function testGetSurveys0()\n {\n }",
"public function testGetSuperfund()\n {\n }",
"public function testFight()\n {\n }",
"public function testGetOrderFiles()\n {\n }",
"function test_sample() {\n\t\t$this->assertTrue( true );\n\t}",
"public function testGetSite()\n {\n }",
"function testSample() {\n\t\t$this->assertTrue( true );\n\t}",
"public function testGetItemSubCategoryFiles()\n {\n }",
"public function testFindFiles()\n {\n\n }",
"public function testGetTasks()\n {\n\n }",
"public static function main()\n {\n $suite = new PHPUnit_Framework_TestSuite(\"Zend_View_Helper_FormImageTest\");\n $result = PHPUnit_TextUI_TestRunner::run($suite);\n }",
"public function testGetSnippet()\n {\n\n }",
"public function testGetSurveyQuestions0()\n {\n }",
"public function testGetSurveyQuestions0()\n {\n }",
"function setUp() {\n\t\t\n\t}",
"function setUp() {\n\t\t\n\t}",
"public function testGetPackingPlanFiles()\n {\n }",
"public function testGetTasks()\n {\n }",
"public function testGetSubTasks()\n {\n }",
"public function testGetPatrimonio()\n {\n }",
"public function testGetContador()\n {\n }",
"public function AllTests() {\n $this->TestSuite('All tests');\n }",
"function runTests() {\n\t\tif(is_array($this->_aTests)){\n\t\t\tforeach($this->_aTests as $test){\n\t\t\t\t$this->_aResults[$test->sName] = array();\n\t\t\t\t$this->_aResults = $test->run($this->_aResults);\n\n\t\t\t}\n\t\t}\n\t}",
"private function runTests(){\n $process = new Process(['./vendor/bin/phpunit --filter '.$this->params['model_name'].'Test']);\n $process->start();\n foreach($process as $type => $data){\n if($process::OUT !== $type){\n $this->error($data);\n continue;\n }\n $this->info($data);\n }\n }",
"public function testGetTemplate()\n {\n\n }",
"public function testGetTimelogsForFolder()\n {\n\n }",
"public function test()\n {\n }",
"public function test()\n {\n }",
"function setUp()\n\t{\n\t}",
"public function testSpecial(): void {\n\t}",
"private function _test_exec() {\n\t\t// pro kazdy jeden testovaci soubor\n\t\tforeach ($this->_dirs as $name => $dir) {\n\t\t\tforeach ($dir as $index => $test) {\n\t\t\t\t// pro kazdou cestu proved test\n\t\t\t\t$test_ret = $this->_test_single_test($test[0], $test[1]);\n\t\t\t\t// vysledek testu uloz\n\t\t\t\t$this->_dirs[$name][$index][1] = $test_ret;\n\t\t\t}\n\t\t}\n\n\t\t$this->_test_render();\n\t}",
"function test0()\n {\n $this->assertTrue(true);\n }",
"public function testHome_controller()\r\n\t{\r\n\t\t\t\r\n\t\t\r\n\t\t$this->unit->run ( multiply ( 2, 4 ), 8, \"testing_multiply_function\" );\r\n\t\t$this->unit->run ( subtract ( 9, 5 ), 4, \"testing_subtract_function\" );\r\n\t\t\r\n\t\techo $this->unit->report ();\r\n\t}",
"public function testGetPayrun()\n {\n }",
"public function setUp();",
"public static function main()\n {\n require_once \"PHPUnit/TextUI/TestRunner.php\";\n\n $suite = new PHPUnit_Framework_TestSuite(\"Zend_View_Helper_HtmlFlashTest\");\n PHPUnit_TextUI_TestRunner::run($suite);\n }",
"function main(tiny_api_Cli $cli)\n{\n $cli->header('Unit Tests');\n\n $unit_test_file = $cli->get_arg('unit-test-file');\n if (!empty($unit_test_file))\n {\n if (!is_file($unit_test_file))\n {\n $cli->error(\"Could not find file \\\"$unit_test_file\\\"!\");\n exit(1);\n }\n\n $utm = tiny_api_Unit_Test_Manager::make($cli)\n ->disable_tap()\n ->disable_stop_on_failure()\n ->execute(array($unit_test_file))\n ->print_summary();\n }\n else\n {\n exec(\"/usr/bin/find \"\n . getcwd()\n . \" -name \\\"*.php\\\" | /bin/grep \\\"/tests/\\\"\",\n $files, $retval);\n\n $utm = tiny_api_Unit_Test_Manager::make($cli)\n ->execute($files)\n ->print_summary();\n }\n}",
"public function testGetGlobalTemplate()\n {\n\n }",
"public function testGetTimelogs()\n {\n\n }",
"protected function createTests() :void\n {\n $directory = app_path('tests');\n\n Storage::makeDirectory($directory, true);\n PhpUnit::create('phpunit', app_path());\n }",
"public function testGetExpedicao()\n {\n }",
"static function main() {\n $suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n PHPUnit_TextUI_TestRunner::run( $suite);\n }",
"static function main() {\n $suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n PHPUnit_TextUI_TestRunner::run( $suite);\n }",
"public static function main()\n {\n $suite = new PHPUnit_Framework_TestSuite('Tinebase_NotesTest');\n PHPUnit_TextUI_TestRunner::run($suite);\n }",
"public function testGetFile()\n {\n\n }",
"public function testGetAuthorizationDivisionsHome()\n {\n }",
"public function testGetVendorComplianceSurveyFiles()\n {\n }",
"public function testGetUsers()\n {\n }",
"public function testGetPayruns()\n {\n }",
"public static function main() \n {\n require_once \"PHPUnit/TextUI/TestRunner.php\";\n\n $suite = new PHPUnit_Framework_TestSuite(\"Zend_Filter_Word_UnderscoreToSeparatorTest\");\n $result = PHPUnit_TextUI_TestRunner::run($suite);\n }",
"public function testGetSettings()\n {\n }",
"public function testAddItemSubCategoryFile()\n {\n }",
"function cork_test()\n\t{\n\t}",
"public static function main()\n {\n $suite = new PHPUnit_Framework_TestSuite('Tinebase_ImageHelperTest');\n PHPUnit_TextUI_TestRunner::run($suite);\n }",
"public function testGetChamado()\n {\n }",
"public function test_listSettings() {\n\n }"
] | [
"0.73162836",
"0.730368",
"0.712729",
"0.70596766",
"0.70554894",
"0.69886196",
"0.6986688",
"0.69600177",
"0.69174826",
"0.6908079",
"0.690172",
"0.6848736",
"0.6839514",
"0.68180716",
"0.6818071",
"0.6804616",
"0.6801958",
"0.67977554",
"0.67827606",
"0.6745591",
"0.67433757",
"0.67433757",
"0.67433757",
"0.67433757",
"0.67433757",
"0.67433757",
"0.67342067",
"0.67130744",
"0.6704086",
"0.66990876",
"0.6695399",
"0.66873646",
"0.66873646",
"0.6672269",
"0.6666676",
"0.66551757",
"0.66432333",
"0.66362995",
"0.6633945",
"0.66327345",
"0.6628668",
"0.6612151",
"0.6609909",
"0.66085976",
"0.66035897",
"0.66035897",
"0.6589183",
"0.65865",
"0.6585548",
"0.6570457",
"0.656663",
"0.6562369",
"0.65499854",
"0.65497136",
"0.65483314",
"0.6543414",
"0.65356743",
"0.65349287",
"0.65349287",
"0.6532155",
"0.6532155",
"0.6528485",
"0.65261644",
"0.6524215",
"0.652402",
"0.6522383",
"0.6513315",
"0.6509021",
"0.650801",
"0.6506771",
"0.6472265",
"0.6464533",
"0.6464533",
"0.64629066",
"0.6458161",
"0.6457745",
"0.64536536",
"0.64493793",
"0.6438771",
"0.64326197",
"0.6426629",
"0.6423761",
"0.6412507",
"0.6405869",
"0.6401405",
"0.64012635",
"0.6399558",
"0.6399558",
"0.6399306",
"0.639195",
"0.63833964",
"0.6376482",
"0.6370967",
"0.6368476",
"0.6366882",
"0.6366052",
"0.6365759",
"0.63650274",
"0.6364332",
"0.63601375",
"0.6355559"
] | 0.0 | -1 |
Creates a new Instance of this Exception | public static function occurred(array $context): self
{
return new RequestException(
"There was an error requesting the Model",
500,
null,
$context
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function makeException()\n {\n $this->thrownException = ResponseException::create($this);\n }",
"public function create()\n {\n throw new Exception('Not yet implemented');\n }",
"public function __construct()\n {\n throw new Exception('This class is not intended to be instantiated.');\n }",
"public function Create()\n\t\t{\n\t\t\tthrow new Exception('Create object not supported');\n\t\t}",
"public static function create(int $code, ServerRequestInterface $request, ?Throwable $previous=null): self {\n\t\tif (!in_array($code, array_keys(self::EXC_INFO))) {\n\t\t\t$code = 0;\n\t\t}\n\t\t$message = self::EXC_INFO[$code]['name'];\n\t\t$e = new self($message, $code, $previous);\n\t\t$e->request = $request;\n\t\treturn $e;\n\t}",
"public function __construct()\n {\n $this->exceptions = new ObjectStorage();\n }",
"public function __construct( Exception $e )\n {\n $this->exception = $e;\n parent::__construct( $e->getMessage() );\n }",
"public function __construct(\\Exception $exception)\n {\n parent::__construct($exception->getMessage(), $exception->getCode(),\n $exception);\n\n $this->file = $exception->getFile();\n $this->line = $exception->getLine();\n $this->type = get_class($exception);\n }",
"function __construct($exception) {\n $this->exception = $exception;\n }",
"public static function createFromException(\\Throwable $e) {\n while ($e) {\n if ($e instanceof EnforcedResponseException) {\n return new static($e->getResponse());\n }\n\n $e = $e->getPrevious();\n }\n }",
"function __construct() {\n\t\t$this->exception_method = [];\n\t\tparent::__construct();\n\t\t\n\t}",
"public static function createFromException(string $message, Throwable $exception): self\n {\n return new static($message, $exception->getCode(), $exception->getFile(), $exception->getLine(), $exception);\n }",
"public static function makeException($message = \"\", $code = 0, $previous = NULL) {\n $trace = debug_backtrace();\n\n $callingClass = '';\n if (!empty($trace[1]['class'])) {\n $callingClass = $trace[1]['class'];\n }\n\n $excClassName = self::getExceptionClass($callingClass);\n\n return new $excClassName($message, $code, $previous);\n }",
"public function toException()\n {\n if ($this->failed()) {\n return new RequestException($this);\n }\n }",
"public function __construct($message = \"\", $code = 0, Exception $previous = null)\n {\n parent::__construct($message, $code, $previous);\n $exception = new \\App\\Exception();\n $exception -> message = $message;\n $exception -> code = (int)$code;\n $exception -> type = 'exception';\n $exception -> trace = $this->getTraceAsString();\n $exception -> save();\n }",
"public static function getInstance(): ExceptionDistributor\n {\n if (!self::$instance) {\n self::$instance = new self();\n }\n\n return self::$instance;\n }",
"public function getException();",
"public function __construct($title, $message, $template = false)\n {\n Exception::__construct($message);\n\n $this->code = $title;\n\n if ($template !== false) {\n $this->template = $template;\n }\n }",
"public function catchException()\n {\n // get the current exception\n $e = $this->getException();\n\n // throw a copy, with the original as the previous exception so that\n // we can see a full trace.\n $class = get_class($e);\n throw new $class($e->getMessage(), $e->getCode(), $e);\n }",
"public function asIssue()\n\t{\n\t\t$this->severity = 'error';\n\t\t$this->cannotClose();\n\t\treturn $this;\n\t}",
"public static function factory($exceptions = TRUE)\n\t{\n\t\treturn new Email($exceptions);\n\t}",
"public function storageSerializerFactoryNewInstanceException(IntegrationTester $I)\n {\n $I->wantToTest('Storage\\SerializerFactory - newInstance() - exception');\n\n $name = uniqid();\n $I->expectThrowable(\n new Exception('Service ' . $name . ' is not registered'),\n function () use ($name) {\n $serializer = new SerializerFactory();\n $adapter = new AdapterFactory($serializer);\n\n $service = $adapter->newInstance($name);\n }\n );\n }",
"function __toString() {\n\t\treturn \"Exception\";\n\t}",
"public function __construct(Exception $exception)\n {\n $this->exception = get_class($exception);\n $this->message = $exception->getMessage();\n $this->code = $exception->getCode() ? $exception->getCode() : 400;\n }",
"public function __construct () {\n\t\tthrow Exception::thrown(\"Not implemented for this platform\");\n\t}",
"public function __construct($exception)\n {\n $this->exception = $exception;\n }",
"function __construct($code, $append=null, &$msgs=null)\n\t{\n\t\tif($msgs === null)\n\t\t{\n\t\t\t$msgs = array();\n\t\t}\n\n\t\tif(array_key_exists($code, $msgs))\n\t\t{\n\t\t\t// massage message string\n\t\t\t$message = $msgs[$code];\n\t\t\t$append = $append ? ': ' . $append : '';\n\t\t\t$message .= $append . '.';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$message = 'An unknown exception occured.';\n\t\t}\n\n\t\t// pass the fixed-up data to the parent Exception construct\n\t\tparent::__construct($message, $code);\n\t}",
"public function __construct(GuzzleException $e)\n {\n $this->e = $e;\n }",
"public function __construct(Exception $exception)\n {\n $this->exception = $exception;\n }",
"public function createInstance()\n {\n $mock = $this->getMockBuilder(static::TEST_SUBJECT_CLASSNAME)\n ->getMockForTrait();\n $mock->method('__')\n ->will($this->returnArgument(0));\n $mock->method('_createInvalidArgumentException')\n ->will($this->returnCallback(function ($message) {\n return new InvalidArgumentException($message);\n }));\n\n return $mock;\n }",
"private function __construct()\n {\n throw new RuntimeException(\"Can't get there from here\");\n }",
"public function __construct($e) {\n\t\tif (!$e instanceof \\Exception && !$e instanceof \\Throwable) {\n\t\t\tthrow new InvalidArgumentException('Stack Trace Printer requires throwable to be passed, received ' . get_class($e), 1806031136);\n\t\t}\n\t\t\n\t\t$this->exception = $e;\n\t}",
"public function __construct($message, $class = null, $line = 0, $code = 0) {\n\t\t// First thing to do is set the Exception message\n\t\tif (empty($message)) {\n\t\t\t$message = 'And unknown exception is being reported by the SPARK library';\n\t\t}\n\t\t\n\t\t// Instantiate the base PHP Exception object\n\t\tparent::__construct($message);\n\t\t\n\t\t// Set the exception object properties\n\t\t$this->code = $code;\n\t\t$this->class = $class;\n\t\t$this->file = str_replace('_', '/', $class) . '.php'; // Easy file path builder\n\t\t$this->line = $line;\n\t}",
"public static function fromThrowable(\\Exception $exception, $data = null) {\n return new static($data, $exception->getMessage(), $exception->getCode(), $exception);\n }",
"public function __construct(){\n throw new Exception(\"Cannot instantiate this class. Please use the static methods validateLogin() and logout() instead.\");\n }",
"public function newInstance()\n {\n return new self();\n }",
"public function __construct($exceptions = false)\n {\n }",
"public static function create() {}",
"public static function create() {}",
"public static function create() {}",
"public static function reflectionFailure(string $entity, ReflectionException $previousException): self\n {\n return new self(sprintf('An error occurred in %s', $entity), 0, $previousException);\n }",
"public function filterTagFactoryNewInstanceException(UnitTester $I)\n {\n $I->wantToTest('Tag\\TagFactory - newInstance() - exception');\n\n $I->expectThrowable(\n new SupportException('Service unknown is not registered'),\n function () {\n $escaper = new Escaper();\n $factory = new TagFactory($escaper);\n $service = $factory->newInstance('unknown');\n }\n );\n }",
"function __construct($class, $method, $message)\n\t{\n\t\tparent::__construct($message);\n\n\t\t// Assign custom exception data.\n\t\t$this->_class = $class;\n\t\t$this->_method = $method;\n\t\t$this->_string = \"[$class - $method()]: $message\";\n\t\t$this->_time = time();\n\t}",
"public static function create(ResponseInterface $response) {\n $error_data = static::getErrorData($response);\n if (in_array(\n $error_data['error_subcode'], array(458, 459, 460, 463, 464, 467))\n || in_array($error_data['code'], array(100, 102, 190))\n || $error_data['type'] === 'OAuthException') {\n\n return new AuthorizationException($response);\n } elseif (in_array($error_data['code'], array(1, 2))) {\n\n return new ServerException($response);\n } elseif (in_array($error_data['code'], array(4, 17, 341))) {\n\n return new ThrottleException($response);\n } elseif ($error_data['code'] == 506) {\n\n return new ClientException($response);\n } elseif ($error_data['code'] == 10\n || ($error_data['code'] >= 200 && $error_data['code'] <= 299)) {\n\n return new PermissionException($response);\n } else {\n\n return new self($response);\n }\n }",
"static public function exception($class, $message = '', $code = 0)\n {\n $class = (string) $class;\n\n self::loadClass($class);\n\n $exception = new $class($message, $code);\n\n if (!$exception instanceof Exception) {\n throw new Zend_Exception('Invalid exception class used in Zend::exception()');\n }\n\n return $exception;\n }",
"public function createImportLog()\n {\n $class = $this->getClass();\n $ImportLog = new $class;\n\n return $ImportLog;\n }",
"public static function fromException(Throwable $exception, array $parameters = []): self\n {\n return new self(\n $exception::class,\n $exception->getMessage(),\n $exception->getCode(),\n $parameters,\n self::buildTrace($exception)\n );\n }",
"static function create(): self;",
"final private function __construct()\n {\n throw new Exception( 'Enum and Subclasses cannot be instantiated.' );\n }",
"public function create(){\r\n\treturn new $this->class();\r\n }",
"public function createInstance()\n {\n $mock = $this->mock(static::TEST_SUBJECT_CLASSNAME)\n ->getMessage();\n\n return $mock->new();\n }",
"public function __toString()\n\t{\n\t\treturn Rest_Exception::text($this);\n\t}",
"public function setExceptionClass($className){\n $this->exceptionClass = $className;\n return $this;\n }",
"public function testCreatedException()\n {\n $this->expectException(DomainException::class);\n County::create('County One',0, 200);\n }",
"public static function newInstance()\n {\n $instance = new self;\n return $instance;\n }",
"public function createData() {\n\t\t\tthrow new \\Exception('Not supported yet.'); \n\t\t}",
"public function createChild()\n {\n if (!$this->id) {\n throw new Exception(sprintf('Cannot create a new child entity for a non-existent %s entity', $this->getName()));\n }\n $child = $this->_model->create($this->getName());\n $child->Parent = $this;\n\n return $child;\n }",
"public function new()\n\t{\n\t\t//\n\t}",
"public function new()\n\t{\n\t\t//\n\t}",
"public function newInstance();",
"public function newInstance();",
"protected function requestExceptionWithResponse()\n {\n $exception = function ($request) {\n return new RequestException(\n 'test',\n $request,\n Litecoin\\LitecoindResponse::createFrom($this->rawTransactionError())\n );\n };\n\n return $exception;\n }",
"public function setException(\\Exception $exception)\r\n\t{\r\n\t\t$this->_exception = $exception;\r\n\t\t$this->_status = false;\r\n\t\treturn $this;\r\n\t}",
"private function __clone() {\n throw new Exception('No se puede clonar');\n }",
"final public function __construct()\n {\n throw new \\LogicException();\n }",
"public function createInstance()\n {\n $mock = $this->getMockForTrait(static::TEST_SUBJECT_CLASSNAME);\n $mock->method('_createInvalidArgumentException')\n ->will($this->returnCallback(function ($message = null) {\n return $this->createInvalidArgumentException($message);\n }));\n $mock->method('__')\n ->will($this->returnArgument(0));\n\n return $mock;\n }",
"public function __construct() {\n\t\tprint( 'Constructor ExempleHeritageBBBBBBBBBBBBB called' . PHP_EOL );\n\t\treturn;\n\t}",
"public static function invalid(): self\n {\n return self::getInstance('INVALID');\n }",
"public static function create() {\n\t\treturn new self();\n\t}",
"public function __construct($name = 'main', $start_index = 1)\n {\n if (isset(self::$instances[$name]))\n {\n throw new Exception ('An instance with name '.$name.' already exists');\n }\n\n $this->index = $start_index;\n self::$instances[$name] = $this;\n }",
"protected function __construct(\\Exception $e, array $options)\n\t{\n\t\t$this->public_key = $options['publickey'];\n\n\t\tparent::__construct($e, $options);\n\t}",
"public function create(Request $request)\n {\n throw new Exception(\"Error Processing Request\", 1);\n \n }",
"public static function lastError()\n {\n return new static(openssl_error_string());\n }",
"public function __construct(Exception $previous = null, $headers = [], $code = 0)\n {\n $message = 'EXCEPTION_EXOTEL_CONFIG_EXCEPTION';\n parent::__construct(400, $message ?: 'You have some exotel exception.', $previous, $headers, $code);\n }",
"public static function create()\n\t\t{\n\t\t\treturn new self();\n\t\t}",
"public function __toString() {\n return K_Exception::text( $this );\n }",
"public static function missinglogic($message)\n {\n return new static(\"Error exception:\\t\".$message);\n }",
"function getException() {\n\t\treturn $this->Exception;\n\t}",
"public function __construct($exceptionCode, $extendedMessage = '')\n {\n $message = \"\";\n switch ($exceptionCode)\n {\n case self::EX_NOCONTEXT:\n $message = \"Context was not initialized. HttpContext::initialize() needs to be called before proper request handling.\";\n break;\n case self::EX_KEYNOTFOUND:\n $message = \"The key was not found.\";\n break;\n case self::EX_SINGLETONINSTANCE:\n $message = \"Cannot create instance of an ISingleton. Use the getInstance() method instead.\";\n break;\n case self::EX_INVALIDOFFSET:\n $message = \"Invalid offset. Offsets must be non-negative integers and less than the size of the collection.\";\n break;\n case self::EX_INVALIDKEY:\n $message = \"Invalid key. Keys must be non-empty strings.\";\n break;\n case self::EX_NOTIMPLENTED:\n $message = \"The method is unsupported as it has not yet been implemented.\";\n break;\n case self::EX_READONLYCOLLECTION:\n $message = \"Unable to modify the colletion because it is read-only.\";\n break;\n case self::EX_INVALIDPARAMETER:\n $message = \"The parameter is invalid.\";\n break;\n case self::EX_INVALIDMETHODCALL:\n $message = \"The method is unsupported or the operation is invalid in the current state of the object.\";\n break;\n case self::EX_CLASSNOTFOUND:\n $message = \"The class was not found.\";\n break;\n case self::EX_INVALIDOPERATION:\n $message = \"The operation is invalid in the current state of the object.\";\n break;\n case self::EX_DBCONNECTION:\n $message = \"Cannot connect to database server.\";\n break;\n case self::EX_QUERYEXECUTE:\n $message = \"Cannot execute query.\";\n break;\n case self::EX_READONLYADAPTER:\n $message = \"Table adapter is derived from a read-only database object.\";\n break;\n case self::EX_DBPROVIDERNOTFOUND:\n $message = \"Database provider is not supported.\";\n break;\n case self::EX_DUPLICATEDKEY:\n $message = \"Duplicate key entry.\";\n break;\n case self::EX_MEMBERSHIPUSER:\n $message = \"Membership user operation failed.\";\n break;\n case self::EX_MEMBERSHIPROLE:\n $message = \"Membership role operation failed.\";\n break;\n case self::EX_MAILCONNECTION:\n $message = \"Connection to mail server failed.\";\n break;\n case self::EX_MAILLOGIN:\n $message = \"Invalid login information.\";\n break;\n default:\n $message = \"An unknown exception was thrown.\";\n break;\n }\n \n parent::__construct($message . \" \" . $extendedMessage, $exceptionCode);\n }",
"protected function initLogFileObject() {\n return new ErrorLogFile();\n }",
"public static function factory()\n {\n $driver = \"XML\";\n $options = array(\n \"filename\" => Ilib_Countries_Translation::getFilePath(),\n \"save_on_shutdown\" => true\n );\n $translation = Translation2::factory($driver, $options);\n if (PEAR::isError($translation)) {\n throw new Exception($translation->getMessage());\n }\n \n return $translation;\n }",
"public function createEvent()\n {\n return new Event();\n }",
"final public function __construct() { throw new WeeboException(\"Cannot instantiate static class!\"); }",
"public function __construct()\n {\n $classname = $this->getBankName();\n\n $info = ExchangeRateGrabberInfo::find()->where(['name' => $classname])->one();\n\n if (empty($info)) {\n throw new \\Exception(\"broken class: metadata for $classname not found\");\n }\n\n $this->info = $info->attributes;\n }",
"public function create()\n {\n throw new LogicException('Invalid call to \"create\" method. Need to call the \"instance\" method.');\n }",
"protected function setErrorException(\\Exception $e) {\n\t\t$this->lastException = $e;\n\t\treturn $this;\n\t}",
"public static function unknownError(): self {\n\t\treturn new static(101);\n\t}",
"public function create() {}",
"public function create(){}",
"public function constructWithInvalidView()\n {\n $server = new OAuth2\\Server(new Storage\\Memory([]), [], []);\n new ReceiveCode($server, new \\StdClass());\n }",
"public function __construct($message, $code = 0, Exception $previous = null) {\n parent::__construct($message, $code, $previous);\n\t\tlogExcepMessage(\"../log/exceptionLog.txt\",$message);\n }",
"public static function create(): self\n {\n return new self();\n }",
"public static function create(): self\n {\n return new self();\n }",
"protected function create() {\n\t}",
"protected function prepareException(Exception $e)\n {\n if ($e instanceof AuthorizationException) {\n $e = new HttpException(403, $e->getMessage());\n }\n\n return $e;\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }"
] | [
"0.7183871",
"0.6969446",
"0.6225343",
"0.6150776",
"0.61459947",
"0.6103415",
"0.60607654",
"0.6055027",
"0.6034815",
"0.6024999",
"0.5974546",
"0.59155774",
"0.5908322",
"0.59035397",
"0.5843574",
"0.58402526",
"0.5827022",
"0.5786861",
"0.5777891",
"0.57568276",
"0.5752584",
"0.5711141",
"0.57110095",
"0.57079417",
"0.5662073",
"0.5635221",
"0.5625785",
"0.5624281",
"0.560192",
"0.55954295",
"0.5593996",
"0.5593942",
"0.5585408",
"0.55725294",
"0.5561857",
"0.5558206",
"0.5557569",
"0.55566436",
"0.55566436",
"0.55566436",
"0.5541158",
"0.5530507",
"0.5520099",
"0.54819155",
"0.547082",
"0.5469594",
"0.54611295",
"0.54558265",
"0.5446143",
"0.54420435",
"0.5433798",
"0.5430536",
"0.54279196",
"0.54270244",
"0.54231817",
"0.5417773",
"0.5412179",
"0.539513",
"0.539513",
"0.53850716",
"0.53850716",
"0.53822994",
"0.5378047",
"0.5376431",
"0.5372365",
"0.53722376",
"0.536504",
"0.53606",
"0.53600687",
"0.53549796",
"0.5348422",
"0.53460485",
"0.53438926",
"0.53434473",
"0.5339834",
"0.5337564",
"0.5332719",
"0.53146255",
"0.53096193",
"0.5308824",
"0.5307896",
"0.5302071",
"0.52949125",
"0.5294591",
"0.52918375",
"0.5291335",
"0.52742356",
"0.52689135",
"0.5264725",
"0.5261907",
"0.52607274",
"0.52584344",
"0.52584344",
"0.52576154",
"0.52550304",
"0.5246604",
"0.5246604",
"0.5246604",
"0.5246604",
"0.5246604",
"0.5246604"
] | 0.0 | -1 |
Show a postcode resource. | public function show(string $postcode, string $houseNumber, string $houseNumberAddition = null): JsonResponse
{
try {
$address = $this->addressService->search(str_replace(' ', '', $postcode), (int)$houseNumber, $houseNumberAddition);
return response()->json($address);
} catch (\Exception $e) {
abort($e->getCode(), $e->getMessage());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Code $code)\n {\n //\n }",
"public function show(Code $code)\n {\n //\n }",
"public function get($postcode);",
"public function show(Access_Code $access_Code)\n {\n //\n }",
"public function showAction($code = null)\n {\n $profile = 'long';\n $movie = $this->helper->movie($code, $profile );\n\n return $this->render('CinheticPublicBundle:Api:show.html.twig', array(\n 'entity' => $movie,\n ));\n }",
"public function show(PromoCode $promoCode)\n {\n //\n }",
"public function get($postcode = NULL) {\n\n $results = $this->paymentsService->forPostcode($postcode);\n\n return new ResourceResponse($results, 200);\n }",
"public function show(Address $address)\n\t{\n\t\t//\n\t}",
"public function show(Address $address)\n {\n //\n }",
"public function show(Address $address)\n {\n //\n }",
"public function show(Address $address)\n {\n //\n }",
"public function show( Post $post )\n {\n //\n }",
"public function show(Postcard $postcard)\n {\n //\n }",
"public function getPostcode();",
"public function show(PaketDetail $paketDetail)\n {\n }",
"public function show(Province $province)\n {\n //\n }",
"public function show(Pengeluaran $pengeluaran)\n {\n //\n }",
"public function showQrCode()\n {\n $this->app->qrCode->show($this->app->config['server.qr_uuid']);\n }",
"public function show(Post $post)\n {\n \n }",
"public function show(Post $post)\n {\n //\n }",
"public function show(Post $post)\n {\n //\n }",
"public function show(Post $post)\n {\n //\n }",
"public function show(Post $post)\n {\n //\n }",
"public function show(Post $post)\n {\n //\n }",
"public function show(Post $post)\n {\n //\n }",
"public function show(Post $post)\n {\n //\n }",
"public function show(Post $post)\n {\n //\n }",
"public function show(Post $post)\n {\n //\n }",
"public function show(Post $post)\n {\n //\n }",
"public function show(Post $post)\n {\n //\n }",
"public function show(Post $post)\n {\n //\n }",
"public function show(Post $post)\n {\n //\n }",
"public function show(Post $post)\n {\n //\n }",
"public function show(Post $post)\n {\n //\n }",
"public function show(Post $post)\n {\n //\n }",
"public function show(Post $post)\n {\n //\n }",
"public function show($id)\n {\n $code = Qrcodes::findOrFail($id);\n // $paiementcode = $code->id.$code->reference_qrcode;\n // $info=$paiementcode;\n // $info.='; https://testpaiecash.mt-eyer.com/';\n // $info.='si vous lisez ceci c\\'est que votre paeiment est éffectué'; \n // //$qrcode = QrCode::size(200)->generate($info);\n\n // //return view(\"qrcode\", compact('info'));\n return new QrcoderResource($code);\n }",
"public function show(post $post)\n {\n //\n }",
"public function show(post $post)\n {\n //\n }",
"public function show(Apartment $apartment)\n {\n //\n }",
"public function show(Apartment $apartment)\n {\n //\n\n }",
"public function show(Pengiriman $pengiriman)\n {\n //\n }",
"public function show(Pajak $pajak)\n {\n //\n }",
"public function show(Penjual $penjual)\n {\n //\n }",
"public function show(Town $town)\n {\n //\n }",
"public function show(postulation $postulation)\n {\n //\n }",
"public function show($id)\n {\n $deliverablePostCode = $this->deliverablePostCodeRepository->find($id);\n\n if (empty($deliverablePostCode)) {\n Flash::error('Deliverable Post Code not found');\n\n return redirect(route('deliverablePostCodes.index'));\n }\n\n return view('deliverable_post_codes.show')->with('deliverablePostCode', $deliverablePostCode);\n }",
"public function setPostcode($postcode) \n {\n $this->postcode = $postcode;\n\n return $this;\n }",
"public function show(Ptpn $ptpn)\n {\n //\n }",
"public function show(Proposal $proposal)\n {\n //\n }",
"public function show(Resource $resource)\n {\n //\n }",
"public function show(Rattrapage $rattrapage)\n {\n //\n }",
"public function show($code)\n {\n $links = ShortLink::where('short_codes',$code)->first();\n\n $long_link = $links->long_links;\n\n return redirect($long_link);\n\n\n }",
"public function show(DetailPinjam $detailPinjam)\n {\n //\n }",
"public function show(Resena $resena)\n {\n }",
"public function index()\n {\n $shopAPostcodes = Shop::find(1)->postcode;\n $shopBPostcodes = Shop::find(2)->postcode;\n \n $data = array (\n 'shopAPostcodes' => $shopAPostcodes,\n 'shopBPostcodes' => $shopBPostcodes\n );\n return View('postcode.index')->with('postcodes', $data);\n }",
"public function show(Territory $territory)\n {\n //\n }",
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function showAction(Address $address)\n {\n $apiKeyGOGR = \"AIzaSyDWi3w0hvwNzy1OYnVcRImnDH2bhBFNV8M\";\n $apiKeyJDD = \"AIzaSyAa232Ch8q6OuI0qAkNV4s36dSJKSCaswc\";\n $deleteForm = $this->createDeleteForm($address);\n\n return $this->render('address/show.html.twig', array(\n 'address' => $address,\n 'delete_form' => $deleteForm->createView(),\n 'apikey' => $apiKeyJDD,\n ));\n }",
"public function show(Jadwalpengiriman $jadwalpengiriman)\n {\n \n }",
"public function show(kinerja_pegawai $kinerja_pegawai)\n {\n //\n }",
"public function show(Provider $provider)\n {\n //\n }",
"public function show(Provider $provider)\n {\n //\n }",
"public function show(Peternak $peternak)\n {\n //\n }",
"public function show($region)\n {\n return response()->json(Region::with(['rates', 'postcodes'])->find($region));\n }",
"public function show()\r\n {\r\n return view('petro::show');\r\n }",
"public function show(Region $region)\n {\n //\n }",
"public function show(Region $region)\n {\n //\n }",
"public function postcode( ) {\n return $this->belongsTo('App\\Http\\Models\\Postcode', 'postcode_id', 'id');\n }",
"public function show(Nid $nid)\n {\n //\n }",
"public function show(Pendaftaran $pendaftaran)\n {\n //\n }",
"public function index() {\n //$validPostcodes = ValidPostcode::all();\n $validPostcodes = ValidPostcode::orderby('postcode', 'asc')->paginate(50);\n return view('admin.postcode.index', compact('validPostcodes'));\n }",
"public function show(ServiceCode $serviceCode)\n {\n //\n }",
"public function show(pharmacy $pharmacy)\n {\n\n }",
"public function show()\n\t{\n\t\t$this->process_post();\n\t\t$this->output();\n\t}",
"public function show($pid)\n {\n //\n }",
"public function show(Planta $planta)\n {\n //\n\n }",
"public function show(Post $post)\n {\n $title = \"Resource Details\";\n $post->with(['category','user']);\n return view('post.show', compact('title', 'post'));\n }",
"public function show(Penjual $penjual)\n {\n return view('penjual.show',compact('penjual'));\n }",
"public function getPostcode() \n {\n return $this->postcode;\n }",
"public function show(peserta $peserta)\n {\n //\n }",
"public function show(Peminjaman $peminjaman)\n {\n //\n \n }",
"public function show(Post $post)\n {\n// POST::create(['body'=>$body, 'title'=>'test', 'excerpt'=>'test']);\n\n // route/model binding. it automatically maps to the matching ppost model entry\n return view('post.index', [\n 'post' => $post // auto mapped without having to do a find::() etc. uses id by default.\n ]);\n//})->where('post', '[A-z_\\-]+');\n }",
"public function edit($id) {\n $validPostcodes = ValidPostcode::find($id);\n return view('admin.postcode.edit', compact('validPostcodes'));\n }",
"public function show($codeOrAlias)\n {\n $shortUrl = ShortUrl::where('code', $codeOrAlias)->orWhere('alias', $codeOrAlias)->firstOrFail();\n\n $longUrl = $shortUrl->long_url;\n $shortenedUrl = url('/'.$codeOrAlias);\n\n // Get length of both url.\n $longUrlLength = strlen($shortUrl->long_url);\n $shortenedUrlLength = strlen($shortenedUrl);\n\n return view('short_url.preview', compact('longUrl', 'shortenedUrl', 'longUrlLength', 'shortenedUrlLength'));\n }",
"public function show(Penulis $penulis)\n {\n //\n }",
"public function show($pln)\n {\n $elem = Parrainage::where('id', '=', $pln)->get()->first();\n return json_encode($elem);\n }",
"public function show(Pekan $pekan)\n {\n //\n }",
"public function show($code)\n {\n $supplier = Supplier::whereCode($code)->first();\n if($supplier) {\n $totalPurchase = Purchase::whereSupplierId($supplier->id)->sum('total_amount');\n $totalPaid = Supplier::paidAmount($supplier->id);\n return view('settings.suppliers.show', compact('supplier','totalPurchase', 'totalPaid'));\n }\n return false;\n }",
"public function show($code)\n {\n $equipment = Equipment::where('code', '=', $code)->with('unit', 'category', 'service_vendor')->first();\n return view('item')->with('equipment', $equipment);\n }",
"public function show(Provider $provider)\n {\n //\n return view('admin.provider.show', compact('provider'));\n }",
"public function show(Promocode $promocode)\n {\n return view('dashboard.promocode.show', ['promocode' => $promocode]);\n }",
"public function show(Prestasi $prestasi)\n {\n //\n }",
"public function create() {\n return view('admin.postcode.create');\n }",
"public function show() {\n \n \n }",
"public function setPostcode($postcode)\n {\n $this->postcode = $postcode;\n\n return $this;\n }",
"public function setPostcode($postcode)\n {\n $this->postcode = $postcode;\n\n return $this;\n }",
"public function setPostcode($postcode)\n {\n $this->postcode = $postcode;\n\n return $this;\n }",
"public function show(Post $post)\n {\n // return $this->postsRepo->show($post);\n return new PostResource($this->postsRepo->show($post));\n }",
"public function show($CodLocal)\n {\n //\n }"
] | [
"0.67284966",
"0.67284966",
"0.6461401",
"0.63094765",
"0.6200232",
"0.6175458",
"0.615293",
"0.6060309",
"0.6014391",
"0.6014391",
"0.6014391",
"0.5974579",
"0.5969461",
"0.595958",
"0.5959221",
"0.5935607",
"0.5912109",
"0.59072113",
"0.5904935",
"0.58819765",
"0.58819765",
"0.58819765",
"0.58819765",
"0.58819765",
"0.58819765",
"0.58819765",
"0.58819765",
"0.58819765",
"0.58819765",
"0.58819765",
"0.58819765",
"0.58819765",
"0.58819765",
"0.58819765",
"0.58819765",
"0.58819765",
"0.58712906",
"0.584821",
"0.584821",
"0.5832959",
"0.58308864",
"0.58078307",
"0.5781395",
"0.5774231",
"0.5773925",
"0.5771847",
"0.57703424",
"0.57663435",
"0.5753862",
"0.5745834",
"0.5720922",
"0.5720812",
"0.57128453",
"0.5695779",
"0.56918263",
"0.568821",
"0.5667387",
"0.5653576",
"0.5652645",
"0.56451297",
"0.564079",
"0.5631918",
"0.5631918",
"0.56255645",
"0.56014186",
"0.55867726",
"0.55713415",
"0.55713415",
"0.55536836",
"0.55525994",
"0.554413",
"0.55385065",
"0.5526368",
"0.5524775",
"0.55182946",
"0.55182654",
"0.55181533",
"0.55116254",
"0.55093294",
"0.5508631",
"0.550236",
"0.54986346",
"0.54948145",
"0.54867923",
"0.5484391",
"0.5483816",
"0.5481938",
"0.54750377",
"0.5472384",
"0.54679096",
"0.5450722",
"0.54491585",
"0.5447387",
"0.5445802",
"0.54447275",
"0.5437397",
"0.5437397",
"0.5437397",
"0.54335093",
"0.5430386"
] | 0.57767063 | 43 |
Retrieve image Edit Data | public function retrieve_image_editdata($image_id)
{
$this->db->select('*');
$this->db->from('image_gallery');
$this->db->join('product_information','image_gallery.product_id = product_information.product_id');
$this->db->where('image_gallery.image_gallery_id',$image_id);
$query = $this->db->get();
if ($query->num_rows() > 0) {
return $query->result_array();
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionCompleteEditImage()\n\t{\n\t\t$saveThis = Image::model()->findByPk($_POST['Image']['imageid']);\n\n\t\t$saveableThings = Image::model()->allowedSaves();\n\t\t\n\t\t$tags=Image::model()->tags();\n\t\tforeach($tags as $tag)\n\t\t{\n\t\t\tif ($_POST['Image'][$tag] == true)\n\t\t\t{\n\t\t\t\t$_POST['Image'][$tag] = 'k';\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$_POST['Image'][$tag] = 'e';\n\t\t\t}\n\t\t}\n\t\t\n\t\t// parsing the date from the 3 input fields\n\t\t$saveThis->pvm = $this->parseDateInput($_POST['day'], $_POST['month'], $_POST['year']);\n\t\t\n\t\t/*\n\t\t * For details on this for loop structure and the contents of $saveableThings,\n\t\t * go see the actionSearch. This is copy pasted and modified from it.\n\t\t */\n\t\tfor($i=0;$i<count($saveableThings);$i++)\n\t\t{\t\n\t\t\tif (!is_null($_POST['Image'][$saveableThings[$i]]))\n\t\t\t{\n\t\t\t\t$saveThis->$saveableThings[$i] = $_POST['Image'][$saveableThings[$i]];\n\t\t\t}\n\t\t}\n\t\t\n\t\t$saveThis->save();\n\t\t\n\t\t$this->actionBuildingSave($_POST['kohteet'], $saveThis->imageid, $saveThis->cd, $saveThis->id);\n\t\t\t\t\n\t\tif(isset($_GET['id']))\n\t\t{\n\t\t\t$this->renderPartial('_metadatabox',array(\n\t\t\t\t\t'dataProvider'=>$saveThis,\n\t\t\t\t\t'hideimage'=>true,\n\t\t\t\t),\n\t\t\t\tfalse, \t// \"whether the rendering result should be returned instead of being displayed ot end users\"\n\t\t\t\tfalse\t// \"whether the rendering result should be postprocessed using processOutput\"\n\t\t\t);\n\t\t\n\t\t\t$this->renderPartial('_imageControlBox',array(\n\t\t\t\t'dataProvider'=>$saveThis,\n\t\t\t)); \t\n\t\t\t\n\t\t}\n\t}",
"public function action_editImage() \n {\n $fieldid = $_POST[\"fieldid\"];\n $field = Wi3::inst()->model->factory(\"site_field\")->set(\"id\", $fieldid)->load();\n \n // Update e-mailaddress\n $email = Wi3::inst()->model->factory(\"site_data\")->setref($field)->setname(\"emailaddress\")->load();\n // If data does not exist, create it\n if (!$email->loaded())\n {\n $email->create();\n }\n // Update data field with image-id\n $emailaddress = $_POST[\"emailaddress\"];\n $email->data = $emailaddress;\n $email->update();\n \n echo Kohana::debug($email); exit;\n \n // Update folder\n $data = Wi3::inst()->model->factory(\"site_data\")->setref($field)->setname(\"folder\")->load();\n // If data does not exist, create it\n if (!$data->loaded())\n {\n $data->create();\n }\n // Update data field with image-id\n $fileid = $_POST[\"image\"];\n $data->data = $fileid;\n $data->update();\n \n //$file = Wi3::inst()->model->factory(\"site_file\")->set(\"id\", $fileid)->load();\n \n echo json_encode(\n Array(\n \"scriptsbefore\" => Array(\n \"0\" => \"$('[type=field][fieldid=\" . $fieldid . \"] [type=fieldcontent]').html('\" . $field->render() . \"');\"\n )\n )\n );\n }",
"function editImage()\n\t{\n\t\t$id=$_GET['prodid'];\n\n\t\tif(((int)$id)>0)\n\t\t{\n\t\t\t$sql='select * from product_images_table where type=\"sub\" and product_id='.$id;\n\t\t\t$query=new Bin_Query();\n\t\t\tif($query->executeQuery($sql))\n\t\t\t{\n\t\t\t\treturn Display_DManageProducts::editImage($query->records);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn Display_DManageProducts::editImage(0);\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"function edit_form_image_editor($post)\n {\n }",
"function imageedit()\r\n\t{\r\n\t\t$data['img'] = $this->categeory_model->imageedit($this->uri->segment(4));\r\n\t\t\r\n\t\t$this->load->view('admin/image-edit',$data);\r\n\t}",
"public function edit(Image $image)\n {\n //\n }",
"public function edit(Image $image)\n {\n //\n }",
"public function edit(Image $image)\n {\n //\n }",
"public function edit(Image $image)\n {\n //\n }",
"public function edit(Image $image)\n {\n //\n }",
"public function edit(Image $image)\n {\n //\n }",
"public function edit(Image $image)\n {\n //\n }",
"public function edit(Image $image)\n {\n //\n }",
"public function edit(Image $image)\n {\n //\n }",
"public function edit(Image $image)\n {\n //\n }",
"public function actionGetImageViewBlock()\n {\n if (Yii::app()->request->isAjaxRequest && isset($_POST['docId'])) {\n $doc_id = intval($_POST['docId']);\n if ($doc_id > 0) {\n $image = Images::model()->findByAttributes(array(\n 'Document_ID' => $doc_id,\n ));\n\n $this->renderPartial('image_view' , array(\n 'image' => $image,\n ));\n }\n }\n }",
"function load_image_to_edit($attachment_id, $mime_type, $size = 'full')\n {\n }",
"public function viewPhoto(){\n $user = $this->_ap_right_check();\n if(!$user){\n return;\n }\n $user_id = $user['id'];\n $items = [];\n\n if(null !== $this->request->getQuery('id')){\n $q_r = $this->{$this->main_model}->find()->where(['id' => $this->request->getQuery('id')])->first();\n\n if($q_r){\n $items['photo_file_name'] = $q_r->photo_file_name;\n }\n }\n\n $this->set([\n 'data' => $items, //For the form to load we use data instead of the standard items as for grids\n 'success' => true,\n '_serialize' => ['success','data']\n ]);\n }",
"function goods_viewImgProduct(){\n $sql = \"select * from gd_image where get_imgid=:get_imgid order by gd_imgid ASC\";\n $args = [':get_imgid'=>$this->id];\n return $this->run($sql, $args);\n }",
"function imgEdit($img){\r\n\t\tforeach ($img as $key => $value) {\r\n\t\t//Cheking if was updated\r\n\t\t\tif (!empty($value[\"UpdateDate\"])) {\r\n\t\t\t\t$UpdateDate = \"<p>Aktualizováno: \".$value[\"UpdateDate\"].\"</p>\";\r\n\t\t\t} else{\r\n\t\t\t\t$UpdateDate = null;\r\n\t\t\t}\r\n\t\t//Generating form for editing\r\n\t\t\techo \"\r\n\t\t\t\t<form method='POST' action='Action/imagesEditor.php'>\r\n\t\t\t\t\t<div class='card'>\r\n\t\t\t\t\t\t<p class='image center'><img src='\".$value[\"URL\"].\"' title='\".$value[\"header\"].\"'></p>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<h2>Nadpis:<br>\r\n\t\t\t\t\t\t<input type='text' name='header' value='\".$value[\"header\"].\"'></h2>\r\n\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<p class='leftText'>Popis:</p>\r\n\t\t\t\t\t\t<textarea id='description' name='description'>\".$value[\"description\"].\"</textarea>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<div class='information'>\r\n\t\t\t\t\t\t\t<p>Datum nahrání: \".$value[\"Date\"].\"</p>\r\n\t\t\t\t\t\t\t<p>Autor: </p>\r\n\t\t\t\t\t\t\t<input type='text' name='autor' value='\".$value[\"autor\"].\"' class='rightInput'>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class='clear'></div>\r\n\t\t\t\t\t\t<input type='hidden' name='img' value='\".$value[\"ID\"].\"'>\r\n\t\t\t\t\t\t<input type='hidden' name='updated' value='\".$value[\"UpdatedTimes\"].\"'>\r\n\t\t\t\t\t\t<div class='editBtn'>\r\n\t\t\t\t\t\t\t<input type='submit' name='submit' value='Upravit'>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t\";\r\n\t\t\t\t\tif (!empty($_SESSION[\"info\"])) {\r\n\t\t\t\t\t \techo $_SESSION[\"info\"];\r\n\t\t\t\t\t \tunset($_SESSION[\"info\"]);\r\n\t\t\t\t\t}\r\n\t\t\techo \"</form>\";\r\n\t\t}\r\n\t}",
"function getImage()\r\n\t\t{\r\n\t\t\treturn $this->image;\r\n\t\t\t\r\n\t\t}",
"public static function edit_image()\n{\n\n\n\t/*\n\t* Change Background\n\t*/\n\n\t/*\n\t* Change other setting\n\t*/\n}",
"public function edit(Picture $image)\n {\n //\n }",
"function editMainImage()\n\t{\n\t\t$id=$_GET['prodid'];\n\n\t\tif(((int)$id)>0)\n\t\t{\n\t\t\t$sql='select * from product_images_table where type=\"main\" and product_id='.$id;\n\t\t\t\n\t\t\t$obj=new Bin_Query();\n\t\t\t\n\t\t\tif($obj->executeQuery($sql))\n\t\t\t{\t\t\t\n\t\t\t\t$output=$obj->records[0];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$output=0;\n\t\t\t}\n\t\t\t\n\t\t\treturn Display_DManageProducts::editMainImage($output);\n\t\t}\n\t}",
"private function _getDataImg(){\n $this->Photo->createDirectoryIfNotExist(REPO_PHOTO, 0755);\n $idUser = $this->User->getIdUser($_SESSION['login']);\n\t\t$this->Photo->createDirectoryIfNotExist(REPO_PHOTO.$idUser.DS, 0755);\n $this->Photo->createDirectoryIfNotExist(REPO_PHOTO.$idUser.DS.'min'.DS, 0755);\n\n if (isset($_SESSION['filter']) && $_SESSION['filter'] !== 'none'){\n $filter = $_SESSION['filter'];\n } else {\n $filter = 'none';\n }\n if (!empty($_SESSION['objFilter']) && $_SESSION['objFilter'] !== null){\n $filterObj = $_SESSION['objFilter'];\n } else {\n $filterObj = 'noneObj';\n }\n $tabPathId = $this->Photo->savePhotoTmpToDb($idUser, $_POST['img64'], REPO_PHOTO.DS.$idUser, $filter, $filterObj);\n $_POST['img64'] = \"\";\n return $tabPathId;\n\t}",
"public function getProduct_img () {\n\t$preValue = $this->preGetValue(\"product_img\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->product_img;\n\treturn $data;\n}",
"public function editImage(Request $request)\n\t{\n\t\t$image = array();\n\t\tif (Auth::user()->name == \"admin\") {\n\t\t\t$image = DB::table('images')\n\t\t\t\t->where('id', $request->id)\n\t\t\t\t->get();\n\t\t} else {\n\t\t\t$image = DB::table('images')\n\t\t\t\t->where('id', $request->id)\n\t\t\t\t->where('created_by', '=', Auth::user()->name)\n\t\t\t\t->get();\n\t\t}\n\n\t\tif (count($image) > 0) {\n\t\t\treturn view('admincp.editImage', ['image' => $image]);\n\t\t} else {\n\t\t\treturn redirect()->intended('/admincp');\n\t\t}\n\t}",
"public function getImage()\n{\nreturn $this->image;\n}",
"public function edit($id)\n {\n $img = HomeMemberImage::find($id); \n return view('admin.home.award.member_image_edit',['img'=>$img]);\n }",
"function getImage() {\n\t\treturn $this->_image;\n\t}",
"public function showImageFromGet() {\n\n\t\t// $imageFilename = UniteFunctionsRev::getGetVar(\"img\");\n\t\t$imageID = intval( UniteFunctionsRev::getGetVar( 'img' ) );\n\t\t$maxWidth = UniteFunctionsRev::getGetVar( 'w',-1 );\n\t\t$maxHeight = UniteFunctionsRev::getGetVar( 'h',-1 );\n\t\t$type = UniteFunctionsRev::getGetVar( 't','' );\n\n\t\t// set effect\n\t\t$effect = UniteFunctionsRev::getGetVar( 'e' );\n\t\t$effectArgument1 = UniteFunctionsRev::getGetVar( 'ea1' );\n\n\t\tif ( ! empty( $effect ) ) {\n\t\t\t$this->setEffect( $effect,$effectArgument1 ); }\n\n\t\t$this->showImageByID( $imageID );\n\t\techo 'sechs<br>';\n\t\t// $this->showImage($imageFilename,$maxWidth,$maxHeight,$type);\n\t}",
"public function edit(ImgProduct $imgProduct)\n {\n //\n }",
"function getImageSource() {return $this->_imagesource;}",
"protected function editImage(array $data, $event)\n {\n // delete existing main photo\n if ($event->article->image != null) {\n Storage::delete('public/images/'.$event->article->image);\n }\n \n if (array_key_exists('image', $data)) {\n $path = $data['image']->store('articles/'.$event->artID, 'images');\n $event->article->image = $path;\n $event->article->save();\n }\n }",
"public function getImage()\n {\n return $this->image;\n }",
"function getViewPhotoEdit($photo_uid, $callerRef, $conf) {\r\n \t$photo = self::getPhoto($photo_uid);\r\n //START CONFIG FOR FEEDIT\r\n\t\t$table = \"tx_cwtcommunity_photos\";\r\n //Create Item array\r\n $items['title']['label'] = tx_cwtcommunity_lib_common::getLL('PHOTO_EDIT_TITLE_LABEL');\r\n $items['title']['helptext'] = tx_cwtcommunity_lib_common::getLL('PHOTO_EDIT_TITLE_HELPTEXT');\r\n $items['description']['label'] = tx_cwtcommunity_lib_common::getLL('PHOTO_EDIT_DESCRIPTION_LABEL');\r\n $items['description']['helptext'] = tx_cwtcommunity_lib_common::getLL('PHOTO_EDIT_DESCRIPTION_HELPTEXT'); \t \r\n\t\t$cruser_id = tx_cwtcommunity_lib_common::getLoggedInUserUID();\r\n\r\n //Create form object\r\n $form = GeneralUtility::makeInstance('tx_cwtfeedit_pi1');\r\n $form->init($table, $items, $photo_uid, $cruser_id, $GLOBALS[\"TSFE\"]->id\r\n \t\t\t\t\t\t, array(tx_cwtcommunity_lib_constants::CONST_ACTION => tx_cwtcommunity_lib_constants::ACTION_GALLERY_SHOW_ALBUM_DETAIL\r\n \t\t\t\t\t\t, tx_cwtcommunity_lib_constants::CONST_ALBUM_UID => $photo['album_uid'])\r\n \t\t\t\t\t\t, $callerRef, array(), false);\r\n //Generate content\r\n $content.= $form->getFormHeader();\r\n $content.= $form->getElement('title');\r\n $content.= $form->getElement('description');\r\n $content.= $form->getFormFooter();\r\n return $content; \t\r\n }",
"function getImage()\n {\n return $this->_image;\n }",
"public function getEditRaw();",
"static function dt_edit_image2($title,$name,$value,$width = 0,$height = 0,$comment='',$use_dropzone = 0,$list_other_images = array(),$class_col1='col-md-2',$class_col2='col-md-10'){\n\t\tif(!$use_dropzone){\n\t\t\t$html = '<tr><td valign=\"top\" class=\"key\" valign=\"top\">'.$title.'</td><td class=\"value\">';\n\t\t\tif($value){\n\t\t\t\t\t$html_w = $width?' width=\"'.$width.'\" ':'';\n\t\t\t\t\t$html_h = $height?' height=\"'.$height.'\" ':'';\n\t\t\t\t\t$html .= '<img src=\"'.$value.'\" '.$html_w.' '.$html_h.' /><br/>';\n\t\t\t}\n\t\t\t$html .= '<input type=\"file\" name=\"'.$name.'\" id=\"'.$name.'\" />';\n\t\t\tif($comment)\n\t\t\t\t$html .= '<p class=\"help-block\">'.$comment.'</p>';\n\t\t\t$html .= '</td></tr>';\n\t\t}else{\n\t\t\t$id = FSInput::get('id');\n\t\t\t$module = FSInput::get('module');\n\t\t\t$view = FSInput::get('view');\n\t\t\tif($id)\n\t\t\t\t$uploadConfig = base64_encode('edit|'.$id);\t\t\n\t\t\telse\n\t\t\t\t$uploadConfig = base64_encode('add|'.session_id());\n\n\t\t\t$list_other_images = TemplateHelper::get_other_images($module ,$uploadConfig);\n\t\t\t$colors = TemplateHelper::get_colors($id);\n\n\t\t\t$arr_sku_map = array(); \n\t\t\t$i= 1;\n\t\t\tforeach ($list_other_images as $item) {\n\t\t\t\t$arr_sku_map['Data'][$i]['AttachmentID']=$item->id;\n\t\t\t\t$arr_sku_map['Data'][$i]['FileName']=$item->title;\n\t\t\t\t$arr_sku_map['Data'][$i]['Path'] = URL_ROOT.str_replace('/original/','/original/', $item->image) ;\n\t\t\t\t$arr_sku_map['Data'][$i]['ColorId'] = $item->color_id;\n\t\t\t\t$i++;\n\t\t\t}\n if(!count($arr_sku_map)){\n $arr_sku_map['Data'][0]['AttachmentID']= 0;\n\t\t\t\t$arr_sku_map['Data'][0]['FileName']= '0';\n\t\t\t\t$arr_sku_map['Data'][0]['Path'] = '0';\n\t\t\t\t$arr_sku_map['Data'][0]['ColorId'] = '0';\n }\n\t\t\t$skuConfig = json_encode($arr_sku_map);\n\t\t\t$html = '\n\t\t <link type=\"text/css\" rel=\"stylesheet\" media=\"all\" href=\"'. URL_ROOT.'libraries/jquery/dropzone/dist/min/dropzone.min.css\" />\n\t\t\t<link type=\"text/css\" rel=\"stylesheet\" media=\"all\" href=\"libraries/dropzone/dropzone.css\" />\n\n\t\t\t<script type=\"text/javascript\" src=\"'. URL_ROOT.'libraries/jquery/dropzone/dist/min/dropzone.min.js\"></script>\n\n\t\t\t <script>\n\t\t\t $(document).ready(function() {\n\t\t\t \tvar data ='.$skuConfig.';\n\t\t\t\tvar previewNode = document.querySelector(\"#template\");\n\t\t\t\tvar uploadConfig = $(\"#uploadConfig\").val();\n\t\t\t\tpreviewNode.id = \"\";\n\t\t\t\tvar previewTemplate = previewNode.parentNode.innerHTML;\n\t\t\t\tpreviewNode.parentNode.removeChild(previewNode);\n\t\t\t\tvar myDropzone = new Dropzone(document.body, { // Make the whole body a dropzone\n\t\t\t\t url: \"index2.php?module='.$module.'&view='. $view.'&raw=1&task=upload_other_images&data=\"+uploadConfig,\n\t\t\t\t thumbnailWidth: 100,\n\t\t\t\t thumbnailHeight: 100,\n\t\t\t\t parallelUploads: 20,\n\t\t\t\t previewTemplate: previewTemplate,\n\t\t\t\t autoQueue: true, \n\t\t\t\t previewsContainer: \"#previews\", \n\t\t\t\t clickable: \".fileinput-button\", \n\t\t\t\t removedfile: function(file) {\n\t\t\t\t \t\tconsole.log(file);\n\t\t\t\t\t \tvar reocord_id = $(\"#id_mage\").val();\n\t\t\t\t\t $.ajax({\n\t\t\t\t\t type: \"POST\",\n\t\t\t\t\t url: \"index2.php?module='.$module.'&view='.$view.'&raw=1&task=delete_other_image\",\n\t\t\t\t\t data: { \"name\": file.name,\"reocord_id\":reocord_id,\"id\":file.size}\n\t\t\t\t\t });\n\t\t\t\t\tvar _ref;\n\t\t\t\t\treturn (_ref = file.previewElement) != null ? _ref.parentNode.removeChild(file.previewElement) : void 0; \n\t\t\t\t },\n success: function(file, response){\n //alert(response);\n file.previewElement.id = \"sort_\"+response;\n }, \n\t\t\t\t init: function () {\n\t\t\t\t var thisDropzone = this; \n if (data.Data != \"\") {\n $.each(data.Data, function (index, item) {\n var mockFile = {\n name: item.FileName,\n title: item.title,\n size: item.AttachmentID\n };\n thisDropzone.emit(\"addedfile\", mockFile);\n thisDropzone.emit(\"thumbnail\", mockFile, item.Path);\n \n //On the created element added the id property \n \t\t\t\t\t\t\t$(mockFile.previewElement).prop(\"id\", \"sort_\"+item.AttachmentID);\n $(mockFile.previewTemplate).find(\".title_dropzon\").val(item.FileName);\n \n \t\t\t\t\t\t\t//$(mockFile.previewTemplate).find(\".dz-color\").val(item.ColorId);\n \t\t\t\t\t\t\t//select_index = $(\"#sort_\"+item.AttachmentID+\" .dz-color option:selected\").index();\n\n \t\t\t\t\t\t\t//color_code = $(\"#sort_\"+item.AttachmentID+\" .dz-color\")[0].options[select_index].style.backgroundColor;\n \t\t\t\t\t\t\t//console.log($(\"#sort_\"+item.AttachmentID+\" .dz-color\"));\n \t\t\t\t\t\t\t//$(\"#sort_\"+item.AttachmentID+\" .dz-color\").css(\"background-color\", color_code);\n\n });\n }\n\t \t }\n\t\t\t\t});\n\n\t\t\t\t$(function() {\n\t\t\t\t\t$(\"#previews\").sortable({\n\t\t\t\t\t\tupdate : function () {\n\t\t\t\t\t\t\tserial = $(\"#previews\").sortable(\"serialize\");\n\t\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\t\turl: \"index2.php?module='.$module.'&view='.$view.'&raw=1&task=sort_other_images\",\n\t\t\t\t\t\t\t\ttype: \"post\",\n\t\t\t\t\t\t\t\tdata: serial,\n\t\t\t\t\t\t\t\terror: function(){\n\t\t\t\t\t\t\t\t\talert(\"Lỗi load dữ liệu\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t});\n\n\t\t\t });\n\t\t\t\t//function change_color(element){\n\t\t\t\t//\tvalue = $(element).val();\n\t\t\t\t//\tparent_id = $(element).parent().attr(\"id\");\n\t\t\t\t//\tid = parent_id.replace(\"sort_\", \"\");\n\t\t\t\t//\tvar uploadConfig = $(\"#uploadConfig\").val();\n\t\t\t\t//\t $.ajax({\n\t\t\t\t// type: \"POST\",\n\t\t\t\t// url: \"index2.php?module='.$module.'&view='.$view.'&raw=1&task=change_attr_image\",\n\t\t\t\t// data: { \"field\": \"color\",\"data\":uploadConfig,\"id\":id,\"value\":value}\n\t\t\t\t// });\n\t\t\t\t//\t element.style.backgroundColor=element.options[element.selectedIndex].style.backgroundColor;\n\t\t\t\t//}\n \n function change_tile(element){\n\t\t\t\t\tvalue = $(element).val();\n\t\t\t\t\tparent_id = $(element).parent().attr(\"id\");\n id = parent_id.replace(\"sort_\", \"\");\n\t\t\t\t\tvar uploadConfig = $(\"#uploadConfig\").val();\n\t\t\t\t\t $.ajax({\n\t\t\t\t type: \"POST\",\n\t\t\t\t url: \"index2.php?module='.$module.'&view='.$view.'&raw=1&task=change_title_attr_image\",\n\t\t\t\t data: {\"data\":uploadConfig,\"id\":id,\"value\":value}\n\t\t\t\t });\n\t\t\t\t}\n\t\t\t </script>\n\t\t\t';\n\t\t\t$html .= '<div class=\"dropzone files\" id=\"previews\">';\n\t\t\t\t$html .= '<div id=\"template\" class=\"dz-preview dz-image-preview\">';\n\t\t\t\t\t$html .= '<div class=\"dz-details\">';\n\t\t\t\t\t $html .= '<img data-dz-thumbnail />';\n\t\t\t\t\t$html .= '</div>';\n\t\t\t\t\t$html .= '<div class=\"dz-progress\"><span class=\"dz-upload\" data-dz-uploadprogress=\"\"></span></div>';\n\t\t\t\t \t$html .= '<a class=\"dz-remove\" data-dz-remove id=\"\">Remove</a>';\n $html .= '<input type=\"text\" onchange=\"javascript: change_tile(this);\" class=\"form-control title_dropzon\" placeholder=\"Title\" style=\"width:100px;border-radius: 0px;margin-top: 2px;\">'; \n\t\t\t\t \t//$html .= '<select class=\"dz-color\" onchange=\"javascript: change_color(this);\">';\n\t\t\t\t \t//$html .= '<option value=\"0\" style=\"\">Chọn màu</option>';\n\t\t\t\t \t//if(@$colors ){\n\t\t\t\t\t//\tforeach($colors as $item){\n\t\t\t\t\t//\t\t$html .= '<option value=\"'.$item -> id.'\" style=\"background-color: #'.$item -> color_code.'\">'. $item -> color_name.'</option>';\n\t\t\t\t\t//\t}\n\t\t\t\t\t//}\n\t\t\t\t\t//$html .= '</select>';\n\t\t\t\t$html .= '</div>';\n\t\t\t\t\n\t\t\t$html .= '</div>';\n\t\t\t$html .= '<input type=\"hidden\" value=\"'.$uploadConfig.'\" id=\"uploadConfig\" />';\n\t\t\t$html .= '<input type=\"hidden\" value=\"'.$id.'\" id=\"id_mage\" />';\n\t\t\t $html .= '<span class=\"post_images fileinput-button\">Thêm ảnh/video</span>';\n\n\t\t}\n\t\techo $html;\n\t}",
"function image_attachment_fields_to_edit($form_fields, $post)\n {\n }",
"public function photoEdit()\n {\n $flags = $this->language->getAllDataNoPagination();\n $data['id'] = Input::get('picture_id');\n $data['photo'] = Pictures::where('id', '=', $data['id'])->first();\n $data['thisPageId'] = $this->thisPageId;\n $data['thisModuleId'] = $this->thisModuleId;\n\n return view('cms.modules.multicms.photoslg_addnew', $data, $flags);\n }",
"public function getImg(){\n return $this->img;\n }",
"function getImageFile() \n { \n return $this->_imageFile; \n }",
"public function getImage() {}",
"public function getImage();",
"public function getImage();",
"public function getImage();",
"public function getImage();",
"public function getImage()\n {\n return $this->get('image');\n }",
"public function getExternal_img () {\n\t$preValue = $this->preGetValue(\"external_img\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->external_img;\n\treturn $data;\n}",
"function get_image_send_to_editor($id, $caption, $title, $align, $url = '', $rel = \\false, $size = 'medium', $alt = '')\n {\n }",
"public function get_image() {\r\n return $this->image;\r\n }",
"public function edit(ImgList $imgList)\n {\n //\n }",
"public function edit($id)\n {\n $data=Image::find($id);\n return view('backend.images.update',compact('data'));\n }",
"public function get_media_edit_input()\n {\n }",
"public function image_editor($params) {\n\t\t$error = $this->_validate_capabilities(array('edit_posts'));\n\t\tif (!empty($error)) return $error;\n\n\t\t$attachment_id = (int) $params['postid'];\n\t\t$this->populate_request($params);\n\n\t\tif (!function_exists('load_image_to_edit')) {\n\t\t\trequire_once(ABSPATH.'wp-admin/includes/image.php');\n\t\t}\n\n\t\tinclude_once(ABSPATH.'wp-admin/includes/image-edit.php');\n\t\t$msg = false;\n\t\tswitch ($params['do']) {\n\t\t\tcase 'save':\n\t\t\tcase 'scale':\n\t\t\t\t$msg = wp_save_image($attachment_id);\n\t\t\t\tbreak;\n\t\t\tcase 'restore':\n\t\t\t\t$msg = wp_restore_image($attachment_id);\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$msg = (false !== $msg) ? json_encode($msg) : $msg;\n\t\treturn $this->_response(array('content' => $msg));\n\t}",
"function edit_image($id,$image) {\n\t\t\t\n\t\t\t$this->db->set('Picture',$image);\n\t\t\t$this->db->where('Id',$id);\n\t\t\t$this->db->update('User');\n\t\t}",
"public function getImage()\r\n {\r\n return $this->image;\r\n }",
"public function getImage()\r\n {\r\n return $this->image;\r\n }",
"public function actionSaveImage()\n\t{\n\t\t$image = Image::model()->findByPk($_GET['imageid']);\n\t\t$this->renderPartial('saveImage',array('image'=>$image));\n\t}",
"public function getImage() {\n\t\treturn $this->image;\n\t}",
"public function getImage() {\n\t\treturn $this->image;\n\t}",
"public function getImage() {\n\t\treturn $this->image;\n\t}",
"public function editView() {\n Template_Module::setFullWidth(true);\n $this->edit = true;\n $this->addView();\n // cestak obrázků\n $this->imagePath = $this->category()->getModule()->getDataDir(true);\n }",
"public function src(){\n return $this->imageFirstInContent;\n }",
"public function edit($id)\n {\n //\n $image = Image::find($id);\n return view('admin.images.edit')->with('image',$image);\n }",
"function getImagePathInfo() \n { \n return $this->_imagePathInfo; \n }",
"public function getImage() {\n //return the value image\n return $this->AdvertImage;\n }",
"public function edit($id)\n {\n $img = Img::find($id);\n return view('admin.img_edit',compact('img'));\n }",
"public function actionChangeData()\n {\n if (Yii::app()->getRequest()->getIsPostRequest()) {\n $data = $_POST['photo'];\n $criteria = new CDbCriteria();\n $criteria->index = 'id';\n $criteria->addInCondition('id', array_keys($data));\n /** @var $models GalleryPhoto[] */\n $models = GalleryPhoto::model()->findAll($criteria);\n foreach ($data as $id => $attributes) {\n if (isset($attributes['name']))\n $models[$id]->name = $attributes['name'];\n if (isset($attributes['description']))\n $models[$id]->description = $attributes['description'];\n $models[$id]->save();\n }\n $resp = array();\n foreach ($models as $model) {\n $resp[] = array(\n 'id' => $model->id,\n 'rank' => $model->rank,\n 'name' => (string)$model->name, //todo: something wrong with model - it returns null, but it must return an empty string\n 'description' => (string)$model->description,\n 'preview' => $model->getPreview(),\n );\n }\n echo CJSON::encode($resp);\n } else\n throw new CHttpException(403);\n }",
"public function getImage()\n\t{\n\t\treturn $this->image;\n\t}",
"public function getImage()\n\t{\n\t\treturn $this->image;\n\t}",
"function editCarousel($carousel, $id) {\n $data = [\n 'title' => $_POST['title'],\n 'caption' => $_POST['caption'],\n 'active' => isset($_POST['active'])? 1 : 0,\n 'visible' => isset($_POST['visible'])? 1 : 0\n ];\n \n if (!is_uploaded_file($_FILES['image']['tmp_name'])) {\n $stmt = $carousel->update($id, $data);\n header('location: confirm.php?action=update&query='.$stmt);\n } else {\n\n //upload the image and get url\n $image = new Image();\n $img_url = $image->uploadFile($_FILES['image']);\n\n //add the image url to data array\n $data['img_url'] = $img_url;\n\n $stmt = $carousel->update($id, $data);\n header('location: confirm.php?action=update&query='.$stmt);\n }\n}",
"public function getImage()\n {\n return $this->image;\n }",
"function get_attachment_fields_to_edit($post, $errors = \\null)\n {\n }",
"function getImagen(){\n\t\t\treturn $this->imagen;\n\t\t}",
"public function getImage() {\n return $this->image;\n }",
"public function edit($id)\n {\n //\n $image = Image::findOrFail($id);\n return view('image.edit', compact('image'));\n\n }",
"protected function fetchFullTextImage(){\n $this->imageFullText = $this->getImageTypeFromImages('full');\n }",
"public static function widget_imagedata($data){\n wfPlugin::includeonce('wf/array');\n $data = new PluginWfArray($data);\n $app_dir = wfArray::get($GLOBALS, 'sys/app_dir');\n $element = array();\n if(wfFilesystem::fileExist($app_dir.$data->get('data/filename'))){\n $exif = PluginImageExif_v1::getImageData($data->get('data/filename'));\n foreach ($exif as $key => $value) {\n $ul = wfDocument::createHtmlElementAsObject('ul');\n foreach ($value as $key2 => $value2) {\n if(is_array($value2)){\n $value2 = json_encode($value2);\n }\n $ul->set('innerHTML/', wfDocument::createHtmlElement('li', $key2.': '.$value2));\n }\n $element[] = wfDocument::createHtmlElement('h1', $key);\n $element[] = $ul->get();\n }\n wfDocument::renderElement($element);\n }else{\n echo 'Could not find file '.$data->get('data/filename');\n }\n }",
"public function getImage() {\n\t\t\treturn $this->image;\n\t\t}",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }"
] | [
"0.6906226",
"0.6848612",
"0.6662698",
"0.6586425",
"0.65791845",
"0.6446003",
"0.6446003",
"0.6446003",
"0.6446003",
"0.6446003",
"0.6446003",
"0.6446003",
"0.6446003",
"0.6446003",
"0.6446003",
"0.6381529",
"0.63679564",
"0.6351312",
"0.6329007",
"0.6323736",
"0.62449336",
"0.62422884",
"0.62163204",
"0.6207905",
"0.6185143",
"0.6150209",
"0.61500216",
"0.61234224",
"0.6101898",
"0.61015445",
"0.6074171",
"0.60671526",
"0.60670096",
"0.60597193",
"0.6058735",
"0.6057985",
"0.6056608",
"0.60427636",
"0.6035864",
"0.60317594",
"0.60283786",
"0.60187113",
"0.6015014",
"0.59937567",
"0.59880424",
"0.59880424",
"0.59880424",
"0.59880424",
"0.598167",
"0.59813994",
"0.5939548",
"0.5928711",
"0.59268695",
"0.59225875",
"0.5919557",
"0.5916593",
"0.5911714",
"0.59074014",
"0.59074014",
"0.5905845",
"0.59043753",
"0.59043753",
"0.59043753",
"0.59016955",
"0.58894897",
"0.58684385",
"0.58672446",
"0.58633405",
"0.5860809",
"0.58540386",
"0.58521926",
"0.58521926",
"0.58518624",
"0.58493054",
"0.5842243",
"0.58399194",
"0.5838778",
"0.58367395",
"0.5831783",
"0.5824705",
"0.58242416",
"0.581255",
"0.581255",
"0.581255",
"0.581255",
"0.581255",
"0.581255",
"0.581255",
"0.581255",
"0.581255",
"0.581255",
"0.581255",
"0.581255",
"0.581255",
"0.581255",
"0.581255",
"0.581255",
"0.581255",
"0.581255",
"0.581255"
] | 0.6403706 | 15 |
empty function in order to avoid Fatal error: Cannot redeclare class SPF\deployment\Lock | function lock()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function lock(): void;",
"public function lock() {}",
"public function lock(): void {}",
"public function lock(): void {}",
"public function lock(): void {}",
"public function lock(): void {}",
"public function lock(): void {}",
"protected function hashLockClause() {}",
"public function lockToNormal() {}",
"public function lock(): void;",
"protected static function defaultLockVersion()\n {\n return 1;\n }",
"public function trylock() {}",
"public function getMaintenanceLock()\r\n {\r\n return $this->_loadClass('lockFile', true, array(GEMS_ROOT_DIR . '/var/settings/lock.txt'));\r\n }",
"private function createLock($key) {\n // but we'll ignore that out of convenience\n @apc_add($key . '.lock', '', 5);\n }",
"protected function ipLockClause() {}",
"private function createLock($key) {\n // but we'll ignore that out of convenience\n @apc_add ( $key . '.lock', '', 5 );\n }",
"public function writeunlock() {}",
"public function __construct() {\n\t\t$lockPath = $this->getLockPath();\n\t\t$this->lockPathAndFilename = $lockPath . md5(FLOW_PATH_ROOT) . '_Flow.lock';\n\t\t$this->lockFlagPathAndFilename = $lockPath . md5(FLOW_PATH_ROOT) . '_FlowIsLocked';\n\t\t$this->removeExpiredLock();\n\t}",
"protected function get__locked()\n\t{\n\t\treturn NULL;\n\t}",
"public function readunlock() {}",
"function free_lock(string $key): void\n{\n $logger = \\Logger::getLogger(\"files.lock\");\n $lockfn = get_lock_filename($key);\n $logger->debug(\"Free lock '$key'\");\n if (!unlink($lockfn)) {\n $logger->error(\"Error unlocking $key\");\n }\n}",
"function cera_grimlock_single() {\n\t\tdo_action( 'grimlock_single' );\n\t}",
"function lock() {\n global $_Query_lock_depth;\n if ($_Query_lock_depth < 0) {\n Fatal::internalError('Negative lock depth');\n }\n if ($_Query_lock_depth == 0) {\n $row = $this->select1($this->mkSQL('select get_lock(%Q, %N) as locked',\n OBIB_LOCK_NAME, OBIB_LOCK_TIMEOUT));\n if (!isset($row['locked']) or $row['locked'] != 1) {\n Fatal::cantLock();\n }\n }\n $_Query_lock_depth++;\n }",
"function lock(string $key): void;",
"public function lock()\n\t{\n\t\t$this->immutable = true;\n\t}",
"public function lock()\n {\n $this->locked = true;\n }",
"public function lock(string $name): void;",
"function claim_lock(string $key): void\n{\n $logger = \\Logger::getLogger(\"files.lock\");\n $lockfn = get_lock_filename($key);\n $logger->debug(\"Claim lock: '$lockfn'\");\n if (!file_exists($lockfn)) {\n $logger->error(\"Lock file missing: $lockfn\");\n die();\n }\n $pid = file_get_contents($lockfn);\n if ($pid) {\n $logger->error(\"Lock file already claimed: $lockfn $pid\");\n die();\n }\n file_put_contents($lockfn, getmypid());\n}",
"public function lock()\n {\n $this->isLocked = true;\n }",
"public function handle_override_changeset_lock_request()\n {\n }",
"function lockCacheObject ()\n {\n return copy($this->cacheObjectId, $this->cacheObjectId.'.lock');\n }",
"public function lock()\r\n {\r\n frameEbbs::_()->getModule('backup')->lock();\r\n }",
"private static function generateInstallLockFile()\n\t{\n\t\tfile_put_contents(\"core/generator/installLockFile\",\"\");\n\t}",
"public function unlock() {\n }",
"public static function setLocked()\n {\n self::$locked = true;\n }",
"public function lock($name) {\n\t\t\n\t\t/*$b = mysql_query('show tables');\n\t\t$d = '';\n\t\t$d .= 'LOCK TABLES';\n\t\twhile( $c = mysql_fetch_array($b) ) {\n\t\t\t$d .= '\n\t\t`'.$c[0].'` WRITE , ';\n\t\t}\n\t\t\n\t\t$d = rtrim($d,' , ').';';\n\t\t//if( $this->info['id'] == 12345 ) {\n\t\t\tif( $name == 'reflesh.useitems' || $name == 'reflesh-heal' ) {\n\t\t\t\tmysql_query($d);\n\t\t\t}\n\t\t//}*/\n\t}",
"function _get_cron_lock()\n {\n }",
"public static function setUnlocked()\n {\n self::$locked = false;\n }",
"public function freeze() {}",
"public function __construct($name, $autounlock = true) {}",
"public function getLockHash() {}",
"abstract protected function manage(LockableInterface $resource);",
"function lock(Sabre_DAV_Locks_LockInfo $lockInfo);",
"public function acquireSharedLock() {}",
"abstract protected function releaseLock($name);",
"protected static function getFacadeAccessor()\n {\n return Lock::class;\n }",
"public function lock()\n {\n $this->lock = true;\n }",
"public function unlock(): void {}",
"public function unlock(): void {}",
"public function unlock(): void {}",
"public function unlock(): void {}",
"public function unlock(): void {}",
"public function enableLocked()\n\t{\n\t\t$this->_locked = true;\n\t}",
"public function testParallelLock(): void\n {\n $identifier1 = \\uniqid('lock_name_1_', true);\n\n $this->assertTrue($this->cacheInstance1->lock($identifier1));\n\n $this->assertFalse($this->cacheInstance1->lock($identifier1, 0));\n $this->assertFalse($this->cacheInstance2->lock($identifier1, 0));\n }",
"public function isLocked() {}",
"protected function editLockPermissions() {}",
"function getLocks();",
"public function lock()\n {\n if ( !($this->_state & self::LOADED) ) {\n $this->_memManager->load($this, $this->_id);\n $this->_state |= self::LOADED;\n }\n\n $this->_state |= self::LOCKED;\n\n /**\n * @todo\n * It's possible to set \"value\" container attribute to avoid modification tracing, while it's locked\n * Check, if it's more effective\n */\n }",
"public function testParallelLockExpired(): void\n {\n $testLifeTime = 2;\n \\Closure::bind(function (Cache $class) use ($testLifeTime) {\n $class->defaultLifetime = $testLifeTime;\n }, null, $this->cacheInstance1)($this->cacheInstance1);\n\n $identifier1 = \\uniqid('lock_name_1_', true);\n\n $this->assertTrue($this->cacheInstance1->lock($identifier1, 0));\n $this->assertTrue($this->cacheInstance2->lock($identifier1, $testLifeTime + 1));\n\n $this->cacheInstance2->unlock($identifier1);\n }",
"public function lockJob() {\n \t\t//structure id,jobId,serverId (job id is unique entry)\n\n \t}",
"public function getLockStatus() {}",
"public function unlock(): void;",
"function _lock_tree_table()\n\t{\n\t\tee()->db->query(\"LOCK TABLE \" .$this->tree_table . \" WRITE\");\n\t}",
"public function testAcquire() {\n\n\t\t\t$lockName = uniqid();\n\n\t\t\t// simply try to lock\n\t\t\tSharedLock::lock($lockName, 5, 10);\n\t\t}",
"function create_lock(string $key): bool\n{\n if (is_lock($key)) {\n return false;\n }\n $logger = \\Logger::getLogger(\"files.lock\");\n $lockfn = get_lock_filename($key);\n $logger->debug(\"Lock filename: '$lockfn'\");\n if (file_exists($lockfn)) {\n unlink($lockfn);\n }\n touch($lockfn);\n $exists = file_exists($lockfn);\n if (!$exists) {\n $logger->error(\"Could not create lock file - $lockfn\");\n return false;\n }\n return true;\n}",
"public function acquireExclusiveLock() {}",
"function cacheObjectLocked ()\n {\n return is_file($this->cacheObjectId.'.lock');\n }",
"public function testDestiny2SetItemLockState()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function lockUnspent(array $lock);",
"public function acquire() {}",
"public function lock_read() {}",
"public function hasLocktype(){\n return $this->_has(31);\n }",
"private function updateComposerLock(): void\n {\n $composerLockPath = Util::getComposerLockFile();\n $composerJson = \\file_get_contents(Factory::getComposerFile());\n $composer = $this->container->get(Composer::class);\n\n $lockFile = new JsonFile($composerLockPath, null, $this->container->get(IOInterface::class));\n $locker = new Locker(\n $this->container->get(IOInterface::class),\n $lockFile,\n $composer->getRepositoryManager(),\n $composer->getInstallationManager(),\n (string) $composerJson\n );\n\n $lockData = $locker->getLockData();\n $lockData['content-hash'] = Locker::getContentHash((string) $composerJson);\n\n $lockFile->write($lockData);\n }",
"public function lockShared($lock_waiting_option = null) {}",
"public function initialize()\n\t{\n\t // attributes\n\t\t$this->setName('batch_job_lock');\n\t\t$this->setPhpName('BatchJobLock');\n\t\t$this->setClassname('BatchJobLock');\n\t\t$this->setPackage('Core');\n\t\t$this->setUseIdGenerator(false);\n\t\t// columns\n\t\t$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);\n\t\t$this->addColumn('JOB_TYPE', 'JobType', 'INTEGER', false, null, null);\n\t\t$this->addColumn('JOB_SUB_TYPE', 'JobSubType', 'INTEGER', false, null, null);\n\t\t$this->addColumn('OBJECT_ID', 'ObjectId', 'VARCHAR', false, 20, '');\n\t\t$this->addColumn('OBJECT_TYPE', 'ObjectType', 'INTEGER', false, null, null);\n\t\t$this->addColumn('ESTIMATED_EFFORT', 'EstimatedEffort', 'BIGINT', false, null, null);\n\t\t$this->addColumn('STATUS', 'Status', 'INTEGER', false, null, null);\n\t\t$this->addColumn('START_AT', 'StartAt', 'TIMESTAMP', false, null, null);\n\t\t$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);\n\t\t$this->addColumn('PRIORITY', 'Priority', 'TINYINT', false, null, null);\n\t\t$this->addColumn('URGENCY', 'Urgency', 'TINYINT', false, null, null);\n\t\t$this->addColumn('ENTRY_ID', 'EntryId', 'VARCHAR', false, 20, '');\n\t\t$this->addColumn('PARTNER_ID', 'PartnerId', 'INTEGER', false, null, 0);\n\t\t$this->addColumn('SCHEDULER_ID', 'SchedulerId', 'INTEGER', false, null, null);\n\t\t$this->addColumn('WORKER_ID', 'WorkerId', 'INTEGER', false, null, null);\n\t\t$this->addColumn('BATCH_INDEX', 'BatchIndex', 'INTEGER', false, null, null);\n\t\t$this->addColumn('EXPIRATION', 'Expiration', 'TIMESTAMP', false, null, null);\n\t\t$this->addColumn('EXECUTION_ATTEMPTS', 'ExecutionAttempts', 'TINYINT', false, null, null);\n\t\t$this->addColumn('VERSION', 'Version', 'INTEGER', false, null, null);\n\t\t$this->addColumn('DC', 'Dc', 'INTEGER', false, null, null);\n\t\t$this->addForeignKey('BATCH_JOB_ID', 'BatchJobId', 'INTEGER', 'batch_job_sep', 'ID', false, null, null);\n\t\t$this->addColumn('CUSTOM_DATA', 'CustomData', 'LONGVARCHAR', false, null, null);\n\t\t// validators\n\t}",
"function _admin_notice_post_locked()\n {\n }",
"function wp_check_post_lock($post)\n {\n }",
"private function removeLock($key) {\n @apc_delete($key . '.lock');\n }",
"public function createNewPatchesLock()\n {\n $this->patchCollection = $this->resolvePatches();\n $downloader = new Downloader($this->composer, $this->io, $this->getConfig('disable-downloaders'));\n foreach ($this->patchCollection->getPatchedPackages() as $package) {\n foreach ($this->patchCollection->getPatchesForPackage($package) as $patch) {\n $this->download($patch);\n $this->guessDepth($patch);\n }\n }\n $this->locker->setLockData($this->patchCollection);\n }",
"public function setLocked($locked = true) {}",
"function freeze() ;",
"private function refreshLockInformation()\n {\n $result = self::$db->fetchOne(\n 'SELECT lock, locktime FROM jukebox.playlists WHERE playlistid=$1',\n [$this->getID()]\n );\n $this->lock = empty($result['lock']) ? null : MyRadio_User::getInstance($result['lock']);\n $this->locktime = (int) $result['locktime'];\n }",
"public function getCronJobLock()\r\n {\r\n return $this->_loadClass('lockFile', true, array(GEMS_ROOT_DIR . '/var/settings/cron_lock.txt'));\r\n }",
"public function testLockReleaseFailsNotLockedAnymore() {\n\n\t\t\t$lockName = uniqid();\n\n\t\t\tSharedLock::lock($lockName, 0, 10);\n\n\t\t\t// simulate that the database lock was not hold\n\t\t\tif ($this->sqlExecute('DELETE FROM ' . SharedLock::getTable() . ' WHERE name = :name', [':name' => $lockName])->rowCount() != 1) {\n\t\t\t\t$this->fail('Test-Scenario-Error: Simulating lock deleted failed');\n\t\t\t}\n\n\t\t\t$this->setExpectedException(SharedLockReleaseException::class);\n\n\t\t\tSharedLock::unlock($lockName);\n\t\t}",
"public function acquireLock(int $id): void;",
"public function _lock_tables($tables) {\n // Must be overridden.\n }",
"protected function _getDefaultLockingContext() {\n\t\treturn 'typo3-legacy-api';\n\t}",
"public function trylock_read() {}",
"public function walletlock()\n\t{\n\t\treturn $this->_get_error($this->connect('walletlock'));\n\t}",
"private function removeLock($key) {\n @apc_delete ( $key . '.lock' );\n }",
"protected function lock()\n {\n $this->isStateLocked = true;\n }",
"private function lockConcurrentExecution()\n\t{\n\t\t$tag = $this->getLockTag();\n\t\t$app = \\Bitrix\\Main\\Application::getInstance();\n\t\t$managedCache = $app->getManagedCache();\n\t\t$managedCache->clean($tag);\n\t\t$managedCache->read(self::LOCK_TTL, $tag);\n\t\t$managedCache->setImmediate($tag, true);\n\t}",
"function lock_table($table_name, $alias = null) {\r\n\t\treturn;\r\n\r\n\t\t$sql = \"LOCK TABLES $table_name\";\r\n\r\n\t\tif (isset($alias)) {\r\n\t\t\t$sql .= \" AS $alias\";\r\n\t\t}\r\n\r\n\t\t$sql .= \" WRITE\";\r\n\r\n\t\treturn $this->query($sql);\r\n\r\n\t}",
"public function getMaintenanceLock()\n {\n return $this->getLockFile('lock.txt');\n }",
"protected function _getDumpLock(){\n\t\treturn $this->_dumpLock;\n\t}",
"function _update_locked () {\n\t\t\n\t\t// How old do locks have to be to get unlocked?\n\t\t$minutes = 10;\n\t\t\n\t\t$time = gmdate(\"Y-m-d H:i:s\", (time() - ($minutes * 60)));\n\t\t\n\t\t$q = $this->db->query(\"UPDATE commentreports\n\t\t\t\t\t\tSET \tlocked = NULL,\n\t\t\t\t\t\t\t\tlockedby = 0\n\t\t\t\t\t\tWHERE\tlocked < '$time'\n\t\t\t\t\t\t\");\n\t\n\t}",
"function wp_ajax_wp_remove_post_lock()\n {\n }",
"private function unlock() {\n\t\tif (file_exists($this -> lockfile)) {\n\t\t\tunlink($this -> lockfile);\n\t\t}\n\t}",
"public function lock($drop, Cart $cart)\n\t{\n\t}",
"function __destruct() {\n\t\tif (count($this->locks) > 0) {\n\t\t\tif (DEBUG > 0) {\n\t\t\t\tforeach ($this->locks as $id=>$fp) {\n\t\t\t\t\t$this->unlock($id);\n\t\t\t\t}\n\t\t\t\twriteLog(\"these locks have not been unlocked:\".print_r($this->locks, true),KATA_ERROR);\n\t\t\t}\n\t\t}\n\t}"
] | [
"0.69460756",
"0.6747951",
"0.673069",
"0.673069",
"0.673069",
"0.673069",
"0.673069",
"0.66911846",
"0.6621509",
"0.65507424",
"0.65036345",
"0.63380384",
"0.6212664",
"0.61554587",
"0.6136137",
"0.60556024",
"0.60331434",
"0.5976369",
"0.59563076",
"0.5946219",
"0.5936445",
"0.59345603",
"0.59219635",
"0.5917403",
"0.5906063",
"0.58830476",
"0.5879897",
"0.587625",
"0.58597606",
"0.5842568",
"0.5825957",
"0.5822135",
"0.5818839",
"0.5801139",
"0.5777412",
"0.5748976",
"0.5739884",
"0.5737284",
"0.571119",
"0.5691099",
"0.56857973",
"0.5676606",
"0.56553155",
"0.56511545",
"0.56403697",
"0.5628792",
"0.5612285",
"0.5598701",
"0.5598701",
"0.5598701",
"0.5598701",
"0.5598701",
"0.5594783",
"0.55870944",
"0.55611944",
"0.5555312",
"0.55405015",
"0.55342805",
"0.55333567",
"0.55189323",
"0.5518453",
"0.5518362",
"0.55059654",
"0.5505757",
"0.549524",
"0.5494388",
"0.5490656",
"0.5487076",
"0.54764754",
"0.54608667",
"0.54559773",
"0.5435921",
"0.54332787",
"0.5430435",
"0.5418774",
"0.5415949",
"0.53969187",
"0.5396634",
"0.53818446",
"0.5378318",
"0.53699595",
"0.5353947",
"0.53511643",
"0.53421324",
"0.53266513",
"0.53181595",
"0.5316786",
"0.530933",
"0.53092384",
"0.5301793",
"0.5294712",
"0.52933186",
"0.5291194",
"0.5284663",
"0.52816606",
"0.52812105",
"0.52741355",
"0.5273724",
"0.52572715",
"0.52560467"
] | 0.6970383 | 0 |
Write a function which takes any string as input, and returns it's reverse. For example, | public function reverseString( $string ) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function solution($str) {\n return strrev($str);\n}",
"function reverseString(&$str) {\n\t$str = strrev($str);\n}",
"function reverse($string)\n{\n $r = strlen($string);\n if($r == 1)\n {\n return $string;\n }\n else\n {\n $n--;\n return reverse(substr($string,1, $r)) . substr($string, 0, 1);\n }\n}",
"public function reverse();",
"public function reverse();",
"public function reverse();",
"public function reverse();",
"public function reversed();",
"function reverseStr(&$str) \n{ \n $n = strlen($str); \n \n // Swap character starting \n // from two corners \n for ($i = 0; $i < $n / 2; $i++) \n //swap the string \n list($str[$i], $str[$n - $i - 1]) = array($str[$n - $i - 1], $str[$i]); \n}",
"public function reverse() {}",
"public function reverse()\n {\n $reversed = UTF8::strrev($this->str);\n\n return static::create($reversed, $this->encoding);\n }",
"function reverseThisRek(string $string)\n {\n if(strlen($string) > 1)\n {\n return substr($string, -1) . reverseThisRek(substr($string, 0, -1));\n }\n return $string;\n }",
"function reverseThisIter(string $string)\n {\n $stringArray = str_split($string);\n $length = count($stringArray);\n \n for($i = 0; $i < $length; $i++)\n {\n $newString[] = array_pop($stringArray);\n }\n \n $string = implode(\"\", $newString);\n \n return $string;\n }",
"function utf8_strrev($str){\n preg_match_all('/./us', $str, $ar);\n return join('',array_reverse($ar[0]));\n}",
"public function reverse() {\n $str = Input::get ( 'value' );\n $task = new My_task;\n $result = $task->reverse($str);\n return $result;\n }",
"function reverseWords(String $str) : String {\n\n $rev = strrev(preg_replace('/[^a-zA-Z *]/','', strtolower($str)));\n $strx = array_reverse(explode(' ',$rev));\n return implode(' ',$strx);\n\n}",
"function reverse()\n {\n }",
"function reverse($object);",
"public function reverseString($str) {\r\n if (!$str) {\r\n return '';\r\n }\r\n $length = strlen($str);\r\n $reversedString = '';\r\n // Loop to reverse the given string/number\r\n for ($i = $length - 1; $i >= 0; $i--) {\r\n $reversedString .= $str{$i};\r\n }\r\n return $reversedString;\r\n }",
"function palindrome($input){\n $trimed = strtolower(preg_replace('/\\W/', '', $input.\"\"));\n //if the string is a palindrome it must evaluate true when compared to itself reversed\n return strcmp($trimed,strrev($trimed))==0?\"True\":\"False\";\n \n}",
"function isPalindrome($string) {\n return (strlen($string) > 1 && $string === strrev($string));\n}",
"public function reverse() : Str\n {\n $this->string = strrev($this->string);\n return $this;\n }",
"public function reverseTransform($str)\n {\n return parent::reverseTransform(substr($str, 4));\n }",
"function palindromChecker($string)\n{\n\t$stringArray = str_split($string, 1);\n\t$newArray = [];\n\tfor ($i = count($stringArray) - 1; $i > -1; $i--) {\n\t\tarray_push($newArray, $stringArray[$i]);\n\t}\n\t$reverseWord = implode('', $newArray);\n\tif ($string == $reverseWord) {\n\t\techo 'The word is palindrome';\n\t} else {\n\t\techo 'The word is not palindrome';\n\t}\n}",
"protected function reverseWord(string $word): string\n {\n return strrev($word);\n }",
"function MyMod_Sort_Reverse_Get($reverse=\"\")\n {\n $reverse=$this->Reverse;\n if ($reverse==\"\")\n {\n $value=$this->CGI_GETint($this->ModuleName.\"_Reversed\");\n \n if (!empty($value))\n {\n $reverse=$value;\n }\n else\n {\n $reverse=0;\n }\n }\n\n return $reverse;\n }",
"function palindrome($letter) \n{\n if ($letter == strrev($letter))\n return 1;\n else\n\t return 0;\n}",
"public function reverse($value) {\n return $this->setProperty('reverse', $value);\n }",
"public function reverse($value) {\n return $this->setProperty('reverse', $value);\n }",
"public function GetReverseParams ();",
"function isPalindrome($text) {\r\n \r\n $length = strlen($text);\r\n $flippedText = '';\r\n\r\n if ($length != 0 || $length > 1) {\r\n for ($i=1; $i <= $length; $i++) {\r\n $flippedText .= $text[-$i];\r\n }\r\n } else {\r\n return true;\r\n }\r\n \r\n if ($flippedText === $text) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n \r\n\r\n}",
"public function reversal()\n {\n }",
"public function reversePart($lo,$hi);",
"function right($str, $length) {\n return substr($str, -$length);\n}",
"public function reverse($latitude, $longitude);",
"function reverse_ip($ip)\n{\n\t$new_ip = array_reverse(explode('.', $ip));\n\t$new_ip = implode('.', $new_ip);\n\treturn $new_ip;\n}",
"public static function reverseOrder($order)\n {\n if (!\\trim($order))\n {\n return $order;\n }\n\n $parts = \\explode(',', $order);\n\n for ($i = 0, $n = \\count($parts); $i < $n; ++$i)\n {\n $v = \\strtolower($parts[$i]);\n\n if (\\strpos($v, ' asc') !== false)\n {\n $parts[$i] = \\preg_replace('/asc/i', 'DESC', $parts[$i]);\n }\n elseif (\\strpos($v, ' desc') !== false)\n {\n $parts[$i] = \\preg_replace('/desc/i', 'ASC', $parts[$i]);\n }\n else\n {\n $parts[$i] .= ' DESC';\n }\n }\n return \\join(',', $parts);\n }",
"function right($string, $count){\n return substr($string, (strlen($string) - $count), strlen($string));\n}",
"function rt($string, $args = array()) {\n return $string;\n}",
"function eT_dtora_reverse2dritta($datareverse, $sepaore=\":\", $sepadtora=\" \", $sepadt=\"/\") {\n $anno = substr($datareverse,0,4);\n $mese = substr($datareverse,4,2);\n $giorno = substr($datareverse,6,2);\n $ore = substr($datareverse,8,2);\n $minuti = substr($datareverse,10,2);\n $secondi = substr($datareverse,12,2);\n \n return $giorno.$sepadt.$mese.$sepadt.$anno.$sepadtora.$ore.$sepaore.$minuti.$sepaore.$secondi; \n}",
"public function reverseMatch( $pArgument = array() );",
"function funnyString($s) {\n $str_array = str_split($s);\n $rev_array = array_reverse($str_array);\n $s_ascii = [];\n $r_ascii = [];\n for($i=0; $i<count($str_array); $i++) {\n array_push($s_ascii, ord($str_array[$i]));\n array_push($r_ascii, ord($rev_array[$i]));\n }\n $s_diff = [];\n $r_diff = [];\n for($j=0; $j<count($s_ascii)-1; $j++ ) {\n array_push($s_diff, abs($s_ascii[$j]-$s_ascii[$j+1]));\n array_push($r_diff, abs($r_ascii[$j]-$r_ascii[$j+1]));\n }\n if( $s_diff === $r_diff ) {\n return \"Funny\";\n }\n else {\n return \"Not Funny\";\n }\n}",
"function reverse_strrchr($haystack, $needle) {\n\tif (!is_string($haystack)) {\n\t\treturn;\n\t}\n\treturn strrpos($haystack, $needle) ? substr($haystack, 0, strrpos($haystack, $needle) +1) : false;\n}",
"function reverse_strrchr( $haystack, $needle, $trail ) {\n\t\treturn strrpos( $haystack, $needle ) ? substr( $haystack, 0, strrpos( $haystack, $needle ) + $trail ) : false;\n\t}",
"function strrevpos($instr, $needle)\n{\n $rev_pos = strpos (strrev($instr), strrev($needle));\n if ($rev_pos===false) return false;\n else return strlen($instr) - $rev_pos - strlen($needle);\n}",
"public function reverse(array $params = array())\n {\n $parsed = $this->reverse;\n foreach ($params as $name => $value) {\n $parsed = str_replace(':' . $name, $value, $parsed);\n }\n return $parsed;\n }",
"function palindrome($string) {\n\t$string = strtolower($string);\n\t//take out white spaces and punctuation\n\t$string_parts = str_split($string);\n\tfor ($i=0; $i < strlen($string) ; $i++) { \n\t\tif(ctype_punct($string_parts[$i]) || ctype_space($string_parts[$i])){\n\t\t\tunset($string_parts[$i]);\n\t\t}\n\t}\n\t//reindex array\n\t$string_parts = array_values($string_parts);\n\t//we'll use these to find the middle of the palindrome string.\n\t$max = count($string_parts);\t\n\t$num = (($max-1)/ 2);\n\t\n\tif(is_float($num)) {\n\t\t//the number of characters was even\n\t\tfor ($i = floor($num) , $j = ceil($num) ; $i>=0 , $j <= $max-1 ; $i-- , $j++) { \n\t\t\tif($string_parts[$i] !== $string_parts[$j]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\t//the number of characters was odd\n\t\tfor ($i = $num, $j = $num ; $i>=0 , $j <= $max-1 ; $i-- , $j++) { \n\t\t\tif($string_parts[$i] !== $string_parts[$j]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn true;\n\t\n}",
"public function reverse()\n {\n $this->load->view('reverse');\n }",
"public function reverseTransform($string) {\n\t\t\treturn json_decode($string);\n\t\t}",
"public function reverseArray($expression): static;",
"public function reverse()\n {\n return $this::from(array_reverse($this->hash, true));\n }",
"protected function sanitizeToReverseWithoutDigit(string $renavam): string\n {\n $renavamWithoutDigit = substr($renavam, 0, 10);\n\n return strrev($renavamWithoutDigit);\n }",
"public function reversal($request);",
"abstract public function reverse($preserveKeys = false);",
"function reverse($array = [])\n{\n\t$reverseArray = [];\n\tfor ($i = count($array) - 1; $i > -1; $i--) {\n\t\tarray_push($reverseArray, $array[$i]);\n\t}\n\treturn $reverseArray;\n}",
"public static function reverse_strrchr($haystack, $needle, $trail) {\r\n return strrpos($haystack, $needle) ? substr($haystack, 0, strrpos($haystack, $needle) + $trail) : false;\r\n }",
"static function right($str, $length)\n {\n return substr($str, -$length);\n }",
"function InvDigits(&$K){\n $K = strrev($K);\n}",
"public function invert();",
"public function reverse($destinationFieldValue, $field, $source, $destination);",
"public function reverseLinkedList($node){\n $prev = null;\n // put passed node or head in current variable\n $current = $node;\n\n // While current is not null, we aren't at the end loop\n while ($current !== null ) {\n // put the next node in the next variable\n $next = $current->getNext();\n // set the next of the current to the previous node\n $current->setNext($prev);\n // swap prev for the current\n $prev = $current;\n // set current to the next\n $current = $next;\n }\n\n // Head becomes the last prev node\n $node = $prev;\n\n return $node;\n }",
"function substr_right($string, $length)\n{\n\treturn substr($string, -$length, $length);\n}",
"public static function decrypt($string) {\n\t\treturn abacaEncrypt ( $string, 'DECODE', self::$key );\n\t}",
"function decodeString($string);",
"function right($value, $count){\n return substr($value, ($count*-1));\n}",
"function isPalindrome($str) {\n if (empty($str)) {\n return 0;\n }\n list($front, $back) = [0, strlen($str)-1];\n while ($front < $back) {\n while (!ctype_alnum($str[$front])) {\n $front++;\n if ($front >= strlen($str)) {\n return 1;\n }\n }\n while (!ctype_alnum($str[$back])) {\n $back--;\n if ($back < 0) {\n return 1;\n }\n }\n if (strtolower($str[$front]) != strtolower($str[$back])) {\n return 0;\n }\n $front++;\n $back--;\n }\n return 1;\n}",
"public function reverse() {\n\t\t$clone = clone $this;\n\t\t\n\t\tif (is_array($clone->order)) {\n\t\t\tforeach ($clone->order as &$value) {\n\t\t\t\t$value[1] = $value[1] == 'DESC' ? 'ASC' : 'DESC';\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t$clone->sql = null;\n\t\treturn $clone;\n\t}",
"public function reverseConvert ($value)\n {\n return $value;\n }",
"function decode($string);",
"function my_utf8_decode($string)\n{\nreturn strtr($string,\n \"???????¥µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ\",\n \"SOZsozYYuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy\");\n}",
"function rervertWord ($tekst){\n \n $revertTekst = \"\";\n // we gebruiken een fot omdat we een rangwomvang kennen.\n for ($index = strlen($tekst) -1 ; $index > -1 ;$index --){\n echo $tekst[index];\n $reverttekst = $revertTekst + $tekst[$index];\n }\n \n \n return $revertTekst;\n}",
"function is_palindrome($i){\n\t\t\t\t\n\t\t\t\tif($i == strrev($i)){\n\t\t\t\t\techo \"The word \". $i.\" is a palindrome</br>\";\n\t\t\t\t}else{\n\t\t\t\t\techo \"The word \". $i. \" is not a palindrome</br>\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}",
"public function reverse() {\n $prev = NULL;\n $curr = $this->head;\n $next = $this->head->next;\n $this->tail = $this->head;\n\n while (!empty($curr)) {\n $curr->next = $prev;\n $prev = $curr;\n $curr = $next;\n $next = $next->next;\n }\n $this->head = $prev; \n }",
"function reverse($data) {\t\t\n\t$rules = array(\n\t\t\"111\" => \"0\",\n\t\t\"110\" => \"0\",\n\t\t\"101\" => \"0\",\n\t\t\"100\" => \"1\",\n\t\t\"011\" => \"1\",\n\t\t\"010\" => \"1\",\n\t\t\"001\" => \"1\",\n\t\t\"000\" => \"0\"\n\t);\n\n\t// This array starts with each of the rules, and is whittled down until only one possible sequence matches.\n\t// We build a number of potential ancestor strings from the rules, which become possible matches to the actual previous row.\n\t$possibleMatches = array();\n\n\t// We step through each character in our row, to evaluate which ancestor rules it matches with\n\tfor ($i = 0; $i < strlen((string)$data); $i ++) {\n\n\t\t// We are going to compare the possible matches so far with the current rules which match.\n\t\t$newMatches = array();\n\n\t\t// We just want to check every rule to see if it fits into any of the possible match strings so far.\t\t\n\t\tforeach ($rules as $rule => $value) {\n\n\t\t\t// Does the data row's input character equal the rule's output character?\t\t\t\n\t\t\tif ((string)$value == ((string)$data[$i])) {\n\n\t\t\t\t// Only on the first step, push each rule into the array or possible - gotta start somewhere, and for the first character, every ancestor rule could apply.\n\t\t\t\tif ($i == 0) {\n\t\t\t\t\tarray_push($newMatches, substr((string)$rule, 1, 2));\n\t\t\t\t} \n\n\t\t\t\telse {\n\t\t\t\t\tforeach($possibleMatches as $part) {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t(isset(((string)$part)[$i]) && ((string)$rule)[1] == ((string)$part)[$i]) \t// Does the rule's middle character match the current end of the possible match?\n\t\t\t\t\t\t\t\t&& ((string)$rule)[0] == ((string)$part)[$i-1]\t\t\t\t\t\t\t\t// And does the rule's first character match with the second last character of the possible match?\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// (essentially - does the rule line up with any of the current possible strings?)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t// Generate the next possible string by adding the right-most character of the rule-part to one of the possible matches\n\t\t\t\t\t\t\t\t$newData = (string)$part . ((string)$rule)[2];\n\n\t\t\t\t\t\t\t\t// Just a quick hack to force the rightmost overflow bit to be a zero\n\t\t\t\t\t\t\t\tif ($i + 1 >= strlen($data) - 1) {\n\t\t\t\t\t\t\t\t\tif (((string)$rule)[2] != \"0\") $newData = \"\";\n\t\t\t\t\t\t\t\t} \n\n\t\t\t\t\t\t\t\t// Add our new string to the array of possible matches\n\t\t\t\t\t\t\t\tif ($newData != \"\") array_push($newMatches, $newData);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// (we could probably unset non matching strings above instead of reassigning here)\n\t\t$possibleMatches = $newMatches;\t\n\t}\n\treturn substr($possibleMatches[0], 0, strlen($data));\n}",
"function inverse_casse($car)\n{\n if (car_to_lower($car)) {\n return car_to_upper(($car));\n } else {\n return car_to_lower($car);\n }\n}",
"public function reverse(array $words): string\n {\n return implode(' ', array_reverse(array_map([$this, 'reverseWord'], $words)));\n }",
"static public function selectReverse($scope = \"\")\n {\n $string = <<<EOT\n<script type=\"text/javascript\">\nfunction selectReverse(scope)\n{ \n if(scope)\n {\n $('#' + scope + ' input').each(function() \n {\n $(this).attr(\"checked\", !$(this).attr(\"checked\"))\n });\n }\n else\n {\n $('input').each(function() \n {\n $(this).attr(\"checked\", !$(this).attr(\"checked\"))\n });\n }\n}\n</script>\nEOT;\n global $lang;\n $string .= \"<input type='button' name='reversechecker' id='reversechecker' value='{$lang->selectReverse}' onclick='selectReverse(\\\"$scope\\\")'/>\";\n return $string;\n }",
"public function isPalindrome($str) {\r\n if (!$str) {\r\n return '';\r\n }\r\n $strlength = strlen($str);\r\n $reversedString = $this->reverseString($str);\r\n \r\n return ($str == $reversedString) ? TRUE : FALSE;\r\n }",
"function converteData($data){\n return (preg_match('/\\//',$data)) ? implode('-', array_reverse(explode('/', $data))) : implode('/', array_reverse(explode('-', $data)));\n}",
"function checkPalindrome($n){\n\n $actual = $n;\n // 4 = 4x1\n // 23 = 2x10 + 3x1\n // 123 = 1x100 + 2x10 + 3x1\n $length = strlen($n);\n\n\n\n //1 = 10^(length-1)\n // 10 = 10^(2-1)\n // 100 = 10^(3-1)\n\n // 101101 / 100000 = 1 1101\n // 1101 / 10000 = 0 1101\n // 1101 / 1000 = 1 101\n // 101 / 100 = 1 1\n // 1 / 10 = 0 1\n // 1 / 1 = 1\n $num = array();\n for($i=($length-1);$i>=0;$i--){\n $digit = pow(10,$i);\n $quo = (int)($n/$digit);\n $num[] = $quo;\n $rem = $n%$digit;\n $n = $rem;\n }\n\n $new_num = array_reverse($num);\n $reversed = implode('',$new_num);\n $reversed = (int)$reversed;\n\n if($actual == $reversed){\n echo \"The number \".$actual.\" is palindrome\";\n }\n else{\n echo \"The number \".$actual.\" is not a palindrome\";\n }\n\n}",
"public function translate($string, $inverse = false)\n\t{\n // Translate URL strings here.\n $segments = array(\n // Original Translated\n 'account' => 'account',\n 'album' => 'album',\n 'albumform' => 'albumform',\n 'albummedia' => 'albummedia',\n 'albums' => 'albums',\n 'categories' => 'categories',\n 'category' => 'category',\n 'categoryform' => 'categoryform',\n 'discover' => 'discover',\n 'group' => 'group',\n 'groupform' => 'groupform',\n 'groupmedia' => 'groupmedia',\n 'groupmembers' => 'groupmembers',\n 'groups' => 'groups',\n 'media' => 'media',\n 'mediaform' => 'mediaform',\n 'mediaitem' => 'view',\n 'playlist' => 'playlist',\n 'playlistform' => 'playlistform',\n 'playlistmedia' => 'playlistmedia',\n 'playlists' => 'playlists',\n 'search' => 'search',\n 'slideshow' => 'slideshow',\n 'upload' => 'upload',\n 'channel' => 'channel',\n 'channelform' => 'channelform',\n 'channels' => 'channels', \n );\n\n if (!$inverse && isset($segments[$string]))\n {\n return JApplication::stringURLSafe($segments[$string]);\n }\n elseif ($inverse && in_array($string, $segments))\n {\n if ($key = array_search($string, $segments))\n {\n return JApplication::stringURLSafe($key);\n }\n }\n \n return $string;\n }",
"public static function iso_descrambler($string) {\n\t if (!preg_match('#\\=\\?(.+)\\?Q\\?(.+)\\?\\=#i', $string, $matches)) {\n\t\treturn $string;\n\t } else {\n\t\t$subject = str_replace('_', ' ', $matches[2]);\n\t\t$subject = preg_replace('#\\=([0-9a-f]{2})#ei', \"chr(hexdec(strtolower('$1')))\", $subject);\n\t\treturn $subject;\n\t }\n\t}",
"function generate_permalink($string = \"\") {\n\t$string = html_entity_decode($string, ENT_QUOTES, 'UTF-8');\n\t// Replace non letter or digits by -\n\t$string = preg_replace('~[^\\\\pL\\d.]+~u', '-', $string);\n\t// Replace dots\n\t$string = str_replace(\".\", \"_\", $string);\n\t// Trim\n\t$string = trim($string, '-');\n\t// Transliterate\n\tif (function_exists('iconv')) {\n\t\t$string = iconv('UTF-8', 'us-ascii//TRANSLIT//IGNORE', $string);\n\t}\n\t// Lowercase\n\t$string = strtolower($string);\n\t// Remove unwanted characters\n\t$string = preg_replace('~[^-\\w.]+~', '', $string);\n\n\treturn $string;\n}",
"function esquerda($str, $length) \n{\n\t$length++;\n return substr($str, (strlen($str) - $length), $length - 1);\n}",
"function checker($word){\r\n\tif (strrev($word) == $word){\r\n\t\treturn true; \r\n\t}\r\n\telse{\r\n\t\treturn false; //returns the condition\r\n\t}\r\n\t}",
"function reverse () {\r\n\t$rev = $this;\r\n $rev->edits = array();\r\n foreach ($this->edits as $edit) {\r\n $rev->edits[] = $edit->reverse();\r\n }\r\n\treturn $rev;\r\n }",
"public static function reverse($params, $full = false)\n {\n $params = static::reverseToArray($params);\n\n return static::url($params, $full);\n }",
"public function reverse() {\n $rev = $this;\n $rev->edits = [];\n foreach ($this->edits as $edit) {\n $rev->edits[] = $edit->reverse();\n }\n return $rev;\n }",
"function invert(callable $x): callable\n{\n return function ($y) use ($x): bool {\n return ! $x($y);\n };\n}",
"public function testReduceRight() {\n\t\t$array = str_split('reverse');\n\t\t$string = _::reduceRight($array, function($memo, $value) {\n\t\t\treturn \"$memo$value\";\n\t\t});\n\t\t$this->assertEquals('esrever', $string);\n\t}",
"public function convert($str, $reverse = false)\n {\n $encoding = $this->getEncoding();\n $convertEncoding = $this->getConvertEncoding();\n if ($convertEncoding === null) {\n throw new Exception\\LogicException(\n 'No convert encoding defined'\n );\n }\n\n if ($encoding === $convertEncoding) {\n return $str;\n }\n\n $fromEncoding = $reverse ? $convertEncoding : $encoding;\n $toEncoding = $reverse ? $encoding : $convertEncoding;\n\n if (null === $toEncoding || null === $fromEncoding) {\n return $str;\n }\n\n // automatically add \"//IGNORE\" to not stop converting on invalid characters\n // invalid characters triggers a notice anyway\n return iconv($fromEncoding, $toEncoding . '//IGNORE', $str);\n }",
"function isPalindromreUseRecursion($string)\n{\n $stringLength = strlen($string);\n echo 'We have : ' . $stringLength . ' chars<br>';\n echo 'Compare first: '\n . $string[0]\n . ' >< '\n . 'last: '\n . $string[$stringLength - 1] . ' chars<br><br>';\n\n // Check Base case\n if (3 > $stringLength) {\n return true;\n }\n\n if ($string[0] === $string[$stringLength - 1]) {\n $stringTrimmed = substr($string, 1, -1);\n\n isPalindromreUseRecursion($stringTrimmed);\n }\n\n return false;\n}",
"function reverseArray($a) {\n\n $arrayCount = count($a);\n $start = 0;\n $end = $arrayCount-1;\n \n\n while($start < $end) {\n $temp = $a[$start];\n $a[$start] = $a[$end];\n $a[$end] = $temp;\n ++$start;\n --$end;\n }\n \n return $a;\n\n}",
"function ROR($binner, $shift)\n{\n $length = strlen($binner);\n for ($i = 0; $i < $shift; $i++) {\n $x = substr($binner, -1);\n $temp = $x . substr($binner, 0, $length - 1);\n $binner = $temp;\n }\n}",
"function delLastChar($string=\"\")\n{\n\t$t = substr($string, 0, -1);\n\treturn($t);\n}",
"public function invert( $A );",
"public function reverse()\n {\n $array = $this->toArray();\n return static::createFormArray(array_reverse($array), false);\n }",
"protected function backwards($element, $text, $last)\n\t{\n\t\t$disabler = function($page) { return $page <= 1; };\n\n\t\treturn $this->element($element, $text, $last, $disabler);\n\t}",
"function pos(string $string) {\n $result = \"\";\n\n for ($x = strlen($string) - 1; $x >= 0; $x--) {\n $result .= substr($string, $x, 1);\n }\n return $result;\n}",
"function is_palindrome($phrase)\n{\n\t$split_phrase = str_split($phrase); //split the word into an array by letter\n \n foreach ($split_phrase as $key => $letter) \n {\n\t if (!ctype_alpha($letter))\n {\n unset($split_phrase[$key]);\n }\n\t}\n $reverse_array = $split_phrase;\n $orig_phrase = implode(\"\", $split_phrase);\n krsort($reverse_array);\n $rev_phrase = implode(\"\", $reverse_array);\n if ($orig_phrase==$rev_phrase) \n {\n echo \" is a palindrome.\\n\";\n return true;\n\n }\n else\n {\n echo \" is not a palindrome.\\n\";\n return false;\n }\n}"
] | [
"0.7737465",
"0.7521762",
"0.75001484",
"0.7224193",
"0.7224193",
"0.7224193",
"0.7224193",
"0.707716",
"0.7007522",
"0.6929951",
"0.69180924",
"0.68492144",
"0.67312324",
"0.6600258",
"0.65217924",
"0.6451435",
"0.63529676",
"0.6351132",
"0.6301745",
"0.6197365",
"0.61238897",
"0.6093211",
"0.60381913",
"0.59428906",
"0.5829192",
"0.58196354",
"0.5808442",
"0.5696209",
"0.5696209",
"0.56893396",
"0.5644597",
"0.5607967",
"0.5588661",
"0.55561423",
"0.5551579",
"0.5507514",
"0.55014896",
"0.5487065",
"0.5468602",
"0.5409044",
"0.54065865",
"0.5381085",
"0.53795004",
"0.5343405",
"0.53380334",
"0.52960235",
"0.5282899",
"0.5274319",
"0.527071",
"0.5264609",
"0.52120954",
"0.52089757",
"0.51773864",
"0.5172477",
"0.5171076",
"0.5170447",
"0.5168328",
"0.5161521",
"0.5152091",
"0.511049",
"0.5067784",
"0.5066542",
"0.5058536",
"0.5053456",
"0.50488174",
"0.50110435",
"0.500287",
"0.49798644",
"0.49633017",
"0.49632663",
"0.4953144",
"0.49519575",
"0.49518853",
"0.4951833",
"0.49449727",
"0.49366528",
"0.49143466",
"0.49041048",
"0.48858452",
"0.48829505",
"0.48790333",
"0.48743403",
"0.48664007",
"0.486409",
"0.48567343",
"0.4851551",
"0.4850132",
"0.4840646",
"0.48315006",
"0.48305383",
"0.48282248",
"0.48244157",
"0.48234126",
"0.47993693",
"0.47967502",
"0.47871673",
"0.47868466",
"0.47792152",
"0.47764722",
"0.47749695"
] | 0.80795825 | 0 |
Write a function which returns the longest word in the first paragraph of the Ghettysburg Address (provided in Questions::GHETTYSBURG_ADDRESS below. | public function findLongestWord() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getLongestWord($sentence) {\n\t\t$words = explode(' ', $sentence);\n\n\t\t$longestWord = '';\n\n\t\t$nbWords = count($words);\n\n\t\tif($nbWords > 0) {\n\t\t\t$longestWord = $words[0];\n\t\t}\n\n\t\tfor($i = 0; $i < $nbWords; $i++) {\n\t\t\tif(strlen($words[$i]) > strlen($longestWord)) {\n\t\t\t\t$longestWord = $words[$i];\n\t\t\t}\n\t\t}\n\t\treturn $longestWord;\n\t}",
"public function wordLength(){\n\n\t\t\t\t\n\t\t\t\t$array = explode(' ',$this->sentence);\n\t\t\t\t$Length = strlen($array[0]);\n\t\t\t\t$shortestWord=NULL;\n\n\t\t\t\tforeach ($array as $word) {\n \t\t\t\t\tif (strlen($word) < $Length) {\n \t\t\t\t\t $Length = strlen($word);\n \t\t\t \t\t $shortestWord = $word;\n \t\t\t\t }\n\t\t\t\t}\n\t\t\t\techo $shortestWord;\n\n\t\t\t}",
"function wpe_excerptlength_homelatest($length) {\n return 13;\n}",
"function acoc_max_charlength($charlength, $text = NULL) {\n\tif ($text) {\n\t\t$excerpt = $text;\n\t} else {\n\t\t$excerpt = get_the_excerpt();\n\t}\n\n\t$charlength++;\n\tif (strlen($excerpt)>$charlength) {\n\t\t$subex = substr($excerpt,0,$charlength-5);\n $exwords = explode(\" \",$subex);\n\t\t$excut = -(strlen($exwords[count($exwords)-1]));\n\t\tif ($excut<0) {\n\t\t\treturn substr($subex,0,$excut);\n\t\t} else {\n\t\t\treturn $subex;\n\t\t}\n\t\treturn '..';\n\t} else {\n\t\treturn $excerpt;\n\t}\n}",
"function the_excerpt_max_charlength($charlength) {\n $excerpt = get_the_excerpt();\n $charlength++;\n if(strlen($excerpt)>$charlength) {\n $subex = substr($excerpt,0,$charlength-5);\n $exwords = explode(\" \",$subex);\n $excut = -(strlen($exwords[count($exwords)-1]));\n if($excut<0) {\n echo substr($subex,0,$excut);\n } else {\n \t echo $subex;\n }\n echo ' <a href=\"'.get_permalink().'\"> Read more ...</a>';\n } else {\n\t echo $excerpt;\n }\n}",
"static function last_word($sentence){\n if(!isset($sentence)){\n $result = '0';\n }else{\n $all_word=explode(\" \", $sentence);\n $last_word=$all_word[count(explode(\" \", $sentence))-1];\n $result = strlen($last_word);\n\n }\n return $result;\n }",
"function anteprima($txt, $lung_max) {\n\n return (count($words = explode(' ', $txt)) > $lung_max) ? implode(' ', array_slice($words, 0, $lung_max)) . \"...\" : $txt;\n\n}",
"public static function longestString($array) {\r\n\t$i = 0;\r\n\t\r\n\tforeach ($array as $value) {\t\r\n\t\tif (strlen($value) > $i) {\t\r\n\t\t\t$i = strlen($value);\r\n\t\t}\t\t\t\r\n\t}\r\n\t\r\n\treturn $i;\r\n}",
"function lengthOfLastWord($str)\n{\n if (strlen($str)==0) {\n return;\n }\n $arr = explode(\" \", $str);\n $result = array_diff($arr, array(''));\n $result = strlen($result[count($result)-1]);\n return $result;\n}",
"function tronquer_texte($texte, $longeur_max)\n{\n if (strlen($texte) > $longeur_max)\n {\n $texte = substr($texte, 0, $longeur_max);\n $dernier_espace = strrpos($texte, \"\");\n $texte = substr($texte, 0, $dernier_espace).\"...\";\n }\n return $texte;\n}",
"function limit_content($title,$len) {\n if (str_word_count($title) > $len) {\n $keys = array_keys(str_word_count($title, 2));\n $title = substr($title, 0, $keys[$len]);\n }\n return $title;\n}",
"function rls_text_excerpt($length) {\n return 25;\n}",
"function tz_excerpt_length($length) {\nreturn 55; }",
"public function getMaxLength();",
"function getLittleDescription($texte, $nbchar = 20)\n{\nreturn (strlen($texte) > $nbchar ? substr(substr($texte,0,$nbchar),0,strrpos(substr($texte,0,$nbchar),\" \")).\"...\" : $texte);\n}",
"function shapeSpace_truncate_string($phrase, $max_words) {\n\t\n\t$phrase_array = explode(' ', $phrase);\n\t\n\tif (count($phrase_array) > $max_words && $max_words > 0) \n\t\t$phrase = implode(' ', array_slice($phrase_array, 0, $max_words)) . __('...', 'shapespace');\n\t\n\treturn $phrase;\n\t\n}",
"public function getLastWord()\n {\n return $this->lastword;\n }",
"function trimWordLen($str, $max) {\n $str = cleanSpaces($str);\n $lines = explode(\"\\n\", $str);\n $ss = \"\";\n foreach ($lines as $i => $line) {\n $words = explode(\" \", $line);\n foreach ($words as $j => $w)\n $ss.=trimWord($w, $max) . \" \";\n $ss.=\"\\n\";\n }\n return cleanSpaces($ss);\n}",
"function longExplanation($text) {\n $students = \"Information for students and parents that are currently a part of the team or are interested in joining.\";\n if ($text == \"STUDENTS\") {\n return $students;\n }\n}",
"function adr_link_length($link, $max)\n{\n\tif (strlen($link) > $max)\n\t\t$newlink = substr($link, 0, ($max - 3)) .'...';\n\telse\n\t\t$newlink = $link;\nreturn $newlink;\n}",
"function atSubstrwords($text, $maxchar, $end = '...')\n{\n if (strlen($text) > $maxchar || $text == '') {\n $words = preg_split('/\\s/', $text);\n $output = '';\n $i = 0;\n while (1) {\n $length = strlen($output) + strlen($words[$i]);\n if ($length > $maxchar) {\n break;\n } else {\n $output .= \" \" . $words[$i];\n ++$i;\n }\n }\n $output .= $end;\n } else {\n $output = $text;\n }\n return $output;\n}",
"function substrwords($text,$maxchar){\n\tif (strlen($text) > $maxchar) { \n\t\t$words = explode(\" \", $text); \n\t\t$output = ''; \n\t\t$i = 0; \n\t\twhile (true) { \n\t\t\t$length = (strlen($output) + strlen($words[$i]));\n\t\t\tif ($length > $maxchar) { \n\t\t\t\tbreak; \n\t\t\t} else { \n\t\t\t\t$output = $output . \" \" . $words[$i]; \n\t\t\t\t++$i; \n\t\t\t} \n\t\t}\n\t} else { \n\t\t$output = $text;\n\t}\n\t return $output;\n}",
"function too_long_words($text,$word_maxlength)\n {\n $text = preg_replace(\"/\\015\\012|\\015|\\012/\", \"\\n\", $text);\n $text = str_replace(\"\\n\", ' ', $text);\n $words = explode(' ',$text);\n foreach($words as $word)\n {\n $length = mb_strlen(trim($word), CHARSET);\n if($length > $word_maxlength)\n {\n $too_long_words[] = $word;\n }\n }\n if(isset($too_long_words))\n {\n return $too_long_words;\n }\n return false;\n }",
"function maxlength($text, $max, $shorten=true)\n{\nif(strlen($text) >= $max) {\nif($shorten) {\n$text = substr($text, 0, ($max-3)).\"...\";\n} else {\n$text = substr($text, 0, ($max));\n} }\nreturn $text;\n}",
"function ellipsis($long_string, $max_character = 30) {\n $short_string = strlen($long_string) > $max_character ? substr($long_string, 0, $max_character).\"...\" : $long_string;\n\t\treturn $short_string;\n }",
"function _char_limit($str, $length, $minword = 3)\n {\n $sub = '';\n $len = 0;\n \n foreach (explode(' ', $str) as $word)\n {\n $part = (($sub != '') ? ' ' : '') . $word;\n $sub .= $part;\n $len += strlen($part);\n \n if (strlen($word) > $minword && strlen($sub) >= $length)\n {\n break;\n }\n }\n \n return $sub . (($len < strlen($str)) ? '...' : '');\n\n }",
"function tfuse_substr($str, $length, $more = '...', $minword = 3) {\r\n $sub = '';\r\n $len = 0;\r\n \r\n foreach (explode(' ', $str) as $word) {\r\n $part = (($sub != '') ? ' ' : '') . $word;\r\n $sub .= $part;\r\n $len += strlen($part);\r\n \r\n if (strlen($word) > $minword && strlen($sub) >= $length)\r\n break;\r\n }\r\n \r\n return (($len < strlen($str)) ? $sub . ' ' . $more : $sub);\r\n }",
"function gallo_excerpt( $length ) {\n\treturn 30;\n}",
"public function getLongestLineLength(): int\n {\n return 0;\n }",
"function ts_get_shortened_string($text,$word_limit)\r\n{\r\n\t$words = explode(' ', $text, ($word_limit + 1));\r\n\tif(count($words) > $word_limit)\r\n\t{\r\n\t\tarray_pop($words);\r\n\t\treturn implode(' ', $words).\"...\";\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn implode(' ', $words);\r\n\t}\r\n}",
"private function longest_matching_varaible($full_name)\n {\n //start off assuming we haven't matched any variable\n $current_var = null;\n\n //store the length of the matched variable; this allows us to quickly determine the longer of the two variables\n $current_length = 0;\n\n //for each of the known variables\n foreach($this->vars as $var => $value)\n {\n //get the length of the variable name\n $length = strlen($var);\n\n //if the new variable is longer than our current one, and our matches the start of our our \"full name\"\n if($length > $current_length && substr($full_name, 0, $length) == $var)\n {\n //set it to our current variable\n $current_var = $var;\n\n //and store its length for quick comparison\n $current_length = $length;\n }\n }\n\n //return the current variable (or null, if we didn't find anything)\n return $current_var;\n\n }",
"public function getLongestLineNumberLength(): int\n {\n return 0;\n }",
"function d4tw_excerpt_length( $length ) {\n return 20;\n}",
"public function getName(): string\n {\n return 'Longest post by character length / month';\n }",
"function excerpt_size($legth = 150) {\r\n global $post;\r\n return substr(strip_tags($post->post_content), 0, $legth).'...';\r\n}",
"function get_excerpt($str, $startPos = 0, $maxLength = 100) {\n\tif (strlen($str) > $maxLength) {\n\t\t$excerpt = substr($str, $startPos, $maxLength - 3);\n\t\t$lastSpace = strrpos($excerpt, ' ');\n\t\t$excerpt = substr($excerpt, 0, $lastSpace);\n\t\t$excerpt .= '...';\n\t} else {\n\t\t$excerpt = $str;\n\t}\n\n\treturn $excerpt;\n}",
"function twentyten_excerpt_length( $length ) {\n\treturn 40;\n}",
"function twentyten_excerpt_length( $length ) {\n\treturn 40;\n}",
"function autosuggest_excerpt( $text ) {\n\t$text = strip_tags( $text );\n\t$blah = explode(' ', $text);\n\t$excerpt_length = 10;\n\tif (count($blah) > $excerpt_length) {\n\t\t$k = $excerpt_length;\n\t\t$use_dotdotdot = 1;\n\t} else {\n\t\t$k = count($blah);\n\t\t$use_dotdotdot = 0;\n\t}\n\t$excerpt = '';\n\tfor ($i=0; $i<$k; $i++) {\n\t\t$excerpt .= trim(ent2ncr($blah[$i])).' ';\n\t}\n\t$excerpt .= '[...]';\n\t$text = $excerpt;\n\treturn $text;\n}",
"public function getMaxLength() {}",
"function abbreviate_string($str, $maxlength, $place_holder='...')\n{\n $length = mb_strlen($str);\n \n if ($length > $maxlength)\n {\n $place_holder_length = mb_strlen($place_holder);\n $first_part_length = floor(($maxlength - $place_holder_length)/2);\n $second_starting_location = $length - $maxlength + $first_part_length + $place_holder_length;\n $str = mb_substr($str, 0, $first_part_length) . $place_holder . mb_substr($str, $second_starting_location);\n }\n\n return $str;\n}",
"function be_excerpt_length( $length ) { \n\t\n\t$length = '40'; \n\t\n\treturn $length;\n\t \n\t}",
"public function substrwords()\n {\n $longString = \"In this talk, we will show how to leverage InfluxDB to implement some solutions to tackle on the issues of time series forecasting at scale, including continuous accuracy evaluation and algorithm hyperparameters optimization.\";\n // echo strlen($longString);\n if (strlen($longString) > 160) {\n\n $this->truncated = substr($longString, 0, strpos(wordwrap($longString, 160), \"\\n\"));\n\n $this->truncated .= $this->end;\n echo $this->truncated;\n echo \"\\n\";\n\n $nd = $this->truncated = substr($longString, strpos(wordwrap($longString, 160), \"\\n\"));\n\n echo $this->end . $nd;\n\n #################\n # evans\n // $w = urldecode($MESSAGE);// remove special Characters\n // echo strlen($w);\n // $chars = 157;\n // while($w){\n // if (strlen($w) > $chars) {\n\n // // $chars += $chars; \n \n // $TruncMESSAGE = substr($w, 0, strpos($w, ' ', $chars)) . '...';// truncate from position 0-157\n // // $TruncMES = '...' . substr($w, strpos($w, ' ', 157));// truncate from position 157-...\n \n // $mes = array($TruncMESSAGE); // array with cut messages\n // foreach ($mes as $key) {\n // $encoded = urlencode($key);\n // $smsUrl = $emgUrl . \"&SOURCEADDR=\" . $SOURCEADDR . \"&DESTADDR=\" . $DESTADDR . \"&MESSAGE=\" . $encoded . \"&DLR=\" . $DLR . \"&USERNAME=\" . $smsuser . \"&PASSWORD=\" . $smspassword;\n // $smsResults = join('', file($smsUrl)); \n // echo $smsUrl; \n // echo \"\\n\"; \n \n // }\n \n // } else {\n \n // $smsUrl = $emgUrl . \"&SOURCEADDR=\" . $SOURCEADDR . \"&DESTADDR=\" . $DESTADDR . \"&MESSAGE=\" . $MESSAGE . \"&DLR=\" . $DLR . \"&USERNAME=\" . $smsuser . \"&PASSWORD=\" . $smspassword;\n \n // }\n #evans#\n #################################3\n }\n\n return $this->truncated;\n }",
"public function long()\n\t{\n\t\t$tt = preg_split('/(?<=[.?!;:])\\s+/',$this->assignment);\n\t\tarray_shift($tt);\n\t\treturn \"\".join(\" \", $tt);\n\t}",
"function sp_excerpt_length( $length ) {\n\treturn 50;\n}",
"function darksnow_excerpt_length( $length ) {\n\treturn 40;\n}",
"function trim_excerpt_length ($length) {\n return 20;\n}",
"function new_excerpt_length($length) {\r\n return 40;\r\n}",
"function maat_variable_length_excerpt($text, $length, $finish_sentence = 1)\n{\n\n $tokens = array();\n $out = '';\n $word = 0;\n\n //Divide the string into tokens; HTML tags, or words, followed by any whitespace.\n $regex = '/(<[^>]+>|[^<>\\s]+)\\s*/u';\n preg_match_all($regex, $text, $tokens);\n foreach ($tokens[0] as $t) {\n //Parse each token\n if ($word >= $length && !$finish_sentence) {\n //Limit reached\n break;\n }\n if ($t[0] != '<') {\n //Token is not a tag.\n //Regular expression that checks for the end of the sentence: '.', '?' or '!'\n $regex1 = '/[\\?\\.\\!]\\s*$/uS';\n if ($word >= $length && $finish_sentence && preg_match($regex1, $t) == 1) {\n //Limit reached, continue until ? . or ! occur to reach the end of the sentence.\n $out .= trim($t);\n break;\n }\n $word++;\n }\n //Append what's left of the token.\n $out .= $t;\n }\n //Add the excerpt ending as a link.\n $excerpt_end = '';\n\n //Add the excerpt ending as a non-linked ellipsis with brackets.\n //$excerpt_end = ' […]';\n\n //Append the excerpt ending to the token.\n $out .= $excerpt_end;\n\n return trim(force_balance_tags($out));\n}",
"function leafbase_custom_excerpt_length( $length ) {\n\n return 40;\n\n}",
"public function getTbrTldSuggestion() {\n\t$tmp = explode(\".google.\", GTB_Request::_get(tbr::SUGGEST_TLD_URL));\n\treturn trim($tmp[1]);\n }",
"function rw_excerpt_length( $length=100 )\n{\n return $length;\n}",
"function snippet_by_word_count($text, $maxWords = 20, $ellipsis = '...')\n{\n // strip html tags from the text\n $text = strip_formatting($text);\n if ($maxWords > 0) {\n $textArray = explode(' ', $text);\n if (count($textArray) > $maxWords) {\n $text = implode(' ', array_slice($textArray, 0, $maxWords)) . $ellipsis;\n }\n } else {\n return '';\n }\n return $text;\n}",
"function limit_word_count($title) {\n $len = 10; //change this to the number of words\n if (str_word_count($title) > $len) {\n $keys = array_keys(str_word_count($title, 2));\n $title = substr($title, 0, $keys[$len]);\n }\n return $title;\n}",
"public function getHonoreeLastName();",
"public function getLastName()\n {\n $name = explode(' ', $this->getName());\n return $name[1];\n }",
"function my_excerpt_length($length) {\nreturn 20; // Or whatever we want the length to be.\n}",
"function highLow($str) {\n $x = count(explode(\" \", $str));\n if ($x === 1) {\n \n }\n}",
"public static function addressLastName()\n {\n return new TextNode('address_last_name');\n }",
"function new_excerpt_length($length) {\n return 30;\n}",
"function new_excerpt_length($length) {\r\nreturn 30;\r\n}",
"function wpt_excerpt_length( $length ) {\n\treturn 40;\n}",
"function new_excerpt_length($length) {\n\treturn 100;\n}",
"function new_excerpt_length($length) {\n\treturn 100;\n}",
"function wpex_new_excerpt_length($length) {\n\n\treturn 50;\n\n}",
"function random_big_word($phrase)\n{\n $phrase = preg_replace(\"/[()\\[\\]0-9.,]/\", \"\", $phrase);\n $words = explode(\" \", $phrase);\n# print \"<p>words: \"; foreach ($words as $word) { print \"'$word';\"; }\n $lesswords = array_filter($words, \"interesting_word\");\n# print \"<p>lesswords: \"; foreach ($lesswords as $word) { print \"'$word';\"; }\n if (count($lesswords)<1) {\n return '';\n }\n return $lesswords[array_rand($lesswords)];\n}",
"function uwmadison_excerpt_length( $length ) {\n\t\treturn 40;\n\t}",
"function cortarStr($text, $longitud, $trespuntos=true)\n{\n if (strlen($text) > $longitud)\n {\n $text = substr(\"$text\", 0, $longitud);\n if ($trespuntos)\n $text = $text . \"...\";\n }\n return $text;\n}",
"function new_excerpt_length($length) { \n return 75;\n}",
"public function getLastName()\n {\n //Parse the name and set it\n $namePieces = preg_split(\"/\\s/\", $this->name);\n if (count($namePieces) == 2) {\n return $namePieces[1];\n } elseif (count($namePieces) == 3) {\n return $namePieces[2];\n }\n return null;\n }",
"function breekaf ($string){\n\n $afgebroken = substr($string,0,3);\n return $afgebroken;\n\n}",
"function chkLength($string){//word 가 짧은지? 2글자 이하면 앞에 것 까지 돌려주기\r\n\t\t$ary = explode(' ',$string);\r\n\t\t$text = end($ary);\r\n\t\t$length = mb_strlen( end($ary), 'utf-8' );//문자의 길이\r\n\t\tif($length<=2)\r\n\t\t{\r\n\t\t\t$index = sizeof($ary);\r\n\t\t\t$index -=2;\r\n\t\t\t$text=($ary[$index].$text);\r\n\t\t}\r\n\t\treturn $text;\r\n\t}",
"function summarizeText($text, $maxLength = 500) {\n\n\tif(!strlen($text)) return '';\n\t$summary = trim(strip_tags($text));\n\tif(strlen($summary) <= $maxLength) return $summary;\n\n\t$summary = substr($summary, 0, $maxLength);\n\t$lastPos = 0;\n\n\tforeach(array('. ', '!', '?') as $punct) {\n\t\t// truncate to last sentence\n\t\t$pos = strrpos($summary, $punct);\n\t\tif($pos > $lastPos) $lastPos = $pos;\n\t}\n\n\tif(!$lastPos) {\n\t\t// if no last sentence was found, truncate to last space\n\t\t$lastPos = strrpos($summary, ' ');\n\t}\n\n\tif($lastPos) {\n\t\t$summary = substr($summary, 0, $lastPos + 1); // and truncate to last sentence\n\t}\n\n\treturn trim($summary);\n}",
"function trim_excerpt_to_word($string, $limit, $break = \".\", $pad = \"...\") { \n\tif (strlen($string) <= $limit) return $string;\n\tif (false !== ($max = strpos($string, $break, $limit))) {\n\t\tif ($max < strlen($string) - 1) {\n\t\t\t$string = substr($string, 0, $max) . $pad;\n\t\t}\n\t}\n\treturn $string;\n}",
"function st_get_substr($str,$n=150,$more='...')\r{\r $str = strip_tags($str);\r if(strlen($str)<$n) return $str;\r $html = substr($str,0,$n);\r $html = substr($html,0,strrpos($html,' '));\r return $html.$more;\r}",
"public function getLastname(): string;",
"function theme_excerpt_length($length){\r\n return 35; //el número aquí es nueva cantidad de palabras en el excerpt\r\n}",
"function mt_filter_excerpt_length($length) {\n\treturn 20;\n }",
"function new_excerpt_length($length) {\nreturn 50;\n}",
"function new_excerpt_length($length) {\nreturn 50;\n}",
"function tptn_excerpt($content,$excerpt_length){\r\n\t$out = strip_tags($content);\r\n\t$blah = explode(' ',$out);\r\n\tif (!$excerpt_length) $excerpt_length = 10;\r\n\tif(count($blah) > $excerpt_length){\r\n\t\t$k = $excerpt_length;\r\n\t\t$use_dotdotdot = 1;\r\n\t}else{\r\n\t\t$k = count($blah);\r\n\t\t$use_dotdotdot = 0;\r\n\t}\r\n\t$excerpt = '';\r\n\tfor($i=0; $i<$k; $i++){\r\n\t\t$excerpt .= $blah[$i].' ';\r\n\t}\r\n\t$excerpt .= ($use_dotdotdot) ? '...' : '';\r\n\t$out = $excerpt;\r\n\treturn $out;\r\n}",
"function string_shorten( $p_string ) {\r\n\t$t_max = config_get( 'max_dropdown_length' );\r\n\tif ( ( tlStrLen($p_string ) > $t_max ) && ( $t_max > 0 ) ){\r\n\t\t$t_pattern = '/([\\s|.|,|\\-|_|\\/|\\?]+)/';\r\n\t\t$t_bits = preg_split( $t_pattern, $p_string, -1, PREG_SPLIT_DELIM_CAPTURE );\r\n\r\n\t\t$t_string = '';\r\n\t\t$t_last = $t_bits[ count( $t_bits ) - 1 ];\r\n\t\t$t_last_len = tlStrLen( $t_last );\r\n\r\n\t\tforeach ( $t_bits as $t_bit ) {\r\n\t\t\tif ( ( tlStrLen( $t_string ) + tlStrLen( $t_bit ) + $t_last_len + 3 <= $t_max )\r\n\t\t\t\t|| ( strpos( $t_bit, '.,-/?' ) > 0 ) ) {\r\n\t\t\t\t$t_string .= $t_bit;\r\n\t\t\t} else {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$t_string .= '...' . $t_last;\r\n\t\treturn $t_string;\r\n\t} else {\r\n\t\treturn $p_string;\r\n\t}\r\n}",
"function acf_get_truncated($text, $length = 64)\n{\n}",
"function wow_theme_excerpt_length( $length ) {\n return 100;\n}",
"function ExtractMatchString( $Postcode )\n{\n\t$SpacePos = strpos( $Postcode, \" \" );\n\tif( $SpacePos )\n\t{\n\t\tif( substr( $Postcode, $SpacePos + 1, 1) == \" \" )\n\t\t{\n\t\t\treturn substr( $Postcode, 0, $SpacePos + 1 ) . substr( $Postcode, $SpacePos + 2\t, 1 );\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn substr( $Postcode, 0, $SpacePos + 2 );\n\t\t}\n\t}\n\telse\n\t{\n\t\treturn substr( $Postcode, 0, 4 ) . \" \".substr( $Postcode, 4\t, 1 );\n\t\t#return false;\n\t}\n}",
"function custom_excerpt_length($length) {\n return 20;\n}",
"function getFirstWords($html_str, $number)\n{\n $result = \"\";\n $text = strip_tags($html_str);\n $text_arr = utf8_explode(' ', $text);\n $m_number = min($number, count($text_arr));\n for ($i=0; $i<$m_number; $i++) {\n if ($text_arr[$i] != \"\") {\n $result = $result.' '.$text_arr[$i];\n }\n }\n if ($m_number < count($text_arr)) {\n $result = $result.' (...)';\n }\n return preg_replace('/\\s\\s+/', ' ', $result);\n //strip all whitespace into ' '\n}",
"function getSubString($string, $length=NULL){\n if ($length == NULL)\n $length = 50;\n //Primero eliminamos las etiquetas html y luego cortamos el string\n $stringDisplay = substr(strip_tags($string), 0, $length);\n //Si el texto es mayor que la longitud se agrega puntos suspensivos\n if (strlen(strip_tags($string)) > $length)\n $stringDisplay .= ' ...';\n return $stringDisplay;\n}",
"protected function helper_fullname_format() {\n\n $fake = new stdClass();\n $fake->lastname = 'LLLL';\n $fake->firstname = 'FFFF';\n $fullname = get_string('fullnamedisplay', '', $fake);\n if (strpos($fullname, 'LLLL') < strpos($fullname, 'FFFF')) {\n return 'lf';\n } else {\n return 'fl';\n }\n }",
"function custom_excerpt_length( $length ) {\n\treturn 90;\n}",
"function seenthis_titre_me($texte) {\n\t$titre = array_filter(array_map('trim',explode(\"\\n\", $texte)));\n\t$titre = join(' ', array_slice(array_filter(explode(' ',array_shift($titre))), 0,20));\n\treturn $titre;\n}",
"function xo_excerpt_length( $length ) {\n return 12;\n}",
"function recent_posts_excerpt_length( $length ) {\r\n\treturn 20;\r\n}",
"static function technig_the_content($content)\n\t{\n\t\treturn substr($content, 0, 500);\n\t}",
"public function mostLongestShortestSentences(\n string $text,\n string $rule = null,\n int $max_count = 10\n ) {\n $sentences_arr = $this->createSentencesListArray($text);\n\n if ($rule == 'long') {\n usort(\n $sentences_arr,\n function ($a, $b) {\n return (mb_strlen($b) <=> mb_strlen($a));\n }\n );\n } elseif ($rule == 'short') {\n usort(\n $sentences_arr,\n function ($a, $b) {\n return (mb_strlen($a) <=> mb_strlen($b));\n }\n );\n } else {\n return '- wrong rule set -';\n }\n\n $sentences_list = array_slice($sentences_arr, 0, $max_count);\n\n return implode('<br><br>', array_values($sentences_list));\n }",
"function new_excerpt_length($length) {\n\treturn 15;\n}",
"function wfs_custom_excerpt_length( $length ) {\n return 20;\n}",
"function breakAddress($thisObj, $recordNumber, $splitOnWords = 0){\r\n\t\t//echo \"testing \".$thisObj[$recordNumber][01]['debtorName'].\"<br />\";\r\n\r\n\t\t$lineBreakNumber = 20; //this is the character count where we want to break the address line\r\n\t\t$thisObj[$recordNumber][01]['debtorAddress1'] = trim($thisObj[$recordNumber][01]['debtorAddress1']);\r\n\t\t$thisObj[$recordNumber][01]['debtorAddress2'] = trim($thisObj[$recordNumber][01]['debtorAddress2']);\r\n\r\n\t\tif(strlen($thisObj[$recordNumber][01]['debtorAddress1']) > $lineBreakNumber && $splitOnWords == 0){\r\n\t\t\t$addySnippet = substr($thisObj[$recordNumber][01]['debtorAddress1'], 0 ,20);\r\n\t\t\t$restSnippet = substr($thisObj[$recordNumber][01]['debtorAddress1'], 20 , strlen($thisObj[$recordNumber][01]['debtorAddress1']) );\r\n\t\t\t$thisObj[$recordNumber][01]['debtorAddress1'] = $addySnippet;\r\n\t\t\t$thisObj[$recordNumber][01]['debtorAddress2'] = $restSnippet.\" \".$thisObj[$recordNumber][01]['debtorAddress2'];\r\n\t\t}elseif(strlen($thisObj[$recordNumber][01]['debtorAddress1']) > $lineBreakNumber && $splitOnWords == 1){ //someone\r\n\t\t\t$notesSplit = explode(\" \", $thisObj[$recordNumber][01]['debtorAddress1']);\r\n\t\t\t//we need to loop through the word array to see where the words hit the character limit\r\n\t\t\t$characterCounter = 0; //this is the number of characters\r\n\t\t\tfor($i=0; $i<count($notesSplit);$i++){\r\n\t\t\t\t$thisCount = 0;\r\n\t\t\t\t$thisCount = strlen($notesSplit[$i]);\r\n\t\t\t\t$characterCount += $thisCount;\r\n\r\n\t\t\t\t\tif($characterCount >= $lineBreakNumber){\r\n\t\t\t\t\t\t$wordToBreakAt = $i-1;\r\n\t\t\t\t\t\t//we've hit the limit so we need to reconstruct the word string up to the Nth character\r\n\t\t\t\t\t\t\tfor($i1=0; $i1<=$wordToBreakAt; $i1++ ){\r\n\t\t\t\t\t\t\t\t$newLine1 .= $notesSplit[$i1].\" \";\r\n\t\t\t\t\t\t\t} //end for\r\n\t\t\t\t\t\t//now put together the remainder of the second line to append to the second address line\r\n\t\t\t\t\t\t\tfor($i2=$i1; $i2<=count($notesSplit); $i2++ ){\r\n\t\t\t\t\t\t\t\t$newLine2 .= $notesSplit[$i2].\" \";\r\n\t\t\t\t\t\t\t} //end for\r\n\t\t\t\t\t\t$thisObj[$recordNumber][01]['debtorAddress1'] = $newLine1;\r\n\t\t\t\t\t\t$thisObj[$recordNumber][01]['debtorAddress2'] = $newLine2;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t} //end if\r\n\t\t\t\t$characterCount++; //remember that we have to count for the spaces so we need to add a charater count\r\n\t\t\t} //end for\r\n\t\t} //end if\r\n\t\treturn $thisObj;\r\n\t}",
"function ti_excerpt_length( $length ) {\n\treturn 24;\n}",
"function get_nombrepropio_detexto ($input_texto)\r\n{\r\n\t// inicializacion de variables (aumento un espacio para la ultima palabra)\r\n\t$var_texto = trim($input_texto) . \" \";\r\n\t$var_nombrepropio_texto = \"\";\r\n\r\n\t// verifica que exista un texto para formateas\r\n\tif (strlen(trim($input_texto)) > 0)\r\n\t{\r\n\t\t// recorre el texto buscando espacios y el caracter proximo lo pone en mayuscula\r\n\t\t$var_posi_inic = 0;\r\n\t\t$var_posi_sepa = strpos($var_texto,\" \",$var_posi_inic);\r\n\t\twhile ($var_posi_sepa > 0)\r\n\t\t{\r\n\t\t\t$var_texto_parte = trim(substr($var_texto,$var_posi_inic,$var_posi_sepa-$var_posi_inic));\r\n\t\t\tif (trim($var_texto_parte) != \"\") $var_nombrepropio_texto = $var_nombrepropio_texto . strtoupper(substr($var_texto_parte,0,1)) . strtolower(substr($var_texto_parte,1,strlen($var_texto_parte)-1)) . \" \";\r\n\t\t\t$var_posi_inic = $var_posi_sepa + 1;\r\n\t\t\t$var_posi_sepa = strpos($var_texto,\" \",$var_posi_inic);\r\n\t\t}\r\n\r\n\t\t// elimino los espacios laterales\r\n\t\t$var_nombrepropio_texto = trim($var_nombrepropio_texto);\r\n\t}\r\n\r\n\t// devuelve el texto en formato nombre propio\r\n\treturn $var_nombrepropio_texto;\r\n}"
] | [
"0.631341",
"0.6028681",
"0.59418696",
"0.57612014",
"0.5729432",
"0.5695807",
"0.56765896",
"0.5636818",
"0.55954856",
"0.5512497",
"0.5505409",
"0.55048025",
"0.546145",
"0.54491013",
"0.54468757",
"0.5408977",
"0.53503466",
"0.53432417",
"0.53345686",
"0.5306806",
"0.5296603",
"0.52894443",
"0.52806586",
"0.52700496",
"0.5269487",
"0.5259427",
"0.5257776",
"0.52396256",
"0.52312285",
"0.5225535",
"0.5223872",
"0.5220263",
"0.52182084",
"0.52002156",
"0.51981086",
"0.51978004",
"0.51972234",
"0.51972234",
"0.51785666",
"0.51729834",
"0.51692116",
"0.5165819",
"0.5163762",
"0.5150305",
"0.5140142",
"0.51271456",
"0.5126102",
"0.5114995",
"0.5103627",
"0.51035875",
"0.50969696",
"0.50952303",
"0.5079319",
"0.50768065",
"0.50662076",
"0.5062471",
"0.5060936",
"0.50595343",
"0.5044846",
"0.5037979",
"0.5035658",
"0.50337476",
"0.5030432",
"0.5030432",
"0.5020365",
"0.50186104",
"0.50182104",
"0.5017745",
"0.50138736",
"0.50122494",
"0.5010727",
"0.5007728",
"0.49898505",
"0.49849263",
"0.49805123",
"0.4970387",
"0.49695483",
"0.49671492",
"0.49647105",
"0.49647105",
"0.49559626",
"0.49471375",
"0.4941261",
"0.49388096",
"0.493624",
"0.49341336",
"0.49335918",
"0.49311766",
"0.49281555",
"0.49197972",
"0.49044323",
"0.489881",
"0.4898375",
"0.48942265",
"0.4893998",
"0.4890512",
"0.48876286",
"0.48837137",
"0.4879979",
"0.48792434"
] | 0.69784844 | 0 |
BONUS QUESTION Write a function that accepts a query string as input, performs a repo search on the github api using the query string, and prints the name, url, and language of the repository. TIPS: GitHub API info is located at Use the search endpoint: EXAMPLE OUTPUT: testrocket Ruby sublimetext2rubytests Python rubyplsql Ruby | public function listGithubSearchResults( $query ) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_project_github($user, $project) {\n $ch = @curl_init(); //inicia uma nova sessao\n curl_setopt($ch, CURLOPT_URL, \"http://github.com/api/v2/json/repos/show/$user/$project\"); //faz a pesquisa contida no url\n\tcurl_setopt($ch, CURLOPT_USERAGENT, 'Googlebot/2.1'); //utiliza Googlebot 2.1\n curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\t//define o retorno como string\n $page = curl_exec($ch);\t//executa as opcoes definidas\n curl_close($ch);\t//encerra sessao\n\t$github_json = json_decode($page); //descodifica string JSON\n\tif(isset($github_json->repository->name)){\n\t\t$string_name = $github_json->repository->name;\n\t} else {\n\t\t$string_name = null;\n\t}\n\tif(isset($github_json->repository->description)){\n\t\t$string_title = $github_json->repository->description;\n\t} else {\n\t\t$string_title = \"n/a\";\n\t}\n\tif(isset($github_json->repository->url)){\n\t\t$string_source = $github_json->repository->url;\n\t} else {\n\t\t$string_source = \"n/a\";\n\t}\n\tif(isset($github_json->repository->owner)){\n\t\t$string_owner = array();\n\t\tarray_push($string_owner, $github_json->repository->owner);\n\t} else {\n\t\t$string_owner = array(\"n/a\");\n\t}\n\tif(isset($github_json->repository->language)){\n\t\t$string_lang = array();\n\t\t$string_lang = preg_split('/,/', $github_json->repository->language, -1);\n\t} else {\n\t\t$string_lang = array(\"n/a\");\n\t}\n\t//faz replace da Visual Basic por VB/VBS\n\t$string_lang=str_replace('Visual Basic', 'VB/VBS', $string_lang, $count);\n\tif(isset($github_json->repository->created_at)){\n\t\t$string_date = array();\n\t\tpreg_match(\"/[0-9]*\\\\/[0-9]*\\\\/[0-9]*/\", $github_json->repository->created_at, $match);\n\t\tarray_push($string_date, preg_replace('/\\\\//', '', $match[0], -1));\n\t\tpreg_match(\"/[0-9]*\\\\/[0-9]*\\\\/[0-9]*/\", $github_json->repository->pushed_at, $match2);\n\t\tarray_push($string_date, preg_replace('/\\\\//', '', $match2[0], -1));\n\t} else {\n\t\t$string_date = array(\"n/a\");\n\t}\t\n\treturn array($string_name, $string_title, $string_source, $string_owner, $string_lang, $string_date, \"n/a\");\t\n}",
"function searchForUser($searchString) {\n $GitHubResponse = basicCurl(\"https://api.github.com/search/users?q=\".$searchString);\n $jsonResult = json_decode($GitHubResponse, true);\n $returnString = \"You searched for \".$searchString.\", I found: <br />\";\n $itemsArray = $jsonResult['items'];\n foreach ($itemsArray as $currentItem) {\n $returnString = $returnString.$currentItem['login'].\"<br />\";\n }\n return $returnString;\n}",
"function query_api($term, $location, $price, $radius, $categories, $sort) { \n $response = search($term, $location, $price, $radius, $categories, $sort);\n echo $response;\n}",
"function github_request($url)\r\n{\r\n $ch = curl_init();\r\n\r\n $access = 'username:db1ff77b2eb06b3aa967e28f1943193ac831f064';\r\n\r\n curl_setopt($ch, CURLOPT_URL, $url);\r\n //curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/xml'));\r\n curl_setopt($ch, CURLOPT_USERAGENT, 'Agent smith');\r\n curl_setopt($ch, CURLOPT_HEADER, 0);\r\n curl_setopt($ch, CURLOPT_USERPWD, $access);\r\n curl_setopt($ch, CURLOPT_TIMEOUT, 30);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\r\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\r\n $output = curl_exec($ch);\r\n curl_close($ch);\r\n $result = json_decode(trim($output), true);\r\n return $result;\r\n}",
"public function actionSearch()\n {\n $currentPage = Yii::$app->request->get('page') ? Yii::$app->request->get('page') : 1;\n $query = Yii::$app->request->get('search');\n\n $repos = GitHubApi::findRepo($query, $currentPage);\n $pages = new Pagination(['totalCount' => $repos['total_count'], 'pageSize' => 20]);\n $pages->pageSizeParam = false;\n\n return $this->render('search', [\n 'repos' => $repos,\n 'pages' => $pages,\n ]);\n }",
"public function search() {\r\n\t\t$mintURL = $this->Configuration->findByName('Mint URL');\r\n\t\t$queryURL = $mintURL['Configuration']['value'];\r\n\t\t$query = '';\r\n\t\tif (isset($this->params['url']['query'])) {\r\n\t\t\t$query = $this->params['url']['query'];\r\n\t\t}\r\n\r\n\t\t$queryURL = $queryURL.\"/Parties_People/opensearch/lookup?searchTerms=\".$query;\r\n\t\t$queryResponse = \"error\";\r\n\n\t\t$ch = curl_init();\r\n\t\t$timeout = 5;\r\n\t\tcurl_setopt($ch,CURLOPT_URL,$queryURL);\r\n\t\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,1);\r\n\t\tcurl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);\r\n\t\t$queryResponse = curl_exec($ch);\r\n\t\tcurl_close($ch);\r\n\r\n\t\t$this->autoRender = false;\r\n\t\t$this->response->type('json');\r\n\r\n\t\t$this->response->body($queryResponse);\r\n\t}",
"public function projectsSearchGet(string $query, string $max_version = null, int $limit = 20, int $offset = 0, string $flavor = null, &$responseCode, array &$responseHeaders);",
"function synonym_lookup($query) {\n\n $apikey = \"GdbOBg1JYIou4guyIKfq\"; // NOTE: replace test_only with your own key \n $word = $query; // any word \n $language = \"en_US\"; // you can use: en_US, es_ES, de_DE, fr_FR, it_IT \n $endpoint = \"http://thesaurus.altervista.org/thesaurus/v1\";\n\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, \"$endpoint?word=\" . urlencode($word) . \"&language=$language&key=$apikey&output=json\");\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n $data = curl_exec($ch);\n $info = curl_getinfo($ch);\n curl_close($ch);\n\n //either return $result populated with the JSON decoded data\n if ($info['http_code'] == 200) {\n $result = json_decode($data, true);\n }\n\n\n //or return result as 0\n else {\n $result = 0;\n }\n\n return $result;\n}",
"public function search($params) {\n\t\t$callUrl = \"https://en.wikipedia.org/w/api.php?action=query&list=search&utf8=&format=json&srlimit=5&srsearch=\".urlencode($params[\"q\"]);\n\n\t\t/**\n\t\t* Create curl request and send it\n\t\t*/\n\t\t$process = curl_init($callUrl);\n\t\tcurl_setopt($process, CURLOPT_HTTPHEADER, array('Accept: application/json'));\n\t\tcurl_setopt($process, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($process, CURLOPT_TIMEOUT, 5);\n\t\tcurl_setopt($process, CURLOPT_RETURNTRANSFER, TRUE);\n\t\t$text = curl_exec($process);\n\t\tcurl_close($process);\n\t\t$raw = json_decode($text);\n\n\t\t/**\n\t\t * return message, if we could not get any results\n\t\t */\n\t\tif( count($raw->query->search) <= 0 ) {\n\t\t\t$answer = new Answer();\n\t\t\t$answer->addText(\"Unfortunately I was not able to find anything for *\" . $params[\"q\"] . \"*.\");\n\t\t\treturn $answer;\n\t\t}\n\n\t\t/**\n\t\t * get results into list\n\t\t */\n\t\t$answer = new Answer();\n\t\t$answer->addText(\"Here are the top wikipedia articles for *\" . $params[\"q\"] . \"*: \");\n\n\t\tforeach($raw->query->search as $res) {\n\t\t\t$answer->addAttachment(\n\t\t\t\tnew Attachment(\n\t\t\t\t\t$res->title,\n\t\t\t\t\tstrip_tags($res->snippet),\n\t\t\t\t\t\"https://en.wikipedia.org/wiki/\" . rawurlencode($res->title)\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\treturn $answer;\n\t}",
"function core_github_com($url, $prefix='api'){\n\t$fp = fsockopen(\"ssl://\".$prefix.\".github.com\", 443, $errno, $errstr, 30);\n\tif (!$fp){ echo 'Could not connect to Github'; return false; }\n\t$out = \"GET /\".$url.\" HTTP/1.1\\r\\n\";\n\t$out .= \"Host: \".$prefix.\".github.com\\r\\n\";\n\t$out .= \"Connection: Close\\r\\n\\r\\n\";\n\tfwrite($fp, $out);\n\t$buffer = '';\n\twhile (!feof($fp)) {\n\t\t$buffer .= fgets($fp, 128);\n\t}\n\tfclose($fp);\n\tpreg_match(\"/^content-length:\\s*(\\d+)\\s*$/mi\", $buffer, $matches);\n\t$length = $matches[1];\t\n\t$content = substr($buffer, $length*-1, $length);\n\tswitch($prefix){\n\t\tcase \"api\":\n\t\t\treturn json_decode($content);\n\t\t\tbreak;\n\t\tcase \"raw\":\n\t\t\treturn $content;\n\t\t\tbreak;\n\t}\t\t\n}",
"public static function search() {\r\n $result = lC_Default::find($_GET['q']);\r\n\r\n echo $result;\r\n }",
"public function action_search_doc()\n\t{\n\t\tglobal $context;\n\n\t\t$context['doc_apiurl'] = 'https://github.com/elkarte/Elkarte/wiki/api.php';\n\t\t$context['doc_scripturl'] = 'https://github.com/elkarte/Elkarte/wiki/';\n\n\t\t// Set all the parameters search might expect.\n\t\t$postVars = explode(' ', $context['search_term']);\n\n\t\t// Encode the search data.\n\t\tforeach ($postVars as $k => $v)\n\t\t{\n\t\t\t$postVars[$k] = urlencode($v);\n\t\t}\n\n\t\t// This is what we will send.\n\t\t$postVars = implode('+', $postVars);\n\n\t\t// Get the results from the doc site.\n\t\trequire_once(SUBSDIR . '/Package.subs.php');\n\t\t// Demo URL:\n\t\t// https://github.com/elkarte/Elkarte/wiki/api.php?action=query&list=search&srprop=timestamp|snippet&format=xml&srwhat=text&srsearch=template+eval\n\t\t$search_results = fetch_web_data($context['doc_apiurl'] . '?action=query&list=search&srprop=timestamp|snippet&format=xml&srwhat=text&srsearch=' . $postVars);\n\n\t\t// If we didn't get any xml back we are in trouble - perhaps the doc site is overloaded?\n\t\tif (!$search_results || preg_match('~<' . '\\?xml\\sversion=\"\\d+\\.\\d+\"\\?' . '>\\s*(<api>.+?</api>)~is', $search_results, $matches) !== 1)\n\t\t{\n\t\t\tthrow new Exception('cannot_connect_doc_site');\n\t\t}\n\n\t\t$search_results = !empty($matches[1]) ? $matches[1] : '';\n\n\t\t// Otherwise we simply walk through the XML and stick it in context for display.\n\t\t$context['search_results'] = array();\n\n\t\t// Get the results loaded into an array for processing!\n\t\t$results = new XmlArray($search_results, false);\n\n\t\t// Move through the api layer.\n\t\tif (!$results->exists('api'))\n\t\t{\n\t\t\tthrow new Exception('cannot_connect_doc_site');\n\t\t}\n\n\t\t// Are there actually some results?\n\t\tif ($results->exists('api/query/search/p'))\n\t\t{\n\t\t\t$relevance = 0;\n\t\t\tforeach ($results->set('api/query/search/p') as $result)\n\t\t\t{\n\t\t\t\t$title = $result->fetch('@title');\n\t\t\t\t$context['search_results'][$title] = array(\n\t\t\t\t\t'title' => $title,\n\t\t\t\t\t'relevance' => $relevance++,\n\t\t\t\t\t'snippet' => str_replace('class=\\'searchmatch\\'', 'class=\"highlight\"', un_htmlspecialchars($result->fetch('@snippet'))),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}",
"function make_curl($search_param, $url){\n \n // default header shit\n $headers = array(\"Accept: application/json\", \"Content-Type: application/json\");\n \n //step1\n $cSession = curl_init($url);\n \n //echo $search_param[\"league_name\"];\n //echo json_encode($search_param);\n\n //step2\n //curl_setopt($cSession,CURLOPT_URL, $url.\"?league_name=\".$search_param[\"league_name\"].\"&year=\".$search_param[\"year\"]);\n curl_setopt($cSession,CURLOPT_POSTFIELDS, json_encode($search_param));\n curl_setopt($cSession,CURLOPT_RETURNTRANSFER,true);\n curl_setopt($cSession,CURLOPT_HEADER, false);\n curl_setopt($cSession,CURLOPT_HTTPHEADER, $headers);\n \n //step3\n $jsonData = curl_exec($cSession);\n $err = curl_error($cSession);\n \n //step4\n curl_close($cSession);\n //echo ($jsonData);\n \n //step5\n return ($jsonData);\n}",
"function search(string $searchQuery, array $overrideConfig = [])\n{\n\n // Variable scope fix\n global $site;\n\n // Init variables\n $entryCount = 0;\n $resultCount = 0;\n $resultsArray = [];\n $validTokensArray = [];\n $response = [];\n\n // Config\n $defaultConfig = [\n 'showEditLinks' => true,\n // Include scheduled and draft content in results\n 'searchHiddenContent' => false,\n // Set minimum characters required for search\n 'minimumCharactersAllowed' => 3,\n // Set maximum characters allowed for search\n 'maximumCharactersAllowed' => 1000,\n 'searchUsername' => true,\n 'searchDescription' => true,\n // Recusively search by exploding \"hello world\" to \"hello\", \"world\"\n 'enableRecursiveSearch' => true,\n // Only for recursive search tokens\n 'enableStopWordFilter' => true,\n // Use InnoDb Stopwords https://mariadb.com/kb/en/mariadb/stopwords/\n // Removed 'about'\n 'stopWordsFilter' => [\n 'a', 'an', 'are', 'as', 'at', 'be', 'by', 'com', 'de', 'en', 'for', 'from',\n 'how', 'i', 'in', 'is', 'it', 'la', 'of', 'on', 'or', 'that', 'the', 'this', 'to', 'was',\n 'what', 'when', 'where', 'who', 'will', 'with', 'und', 'the', 'www'\n ],\n ];\n\n $config = array_replace($defaultConfig, $overrideConfig);\n\n // Reject Query if its length is too small\n if (strlen($searchQuery) < $config['minimumCharactersAllowed']) {\n $response['errors'] = 'ERROR: Too few characters. Add more characters to widen search.';\n return $response;\n } elseif (strlen($searchQuery) > $config['maximumCharactersAllowed']) {\n $response['errors'] = \"ERROR: Maximum characters exceeded ({$config['maximumCharactersAllowed']}). Shorten your query.\";\n return $response;\n }\n\n // Break the query into several words\n $tokensArray = explode(' ', $searchQuery);\n $enoughTokensAvailable = false;\n\n foreach ($tokensArray as $token) {\n $trimmedToken = trim($token);\n if (!empty($trimmedToken) && strlen($trimmedToken) >= $config['minimumCharactersAllowed']) {\n /**\n * Tokens with stopWordFilter enabled\n */\n if ($config['enableStopWordFilter']) {\n if (!in_array($trimmedToken, $config['stopWordsFilter'])) {\n array_push($validTokensArray, $trimmedToken);\n }\n } else {\n /**\n * Tokens with stopWordFilter disabled\n */\n array_push($validTokensArray, $trimmedToken);\n }\n }\n }\n\n // Get Unique values\n $validTokensArray = array_unique($validTokensArray);\n\n // Use recursive search only when enoughTokensAvailable is true.\n if (count($validTokensArray) > 0) {\n $enoughTokensAvailable = true;\n }\n\n $json = stripFirstLine(file_get_contents(DB_PAGES));\n $json = json_decode($json);\n\n foreach ($json as $obj => $values) {\n // Initialise\n $score = 0;\n $results = array();\n // $obj holds the page slug/key\n\n // Values to search\n $contentPath = PATH_PAGES . $obj . DS . FILENAME; // index.txt\n $title = $values->title;\n $description = $values->description;\n $username = $values->username;\n $tagsArray = (array)$values->tags;\n $category = $values->category;\n $tagsString = implode(' ', $tagsArray);\n $type = $values->type;\n $coverImage = isset($values->coverImage) ? $values->coverImage : false;\n if ($coverImage) {\n $coverImage = HTML_PATH_UPLOADS . $values->coverImage;\n }\n\n /**\n * Skip hiddenContent if searchHiddenContent is false\n */\n if (! $config['searchHiddenContent']) {\n $hiddenTypeList = ['scheduled', 'draft'];\n if (in_array($type, $hiddenTypeList)) {\n continue;\n }\n }\n\n // Search Title\n if (stripos($title, $searchQuery)!==false) {\n array_push($results, \"<b>Title:</b> $title<br>\");\n $score += 15;\n }\n\n // Recursive Search Title\n if ($config['enableRecursiveSearch'] && $enoughTokensAvailable) {\n foreach ($validTokensArray as $token) {\n if (stripos($title, $token)!==false) {\n array_push($results, \"<b>Title:</b> $title<br>\");\n $score += 0.75;\n }\n }\n }\n\n // Search Description\n if ($config['searchDescription'] && stripos($description, $searchQuery)!==false) {\n array_push($results, '<b>Description:</b>' . htmlspecialchars($description) . '<br>');\n $score += 5;\n }\n\n // Recursive Search Description\n if ($config['enableRecursiveSearch'] && $enoughTokensAvailable) {\n foreach ($validTokensArray as $token) {\n if ($config['searchDescription'] && stripos($description, $token)!==false) {\n array_push($results, '<b>Description:</b>' . htmlspecialchars($description) . '<br>');\n $score += 0.25;\n }\n }\n }\n\n // Search Username\n if ($config['searchUsername'] && stripos($username, $searchQuery)!==false) {\n array_push($results, '<b>Username: </b>' . htmlspecialchars($username) . '<br>');\n $score += 3;\n }\n\n // Recursive Search Username\n if ($config['enableRecursiveSearch'] && $enoughTokensAvailable) {\n foreach ($validTokensArray as $token) {\n if ($config['searchUsername'] && stripos($username, $token)!==false) {\n array_push($results, '<b>Username: </b>' . htmlspecialchars($username) . '<br>');\n $score += 0.15;\n }\n }\n }\n\n // Search Tags\n if (stripos($tagsString, $searchQuery)!==false) {\n array_push($results, '<b>Tag:</b> ' . htmlspecialchars($tagsString) . '<br>');\n $score += 10;\n }\n\n // Recursive Search Tags\n if ($config['enableRecursiveSearch'] && $enoughTokensAvailable) {\n foreach ($validTokensArray as $token) {\n if (stripos($tagsString, $token)!==false) {\n array_push($results, '<b>Tag:</b> ' . htmlspecialchars($tagsString) . '<br>');\n $score += 0.5;\n }\n }\n }\n\n // Search Category\n if (stripos($category, $searchQuery)!==false) {\n array_push($results, \"<b>Category:</b> $category<br>\");\n $score += 10;\n }\n\n // Recursive Search Category\n if ($config['enableRecursiveSearch'] && $enoughTokensAvailable) {\n foreach ($validTokensArray as $token) {\n if (stripos($category, $token)!==false) {\n array_push($results, \"<b>Category:</b> $category<br>\");\n $score += 0.5;\n }\n }\n }\n\n /**\n * Search Content (Case insensitive)\n * Thanks ghbarratt's | http://stackoverflow.com/questions/8032312/find-specific-text-in-multiple-txt-files-in-php\n */\n foreach (file($contentPath) as $fli => $fl) {\n if (stripos($fl, $searchQuery)!==false) {\n array_push($results, '<b>Line ' . ($fli+1) . '</b> ' . htmlspecialchars($fl) . '<br>');\n $score += 1;\n }\n\n // Recursive content search\n if ($config['enableRecursiveSearch'] && $enoughTokensAvailable) {\n foreach ($validTokensArray as $token) {\n if (stripos($fl, $token)!==false) {\n array_push($results, '<b>Line ' . ($fli+1) . '</b> ' . htmlspecialchars($fl) . '<br>');\n $score += 0.05;\n }\n }\n }\n // End Recusive content search\n }\n\n // Since we use recursive search, there might be duplicate records. Below is to clean it.\n $results = array_unique($results);\n\n // Increment search pages count\n ++$entryCount;\n\n // Add to results only if score is not 0\n if ($score != 0) {\n array_push($resultsArray, array(\n 'title' => $title,\n 'slug' => $obj,\n 'url' => DOMAIN_PAGES . $obj,\n 'editUrl' => DOMAIN_ADMIN . 'edit-content' . DS . $obj,\n 'results' => $results,\n 'score' => $score,\n 'coverImage' => $coverImage,\n 'createdAt' => $values->date\n ));\n ++$resultCount;\n }\n }\n\n // Reverse sort based on score - PHP 7+ only. Requires spaceship operator.\n usort($resultsArray, function ($a, $b) {\n return $b['score'] <=> $a['score'];\n });\n\n return [\n 'meta' => [\n 'showEditLinks' => $config['showEditLinks'],\n 'query' => $searchQuery,\n 'queryTokens' => $validTokensArray,\n 'resultsCount' => $resultCount,\n 'entryCount' => $entryCount,\n 'timeTakenInSeconds' => round((microtime(true) - $_SERVER[\"REQUEST_TIME_FLOAT\"]), 3)\n ],\n 'results' => $resultsArray,\n ];\n}",
"public function search($query, $year = null, $language = null);",
"function get_search_link($query = '')\n {\n }",
"public function search($args){\n\t\t//Sets defaults where input doesn't exist.\n\t\t//This will only add if the index doesn't exist?\n\t\t$args += [\n\t\t\t\"page\" => 0,\n\t\t\t\"index\" => null,\n\t\t\t\"type\" => \"books\"\n\t\t];\n\t\textract($args);\n\t\t//Now check we have a query\n\t\tif(!isset($query)){\n\t\t\techo \"NEED TO HAVE A QUERY IN SEARCH\";\n\t\t\texit(1);\n\t\t}\n\t\t//Create url for search\n\t\t$url = \"$this->apiRoot/$type?q=$query&p=$page\" . ($index === null ? \"\" : \"&i=$index\") . $this->apiTail;\n\n\t\t//Run search, return json as array\n\t\t//return file_get_contents($url);\n\t\treturn apiSampleSearch();\n\t}",
"public function github(){\n\n\t\t$user = '';\n\t\tif(isset($this->request->get['user'])){\n\t\t\t$user = $this->request->get['user'];\n\t\t}\n\t\t$repo = '';\n\t\tif(isset($this->request->get['repo'])){\n\t\t\t$repo = $this->request->get['repo'];\n\t\t}\n\t\t$branch = '';\n\t\tif(isset($this->request->get['branch'])){\n\t\t\t$branch = $this->request->get['branch'];\n\t\t}\n\t\tnew d_shopunity\\GitHub($user, $repo, str_replace(\"catalog/\", \"\", DIR_APPLICATION), $branch );\n\t}",
"function doAPISearch($params) {\n global $searchUrl;\n\n $ch = curl_init(); // initialize curl handle\n curl_setopt($ch, CURLOPT_URL,$searchUrl . $params);\n curl_setopt($ch, CURLOPT_FAILONERROR, 1);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects\n curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variable\n curl_setopt($ch, CURLOPT_TIMEOUT, 8); // times out after 4s\n curl_setopt($ch, CURLOPT_POST, 0); // set GET method\n // curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\n // Retrieve result\n $result = curl_exec($ch);\n // TODO return error if error\n // $cerror = curl_error($ch);\n\n return $result;\n}",
"function search() {}",
"function gc_get_from_api() {\n $keyword = $_POST['keyword'];\n $hub = $_POST['hub'];\n $type = $_POST['type'];\n $url = 'https://graphcommons.com/api/v1/' . $type . 's/search?query='. urlencode($keyword) . '&limit=' . $this->api_limit;\n\n if ( $hub !== '' ) {\n $url = $url . '&hub=' . $hub;\n }\n\n $this->gc_get_url_and_print_json( $url );\n }",
"private function _search(){\n\t\tif($this->curluse){\n\t\t\ttry{\n\t\t\t\t$ch = curl_init();\n\t\t\t\tcurl_setopt($ch, CURLOPT_URL, $this->searchURL);\n\t\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n\t\t\t\tcurl_setopt($ch, CURLOPT_HEADER, false);\n\t\t\t\tif(isset($this->proxy_url) && isset($this->proxy_port)){\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, TRUE);\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_PROXYPORT, $this->proxy_port);\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_PROXY, $this->proxy_url);\n\t\t\t\t}\n\t\t\t\t$output = curl_exec($ch);\n\t\t\t\tif(curl_errno($ch))\n\t\t\t\t{\n\t\t\t\t\tthrow new \\Exception(curl_error($ch));\n\t\t\t\t}\n\t\t\t\tcurl_close($ch);\n\t\t\t\treturn $output;\n\t\t\t} catch(Exception $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif ($stream = fopen($this->searchURL, 'r')) {\n\t\t\t\treturn stream_get_contents($stream);\n\t\t\t\tfclose($stream);\n\t\t\t}\n\t\t}\n\t}",
"public function main()\n {\n if (null === $this->getRepository()) {\n throw new BuildException('\"repository\" is required parameter');\n }\n $client = $this->getGitClient(false, $this->getRepository());\n $command = $client->getCommand('tag');\n $command\n ->setOption('-l')\n ->setOption('--sort', '-v:refname');\n $result = $command->execute();\n var_dump($result);\n }",
"public function search($query);",
"function search() {\n\n /* Start building the query object. We hope to end up with something like:\n $reqeust = '{\n \"from\" : 0,\n \"size\": 10,\n \"query\" : {\n \"terms\" : {\n \"creator\" : [ \"card\" ]\n }\n },\n sort: {\n title: {\n order: \"desc\"\n }\n }\n }';\n */\n $request = array();\n\n // Users can query by specifying an url param like &filter=title:ender\n // TODO: We should allow for multiple filters.\n $key_and_val = explode(\":\", $this->get('GET.filter'));\n if (count($key_and_val) == 2 and !empty($key_and_val[0]) and !empty($key_and_val[1])) {\n $request['query']['query_string']['fields'] = array($key_and_val[0]);\n $request['query']['query_string']['query'] = '*' . $key_and_val[1] . '*';\n $request['query']['query_string']['default_operator'] = 'AND';\n } else {\n $request['query'] = array(\"match_all\" => new stdClass);\n }\n //$request['query']['query_string']['query'] = 'American FactFinder';\n // start parameter (elasticsearch calls this 'from')\n $incoming_start = $this->get('GET.start');\n if (!empty($incoming_start)) {\n $request['from'] = $this->get('GET.start');\n }\n \n // limit parameter (elasticsearch calls this 'size')\n $incoming_limit = $this->get('GET.limit');\n if (!empty($incoming_limit)) {\n $request['size'] = $this->get('GET.limit');\n }\n \n // sort parameter\n $incoming_sort = $this->get('GET.sort');\n $sort_field_and_dir = explode(\" \", $this->get('GET.sort'));\n if (count($sort_field_and_dir) == 2) {\n $request['sort'] = array($sort_field_and_dir[0] => array('order' => $sort_field_and_dir[1]));\n }\n \n // We now have our built request, let's jsonify it and send it to ES\n $jsoned_request = json_encode($request);\n \n $url = $this->get('ELASTICSEARCH_URL') . '_search';\n $ch = curl_init();\n $method = \"GET\";\n\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, strtoupper($method));\n curl_setopt($ch, CURLOPT_POSTFIELDS, $jsoned_request);\n\n $results = curl_exec($ch);\n curl_close($ch);\n\n // We should have a response. Let's pull the docs out of it\n $cleaned_results = $this->get_docs_from_es_response(json_decode($results, True));\n // callback for jsonp requests\n $incoming_callback = $this->get('GET.callback');\n if (!empty($incoming_callback)) {\n $this->set('callback', $this->get('GET.callback'));\n }\n \n // We don't want dupes. Dedupe based on hollis_id\n //$deduped_docs = $this->dedupe_using_hollis_id($cleaned_results);\n \n // Hopefully we're deduping on intake\n $deduped_docs = $cleaned_results;\n \n $this->set('results', $deduped_docs);\n //$this->set('results', $cleaned_results);\n $path_to_template = 'api/templates/search_json.php';\n echo $this->render($path_to_template);\n }",
"public function api_call($query) {\n $query = $this->sanitize_str($query); \n $url = \"https://superheroapi.com/api/1180364012471833/search/\" . $query;\n \n if (!file_get_contents($url)) {\n $err = array(\n \"response\" => \"error\",\n \"error\" => \"Couldn't connect to API\",\n );\n \n $res = json_encode($err);\n }\n else {\n $res = file_get_contents($url);\n }\n \n return $res;\n }",
"function WebhookPullSubrepository(){\n \n $MagicWord=BlowfishEncrypt('Pull Subrepository From Github');\n if(\n isset($_GET[$MagicWord])\n ){\n $Path=dirname(__FILE__);\n $Path=str_replace('/core','',$Path);\n $Subrepository=BlowfishDecrypt($_GET[$MagicWord]);;\n $Path.=trim($Subrepository);\n \n echo '<p>Pulling Subrepository: '.$Path.'</p>';\n \n if(!is_dir($Path)){\n die('Path not found: '.$Path);\n }\n \n $Command = 'cd '.$Path.' && git reset --hard && git pull';\n echo '<p>'.$Command.'</p><pre>';\n echo shell_exec($Command);\n echo '</pre>';\n \n exit;\n }\n}",
"public function search();",
"public function search();",
"function SearchFood($name)\n{\n $postData = array(\n 'query' => $name,\n \n );\n\n // Setup cURL\n $ch = curl_init('https://trackapi.nutritionix.com/v2/natural/nutrients');\n curl_setopt_array($ch, array(\n CURLOPT_POST => TRUE,\n CURLOPT_RETURNTRANSFER => TRUE,\n CURLOPT_HTTPHEADER => array(\n 'Content-Type:application/json',\n 'x-app-Id: 3f0a4b18',\n 'x-app-Key:7795b68adeba3faf9a870e02a444cb59'\n ),\n CURLOPT_POSTFIELDS => json_encode($postData)\n ));\n\n // Send the request\n $response = curl_exec($ch);\n\n // Check for errors\n if($response === FALSE){\n die(curl_error($ch));\n }\n\n // Decode the response\n //$responseData = json_decode($response, TRUE);\n\n // Print the date from the response\n return $response;\n}",
"function owl_query($endpoint, $onturi, $query, $type) {\n $url = $endpoint . '?query=' . urlencode($query) . \n '&type=' . strtolower($type) .\n '&ontology=' . $onturi;\n //print $url;\n $request = curl_init($url);\n curl_setopt($request, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($request, CURLOPT_HTTPHEADER, array(\n 'Accept: application/json'\n ));\n\n $result = curl_exec($request);\n $info = curl_getinfo($request);\n\n // TODO: Reasonable error handling\n if($result === '' || $info['http_code'] != 200) {\n return;\n }\n \n curl_close($request);\n\n return $result;\n}",
"function getLabels($pr_number, $github_token, $github_user, $repo) {\n $ch = curl_init(); \n curl_setopt($ch,CURLOPT_URL,\"https://api.github.com/repos/$repo/issues/$pr_number/labels\");\n curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n curl_setopt($ch, CURLOPT_USERPWD, \"$github_user:$github_token\");\n curl_setopt($ch, CURLOPT_USERAGENT, \"$github_user\");\n\n $output=json_decode(curl_exec($ch), TRUE);\n curl_close($ch);\n return $output;\n}",
"function testSearch2(): void\n {\n // Das Streben nach Glück | The Pursuit of Happyness\n // https://www.imdb.com/find?s=all&q=Das+Streben+nach+Gl%FCck\n\n Global $config;\n $config['http_header_accept_language'] = 'de-DE,en;q=0.6';\n\n $data = engineSearch('Das Streben nach Glück', 'imdb', false);\n $this->assertNotEmpty($data);\n\n $data = $data[0];\n // $this->printData($data);\n\n $this->assertEquals('imdb:0454921', $data['id']);\n $this->assertMatchesRegularExpression('/Das Streben nach Glück/', $data['title']);\n }",
"public function getSearch($parameters = array());",
"public function searchLab($input) {\n $query = Lab::query();\n $appends = array();\n \n if (!empty($input)) { \n if (!empty($input['name'])) {\n $query->where('name', 'LIKE', '%'.$input['name'].'%');\n $appends['name'] = $input['name'];\n }\n if (isset($input['status']) && $input['status'] != -1) {\n $query->where('status', $input['status']);\n $appends['status'] = $input['status'];\n } \n }\n \n $query->orderBy('created_at', 'desc');\n \n $labs = $query->paginate(10)->appends($appends);\n return $labs;\n }",
"function search($term, $location, $price, $radius, $categories, $sort) {\n $url_params = array();\n \n $url_params['term'] = $term;\n $url_params['location'] = $location;\n $url_params['limit'] = $GLOBALS['SEARCH_LIMIT'];\n\t$url_params['open_now'] = true;\n $url_params['price'] = $price;\n $url_params['radius'] = $radius;\n $url_params['categories'] = $categories;\n $url_params['sort_by'] = $sort;\n \n return request($GLOBALS['API_HOST'], $GLOBALS['SEARCH_PATH'], $url_params);\n}",
"function fullTextSearch($client, $html, $query)\n{\n if ($html) {echo \"<h2>Documents containing $query</h2>\\n\";}\n\n $feed = $client->getDocumentListFeed(\n 'https://docs.google.com/feeds/documents/private/full?q=' . $query);\n\n printDocumentsFeed($feed, $html);\n}",
"function qruqsp_tutorials_tutorialSearch($ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\n 'start_needle'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Search String'),\n 'limit'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Limit'),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n\n //\n // Check access to tnid as owner, or sys admin.\n //\n ciniki_core_loadMethod($ciniki, 'qruqsp', 'tutorials', 'private', 'checkAccess');\n $rc = qruqsp_tutorials_checkAccess($ciniki, $args['tnid'], 'qruqsp.tutorials.tutorialSearch');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Get the list of tutorials\n //\n $strsql = \"SELECT qruqsp_tutorials.id, \"\n . \"qruqsp_tutorials.title, \"\n . \"qruqsp_tutorials.permalink, \"\n . \"qruqsp_tutorials.synopsis, \"\n . \"qruqsp_tutorials.flags \"\n . \"FROM qruqsp_tutorials \"\n . \"WHERE qruqsp_tutorials.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND (\"\n . \"title LIKE '\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR title LIKE '% \" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR synopsis LIKE '\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR synopsis LIKE '% \" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \") \"\n . \"\";\n if( isset($args['limit']) && is_numeric($args['limit']) && $args['limit'] > 0 ) {\n $strsql .= \"LIMIT \" . ciniki_core_dbQuote($ciniki, $args['limit']) . \" \";\n } else {\n $strsql .= \"LIMIT 25 \";\n }\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'qruqsp.tutorials', array(\n array('container'=>'tutorials', 'fname'=>'id', \n 'fields'=>array('id', 'title', 'permalink', 'flags', 'synopsis')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['tutorials']) ) {\n $tutorials = $rc['tutorials'];\n $tutorial_ids = array();\n foreach($tutorials as $iid => $tutorial) {\n $tutorial_ids[] = $tutorial['id'];\n }\n } else {\n $tutorials = array();\n $tutorial_ids = array();\n }\n\n return array('stat'=>'ok', 'tutorials'=>$tutorials, 'nplist'=>$tutorial_ids);\n}",
"public function query(): string;",
"public function testSearchUsingGET()\n {\n\n }",
"public function fetching($strSearch,$nb,$country = ['CM'],$video = false,$strict = false)\n {\n\n $client = new Client();\n // $client->setClient(new GuzzleClient($config));\n $client->setClient(new GuzzleClient(['cookies' => true]));\n $client->setHeader('User-Agent','Mozilla/5.0 (Windows NT 10.0; Win64; x64)');\n //AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063');\n $client->setHeader('Accept', '*/*');\n $client->setHeader('Accept-Encoding', 'gzip, deflate, br');\n $client->setHeader('Connection:', 'Keep-Alive');\n\n // echo $strSearch .\"<br/>\";\n foreach ($country as $pays) {\n\n if($strict)\n {\n $url = $this->queryToUrl('\"'.$strSearch.'\"', 0, $nb, $pays,$video);\n }\n else\n {\n $url = $this->queryToUrl($strSearch, 0, $nb, $pays,$video);\n }\n // $url = $this->queryToUrl($strSearch, 0, $nb, $country[0],$video);\n\n //echo $strSearch;\n //$url = \"http://www.google.com/search?q=\".$strSearch.\"&hl=en&start=0&sa=N\";\n\n //check if the connection to remote site have succeed\n\n $crawler = null;\n // Go to the symfony.com website\n try {\n\n $crawler = $client->request('GET', $url);\n $this->continue = true;\n } catch (ConnectException $e) {\n //Catch the guzzle connection errors over here.These errors are something\n // like the connection failed or some other network error\n $number = -1;\n if($this->eager)\n {\n $number = count($this->searchResultsDB);\n }\n else\n {\n $number = count($this->searchResults);\n }\n\n if(!($number > 0))\n {\n //throwException($e);\n $client->request('GET', $url);\n }\n\n }\n\n if($this->continue)\n {\n //echo $crawler->html();\n $this->resultHeader[$this->count] = [];\n $this->resultLink[$this->count] = [];\n $this->resultLink_text[$this->count] = [];\n $this->resultBody[$this->count] = [];\n if($video)\n {\n $this->resultHeaderV[$this->countV] = [];\n $this->resultLinkV[$this->countV] = [];\n $this->resultLink_textV[$this->countV] = [];\n $this->resultVideo[$this->countV] = [];\n $this->resultBodyV[$this->countV] = [];\n }\n //on récupère les entêtes des résultats\n $crawler->filter('td div#center_col div.g')->each(function (Crawler $node, $i) {\n\n $header = $node->filter('h3 a');\n \n if ($header->count() > 0) {\n $header = $header->html();\n // echo $header.'<br/>';\n //print(\"<br/>\".$header);\n if (strpos($header, 'mages for') == false) {\n //echo'<br/> '.$this->count.'<br/>';\n //print_r($this->resultHeader);\n array_push($this->resultHeader[$this->count], $header);\n \n $link = $node->filter('div cite')->html();\n // echo 'link '.$link.'<br/>';\n array_push($this->resultLink[$this->count], $link);\n $link = $node->filter('div cite')->text();\n array_push($this->resultLink_text[$this->count], $link);\n\n if (strpos($link, 'books.google') == false) {\n\n array_push($this->resultBody[$this->count], $node->filter('div span.st')->html());\n } else {\n // echo 'link '. $node->filter('div.s')->html().'<br/>';\n array_push($this->resultBody[$this->count], $node->filter('div.s')->html());\n }\n }\n }\n\n });\n if($video)\n {\n $crawler->filter('td div#center_col div.g.videobox')->each(function (Crawler $node, $i) {\n $video = $node->filter('td img')->attr('src');\n array_push($this->resultVideo[$this->countV], $video);\n $header = $node->filter('td h3 a');\n if ($header->count() > 0) {\n $link = $header->attr('href');\n $link = substr($link,strpos($link,'='));\n $link = substr($link,1,strpos($link,'&')-1);\n array_push($this->resultLink_textV[$this->countV], $link);\n\n $header = $header->html();\n //print(\"<br/>\".$header);\n if (strpos($header, 'mages for') == false) {\n array_push($this->resultHeaderV[$this->countV], $header);\n $link = $node->filter('div cite')->html();\n\n array_push($this->resultLinkV[$this->countV], $link);\n\n\n if (strpos($link, 'books.google') == false) {\n array_push($this->resultBodyV[$this->countV], $node->filter('div span.st')->html());\n } else {\n array_push($this->resultBodyV[$this->countV], $node->filter('div.s')->html());\n }\n }\n }\n\n });\n\n }\n $this->count++;\n if($video)\n {\n $this->countV++;\n }\n $min =[5,8,9,10,12,7];\n sleep(rand(0,1)*count($min));\n }\n //print count($searchResults);\n }\n //$url = 'http://freeproxylists.net/fr/?c=&pt=&pr=HTTPS&a%5B%5D=0&a%5B%5D=1&a%5B%5D=2&u=90';\n //$crawler = $client->request('GET', $url);\n // echo $crawler->html();\n\n }",
"public function retrieveSearch($args=[]){\n\t\t#Page argument: if not set, fallback to 1 (default)\n\t\t$page = $args[\"page\"] ?? 1;\n\t\t#Search terms argument: if not set, fallback to empty string\n\t\t$terms = $args[\"terms\"] ?? '';\n\t\t#If no term given, return error\n\t\tif(!$terms) return [\"success\" => 0, \"msg\" => \"Empty search term\"];\n\t\t#Prepare terms (URI-encoded)\n\t\t$terms = urlencode($terms);\n\t\t#Define the URL based on api documentation (https://developers.themoviedb.org/3/search/search-movies)\n\t\t$url = \"https://api.themoviedb.org/3/search/movie?api_key={$this->apiKey}&language={$this->requestLang}&page={$page}&include_adult=true&query={$terms}\";\n\t\t#Instantiate a new HTTP handler class\n\t\t$HttpHandler = new HttpHandler();\n\t\t#Retrieve raw output from the HTTP handler over the URL\n\t\t$outputRaw = $HttpHandler->execGET($url);\n\t\t#Bypass the consumed output\n\t\treturn $this->consumeRawOutput($outputRaw);\n\t}",
"private function get_repository_info() {\n if ( is_null( $this->github_response ) ) {\n $request_uri = sprintf( 'https://api.github.com/repos/%s/%s/releases', $this->username, $this->repository );\n\n $response = json_decode( wp_remote_retrieve_body( wp_remote_get( $request_uri ) ), true );\n if( is_array( $response ) ) {\n $response = current( $response );\n }\n $this->github_response = $response;\n }\n }",
"function ml_wpsearch_search_query($query, $params)\n{\n $driver = DriverRegistry::getInstance()->get('marklogic');\n $new_query = $query;\n\n if (is_string($query))\n {\n $new_query = trim($query);\n if (!$new_query)\n {\n return null;\n }\n $searchExcludeArr = explode(PHP_EOL, $options['search_exclude']);\n\n foreach ($searchExcludeArr as $searchExclude) {\n\n $exitLoop = false;\n\n if (preg_match('/(\\w+)\\s(.+)\\s({?{?.+}?}?)/', $searchExclude, $matches)) {\n\n $elem = $matches[1];\n $oper = $matches[2];\n $value = $matches[3];\n\n if (preg_match('/^{{(\\w+)}}?/', $value, $specialMatches)) {\n\n switch($specialMatches[1]) {\n case 'today':\n $value = '\"' . date(\"Y-m-d\\TH:i:s+00:00\") . '\"';\n break;\n default:\n $exitLoop = true;\n break;\n }\n }\n\n if ($exitLoop)\n break;\n\n switch(ord($oper)) {\n case 61:\n $oper = \":\";\n break;\n case 62:\n $oper = \"GT\";\n break;\n case 38:\n $oper = \"LT\";\n break;\n default:\n break;\n }\n\n $new_query .= \" AND -{$elem} {$oper} {$value}\";\n\n }\n }\n }\n elseif (is_array($query))\n {\n if (!$query)\n {\n return null;\n }\n $new_query = wp_json_encode($query);\n }\n\n $options = Options::getOptions();\n\n // Provides way for changing search query and parameters.\n $new_params = apply_filters('ml_wpsearch_search_query_params', wp_parse_args($params, array(\n 'start' => 1,\n 'pageLength' => 10,\n 'view' => 'all',\n 'options' => $options['rest_config_option'],\n 'transform' => $options['rest_transform'],\n )));\n\n $new_query = apply_filters('ml_wpsearch_search_query_value', $new_query, $params);\n\n $results = $driver->search(stripslashes(sanitize_text_field($new_query)), $new_params, is_array($query)); // Assume structured query for arrays.\n\n return $results;\n}",
"function queryGit($resource,$site,$type = 'canGit'){\n // default value\n $canGit = false;\n $isGit = false;\n // get user oid and git status\n $user_ename = getEname();\n $user_oid = enameToOid($user_ename); \n\t$canGit = getWzdesiteGitAccess($user_oid,$site);\n\t$isGit = isGit($resource,$site);\n \n $result = [\"canGit\"=>$canGit, \"isGit\"=>$isGit];\n echo json_encode($result); \n}",
"function curl_function($url){\n\t$ch = curl_init();\ncurl_setopt($ch, CURLOPT_URL, $url);\ncurl_setopt($ch, CURLOPT_HEADER, 0);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_TIMEOUT, 100);\ncurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n$output = curl_exec($ch);\necho curl_error($ch);\ncurl_close($ch);\n \n//$searchResponse = json_decode($output,true);\n return $output;\n\t\n\t}",
"function display_elastic_search ($q, $filter=null, $from = 0, $size = 20, $callback = '')\n{\n\tglobal $elastic;\n\t\n\t$status = 404;\n\t\t\t\t\n\tif ($q == '')\n\t{\n\t\t$obj = new stdclass;\n\t\t$obj->hits = new stdclass;\n\t\t$obj->hits->total = 0;\n\t\t$obj->hits->hits = array();\n\t\t\n\t\t$status = 200;\n\t}\n\telse\n\t{\t\t\n\t\t// query type\t\t\n\t\t$query_json = '';\n\t\t\n\t\tif ($filter)\n\t\t{\n\t\t\tif (isset($filter->author))\n\t\t\t{\n\t\t\t\t// author search is different( but not working yet)\t\n\t\t\t\t$query_json = \t\t\n\t'{\n\t\"size\":50,\n \"query\": {\n \"bool\": {\n \"must\": [ {\n\t\t\t\t \"multi_match\" : {\n\t\t\t\t \"query\": \"<QUERY>\",\n\t\t\t\t \"fields\":[\"search_data.author\"] \n\t\t\t\t}\n\t\t\t\t}]\n }\n }\n\t}';\n\t\t\t$query_json = str_replace('<QUERY>', $q, $query_json);\n\t\t\t\n\t\t\t// echo $query_json;\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t// default is search on fulltext fields\n\t\tif ($query_json == '')\n\t\t{\n\t\t\t$query_json = '{\n\t\t\t\"size\":50,\n\t\t\t\t\"query\": {\n\t\t\t\t\t\"bool\" : {\n\t\t\t\t\t\t\"must\" : [ {\n\t\t\t\t \"multi_match\" : {\n\t\t\t\t \"query\": \"<QUERY>\",\n\t\t\t\t \"fields\":[\"search_data.fulltext\", \"search_data.fulltext_boosted^4\"] \n\t\t\t\t}\n\t\t\t\t}],\n\t\t\t\"filter\": <FILTER>\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"aggs\": {\n\t\t\t\"type\" :{\n\t\t\t\t\"terms\": { \"field\" : \"search_data.type.keyword\" }\n\t\t\t },\n\t\t\t \"year\" :{\n\t\t\t\t\"terms\": { \"field\" : \"search_data.year\" }\n\t\t\t },\n\t\t\t \"container\" :{\n\t\t\t\t\"terms\": { \"field\" : \"search_data.container.keyword\" }\n\t\t\t },\n\t\t\t \"author\" :{\n\t\t\t\t\"terms\": { \"field\" : \"search_data.author.keyword\" }\n\t\t\t },\n\t\t\t \"classification\" :{\n\t\t\t\t\"terms\": { \"field\" : \"search_data.classification.keyword\" }\n\t\t\t } \n\n\t\t\t}\n\n\t\n\t\t\t}';\n\t\t\t\n\t\t\t$query_json = str_replace('<QUERY>', $q, $query_json);\n\t\t}\n\t\n\t$filter_string = '[]';\n\t\n\tif ($filter)\n\t{\n\t\t$f = array();\n\t\t\n\t\tif (isset($filter->year))\n\t\t{\n\t\t\t$one_filter = new stdclass;\n\t\t\t$one_filter->match = new stdclass;\n\t\t\t$one_filter->match->{'search_data.year'} = $filter->year;\n\t\t\t\n\t\t\t$f[] = $one_filter;\t\t\t\n\t\t}\n\n\t\t// this doesn't work\n\t\tif (isset($filter->author))\n\t\t{\n\t\t\t$one_filter = new stdclass;\n\t\t\t$one_filter->match = new stdclass;\n\t\t\t$one_filter->match->{'search_data.author'} = $filter->author;\n\t\t\t\n\t\t\t$f[] = $one_filter;\t\t\t\n\t\t}\n\t\t\n\t\t$filter_string = json_encode($f);\n\t}\n\t\n\t$query_json = str_replace('<FILTER>', $filter_string, $query_json);\n\t\n\t\n\t$resp = $elastic->send('POST', '_search?pretty', $post_data = $query_json);\n\t\n\n\t\t$obj = json_decode($resp);\n\n\t\t$status = 200;\n\t}\n\t\n\tapi_output($obj, $callback, 200);\n}",
"function html_desc($repo, $proj) {\n\n // Check if the git repo has a description file\n if(file_exists(\"$repo/.git/description\")){\n $desc = short_desc(file_get_contents(\"$repo/.git/description\"));\n }else{\n $desc = \"No description\";\n }\n $owner = get_file_owner($repo);\n $last = get_last($repo);\n $git_clone_url = 'http://'.$_SERVER['HTTP_HOST'].'/git/'.$proj;\n \n echo \"<table>\";\n echo \"<tr><td>description</td><td>$desc</td></tr>\";\n echo \"<tr><td>owner</td><td>$owner</td></tr>\";\n echo \"<tr><td>last change</td><td>$last</td></tr>\";\n echo \"<tr><td>URL</td><td>$git_clone_url</td></tr>\";\n echo \"</table>\";\n}",
"function build_query($user_search, $sort) {\n $search_query = \"SELECT * FROM stocktypes\";\n\n // Extract the search keywords into an array\n $clean_search = str_replace(',', ' ', $user_search);\n $search_words = explode(' ', $clean_search);\n $final_search_words = array();\n if (count($search_words) > 0) {\n foreach ($search_words as $word) {\n if (!empty($word)) {\n $final_search_words[] = $word;\n }\n }\n }\n\n // Generate a WHERE clause using all of the search keywords\n $where_list = array();\n if (count($final_search_words) > 0) {\n foreach($final_search_words as $word) {\n $where_list[] = \"description LIKE '%$word%' OR stockname LIKE '%$word%'\";\n }\n }\n $where_clause = implode(' OR ', $where_list);\n\n // Add the keyword WHERE clause to the search query\n if (!empty($where_clause)) {\n $search_query .= \" WHERE $where_clause\";\n }\n\n // Sort the search query using the sort setting\n switch ($sort) {\n // Ascending by Stock Name\n case 1:\n $search_query .= \" ORDER BY stockname\";\n break;\n // Descending by Stock Name\n case 2:\n $search_query .= \" ORDER BY stockname DESC\";\n break;\n // Ascending by Category\n case 2.5:\n $search_query .= \" ORDER BY category\";\n break;\n // Ascending by Category\n case 2.6:\n $search_query .= \" ORDER BY category DESc\";\n break;\n // Ascending by Subcategory\n case 3:\n $search_query .= \" ORDER BY subcategory\";\n break;\n // Descending by Subcategory\n case 4:\n $search_query .= \" ORDER BY subcategory DESC\";\n break;\n // Ascending by date posted (oldest first)\n case 5:\n $search_query .= \" ORDER BY creationdate\";\n break;\n // Descending by date posted (newest first)\n case 6:\n $search_query .= \" ORDER BY creationdate DESC\";\n break;\n default:\n // No sort setting provided, so don't sort the query\n }\n\n return $search_query;\n }",
"public function searchByName($query);",
"private function build_query(){\n if(!isset($this->keyword)){\n throw new Exception('Missing keyword search: http://.../github/search/<keyword>');\n }\n $this->query = $this->url.'?q='.$this->keyword;\n $this->query .= '&page='.intval($this->page_number);\n $this->query .= '&per_page='.intval($this->results_per_page);\n if($this->sort_by[0]) $this->query .= '&sort='.$this->sort_by; //TODO: sanitize a mozna lepsi podminka\n return $this;\n }",
"function get_yahoo_sourceforge($lenght, $offset) {\n\n $thequery = urlencode('\"http://sourceforge.net/projects/\"');\n\t$apikey = 'po6V4W7IkY2t6hn8Ab51nFT_HKtEocokU.E-';\n\t$url = 'http://boss.yahooapis.com/ysearch/web/v1/'.$thequery.'?&sites=sourceforge.net&format=json&count='.$lenght.'&appid='.$apikey.'&start='.$offset.'';\n\n\n $ch = @curl_init(); //inicia uma nova sessao\n curl_setopt($ch, CURLOPT_URL, $url); //faz a pesquisa contida no url\n\tcurl_setopt($ch, CURLOPT_USERAGENT, 'Googlebot/2.1'); //utiliza Googlebot 2.1\n curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\t//define o retorno como string\n $page = curl_exec($ch);\t//executa as opcoes definidas\n curl_close($ch);\t//encerra sessao\n\t$yahoo_json = json_decode($page); //descodifica string JSON\n\t$yahoo_array = array(); //cria o array\n\tforeach($yahoo_json->ysearchresponse->resultset_web as $arg) {\n\t\t//retira o nome do utilizador atraves do URL\n\t\t preg_match(\"/http:\\/\\/([A-Za-z0-9-_]*).*/\", $arg->url, $match);\n // $match = preg_split('@[/]@', $arg->title, -1);\n if ((isset($match[1])) && ($match[1]!=\"sourceforge\")) {\n\t\t\t//match[1] = utilizador\n\t\t\tarray_push($yahoo_array, get_project_sourceforge($match[1])); //adiciona os projectos ao array\n\n\t}\n }\n\tunset($yahoo_array[0]); //remove 1º posicao em branco\n\treturn (array)$yahoo_array;\n}",
"function OneQuery($query_key, $text, $limit = 1, $properties = null)\n\t{\n\t\t$url = '';\n\t\tif ($properties)\n\t\t{\n\t\t\tfile_put_contents(dirname(__FILE__) . '/tmp/prop.txt', json_encode($properties), FILE_APPEND);\n\t\t\t\n\t\t\tif ($properties[0]->pid == '/type/object/id')\n\t\t\t{\n\t\t\t\t// find datasets for this organisation\n\t\t\t\t$url .= 'http://api.gbif.org/v1/organization/' . $properties[0]->v . '/publishedDataset';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// crude search\n\t\t\t\t$url = 'http://api.gbif.org/v1/dataset?q=' . urlencode($text);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// crude search\n\t\t\t$url = 'http://api.gbif.org/v1/dataset?q=' . urlencode($text);\n\t\t}\n\t\t\n\t\tfile_put_contents(dirname(__FILE__) . '/tmp/url.txt', $url . \"\\n\", FILE_APPEND);\n\t\n\t\t$json = get($url);\n\t\t\n\t\tif ($json != '')\n\t\t{\n\t\t\t$obj = json_decode($json);\n\t\t\t\n\t\t\tforeach ($obj->results as $result)\n\t\t\t{\n\t\t\t\t$hit = new stdclass;\n\t\t\t\t$hit->id \t= $result->key;\n\t\t\t\t$hit->name \t= $result->title;\n\t\t\t\tsimilar_text($text, $hit->name, $hit->score);\n\t\t\t\t$hit->match = ($hit->score == 1);\n\t\t\t\t$this->StoreHit($query_key, $hit);\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"function core_github_init($obj, $prefix='api'){\n\t$options = $obj->options;\n\t\n\tif(empty($options->resource)){ echo 'No Resource Set.'; return false; }\n\tif(empty($options->user)){ echo 'No User Set.'; return false; }\n\tif(empty($options->repo)){ echo 'No Repository Set.'; return false; }\n\t\n\tswitch($options->resource){\n\t\tcase \"tags\":\n\t\t\t$url = 'repos/'.$options->user.'/'.$options->repo.'/git/refs/tags';\n\t\t\tbreak;\n\t\t\n\t\tcase \"blob\":\n\t\t\t$url = $options->user.'/'.$options->repo.'/'.$options->path; //Path should be a relative path including the branch: master/admin/index.php\n\t\t\t$prefix = 'raw'; //Query the raw.github.com\n\t\t\tbreak;\n\t}\n\t\n\t$response = core_github_com($url, $prefix);\n\tif($response === false){ return false; }\n\t\n\techo '<div class=\"core-github main-wrapper '.$options->class.'\">';\n\tcore_github_process($response, $options->resource, $options);\n\techo '</div>';\n}",
"public function SearchByName(Request $request)\n\t{\n\t\t$searchString = trim(Input::get('searchString'));\n\t\t$negative = false;\n\t\t$primary = false;\n\t\t$secondary = false;\n\t\t$searchClassifier = null;\n\t\t\n\t\t//Pull the negative out\n\t\tif ($searchString[0] == \"-\")\n\t\t{\n\t\t\t$negative = true;\n\t\t\t$searchString = trim(substr($searchString, 1));\n\t\t}\n\t\t\n\t\t//Pull primary and secondary out\n\t\t$flag_marker = strpos($searchString, ':');\n\t\tif ($flag_marker !== false)\n\t\t{\n\t\t\t$flag = strtolower(substr($searchString, 0, $flag_marker));\n\t\t\t\n\t\t\tif ($flag == \"primary\")\n\t\t\t{\n\t\t\t\t$primary = true;\n\t\t\t\t$searchString = trim(substr($searchString, $flag_marker + 1));\n\t\t\t}\n\t\t\telse if ($flag == \"secondary\")\n\t\t\t{\n\t\t\t\t$secondary = true;\n\t\t\t\t$searchString = trim(substr($searchString, $flag_marker + 1));\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t//Pull targeting out\n\t\t$flag_marker = strpos($searchString, ':');\n\t\tif ($flag_marker !== false)\n\t\t{\n\t\t\t//Get the contents before the \":\" to check for search clarifiers\n\t\t\t$searchClassifier = strtolower(substr($searchString, 0, $flag_marker));\n\t\t\t$searchString = trim(substr($searchString, $flag_marker + 1));\n\t\t}\n\t\t\n\t\t$values = array();\n\t\tif ($searchClassifier == \"artist\")\n\t\t{\n\t\t\t$values = SearchLookupHelper::ArtistLookupHelper($searchString);\n\t\t\tforeach ($values as $value)\n\t\t\t{\n\t\t\t\t$returnString = self::BuildTypeAheadString($value['value'], \"artist:\", $primary, $secondary, $negative);\n\t\t\t\t\n\t\t\t\t$value['value'] = $returnString;\n\t\t\t\t$value['label'] = $returnString;\n\t\t\t}\n\t\t}\n\t\telse if ($searchClassifier == \"character\")\n\t\t{\n\t\t\t$values = SearchLookupHelper::CharacterLookupHelper($searchString);\n\t\t\tforeach ($values as $value)\n\t\t\t{\n\t\t\t\t$returnString = self::BuildTypeAheadString($value['value'], \"character:\", $primary, $secondary, $negative);\n\t\t\t\t\n\t\t\t\t$value['value'] = $returnString;\n\t\t\t\t$value['label'] = $returnString;\n\t\t\t}\n\t\t}\n\t\telse if ($searchClassifier == \"scanalator\")\n\t\t{\n\t\t\t$values = SearchLookupHelper::ScanalatorLookupHelper($searchString);\n\t\t\tforeach ($values as $value)\n\t\t\t{\n\t\t\t\t$returnString = self::BuildTypeAheadString($value['value'], \"scanalator:\", $primary, $secondary, $negative);\n\t\t\t\t\n\t\t\t\t$value['value'] = $returnString;\n\t\t\t\t$value['label'] = $returnString;\n\t\t\t}\n\t\t}\n\t\telse if ($searchClassifier == \"series\")\n\t\t{\n\t\t\t$values = SearchLookupHelper::SeriesLookupHelper($searchString);\n\t\t\tforeach ($values as $value)\n\t\t\t{\n\t\t\t\t$returnString = self::BuildTypeAheadString($value['value'], \"series:\", $primary, $secondary, $negative);\n\t\t\t\t\n\t\t\t\t$value['value'] = $returnString;\n\t\t\t\t$value['label'] = $returnString;\n\t\t\t}\n\t\t}\n\t\telse if ($searchClassifier == \"tag\")\n\t\t{\n\t\t\t$values = SearchLookupHelper::TagLookupHelper($searchString);\n\t\t\tforeach ($values as $value)\n\t\t\t{\n\t\t\t\t$returnString = self::BuildTypeAheadString($value['value'], \"tag:\", $primary, $secondary, $negative);\n\t\t\t\t\n\t\t\t\t$value['value'] = $returnString;\n\t\t\t\t$value['label'] = $returnString;\n\t\t\t}\n\t\t}\n\t\telse if ($searchClassifier == \"language\")\n\t\t{\n\t\t\t$languages = Language::where('languages.name', 'like', '%' . $searchString . '%')->leftjoin('collections', 'languages.id', '=', 'collections.language_id')->select('languages.*', DB::raw('count(*) as total'))->groupBy('id')->orderBy('total', 'desc')->take(5)->pluck('name');\n\t\t\t\n\t\t\tforeach ($languages as $language)\n\t\t\t{\n\t\t\t\t$returnString = self::BuildTypeAheadString($language, \"language:\", false, false, $negative);\n\t\t\t\tarray_push($values, ['value' => $returnString, 'label' => $returnString]);\n\t\t\t}\n\t\t}\n\t\telse if ($searchClassifier == \"rating\")\n\t\t{\n\t\t\t$ratings = Rating::where('ratings.name', 'like', '%' . $searchString . '%')->leftjoin('collections', 'ratings.id', '=', 'collections.rating_id')->select('ratings.*', DB::raw('count(*) as total'))->groupBy('id')->orderBy('total', 'desc')->take(5)->pluck('name');\n\t\t\t\n\t\t\tforeach ($ratings as $rating)\n\t\t\t{\n\t\t\t\t$returnString = self::BuildTypeAheadString($rating, \"rating:\", false, false, $negative);\n\t\t\t\tarray_push($values, ['value' => $returnString, 'label' => $returnString]);\n\t\t\t}\n\t\t}\n\t\telse if ($searchClassifier == \"status\")\n\t\t{\n\t\t\t$statuses = Status::where('statuses.name', 'like', '%' . $searchString . '%')->leftjoin('collections', 'statuses.id', '=', 'collections.status_id')->select('statuses.*', DB::raw('count(*) as total'))->groupBy('id')->orderBy('total', 'desc')->take(5)->pluck('name');\n\t\t\t\n\t\t\tforeach ($statuses as $status)\n\t\t\t{\n\t\t\t\t$returnString = self::BuildTypeAheadString($status, \"status:\", false, false, $negative);\n\t\t\t\tarray_push($values, ['value' => $returnString, 'label' => $returnString]);\n\t\t\t}\n\t\t}\n\t\telse \n\t\t{\t\n\t\t\t//Get artists with total\n\t\t\t$artists = Artist::where('artists.name', 'like', '%' . $searchString . '%')->leftjoin('artist_collection', 'artists.id', '=', 'artist_collection.artist_id')->select('artists.*', DB::raw('count(*) as total'))->groupBy('name')->orderBy('total', 'desc')->take(5)->get();\n\t\t\t\n\t\t\t$artists = $artists->map(function ($item) use ($primary, $secondary, $negative){\n\t\t\t\t$buildString = self::BuildTypeAheadString($item->name, \"artist:\", $primary, $secondary, $negative);\n\t\t\t\treturn ['name' => $buildString, 'total' => $item->total];\n\t\t\t});\n\t\t\t\n\t\t\t//Get global artist aliases with total\n\t\t\t$global_artist_aliases = ArtistAlias::where('user_id', '=', null)->where('alias', 'like', '%' . $searchString . '%')->leftjoin('artists', 'artists.id', '=', 'artist_alias.artist_id')->leftjoin('artist_collection', 'artists.id', '=', 'artist_collection.artist_id')->select('artist_alias.*', DB::raw('count(*) as total'))->groupBy('id')->orderBy('total', 'desc')->take(5)->get();\n\t\t\t\n\t\t\t$global_artist_aliases = $global_artist_aliases->map(function ($item) use ($primary, $secondary, $negative){\n\t\t\t\t$buildString = self::BuildTypeAheadString($item->alias, \"artist:\", $primary, $secondary, $negative);\n\t\t\t\treturn ['name' => $buildString, 'total' => $item->total];\n\t\t\t});\n\t\t\t\n\t\t\t//Get characters with total\n\t\t\t$characters = Character::where('characters.name', 'like', '%' . $searchString . '%')->leftjoin('character_collection', 'characters.id', '=', 'character_collection.character_id')->select('characters.*', DB::raw('count(*) as total'))->groupBy('name')->orderBy('total', 'desc')->take(5)->get();\n\t\t\t\n\t\t\t$characters = $characters->map(function ($item) use ($primary, $secondary, $negative){\n\t\t\t\t$buildString = self::BuildTypeAheadString($item->name, \"character:\", $primary, $secondary, $negative);\n\t\t\t\treturn ['name' => $buildString, 'total' => $item->total];\n\t\t\t});\n\t\t\n\t\t\t//Get global character aliases with total\n\t\t\t$global_character_aliases = CharacterAlias::where('user_id', '=', null)->where('alias', 'like', '%' . $searchString . '%')->leftjoin('characters', 'characters.id', '=', 'character_alias.character_id')->leftjoin('character_collection', 'characters.id', '=', 'character_collection.character_id')->select('character_alias.*', DB::raw('count(*) as total'))->groupBy('id')->orderBy('total', 'desc')->take(5)->get();\n\t\t\n\t\t\t$global_character_aliases = $global_character_aliases->map(function ($item) use ($primary, $secondary, $negative){\n\t\t\t\t$buildString = self::BuildTypeAheadString($item->alias, \"character:\", $primary, $secondary, $negative);\n\t\t\t\treturn ['name' => $buildString, 'total' => $item->total];\n\t\t\t});\n\t\t\n\t\t\t//Get scanalators with total\n\t\t\t$scanalators = Scanalator::where('scanalators.name', 'like', '%' . $searchString . '%')->leftjoin('chapter_scanalator', 'scanalators.id', '=', 'chapter_scanalator.scanalator_id')->select('scanalators.*', DB::raw('count(*) as total'))->groupBy('name')->orderBy('total', 'desc')->take(5)->get();\n\t\t\n\t\t\t$scanalators = $scanalators->map(function ($item) use ($primary, $secondary, $negative){\n\t\t\t\t$buildString = self::BuildTypeAheadString($item->name, \"scanalator:\", $primary, $secondary, $negative);\n\t\t\t\treturn ['name' => $buildString, 'total' => $item->total];\n\t\t\t});\n\t\t\t\n\t\t\t//Get global scanalator aliases with total\n\t\t\t$global_scanalator_aliases = ScanalatorAlias::where('user_id', '=', null)->where('alias', 'like', '%' . $searchString . '%')->leftjoin('scanalators', 'scanalators.id', '=', 'scanalator_alias.scanalator_id')->leftjoin('chapter_scanalator', 'scanalators.id', '=', 'chapter_scanalator.scanalator_id')->select('scanalator_alias.*', DB::raw('count(*) as total'))->groupBy('id')->orderBy('total', 'desc')->take(5)->get();\n\t\t\t\n\t\t\t$global_scanalator_aliases = $global_scanalator_aliases->map(function ($item) use ($primary, $secondary, $negative){\n\t\t\t\t$buildString = self::BuildTypeAheadString($item->alias, \"scanalator:\", $primary, $secondary, $negative);\n\t\t\t\treturn ['name' => $buildString, 'total' => $item->total];\n\t\t\t});\n\t\t\t\n\t\t\t//Get series with total\n\t\t\t$series = Series::where('series.name', 'like', '%' . $searchString . '%')->leftjoin('collection_series', 'series.id', '=', 'collection_series.series_id')->select('series.*', DB::raw('count(*) as total'))->groupBy('name')->orderBy('total', 'desc')->take(5)->get();\n\t\t\n\t\t\t$series = $series->map(function ($item) use ($primary, $secondary, $negative){\n\t\t\t\t$buildString = self::BuildTypeAheadString($item->name, \"series:\", $primary, $secondary, $negative);\n\t\t\t\treturn ['name' => $buildString, 'total' => $item->total];\n\t\t\t});\n\t\t\t\n\t\t\t//Get global series aliases with total\n\t\t\t$global_series_aliases = SeriesAlias::where('user_id', '=', null)->where('alias', 'like', '%' . $searchString . '%')->leftjoin('series', 'series.id', '=', 'series_alias.series_id')->leftjoin('collection_series', 'series.id', '=', 'collection_series.series_id')->select('series_alias.*', DB::raw('count(*) as total'))->groupBy('id')->orderBy('total', 'desc')->take(5)->get();\n\t\t\t\n\t\t\t$global_series_aliases = $global_series_aliases->map(function ($item) use ($primary, $secondary, $negative){\n\t\t\t\t$buildString = self::BuildTypeAheadString($item->alias, \"series:\", $primary, $secondary, $negative);\n\t\t\t\treturn ['name' => $buildString, 'total' => $item->total];\n\t\t\t});\n\n\t\t\t//Get global tags with total\n\t\t\t$tags = Tag::where('tags.name', 'like', '%' . $searchString . '%')->leftjoin('collection_tag', 'tags.id', '=', 'collection_tag.tag_id')->select('tags.*', DB::raw('count(*) as total'))->groupBy('name')->orderBy('total', 'desc')->take(5)->get();\n\t\t\n\t\t\t$tags = $tags->map(function ($item) use ($primary, $secondary, $negative){\n\t\t\t\t$buildString = self::BuildTypeAheadString($item->name, \"tag:\", $primary, $secondary, $negative);\n\t\t\t\treturn ['name' => $buildString, 'total' => $item->total];\n\t\t\t});\n\t\t\t\n\t\t\t//Get global tag aliases with total\n\t\t\t$global_tag_aliases = TagAlias::where('user_id', '=', null)->where('alias', 'like', '%' . $searchString . '%')->leftjoin('tags', 'tags.id', '=', 'tag_alias.tag_id')->leftjoin('collection_tag', 'tags.id', '=', 'collection_tag.tag_id')->select('tag_alias.*', DB::raw('count(*) as total'))->groupBy('id')->orderBy('total', 'desc')->take(5)->get();\n\t\t\t\n\t\t\t$global_tag_aliases = $global_tag_aliases->map(function ($item) use ($primary, $secondary, $negative){\n\t\t\t\t$buildString = self::BuildTypeAheadString($item->alias, \"tag:\", $primary, $secondary, $negative);\n\t\t\t\treturn ['name' => $buildString, 'total' => $item->total];\n\t\t\t});\n\t\t\t\n\t\t\t$languages = Language::where('languages.name', 'like', '%' . $searchString . '%')->leftjoin('collections', 'languages.id', '=', 'collections.language_id')->select('languages.*', DB::raw('count(*) as total'))->groupBy('id')->orderBy('total', 'desc')->take(5)->get();\n\t\t\t\n\t\t\t$languages = $languages->map(function ($item) use ($negative){\n\t\t\t\t$buildString = self::BuildTypeAheadString($item->name, \"language:\", false, false, $negative);\n\t\t\t\treturn ['name' => $buildString, 'total' => $item->total];\n\t\t\t});\n\t\t\t\n\t\t\t$ratings = Rating::where('ratings.name', 'like', '%' . $searchString . '%')->leftjoin('collections', 'ratings.id', '=', 'collections.rating_id')->select('ratings.*', DB::raw('count(*) as total'))->groupBy('id')->orderBy('total', 'desc')->take(5)->get();\n\t\t\t\n\t\t\t$ratings = $ratings->map(function ($item) use ($negative){\n\t\t\t\t$buildString = self::BuildTypeAheadString($item->name, \"rating:\", false, false, $negative);\n\t\t\t\treturn ['name' => $buildString, 'total' => $item->total];\n\t\t\t});\n\t\t\t\n\t\t\t$statuses = Status::where('statuses.name', 'like', '%' . $searchString . '%')->leftjoin('collections', 'statuses.id', '=', 'collections.status_id')->select('statuses.*', DB::raw('count(*) as total'))->groupBy('id')->orderBy('total', 'desc')->take(5)->get();\n\t\t\t\n\t\t\t$statuses = $statuses->map(function ($item) use ($negative){\n\t\t\t\t$buildString = self::BuildTypeAheadString($item->name, \"status:\", false, false, $negative);\n\t\t\t\treturn ['name' => $buildString, 'total' => $item->total];\n\t\t\t});\n\t\t\t\n\t\t\t$matches = collect();\n\t\t\t$matches->push($artists);\n\t\t\t$matches->push($global_artist_aliases);\n\t\t\t$matches->push($characters);\n\t\t\t$matches->push($global_character_aliases);\n\t\t\t$matches->push($scanalators);\n\t\t\t$matches->push($global_scanalator_aliases);\n\t\t\t$matches->push($series);\n\t\t\t$matches->push($global_series_aliases);\n\t\t\t$matches->push($tags);\n\t\t\t$matches->push($global_tag_aliases);\n\t\t\t$matches->push($languages);\n\t\t\t$matches->push($ratings);\n\t\t\t$matches->push($statuses);\t\t\t\n\t\t\n\t\t\t$matches = $matches->flatten(1);\n\t\t\t$matches = $matches->sortByDesc('total');\n\t\t\t$typeAheadCollection = $matches->take(5)->pluck('name');\n\t\t\n\t\t\t$typeAheadCollection = $typeAheadCollection->sort();\n\t\t\t\n\t\t\tforeach ($typeAheadCollection as $typeAhead)\n\t\t\t{\n\t\t\t\tarray_push($values, ['value' => $typeAhead, 'label' => $typeAhead]);\n\t\t\t}\t \n\t\t}\n\t\t\n\t\treturn $values;\n\t}",
"private function query($method, $name, $operation) \n {\n $url_prefix = self::URL_PREFIX . $method . '/' . rawurlencode($name);\n\n if (isset($operation)){\n $url = $url_prefix . '/' . $operation;\n } else {\n $url = $url_prefix;\n }\n\n $this->finalURL = $url;\n\n $response = file_get_contents($url);\n $undecodedResponse = $response; # for csv and such\n $arrayResponse = json_decode($response, true); # to return json in array format\n $response = json_decode($response); # to return json in std object format\n\n if((strpos($operation, 'Observations') !== FALSE) && (strpos($operation, 'csv') === FALSE)) { # Observational query\n return $this->observationalSearchContainerPopulator($response);\n } elseif ((strpos($operation, 'Observations') !== FALSE) && (strpos($operation, 'csv') !== FALSE)) { # Observational query, with non JSON response(csv)\n return $undecodedResponse; // used for anything returned from the rest non JSON encoded\n } elseif ($method == 'taxonLinks') { # External URL lookup query\n return $arrayResponse;\n } elseif (isset($operation)) { # exhaustive list return\n $columns = $response->{'columns'};\n $i = 0;\n $has_target_taxon_name_column = false;\n foreach ($columns as $column) {\n if ($column == 'target_taxon_name') {\n $has_target_taxon_name_column = true;\n break;\n }\n $i+=1;\n }\n\n $taxonDataList = $response->{'data'};\n $taxonNames = array();\n \n foreach ($taxonDataList as $taxonData)\n if ($has_target_taxon_name_column) {\n foreach ($taxonData[$i] as $taxonName) {\n $taxonNames[] = $taxonName;\n }\n }\n \n return $taxonNames;\n } elseif ($method == 'findCloseMatchesForTaxon') { # Fuzzy lookup \n $columns = $response->{'columns'};\n $taxonMatches = $response->{'data'};\n $taxonNames = array();\n foreach ($taxonMatches as $taxonMatch) {\n $taxonNames[] = $taxonMatch[0];\n }\n return $taxonNames;\n } elseif ($method == 'interactionTypes') { # supported interaction types\n $interactions = array();\n foreach ($arrayResponse as $interactionName => $interactionGroup) {\n $interactions[$interactionName] = array('source' => $interactionGroup['source'], 'target' => $interactionGroup['target']);\n }\n return $interactions;\n }\n }",
"public function search() {\n\t\tif(isset($_GET['query'])) $this->query_str = $_GET['query'];\n\t\telse return;\n\n\t\t$raw = null;\n\n\t\t$cache = new Cache($this->query_str);\n\t\t//check if the result is cached\n\t\t\n\t\tif($cache->allow_cache()) {\n\t\t\t$raw = $cache->load_cache();\n\t\t\tif($raw === false) $raw = null;\n\t\t}\n\n\t\tif($raw === null) {\n\t\t\t//check if jar exists\n\t\t\tif(file_exists('../executable/app.jar')) $raw = shell_exec('cd ../executable/ && java -jar app.jar search ' . escapeshellarg($this->query_str));\n\t\t\telse return;\n\n\t\t\t//only save into cached when the escaped string equal to input string\n\t\t\tif($raw !== null && count($raw) > 0 && $cache->allow_cache()) \n\t\t\t\t$cache->save_cache($raw);\n\t\t}\n\n\t\t$this->results = json_decode($raw);\n\n\t\t$this->end_time = microtime(true);\n\t}",
"private function buildSearchURL($q){\n\t\t$this->searchURL = $this->baseURL;\n\t\t$this->searchURL .= \"?version=\".$this->version;\n\t\t$this->searchURL .= \"&recordSchema=\".$this->recordSchema;\n\t\t$this->searchURL .= \"&query=\".$q;\n\t\t$this->searchURL .= \"&operation=searchRetrieve\";\n\t\t// optinal parameters\n\t\tif(isset($this->recordPacking)) $this->searchURL .= \"&recordPacking=\".$this->recordPacking;\n\t\tif(isset($this->startRecord)) $this->searchURL .= \"&startRecord=\".$this->startRecord;\n\t\tif(isset($this->maximumRecords)) $this->searchURL .= \"&maximumRecords=\".$this->maximumRecords;\n\t}",
"function ml_wpsearch_search($querytext)\n{\n $querytext = trim($querytext);\n if (!$querytext) {\n return [null, null, null];\n }\n\n $results = ml_wpsearch_search_query($querytext, array(\n 'start' => isset($_REQUEST['start']) ? $_REQUEST['start'] : 1,\n 'pageLength' => isset($_REQUEST['pageLength']) ? $_REQUEST['pageLength'] : 10,\n ));\n if (null === $results)\n {\n return [null, null, null];\n }\n\n if ($results->getTotal() < 1) {\n return [$results, null, null];\n }\n\n // Paging, we'll provide the URLs here, but it's up to the view\n // to display them.\n $searchPageUrl = ml_wpsearch_url();\n $nextLink = null;\n if ($results->getCurrentPage() < $results->getTotalPages()) {\n $nextLink = add_query_arg(array(\n 's' => urlencode($querytext),\n 'start' => $results->getNextStart(),\n 'pageLength' => $results->getPageLength(),\n ), $searchPageUrl);\n }\n\n $prevLink = null;\n if ($results->getCurrentPage() > 1) {\n $prevLink = add_query_arg(array(\n 's' => urlencode($querytext),\n 'start' => $results->getPreviousStart(),\n 'pageLength' => $results->getPageLength(),\n ), $searchPageUrl);\n }\n\n return [$results, $nextLink, $prevLink];\n}",
"function searchContactList($type, $query) {\n\tglobal $apiBaseURL; // bad practice in production - fine for this example\n\n\t// the URL expects the type to have a capital first letter - lets force this\n\t$type = ucfirst($type);\n\n\t// lets lowercase and strip white space (really you should do more cleaning up of user input)\n\t$query = trim(strtolower($query));\n\n\t//\n\t// To do a search we are using the $filter from the oData specification\n\t// http://www.odata.org/documentation/uri-conventions#FilterSystemQueryOption\n\t// We search only the CoLastName and FirstName for this example\n\t//\n\n\t$filter = \"filter=substringof('\".$query.\"',%20CoLastName)%20or%20substringof('\".$query.\"',%20FirstName)%20eq%20true\";\n\n\n\t// use the getURL function to call the URL - remember we are calling the vars we need from the session vars\n\t$response = getURL($apiBaseURL.$_SESSION['companyFileGUID'].'/Contact/'.$type.'/?$'.$filter, $_SESSION['username'], $_SESSION['password']);\n\n\t// it returned as JSON so lets decode it\n\t$response = json_decode($response);\n\t// return the response\n\treturn($response);\n\n}",
"function search()\n\t{}",
"function search()\n\t{}",
"function search($conn)\n{\n $includedValue = getIncludedValues(); //Get user included values\n $excludedValue = getExcludedValues(); //Get user excluded values\n if ($includedValue != \"\" && $excludedValue != \"\") {\n changeText(\"ShowSearchString\", \"Include: \" . $includedValue . \"</br>Exclude: \" . $excludedValue);\n } elseif ($includedValue != \"\") {\n changeText(\"ShowSearchString\", \"Include: \" . $includedValue);\n } elseif ($excludedValue != \"\") {\n changeText(\"ShowSearchString\", \"Exclude: \" . $excludedValue);\n } else {\n changeText(\"DefaultString\", \"Show All by Default Search\");\n }\n $searchString = getSearchString();\n $sql = \"SELECT * FROM contribution\" . $searchString;\n $inputObject = new searchObject();\n $inputObject->set_attributes();\n return getData($conn, $sql, $inputObject);\n}",
"public function search($q);",
"public function apiTest(Request $request){\n // $ch = curl_init(\"http://dblp.org/search/publ/api?q=author%3A\".$name.\"%3A&format=json\");\n $ch = curl_init(\"http://dblp.org/search/publ/api?q=author%3A\".$request->name.\"%3A&format=json\");\n\n //IMPOSTA L'OPZIONE CURLOPT_RETURNTRANSFER A true IN MODO DA POTER CONSERVARE IL RISULTATO IN UNA VARIABILE\n //CON LA FUNZIONE curl_multi_getcontent();\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n //ESEGUE LA RICHIESTA HTTP (GET DI DEFAULT) ATTRAVERSO LA RISORSA curl\n curl_exec($ch);\n\n $jsonResult= json_decode(curl_multi_getcontent($ch));\n\n if(!isset($jsonResult->result->hits->hit)){\n echo \"Vuoto\";\n return;\n }\n //ESTRAE IN MODO APPROPRIATO I DATI DI INTERESSE DALLA VARIABILE\n //Array che contiene i nomi dei campi da utilizzare come chiavi(tranne authors, trattato separatamente);\n $field = array(\"title\",//titolo della pubblicazione\n \"venue\",//rivista di pubblicazione\n \"volume\",//volume della rivista\n \"number\",//numero della rivista\n \"pages\",//pagine della rivista\n \"year\",//anno di pubblicazione\n \"type\",//tipo di pubblicazione\n \"key\",//The key can also be found as the \"key\" attribute of the record in the record's XML export.(dal faq di dblp)\n \"doi\",// id identificativo della pubblicazione (http://dblp.uni-trier.de/doi/)\n \"ee\",// Link alla risorsa (pdf o sito su cui comprare il pdf)\n \"url\");// Link alla pagina di dblp\n\n //Array (simil-DAO) in cui vengono salvate le informazioni di ogni hit\n $publication = array(\"title\"=>'', \"authors\" => array(), \"venue\"=>'',\"volume\"=>'',\"key\"=>'',\"number\"=>'', \"pages\"=>'', \"year\"=>'',\"type\"=>'',\n \"doi\"=>'',\"ee\"=>'',\"url\"=>'' );\n //CICLA SU TUTTE LE ISTANZE DI HIT CONTENUTE IN HITS (CONTENUTE IN RESULT)\n foreach ($jsonResult->result->hits->hit as $currentPub) {\n //PER OGNI CAMPO (descritto in $field)...\n foreach ($field as $curField) {\n //... SE IL CAMPO, PER QUELLA ISTANZA, NON è NULLO, ASSEGNA ALL'ARRAY DI SALVATAGGIO IL CORRISPONDENTE VALORE (no authors)\n if(isset($currentPub->info->$curField))$publication[$curField] = $currentPub->info->$curField;\n else $publication[$curField] = \"//\";\n }\n //TRATTAZIONE DELL'ARRAY DI AUTORI: SE E' UN ARRAY (più autori)...\n if(is_array($currentPub->info->authors->author)){\n foreach ($currentPub->info->authors->author as $author) {\n array_push($publication[\"authors\"],$author);//AVVALORA L'ARRAY DEGLI AUTORI\n }//...ALTRIMENTI, SE VI è UN SOLO AUTORE...\n }else array_push($publication[\"authors\"],$currentPub->info->authors->author);\n\n /*DEBUG*/\n // var_dump($publication);\n $publication[\"authors\"] = array();//DATO CHE USIAMO SEMPRE LA STESSA VARIABILE, PER PULIRE L'ARRAY DEGLI AUTORI\n echo '<br><br><br>';\n\n }\n //LIBERA LA RISORSA ALLOCATA\n curl_close($ch);\n }",
"public function search()\n {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $this->getUrl());\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);\n ob_start();\n curl_exec($ch);\n $response = ob_get_contents();\n ob_end_clean();\n\n curl_close($ch);\n\n return $response;\n }",
"function query_api($term, $location) {\r\n $response = json_decode(search($term, $location));\r\n $business_id = $response->businesses[0]->id;\r\n /* \r\n print sprintf(\r\n \"%d local businesses found, querying business info for the top result \\\"%s\\\"\\n\\n <br>\",\r\n count($response->businesses),\r\n $business_id\r\n );\r\n */ \r\n $response = get_business($business_id);\r\n \r\n print sprintf(\"Result for business \\\"%s\\\" found:\\n\", $business_id);\r\n $pretty_response = json_encode(json_decode($response), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);\r\n print \"$pretty_response\\n\";\r\n\r\n return json_decode($response, true);\r\n }",
"abstract public function find($query_string);",
"public function search($request) {\n // Prepare Google search request parameters\n $query = urlencode(\"{$_SERVER['HTTP_HOST']} {$_GET['q']}\");\n $offset = isset($_GET['start']) ? (int)$_GET['start'] : '0';\n $response = file_get_contents(sprintf(self::GOOGLE_SEARCH_URL, $query, $offset));\n \n // Decode JSON response and prepare view content\n $response = json_decode($response);\n $searchResults = $pages = array();\n\n // Build list of search results\n foreach($response->responseData->results as $result)\n $searchResults[] = sprintf(self::SEARCH_RESULT, $result->unescapedUrl, $result->titleNoFormatting, $result->titleNoFormatting, $result->content);\n\n // Prepare pagination options\n $resultsCount = isset($response->responseData->cursor->estimatedResultCount) ? $response->responseData->cursor->estimatedResultCount : 0;\n $currentPageIndex = $response->responseData->cursor->currentPageIndex;\n\n if($resultsCount) {\n // Previous pagination option\n if($currentPageIndex > 0) {\n $page = $response->responseData->cursor->pages[$currentPageIndex - 1];\n $url = sprintf(self::SITE_SEARCH_URL, urlencode($_GET['q']), $page->start);\n $pages[] = sprintf(self::PAGINATION_LINK, $url, '<< Previous', '<< Previous');\n\n } else {\n $pages[] = sprintf(self::PAGINATION_ACTIVE, '<< Previous');\n }\n\n // Page pagination option\n foreach($response->responseData->cursor->pages as $index => $page) {\n if($currentPageIndex == $index) {\n $pages[] = sprintf(self::PAGINATION_ACTIVE, $page->label);\n\n } else {\n $url = sprintf(self::SITE_SEARCH_URL, urlencode($_GET['q']), $page->start);\n $pages[] = sprintf(self::PAGINATION_LINK, $url, $page->label, $page->label);\n }\n }\n\n // Next pagination option\n if($currentPageIndex < 7 && count($response->responseData->cursor->pages) > 1) {\n $page = $response->responseData->cursor->pages[$currentPageIndex + 1];\n $url = sprintf(self::SITE_SEARCH_URL, urlencode($_GET['q']), $page->start);\n $pages[] = sprintf(self::PAGINATION_LINK, $url, 'Next >>', 'Next >>');\n\n } else {\n $pages[] = sprintf(self::PAGINATION_ACTIVE, 'Next >>');\n }\n }\n\n return $this->customise(array(\n 'Title' => 'Search Results',\n 'SearchQuery' => Convert::raw2xml($_GET['q']),\n 'ResultsCount' => $resultsCount,\n 'MoreResultsUrl' => $response->responseData->cursor->moreResultsUrl,\n 'SearchResults' => implode(\"\\r\\n\", $searchResults),\n 'Pagination' => implode(\"\\r\\n\", $pages),\n ))->renderWith(array('SearchPage', 'Page'));\n }",
"function search($query, $year=NULL, $page_limit=5, $page=NULL) {\n\t\t\n\t\t$args = array (\n\t\t\t\"q\" => $query,\n\t\t\t\"year\" => (int)$year,\n\t\t\t\"page_limit\" => $page_limit,\n\t\t\t\"page\" => $page\n\t\t);\n\t\t\n\t\t$json = $this->request(self::API_URL_TMPL_SEARCH, array(\n\t\t\t\"query-args\" => $this->collapse_args($args)\n\t\t));\n\t\t\n\t\tif(isset($json->total)) {\n\t\t\t\n\t\t\tif($json->total > 0) {\n\t\t\t\t\n\t\t\t\treturn new rt_search_result($json);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\treturn array();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\treturn NULL;\n\t\t\t\n\t\t}\n\t\t\n\t}",
"protected function search()\n\t{\n\t\treturn Phpfox::getLib('search');\t\n\t}",
"function product_search($query_string = false, $lang = 'en_us')\n\t{\n\t\t$lang = str_replace('_', '-', $lang);\n\t\t\n\t\tif (!empty($query_string))\n\t\t{\n\t\t\n\t\t\t$query = explode(' ', $query_string);\n\t\t\n\t\t}\n\t\t\n\t\t$content = '<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\t\t\t<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n\t\t\t\t<soap:Header>\n\t\t\t\t\t<ServiceAuthHeader xmlns=\"http://tempuri.org/\">\n\t\t\t\t\t\t<UserName>' . $this->username . '</UserName>\n\t\t\t\t\t\t<Password>' . $this->password . '</Password>\n\t\t\t\t\t</ServiceAuthHeader>\n\t\t\t\t</soap:Header>\n\t\t\t\t<soap:Body>\n\t\t\t\t\t<product_search xmlns=\"http://tempuri.org/\">';\n\t\tif (!empty($query)) {\n\t\t\tforeach ($query as $q) $content .= '<search_terms>' . $q . '</search_terms>';\n\t\t}\n\t\t$content .=\t'<lang>'.$lang.'</lang></product_search>\n\t\t\t\t</soap:Body>\n\t\t\t</soap:Envelope>';\n\t\t\n\t\t$headers = array( \n\t\t\t'POST /redactedapiservice.asmx HTTP/1.1',\n\t\t\t'Host: 000.00.000.185',\n\t\t\t'Content-Type: text/xml; charset=utf-8',\n\t\t\t'Content-Length: ' . strlen($content),\n\t\t\t'SOAPAction: \"http://tempuri.org/product_search\"',\n\t\t);\n\t\t\n\t\treturn $this->_init_curl($content, $this->url, $headers);\n\t\t\n\t}",
"function search() {\n // ...\n }",
"abstract public function translate_short_repo_url($repo, $tag);",
"function consulta($fword)\n {\n\t\t$ch = curl_init();\n\t\t//start the consult in the URL OF WIKI API with trated word.\n\t\t//for more examples and tests of querys, follow this link: http://en.wikipedia.org/wiki/Special:ApiSandbox\n\t\tcurl_setopt($ch, CURLOPT_URL, \"http://pt.wikipedia.org/w/api.php?action=query&prop=extracts&format=xml&exlimit=1&exintro=&titles=\".$fword);\n\t\t//configs of cURL\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t//result of query\n\t\t$result = curl_exec($ch);\n\t\t//close the cURL\n\t\tcurl_close($ch);\n\t\t//show results to XML for the javascrip read\n\t\techo $result;\n }",
"function query() {}",
"public function search(){}",
"function sbn_search($ccl_query) {\n global $_SBN;\n // let YAZ parse the query and check for error\n $result = yaz_ccl_parse($this->conn, $ccl_query, $ccl_result);\n if (!$result) {\n throw new sbn_exception(\"La query non puo' essere processata\");\n } else {\n // fetch RPN result from the parser\n $rpn = $ccl_result[\"rpn\"];\n // do the actual query\n yaz_search($this->conn, \"rpn\", $rpn);\n // wait blocks until the query is done\n yaz_wait();\n if (yaz_error($this->conn) != \"\") {\n throw new sbn_exception(\"Error: \" . yaz_error($this->conn).\"<br>\");\n }\n // yaz_hits returns the amount of found records\n /*\n $hits = yaz_hits($this->conn);\n if ($hits > 0) {\n //echo \"Found \".$hits .\" hits:<br>\";\n // yaz_record fetches a record from the current result set,\n // so far I've only seen server supporting string format\n //$result = yaz_record($this->conn, 1, \"string\");\n //print($result);\n //echo \"<br><br>\";\n // the parsing functions will be introduced later\n /*\n if ($_SBN['syntax'] == \"mab\") {\n $parsedResult = parse_mab_string($result);\n } else {\n $parsedResult = parse_usmarc_string($result);\n }\n print_r($parsedResult);\n } else {\n echo \"No records found.\";\n }\n */\n }\n }",
"function core_github_parse($url){\n\tpreg_match(\"/https:\\/\\/([^\\/]+)\\/(.*)/is\", $url, $matches);\n\t$return = array();\n\t$return['domain'] = $matches[1];\n\t$return['url'] = $matches[2];\n\treturn $return;\n}",
"function html_browse($proj, $repos) {\n\n if (isset($_GET['b'])) {\n html_blob($proj, $_GET['b'], $repos);\n } else {\n // Get the tree, otherwise default to HEAD\n if (isset($_GET['t'])) {\n $tree = $_GET['t'];\n } else {\n $tree = \"HEAD\";\n }\n html_tree($proj, $tree, $repos);\n }\n}",
"function short($urlf){\r\n\t\r\n$url = file_get_contents(\"http://migre.me/api.txt?url=$urlf\");\r\necho $url;\r\n}",
"public function search($query)\n {\n // check that the query parameter is not null, it is required\n if ($query) {\n // items in this array will be passed as HTTP get parametrs in the request\n $params = array();\n // add the query to the parameters array\n $params['query'] = $query;\n // create the HTTP request url\n $this->url = $this->buildRequestURL('divisions', $params);\n // return the json result\n return $this->execute();\n }\n // throw an exception when the query parameter is null\n throw new \\Exception('Query is required.');\n }",
"function search($offset,$limit,$queries){\r\n\t\t\r\n\t\t// Example: $queries = array('blog_tags: '.$_GET['q']);\r\n\r\n\t\tforeach ( $queries as $query ) {\r\n\t\t\t$response = $this->connection->search( $query, $offset, $limit );\r\n\t\t\t\r\n\t\t\tif ( $response->getHttpStatus() == 200 ) {\t\r\n\t\t\t\tprint_r( $response->getRawResponse() );\r\n\t\t\t\t\r\n\t\t\t\tif ( $response->response->numFound > 0 ) {\r\n\t\t\t\t\techo \"$query <br />\";\r\n\r\n\t\t\t\t\tforeach ( $response->response->docs as $doc ) { \r\n\t\t\t\t\t\techo \"$doc->partno $doc->name <br />\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\techo '<br />';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\techo $response->getHttpStatusMessage();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"function imedea_project_list( $atts ){\n\textract(shortcode_atts(array(\n\t\t'page_id' => $_GET[\"page_id\"],\n\t\t'type' => $_GET[\"type\"],\n\t\t'research_unit_id' => $_GET[\"research_unit_id\"],\n\t\t'year' => $_GET[\"year\"],\n\t\t'search' => $_GET[\"search\"],\n\t\t'title'=> $_GET[\"title\"],\n\t\t'person_id' => $_GET[\"person_id\"],\n\t\t'showall' => $_GET[\"showall\"],\n\t), $atts));\n\t\n\t$iapi_plugin_options = get_option('iapi_plugin_options');\n\t$webapi_url = $iapi_plugin_options['webapi_url'];\n\t//$page_detail_id = $iapi_plugin_options['prj_detail_page_id'];\n\t$page_length = $iapi_plugin_options['webapi_pagination_length'];\n\t\n\tob_start();\n\t\n\t/* search pannel */\n\tproject_filter_pannel($webapi_url, $type, $research_unit_id, $year, $title);\n\t\n\t/* show applied filters */\n\tshow_project_filters($person_id);\n\t\n\t\n\t$count = get_projects($webapi_url, $page_length, $research_unit_id, $year, $type, $title, $person_id, $showall);\n\t\n\t/* Pagination */\n\tpagination ($page_length, $type, $count, $research_unit_id, $year, $title, $person_id, null);\n\t\n\treturn ob_get_clean();\n\t\n}",
"public function getSearch();",
"function fetchAndDisplayResults($query) {\n\t\tif (trim($query) == '') {\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\t$results = $this->scrape(urlencode($query));\n\t\t$this->showResults($results);\n\t}",
"public function unitTests($unit) {\n\t\techo \"<p>Search Results Tests:</p><ul>\";\n\t\t\n\t\techo \"<li>Known Valid Search\";\n\t\t$searchStr = $this->search(\"motrin\");\n\t\t$searchObj = $this->search(\"motrin\", true);\n\n\t\techo $unit->run($searchStr,'is_string', 'String Requested, String Returned');\n\t\techo $unit->run($searchObj,'is_object', 'Object Requested, Object Returned');\n\t\techo $unit->run($searchObj->error,'is_null', 'Error object is null');\n\t\techo $unit->run(count($searchObj->results) > 0, true, \"Result object results array has contents.\");\n\n\t\techo \"</li>\";\n\n\t\techo \"<li>Known Invalid Search\";\n\t\t$searchStr = $this->search(\"wallbutrin\");\n\t\t$searchObj = $this->search(\"wallbutrin\", true);\n\n\t\techo $unit->run($searchStr,'is_string', \"String Requested, String Returned\");\n\t\techo $unit->run($searchObj,'is_object', \"Object Requested, Object Returned\");\n\t\techo $unit->run($searchObj->error, 'is_object', \"Error object is valid\");\n\t\techo $unit->run($searchObj->error->code, 'NOT_FOUND', \"Error object contains code NOT_FOUND\");\n\n\t\techo \"</li>\";\n\n\t\techo \"<li>Empty Search\";\n\t\t$searchStr = $this->search(\"\");\n\t\t$searchObj = $this->search(\"\", true);\n\n\t\techo $unit->run($searchStr, 'is_string', \"String Requested, String Returned\");\n\t\techo $unit->run($searchObj, 'is_object', \"Object Requested, Object Returned\");\n\t\techo $unit->run($searchObj->error, 'is_object', \"Error object is valid\");\n\t\techo $unit->run($searchObj->error->code, 'NOT_FOUND', \"Error object contains code NOT_FOUND\");\n\n\t\techo \"</li>\";\n\n\t\techo \"</ul>\";\n\n\t\techo \"<p>Cache Results Tests</p><ul>\";\n\t\t$cacheTerm = \"testingTerm\";\n\t\t$cacheDataIn = json_encode(array('test' => true, 'error' => false));\n\n\t\techo \"<li>Cache sanity\";\n\t\t$this->_setCache($cacheTerm, $cacheDataIn);\n\t\t$cacheDataOut = $this->_getCache($cacheTerm);\n\n\t\techo $unit->run($cacheDataOut, $cacheDataIn, \"Cache returns the same values it was given\");\n\n\t\t$this->_invalidateCache($cacheTerm);\n\t\t$fetchResult = $this->_getCache($cacheTerm);\n\n\t\techo $unit->run($fetchResult, 'is_false', \"Invalidated cache entry does not return a result\");\n\n\t\techo \"</li>\";\n\n\t\techo \"<li>Cache actually used and updated by search\";\n\t\t$cacheTerm = 'motrin';\n\t\t$this->_invalidateCache($cacheTerm);\n\t\t$fetchResult = $this->_getCache($cacheTerm);\n\n\t\techo $unit->run($fetchResult, 'is_false', \"Known Search cache invalidated\");\n\t\t$searchResult = $this->search($cacheTerm);\n\n\t\techo $unit->run($searchResult, 'is_string', \"Known Search returns string\");\n\n\t\t$fetchResult = $this->_getCache($cacheTerm);\n\t\techo $unit->run($searchResult, $fetchResult, \"Known search and cache entry match\");\n\n\t\t$searchResult2 = $this->search($cacheTerm);\n\t\techo $unit->run($searchResult2, $searchResult, \"Search returns same on cache miss and hit\");\n\n\t\techo \"</li>\";\n\t\techo \"</ul>\";\n\t}",
"public function search($search);",
"function culturefeed_search_ui_redirect_cnapi_urls() {\n\n $new_query = array();\n\n // Check if we are on a searchable page.\n $current_search_page = culturefeed_get_searchable_type_by_path();\n if (!$current_search_page) {\n return;\n }\n\n // Regio is now location.\n if (isset($_GET['regio'])) {\n $region = db_query('SELECT name FROM {culturefeed_search_terms} WHERE tid = :tid', array(':tid' => 'reg.' . $_GET['regio']))->fetchField();\n if ($region) {\n $new_query['location'] = $region;\n }\n }\n\n // City id is now location.\n if (isset($_GET['cityid'])) {\n $result = db_query('SELECT name, zip FROM {culturefeed_search_cities} WHERE cid = :cityid', array(':cityid' => $_GET['cityid']))->fetchObject();\n if ($result) {\n $new_query['location'] = $result->zip . ' ' . $result->name;\n }\n }\n\n // City can be mapped to location.\n if (isset($_GET['city'])) {\n $query = $_GET['city'];\n $new_query['location'] = $query;\n }\n\n // Query is now search.\n if (isset($_GET['query'])) {\n $query = $_GET['query'];\n $new_query['search'] = $query;\n }\n\n // K is now keyword.\n if (isset($_GET['k'])) {\n $k = $_GET['k'];\n $new_query['keyword'] = $k;\n }\n\n // Datetype is now facet[datetype][0].\n if (isset($_GET['datetype'])) {\n $datetype = $_GET['datetype'];\n $new_query['facet']['datetype'][0] = $datetype;\n }\n\n // Date is now date_range.\n if (isset($_GET['date'])) {\n $date = $_GET['date'];\n $new_date = date(\"d/m/Y\", strtotime($date));\n $new_query['date_range'] = $new_date;\n }\n\n // Headings are now a combination of facets.\n if (isset($_GET['heading'])) {\n\n if (strpos($_GET['heading'], ';') !== false) {\n $heading = explode(';', $_GET['heading']);\n if ($heading[0] !== '') {\n $heading = $heading[0];\n }\n else {\n $heading = $heading[1];\n }\n }\n else {\n $heading = $_GET['heading'];\n }\n\n $mapping = culturefeed_search_ui_get_headings_mapping($heading);\n\n // Voor kinderen is not a facet\n if (isset($mapping['voor_kinderen'])) {\n $new_query['voor-kinderen'] = '1';\n unset($mapping['voor_kinderen']);\n }\n foreach ($mapping as $category => $id) {\n $new_query['facet'][$category][0] = $id;\n }\n }\n\n if (!empty($new_query)) {\n drupal_goto(current_path(), array('query' => $new_query), 301);\n }\n\n}",
"public function GoogleBL($domain,$api_key,$searchengine_id){\r\n\t$ctx = stream_context_create(array('http'=>array('timeout' => 5,)));//1200 Seconds is 20 Minutes\r\n\t$url=\"http://www.\".$domain;\r\n\tfile_get_contents($url, false, $ctx);\r\n\tif(isset($http_response_header))\r\n\t{\r\n\t\t$string=$http_response_header['0'];\r\n\t\t$status=explode(' ', $string);\r\n\t\t$status=$status['1'];\r\n\t\tif ($status==\"200\")\r\n\t\t{\r\n\r\n $search_query = \"link:$domain\";\r\n $array=array(); $url=\"https://www.googleapis.com/customsearch/v1?key=$api_key&cx=$searchengine_id&num=10&q=$search_query&fields=items/link,searchInformation/totalResults\";\r\n $google_search = file_get_contents($url);\r\n $seo_data=json_decode($google_search,true);\r\n\r\n if($seo_data['searchInformation']['totalResults']!=NULL)\r\n {\r\n return $seo_data;\r\n }\r\n\t\t}\r\n else\r\n {\r\n \techo '<div class=\"alert alert-danger alert-dismissable\" >\r\n\t\t\t <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">×</button>\r\n\t\t\t\t<i class=\"ion-sad\"></i>'.$status.'</div>';\r\n\t\t\t }\r\n\t}\r\n }",
"public function api()\n {\n $input = request('q');\n $tags = Tag::where('name', 'like', $input.'%')\n ->orWhere('name', 'like', '% '.$input.'%')->get(\n ['name AS text', 'id']\n )->toArray();\n\n if ($input != '')\n {\n return response()->json([\n 'results' => $tags\n ]);\n }\n else\n {\n return response()->json([\n 'results' => ''\n ]);\n }\n }",
"public function search($input)\n {\n $client = new Client();\n try {\n $res = $client->get('https://www.googleapis.com/books/v1/volumes',\n [\n 'query' => [\n 'key' => config('services.googleBooks.key'),\n 'q' => $input,\n ],\n ]\n );\n } catch (\\Exception $e) {\n return response()->json(['errors' => $e->getMessage()], 422);\n }\n $res->getStatusCode(); // 200\n $response = json_decode($res->getBody());\n $results = [];\n if (!$response || !isset($response->items)) {\n return response()->json($response);\n }\n foreach ($response->items as $item) {\n $formattedResponse = $this->transformToJustBookrFormat($item, request('save', false));\n if ($formattedResponse) {\n array_push($results, $formattedResponse);\n }\n }\n if (request('format', 'JustBookr') == 'google') {\n return response()->json($response);\n }\n\n return response()->json($results);\n }",
"abstract protected function getRepoReleaseInfo();",
"function mainPull()\n {\n x_echoFlush('<pre>');\n x_EchoFlush('<h2>Looking For Andromeda Version</h2>');\n x_EchoFlush(\"\");\n\n // First take care of where we are pulling version\n // information from\n $def = \"http://andro.svn.sourceforge.net/svnroot/andro/releases/\";\n $row = SQL_OneRow(\n \"Select * from applications where application='andro'\"\n );\n if (!isset($row['svn_url'])) {\n x_EchoFlush(\"-- This looks like the first time this node has\");\n x_EchoFlush(\" been upgraded from Subversion. Using default\");\n x_echoFlush(\" URL to look for releases:\");\n x_EchoFlush(\" \".$def);\n $url = $def;\n } else {\n if (is_null($row['svn_url']) || trim($row['svn_url'])=='') {\n x_EchoFlush(\"-- Setting the Subversion URL to default:\");\n x_EchoFlush(\" \".$def);\n $url = $def;\n $row['svn_url'] = $def;\n SQLX_Update('applications', $row);\n } else {\n $url = trim($row['svn_url']);\n x_EchoFlush(\"-- Using the following URL for Subversion:\");\n x_EchoFlush(\" \".$url);\n }\n }\n\n // Find out what the latest version is\n x_EchoFlush(\"\");\n x_EchoFlush(\"-- Querying for latest version...\");\n $command = 'svn list '.$url;\n x_EchoFlush(\" Command is: \".$command);\n $rawtext = `$command`;\n if ($rawtext=='') {\n x_EchoFlush(\"-- NO VERSIONS RETRIEVED!\");\n x_EchoFlush(\" It may be that the Sourceforge site is down?\");\n x_EchoFlush(\"\");\n x_echoFlush(\" ---- Stopped Unexpectedly --- \");\n return;\n }\n $rawtext = str_replace(\"\\r\", \"\", $rawtext);\n $lines = explode(\"\\n\", $rawtext);\n // Pop off empty entry at end, then get latest version\n array_pop($lines);\n $latest=array_pop($lines);\n if (substr($latest, -1)=='/') {\n $latest = substr($latest, 0, strlen($latest)-1);\n }\n\n x_EchoFlush(\" Latest published version: \".$latest);\n\n // now find out what version we have\n x_EchoFlush(\" \");\n x_EchoFlush(\"-- Finding out what version the node manager is at\");\n $file=$GLOBALS['AG']['dirs']['application'].'_andro_version_.txt';\n x_EchoFlush(\" Looking at file: $file\");\n if (!file_exists($file)) {\n x_EchoFlush(\" File not found, it appears this is the first time\");\n x_EchoFlush(\" this node has been upgraded this way. Will proceed\");\n x_EchoFlush(\" to get latest version.\");\n } else {\n $version = file_get_contents($file);\n x_EchoFlush(\" Current version is \".$version);\n \n if ($version == $latest) {\n x_echoFlush(\" This node is current! Nothing to do!\");\n x_EchoFlush(\"\");\n x_echoFlush(\" ---- Processing completed normally ---- \");\n return;\n } else {\n x_echoFlush(\" Newer version available, will get latest.\");\n }\n }\n \n // now get the latest code\n $dir = $GLOBALS['AG']['dirs']['root'];\n $command = 'svn export --force '.$url.$latest.' '.$dir;\n x_EchoFlush(\"\");\n x_EchoFlush(\"-- Overwriting Node Manager now\");\n x_echoFlush(\" Command is \".$command);\n `$command`;\n x_echoFlush(\"\");\n file_put_contents($file, $latest);\n x_EchoFlush(\" ---- Processing completed normally ---- \");\n\n }",
"function githubDownload($date){\n global $githubOutput;\n\n $githubOutput = array();\n $githubUrl = \"https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_daily_reports/{$date}.csv\";\n\n $init = curl_init();\n curl_setopt($init,CURLOPT_URL,$githubUrl);\n curl_setopt($init,CURLOPT_SSL_VERIFYPEER,false);\n curl_setopt($init,CURLOPT_VERBOSE,true);\n curl_setopt($init,CURLOPT_RETURNTRANSFER,true);\n curl_setopt($init,CURLOPT_CONNECTTIMEOUT,15);\n\n $curl = curl_exec($init);\n\n if (!curl_errno($init)) {\n $lines = array_filter(explode(PHP_EOL, $curl));\n $first_line = str_getcsv($lines[0]);\n $first_line = str_replace(\"_\",\"/\",$first_line);\n $first_line = str_replace(array(\"Last Update\",\"Last_Update\",\"Last/Update\"),array(\"Update\",\"Update\",\"Update\"),$first_line);\n\n //riadky v csv\n for ($i = 1; $i < count($lines); $i++) {\n $line = str_getcsv($lines[$i]);\n $result = array();\n\n //polozky v riadku\n foreach ($line as $key => $val) {\n $needles = array(\",\",\"&\",\"'\");\n $newValues = array(\"\",\"\\&\",\"´\");\n $lineItem = str_replace($needles,$newValues,trim($val));\n\n //ulozenie nacitanych dat do pola\n if (strpos($first_line[$key],\"State\")!== false) {\n $result[\"State\"] = trim($lineItem);\n }\n if (strpos($first_line[$key],\"Country\")!== false) {\n $result[\"Country\"] = trim($lineItem);\n }\n if (strpos($first_line[$key],\"Update\")!== false) {\n $result[\"Update\"] = trim($lineItem);\n }\n if (strpos($first_line[$key],\"Confirmed\")!== false) {\n $result[\"Confirmed\"] = (int)$lineItem;\n }\n if (strpos($first_line[$key],\"Deaths\")!== false) {\n $result[\"Deaths\"] = (int)$lineItem;\n }\n if (strpos($first_line[$key],\"Recovered\")!== false) {\n $result[\"Recovered\"] = (int)$lineItem;\n }\n $result[\"ReportDate\"] =str_replace(\"-\",\"/\",$date);\n }\n //do $githubOutput sa zapise novy zaznam = riadok\n array_push($githubOutput, $result);\n }\n //uprava dat\n fixGithubData();\n }\n}",
"abstract protected function queryString(): string;",
"abstract public function repository();",
"function testPageQuery() {\n\t$config = getConfig();\n\t$root = getRootPath();\n\t\n\t$http = new \\AutoHttp\\Http($config);\n\t\n\t// Load the test page as a GET using a param array.\n\t$page = $http->getPage($root . '/test/pages/http/params.php', null, array('foo' => 'bar'));\n\t\t\n\t// Make sure the test page received our GET params.\n\tif (strpos($page['body'], '<li>GET foo=bar</li>') === false)\n\t\treturn 'Test page should list the GET parameters from our array.';\n\t\n\t// Load the test page as a GET using a param string.\n\t$page = $http->getPage($root .'/test/pages/http/params.php', null, 'hi=there');\n\t\t\n\t// Make sure the test page received our GET params.\n\tif (strpos($page['body'], '<li>GET hi=there</li>') === false)\n\t\treturn 'Test page should list the GET parameters from our string.';\n\t\n\t// Load the test page as a POST using a param array.\n\t$page = $http->getPage($root .'/test/pages/http/params.php', null, null, array('createUser' => '1'));\n\t\t\n\t// Make sure the test page received our POST params.\n\tif (strpos($page['body'], '<li>POST createUser=1</li>') === false)\n\t\treturn 'Test page should list the POST parameters from our array.';\n\t\n\t// Load the test page as a POST using a param string.\n\t$page = $http->getPage($root .'/test/pages/http/params.php', null, null, 'username=johndoe');\n\t\t\n\t// Make sure the test page received our POST params.\n\tif (strpos($page['body'], '<li>POST username=johndoe</li>') === false)\n\t\treturn 'Test page should list the POST parameters from our string.';\n\t\t\n\treturn true;\t\n}",
"public function queryString();",
"function query() {\n }"
] | [
"0.6684253",
"0.64568156",
"0.63924336",
"0.6026684",
"0.60118747",
"0.5912671",
"0.56734014",
"0.56247395",
"0.55762845",
"0.5573877",
"0.55727476",
"0.55644506",
"0.5533422",
"0.55119205",
"0.5500073",
"0.54918104",
"0.54769564",
"0.5463076",
"0.541388",
"0.5401627",
"0.5395288",
"0.53600943",
"0.53226066",
"0.5291884",
"0.5254233",
"0.52394176",
"0.5228887",
"0.5209292",
"0.5209292",
"0.5204174",
"0.51934034",
"0.5180488",
"0.51798505",
"0.51484925",
"0.51451755",
"0.5144004",
"0.5139455",
"0.5132637",
"0.5129674",
"0.51171064",
"0.5111056",
"0.50975233",
"0.5089932",
"0.5077174",
"0.50737995",
"0.5072523",
"0.5061845",
"0.50610524",
"0.50542367",
"0.5046663",
"0.50440294",
"0.50397706",
"0.50343335",
"0.5027172",
"0.502504",
"0.50214934",
"0.5020631",
"0.5015335",
"0.5014506",
"0.50105",
"0.5008579",
"0.5008579",
"0.50009453",
"0.49983796",
"0.4994978",
"0.499402",
"0.49935067",
"0.49918658",
"0.4991742",
"0.4985866",
"0.49708304",
"0.49667862",
"0.49662417",
"0.49625894",
"0.49597692",
"0.49505562",
"0.49501303",
"0.49354404",
"0.49345285",
"0.49329445",
"0.49306569",
"0.49244973",
"0.491692",
"0.4885573",
"0.48631346",
"0.4861228",
"0.4860427",
"0.48551464",
"0.4850667",
"0.4850383",
"0.4848182",
"0.4846319",
"0.4843618",
"0.48420703",
"0.48414615",
"0.48403454",
"0.48347878",
"0.48326868",
"0.4830955",
"0.48295295"
] | 0.6833719 | 0 |
Constructs a new class instance. | public function __construct(MenuLinkManagerInterface $link) {
$this->link = $link;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function newInstance();",
"public function newInstance();",
"public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }",
"public function newInstance(): object;",
"public function new()\n\t{\n\t\t//\n\t}",
"public function new()\n\t{\n\t\t//\n\t}",
"public function fn_construct_class() {\n\t}",
"public static function newInstance()\n {\n $instance = new self;\n return $instance;\n }",
"public function create(){\r\n\treturn new $this->class();\r\n }",
"public function newInstance()\n {\n return new self();\n }",
"function new_instance($class)\n {\n }",
"public function construct() {\n\n }",
"function __constructor(){}",
"private function __construct() {\n \n trace('***** Creating new '.__CLASS__.' object. *****');\n \n }",
"public static function make() {\n return new self();\n }",
"public function create(string $class);",
"public function new()\n {\n //\n }",
"public function new()\n {\n //\n }",
"public function construct()\n\t\t{\n\t\t}",
"public static function create() {\n\t\treturn new self();\n\t}",
"function createInstance(ClassDefinition $classDefinition);",
"public static function create() {}",
"public static function create() {}",
"public static function create() {}",
"public static function factory()\n {\n return new self;\n }",
"function _new() {\n\tglobal $__classes;\n\n\t$args = func_get_args();\n\t$class=$args[0];\n\tif($__classes[$class] != \"\" && $class != \"db\") {\n\t\t$res = $__classes[$class];\n\t} else {\n\t\tif(!class_exists($class)) {\n\t\t\t//init class\n\t\t\tif (file_exists(BACKEND.$class.\".class.php\"))\n\t\t\t\tinclude(BACKEND.$class.\".class.php\");\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\n\t\tfor($i = 1; $i< count($args);$i++) $_args[] .= \"\\$args['\".$i.\"']\";\n\n\t\t$__args = \"\";\n\t\tif(@count($_args) > '0') {\n\t\t\t$__args = \"(\".implode(\",\",$_args).\")\";\n\t\t}\n\n\t\t$res = \"\";\n\t\teval(\"\\$res = new \".$class.$__args.\";\");\n\t\tdebuglog(\"neue Klasse\",\"Neue Klasse initiert:\".$class);\n\t\t$__classes[$class] = $res;\n\t}\n\treturn $res;\n }",
"static function create(): self;",
"public static abstract function createInstance();",
"public static function createInstance()\n {\n return new self();\n }",
"public function create()\n {\n return new $this->class;\n }",
"function _construct(){ }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n\t\t{\n\t\t\treturn new self();\n\t\t}",
"public static function create()\n\t{\n\t\treturn new self;\n\t}",
"public static function create(): self\n {\n return new self();\n }",
"public static function create(): self\n {\n return new self();\n }",
"function __construct($service) {\n // return new $class;\n }",
"public static function new()\n {\n return new static();\n }",
"public static function factory($flags = null, $class_name = null) {}",
"public static function factory($flags = null, $class_name = null) {}",
"public static function create() {\n return new self();\n }",
"public static function new(){\n self::$instance = new self();\n return self::$instance;\n }",
"public static function make(...$arguments)\n {\n return new static(...$arguments);\n }",
"public static function make(...$arguments)\n {\n return new static(...$arguments);\n }",
"public static function make(...$arguments)\n {\n return new static(...$arguments);\n }",
"public function newInstance()\n {\n return $this->newInstanceArgs(func_get_args());\n }",
"public function regularNew() {}",
"abstract public static function new(): static;",
"function get_new($class, $params=NULL)\r\n\t{\r\n\t\t$obj = $this->singularize(ucwords($class));\r\n\t\treturn new $obj($params);\r\n\t}",
"public function createClass()\n {\n return $this->addExcludesNameEntry($this->classes);\n }",
"final private function __construct() {}",
"final private function __construct() {}",
"protected function instantiate()\n\t{\n\t\t$class = get_class($this);\n\t\t$model = new $class(null);\n\t\treturn $model;\n\t}",
"public static function factory()\r\n {\r\n return parent::factory(__CLASS__);\r\n }",
"public static function init() {\n $class = __CLASS__;\n new $class;\n }",
"public function create()\n\t{\n\t\t$scope = new \\ReflectionClass( $this -> className );\n\t\t$new_scope = $scope -> newInstanceArgs( $this -> arguments );\n\t\treturn $new_scope;\n\t}",
"public function make() {}",
"final private function __construct() { }",
"final private function __construct() { }",
"final private function __construct() { }",
"public function getInstance(/* ... */)\n {\n $reflection = new ReflectionClass($this->getClass());\n return $reflection->newInstanceArgs(func_get_args());\n }",
"public static function make()\n {\n return new static();\n }",
"protected final static function createInstance($className, $arguments){\n\t\t// Some optimizations\n\t\tif (count($arguments) == 1) {\n\t\t\treturn new $className($arguments[0]);\n\t\t}\n\t\telse if (count($arguments) == 2) {\n\t\t\treturn new $className($arguments[0], $arguments[1]);\n\t\t}\n\t\telse if (count($arguments) == 3) {\n\t\t\treturn new $className($arguments[0], $arguments[1], $arguments[2]);\n\t\t}\n\t\telse if (count($arguments) == 4) {\n\t\t\treturn new $className($arguments[0], $arguments[1], $arguments[2], $arguments[3]);\n\t\t}\n\t\telse if (count($arguments) == 5) {\n\t\t\treturn new $className($arguments[0], $arguments[1], $arguments[2], $arguments[3], $arguments[4]);\n\t\t}\n\t\t\n\t\t// For any constructor with more arguments we use eval.\n\t\t$args = array();\n\t\tfor ($i = 0; $i < count($arguments); $i++) {\n\t\t\t$args[] = '$arguments[' . $i . ']';\n\t\t}\n\t\t$instance = null;\n\t\teval('$instance = new ' . $className . '(' . implode(',', $args) . ');');\n\t\treturn $instance;\n\t}",
"public static function init()\n {\n return new self();\n }",
"public static final function of($class) {\n return self::typeOf($class)->newInstance();\n }",
"public static function make () {\n return new static;\n }",
"public static function make(...$parameters)\n {\n return new static(...$parameters);\n }",
"public function newInstance(): object\n {\n return $this->instantiator->instantiate($this->name);\n }",
"private final function __construct() {}",
"public function construct_class($ipaddress) {\n global $DB;\n $class = new stdClass();\n $class->iplist = $ipaddress;\n $class->name = 'TestClass';\n $class->id = $DB->insert_record('block_supervised_classroom', $class);\n return $class;\n }",
"function __construct()\n {\n\n //Create a new instance of the View class\n $this->view = new View();\n\n //Create a new instance of the Template class\n $this->template = new Template();\n\n //Create a new instance of the Validator class\n $this->validator = new Validator();\n\n }",
"public static function construct(\\lang\\XPClass $class) {\n return $class->getConstructor()->newInstance([]);\n }",
"static public function create()\n {\n return new static();\n }",
"public abstract function createInstance($parameters);",
"public function build( $class ) {\n\t\t$full_class_name = $this->namespace . $class;\n\t\treturn new $full_class_name();\n\t}",
"public function __construct()\n\t{\n\t\t// Initialize reflectionClass with information about the target class\n\t\t$this->reflectionClass = new \\ReflectionClass($this);\n\t}",
"function __construct() {\n\t\t\n\t\t//$classname = str_ireplace(\"_Test\", \"\", get_class($this));\n\t\t\n\t\t//$this->testobject = new $classname();\n\t}",
"public static function make()\n {\n return new static;\n }",
"public static function make()\n {\n return new static;\n }",
"private static function _instantiateThisObject() {\r\n $className = get_called_class();\r\n return new $className();\r\n }",
"function _construct() {\n \t\n\t\t\n\t}"
] | [
"0.77641046",
"0.77641046",
"0.7518188",
"0.73818344",
"0.7319518",
"0.7319518",
"0.72318393",
"0.72280085",
"0.7218966",
"0.7172303",
"0.71602905",
"0.71520376",
"0.7122838",
"0.70705116",
"0.7035188",
"0.7032948",
"0.69531524",
"0.69531524",
"0.6950831",
"0.69421065",
"0.69297653",
"0.6920253",
"0.6920253",
"0.6920253",
"0.6915432",
"0.68988526",
"0.6878039",
"0.6867022",
"0.68524295",
"0.6847202",
"0.6839261",
"0.68285567",
"0.68285567",
"0.68285567",
"0.68285567",
"0.68285567",
"0.68285567",
"0.68285567",
"0.68285567",
"0.68285567",
"0.68285567",
"0.68285567",
"0.68285567",
"0.68285567",
"0.68285567",
"0.68285567",
"0.68285567",
"0.68285567",
"0.68285567",
"0.68285567",
"0.68285567",
"0.68285567",
"0.68277454",
"0.68124944",
"0.6795391",
"0.6795391",
"0.67886096",
"0.67765605",
"0.67706156",
"0.67706156",
"0.6769744",
"0.67436385",
"0.67378414",
"0.67378414",
"0.67378414",
"0.6716288",
"0.6714539",
"0.67082757",
"0.6702887",
"0.6690831",
"0.6681644",
"0.6681644",
"0.6660007",
"0.6649805",
"0.6628076",
"0.66260463",
"0.6624197",
"0.6620849",
"0.6620849",
"0.6620849",
"0.6580076",
"0.6571485",
"0.65680856",
"0.65545547",
"0.65535975",
"0.65455717",
"0.65375453",
"0.65272766",
"0.65223306",
"0.65214276",
"0.6495402",
"0.64834034",
"0.6482064",
"0.64776015",
"0.64514625",
"0.6448202",
"0.6445359",
"0.64354485",
"0.64354485",
"0.6434696",
"0.6422217"
] | 0.0 | -1 |
Creates a new class instance. | public static function create(ContainerInterface $container) {
return new static(
$container->get('plugin.manager.menu.link')
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }",
"function createInstance(ClassDefinition $classDefinition);",
"function new_instance($class)\n {\n }",
"public function create(string $class);",
"public function newInstance();",
"public function newInstance();",
"public function newInstance(): object;",
"public function create(){\r\n\treturn new $this->class();\r\n }",
"public function create()\n {\n return new $this->class;\n }",
"public static function newInstance()\n {\n $instance = new self;\n return $instance;\n }",
"public static abstract function createInstance();",
"public function new()\n\t{\n\t\t//\n\t}",
"public function new()\n\t{\n\t\t//\n\t}",
"public static function create() {}",
"public static function create() {}",
"public static function create() {}",
"public static function createInstance()\n {\n return new self();\n }",
"public function newInstance()\n {\n return new self();\n }",
"function get_new($class, $params=NULL)\r\n\t{\r\n\t\t$obj = $this->singularize(ucwords($class));\r\n\t\treturn new $obj($params);\r\n\t}",
"public static function create() {\n\t\treturn new self();\n\t}",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"function create($class, array $attributes = [])\n{\n return factory($class)->create($attributes);\n}",
"public static function create()\n\t{\n\t\treturn new self;\n\t}",
"public static function create(): self\n {\n return new self();\n }",
"public static function create(): self\n {\n return new self();\n }",
"public static function create()\n\t\t{\n\t\t\treturn new self();\n\t\t}",
"public function new()\n {\n //\n }",
"public function new()\n {\n //\n }",
"public static function factory($className)\n {\n return new $className;\n }",
"public static function create() {\n return new self();\n }",
"public function make($class)\n {\n return Kant::createObject($class);\n }",
"public function createClass()\n {\n return $this->addExcludesNameEntry($this->classes);\n }",
"static function create(): self;",
"public function create($class, $args = array()) {\n\n\t\t// load class\n\t\t$this->app->loader->register($class, 'classes:'.strtolower($class).'.php');\n\n\t\t// use reflection or new for object creation\n\t\tif (count($args) > 0) {\n\t\t\t$reflection = new ReflectionClass($class);\n\t\t\t$object = $reflection->newInstanceArgs($args);\n\t\t} else {\n\t\t\t$object = new $class();\n\t\t}\n\t\t\n\t\t// add reference to related app instance\n\t\tif (property_exists($object, 'app')) {\n\t\t\t$object->app = $this->app;\n\t\t}\n\t\t\n\t\treturn $object;\n\t}",
"protected function instantiate()\n\t{\n\t\t$class = get_class($this);\n\t\t$model = new $class(null);\n\t\treturn $model;\n\t}",
"public function & create($class) {\n\t\t# Add namepsace to class\n\t\t$objectFactoryClass = $this->getFactoryClassName($this->getFactoryClass($class));\n\t\t# Creating Factory object\n\t\t$objectFactory = new $objectFactoryClass();\n\t\t# Creating orignal object\n\t\t$object = $objectFactory->getInstance($this);\n\t\t# Returning object\n\t\treturn $object;\n\t}",
"public function &create()\n {\n $obj = null;\n\n if (class_exists($this->_class_name)) {\n // Assigning the return value of new by reference\n $obj = new $this->_class_name();\n }\n\n return $obj;\n }",
"protected final static function createInstance($className, $arguments){\n\t\t// Some optimizations\n\t\tif (count($arguments) == 1) {\n\t\t\treturn new $className($arguments[0]);\n\t\t}\n\t\telse if (count($arguments) == 2) {\n\t\t\treturn new $className($arguments[0], $arguments[1]);\n\t\t}\n\t\telse if (count($arguments) == 3) {\n\t\t\treturn new $className($arguments[0], $arguments[1], $arguments[2]);\n\t\t}\n\t\telse if (count($arguments) == 4) {\n\t\t\treturn new $className($arguments[0], $arguments[1], $arguments[2], $arguments[3]);\n\t\t}\n\t\telse if (count($arguments) == 5) {\n\t\t\treturn new $className($arguments[0], $arguments[1], $arguments[2], $arguments[3], $arguments[4]);\n\t\t}\n\t\t\n\t\t// For any constructor with more arguments we use eval.\n\t\t$args = array();\n\t\tfor ($i = 0; $i < count($arguments); $i++) {\n\t\t\t$args[] = '$arguments[' . $i . ']';\n\t\t}\n\t\t$instance = null;\n\t\teval('$instance = new ' . $className . '(' . implode(',', $args) . ');');\n\t\treturn $instance;\n\t}",
"public static function createClass($class)\n\t{\n\t\tself::$classes[$class] = new $class;\n\t}",
"public static function new()\n {\n return new static();\n }",
"function _new() {\n\tglobal $__classes;\n\n\t$args = func_get_args();\n\t$class=$args[0];\n\tif($__classes[$class] != \"\" && $class != \"db\") {\n\t\t$res = $__classes[$class];\n\t} else {\n\t\tif(!class_exists($class)) {\n\t\t\t//init class\n\t\t\tif (file_exists(BACKEND.$class.\".class.php\"))\n\t\t\t\tinclude(BACKEND.$class.\".class.php\");\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\n\t\tfor($i = 1; $i< count($args);$i++) $_args[] .= \"\\$args['\".$i.\"']\";\n\n\t\t$__args = \"\";\n\t\tif(@count($_args) > '0') {\n\t\t\t$__args = \"(\".implode(\",\",$_args).\")\";\n\t\t}\n\n\t\t$res = \"\";\n\t\teval(\"\\$res = new \".$class.$__args.\";\");\n\t\tdebuglog(\"neue Klasse\",\"Neue Klasse initiert:\".$class);\n\t\t$__classes[$class] = $res;\n\t}\n\treturn $res;\n }",
"public static function factory($flags = null, $class_name = null) {}",
"public static function factory($flags = null, $class_name = null) {}",
"public static function make() {\n return new self();\n }",
"public static final function of($class) {\n return self::typeOf($class)->newInstance();\n }",
"public abstract function createInstance($parameters);",
"public function newInstance(): object\n {\n return $this->instantiator->instantiate($this->name);\n }",
"public static function create($class)\n {\n $class = self::getClientClassName($class);\n if (!class_exists($class)) {\n throw new RuntimeException(\"Class '$class' not found\");\n }\n return new $class();\n }",
"public static function factory()\n {\n return new self;\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"static public function create()\n {\n return new static();\n }",
"private function __construct() {\n \n trace('***** Creating new '.__CLASS__.' object. *****');\n \n }",
"protected function createObject($class, ...$args) {\n\t\treturn new $class(...$args);\n\t}",
"public static function createInstance()\n {\n return new static();\n }",
"public function create()\n\t{\n\t\t$scope = new \\ReflectionClass( $this -> className );\n\t\t$new_scope = $scope -> newInstanceArgs( $this -> arguments );\n\t\treturn $new_scope;\n\t}",
"public static function create()\n {\n return new static;\n }",
"public static function create()\n {\n return new static;\n }",
"public static function create()\n {\n return new static;\n }",
"public static function create()\n {\n return new static;\n }",
"public static function new(){\n self::$instance = new self();\n return self::$instance;\n }",
"static public function create()\n\t{\n\t\treturn new static;\n\t}",
"public function regularNew() {}",
"public function getNew()\n {\n $class = get_class($this);\n\n return new $class;\n }",
"public function fn_construct_class() {\n\t}",
"public static function make()\n {\n return new static();\n }",
"public static function create(): self\n {\n return new static();\n }"
] | [
"0.8045186",
"0.7730439",
"0.7575917",
"0.7553807",
"0.7517733",
"0.7517733",
"0.74608153",
"0.74295586",
"0.74137187",
"0.73178077",
"0.71588844",
"0.71373075",
"0.71373075",
"0.7119144",
"0.7119144",
"0.7119144",
"0.7109181",
"0.70463014",
"0.6973363",
"0.69717866",
"0.6945921",
"0.6945921",
"0.6945921",
"0.6945921",
"0.6945921",
"0.6945921",
"0.6945921",
"0.6945921",
"0.6945921",
"0.6945921",
"0.6945921",
"0.6945921",
"0.6945921",
"0.6945921",
"0.6945921",
"0.6945921",
"0.6945921",
"0.6945921",
"0.6945921",
"0.6945921",
"0.6945921",
"0.693907",
"0.6923449",
"0.6911622",
"0.6911622",
"0.69021493",
"0.68907964",
"0.68907964",
"0.68857235",
"0.68674517",
"0.68398",
"0.6827863",
"0.68110436",
"0.6807947",
"0.6802502",
"0.68009925",
"0.6793369",
"0.67928433",
"0.678004",
"0.67719066",
"0.67717147",
"0.67501235",
"0.67501235",
"0.67468786",
"0.6728182",
"0.67070353",
"0.6696351",
"0.66854554",
"0.66853607",
"0.6683771",
"0.6683771",
"0.6683771",
"0.6683771",
"0.6683771",
"0.6683771",
"0.6683771",
"0.6683771",
"0.6683771",
"0.6683771",
"0.6683771",
"0.6683771",
"0.6683771",
"0.6683771",
"0.6683771",
"0.6683771",
"0.66778976",
"0.6676559",
"0.6661466",
"0.6648876",
"0.66416585",
"0.66307104",
"0.66307104",
"0.66307104",
"0.66307104",
"0.6613707",
"0.6593678",
"0.6592441",
"0.6573821",
"0.65692806",
"0.6554111",
"0.6545166"
] | 0.0 | -1 |
Keeping query bit more lighweight and stripping of unnecessary fields | private function _getContent() {
$fieldsToLoad = array('id', 'pagetitle', 'longtitle', 'description', 'parent',
'alias', 'pub_date', 'parent', 'introtext', 'content', 'createdby', 'createdon', 'class_key');
$c = $this->xpdo->newQuery('disBoard');
$c->setClassAlias('Board');
$c->distinct();
$c->select(array(
$this->xpdo->getSelectColumns('disBoard', 'Board', 'Board_', $fieldsToLoad),
$this->xpdo->getSelectColumns('disBoard', 'subBoard', 'subBoard_', $fieldsToLoad),
'lastpost_pagetitle' => 'Post.pagetitle',
'lastpost_content' => 'Post.content',
'lastpost_id' => 'Post.id',
'lastpost_author' => 'Post.createdby',
'lastpost_username' => 'User.username',
'lastpost_display_name' => 'Profile.display_name',
'lastpost_use_display_name' => 'Profile.use_display_name',
'lastpost_thread_id' => 'Post.parent',
'lastpost_parent' => 'c.ancestor', // Setting this to Board to show as last post on it
'lastpost_class_key' => 'Post.class_key',
'lastpost_createdon' => 'Post.createdon',
'subPost_pagetitle' => 'subPost.pagetitle',
'subPost_content' => 'subPost.content',
'subPost_id' => 'subPost.id',
'subPost_author' => 'subPost.createdby',
'subPost_username' => 'User2.username',
'subPost_display_name' => 'Profile2.display_name',
'subPost_use_display_name' => 'Profile2.use_display_name',
'subPost_thread_id' => 'subPost.parent',
'subPost_parent' => 'c2.ancestor', // Setting this to Board to show as last subPost on it
'subPost_class_key' => 'subPost.class_key',
'subPost_createdon' => 'subPost.createdon'
));
$c->innerJoin('disClosure', 'c', "{$this->xpdo->escape('c')}.{$this->xpdo->escape('ancestor')} = {$this->xpdo->escape('Board')}.{$this->xpdo->escape('id')} ");
$c->leftJoin('disBoard', 'subBoard', "{$this->xpdo->escape('subBoard')}.{$this->xpdo->escape('parent')} = {$this->xpdo->escape('Board')}.{$this->xpdo->escape('id')}
AND {$this->xpdo->escape('subBoard')}.{$this->xpdo->escape('class_key')} = 'disBoard'");
$cSub = $this->xpdo->newQuery('disPost');
$cSub->setClassAlias('postPrimary');
$cSub->select(array("MAX({$this->xpdo->escape('postPrimary')}.{$this->xpdo->escape('id')})"));
$cSub->leftJoin('disClosure', 'c3', "{$this->xpdo->escape('postPrimary')}.{$this->xpdo->escape('id')} = {$this->xpdo->escape('c3')}.{$this->xpdo->escape('descendant')}");
$cSub->where(array(
"{$this->xpdo->escape('c3')}.{$this->xpdo->escape('ancestor')} = {$this->xpdo->escape('Board')}.{$this->xpdo->escape('id')}",
"{$this->xpdo->escape('postPrimary')}.{$this->xpdo->escape('class_key')} = 'disPost'"));
$cSub->prepare();
$c->leftJoin('disPost', 'Post', "{$this->xpdo->escape('Post')}.{$this->xpdo->escape('parent')} = {$this->xpdo->escape('c')}.{$this->xpdo->escape('descendant')}
AND {$this->xpdo->escape('Post')}.{$this->xpdo->escape('class_key')} = 'disPost'
AND{$this->xpdo->escape('Post')}.{$this->xpdo->escape('id')} = ({$cSub->toSQL()})");
$cSub2 = $this->xpdo->newQuery('disPost');
$cSub2->setClassAlias('postSecondary');
$cSub2->select(array("MAX({$this->xpdo->escape('postSecondary')}.{$this->xpdo->escape('id')})"));
$cSub2->leftJoin('disClosure', 'c4', "{$this->xpdo->escape('postSecondary')}.{$this->xpdo->escape('id')} = {$this->xpdo->escape('c4')}.{$this->xpdo->escape('descendant')}");
$cSub2->where(array(
"{$this->xpdo->escape('c4')}.{$this->xpdo->escape('ancestor')} = {$this->xpdo->escape('subBoard')}.{$this->xpdo->escape('id')}",
"{$this->xpdo->escape('postSecondary')}.{$this->xpdo->escape('class_key')} = 'disPost'"
));
$cSub2->prepare();
$c->leftJoin('disClosure', 'c2', "{$this->xpdo->escape('c2')}.{$this->xpdo->escape('ancestor')} = {$this->xpdo->escape('subBoard')}.{$this->xpdo->escape('id')} ");
$c->leftJoin('disPost', 'subPost', "{$this->xpdo->escape('subPost')}.{$this->xpdo->escape('parent')} = {$this->xpdo->escape('c2')}.{$this->xpdo->escape('descendant')}
AND {$this->xpdo->escape('subPost')}.{$this->xpdo->escape('class_key')} = 'disPost'
AND subPost.id = ({$cSub2->toSQL()})");
$c->leftJoin('disUser', 'User', "{$this->xpdo->escape('User')}.{$this->xpdo->escape('id')} = {$this->xpdo->escape('Post')}.{$this->xpdo->escape('createdby')}");
$c->leftJoin('disUserProfile', 'Profile', "{$this->xpdo->escape('Profile')}.{$this->xpdo->escape('internalKey')} = {$this->xpdo->escape('User')}.{$this->xpdo->escape('id')}");
$c->leftJoin('disUser', 'User2', "{$this->xpdo->escape('User2')}.{$this->xpdo->escape('id')} = {$this->xpdo->escape('subPost')}.{$this->xpdo->escape('createdby')}");
$c->leftJoin('disUserProfile', 'Profile2', "{$this->xpdo->escape('Profile2')}.{$this->xpdo->escape('internalKey')} = {$this->xpdo->escape('User2')}.{$this->xpdo->escape('id')}");
$c->where(array(
'Board.parent' => $this->id,
'Board.published' => 1,
'Board.deleted' => 0,
));
$c->sortby("{$this->xpdo->escape('Board')}.{$this->xpdo->escape('menuindex')}", 'ASC');
$c->prepare();
$rows = self::_loadRows($this->xpdo, 'disCategory', $c);
$rows = $rows->fetchAll(PDO::FETCH_ASSOC);
if (count($rows) == 0) {
return;
}
$hydrated = array();
foreach ($rows as $row) {
$hydrated = $this->xpdo->discuss2->hydrateRow($row, $hydrated);
}
$disCategory = $this->xpdo->newObject('disBoard');
foreach ($hydrated as $k => $board) {
if ($board['class_key'] == 'disBoard') {
$disCategory->id = $board['id'];
$disCategory->_policies = array();
if ($disCategory->checkPolicy('load') !== true) {
unset($hydrated[$k]);
}
}
}
reset($hydrated);
$boards = $this->xpdo->discuss2->createTree($hydrated);
$boards = $this->_treeToView($boards);
$this->xpdo->setPlaceholder('discuss2.content', implode("\n",$boards));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function filterFields();",
"function pre_query() {\n $this->view->field += $this->casetracker_fields;\n unset($this->view->field['cuid']); // this could be more surgical.\n }",
"function get_clean_query() {\n\t$q = gzinflate(base64_decode(strtr($_POST['query_csv'], '-_', '+/')));\n\t\n\t$type = strtolower(!empty($_POST['type']) ? $_POST['type'] : 'csv_all');\n\n\t// Remove the offset if removing all information\n\tif(substr($type,-3) === 'all') {\n\t\t$q = preg_replace('/LIMIT\\s+\\d+\\,?\\s+?\\d+/','',$q);\n\t}\n\treturn $q;\n}",
"public function fetchFields();",
"public function getResultFields( $query_id=null );",
"function query() {\n // Do nothing: fake field.\n }",
"public function fetch_fields() {}",
"abstract protected function filterFieldvalue();",
"private function build_query_by_properties()\n {\n $l_sql = '';\n\n foreach ($this->m_view_properties as $l_category_type_id => $l_categories) {\n foreach ($l_categories as $l_category_id => $l_properties) {\n if (isset($l_properties['table'])) {\n $l_table = $l_properties['table'];\n $l_obj_field = $l_properties['obj_id'];\n\n $l_sql .= 'LEFT JOIN ' . $l_table . ' ON ' . $l_obj_field . ' = main.isys_obj__id ';\n\n if (isset($l_properties['join'])) {\n $l_sql .= $l_properties['join']['join_type'] . ' JOIN ' . $l_properties['join']['table'] . ' AS ' . $l_properties['join']['alias'] . ' ON ';\n $l_sql .= $l_properties['join']['join_field'] . ' = ' . $l_properties['join']['alias'] . '.' . $l_properties['join']['field'] . ' ';\n }\n\n foreach ($l_properties['properties'] as $l_property_key => $l_property_info) {\n $this->m_headers[$l_property_key] = $l_property_info;\n }\n\n if (isset($l_properties['helper'])) {\n foreach ($l_properties['helper'] as $l_field => $l_helper) {\n $this->m_helpers[$l_field] = $l_helper;\n }\n }\n } else {\n // Dynamic property.\n foreach ($l_properties['properties'] as $l_property_key => $l_property_info) {\n $this->m_dynamic_headers[$l_property_key] = $l_property_info;\n }\n\n if (isset($l_properties['helper'])) {\n foreach ($l_properties['helper'] as $l_field => $l_helper) {\n $this->m_helpers[$l_field] = $l_helper;\n }\n }\n }\n }\n }\n\n $l_selection = '*';\n\n if (count($this->m_headers) > 0) {\n $l_selection = '';\n foreach ($this->m_headers as $l_field_alias => $l_field) {\n $l_selection .= $l_field . ' AS ' . $l_field_alias . ',';\n }\n\n $l_selection = rtrim($l_selection, ',');\n }\n\n $this->m_headers = array_merge_recursive($this->m_headers, $this->m_dynamic_headers);\n\n $l_sql_main = 'SELECT ' . $l_selection . ', main.isys_obj__id AS __objid__ FROM isys_obj AS main ' .\n 'INNER JOIN isys_obj_type ON main.isys_obj__isys_obj_type__id = isys_obj_type__id ' . $l_sql;\n\n $this->m_sql = $l_sql_main;\n }",
"protected abstract function retrieveNonBaseFields(Row $row);",
"protected function getExcludeFields() {}",
"abstract protected function filterField(): string;",
"private function __select() {\n $from_str = $this->getFromStr();\n $field = $this->field_str;\n if (empty($field)) {\n $field = '*';\n }\n $sql = \"SELECT {$field} FROM {$from_str}\";\n if (!empty($this->join_str_list)) {\n $temp = implode(' ', $this->join_str_list);\n $sql .= \" {$temp}\";\n }\n if (!empty($this->where_str)) {\n $sql .= \" WHERE {$this->where_str}\";\n }\n if (!empty($this->group_str)) {\n $sql .= \" GROUP BY {$this->group_str}\";\n }\n if (!empty($this->order_str)) {\n $sql .= \" ORDER BY {$this->order_str}\";\n }\n if (!empty($this->limit_str)) {\n $sql .= \" LIMIT {$this->limit_str}\";\n }\n $list = $this->query($sql);\n return $list;\n }",
"protected function sourceQuery(){\n $query = parent::sourceQuery();\n $query->condition('i.field_name', array_keys($this->getFieldNameMappings()), 'NOT IN');\n return $query;\n }",
"protected function _transformQuery()\n {\n if (!$this->_dirty || $this->_type !== 'select') {\n return;\n }\n\n if (empty($this->_parts['from'])) {\n $this->from([$this->_repository->getAlias() => $this->_repository->table()]);\n }\n $this->_addDefaultFields();\n $this->getEagerLoader()->attachAssociations($this, $this->_repository, !$this->_hasFields);\n $this->_addDefaultSelectTypes();\n }",
"public function get_all($value='', $field='', $order_by='', $field_type='%d', $order_direction='ASC',$only_fields=array()) {\r\n\t \tglobal $wpdb;\r\n\t \t\r\n\t \tif ($field=='')\r\n\t \t\t$field = 'id';\r\n\t \t\r\n\t \t// Special cases for ordering that requires innerjoins\r\n\t \t$extra_sql = '';\r\n\t \t// Special case for categories\r\n\t \tif ($order_by=='term_id') {\r\n\t \t\t// \"left outer join\" is used to take in care the case of category ID \"0\"\r\n\t \t\t$extra_sql = \"left outer join `$wpdb->terms` on (`$wpdb->terms`.term_id=`$this->table`.term_id)\";\r\n\t \t\t$order_by = \"`$wpdb->terms`.name\";\r\n\t \t}\r\n\t \telseif ($order_by!='') {\r\n\t \t\t// Set order by ` where is a simple column\r\n\t \t\t$order_by = \"`$order_by`\";\r\n\t \t}\r\n\t \t\t\r\n\t \tif ($order_by!='') $order_by = \" order by $order_by $order_direction\";\r\n\t \t\r\n\t \t// Specify the fields to return\r\n\t \tif (count($only_fields)==0) {\r\n\t \t\t// Add\r\n\t \t\t$fields_to_return = \"`$this->table`.*\";\r\n\t \t}\r\n\t \telse {\r\n\t \t\t// Only specified\r\n\t \t\t$fields_to_return = \"`$this->table`.\" . implode(\",`$this->table`.\",$only_fields);\t \t\t\r\n\t \t}\r\n\t \t\t\r\n\t \tif ($value!=='' && $value!==null)\r\n\t \t{\r\n\t \t\tif ($field_type=='%d') // %d\r\n\t\t \t\t$query = $wpdb->prepare( \"SELECT $fields_to_return from `$this->table` $extra_sql WHERE `$this->table`.`$field` = %d $order_by\", $value );\r\n\t\t \telse // %s\r\n\t\t \t\t$query = $wpdb->prepare( \"SELECT $fields_to_return from `$this->table` $extra_sql WHERE `$this->table`.`$field` = %s $order_by\", $value );\r\n\t \t}\r\n\t \telse \r\n\t \t\t$query = \"SELECT $fields_to_return from `$this->table` $extra_sql $order_by\";\r\n\t \t\r\n\t \t\r\n\t \t$results = $wpdb->get_results($query);\r\n\t\t\t\r\n\t \t// Parse returned fields to strip slashes\r\n\t \t$parsed_results = array();\r\n\t \tforeach ($results as $result) {\r\n\t \t\t$tmp_result = (array) $result;\r\n\t\t \t$parsed_result = WPPostsRateKeys_Validator::parse_array_output($tmp_result);\r\n\t\t \t$parsed_result = (object) $parsed_result;\r\n\t\t \t\r\n\t\t \t$parsed_results[] = $parsed_result;\r\n\t \t}\r\n\t \t// End: Parse returned fields to strip slashes\r\n\t \t\r\n\t \treturn $parsed_results;\r\n\t }",
"public function _processResults(){\n $data = array();\n foreach($this->_resultset as $doc){\n\t$fields = array();\n\tforeach($doc as $key => $value){\n $fields[$key] = $value;\n }\n \t$data[] = $fields;\n }\n $processor = new Pas_Solr_SensitiveFields();\n $clean = $processor->cleanData($data, $this->_getRole(), $this->_core);\n return $clean;\n }",
"private function _prepareFields()\n\t{\n\t\t$result = [];\n\n\t\tforeach ($this->_fields as $field => $params) {\n\n\t\t\tif ($field == 'languageTable') {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$tmp = '`' . $field . '` ' . $params['type'];\n\n\t\t\tif (in_array($params['type'], ['char', 'varchar'])) {\n\t\t\t\t$length = isset($params['length']) ? $params['length'] : 100;\n\t\t\t\t$tmp .= '(' . $length . ')';\n\t\t\t}\n\n\t\t\t$tmp .= ($params['null']) ? ' NULL' : ' NOT NULL';\n\t\t\t$tmp .= ($params['default'] || $params['default'] === 0) ? ' DEFAULT ' . $params['default'] : '';\n\n\n\t\t\tif ($field == 'id') {\n\t\t\t\t$tmp .= ' AUTO_INCREMENT PRIMARY KEY';\n\t\t\t}\n\n\t\t\t$result[] = $tmp;\n\t\t}\n\n\t\treturn implode(',', $result);\n\t}",
"function discardQuery() {}",
"function extractFields(&$data, $fields, $ignoredFields) {\n\t//sanitize whole array of room + bookings fields\n\t$out = [];\n\tforeach ($fields as $field) {\n\t\t$out[$field] = $data[0][$field];\n\t\tfor ($i = 0; $i < count($data); $i++)\n\t\t\tunset($data[$i][$field]);\n\t}\n\tforeach ($ignoredFields as $field) {\n\t\tfor ($i = 0; $i < count($data); $i++)\n\t\t\tunset($data[$i][$field]);\n\t}\n\treturn $out;\n}",
"function my_columns_filter( $columns ) {\n unset($columns['tags']);\n unset($columns['categories']);\n unset($columns['tags']);\n unset($columns['comments']);\n return $columns;\n}",
"private function resetQuery()\n {\n $this->cols('*');\n }",
"private function makeSelectAndFrom()\r\n\t{\r\n\t\t// Build SQL\r\n\t\t$sql = 'SELECT ';\r\n\t\r\n\t\t// Add custom fields (subqueries)\r\n\t\tif ($this->hasCustomFields())\r\n\t\t{\r\n\t\t\t// Find custom fields\r\n\t\t\tforeach ($this->fields as $field)\r\n\t\t\t{\r\n\t\t\t\tif ($field instanceOf CustomField)\r\n\t\t\t\t{\r\n\t\t\t\t\t$sql .= '(' . $field->query . ') AS `' . $field->name . '`, ';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tif (!$this->hasForeignFields())\r\n\t\t{\r\n\t\t\tif (isset($this->selectFields))\r\n\t\t\t{\r\n\t\t\t\t// Use custom field selection\r\n\t\t\t\t$sql .= implode(', ', $this->selectFields) . ' ';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Take all fields\r\n\t\t\t\t$sql .= '`'.$this->name.'`.* ';\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t$sql .= 'FROM `'.$this->name.'` ';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Get foreign fields\r\n\t\t\t$cols = array();\r\n\t\r\n\t\t\tif (isset($this->selectFields))\r\n\t\t\t{\r\n\t\t\t\t// Use custom field selection\r\n\t\t\t\tforeach ($this->selectFields as $field)\r\n\t\t\t\t{\r\n\t\t\t\t\t$cols[] = $field;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Take all fields\r\n\t\t\t\t$cols[] = 't1.*';\r\n\t\t\t}\r\n\t\r\n\t\t\t$from_sql = 'FROM `'.$this->name.'` t1 ';\r\n\t\t\t$joined = array();\r\n\t\t\t$joins = array();\r\n\t\t\t$alias_no = 2;\r\n\t\t\t$tables[] = array('table' => $this->name, 'alias' => 't1');\r\n\t\r\n\t\t\t// Iterate over fields\r\n\t\t\tforeach ($this->fields as &$field)\r\n\t\t\t{\r\n\t\t\t\t$use_alias = false;\r\n\t\r\n\t\t\t\tif ($field instanceof ForeignField)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Check if foreign field should be included, if select fields were set\r\n\t\t\t\t\tif (isset($this->selectFields))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$found = false;\r\n\t\t\t\t\t\tforeach ($this->selectFields as $sel_field)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (str_contains($sel_field, $field->name))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$found = true;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (!$found)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t// Find out what kind of join it should be (INNER or LEFT)\r\n\t\t\t\t\t$join_type = strtoupper($field->joinType);\r\n\t\r\n\t\t\t\t\t// Check if it's a join between two foreign tables\r\n\t\t\t\t\tif ($field->joinFromTable == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Join between this table and other table\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Check if we need to make a new join\r\n\t\t\t\t\t\t$this_join = array(\r\n\t\t\t\t\t\t\t'from_table' => $this->name, \r\n\t\t\t\t\t\t\t'to_table' => $field->table,\r\n\t\t\t\t\t\t\t'from' => $field->joinFrom, \r\n\t\t\t\t\t\t\t'to' => $field->joinTo\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\tif (!$this->CheckJoinExists($this_join, $joins))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$from_sql .= $join_type.' JOIN `'.$field->table .'` t'.$alias_no.' ON t1.`'.$field->joinFrom.'` = t'.$alias_no.'.`'.$field->joinTo.'` ';\r\n\t\t\t\t\t\t\t$joins[] = $this_join;\r\n\t\t\t\t\t\t\t$use_alias = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Join between two other tables\r\n\t\r\n\t\t\t\t\t\t// Check if we need to make a new join\r\n\t\t\t\t\t\t$this_join = array(\r\n\t\t\t\t\t\t\t'from_table' \t=> $this->table_name, \r\n\t\t\t\t\t\t\t'to_table' \t\t=> $field->foreign_field->table,\r\n\t\t\t\t\t\t\t'from' \t\t\t=> $field->foreign_field->join_from, \r\n\t\t\t\t\t\t\t'to' \t\t\t=> $field->foreign_field->join_to\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\tif (!$this->checkJoinExists($this_join, $joins)) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (($alias = $this->tableHasAlias($field->table, $tables)) !== false) \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$from_sql .= $join_type.' JOIN `'.$field->table.'` t'.$alias_no.' ON '.$alias.'.`'.$field->joinFrom.'` = t'.$alias_no.'.`'.$field->joinTo.'` ';\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$from_sql .= $join_type.' JOIN `'.$field->table.'` t'.$alias_no.' ON `'.$field->joinFromTable.'`.`'.$field->joinFrom.'` = t'.$alias_no.'.`'.$field->joinTo.'` ';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$joins[] = $this_join;\r\n\t\t\t\t\t\t\t$use_alias = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\tif ($use_alias)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$cols[] = 't'.$alias_no.'.`'.$field->foreignFieldName .'` AS `'.$field->name.'`';\r\n\t\t\t\t\t\t$tables[] = array('table' => $field->table, 'alias' => 't'.$alias_no);\r\n\t\t\t\t\t\t$alias_no++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Check if table has alias\r\n\t\t\t\t\t\tif (($alias = $this->tableHasAlias($field->table, $tables)) !== false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$cols[] = $alias.'.`'.$field->foreignFieldName.'` AS `'.$field->name .'`';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$cols[] = '`'.$field->table.'`.`'.$field->foreignFieldName.'` AS `'.$field->name.'`';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->tableAliases = $tables;\r\n\t\r\n\t\t\t$sql .= implode(', ', $cols).' '.$from_sql;\r\n\t\r\n\t\t\t$this->table_aliases = $tables;\r\n\t\t}\r\n\t\r\n\t\treturn $sql;\r\n\t}",
"public function getQueryFields ($table);",
"public function SQL_SelectFields($withPrimaryKey=true) {\n $sql = \"\";\n foreach ($this->fields as $f) {\n if ( ($f->isPrimary && $withPrimaryKey) || !$f->isPrimary ) {\n $sql .= (($sql == \"\")?\"\":\", \").$f->name;\n }\n }\n return $sql;\n }",
"abstract function get_sql_filter($data);",
"function _get_select_fields()\r\n\t{\r\n\t\t$sql_exec_fields = array();\r\n\t\tforeach ($this->_params as $key => $val)\r\n\t\t{\r\n\t\t\t$tmp_field = $this->_node_table . '.' . $key . ' AS ' . $val;\r\n\t\t\t$sql_exec_fields[] = $tmp_field;\r\n\t\t} \r\n\r\n\t\t$fields = implode(', ', $sql_exec_fields);\r\n\t\treturn $fields;\r\n\t}",
"private function filterFields() {\n\n // Initialize an associate array of our field name and value pairs.\n $values = array();\n\n // Initialize an associate array of our field name and filters pairs.\n $filters = array();\n\n // Populate the arrays.\n foreach ($this->fields as $field) {\n if ($field->getFilters()) {\n $values[$field->getName()] = $field->getValue();\n $filters[$field->getName()] = $field->getFilters();\n }\n }\n\n // Load an instance of GUMP to use to sanitize and filter our field values.\n $gump = new \\GUMP();\n\n // Sanitize the field values.\n $values = $gump->sanitize($values);\n\n // Pass the arrays to GUMP and let it do the heavy-lifting.\n $values = $gump->filter($values, $filters);\n\n // Set the values of all fields to their filtered values.\n foreach ($values as $name => $value) {\n $this->passValue($name, $value);\n }\n }",
"private function removeProjections()\n {\n //I mustn't make assumption about the underlying table structure\n $this->entityManager->getConnection()->query('TRUNCATE product')->execute();\n }",
"public function getQueryFields()\n {\n return array();\n }",
"function getFields($table,$fields=\"\",$condition=\"\",$limit=\"\",$calculateRows=false,$fastHint=false);",
"function MWX__full_request ($query)\n{\n if (current_user_can ('edit_users'))\n return $query;\n\n if (strpos($query, 'DISTINCT') === FALSE)\n $query = str_replace('SELECT', 'SELECT DISTINCT', $query);\n\n return $query;\n}",
"protected function resetQuery()\n {\n array_forget($this->query, ['start', 'end']);\n }",
"function pre_query() { \r\n // Unset invalid date values before the query runs.\r\n if (!empty($this->view->args) && count($this->view->args) > $this->position) {\r\n $argument = $this->view->args[$this->position];\r\n $parts = $this->date_handler->arg_parts($argument);\r\n if (empty($parts[0]['date']) && empty($parts[0]['period'])) {\r\n unset($this->view->args[$this->position]); \r\n }\r\n }\r\n \r\n $this->get_query_fields();\r\n if (!empty($this->query_fields)) {\r\n foreach ($this->query_fields as $query_field) {\r\n $field = $query_field['field'];\r\n // Explicitly add this table using add_table so Views does not\r\n // remove it if it is a duplicate, since that will break the query.\r\n $this->query->add_table($field['table_name'], NULL, NULL, $field['table_name']);\r\n }\r\n }\r\n }",
"function GetExtendedFilterValues() {\n\t\tglobal $deals_details;\n\n\t\t// Field dealer\n\t\t$sSelect = \"SELECT DISTINCT rep.dealer FROM \" . $deals_details->SqlFrom();\n\t\t$sOrderBy = \"rep.dealer ASC\";\n\t\t$wrkSql = ewrpt_BuildReportSql($sSelect, $deals_details->SqlWhere(), \"\", \"\", $sOrderBy, $this->UserIDFilter, \"\");\n\t\t$deals_details->dealer->DropDownList = ewrpt_GetDistinctValues(\"\", $wrkSql);\n\n\t\t// Field date_start\n\t\t$sSelect = \"SELECT DISTINCT rep.date_start FROM \" . $deals_details->SqlFrom();\n\t\t$sOrderBy = \"rep.date_start ASC\";\n\t\t$wrkSql = ewrpt_BuildReportSql($sSelect, $deals_details->SqlWhere(), \"\", \"\", $sOrderBy, $this->UserIDFilter, \"\");\n\t\t$deals_details->date_start->DropDownList = ewrpt_GetDistinctValues($deals_details->date_start->DateFilter, $wrkSql);\n\n\t\t// Field status\n\t\t$sSelect = \"SELECT DISTINCT rep.status FROM \" . $deals_details->SqlFrom();\n\t\t$sOrderBy = \"rep.status ASC\";\n\t\t$wrkSql = ewrpt_BuildReportSql($sSelect, $deals_details->SqlWhere(), \"\", \"\", $sOrderBy, $this->UserIDFilter, \"\");\n\t\t$deals_details->status->DropDownList = ewrpt_GetDistinctValues(\"\", $wrkSql);\n\t}",
"public static function getExcludeFields() {}",
"protected function getPreparedSelectFields()\n {\n $result = [];\n $fields = $this->getSelectFields();\n if (!empty($fields) && is_array($fields)) {\n foreach ($fields as $row) {\n if (empty($row) || !is_array($row) || empty($row['id'])) {\n continue;\n }\n $result[] = $row['id'];\n }\n unset($row);\n }\n return $result;\n }",
"function sql_exclude_field_list($mysqli,$table,$remove){\n\n\t/* Here field names are bookended by || to avoid partial string matches. This will ensure only the field desired is removed, and fields which contain the desired field's string will not. i.e. Removing 'fiction' will not also remove 'non-fiction.' */\n\n\t/* Build list of fields to remove. */\n\n\t/* Add pipes to beginning of string. */\n\t$remove = \"||\" . $remove;\n\n\t/* Iterate through string and add pipes to each side of commas if commas exist. */\n\tif (strpos($remove,\",\")){\n\t\t$remove = str_replace(\",\" , \"||,||\",$remove);\n\t}\n\n\t/* Add last set of pipies to list fo fields to remove. */\n\t$remove .= \"||\";\n\n\t/* Build SQL for query. */\n\t$sqlFields = \"SELECT * FROM \" . $table;\n\n\t/* Run query. */\n\t$queryFields = $mysqli->query($sqlFields);\n\t\tif(!$queryFields){\n\t\t\texit(\"Bad SQL for Field Name query. Error: \" . $mysqli->error);\n\t\t}\n\n\t/* Fetch result row. */\n\t$resultFields = $queryFields->fetch_fields();\n\t\tif(!$resultFields){\n\t\t\texit(\"Fetch Fields failed. Error: \" . $mysqli->error);\n\t\t}\n\n\t/* set variable to return from function. */\n\t$return = \"\";\n\n\t/* Iterate over result set to pull field names. */\n\tforeach($resultFields as $value){\n\t\t/* Bookend each field name for uniqueness. */\n\t\t$needle = \"||\" . $value->name . \"||\";\n\n\t\t/* Search for fields to remove. */\n\t\tif( strpos($remove,$needle) === false ){\n\t\t\t/* If strpos returns false we continue. */\n\t\t\t$return .= $value->name . \",\";\n\t\t}\n\t/* End of foreach loop. */\n\t}\n\n\t/* Strip off last comma. */\n\t$return = rtrim($return,\",\");\n\n/* Return list of fields minus those specified to remove. */\nreturn($return);\n/* End of sql_exclude_field_list function. */\t\n}",
"private function _sql_meta() {\n\t\tglobal $wpdb;\n\n\t\tif ( $this->meta_key && $this->meta_value) {\n\t\t\treturn sprintf(\"%s (%s.meta_key=%s AND %s.meta_value=%s)\"\n\t\t\t\t, $this->join_rule\n\t\t\t\t, $wpdb->postmeta\n\t\t\t\t, $wpdb->prepare('%s', $this->meta_key)\n\t\t\t\t, $wpdb->postmeta\n\t\t\t\t, $wpdb->prepare('%s', $this->meta_value)\n\t\t\t);\n\t\t}\n\t\telseif ($this->meta_key) {\n\t\t\treturn $this->_sql_filter($wpdb->postmeta, 'meta_key', '=', $this->meta_key);\n\t\t}\n\t\telse {\n\t\t\treturn $this->_sql_filter($wpdb->postmeta, 'meta_value', '=', $this->meta_value);\n\t\t}\n\t}",
"protected function prepare_fields()\n {\n }",
"function existingQueryForm () { return \"\"; }",
"function summary_query() {\r\n $this->get_query_fields();\r\n \r\n // No way to do summaries on more than one field at a time.\r\n if (count($this->query_fields) > 1) {\r\n return;\r\n }\r\n \r\n $field = $this->query_fields[0]['field'];\r\n $date_handler = $this->query_fields[0]['date_handler'];\r\n \r\n // Get the SQL format for this granularity, like Y-m,\r\n // and use that as the grouping value.\r\n $format = $date_handler->views_formats($this->options['granularity'], 'sql');\r\n $this->formula = $date_handler->sql_format($format, $date_handler->sql_field($field['fullname']));\r\n \r\n // Add the computed field.\r\n $this->base_alias = $this->name_alias = $this->query->add_field(NULL, $this->formula, $field['query_name']);\r\n \r\n return $this->summary_basics(FALSE);\r\n }",
"function my_custom_posts_listing_fields( $columns ) {\n error_log(print_r($columns, true));\n unset( $columns[ 'date' ] );\n return $columns;\n}",
"public function buildQuery() {\n\t\t$where = (sizeof($this->wheres) > 0) ? ' WHERE '.implode(\" \\n AND \\n\\t\", $this->wheres) : '';\n\t\t$order = (sizeof($this->orders) > 0) ? ' ORDER BY '.implode(\", \", $this->orders) : '' ;\n\t\t$group = (sizeof($this->groups) > 0) ? ' GROUP BY '.implode(\", \", $this->groups) : '' ;\n\t\t$query = 'SELECT '.implode(\", \\n\\t\", $this->fields).\"\\n FROM \\n\\t\".$this->class->table.\"\\n \".implode(\"\\n \", $this->joins).$where.' '.$group.' '.$order.' '.$this->limit;\n\t\treturn($query);\n\t}",
"protected function toQuery() {\n\t\t$query = $this->mapper()->all($this->entityName(), $this->conditions())->order($this->relationOrder());\n\t\t$query->snapshot();\n\t\treturn $query;\n\t}",
"private static function fields()\n {\n $fields = static::$fields;\n $primary_key = static::$primary_key;\n\n $rows = [$primary_key, ...$fields];\n\n if(!count($rows)) {\n return ['*'];\n }\n\n return $rows;\n }",
"static function cleanQuery($sql)\n {\n\t\treturn trim(preg_replace('/(?:\\s+(\\s|\\)|\\,)|(\\()\\s+)/', '\\1\\2', $sql));\n }",
"private function setFields()\n\t{\t\n\t\t$sql = '';\n\t\t\n\t\tforeach (array_keys($this->data) as $key)\n\t\t{\n\t\t\t$sql .= '`' . $key . '` = ? , ';\n\t\t}\n\t\t\n\t\t$sql = rtrim($sql, ', ');\n\t\t\n\t\treturn $sql;\n\t}",
"protected function _addDefaultFields()\n {\n $select = $this->clause('select');\n $this->_hasFields = true;\n\n if (!count($select) || $this->_autoFields === true) {\n $this->_hasFields = false;\n $this->select($this->repository()->getSchema()->columns());\n $select = $this->clause('select');\n }\n\n $aliased = $this->aliasFields($select, $this->repository()->getAlias());\n $this->select($aliased, true);\n }",
"private function _get_sql1() {\n\t\tglobal $wpdb;\n\n\t\t$this->SQL1 =\n\t\t\t\"SELECT\n\t\t\t[+count_found_rows+]\n\t\t\t{$wpdb->posts}.ID\n\t\t\t\n\t\t\tFROM {$wpdb->posts}\n\t\t\t[+author_join+]\n\t\t\t[+taxonomy_join+]\n\t\t\tLEFT JOIN {$wpdb->postmeta} ON {$wpdb->posts}.ID={$wpdb->postmeta}.post_id\n\n\t\t\t[+join_for_metasortcolumn+]\n\n\t\t\tWHERE\n\t\t\t(\n\t\t\t1\n\t\t\t[+direct_filter+]\n\t\t\t[+include+]\n\t\t\t[+exclude+]\n\t\t\t[+omit_post_type+]\n\t\t\t[+post_type+]\n\t\t\t[+post_mime_type+]\n\t\t\t[+post_parent+]\n\t\t\t[+post_status+]\n\t\t\t[+yearmonth+]\n\t\t\t[+meta+]\n\t\t\t[+author+]\n\n\n\t\t\t[+taxonomy+]\n\t\t\t[+taxonomy_term+]\n\t\t\t[+taxonomy_slug+]\n\n\t\t\t[+search+]\n\t\t\t[+exact_date+]\n\t\t\t[+date_min+]\n\t\t\t[+date_max+]\n\t\t\t)\n\t\t\t[+append+]\n\n\t\t\tGROUP BY {$wpdb->posts}.ID\n\t\t\tORDER BY [+orderby+] [+order+]\n\t\t\t[+limit+]\n\t\t\t[+offset+]\";\n\n\t\t// Substitute into the query.\n\t\t$hash = array();\n\t\t$hash['count_found_rows'] = ($this->paginate)? 'SQL_CALC_FOUND_ROWS' : '';\n\n\t\t$hash['include'] = $this->_sql_filter($wpdb->posts, 'ID', 'IN', $this->include);\n\t\t$hash['exclude'] = $this->_sql_filter($wpdb->posts, 'ID', 'NOT IN', $this->exclude);\n\t\t$hash['append'] = $this->_sql_append($wpdb->posts);\n\n\t\t$hash['omit_post_type'] = $this->_sql_filter($wpdb->posts, 'post_type', 'NOT IN', $this->omit_post_type);\n\t\t$hash['post_type'] = $this->_sql_filter($wpdb->posts, 'post_type', 'IN', $this->post_type);\n\t\t$hash['post_mime_type'] = $this->_sql_filter_post_mime_type();\n\t\t$hash['post_parent'] = $this->_sql_filter($wpdb->posts, 'post_parent', 'IN', $this->post_parent);\n\t\t$hash['post_status'] = $this->_sql_filter($wpdb->posts, 'post_status', 'IN', $this->post_status);\n\t\t$hash['yearmonth'] = $this->_sql_yearmonth();\n\t\t$hash['meta'] = $this->_sql_meta();\n\t\t\n\t\t// Only add this join if the user has searched on this criteria\n\t\tif (isset($this->author) && !empty($this->author)) {\n\t\t\t$hash['author'] = $this->_sql_filter('author', 'display_name', '=', $this->author);\n\t\t\t$hash['author_join'] = \"LEFT JOIN {$wpdb->users} author ON {$wpdb->posts}.post_author=author.ID\";\n\t\t}\n\t\t\n\t\t// Only add these if a user has searched on taxonomy criteria\n\t\tif (isset($this->taxonomy) && !empty($this->taxonomy)\n\t\t\t&& (isset($this->taxonomy_term) || isset($this->taxonomy_slug)) ) {\n\t\t\t$hash['taxonomy'] = $this->_sql_filter($wpdb->term_taxonomy, 'taxonomy', '=', $this->taxonomy);\n\t\t\t$hash['taxonomy_term'] = $this->_sql_filter($wpdb->terms, 'name', 'IN', $this->taxonomy_term);\n\t\t\t$hash['taxonomy_slug'] = $this->_sql_filter($wpdb->terms, 'slug', 'IN', $this->taxonomy_slug);\n\t\t\t$hash['taxonomy_join'] = \"\n\t\t\t\tLEFT JOIN {$wpdb->term_relationships} ON {$wpdb->posts}.ID={$wpdb->term_relationships}.object_id\n\t\t\t\tLEFT JOIN {$wpdb->term_taxonomy} ON {$wpdb->term_taxonomy}.term_taxonomy_id={$wpdb->term_relationships}.term_taxonomy_id\n\t\t\t\tLEFT JOIN {$wpdb->terms} ON {$wpdb->terms}.term_id={$wpdb->term_taxonomy}.term_id\";\n\t\t}\n\n\t\tif ($this->custom_field_date_flag) {\n\t\t\t$hash['exact_date'] = $this->_sql_custom_date_filter($this->post_date);\n\t\t\t$hash['date_min'] = $this->_sql_custom_date_filter($this->date_min, '>=');\n\t\t\t$hash['date_max'] = $this->_sql_custom_date_filter($this->date_max, '<=');\n\t\t}\n\t\telse {\n\t\t\t$hash['exact_date'] = $this->_sql_filter($wpdb->posts, $this->date_column, '=', $this->post_date);\n\t\t\t$hash['date_min'] = $this->_sql_filter($wpdb->posts, $this->date_column, '>=', $this->date_min);\n\t\t\t$hash['date_max'] = $this->_sql_filter($wpdb->posts, $this->date_column, '<=', $this->date_max);\n\t\t\t// die($hash['date_min']);\n\t\t}\n\n\t\t$hash['search'] = $this->_sql_search();\n\n\t\t$hash['order'] = $this->order;\n\t\t\n\t\t// Custom handling for sorting on custom fields\n\t\t// http://code.google.com/p/wordpress-summarize-posts/issues/detail?id=12\n\t\tif ($this->sort_by_random) {\n\t\t\t$hash['orderby'] = 'RAND()';\n\t\t\t$hash['order'] = ''; // <-- blanks this out!\n\t\t\t$hash['join_for_metasortcolumn'] = '';\n\t\t}\n\t\t// See http://code.google.com/p/wordpress-summarize-posts/issues/detail?id=20\n\t\telseif ($this->sort_by_meta_flag) {\n\t\t\t$hash['orderby'] = 'orderbymeta.meta_value';\n\t\t\t$hash['join_for_metasortcolumn'] = sprintf(\"LEFT JOIN {$wpdb->postmeta} orderbymeta ON %s.ID=orderbymeta.post_id AND orderbymeta.meta_key = %s\"\n\t\t\t\t, $wpdb->posts\n\t\t\t\t, $wpdb->prepare('%s', $this->orderby)\n\t\t\t);\n\t\t}\n\t\t// Standard: sort by a column in wp_posts\n\t\telse {\n\t\t\t$hash['orderby'] = $wpdb->posts.'.'.$this->orderby;\n\t\t\t$hash['join_for_metasortcolumn'] = '';\n\t\t}\n\t\t// This is when the user supplies their own ORDER BY parameters for complex sorting.\n\t\t// Note: right now, I can only think of doing complex sorting on the primary columns from wp_posts \n\t\t// and NOT using custom columns from wp_postmeta.\n\t\tif ($this->orderby_custom_flag) {\n\t\t\t$hash['orderby'] = $this->orderby_custom;\n\t\t\t$hash['order'] = ''; // <-- blanks this out!\t\t\t\n\t\t}\n\n\t\t$hash['limit'] = $this->_sql_limit();\n\t\t$hash['offset'] = $this->_sql_offset();\n\n\t\t// Direct filters (if any), e.g. post_author = 123 or custom_field LIKE '%horse%'\n\t\t$hash['direct_filter'] = '';\n\t\tif ($this->direct_filter_flag) {\n\t\t\tforeach($this->direct_filter_columns as $c) {\n\t\t\t\tif (in_array($c, self::$wp_posts_columns)) {\n\t\t\t\t\t$hash['direct_filter'] .= $this->_sql_filter_posts($c, $this->_get_operator($c), $this->$c);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$hash['direct_filter'] .= $this->_sql_filter_postmeta($c,$this->_get_operator($c), $this->$c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!$this->include_hidden_fields) {\n\t\t\t$hash['hidden_fields'] = \"WHERE {$wpdb->postmeta}.meta_key NOT LIKE '\\_%'\";\n\t\t}\n\t\t\n\t\t$this->SQL1 = CCTM::parse($this->SQL1, $hash);\n\n\t\t// Strip whitespace\n\t\t$this->SQL1 = preg_replace('/\\s\\s+/', ' ', $this->SQL1 );\n\n\t\treturn $this->SQL1;\n\n\t}",
"protected function adjustFields(){\n\t\tforeach($this->fields as $key => $field)\n\t\t{\n\t\t\t$this->fields[$key] = sprintf(\"`%s`\", $field);\n\t\t}\n\t\treturn join(FuriousExpressionsDB::FieldSeparator, $this->fields);\n\t}",
"protected function toQuery()\n\t{\n\t\treturn $this->mapper()->all($this->entityName(), $this->conditions())->order($this->relationOrder())->first();\n\t}",
"function query() {\n $this->add_additional_fields();\n }",
"function query() {\n $this->field_alias = $this->real_field;\n }",
"function query() {\n $this->field_alias = $this->real_field;\n }",
"public function useAllFields() {\n $this->__onlyFields = array();\n }",
"public function _prepare() {\n if( !DBwrite::connected() ) {\n DBwrite::connect();\n }\n\n $query = $this->query;\n foreach( $this->key_value_map as $key => $value ) {\n $query = str_replace(\n '#'.$key, \n $this->sanitizeValue( $key, $value ),\n $query\n );\n }\n \n $this->real_query = $query;\n return $this->real_query;\n }",
"protected function buildFields(Query $query)\n {\n return count($query->getFields()) > 0 ? implode(', ', $query->getFields()) : '*';\n }",
"function fieldValuesSimplified() {\n\t\t$arrFieldValuesSimplified = array();\n\t\t$fieldValues = $this->fieldValues();\n\t\tforeach ($fieldValues as $fieldID => $fieldVal) {\n\t\t\tif (!isset($arrFieldValuesSimplified[$fieldID])) {\n\t\t\t\t$arrFieldValuesSimplified[$fieldID] = array();\n\t\t\t}\n\t\t\tforeach ($fieldVal as $fieldSubVal) {\n\t\t\t\t$arrFieldValuesSimplified[$fieldID][] = $fieldSubVal['value'];\n\t\t\t}\n\t\t}\n\t\treturn $arrFieldValuesSimplified;\n\t}",
"public function toQuery();",
"function simplenews_build_issue_filter_query(EntityFieldQuery $query) {\n if (isset($_SESSION['simplenews_issue_filter'])) {\n foreach ($_SESSION['simplenews_issue_filter'] as $key => $value) {\n switch ($key) {\n case 'list':\n case 'newsletter':\n if ($value != 'all') {\n list($key, $value) = explode('-', $value, 2);\n $query->fieldCondition(variable_get('simplenews_newsletter_field', 'simplenews_newsletter'), 'target_id', $value);\n }\n break;\n }\n }\n }\n}",
"public function query() {\n $this->field_alias = $this->real_field;\n }",
"public function newQueryWithoutRelationships();",
"function searchwp_query_inject() {\n\t\tglobal $wpdb;\n\n\t\t$sql = '';\n\n\t\tif ( ! isset( $this->ordering['wc_orderby'] ) ) {\n\t\t\t$this->get_woocommerce_ordering();\n\t\t}\n\n\t\tif ( $this->is_woocommerce_search() && ! empty( $this->ordering ) ) {\n\t\t\t// ratings need moar SQL\n\t\t\tif ( 'rating' === $this->ordering['wc_orderby'] ) {\n\t\t\t\t$sql = \" AVG( swpwpcommeta.meta_value ) as average_rating \";\n\t\t\t}\n\t\t}\n\n\t\treturn $sql;\n\t}",
"function change_columns_filter( $columns ) {\n unset($columns['product_tag']);\n unset($columns['sku']);\n unset($columns['featured']);\n unset($columns['product_type']);\n unset($columns['post_type']);\n unset($columns['price']);\n return $columns;\n}",
"private function makeQueryNoSplit(){\n\t\t\n\t\t$this->searchQ['select'] = array('l.name','l.summary','l.sum_approach','l.sum_problems','l.address_line_1','l.address_line_2','l.town','l.county','l.postcode','l.country','l.phone','l.image','l.latitude','l.longitude','l.publish_address','l.publish_phone','l.approved','p.uri','p.urlname','e.level','y.listing_type');\n\t\t$this->searchQ['orderby'][] = 'l.level_id DESC';\n\t\t$this->searchQ['from'] = 'listing l, listing_level e, listing_type y, pages p'; //should always be the same...\n\t\t$this->searchQ['where'] = array('e.level_id = l.level_id','y.listing_type_id = l.listing_type_id','l.page_id = p.page_id','l.publish = 1');//,'p.publish = 1');\n\t\t\n\t\t// set up the initial search variables\t\t\n\t\t//! location\n\t\tif( strlen($this->vars['location']) ){\n\t\t\n\t\t\t$this->Geocode = new Geolocation( $this->vars['location']. ', UK' );\n\t\t\t$this->Geocode->lookup();\n\t\t\t// using the OS grid as makes calculation simpler than using lng/lat - can use simple pythag rather than calculus functions\n\t\t\t// we shorten the list of rows needing the calculation by the greater / less than in the where\n\t\t\t\n\t\t\t$calculation = ' SQRT(POW(( l.easting - ' . round($this->Geocode->getOSEast()) . '),2) + POW((l.northing - ' . round($this->Geocode->getOSNorth()) . '),2)) ';\n\t\t\t$this->searchQ['select'][] = $calculation . \" AS distance\";\n\t\t\t$this->searchQ['where'][] = \"northing < \" . round( $this->Geocode->getOSNorth() + $this->searchDistance ) ; \n\t\t\t$this->searchQ['where'][] = \"northing > \" . round( $this->Geocode->getOSNorth() - $this->searchDistance ) ;\n\t\t\t$this->searchQ['where'][] = \"easting < \" . round( $this->Geocode->getOSEast() + $this->searchDistance ) ;\n\t\t\t$this->searchQ['where'][] = \"easting > \" . round( $this->Geocode->getOSEast() - $this->searchDistance ) ;\n\t\t//\t$this->searchQ['where'][] = \"(\" . $calculation . \") <= \" . $this->searchDistance ;\n\t\t// use having rather than where\n\t\t\t$this->searchQ['having'][] = \"distance <= \" . $this->searchDistance;\n\t\t\t$this->searchQ['orderby'][] = 'distance ASC';\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\t//! freetext\n\t\tif( strlen($this->vars['term']) ){\n\t\t\t$this->searchQ['select'][] = \"MATCH(\" . $this->ftfields . \") AGAINST ('\" . $this->booleanAndTerm($this->vars['term']) . \"' IN BOOLEAN MODE) AS score\";\n\t\t\t//$this->searchQ['where'][] = \"MATCH(\" . $ftfields . \") AGAINST ('\" . $this->booleanAndTerm($this->vars['term']) . \"' IN BOOLEAN MODE)\";\n\t\t\t// use having rather than where\n\t\t\t$this->searchQ['having'][] = \"score > 0\";\n\t\t\t$this->searchQ['orderby'][] = 'score DESC';\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\t\n\t\t\n\t\t//! **** FILTERS ****\n\t\t//! profession\n\t\tif( isset($this->vars['profession']) && strlen($this->vars['profession']) ){\n\t\t\n\t\t\t//$this->searchQ['where'][] = \" l.listing_type_id IN (\" . implode(',', $this->vars['profession']) . \") \";\n\t\t\t$this->searchQ['where'][] = \" l.listing_type_id = \" . (int)$this->vars['profession'] . \" \";\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\t//! max price\n\t\tif( isset($this->vars['maxprice']) && is_numeric($this->vars['maxprice']) ){\n\t\t\n\t\t\t$this->searchQ['where'][] = \" l.hourly_rate <= \" . (int)$this->vars['maxprice'] . \" \";\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\t\n\t\t//! gender\n\t\tif( isset($this->vars['gender']) && in_array($this->vars['gender'] , array('M','F')) ){\n\t\t\n\t\t\t$this->searchQ['from'] .= ', listing_to_gender ltg';\n\t\t\t$this->searchQ['where'][] = \" ltg.listing_id = l.listing_id \";\n\t\t\t$this->searchQ['where'][] = \" ltg.gender = '\" . $this->vars['gender'] . \"' \";\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\n\t\t//! speciality\n\t\tif( isset($this->vars['speciality']) && is_numeric($this->vars['speciality']) ){\n\t\t\n\t\t\t$this->searchQ['from'] .= ', listing_to_age ltag';\n\t\t\t$this->searchQ['where'][] = \" ltag.listing_id = l.listing_id \";\n\t\t\t$this->searchQ['where'][] = \" ltag.age_id = \" . (int)$this->vars['speciality'] . \" \";\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\t\n\t\t//! ** build the query **\n\t\t$q = \"SELECT \" . (($this->numRows)?' SQL_CALC_FOUND_ROWS ':'') . implode(',', $this->searchQ['select']). \"\n\t\t\t\tFROM \" . $this->searchQ['from'] . \"\n\t\t\t\tWHERE\n\t\t\t\t\t\" . implode(' AND ', $this->searchQ['where']) ;\n\t\t\t\t\t\n\t\tif( isset($this->searchQ['having']) && count($this->searchQ['having']) ){\n\t\t\t$q .= \" HAVING \" . implode(' AND ' , $this->searchQ['having']);\n\t\t}\n\t\t\n\t\t$q .= \"\tORDER BY \" . implode(',', $this->searchQ['orderby']) . \" \";\n\n\t\t$q .= \"\tLIMIT \" . ( ($this->page-1)* $this->limit) . \",\" . $this->limit . \" \"; \n\t\t\t\n\t\treturn $q;\n\t\t\n\t}",
"function extract_fields($criteria = array())\n{\n\t$fields = array();\n\t\n\tforeach ($criteria as $table => $info)\n\t{\n\t\tforeach ($info['fields'] as $code => $name)\n\t\t{\n\t\t\t$fields[$code] = $name;\n\t\t}\n\t}\n\t\n\treturn $fields;\n}",
"function select() {\n return \"\n contact_a.id AS contact_id,\n contact_a.contact_sub_type AS contact_sub_type,\n contact_a.sort_name AS sort_name,\n source,\n created_date,\n modified_date\n \";\n }",
"public function prepareFieldset();",
"public abstract function queryModelFields($fields, \\MPF\\Db\\Page $page = null);",
"public function query() {\n // Leave empty to avoid a query on this field.\n }",
"public function get_fieldset_sql($sql, array $params=null) {\n if ($result = parent::get_fieldset_sql($sql, $params)) {\n array_walk($result, 'onespace2empty');\n }\n return $result;\n }",
"protected function prepareFoundRows ($fields) {\t\t\n\t\t$fields = @mergeAsArray(null, $fields);\n\t\tif (empty($fields[0])) {\n\t\t\t$fields = array(\"SQL_CALC_FOUND_ROWS (null)\", \"{$this->alias}.*\");\n\t\t} else {\n\t\t\tarray_unshift($fields, 'SQL_CALC_FOUND_ROWS (null)');\n\t\t}\n\t\treturn $fields;\n\t\t\n\t\t\n\t\t/*******************************************************************************\n\t\t * DEPRECATE\n\t\t */\n//\t\tif (is_array($fields) && !@empty($fields[0])) {\n//\t\t\t$fields[0] = \"SQL_CALC_FOUND_ROWS \".$fields[0];\n//\t\t} else {\n//\t\t\t$fields = !empty($fields) ? \"SQL_CALC_FOUND_ROWS {$fields}\" : \"SQL_CALC_FOUND_ROWS `{$this->alias}`.*\";\n//\t\t\t$fields = array($fields);\n//\t\t}\n\t\treturn $fields;\n\t}",
"public function _clean_by_sql($sql = '')\n {\n }",
"public function testBuildSelectFieldsEmpty()\n {\n $query = $this->getQuery();\n\n $this->assertSame(\n '*',\n $query->buildSelectFields()\n );\n }",
"public function buildSelect()\n {\n $this->query->select(\"DISTINCT(p.id),p.*,\n u.first_name as owner_first_name,u.last_name as owner_last_name,\n c.id as company_id,c.name as company_name,IF(p.id=d2.primary_contact_id, 1, 0) AS is_primary_contact\");\n\n $this->query->from(\"#__people AS p\");\n $this->query->leftJoin(\"#__people_cf as cf ON cf.person_id = p.id\");\n $this->query->leftJoin(\"#__users AS u ON u.id = p.owner_id\");\n $this->query->leftJoin(\"#__companies AS c ON c.id = p.company_id\");\n $this->query->leftJoin(\"#__deals AS d ON d.id = cf.association_id AND cf.association_type = 'deal'\");\n $this->query->leftJoin(\"#__deals AS d2 ON d2.primary_contact_id = p.id\");\n\n }",
"function map_wheres($where){\n //\n //return field to str\n return $where->to_str();\n }",
"function get_all_additional_fields() {\r\n\t\t$sql = \"SELECT * FROM sys_man_additional_fields ORDER BY field_name\";\r\n\t\t$sql = $this->clean_sql($sql);\r\n\t\t$query = $this->db->query($sql);\r\n\t\t$result = $query->result();\r\n\t\treturn ($result);\r\n\t}",
"private function _fields() {\n if ($this->_table() && empty($this->fields)) {\n $this->fields = $this->db->list_fields($this->_table());\n }\n return $this->fields;\n }",
"public abstract function getSelectSQL($fields, $from, $joins, $where, $having, $group, $order, $limit, $values, $forupdate);",
"protected function filter_row(&$row) {}",
"abstract protected function _getFeedFields();",
"public function pubFields()\n {\n $fields = array();\n\n foreach ($this as $column => $value) {\n $fields[$column] = 'column';\n }\n\n // FIXME From Doctrine: prevent mapped Doctrine_Records from being displayed fully\n foreach ($this->_values as $key => $value) {\n $fields[$key] = 'value';\n }\n\n foreach ($this->_table->getRelations() as $key => $relation) {\n if (strpos($key, 'Clip_Model_Relation') !== 0) {\n $fields[$key] = 'relation';\n }\n }\n\n // reorder the fields conveniently\n $reorder = array(\n 'core_title' => 'map',\n 'core_uniqueid' => 'map',\n 'core_tid' => 'map',\n 'core_pid' => 'value',\n 'core_author' => 'value',\n 'core_creator' => 'map',\n 'core_approvalstate' => 'map'\n );\n $fields = array_merge($reorder, $fields);\n\n return $fields;\n }",
"function filterPostData()\n {\n /** Remove linked records if they are not set anymore **/\n foreach (array('UNL_MediaHub_Feed_NamespacedElements_itunes' => 'value',\n 'UNL_MediaHub_Feed_NamespacedElements_media' => 'value',\n 'UNL_MediaHub_Feed_Media_NamespacedElements_itunesu' => 'value',\n 'UNL_MediaHub_Feed_Media_NamespacedElements_itunes' => 'value',\n 'UNL_MediaHub_Feed_Media_NamespacedElements_media' => 'value',\n 'UNL_MediaHub_Feed_Media_NamespacedElements_geo' => 'value',\n 'UNL_MediaHub_Feed_Media_NamespacedElements_mediahub' => 'value') as $relation=>$field) {\n if (isset($this->post[$relation])) {\n foreach ($this->post[$relation] as $key=>$values) {\n if (empty($values[$field])\n && empty($values['attributes'])) {\n unset($this->post[$relation][$key]);\n }\n }\n }\n }\n unset($this->post['__unlmy_posttarget']);\n unset($this->post['MAX_FILE_SIZE']);\n unset($this->post['submit_existing']);\n }",
"private function filter_results($fields = NULL)\n\t{\n\t\tif (!empty($fields)){\n\t\t\t// Filter by the fields\n\t\t\tforeach($fields as $column => $value){\n\t\t\t\t$this->db->where($column, $value);\n\t\t\t}\n\t\t}\n\t}",
"function SQLFiltering($sql){\n // 해킹 공격을 대비하기 위한 코드\n $sql = preg_replace(\"/\\s{1,}1\\=(.*)+/\", \"\", $sql); // 공백이후 1=1이 있을 경우 제거\n $sql = preg_replace(\"/\\s{1,}(or|and|null|where|limit)/i\", \" \", $sql); // 공백이후 or, and 등이 있을 경우 제거\n $sql = preg_replace(\"/[\\s\\t\\'\\;\\=]+/\", \"\", $sql); // 공백이나 탭 제거, 특수문자 제거\n return $sql;\n}",
"private function setFields(): string\n {\n $sql = '';\n\n foreach (array_keys($this->data) as $key) {\n $sql .= '`' . $key . '` = ? , ';\n }\n return rtrim($sql, ', ');\n }",
"function expand($q)\n\t{\n $this->select .= isset($q['select' ]) ? \" , $q[select] \" : '';\n $this->from .= isset($q['from' ]) ? \" $q[from] \" : '';\n $this->where .= isset($q['where' ]) ? \" AND $q[where] \" : '';\n $this->limit .= isset($q['limit' ]) ? \" $q[limit] \" : '';\n\n $qwote = empty($this->order_by) ? '' : ', ';\n $this->order_by .= isset($q['order_by']) ? $qwote.\" $q[order_by]\" : '';\n\n $qwote = empty($this->group_by) ? '' : ', ';\n $this->group_by .= isset($q['group_by']) ? $qwote.\" $q[group_by]\" : '';\n\n $qwote = empty($this->having) ? '' : ' and ';\n $this->having .= isset($q['having']) ? $qwote.\"$q[having]\" : '';\n }",
"private function _prepare_select_sql($columns,$table){\n $this->debugBacktrace();\n $distinct = $this->distinct; $this->distinct = \"\";\n $sql = \"\";\n switch ($this->queryType){\n case \"select\":\n $sql = \"SELECT \". $distinct . \" \" . $columns .\" FROM \" . $table;\n break;\n case \"count\":\n case \"min\":\n case \"max\":\n case \"sum\":\n $aggregateFunctionName = $this->queryType;\n $sql = \"SELECT \". $aggregateFunctionName .\"(\". $distinct . \" \". $columns .\") as `\". $aggregateFunctionName .\"` FROM \" . $table;\n break;\n }\n \n if(!empty($this->joinClause)){\n $sql .= \" \" . $this->joinClause;\n $this->joinClause = \"\";\n }\n \n if(!empty($this->whereClause)){\n $sql .= \" WHERE \" . $this->whereClause;\n $this->whereClause =\"\";\n }\n \n \n if(!empty($this->groupByClause)){\n $sql .= \" GROUP BY \" . $this->groupByClause;\n $this->groupByClause =\"\";\n }\n \n if(!empty($this->havingClause)){\n $sql .= \" HAVING \" . $this->havingClause;\n $this->havingClause = \"\";\n }\n \n if(!empty($this->orderByClause)){\n $sql .= ' ORDER BY '. $this->orderByClause;\n $this->orderByClause = \"\";\n }\n //LIMIT 10 OFFSET 10\n if($this->selectModifier == \"first\"){\n $sql .= ' LIMIT 1';\n }\n else{\n if($this->takeQuantity > 0){\n $sql .= \" LIMIT \" . $this->takeQuantity;\n }\n }\n \n if($this->skipQuantity>0){\n $sql .= \" OFFSET \" . $this->skipQuantity;\n }\n \n return $sql;\n }",
"public function testDecorateQuery_SQL_SelectFields() {\n /* Single field */\n $originalQuery = \"SELECT `emp_firstname`, `emp_lastname` FROM `hs_hr_employee` WHERE `emp_number` = '10'\";\n $expectedQuery = \"SELECT `emp_firstname`, `emp_lastname`, `emp_middle_name` FROM `hs_hr_employee` WHERE `emp_number` = '10'\";\n $resultQuery = $this->baseService->decorateQuery('SampleService_ForSelect', 'sampleMethod1', $originalQuery);\n $this->assertEquals($expectedQuery, $resultQuery);\n\n /* Multiple fields */\n $originalQuery = \"SELECT `emp_firstname`, `emp_lastname` FROM `hs_hr_employee` WHERE `emp_number` = '10'\";\n $expectedQuery = \"SELECT `emp_firstname`, `emp_lastname`, `emp_middle_name`, `job_title_code`, `joined_date` FROM `hs_hr_employee` WHERE `emp_number` = '10'\";\n $resultQuery = $this->baseService->decorateQuery('SampleService_ForSelect', 'sampleMethod2', $originalQuery);\n $this->assertEquals($expectedQuery, $resultQuery);\n\n /* Single field with alias */\n $originalQuery = \"SELECT `emp_firstname`, `emp_lastname` FROM `hs_hr_employee` WHERE `emp_number` = '10'\";\n $expectedQuery = \"SELECT `emp_firstname`, `emp_lastname`, `emp_middle_name` AS `middleName` FROM `hs_hr_employee` WHERE `emp_number` = '10'\";\n $resultQuery = $this->baseService->decorateQuery('SampleService_ForSelect', 'sampleMethod3', $originalQuery);\n $this->assertEquals($expectedQuery, $resultQuery);\n\n /* Multiple fields with aliases */\n $originalQuery = \"SELECT `emp_firstname`, `emp_lastname` FROM `hs_hr_employee` WHERE `emp_number` = '10'\";\n $expectedQuery = \"SELECT `emp_firstname`, `emp_lastname`, `emp_middle_name` AS `middleName`, `job_title_code`, `joined_date` AS `active` FROM `hs_hr_employee` WHERE `emp_number` = '10'\";\n $resultQuery = $this->baseService->decorateQuery('SampleService_ForSelect', 'sampleMethod4', $originalQuery);\n $this->assertEquals($expectedQuery, $resultQuery);\n\n /* Single field with table id */\n\n /* Multiple fields with table ids */\n }",
"public function getQuery(){\n $sql = \"select %s from %s %s %s %s %s %s\";\n\n return sprintf($sql, $this->param, $this->table,\n empty($this->join) ? '' : implode($this->join),\n empty($this->where) ? '' : 'where '. $this->where,\n empty($this->having)? '' : 'having '. $this->having,\n empty($this->order) ? '' : 'order by '. $this->order,\n empty($this->setOperations) ? '' : implode($this->setOperations)\n );\n }",
"function selectOnly($fields) {\n\t $this->result = null;\n \n\t if(is_array($fields)) {\n\t $this->select = $fields;\n\t } else {\n\t $args = func_get_args();\n\t\t array_shift($args);\n\t\t \n\t $this->select = array();\n\t\t\t$this->select[] = $this->escapeArray($fields, $args);\n\t }\n\t return $this; \n\t}",
"public function filter()\n\t{\n\t\treturn implode( ' AND ', array_map( function( $col ) { return \"$col=?\"; }, array_keys( $this->_id ) ) );\n\t}",
"private\tfunction\t_prepareFindQuery()\n\t\t{\n\t\t\tself::$_queries[$this->_class]['find']\t=\t'SELECT '.trim(str_replace('<alias>','a0',self::$_queries[$this->_class]['select']), ', ')\n\t\t\t\t\t\t\t\t\t\t\t\t\t.\t\"\\rFROM \".'`'.$this->_table.'` `a0`'.self::$_queries[$this->_class]['from'];\n\t\t\tunset(self::$_queries[$this->_class]['select'], self::$_queries[$this->_class]['from']);\n\t\t\t\n\t\t\treturn\tself::$_queries[$this->_class]['find'];\n\t\t}",
"private function cleanQuery()\n {\n $this->where = [];\n $this->bind = [];\n\n return $this;\n }",
"function rest_filter_response_fields($response, $server, $request)\n {\n }",
"public function testBuildSelectWithFields()\n {\n $query = $this->getQuery()\n ->fields('id', 'name', 'email')\n ;\n\n $this->assertSame(\n 'id, name, email',\n $query->buildSelectFields()\n );\n }",
"private function __processRetrievalQuery(Model $model, $query) {\n\t\t$default = array('engine' => $this->settings[$model->alias]['engine'], 'count' => $this->settings[$model->alias]['count']);\n\t\t$query = array_merge($default, $query);\n\n\t\t$query['n'] = $query['count'];\n\t\tunset($query['count']);\n\n\t\t$whiltelist = array('uid', 'iid', 'engine', 'n', 'itypes', 'latlng', 'within', 'unit', 'attributes');\n\t\tforeach ($query as $key => $value) {\n\t\t\tif (in_array($key, $whiltelist)) {\n\n\t\t\t\t// Flatten types\n\t\t\t\tif ($key === 'itypes') {\n\t\t\t\t\t$value = (array)$value;\n\t\t\t\t\tforeach ($value as &$type) {\n\t\t\t\t\t\tif ($type instanceof Model) {\n\t\t\t\t\t\t\t$type = $type->alias;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$query['pio_' . $key] = is_array($value) ? implode(',', $value) : $value;\n\t\t\t}\n\t\t\tunset($query[$key]);\n\t\t}\n\n\t\treturn $query;\n\t}",
"public function newQueryWithoutScopes();",
"function sanitize_results( $results, $db = null ) {\n\n\t\t$db = $this->get_db( $db );\n\n\t\tif ( empty( $db->column_blacklist ) ) {\n\t\t\treturn $results;\n\t\t}\n\n\t\tforeach ( $results as $ID => $result ) {\n\t\t\tforeach ( $db->column_blacklist as $column ) {\n\t\t\t\tunset( $results[ $ID ] -> $column );\n\t\t\t}\n\n\t\t}\n\n\t\treturn $results;\n\n\t}",
"protected function prepareFields($fields)\n {\n return collect(is_callable($fields) ? $fields() : $fields)->each(function($field){\n })->all();\n }"
] | [
"0.6370656",
"0.602359",
"0.59116215",
"0.5793583",
"0.57823604",
"0.5693136",
"0.56552315",
"0.5649633",
"0.56182706",
"0.5617679",
"0.5590357",
"0.5575314",
"0.55678827",
"0.5503875",
"0.546336",
"0.54584396",
"0.5451576",
"0.543907",
"0.5434108",
"0.54175216",
"0.541518",
"0.54037315",
"0.5396906",
"0.53908414",
"0.53623736",
"0.5359234",
"0.53339887",
"0.53316605",
"0.5291506",
"0.52845395",
"0.5277189",
"0.52759767",
"0.52708817",
"0.52441835",
"0.52220863",
"0.52183896",
"0.52175695",
"0.52168053",
"0.52072525",
"0.52071583",
"0.51996917",
"0.5197025",
"0.51941746",
"0.519221",
"0.5179071",
"0.5178351",
"0.51710826",
"0.5161317",
"0.51482713",
"0.51437634",
"0.51355577",
"0.5134382",
"0.5133264",
"0.51234484",
"0.51234484",
"0.51195043",
"0.5118869",
"0.5117165",
"0.5116261",
"0.5112355",
"0.5109511",
"0.51066375",
"0.510317",
"0.5093776",
"0.5088967",
"0.5086583",
"0.50807613",
"0.50796866",
"0.50785995",
"0.50763077",
"0.50735575",
"0.5067555",
"0.5061324",
"0.504801",
"0.5034683",
"0.5033745",
"0.5023159",
"0.5018147",
"0.5018099",
"0.5014085",
"0.5004814",
"0.5002657",
"0.49970537",
"0.49897134",
"0.4989467",
"0.49846554",
"0.49840555",
"0.49764735",
"0.49749637",
"0.4972123",
"0.4968244",
"0.49668887",
"0.4966721",
"0.49667087",
"0.49595582",
"0.4957482",
"0.4957406",
"0.49565142",
"0.49560183",
"0.49549738",
"0.4949815"
] | 0.0 | -1 |
coalesce PHP analogue of the SQL Coalesce() function | public static function coalesce()
{
foreach ( func_get_args() as $arg )
{
if ( ! is_null($arg) )
{
return $arg;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function coalesce() {\n $args = func_get_args();\n foreach ($args as $arg) {\n if (!empty($arg)) {\n return $arg;\n }\n }\n return $args[0];\n}",
"function coalesce() {\n\tforeach (func_get_args() as $arg) {\n\t\tif (!is_null($arg)) {\n\t\t\treturn $arg;\n\t\t}\n\t}\n\treturn null;\n}",
"function coalesce($value, $default1=null, $default2=false, $default3=false, $default4=false) {\n return isnull(isnull(isnull(isnull($value, $default1), $default2), $default3), $default4);\n }",
"public static function coalesce()\n {\n $args = func_get_args();\n $last = null;\n foreach ($args as $arg) {\n if (!empty($arg)) {\n return $arg;\n }\n $last = $arg;\n }\n return $last;\n }",
"function coalescenull($value, $default1) {\n if (is_null($value)) {\n return $default1;\n } else {\n return $value;\n }\n }",
"function coalesce(&$var, $default = null)\r\n {\r\n return isset($var) && !is_null($var) ? $var : $default;\r\n }",
"public static function coalesce_empty()\n\t{\n\t\tforeach ( func_get_args() as $arg )\n\t\t{\n\t\t\tif ( ! empty($arg) )\n\t\t\t{\n\t\t\t\treturn $arg;\n\t\t\t}\n\t\t}\n\t}",
"public static function coalesce($args)\n\t{\n\t\t$args = func_get_args();\n\t\tforeach ($args as &$arg)\n\t\t{\n\t\t\tif (isset($arg) && !empty($arg))\n\t\t\t{\n\t\t\t\treturn $arg;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}",
"function emptyCoalesce($data, $default = null)\n {\n return ($data === null || $data === false) ? $default : $data;\n }",
"function mCOALESCE(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$COALESCE;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:74:3: ( 'coalesce' ) \n // Tokenizer11.g:75:3: 'coalesce' \n {\n $this->matchString(\"coalesce\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }",
"protected function _nullCoalesce(array $arr, $field, $default)\n\t{\n\t\treturn isset($arr[$field]) ? $arr[$field] : $default;\n\t}",
"protected function _nullCoalesce(array $arr, $field, $default)\n\t{\n\t\treturn isset($arr[$field]) ? $arr[$field] : $default;\n\t}",
"protected function _nullCoalesce(array $arr, $field, $default)\n {\n return isset($arr[$field]) ? $arr[$field] : $default;\n }",
"protected function nullCoalesce(array $arr, $field, $default)\n {\n return isset($arr[$field]) ? $arr[$field] : $default;\n }",
"protected function nullCoalesce(array $arr, $field, $default)\n {\n return isset($arr[$field]) ? $arr[$field] : $default;\n }",
"public function func_concat_coalesce(array $fields) : string\n {\n if (empty($fields)) {\n return '';\n }\n return \"CONCAT_WS('', \".implode(',', $fields).')';\n }",
"public function orNull();",
"public static function tableCoalesce() {\n\t\t$aArgs = func_get_args();\n\t\tforeach ( $aArgs as $sTable ) {\n\t\t\tif ( self::tableExists( $sTable ) ) {\n\t\t\t\treturn $sTable;\n\t\t\t}\n\t\t}\n\t\treturn NULL;\n\t}",
"public function getDefault($row = null)\n {\n\tif( !is_null($default = $this->getDefaultValue()) )\n\t{\n\t return $default;\n\t}\n\telseif( $this->getDefaultCallback() )\n\t{\n\t return call_user_func($this->getDefaultCallback(), $row);\n\t}\n\telse\n\t{\n\t return null;\n\t}\n }",
"static function null($X, $Alt) {\n\t\treturn is_null($X) ? $Alt : $X;\n\t}",
"function null($input)\n{\n return ($input != NULL || $input!='')? $input : \" -- \";\n}",
"function get_value_or_default($value,$default='')\n{\n\treturn (!empty($value)) ? $default : $value;\n}",
"public function getOrElse($default);",
"public function getCoalesce(array $coalesceIds=null) {\n\t\tif($coalesceIds) {\n\t\t\t$this->db->where($this->dbTable.'.id', $coalesceIds,'IN');\n\t\t\t$items = $this->_getResultFromDb();\n\t\t\t$items = $this->_addHasManyMultiple($items);\n\t\t\t$items = $this->_unsetHiddenPropertiesMultiple($items);\n\t\t\t$this->_addSideloadsMultiple($items);\n\t\t\treturn $items;\n\t\t} else {\n\t\t\tErrorHandler::throwOne(ErrorHadler::API_INVALID_GET_REQUEST);\n\t\t\treturn false;\n\t\t}\n\t}",
"function empty2null($value)\n{\n return $value === '' ? null : $value;\n}",
"function _set_null_default_value($value) {\n\t\tif ($value == '') {\n\t\t\treturn \"NULL\";\n\t\t} else {\n\t\t\treturn \"'\".$value.\"'\";\n\t\t}\n\t}",
"public function valForNull($candidate, $altvalue=0)\n {\n if(!isset($candidate) || $candidate === NULL)\n {\n return $altvalue;\n }\n return $candidate;\n }",
"function NVL($v, $def) { return $v === null || $v === ''? $def: $v; }",
"public function getOrElse($dflt)\n {\n return $this->isEmpty() ? $dflt : $this->val;\n }",
"function pseudoTypeNull(null $var = null) {}",
"public function stdWrap_ifNull($content = '', $conf = [])\n {\n return $content !== null ? $content : $conf['ifNull'];\n }",
"function isCoalesced();",
"function Maybe($x = null) {\n return func_num_args() < 1 || is_null($x)\n ? None::getInstance()\n : new Some ($x);\n}",
"public function valForNullOrMissing($map, $key, $altvalue=0)\n {\n try\n {\n if(!isset($map[$key]))\n {\n return $altvalue;\n } else {\n $candidate = $map[$key];\n if(!isset($candidate) || $candidate === NULL)\n {\n return $altvalue;\n }\n return $candidate;\n }\n } catch (\\Exception $ex) {\n throw $ex;\n }\n }",
"function float_or_null($f) {\n return $f === null ? null : (float) $f;\n}",
"private function analyzeBinaryCoalesceForRedundantCondition(Context $context, Node $node): void\n {\n $left_node = $node->children['left'];\n $right_node = $node->children['right'];\n // @phan-suppress-next-line PhanPartialTypeMismatchArgumentInternal\n if ($right_node instanceof Node && $right_node->kind === ast\\AST_CONST && \\strcasecmp($right_node->children['name']->children['name'] ?? '', 'null') === 0) {\n if ($left_node instanceof Node && self::isAlwaysDefined($context, $left_node)) {\n $this->emitIssue(\n Issue::CoalescingNeverUndefined,\n $node->lineno,\n ASTReverter::toShortString($left_node)\n );\n }\n }\n $left = UnionTypeVisitor::unionTypeFromNode($this->code_base, $context, $left_node);\n if (!$left->hasRealTypeSet()) {\n return;\n }\n $left = $left->getRealUnionType();\n if (!$left->containsNullableOrUndefined()) {\n if (RedundantCondition::shouldNotWarnAboutIssetCheckForNonNullExpression($this->code_base, $context, $left_node)) {\n return;\n }\n RedundantCondition::emitInstance(\n $left_node,\n $this->code_base,\n (clone $context)->withLineNumberStart($node->lineno),\n Issue::CoalescingNeverNull,\n [\n ASTReverter::toShortString($left_node),\n $left\n ],\n static function (UnionType $type): bool {\n return !$type->containsNullableOrUndefined();\n },\n self::canNodeKindBeNull($left_node)\n );\n return;\n } elseif ($left->isNull()) {\n RedundantCondition::emitInstance(\n $left_node,\n $this->code_base,\n (clone $context)->withLineNumberStart($node->lineno),\n Issue::CoalescingAlwaysNull,\n [\n ASTReverter::toShortString($left_node),\n $left\n ],\n static function (UnionType $type): bool {\n return $type->isNull();\n }\n );\n return;\n }\n }",
"public function getValueOrDefault($key) {\n return $this->values->get($key) !== NULL\n ? $this->values->get($key)\n : $this->values->get('Default'.$key);\n }",
"public static function min(Money|Collection|null $first = null, Money ...$list): ?Money;",
"function emptyToNull($ChartID) { return(empty($ChartID)?'NULL':\"'\".$ChartID.\"'.\");}",
"public function getDefaultSql(): string|null\n {\n return null;\n }",
"function min_not_null(Array $values) {\n\treturn min(array_diff(array_map('intval', $values), array(0)));\n}",
"protected function get_formatted_null(): string\n\t{\n\t\treturn $this->null ? 'NULL' : 'NOT NULL';\n\t}",
"private function cek_null($val,$field)\n { if (isset($val)){ return $this->ci->db->where($field, $val); } }",
"function alt() {\r\n\tforeach (func_get_args() as $arg) {\r\n\t\tif (!is_null($arg)) {\r\n\t\t\treturn $arg;\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn null;\r\n}",
"function getValueOrNull($value) {\n global $db;\n if(strlen($value) == 0) return \"NULL\";\n else return \"'\".$db->validate($value).\"'\";\n}",
"public function getDefaultValue();",
"public function getDefaultValue();",
"function dataDefatult($data, $defaultD) {\r\n if ($data)\r\n return $data;\r\n return $defaultD;\r\n}",
"public function getDefaultValue(): mixed;",
"function getValue($key, $default = null)\r\n {\r\n return $this->coalesce($this->container[$key], $default);\r\n }",
"public function firstOrDefault($default=null)\n {\n if($this->length()>0)\n {\n return $this->getAt(0);\n }\n return $default;\n }",
"function _eor() {\r\n\tforeach(func_get_args() as $a) { if (!empty($a)) return $a; }\r\n\treturn null;\r\n}",
"protected function escapeNULL()\n {\n return 'NULL';\n }",
"public function getDefault(): ?string;",
"public function firstOr($default = null);",
"public function set_null($value = '', $force_null = FALSE) {\n if ($force_null == TRUE && ($value === 0 || $value === '0')) {\n return NULL;\n }\n\n return $value == '' || $value == '<br>' ? NULL : $value;\n //return $value == '' ? NULL : $value;\n }",
"function int_or_null($i) {\n return $i === null ? null : (int) $i;\n}",
"function first_value_from_array(array $array, mixed $default = null): mixed\n {\n return \\Midnite81\\Core\\Functions\\first_value_from_array($array);\n }",
"function lavnn($key, $arr, $default) {\n $av = lav($key, $arr, \"\");\n return ($av == \"\") ? $default : $av;\n}",
"function value(array $array, int|string $key = null, mixed $default = null): mixed\n{\n if (func_num_args() > 1) {\n return $array[$key] ?? $default;\n }\n return $array ? current($array) : null; // No falses.\n}",
"public static function coalesce(array $time_periods) {\n if (count($time_periods) == 0) {\n return $time_periods;\n }\n\n usort($time_periods, array(\"Doctrine_Temporal_TimePeriod\", \"usortByStartDate\"));\n $working = null;\n foreach ($time_periods as $k => &$time_period) {\n if (is_null($working)) {\n $working =& $time_period;\n }\n elseif (is_null($working->exp_date)) {\n unset($time_periods[$k]);\n }\n elseif($working->exp_date >= $time_period->eff_date) {\n $working->exp_date = max($working->exp_date, $time_period->exp_date);\n unset($time_periods[$k]);\n }\n else {\n $working =& $time_period;\n }\n }\n return $time_periods;\n }",
"public function getOrDefault($key, $defaultValue);",
"public static function getOrDefault($array, $key, $default)\r\n {\r\n if (empty($array[$key])) {\r\n return $default;\r\n }\r\n return $array[$key];\r\n }",
"public static function defaultify($value)\n {\n if (is_array($value)) {\n foreach ($value as &$v) {\n $v === '' and $v = static::literal('DEFAULT');\n }\n\n return $value;\n }\n return $value === '' ? static::literal('DEFAULT') : $value;\n }",
"public function buildIsNull( $is_null=true );",
"function __return_null()\n {\n }",
"function ifenr($var, $default = null) {\n\tif (empty($var)) {\n\t\treturn $default;\n\t}\n\n\treturn $var;\n}",
"public static function null();",
"function null2unknown($map, $key) {\n if (array_key_exists($key, $map)) {\n if (!is_null($map[$key])) {\n return $map[$key];\n }\n }\n return \"No Value Returned\";\n }",
"static public function concat ( $arr )\n\t{\n\t\treturn null;\n\t}",
"public function getDefaultRegion() : ?string;",
"function trans_or_default(string $key, $default, array $replace = [], $locale = null): string\n {\n $message = trans($key, $replace, $locale);\n\n return $message === $key ? $default : $message;\n }",
"function default_value(&$var, $def = null) {\n return isset($var)?$var:$def;\n}",
"public function emptyToNull(&$string)\n {\n return empty($string) ? null : $string;\n }",
"public function singleOrDefault($default=null)\n {\n if($this->length()==1)\n {\n return $this->getAt(0);\n }\n return $default;\n }",
"private static function getCharsetDefaultCollation($charset)\n {\n $collations = self::getCharsetCollations($charset);\n if (null !== $collations) {\n return $collations[0];\n }\n return null;\n }",
"public function getDefaultIcao(): string|null\n {\n return null;\n }",
"abstract public function isNull();",
"public function isNull();",
"public static function fallback( $args ) {\r\n\t\t\treturn null;\r\n\t\t}",
"function wpv_default($value, $default) {\n\tif (empty($value))\n\t\treturn $default;\n\treturn $value;\n}",
"public function getDefaultLongitude(): string|null;",
"public function getNonNull($content) {\n\t\tif (!is_array(current($content))) {\n\t\t\tthrow new Exception('Please use a multi-dimensional array'.\n\t\t\t\t'from '.$this->className.'->'.__FUNCTION__.'() line '.\n\t\t\t\t__LINE__\n\t\t\t);\n\t\t} else {\n\t\t\ttry {\t\t\t\n\t\t\t\t// loop through each array\n\t\t\t\t$count = count($content);\n\t\t\t\t\n\t\t\t\tfor ($i = 0; $i < $count; $i++) {\n\t\t\t\t\t$lastkey = array_pop(array_keys($content[$i]));\n\n\t\t\t\t\tforeach ($content[$i] as $subKey => $subValue) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (is_null($subValue)) {\n\t\t\t\t\t\t\tcontinue 2; // go to next array\n\t\t\t\t\t\t} \n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($subKey == $lastkey) {\n\t\t\t\t\t\t\treturn $content[$i];\n\t\t\t\t\t\t}\n\t\t\t\t\t} //<-- end foreach -->\n\t\t\t\t\t\n\t\t\t\t\treturn $content[0];\n\t\t\t\t} //<-- end foreach -->\n\t\t\t\t \n\t\t\t} catch (Exception $e) { \n\t\t\t\tthrow new Exception($e->getMessage().' from '.$this->className\n\t\t\t\t\t.'->'.__FUNCTION__.'() line '.__LINE__\n\t\t\t\t);\n\t\t\t} //<-- end try -->\n\t\t} //<-- end if -->\n\t}",
"public function getDefaultValue(): string|int|float|bool|array|null\n {\n $defaultValueNode = $this->node->props[$this->positionInNode]->default;\n\n if ($defaultValueNode === null) {\n return null;\n }\n\n if ($this->compiledDefaultValue === null) {\n $this->compiledDefaultValue = (new CompileNodeToValue())->__invoke(\n $defaultValueNode,\n new CompilerContext(\n $this->reflector,\n $this,\n ),\n );\n }\n\n return $this->compiledDefaultValue->value;\n }",
"public function stdWrap_ifNullDeterminesNullValuesDataProvider() {}",
"public function getDefault();",
"function getDefaultCountry($field){\r\n\t\tif($field==''){return false;}\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->where(array('is_default'=>true));\r\n\t\t$recordSet = $this->db->get(TBL_MST_COUNTRIES);\r\n\t\t$data=$recordSet->result() ;\r\n\t\treturn $data[0]->$field;\r\n\t}",
"public function getDefaultValue() {}",
"function atkNvl()\n{\n\tfor ($i = 0; $i < func_num_args(); $i++)\n\t{\n\t\t$arg = func_get_arg($i);\n\t\tif (!is_null($arg))\n\t\t{\n\t\t\treturn $arg;\n\t\t}\n\t}\n\n\treturn null;\n}",
"public function getDefaultValue() {}",
"function acf_maybe_get($array = array(), $key = 0, $default = \\null)\n{\n}",
"function trim_to_null($str, $len = null) {\n $str = trim_to($str, $len ? $len : strlen($str));\n return strlen($str) ? $str : null;\n}",
"function mixedTypeHintNullable(?Mixed $var1) {}",
"protected function primanota(array $lines): ?string\n {\n return null;\n }",
"public static function max(Money|Collection|null $first = null, Money ...$list): ?Money;",
"protected function transformNULLs($value)\n {\n return ($value === \"NULL\" || $value === \"null\") ? null : $value;\n }",
"public function getDefault($var);",
"public static function nvl(IInt32\\Type $x = null, IInt32\\Type $y = null) : IInt32\\Type {\n\t\t\treturn $x ?? $y ?? IInt32\\Type::zero();\n\t\t}",
"public static function ensureNullIfEmpty($value)\n\t{\n\t\treturn empty($value)?null:$value;\n\t}",
"function atkArrayNvl($array, $key, $defaultvalue=null)\n{\n\treturn (isset($array[$key]) ? $array[$key] : $defaultvalue);\n}"
] | [
"0.7806044",
"0.77543956",
"0.73745275",
"0.7299998",
"0.72654265",
"0.7109365",
"0.7058567",
"0.70412886",
"0.69763064",
"0.6945191",
"0.64951587",
"0.64951587",
"0.6367801",
"0.6272312",
"0.6272312",
"0.60627323",
"0.60503703",
"0.5912443",
"0.539057",
"0.5390514",
"0.52836496",
"0.5267574",
"0.5179716",
"0.5053784",
"0.5035565",
"0.5034375",
"0.49736878",
"0.4962524",
"0.49470347",
"0.49366865",
"0.4918526",
"0.49004495",
"0.4896082",
"0.48214906",
"0.48186395",
"0.48055348",
"0.4765468",
"0.47612762",
"0.4754954",
"0.47501928",
"0.47463232",
"0.47334206",
"0.4720907",
"0.4716734",
"0.46937168",
"0.4691482",
"0.4691482",
"0.46520296",
"0.4636059",
"0.46350187",
"0.460448",
"0.45939055",
"0.45929196",
"0.45919153",
"0.45729977",
"0.45659086",
"0.45653495",
"0.4559326",
"0.45579568",
"0.45543572",
"0.45341992",
"0.4525754",
"0.45243117",
"0.4509147",
"0.45073813",
"0.4504771",
"0.45025992",
"0.45013827",
"0.44976842",
"0.44961628",
"0.44745064",
"0.44726056",
"0.44713348",
"0.4460864",
"0.445855",
"0.44562942",
"0.44493175",
"0.44468576",
"0.44439158",
"0.4439636",
"0.44374028",
"0.4413753",
"0.44116956",
"0.44108778",
"0.44101664",
"0.43931872",
"0.43914926",
"0.4388916",
"0.43883514",
"0.4387874",
"0.4387207",
"0.43817627",
"0.4371561",
"0.43712533",
"0.43662104",
"0.4356674",
"0.4352949",
"0.43528882",
"0.4352477",
"0.4343265"
] | 0.7734427 | 2 |
coalesce_empty PHP analogue of the SQL Coalesce() function, but testing using empty() | public static function coalesce_empty()
{
foreach ( func_get_args() as $arg )
{
if ( ! empty($arg) )
{
return $arg;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function emptyCoalesce($data, $default = null)\n {\n return ($data === null || $data === false) ? $default : $data;\n }",
"public function stdWrap_ifEmptyDeterminesEmptyValuesDataProvider() {}",
"function empty2($mixed) {\n return empty($mixed);\n}",
"function empty2null($value)\n{\n return $value === '' ? null : $value;\n}",
"public function nonEmpty();",
"function is_empty()\n {\n }",
"function coalesce() {\n $args = func_get_args();\n foreach ($args as $arg) {\n if (!empty($arg)) {\n return $arg;\n }\n }\n return $args[0];\n}",
"public function getEmpty();",
"public function globalStringConditionMatchesOnEmptyExpressionWithValueSetToEmptyString() {}",
"public function isNull();",
"public function globalStringConditionMatchesOnEmptyExpressionWithValueSetToEmptyString() {}",
"function is_empty($value) {\n if (is_array($value)) {\n return empty($value);\n } elseif (is_string($value)) {\n return strlen($value) == 0;\n } else {\n return $value === null;\n }\n}",
"public function globalStringConditionMatchesOnEmptyLiteralExpressionWithValueSetToEmptyString() {}",
"public function globalStringConditionMatchesOnEmptyLiteralExpressionWithValueSetToEmptyString() {}",
"function null($input)\n{\n return ($input != NULL || $input!='')? $input : \" -- \";\n}",
"abstract public function isNull();",
"public static function coalesce()\n\t{\n\t\tforeach ( func_get_args() as $arg )\n\t\t{\n\t\t\tif ( ! is_null($arg) )\n\t\t\t{\n\t\t\t\treturn $arg;\n\t\t\t}\n\t\t}\n\t}",
"public static function ensureNullIfEmpty($value)\n\t{\n\t\treturn empty($value)?null:$value;\n\t}",
"function coalesce() {\n\tforeach (func_get_args() as $arg) {\n\t\tif (!is_null($arg)) {\n\t\t\treturn $arg;\n\t\t}\n\t}\n\treturn null;\n}",
"function coalesce($value, $default1=null, $default2=false, $default3=false, $default4=false) {\n return isnull(isnull(isnull(isnull($value, $default1), $default2), $default3), $default4);\n }",
"function is_blank($value) {\n if (is_object($value) && method_exists($value, 'is_blank')) return $value->is_blank();\n if (is_string($value)) $value = trim($value);\n return is_empty($value);\n}",
"public function orNull();",
"public function isEmpty();",
"public function isEmpty();",
"public function isEmpty();",
"public function isEmpty();",
"public function isEmpty();",
"public function isEmpty();",
"public function isEmpty();",
"public function isEmpty();",
"public function isEmpty();",
"public function isEmpty();",
"public function isEmpty();",
"public function isEmpty();",
"public function isEmpty();",
"public function isEmpty();",
"public function isEmpty();",
"public function isEmpty();",
"public function isEmpty();",
"function emptyToNull($ChartID) { return(empty($ChartID)?'NULL':\"'\".$ChartID.\"'.\");}",
"public function getEmpty() {\n return $this->quote($this->empty);\n }",
"public function nullifyEmpty(array &$array)\n {\n $array = array_map(function ($value) {\n if (!is_array($value) && !is_object($value) && $value === '') {\n $value = null;\n }\n\n return $value;\n }, $array);\n }",
"public static function coalesce($args)\n\t{\n\t\t$args = func_get_args();\n\t\tforeach ($args as &$arg)\n\t\t{\n\t\t\tif (isset($arg) && !empty($arg))\n\t\t\t{\n\t\t\t\treturn $arg;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}",
"function acf_is_empty($var)\n{\n}",
"public function getEmptyValues();",
"function tep_not_null ($value) {\n\treturn !empty ($value) && trim ($value);\n}",
"function is_blank($value) {\n return !isset($value) || trim($value) === '';\n}",
"function validate_empty($val) {\n\tif ($val === NULL || $val === '') {\n\t\treturn true;\n\t}\n\treturn false;\n}",
"public static function get_empty($array, $key, $default = NULL)\n\t{\n\t\treturn !empty($array[$key]) ? $array[$key] : $default;\n\t}",
"function emptyToNull($val)\n {\n foreach ($val as $name => $value) {\n if (is_string($value) && trim($value) === \"\") {\n $val[$name] = null;\n }\n\n if (is_array($value)) {\n $val[$name] = emptyToNull($value);\n }\n }\n\n return $val;\n }",
"function empty_field($field)\n{\n return empty($field);\n}",
"function is_blank($value) {\n return !isset($value) || trim($value) === '';\n}",
"function isEmpty();",
"function isEmpty();",
"public static function coalesce()\n {\n $args = func_get_args();\n $last = null;\n foreach ($args as $arg) {\n if (!empty($arg)) {\n return $arg;\n }\n $last = $arg;\n }\n return $last;\n }",
"public function isEmpty() {}",
"private function clear_empty_values($row) {\n\t\tforeach( $row as $key => $datum)\n\t\t\tif (($datum==='' || $datum===null)) $row[$key] = $this->default_value;\n\t\treturn $row;\n\t}",
"function filter_empty($arr)\n {\n return array_filter($arr, function ($val) {\n if (is_bool($val) || is_array($val)) {\n return true;\n }\n\n return $val !== '' && $val !== null && strlen(trim($val)) > 0;\n });\n }",
"public function isEmpty()\n {\n return '' === $this->getValue();\n }",
"function is_blank( $value ) {\n return !isset( $value ) || trim( $value ) === '';\n}",
"function coalescenull($value, $default1) {\n if (is_null($value)) {\n return $default1;\n } else {\n return $value;\n }\n }",
"function is_empty($data) {\n\treturn empty($data);\n}",
"public function buildIsNull( $is_null=true );",
"function sql_check_null_or_empty($rs, $col_name) {\r\n\t\r\n\tif(trim($rs[\"$col_name\"])!=\"\"){\r\n\t\t$null_or_emoty_sql= $col_name .\"='$rs[$col_name]'\";\r\n\t}else{\r\n\t\t$null_or_emoty_sql=\"(\" . $col_name .\" is NULL OR \" . $col_name . \"='')\";\r\n\t}\r\n\t\r\n\treturn $null_or_emoty_sql;\r\n}",
"public function isEmpty() {\n\t\treturn empty($this->_value);\n\t}",
"public function isEmpty() {\n return empty($this->__value);\n }",
"public function isEmpty() {\r\n\t\treturn $this->getValue() == null || $this->getValue() == '' || $this->getValue() == 0;\r\n\t}",
"public function nullToEmpty($value)\n {\n if ($value == NULL) {\n $value = '';\n }\n return $value;\n }",
"function not_null($value) {\n if (is_array($value)) {\n if (sizeof($value) > 0)\n return true;\n else\n return false;\n } else {\n if ((is_string($value) || is_int($value)) && ($value != '') && (strlen(trim($value)) > 0))\n return true;\n else\n return false;\n }\n}",
"function acf_not_empty($var)\n{\n}",
"function is_empty($str, $incl_zero = true)\n{\n if (strlen(trim($str)) === 0 || !isset($str)) { // if the string length is 0 or it isn't set\n return true;\n } elseif ($incl_zero === true && empty($str) && $str != '0') { // if the string is empty and not 0, it's empty\n return true;\n } elseif (empty($str)) {\n return true;\n } else {\n return false;\n }\n}",
"function is_field_empty(array $fields) {\n foreach ($fields as $key => $value) {\n $fields[$key] = isset($value) ? trim($value) : '';\n }\n /* If there is nothing a field then valid empty index is false */\n if (in_array(\"\", $fields, true)) {\n return false;\n }\n /* return array */\n return $fields;\n}",
"function is_blank($value): bool\n {\n if (is_null($value)) {\n return true;\n }\n\n if (is_string($value)) {\n return trim($value) === '';\n }\n\n if (is_numeric($value) || is_bool($value)) {\n return false;\n }\n\n if (is_array($value)) {\n return count($value) === 0;\n }\n\n return empty($value);\n }",
"public function globalVarConditionMatchesOnEmptyExpressionWithNoValueSet() {}",
"public function globalVarConditionMatchesOnEmptyExpressionWithNoValueSet() {}",
"public function isEmpty()\n {\n return empty(trim($this->_value));\n }",
"function coalesce(&$var, $default = null)\r\n {\r\n return isset($var) && !is_null($var) ? $var : $default;\r\n }",
"public function isNull(): bool ;",
"public function isEmpty()\n {\n return $this->_value === '' || $this->_value === null;\n }",
"function is_empty($str, $incl_zero = true)\n{\n if (strlen(trim($str)) === 0 || !isset($str)) { // if the string length is 0 or it isn't set\n return true;\n } elseif ($incl_zero && empty($str) && $str != '0') { // if the string is empty and not 0, it's empty\n return true;\n } elseif (!$incl_zero && empty($str)) {\n return true;\n } else {\n return false;\n }\n}",
"public function hasNullValue(){\n return $this->_has(1);\n }",
"function getValueOrNull($value) {\n global $db;\n if(strlen($value) == 0) return \"NULL\";\n else return \"'\".$db->validate($value).\"'\";\n}",
"public function isEmpty() {\n return $this->is(new NotPossible('is empty'));\n }",
"public function isEmpty()\n {\n return empty($this->all());\n }",
"function is_empty ($subject) {\n\t\n\t\treturn !(isset($subject) && !is_null($subject) && ($subject!==''));\n\t\n\t}",
"function mCOALESCE(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$COALESCE;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:74:3: ( 'coalesce' ) \n // Tokenizer11.g:75:3: 'coalesce' \n {\n $this->matchString(\"coalesce\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }",
"function isEmpty(){\n\t\tif($this->first==null) return true;\n\t\telse return false;\n\t}",
"function is_element_empty($element) {\n $element = trim($element);\n return !empty($element);\n}",
"function strictEmpty($var) {\n $var = trim($var); \n if((isset($var) === true && $var === '') || (isset($var) === true && $var === 'undefined')) { \t\t\n return true; \n }\n else { \n return false;\n }\n}",
"public function getIgnoreEmpty()\n {\n return isset($this->ignore_empty) ? $this->ignore_empty : false;\n }",
"function checkIsEmpty($value)\r\n{\r\n // Null\r\n $checkNull = is_null($value);\r\n if ($checkNull) {\r\n return $checkNull;\r\n }\r\n // Array\r\n if (is_array($value)) {\r\n return (!isset($value) || empty($value) || count($value) <= 0) || $value === null;\r\n }\r\n // String\r\n if (is_string($value)) {\r\n return (!isset($value) || trim($value) === '');\r\n }\r\n\r\n return (!isset($value)) || empty($value);\r\n}",
"public static function emptyToNull(&$value, $trim=true)\n {\n $value = $value ?? \"\";\n if ($trim) {\n $value=trim($value);\n }\n if ($value==\"\") {\n $value = null;\n }\n return $value;\n }",
"function blank($value)\n {\n if (is_null($value)) {\n return true;\n }\n if (is_string($value)) {\n return trim($value) === '';\n }\n if (is_numeric($value) || is_bool($value)) {\n return false;\n }\n if ($value instanceof Countable) {\n return count($value) === 0;\n }\n return empty($value);\n }",
"public function isEmpty() {\n \n return $this->_value ? FALSE : TRUE;\n }",
"function createNulls(&$array)\n{\n foreach ($array as &$element) {\n if (is_array($element)) {\n createNulls($element);\n } //is_array($element)\n if (empty($element) || ($element == ' ')) {\n $element = NULL;\n } //empty($element)\n } //$array as &$element\n unset($element);\n}",
"function isEmpty($options = array()){\n\t\tif(is_null($options) || is_a($options,\"Region\") || is_numeric($options)){\n\t\t\t$options = array(\"region\" => $options);\n\t\t}\n\t\tif(!is_array($options)){\n\t\t\t$options = array(\"consider_visibility\" => $options);\n\t\t}\n\t\t$options += array(\n\t\t\t\"consider_visibility\" => true,\n\t\t\t\"region\" => null,\n\t\t);\n\t\treturn sizeof($options[\"consider_visibility\"] ? $this->getVisibleLinkListItems($options[\"region\"]) : $this->getLinkListItems($options[\"region\"]))==0;\n\t}",
"public function isEmpty()\n {\n \t$empty = $this->getHousingCount() == 0;\n \t$empty = $empty && is_null($this->getHousingDescription());\n \t$empty = $empty && $this->getOtherCount() == 0;\n \t$empty = $empty && is_null($this->getOtherDescription());\n \t$empty = $empty && $this->getPhotoCount() == 0;\n \t$empty = $empty && is_null($this->getPhotoDescription());\n \t$empty = $empty && $this->getSheetCount() == 0;\n \t$empty = $empty && is_null($this->getSheetDescription());\n \t$empty = $empty && $this->getVolumeCount() == 0;\n \t$empty = $empty && is_null($this->getVolumeDescription());\n \t\t$empty = $empty && $this->getBoxCount() == 0;\n \t$empty = $empty && is_null($this->getBoxDescription());\n \t\treturn $empty;\n }",
"function est_vide($val){\r\n return empty($val);\r\n }",
"function emptystr_tonull($arr)\n {\n return array_map(function ($val) {\n if ($val === '') {\n $val = null;\n }\n\n return $val;\n }, $arr);\n }",
"public function func_concat_coalesce(array $fields) : string\n {\n if (empty($fields)) {\n return '';\n }\n return \"CONCAT_WS('', \".implode(',', $fields).')';\n }"
] | [
"0.6996738",
"0.64395374",
"0.6435617",
"0.6393643",
"0.62302077",
"0.62040013",
"0.62037736",
"0.6141909",
"0.61118096",
"0.6110162",
"0.6109612",
"0.60486203",
"0.5991668",
"0.5989255",
"0.59713304",
"0.5959974",
"0.5952991",
"0.5934893",
"0.59234565",
"0.5915025",
"0.5864501",
"0.57755923",
"0.57540107",
"0.57540107",
"0.57540107",
"0.57540107",
"0.57540107",
"0.57540107",
"0.57540107",
"0.57540107",
"0.57540107",
"0.57540107",
"0.57540107",
"0.57540107",
"0.57540107",
"0.57540107",
"0.57540107",
"0.57540107",
"0.57540107",
"0.5720494",
"0.5720423",
"0.57167363",
"0.57140446",
"0.56883764",
"0.5653898",
"0.5650166",
"0.5642528",
"0.56274945",
"0.5612872",
"0.5607284",
"0.5604734",
"0.55880517",
"0.5584512",
"0.5584512",
"0.5580907",
"0.5579962",
"0.55795366",
"0.55774117",
"0.55665845",
"0.5555623",
"0.55503035",
"0.553665",
"0.55278856",
"0.5490254",
"0.5472985",
"0.5461221",
"0.5448681",
"0.5446126",
"0.54414046",
"0.5434492",
"0.54327613",
"0.5426938",
"0.54207736",
"0.54160327",
"0.5413942",
"0.5405321",
"0.5394356",
"0.5392742",
"0.538969",
"0.538507",
"0.53767985",
"0.5376691",
"0.5372174",
"0.53719735",
"0.53701985",
"0.5357357",
"0.5339345",
"0.530512",
"0.5302877",
"0.5297668",
"0.52943724",
"0.5291526",
"0.5285656",
"0.52804387",
"0.52762973",
"0.5265289",
"0.5261959",
"0.5259942",
"0.52564955",
"0.5253393"
] | 0.79544985 | 0 |
Get the next day that isn't a weekend, and increment offset by 1 | function next_day(&$offset)
{
do
{
$offset++;
}
while(
in_array(gmdate('D', gmmktime() + ($offset * 24 * 60 * 60)), array('Sat', 'Sun'))
||
in_array(gmdate('Y-m-d', gmmktime() + ($offset * 24 * 60 * 60)), $GLOBALS['config']['non-work_dates'])
);
return gmdate('Y-m-d', gmmktime() + ($offset * 24 * 60 * 60));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function next_weekday($weekday) {\n global $week_names;\n $date = new DateTime();\n $i = (int)$date->format(\"w\"); // 0=Sunday\n $j = array_search($weekday, $week_names); // 0=Monday\n $diff = (($j+1) - $i + 7); // days til next $weekday [0..6]\n $diff = ($diff+6)%7+1; // days til next $weekday [1..7]\n $date->modify(\"+$diff days\");\n return $date;\n}",
"private function nextDay(){\n\t\t$oneDay = new \\DateInterval('P1D');\n\t\tdo {\n\t\t\t$this->curDate->add($oneDay);\n\t\t} while($this->isVocation($this->curDate));\n\t\tif($this->curDate > $this->endDate)\n\t\t\t$this->curDate = null;\n\t}",
"function nextWeek(){ return $this->_getDate(7);\t}",
"public function nextWeek() {\n $week = $this->week + 1; \n $year = $this->year;\n if($week==53){\n \n \n $firstweek = New DateTime(\"{$year}-01-01\");\n if($firstweek->format('w')!=1) $firstweek->modify(\"next monday\");\n $lastweek = $firstweek->modify('+52 weeks'); \n $test = intval($lastweek->format('Y'));\n \n \n if($year != $test){ \n $week = 1;\n $year +=1;\n }; \n\n }elseif($week>53){\n $week = 1;\n $year +=1;\n }\n return new Week($week, $year);\n }",
"protected function findNextSuitableDay(Carbon $date)\n\t{\n\t\tif($date->isWeekend() && !$this -> cup -> play_weekends)\n\t\t{\n\t\t\t// if sunday move one day in advance, otherwise move two days\n\t\t\t$date -> addWeekdays($date->dayOfWeek == 0 ? 1 : 2);\n\t\t}\n\t\t// we do not play during the week\n\t\telseif($date->isWeekday() && !$this -> cup -> play_weekdays)\n\t\t{\n\t\t\t// 1 mon - 5 fri; adds number of days depending on week day\n\t\t\t$date -> addWeekdays(5 - $date->dayOfWeek);\n\t\t}\n\t\treturn $date;\n\t}",
"public function skipWeekend()\r\n {\r\n if ($this->getDayOfWeek() == 7)\r\n {\r\n $this->addDay(1);\r\n }\r\n else if ($this->getDayOfWeek() == 6)\r\n {\r\n $this->addDay(2);\r\n }\r\n }",
"public function getNextWeek()\n {\n if ($next = $this->week + 1 > Sunny::WEEKS_PER_YEAR) {\n $next = 1;\n }\n return $next;\n }",
"function getNextDay(){\r\n $dia = Data_Calc::proxDia($this->dia, $this->mes, $this->ano, \"%Y-%m-%d\");\r\n $data = sprintf(\"%s %02d:%02d:%02d\", $dia, $this->hora, $this->minuto, $this->segundo);\r\n $newDate = new Date();\r\n $newDate->setData($data);\r\n return $newDate;\r\n }",
"public function getNextWeek($date=null){\n\t\t$dateNew = date(\"Y-m-d H:i:s\",strtotime(\"+1 week\", strtotime($date)));\n\t\treturn $dateNew;\n\t}",
"function addOneDay($currentDay)\n {\n if ( empty($currentDay) ) {\n $currentDay = date('Y-m-d');\n }\n\n $nextDate = strtotime ( '+ 1 day' , strtotime ( $currentDay ) ) ;\n $nextDate = date ( 'Y-m-d' , $nextDate );\n\n return $nextDate;\n }",
"public function getNextWeekDay($day) {\n $result = null;\n switch(strtolower($day)) {\n case Weekday::SUNDAY:\n $result = Weekday::MONDAY;\n break;\n case Weekday::MONDAY:\n $result = Weekday::TUESDAY;\n break;\n case Weekday::TUESDAY:\n $result = Weekday::WEDNESDAY;\n break;\n case Weekday::WEDNESDAY:\n $result = Weekday::THURSDAY;\n break;\n case Weekday::THURSDAY:\n $result = Weekday::FRIDAY;\n break;\n case Weekday::FRIDAY:\n $result = Weekday::SATURDAY;\n break;\n case Weekday::SATURDAY:\n $result = Weekday::SUNDAY;\n break;\n }\n return $result;\n }",
"function nextRdate2($curD, $rI, $rP, $rM, $i) { //$i=0: 1st occurrence; $i=1: next occurrence\n\tif ($rM) {\n\t\t$curM = $rM; //one specific month\n\t\t$curY = substr($curD,0,4)+$i+((substr($curD,5,2) <= $rM) ? 0 : 1);\n\t} else { //each month\n\t\t$curM = substr($curD,5,2)+$i;\n\t\t$curY = substr($curD,0,4);\n\t}\n\t$day1Ts = mktime(12,0,0,$curM,1,$curY);\n\t$dowDif = $rP - date('N',$day1Ts); //day of week difference\n\t$offset = $dowDif + 7 * $rI;\n\tif ($dowDif >= 0) { $offset -= 7; }\n\tif ($offset >= date('t',$day1Ts)) { $offset -= 7; } //'t' : number of days in the month\n\t$nxtD = date('Y-m-d', $day1Ts + (86400 * $offset));\n\treturn $nxtD;\n}",
"public function getNext() {\r\n $nextDate = $this->getStartDate();\r\n $nextDate->modify('+1 ' . $this->getMode());\r\n\r\n return $nextDate->getTimestamp();\r\n }",
"public static function getNextWeek(){\n\t\t\t$cur = DB::select('SELECT WEEKDAY((SELECT CURDATE())) as cur')[0]->cur;\n\n\t\t\t// SQL find this monday\n\t\t\t$fir = DB::select('SELECT DATE_SUB( (SELECT CURDATE()), INTERVAL ?-6 DAY) as fir', array($cur))[0]->fir;\n\t\t\t$firstDay = DB::select('SELECT UNIX_TIMESTAMP(?) as firstDay', array($fir))[0]->firstDay;\n\n\t\t\t// SQL find this sunday\n\t\t\t$lst = DB::select('SELECT DATE_SUB( (SELECT CURDATE()), INTERVAL ?-12 DAY) as lst', array($cur))[0]->lst;\n\t\t\t$lastDay = DB::select('SELECT UNIX_TIMESTAMP(?) as lastDay', array($lst))[0]->lastDay;\n\n\t\t\t// Number, String\n\t\t\treturn array(array($firstDay, $lastDay + 86399), array($fir, $lst));\n\n\t\t}",
"private static function nextRepeatDate($dt, $event) {\n switch ($event->type) {\n case JSchedEvent::TYPE_DAY:\n $dt = mktime(0, 0, 0, date(\"n\", $dt), date(\"j\", $dt) + $event->every, date(\"Y\", $dt)); \n //logit(\"dt0=\" . date(\"l, d-M-Y\", $dt));\n return $dt;\n case JSchedEvent::TYPE_WEEK:\n $dow = date(\"w\", $dt);\n for ($i = 0; $i < 7; $i++) {\n $dt = mktime(0, 0, 0, date(\"n\", $dt), date(\"j\", $dt) + 1, date(\"Y\", $dt)); // next day\n// logit(\"dt1=\" . date(\"l, d-M-Y\", $dt));\n $dow = ($dow + 1) % 7;\n if ($dow == JSchedEvent::ON_SUN) {\n $dt = mktime(0, 0, 0, date(\"n\", $dt), date(\"j\", $dt) + 7 * ($event->every - 1), date(\"Y\", $dt)); // skip (every-1) weeks\n// logit(\"dt2=\" . date(\"l, d-M-Y\", $dt));\n }\n if ($event->dowArray[$dow]) {\n return $dt;\n }\n }\n return null;\n case JSchedEvent::TYPE_MONTH:\n if ($event->by == JSchedEvent::BY_DATE) {\n \n // By date (\"15th\")\n $nextm = (date(\"n\", $dt) + $event->every - 1) % 12 + 1; // next month expected \n $dt = mktime(0, 0, 0, date(\"n\", $dt) + $event->every, date(\"j\", $dt), date(\"Y\", $dt)); \n// logit(\"dt3=\" . date(\"l, d-M-Y\", $dt));\n if (date(\"n\", $dt) > $nextm) { \n $dt = mktime(0, 0, 0, date(\"n\", $dt), 0, date(\"Y\", $dt)); // went too far, use last day of month instead\n// logit(\"dt4=\" . date(\"l, d-M-Y\", $dt)); \n }\n return $dt;\n } else {\n \n // By month day (\"4th Wednesday\")\n $week = ceil(date(\"j\", $dt) / 7);\n $dow = date(\"w\", $dt);\n if ($week == 5 || $event->by == JSchedEvent::BY_DAY_OF_LAST_WEEK) {\n $dt = mktime(0, 0, 0, date(\"n\", $dt) + $event->every + 1, 0, date(\"Y\", $dt)); // last day of next month\n// logit(\"dt5=\" . date(\"l, d-M-Y\", $dt));\n for ($i = 0; $i < 7; $i++) {\n if (date(\"w\", $dt) == $dow) {\n return $dt;\n }\n $dt = mktime(0, 0, 0, date(\"n\", $dt), date(\"j\", $dt) - 1, date(\"Y\", $dt)); // prev day\n// logit(\"dt6=\" . date(\"l, d-M-Y\", $dt));\n }\n return null;\n }\n $dt = mktime(0, 0, 0, date(\"n\", $dt) + $event->every, 1, date(\"Y\", $dt)); // next month\n// logit(\"dt6=\" . date(\"l, d-M-Y\", $dt));\n $dt = mktime(0, 0, 0, date(\"n\", $dt), (8 + ($dow - date(\"w\", $dt))) % 7, date(\"Y\", $dt)); // first dow of month\n// logit(\"dt6a=\" . date(\"l, d-M-Y\", $dt));\n// logit(\"dt7=\" . date(\"l, d-M-Y\", $dt));\n for ($i = 0; $i <= 5; $i++) {\n if (ceil(date(\"j\", $dt) / 7) == $week) {\n return $dt;\n }\n $dt = mktime(0, 0, 0, date(\"n\", $dt), date(\"j\", $dt) + 7, date(\"Y\", $dt)); // skip week \n// logit(\"dt8=\" . date(\"l, d-M-Y\", $dt));\n }\n }\n return null;\n case JSchedEvent::TYPE_YEAR:\n $dt = mktime(0, 0, 0, date(\"n\", $dt), date(\"j\", $dt), date(\"Y\", $dt) + $event->every);\n// logit(\"dt9=\" . date(\"l, d-M-Y\", $dt));\n return $dt;\n }\n }",
"function getNextWeekdia()\r\n {\r\n $dia = Data_Calc::nextWeekdia($this->dia, $this->mes, $this->ano, \"%Y-%m-%d\");\r\n $data = sprintf(\"%s %02d:%02d:%02d\", $dia, $this->hora, $this->minuto, $this->segundo);\r\n $newDate = new Date();\r\n $newDate->setData($data);\r\n return $newDate;\r\n }",
"public function get_nextday_withevents($basedate, $gid = 0)\n {\n $maxcount = 365; // Prevents too high load on DB\n $mydate = $basedate;\n while ($maxcount) {\n --$maxcount;\n $basedate = strtotime('+1 day', $basedate);\n if ($this->date_has_events(date('Y-m-d', $basedate), $gid)) {\n return $basedate;\n }\n }\n return $mydate;\n }",
"public static function nextDayNotWeekend($strDate = null, $strSimbolMath = '+')\n {\n if (is_null($strDate))\n $strDate = date('Y-m-d');\n $intTimestamp = self::convertDateToTimestamp($strDate);\n if (is_null($intTimestamp))\n return;\n while (in_array(date('N', $intTimestamp), array(6, 7))) {\n $strDate = self::addDayToDate($strDate, 1, $strSimbolMath);\n $intTimestamp = self::convertDateToTimestamp($strDate);\n }\n return $strDate;\n }",
"public function getNextDate($date=null){\n\t\t$dateNew = date(\"Y-m-d H:i:s\",strtotime(\"+1 day\", strtotime($date)));\n\t\treturn $dateNew;\n\t}",
"protected function getNextCronDay(array $definition, $force_next = FALSE) {\n $times = $this->getCronTimes($definition);\n $days = $this->getCronDays($definition);\n if ($times && $days) {\n $days_of_week = ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun'];\n\n // Check to make sure current day is supported.\n if (!in_array(strtolower(date('D')), $days) || $force_next) {\n foreach ($days_of_week as $day) {\n if (in_array($day, $days) && strtotime($day . ' this week') > time()) {\n return strtotime($day . ' this week ' . $times[0], strtotime($times[0]));\n }\n }\n // We havn't found a match which means nothing more happens this week.\n foreach ($days_of_week as $day) {\n if (in_array($day, $days)) {\n return strtotime($day . ' next week ' . $times[0], strtotime($times[0]));\n }\n }\n\n }\n }\n return NULL;\n }",
"function testRecurNextStartDay() \r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\t\t\r\n\t\t// Daily\r\n\t\t// -----------------------------------------\r\n\t\t$rp = new CRecurrencePattern($dbh);\r\n\t\t$rp->type = RECUR_DAILY;\r\n\t\t$rp->interval = 1;\r\n\t\t$rp->dateStart = \"1/1/2010\";\r\n\t\t$rp->dateEnd = \"3/1/2010\";\r\n\t\t\r\n\t\t// First instance should be today\r\n\t\t$tsNext = $rp->getNextStart();\r\n\t\t$this->assertEquals($tsNext, \"01/01/2010\");\r\n\t\t// Set today to processed, instance should be tomorrow\r\n\t\t$tsNext = $rp->getNextStart();\r\n\t\t$this->assertEquals($tsNext, \"01/02/2010\");\r\n\t\t// Change interval to skip a day - same processed to above\r\n\t\t$rp->dateProcessedTo = \"1/2/2010\";\r\n\t\t$rp->interval = 2;\r\n\t\t$tsNext = $rp->getNextStart();\r\n\t\t$this->assertEquals($tsNext, \"01/03/2010\");\r\n\r\n\t\t// Weekly\r\n\t\t// -----------------------------------------\r\n\t\t$rp = new CRecurrencePattern($dbh);\r\n\t\t$rp->type = RECUR_WEEKLY;\r\n\t\t$rp->interval = 1;\r\n\t\t$rp->dateStart = \"1/2/2011\"; // First sunday\r\n\t\t$rp->dateEnd = \"1/15/2011\";\r\n\t\t$rp->dayOfWeekMask = $rp->dayOfWeekMask | WEEKDAY_SUNDAY;\r\n\t\t$rp->dayOfWeekMask = $rp->dayOfWeekMask | WEEKDAY_WEDNESDAY;\r\n\r\n\t\t$tsNext = $rp->getNextStart();\r\n\t\t$this->assertEquals($tsNext, \"01/02/2011\"); // Sun\r\n\t\t$tsNext = $rp->getNextStart();\r\n\t\t$this->assertEquals($tsNext, \"01/05/2011\"); // Wed\r\n\t\t$tsNext = $rp->getNextStart();\r\n\t\t$this->assertEquals($tsNext, \"01/09/2011\"); // Sun\r\n\t\t$tsNext = $rp->getNextStart();\r\n\t\t$this->assertEquals($tsNext, \"01/12/2011\"); // Wed\r\n\t\t// Next should fail because it is beyond the endDate\r\n\t\t$tsNext = $rp->getNextStart();\r\n\t\t$this->assertFalse($tsNext);\r\n\r\n\t\t// Monthly\r\n\t\t// -----------------------------------------\r\n\t\t$rp = new CRecurrencePattern($dbh);\r\n\t\t$rp->type = RECUR_MONTHLY;\r\n\t\t$rp->interval = 1;\r\n\t\t$rp->dayOfMonth= 1;\r\n\t\t$rp->dateStart = \"1/1/2011\";\r\n\t\t$rp->dateEnd = \"\";\r\n\r\n\t\t// The frist of each month\r\n\t\t$tsNext = $rp->getNextStart();\r\n\t\t$this->assertEquals($tsNext, \"01/01/2011\");\r\n\t\t$tsNext = $rp->getNextStart();\r\n\t\t$this->assertEquals($tsNext, \"02/01/2011\");\r\n\t\t$tsNext = $rp->getNextStart();\r\n\t\t$this->assertEquals($tsNext, \"03/01/2011\");\r\n\r\n\t\t// Skip over non-existant dates\r\n\t\t$rp = new CRecurrencePattern($dbh);\r\n\t\t$rp->type = RECUR_MONTHLY;\r\n\t\t$rp->interval = 1;\r\n\t\t$rp->dayOfMonth= 30;\r\n\t\t$rp->dateStart = \"1/1/2011\";\r\n\t\t$rp->dateEnd = \"\";\r\n\t\t$tsNext = $rp->getNextStart();\r\n\t\t$this->assertEquals($tsNext, \"01/30/2011\");\r\n\t\t$tsNext = $rp->getNextStart();\r\n\t\t$this->assertEquals($tsNext, \"03/30/2011\"); // Should skip of ver 2/30 because does not exist\r\n\t\t$tsNext = $rp->getNextStart();\r\n\t\t$this->assertEquals($tsNext, \"04/30/2011\");\r\n\r\n\t\t// MonthlyNth (the nth weekday(s) of every month)\r\n\t\t// -----------------------------------------\r\n\t\t$rp = new CRecurrencePattern($dbh);\r\n\t\t$rp->type = RECUR_MONTHNTH;\r\n\t\t$rp->interval = 1;\r\n\t\t$rp->instance = 4; // The 4th Sunday of each month\r\n\t\t$rp->dayOfWeekMask = $rp->dayOfWeekMask | WEEKDAY_SUNDAY;\r\n\t\t$rp->dateStart = \"1/1/2011\";\r\n\t\t$rp->dateEnd = \"\";\r\n\r\n\t\t$tsNext = $rp->getNextStart();\r\n\t\t$this->assertEquals($tsNext, \"01/23/2011\"); // The 4th Sunday in January\r\n\t\t$tsNext = $rp->getNextStart();\r\n\t\t$this->assertEquals($tsNext, \"02/27/2011\"); // The 4th Sunday in February\r\n\r\n\t\t// Test last\r\n\t\t$rp = new CRecurrencePattern($dbh);\r\n\t\t$rp->type = RECUR_MONTHNTH;\r\n\t\t$rp->interval = 1;\r\n\t\t$rp->instance = 5; // The last monday of each month\r\n\t\t$rp->dayOfWeekMask = $rp->dayOfWeekMask | WEEKDAY_MONDAY;\r\n\t\t$rp->dateStart = \"1/1/2011\";\r\n\t\t$rp->dateEnd = \"\";\r\n\r\n\t\t$tsNext = $rp->getNextStart();\r\n\t\t$this->assertEquals($tsNext, \"01/31/2011\"); // The 4th Sunday in January\r\n\t\t$tsNext = $rp->getNextStart();\r\n\t\t$this->assertEquals($tsNext, \"02/28/2011\"); // The 4th Sunday in February\r\n\r\n\r\n\t\t// Yearly - on the dayofmonth/monthofyear\r\n\t\t// -----------------------------------------\r\n\t\t$rp = new CRecurrencePattern($dbh);\r\n\t\t$rp->type = RECUR_YEARLY;\r\n\t\t$rp->interval = 1;\r\n\t\t$rp->dayOfMonth = 8;\r\n\t\t$rp->monthOfYear = 10;\r\n\t\t$rp->dateStart = \"1/1/2011\";\r\n\t\t$rp->dateEnd = \"1/1/2013\";\r\n\r\n\t\t$tsNext = $rp->getNextStart();\r\n\t\t$this->assertEquals($tsNext, \"10/08/2011\");\r\n\t\t$tsNext = $rp->getNextStart();\r\n\t\t$this->assertEquals($tsNext, \"10/08/2012\");\r\n\t\t$tsNext = $rp->getNextStart();\r\n\t\t$this->assertFalse($tsNext); // Past the dateEnd\r\n\r\n\t\t// YearlyNth\r\n\t\t// -----------------------------------------\r\n\t\t$rp = new CRecurrencePattern($dbh);\r\n\t\t$rp->type = RECUR_YEARNTH;\r\n\t\t$rp->interval = 1;\r\n\t\t$rp->instance = 4; // The 4th Sunday of January\r\n\t\t$rp->dayOfWeekMask = $rp->dayOfWeekMask | WEEKDAY_SUNDAY;\r\n\t\t$rp->monthOfYear = 1;\r\n\t\t$rp->dateStart = \"1/1/2011\";\r\n\t\t$rp->dateEnd = \"1/1/2013\";\r\n\r\n\t\t$tsNext = $rp->getNextStart();\r\n\t\t$this->assertEquals($tsNext, \"01/23/2011\");\r\n\t\t$tsNext = $rp->getNextStart();\r\n\t\t$this->assertEquals($tsNext, \"01/22/2012\");\r\n\t\t$tsNext = $rp->getNextStart();\r\n\t\t$this->assertFalse($tsNext); // Past the dateEnd\r\n\t}",
"protected function getNextOccurrence($day, \\DateTime $date)\n {\n if (strtolower($date->format('l')) === strtolower($day)) {\n return $date;\n }\n\n return new \\DateTime(\"next {$day} {$date->format('c')}\");\n }",
"function find_start_of_week()\n {\n $this->move_to_start_of_day();\n $this->move_to_start_of_day();\n while ($this->get_day_of_week()>0)\n {\n $this->move_forward_n_days(-1);\n }\n }",
"public function setNextDayOfWeek($diaSemana)\r\n {\r\n $this->setDate(strtotime($this->getTimestampUnix() . ' NEXT ' . $diaSemana));\r\n return $this;\r\n }",
"public function nextDay() {\n foreach ($this->items as $i => $item) {\n ($this->items[$i] = ItemFactory::getInstance($item))->degrade();\n }\n }",
"public function next()\n {\n $this->iCurrentKey++;\n $this->strCurrentValue = strftime('%Y-%m-%d', strtotime($this->strCurrentValue . ' +1 day'));\n }",
"public static function getNextDate($date)\n {\n $date = TimezoneHelper::getDateFromString($date);\n $date->add(new DateInterval(\"P1D\"));\n return TimezoneHelper::getDateFromString($date->format('Y-m-d'));\n }",
"public function next()\n {\n if ($this->_current === null) {\n $this->_current = clone $this->_startDate;\n } else {\n $this->_current = clone $this->_current;\n $this->_current->add($this->_dateInterval);\n }\n }",
"function getDay($dayIndex)\n{\n return date('l', strtotime(\"Sunday +{$dayIndex} days\"));\n}",
"function get_next_date($this_date){\n\t$year = \"\";\n\t$month = \"\";\n\t$day = \"\";\n\tif( preg_match(\"/(\\d+)\\-(\\d+)-(\\d+)/\", $this_date, $match) ){\n\t\t$year = $match[1];\n\t\t$month = $match[2];\n\t\t$day = $match[3];\n\t};\n\t$next_date = date(\"Y-m-d\",mktime(0,0,0, $month, $day+1, $year));\n\n\treturn $next_date;\n\n}",
"function get_monday($startdate = null, $week_offset = 0) {\n if ($startdate) {\n $startdate = strtotime($startdate);\n } else {\n $startdate = time();\n }\n\n $dow = date(\"w\", $startdate);\n //print \"Today is dow $dow (Monday is 1)\\n\";\n \n // How many days ago was monday?\n $offset = ($dow -1);\n if ($offset <0) {\n $offset = 6;\n }\n //print \"Offset = $offset\\n\";\n \n if ($week_offset > 0) {\n $offset = $offset - ($week_offset * 7);\n }\n\n $monday = date(\"Y-m-d\", mktime(0,0,0,date('m', $startdate), date('d', $startdate)-$offset, date('Y', $startdate) ));\n \n //print \"Previous monday is $monday\";\n \n return $monday;\n}",
"function same_day_next_month($time)\n{\n global $_initial_weeknumber;\n\n $days_in_month = date(\"t\", $time);\n $day = date(\"d\", $time);\n $weeknumber = (int)(($day - 1) / 7) + 1;\n $temp1 = ($day + 7 * (5 - $weeknumber) <= $days_in_month);\n\n // keep month number > 12 for the test purpose in line beginning with \"days_jump = 28 +...\"\n $next_month = date(\"n\", mktime(11, 0 ,0, date(\"n\", $time), $day +35, date(\"Y\", $time))) + (date(\"n\", mktime(11, 0 ,0, date(\"n\", $time), $day +35, date(\"Y\", $time))) < date(\"n\", $time)) * 12;\n\n // prevent 2 months jumps if $time is in 5th week\n $days_jump = 28 + (($temp1 && !($next_month - date(\"n\", $time) - 1)) * 7);\n\n /* if initial week number is 5 and the new occurence month number ($time + $days_jump)\n * is not changed if we add 7 days, then we can add 7 days to $days_jump to come\n * back to the 5th week (yuh!) */\n $days_jump += 7 * (($_initial_weeknumber == 5) && (date(\"n\", mktime(11, 0 ,0, date(\"n\", $time), $day + $days_jump, date(\"Y\", $time))) == date(\"n\", mktime(11, 0 ,0, date(\"n\", $time), $day + $days_jump + 7, date(\"Y\", $time)))));\n\n return $days_jump;\n}",
"public function next()\n {\n if (empty($this->startDate) || empty($this->endDate)) {\n return false;\n }\n\n $today = DateTimeHelper::toDateTime(new DateTime('now', new DateTimeZone(Craft::$app->getTimeZone())));\n $numericValueOfToday = $today->format('w');\n $days = $this->days;\n $diff = $this->endDate->getTimestamp() - $this->startDate->getTimestamp();\n\n // This event isnt in range just yet...\n if ($today->format('Y-m-d') < $this->startDate->format('Y-m-d')) {\n return new Occurrence($this->owner, $this->startDate, $diff);\n }\n\n // if repeats find the next occurrence else return the start date\n if ($this->repeats) {\n if (!empty($this->endRepeatDate)) {\n $this->endRepeatDate->setTime($this->startDate->format('H'), $this->startDate->format('i'));\n }\n\n // if it ends at somepoint and we are passed that date, return the last occurrence\n if ($this->endRepeat !== 'never' && $today > $this->endRepeatDate) {\n return new Occurrence($this->owner, $this->endRepeatDate, $diff);\n }\n\n $occurrences = $this->getOccurrencesBetween($today, null, 1);\n\n if (count($occurrences)) {\n $nextOffer = $occurrences[0];\n\n if ($this->endRepeat !== 'never' && !empty($this->endRepeatDate)) {\n if ($nextOffer > $this->endRepeatDate) {\n return new Occurrence($this->owner, $this->endRepeatDate, $diff);\n }\n }\n\n return $nextOffer;\n }\n }\n\n return new Occurrence($this->owner, $this->startDate, $diff);\n }",
"public function calculateBonusDay()\n {\n /**\n * If we would assume that bonus day will always be on the 15th,\n * we could simply check if the first day of the month is a week day, \n * since the 1st and the 15th are always on the same weekday. However,\n * the bonus day might change in the future.\n * (usualBonusDay + indexOfFirstDay + 6) mod 7 \n * gives you the numeric representation of the 15th day of the month \n */\n $bonusDay = ($this->_bonusDay + $this->_startsOn + 6) % 7;\n if ($bonusDay == 0) {\n return $this->_bonusDay + $this->_altBonusDay;\n } else if ($bonusDay == 6) {\n return $this->_bonusDay + $this->_altBonusDay + 1;\n } else {\n return $this->_bonusDay;\n }\n }",
"public function nextEvent() {\n\t\t$events = $this->client->getGroupEvents( [\n\t\t\t'urlname' => $this->group,\n\t\t\t'scroll' => 'next_upcoming',\n\t\t] );\n\n\t\treturn $events[0];\n\t}",
"public function nextMonth(): Week{\n $week = $this->week;\n $year = $this->year;\n\n\n $begin = new DateTime(\"{$this->year}-01-01\");\n \n if ($begin->format('w')!=1) $begin->modify(\"next monday\");\n \n $dateact = $begin->modify(\"+\".($this->week-1).\" weeks\");\n\n $moisfin = $dateact->modify(\"next month\");\n\n $moisfin = intval($moisfin->format('m'));\n\n //tant que le mois 'm' ne change pas on ajoute des semaines\n do{\n $begin = new DateTime(\"{$this->year}-01-01\");\n if ($begin->format('w')!=1) $begin->modify(\"next monday\");\n $dateact = $begin->modify(\"+\".($week-1).\" weeks\");\n $moisdebut = intval($dateact->format('m'));\n $week += 1;\n if($week==53){\n \n \n $firstweek = New DateTime(\"{$year}-01-01\");\n if($firstweek->format('w')!=1) $firstweek->modify(\"next monday\");\n $lastweek = $firstweek->modify('+52 weeks'); \n $test = intval($lastweek->format('Y'));\n \n \n if($year != $test){ \n $week = 1;\n $year +=1;\n }; \n \n }elseif($week>53){\n $week = 1;\n $year +=1;\n }\n\n }while ($moisdebut != $moisfin);\n\n //si le mois d'arrivé est janvier c'est qu'on a changé d'année\n\n \n $week-=1;\n\n return new Week($week, $year);\n\n }",
"function nextFileDate($y = null,$w = null)\n{\n $y = isset($y) ? $y : gmdate('Y');\n $w = isset($w) ? $w : gmdate('W');\n\n // Try to increase week\n $w = $w + 1;\n if($w>52) {\n $y = $y + 1;\n $w = 1;\n }\n\n return(\"y=$y&w=$w\");\n}",
"public static function getNextDueDate() {\n }",
"public function addDay($n)\n {\n $ts = strtotime(\"+$n day\", $this->timestamp);\n return new Date($ts, $this->timezone);\n }",
"function &GetNext( ) {\n\n if ( $this->_current < 0 ) {\n $next = new iCalDate($this->_first);\n $this->_current++;\n }\n else {\n $next = new iCalDate($this->_dates[$this->_current]);\n $this->_current++;\n\n /**\n * If we have already found some dates we may just be able to return one of those.\n */\n if ( isset($this->_dates[$this->_current]) ) {\n// dbg_error_log( \"RRule\", \" GetNext: Returning %s, (%d'th)\", $this->_dates[$this->_current]->Render(), $this->_current );\n return $this->_dates[$this->_current];\n }\n else {\n if ( isset($this->_part['COUNT']) && $this->_current >= $this->_part['COUNT'] ) // >= since _current is 0-based and COUNT is 1-based\n $this->_finished = true;\n }\n }\n\n if ( $this->_finished ) {\n $next = null;\n return $next;\n }\n\n $days = array();\n if ( isset($this->_part['WKST']) ) $next->SetWeekStart($this->_part['WKST']);\n if ( $this->_part['FREQ'] == \"MONTHLY\" ) {\n// dbg_error_log( \"RRule\", \" GetNext: Calculating more dates for MONTHLY rule\" );\n $limit = 200;\n do {\n $limit--;\n do {\n $limit--;\n if ( $this->_started ) {\n $next->AddMonths($this->_part['INTERVAL']);\n }\n else {\n $this->_started = true;\n }\n }\n while ( isset($this->_part['BYMONTH']) && $limit > 0 && ! $next->TestByMonth($this->_part['BYMONTH']) );\n\n if ( isset($this->_part['BYDAY']) ) {\n $days = $next->GetMonthByDay($this->_part['BYDAY']);\n }\n else if ( isset($this->_part['BYMONTHDAY']) ) {\n $days = $next->GetMonthByMonthDay($this->_part['BYMONTHDAY']);\n }\n else\n $days[$next->_dd] = $next->_dd;\n\n if ( isset($this->_part['BYSETPOS']) ) {\n $days = $next->ApplyBySetpos($this->_part['BYSETPOS'], $days);\n }\n\n $days = $this->WithinScope( $next, $days);\n }\n while( $limit && count($days) < 1 && ! $this->_finished );\n// dbg_error_log( \"RRule\", \" GetNext: Found %d days for MONTHLY rule\", count($days) );\n\n }\n else if ( $this->_part['FREQ'] == \"WEEKLY\" ) {\n// dbg_error_log( \"RRule\", \" GetNext: Calculating more dates for WEEKLY rule\" );\n $limit = 200;\n do {\n $limit--;\n if ( $this->_started ) {\n $next->AddDays($this->_part['INTERVAL'] * 7);\n }\n else {\n $this->_started = true;\n }\n\n if ( isset($this->_part['BYDAY']) ) {\n $days = $next->GetWeekByDay($this->_part['BYDAY'], false );\n }\n else\n $days[$next->_dd] = $next->_dd;\n\n if ( isset($this->_part['BYSETPOS']) ) {\n $days = $next->ApplyBySetpos($this->_part['BYSETPOS'], $days);\n }\n\n $days = $this->WithinScope( $next, $days);\n }\n while( $limit && count($days) < 1 && ! $this->_finished );\n\n// dbg_error_log( \"RRule\", \" GetNext: Found %d days for WEEKLY rule\", count($days) );\n }\n else if ( $this->_part['FREQ'] == \"DAILY\" ) {\n// dbg_error_log( \"RRule\", \" GetNext: Calculating more dates for DAILY rule\" );\n $limit = 100;\n do {\n $limit--;\n if ( $this->_started ) {\n $next->AddDays($this->_part['INTERVAL']);\n }\n\n if ( isset($this->_part['BYDAY']) ) {\n $days = $next->GetWeekByDay($this->_part['BYDAY'], $this->_started );\n }\n else\n $days[$next->_dd] = $next->_dd;\n\n if ( isset($this->_part['BYSETPOS']) ) {\n $days = $next->ApplyBySetpos($this->_part['BYSETPOS'], $days);\n }\n\n $days = $this->WithinScope( $next, $days);\n $this->_started = true;\n }\n while( $limit && count($days) < 1 && ! $this->_finished );\n\n// dbg_error_log( \"RRule\", \" GetNext: Found %d days for DAILY rule\", count($days) );\n }\n\n $ptr = $this->_current;\n foreach( $days AS $k => $v ) {\n $this->_dates[$ptr++] = $v;\n }\n\n if ( isset($this->_dates[$this->_current]) ) {\n// dbg_error_log( \"RRule\", \" GetNext: Returning %s, (%d'th)\", $this->_dates[$this->_current]->Render(), $this->_current );\n return $this->_dates[$this->_current];\n }\n else {\n// dbg_error_log( \"RRule\", \" GetNext: Returning null date\" );\n $next = null;\n return $next;\n }\n }",
"public function setNearday(){\n\t\n\t$this_month_day=$this->getMonth_day();\n\t\n\tif($this->day!=1 && $this->day!=$this_month_day){\n\t\t\n\t\t$this->predate=$this->makeDate($this->month,$this->day-1);\n\t\t\n\t\t$this->nextdate=$this->makeDate($this->month,$this->day+1);\n\t\t\n\t\t\n\t\t\n\t}elseif($this->day==1){\n\t\t\n\t\t$pre_month=$this->month==1?12:($this->month-1);\n\t\t\n\t\t$pre_month_day=$this->getMonth_day($pre_month);\n\t\t\n\t\t$this->predate=$this->makeDate($pre_month,$pre_month_day);\n\t\t\n\t\t$this->nextdate=$this->makeDate($this->month,2);\n\t\t\n\t}else{\n\t\t\n\t\t$this->predate=$this->makeDate($this->month,$this->day-1);\n\t\t\n\t\t$next_month=$this->month==12?1:($this->month+1);\n\t\t\n\t\t$this->nextdate=$this->makeDate($next_month,1);\n\n\t\t}\n\t\t\n\treturn;\n\n\t}",
"public function getWeekDay($day)\n {\n return dt('%A', strtotime('next Monday +'.($day - 1).' days'));\n }",
"public static function getNextEvents() {\n\n $startDate = Carbon::now() -> format('Y-m-d');\n $endDate = Carbon::now() -> addWeeks(4) -> format('Y-m-d');\n\n $events = Event::all() -> where(\"date\", \">=\", $startDate)\n -> where(\"date\", \"<=\", $endDate);\n\n foreach ($events as $event) {\n $event -> date = Carbon::createFromFormat(\"Y-m-d\", $event -> date)\n -> format(\"d/m/Y\");\n }\n\n return $events;\n\n }",
"function convert_date_to_offset($month,$year,$days){\n $day = date('D',mktime(0, 0, 0, $month,1,$year));\n for ($ct = 0; $ct < sizeof($days); $ct++ ) {\n if ($day == $days[$ct]){\n return (6 + $ct); }\n else{\n } \n }\n}",
"function add_business_days_no_holidays($start_date, $business_days, $date_format) {\r\n $ts_start_date = strtotime($start_date);\r\n\r\n $weeks = floor($business_days / 5);\r\n $days1 = $business_days % 5;\r\n\r\n // Now, the end day is at a weekend?\r\n $init_day = date('N', $ts_start_date);\r\n $last_day = $init_day + $days1;\r\n $days2 = 0;\r\n if ($last_day > 5) {\r\n// $days2 = 8 - $last_day;\r\n $days2 = 2; //add two days for going over weekend??\r\n \r\n }\r\n\r\n $total_days = ( $weeks * 7 ) + ( $days1 + $days2 );\r\n\r\n return date('Y-m-d', strtotime('+' . $total_days . ' days', $ts_start_date));\r\n}",
"public static function tomorrow(): string\n {\n $d = new DateTime;\n $i = new DateInterval(\"P1D\");\n $d->add($i);\n return $d->format(\"Y-m-d\");\n }",
"public static function next($days, $date = null): string\n {\n $d = new DateTime($date ?? \"now\");\n $i = new DateInterval(\"P{$days}D\");\n $d->add($i);\n return $d->format(\"Y-m-d\");\n }",
"function CaculateWeekDay($y, $m, $d)\n\t{\n\t\tif($m == 1 || $m == 2)\n\t\t{\n\t\t\t$m += 12;\n\t\t\t$y--;\n\t\t}\n\t\t\n\t\t$week = ($d + 2 * $m + 3 * ($m + 1) / 5 + $y + $y / 4 - $y / 100 + $y / 400) % 7;\n\n\t\treturn $week + 1;\n\t}",
"public function calculateDay()\r\n {\r\n return date('N', strtotime($this->getDate())) - 1;\r\n }",
"public static function nextRaid()\n\t{\n\t\t$time = self::raidTime();\n\n\t\tif (date(\"H\") < $time) {\n\t\t\treturn self::formatDate($time, time());\n\t\t}\n\n\t\treturn self::formatDate($time, strtotime(\"+1 day\"));\n\t}",
"function Get_Next_Action_Day($application_id, Array $schedule = null)\n{\n\tif (isset($schedule) && count($schedule))\n\t{\n\t\tforeach ($schedule as $event)\n\t\t{\n\t\t\tif ($event->status == 'scheduled')\n\t\t\t{\n\t\t\t\treturn $event->date_event;\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\t$query = \"\n\t\t\tSELECT MIN(date_event) action_date\n\t\t\tFROM event_schedule\n\t\t\tWHERE application_id = {$application_id} AND event_status = 'scheduled'\n\t\t\";\n\n\t\t$db = ECash::getMasterDb();\n\t\t$result = $db->query($query);\n\n\t\tif ($row = $result->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\treturn $row['action_date'];\n\t\t}\n\t}\n\n\treturn false;\n}",
"public function advanceBusinessDay($date, $days)\n\t{\n\t\t$timestamp = strtotime($date);\n\t\t\n\t\t// Grab bank holidays\n\t\t$holidays = new Date_BankHolidays_1($timestamp);\n\t\t$date_normalizer = new Date_Normalizer_1($holidays, $timestamp);\n\t\t\n\t\t// Advance X days\n\t\tif ($days >= 0)\n\t\t{\n\t\t\t$next_timestamp = $date_normalizer->advanceBusinessDays($timestamp, $days);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$next_timestamp = $date_normalizer->rewindBusinessDays($timestamp, -$days);\n\t\t}\n\t\t\n\t\t$next_date = date('Y-m-d', $next_timestamp);\n\t\t\n\t\treturn $next_date;\n\t}",
"public static function tomorrow(DB $db)\n {\n return static::today($db)->addDay();\n }",
"function nextRdate1($curD, $rI, $rP) {\n\t$curT = mktime(12,0,0,substr($curD,5,2),substr($curD,8,2),substr($curD,0,4));\n\t$curDoM = date('j',$curT);\n\tswitch ($rP) { //period\n\tcase 1: //day\n\t\t$nxtD = date('Y-m-d',strtotime(\"+$rI days\",$curT)); break;\n\tcase 2: //week\n\t\t$nxtD = date('Y-m-d',strtotime(\"+$rI weeks\",$curT)); break;\n\tcase 3: //month\n\t\t$i = 1;\n\t\twhile(date('j',strtotime('+'.$i*$rI.' months',$curT)) != $curDoM) { $i++; } //deal with 31st\n\t\t$nxtD = date('Y-m-d',strtotime('+'.$i*$rI.' months',$curT));\n\t\tbreak;\n\tcase 4: //year\n\t\t$i = 1;\n\t\twhile(date('j',strtotime('+'.$i*$rI.' years',$curT)) != $curDoM) { $i++; } //deal with 29/02\n\t\t$nxtD = date('Y-m-d',strtotime('+'.$i*$rI.' years',$curT));\n\t\tbreak;\n\t}\n\treturn $nxtD;\n}",
"function nextDayName($Calendar, $format='long')\n {\n $days = Calendar_Util_Textual::weekdayNames($format);\n $stamp = $Calendar->nextDay('timestamp');\n $cE = $Calendar->getEngine();\n require_once 'Date/Calc.php';\n $day = Date_Calc::dayOfWeek($cE->stampToDay($stamp),\n $cE->stampToMonth($stamp), $cE->stampToYear($stamp));\n return $days[$day];\n }",
"public function next_matchday() {\r\n if ($this->raw_matches_created) {\r\n $this->error = \"No matchdays created within last action.\";\r\n return false;\r\n }\r\n elseif($this->matchdays_created) {\r\n if (isset($this->matches[$this->matchday_pointer])) {\r\n $this->matchday_pointer++;\r\n $this->match_pointer = 0;\r\n return $this->matches[$this->matchday_pointer - 1];\r\n }\r\n else\r\n return false;\r\n }\r\n else {\r\n $this->error = 'No matches created yet.';\r\n return false;\r\n }\r\n }",
"public static function firstDayOfWeek(?DateTimeInterface $date = null): static\n\t{\n\t\t$date = self::checkDate($date);\n\t\t$dayOfWeek = (int) $date->format('N');\n\n\t\tif ($dayOfWeek === 1) {\n\t\t\treturn static::from($date->format('Y-m-d'));\n\t\t}\n\n\t\treturn static::from($date->format('Y-m-d') . ' -' . ($dayOfWeek - 1) . ' day');\n\t}",
"public function getNextTriggerTimeForWeekly($scheduledDaysOfWeek, $scheduledTime) {\n\t\t$weekDays = array('0' => 'Sunday', '1' => 'Monday', '2' => 'Tuesday', '3' => 'Wednesday', '4' => 'Thursday', '5' => 'Friday', '6' => 'Saturday', '7' => 'Sunday');\n\t\t$currentTime = time();\n\t\t$currentWeekDay = date('N', $currentTime);\n\t\t$nextTime = null;\n\t\tif ($scheduledDaysOfWeek) {\n\t\t\t$scheduledDaysOfWeek = json_decode($scheduledDaysOfWeek, true);\n\t\t\tif (is_array($scheduledDaysOfWeek)) {\n\t\t\t\t// algorithm :\n\t\t\t\t//1. First sort all the weekdays(stored as 0,1,2,3 etc in db) and find the closest weekday which is greater than currentWeekDay\n\t\t\t\t//2. If found, set the next trigger date to the next weekday value in the same week.\n\t\t\t\t//3. If not found, set the trigger date to the next first value.\n\t\t\t\t$nextTriggerWeekDay = null;\n\t\t\t\tsort($scheduledDaysOfWeek);\n\t\t\t\tforeach ($scheduledDaysOfWeek as $index => $weekDay) {\n\t\t\t\t\tif ($weekDays[$weekDay-1] == $weekDays[$currentWeekDay]) { //if today is the weekday selected\n\t\t\t\t\t\t$scheduleWeekDayInTime = strtotime(date('Y-m-d', strtotime($weekDays[$currentWeekDay])) . ' ' . $scheduledTime);\n\t\t\t\t\t\tif ($currentTime < $scheduleWeekDayInTime) { //if the scheduled time is greater than current time, select today\n\t\t\t\t\t\t\t$nextTriggerWeekDay = $currentWeekDay;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t//current time greater than scheduled time, get the next weekday\n\t\t\t\t\t\t\tif (count($scheduledDaysOfWeek) == 1) { //if only one weekday selected, then get next week\n\t\t\t\t\t\t\t\t$nextTime = date('Y-m-d', strtotime('next ' . $weekDays[$weekDay-1])) . ' ' . $scheduledTime;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$nextWeekDay = $scheduledDaysOfWeek[$index + 1];\n\t\t\t\t\t\t\t\tif (empty($nextWeekDay)) { // its the last day of the week i.e. sunday\n\t\t\t\t\t\t\t\t\t$nextWeekDay = $scheduledDaysOfWeek[0];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$nextTime = date('Y-m-d', strtotime('next ' . $weekDays[$nextWeekDay-1])) . ' ' . $scheduledTime;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} elseif ($weekDay-1 > $currentWeekDay) {\n\t\t\t\t\t\t$nextTriggerWeekDay = $weekDay-1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($nextTime == null) {\n\t\t\t\t\tif (!empty($nextTriggerWeekDay)) {\n\t\t\t\t\t\t$nextTime = date('Y-m-d H:i:s', strtotime($weekDays[$nextTriggerWeekDay] . ' ' . $scheduledTime));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$nextTime = date('Y-m-d H:i:s', strtotime($weekDays[$scheduledDaysOfWeek[0]-1] . ' ' . $scheduledTime));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $nextTime;\n\t}",
"function getNextWeeksTimestamp($weeks)\n{\n return Carbon::now()->addWeeks($weeks)->toDateTimeString();\n}",
"function Get_Next_Payday($first_date, $info, $rules)\n{\n\t// Grab a list of dates from the fund_date onward. Remove dates prior to today\n\t$date_list = Get_Date_List($info, $first_date, $rules, 20);\n\n\t$date_pair = array();\n\twhile(strtotime($date_list['event'][0]) < strtotime(date('Y-m-d')))\n\t{\n\t\tarray_shift($date_list['event']);\n\t\tarray_shift($date_list['effective']);\n\t}\n\n\t$date_pair['event'] = $date_list['event'][0];\n\t$date_pair['effective'] = $date_list['effective'][0];\n\n\treturn $date_pair;\n}",
"function getWeekStart($date = null, $firstDayOfTheWeek = 'Monday') {\n\t\tif (!is_numeric($date)) {\n\t\t\t$date = strtotime($date);\n\t\t}\n\n\t\t$date = mktime(0, 0, 0, date('m', $date), date('d', $date), date('Y', $date));\n\t\t$daysMap = array(\n\t\t\t'Sunday'\n\t\t\t, 'Monday'\n\t\t\t, 'Tuesday'\n\t\t\t, 'Wednesday'\n\t\t\t, 'Thursday'\n\t\t\t, 'Friday'\n\t\t\t, 'Saturday'\n\t\t);\n\n\t\t$firstDayOfTheWeek = array_search($firstDayOfTheWeek, $daysMap);\n\t\t$offset = (date('w', $date) + 7 - $firstDayOfTheWeek) % 7;\n\t\treturn strtotime('-'.$offset.' days', $date);\n\t}",
"public function getNextBirthDay($format = null)\n {\n return Utils\\Date::convert($this->getXml()->getElementsByTagName('NextBirthDay')->item(0)->nodeValue, $format);\n }",
"public function getISOWeekNo($date) {\n return ((((date('w', strtotime($date)) - 1)%7)+7)%7);\n }",
"function firstDayOfWeek($year,$month,$day){\n global $fd;\n $dayOfWeek=date(\"w\");\n $sunday_offset=$dayOfWeek * 60 * 60 * 24;\n $fd = date(\"Y-m-d\", mktime(0,0,0,$month,$day+1,$year) - $sunday_offset);\n return $fd;\n}",
"public function next_run() {\n $interval = (int)$this->freq * 86400;\n return $this->info['last_run'] + $interval;\n }",
"function memorialDay ($yr)\n\t{\t//last mon in may\n\t\t$jd = gregorian_to_jd(5,31,$yr);\n\n\t\t$w = jd_to_weekday($jd);\n\t\t//if $w is sunday, it's the sunday FOLLOWING memorial day\n\t\tif ($w==dSUNDAY) $w = 7;\n\n\t\treturn ( $jd - ($w - dMONDAY) );\n\t}",
"function next_event() {\n include(\"connection.php\");\n try {\n $next_result = $db->query(\n \"SELECT date_time, event, description\n FROM events\n WHERE date_time >= CURDATE()\n ORDER BY date_time ASC\n LIMIT 1\"\n );\n } catch (Exception $e) {\n echo \"Unable to retrieve results\";\n exit;\n }\n\n $next = $next_result->fetchALL();\n return $next;\n}",
"function nth_weekday_jd($n, $w, $m, $yr)\n\t{\n\t\t$jd = gregorian_to_jd($m,1,$yr);\n\t\t//calculate days to first weekday (w) in month (m)\n\t\t$days = $w - jd_to_weekday($jd);\n\t\t//negative days points to previous month, increment by 7 for\n\t\tif ($days < 0) $days += 7;\n\n\t\treturn ( $jd + $days + ($n-1) * 7 );\n\t}",
"public function getNextHour($date=null){\n\t\t$dateNew = date(\"Y-m-d H:i:s\",strtotime(\"+1 hour\", strtotime($date)));\n\t\treturn $dateNew;\n\t}",
"private static function getWeekStart($date, $profile) {\n $ts = strtotime($date);\n $dow = date(\"N\", $ts);\n $ds = $profile->dowStart;\n $wl = $profile->weekLength;\n if ($dow < $ds) {\n $offset = $ds;\n } else if ($dow >= $ds + $wl) {\n $offset = ($ds + 7) - $dow;\n } else {\n $offset = $ds - $dow;\n }\n return strtotime($offset . \" day\", $ts);\n }",
"function nhymxu_weekly_cron_job() {\n\tif ( ! wp_next_scheduled( '' ) ) {\n\t\twp_schedule_event( time(), 'weekly', '' );\n\t}\n}",
"function add_day($date, $day = 1) { \n\t$date = strtotime('+' . $day . ' day', strtotime($date));\n\treturn date('Y-m-d', $date);\n}",
"function lastDayOfWeek($year,$month,$day){\n global $ld;\n $dayOfWeek=date(\"w\");\n $saturday_offset=(6-$dayOfWeek) * 60 * 60 * 24 ;\n $ld = date(\"Y-m-d\", mktime(0,0,0,$month,$day+1,$year) + $saturday_offset);\n return $ld;\n}",
"function setFirstWeekDay($daynum){\n\tif ($daynum==0) $this->startOnSun=true;\n\telse $this->startOnSun=false;\n}",
"public function calculateNextScheduledDate(int $numberOfDays) : string\n {\n $date = new DateTime();\n $date->modify(\"+{$numberOfDays} day\");\n return $date->format('Y-m-d');\n }",
"function get_day_of_week($day)\n{\n return jddayofweek($day, 1);\n}",
"function schedule_backup_next_execution ($backup_course,$backup_config,$now,$timezone) {\n\n $result = -1;\n\n //Get today's midnight GMT\n $midnight = usergetmidnight($now,$timezone);\n\n //Get today's day of week (0=Sunday...6=Saturday)\n $date = usergetdate($now,$timezone);\n $dayofweek = $date['wday'];\n\n //Get number of days (from today) to execute backups\n $scheduled_days = substr($backup_config->backup_sche_weekdays,$dayofweek).\n $backup_config->backup_sche_weekdays;\n $daysfromtoday = strpos($scheduled_days, \"1\");\n\n //If some day has been found\n if ($daysfromtoday !== false) {\n //Calculate distance\n $dist = ($daysfromtoday * 86400) + //Days distance\n ($backup_config->backup_sche_hour*3600) + //Hours distance\n ($backup_config->backup_sche_minute*60); //Minutes distance\n $result = $midnight + $dist;\n } \n\n //If that time is past, call the function recursively to obtain the next valid day\n if ($result > 0 && $result < time()) {\n $result = schedule_backup_next_execution ($backup_course,$backup_config,$now + 86400,$timezone);\n }\n\n return $result;\n}",
"public function premierdelasemaine(): DateTime{\n // Obtenir le premier jour de la premiere semaine de l'année en cours\n $begin = new DateTime(\"{$this->year}-01-01\");\n \n if ($begin->format('w')!=1) $begin->modify(\"next monday\");\n \n return $begin->modify(\"+\".($this->week-1).\" weeks\");\n }",
"public function getNext(): Carbon\n {\n return Carbon::parse(\n $this\n ->getCron()\n ->getNextRunDate(Carbon::now())\n );\n }",
"function week_number($date)\n\t\t\t\t\t\t\t\t\t\t{\t \n\t\t\t\t\t\t\t\t\t\t\treturn date(\"W\", strtotime(\"$date + 1 day\"));\n\t\t\t\t\t\t\t\t\t\t}",
"function ciniki_cron_calcNextExec($ciniki, $h, $m, $dom, $mon, $dow) {\n\n //\n // FIXME: This needs some serious work, right now it only accepts a hour and minute\n // for every day of the month\n //\n $cur_ts = date_create(NULL, timezone_open('UTC'));\n $next_exec_ts = $cur_ts;\n if( $h >= 0 && $m >= 0 && $dom == '*' && $mon == '*' && $dow == '*' ) {\n date_time_set($next_exec_ts, $h, $m);\n if( $next_exec_ts <= $cur_ts ) {\n date_modify($next_exec_ts, '+1 day');\n }\n }\n\n return array('stat'=>'ok', 'next'=>array('utc'=>date_format($next_exec_ts, 'Y-m-d H:i:s')));\n}",
"public function _getWeekBeginningDate($date) {\n\t\t$dateTime = strtotime(\"2:00 \" . $date);\n\t\tif(date('w',$dateTime) == '1') {\n\t\t\t// It's Monday, so return the same date\n\t\t\treturn $dateTime;\n\t\t} else {\n\t\t\t// return last Monday's date\n\t\t\treturn strtotime('this week last monday', $dateTime);\n\t\t}\n\t}",
"function get_start_of_week(): int\n{\n $cal = \\IntlCalendar::createInstance(null, get_locale());\n //return \\get_option('start_of_week');\n return $cal->getFirstDayOfWeek() - 1;\n}",
"public function getDayOfTheWeek();",
"public function getNextWeekCopy()\n {\n $weekNo = $this->week + 1;\n $year = $this->year;\n\n if ($weekNo > Sunny::WEEKS_PER_YEAR) {\n $weekNo = 1;\n $year++;\n }\n $clone = clone $this;\n return $clone->setWeek($weekNo, false)->setYear($year);\n }",
"public function getFirstDay(){$day = getdate(mktime(0, 0, 0, $this->getMonth(), 1, $this->getYear())); return $day['wday'];}",
"private function getNextDueDateForEvent($event, DateTimeZone $timezone)\n {\n $nextDueDate = Carbon::instance(\n (new CronExpression($event->expression))\n ->getNextRunDate(Carbon::now()->setTimezone($event->timezone))\n ->setTimezone($timezone)\n );\n\n if (! $event->isRepeatable()) {\n return $nextDueDate;\n }\n\n $previousDueDate = Carbon::instance(\n (new CronExpression($event->expression))\n ->getPreviousRunDate(Carbon::now()->setTimezone($event->timezone), allowCurrentDate: true)\n ->setTimezone($timezone)\n );\n\n $now = Carbon::now()->setTimezone($event->timezone);\n\n if (! $now->copy()->startOfMinute()->eq($previousDueDate)) {\n return $nextDueDate;\n }\n\n return $now\n ->endOfSecond()\n ->ceilSeconds($event->repeatSeconds);\n }",
"public function getNextProgressiveNumber()\n {\n $currentDate = date('Y-m-d');\n foreach ($this->invoiceDates as $number => $date) {\n if ($date > $currentDate) {\n $nextNumber = $number;\n break;\n }\n }\n if (!isset($nextNumber)) {\n $nextNumber = count($this->invoiceDates) + 1;\n }\n return $nextNumber;\n }",
"public function getNextEvent(){\n\t\t// get the events\n\t\t$events = $this->getEvents();\n\n\t\t// extract the next event that will happen\n\t\t$nextEvent = array_shift($events);\n\t\tfor ($i = 1; $i < sizeof($events); $i++){\n\t\t\t$event = array_shift($events);\n\t\t\tif($events[0]['is_approved'] == 1 && $events[0]['date'] > $nextEvent['date']){\n\t\t\t\t$nextEvent = $event;\n\t\t\t}\n\t\t}\n\n\t\treturn $nextEvent;\n\t}",
"function week_number($date)\n\t\t\t\t\t\t\t{\t \n\t\t\t\t\t\t\t\treturn date(\"W\", strtotime(\"$date + 1 day\"));\n\t\t\t\t\t\t\t}",
"function nextMonth($interval=1){ return $this->_getDate(0,$interval); }",
"function get_first_day($day_number=1, $month=false, $year=false) {\r\n $month = ($month === false) ? strftime(\"%m\"): $month;\r\n $year = ($year === false) ? strftime(\"%Y\"): $year;\r\n \r\n $first_day = 1 + ((7+$day_number - strftime(\"%w\", mktime(0,0,0,$month, 1, $year)))%7);\r\n \r\n return mktime(0,0,0,$month, $first_day, $year);\r\n }",
"function new_orders_next_subscription_ship_date( $order_date ) {\n $cal_info = cal_info(0);\n $month_names = $cal_info['months'];\n \n $date = new DateTime( $order_date );\n \n $day = intval( $date->format('d') );\n $month = intval( $date->format('m') );\n \n // if after the 1st, it ships next month\n if ( $day > 1 ) {\n $month = ($month % 12) + 1;\n }\n \n return $month_names[$month] . ' 15th';\n}",
"public function getNextTriggerTime() {\n\t\tglobal $default_timezone;\n\t\t$admin = Users::getActiveAdminUser();\n\t\t$adminTimeZone = $admin->time_zone;\n\t\t@date_default_timezone_set($adminTimeZone);\n\n\t\t$scheduleType = $this->getWFScheduleType();\n\t\t$scheduleMinute= $this->getScheduleMinute();\n\t\t$nextTime = date('Y-m-d H:i:s');\n\t\tif ($scheduleType==Workflow::$SCHEDULED_BY_MINUTE) {\n\t\t\t$nextTime=date('Y-m-d H:i:s', strtotime(\"+ $scheduleMinute minutes\"));\n\t\t}\n\n\t\tif ($scheduleType == Workflow::$SCHEDULED_HOURLY) {\n\t\t\t$nextTime = date('Y-m-d H:i:s', strtotime('+1 hour'));\n\t\t}\n\n\t\tif ($scheduleType == Workflow::$SCHEDULED_DAILY) {\n\t\t\t$nextTime = $this->getNextTriggerTimeForDaily($this->getWFScheduleTime());\n\t\t}\n\n\t\tif ($scheduleType == Workflow::$SCHEDULED_WEEKLY) {\n\t\t\t$nextTime = $this->getNextTriggerTimeForWeekly($this->getWFScheduleWeek(), $this->getWFScheduleTime());\n\t\t}\n\n\t\tif ($scheduleType == Workflow::$SCHEDULED_MONTHLY_BY_DATE) {\n\t\t\t$nextTime = $this->getNextTriggerTimeForMonthlyByDate($this->getWFScheduleDay(), $this->getWFScheduleTime());\n\t\t}\n\n\t\tif ($scheduleType == Workflow::$SCHEDULED_MONTHLY_BY_WEEKDAY) {\n\t\t\t$nextTime = $this->getNextTriggerTimeForMonthlyByWeekDay($this->getWFScheduleDay(), $this->getWFScheduleTime());\n\t\t}\n\n\t\tif ($scheduleType == Workflow::$SCHEDULED_ON_SPECIFIC_DATE || $scheduleType == Workflow::$SCHEDULED_ANNUALLY) {\n\t\t\t$nextTime = $this->getNextTriggerTimeForAnnualDates($this->getWFScheduleAnnualDates(), $this->getWFScheduleTime());\n\t\t}\n\t\t@date_default_timezone_set($default_timezone);\n\t\treturn $nextTime;\n\t}",
"function eo_get_next_occurrence($format='d-m-Y',$id=''){\n\tglobal $post, $wpdb;\n\n\tif(!isset($id) || $id=='') $id = $post->ID;\n\t\n\t//Retrieve the blog's local time and create the date part\n\t$blog_now = new DateTIme(null, eo_get_blog_timezone() );\n\t$now_date =$blog_now->format('Y-m-d');\n\t$now_time =$blog_now->format('H:i:s');\n\t\n\t$querystr =$wpdb->prepare(\"\n\t\tSELECT StartDate, StartTime\n\t\tFROM {$wpdb->eo_events}\n\t\tWHERE {$wpdb->eo_events}.post_id=%d\n\t\tAND ( \n\t\t\t({$wpdb->eo_events}.StartDate > %s) OR\n\t\t\t({$wpdb->eo_events}.StartDate = %s AND {$wpdb->eo_events}.StartTime >= %s))\n\t\tORDER BY {$wpdb->eo_events}.StartDate ASC\n\t\tLIMIT 1\",$id,$now_date,$now_date,$now_time);\n\n\t$nextoccurrence = $wpdb->get_row($querystr);\n\tif($nextoccurrence !==null){\n\t\t$date = esc_html($nextoccurrence->StartDate).' '.esc_html($nextoccurrence->StartTime);\n\t\tif(empty($date)||$date==\" \")\n\t\t\treturn false;\n\n\t\treturn eo_format_date($date,$format);\n\t}\t\t\n}",
"function easter_jd ( $year, $offset=0 ) {\n\n\t\t$FirstDig = (int)($year/100);\t//first 2 digits of year\n\t\t$Remain19 = $year % 19;\t\t\t//remainder of year / 19\n\n\t\t//calculate PFM date\n\n\t\t$temp = ( (int)(($FirstDig - 15) /2) + 202 - 11 * $Remain19);\n\n\t\tswitch ($FirstDig) {\n\t\t\tcase 21:\n\t\t\tcase 24:\n\t\t\tcase 25:\n\t\t\tcase 27:\n\t\t\tcase 28:\n\t\t\tcase 29:\n\t\t\tcase 30:\n\t\t\tcase 31:\n\t\t\tcase 32:\n\t\t\tcase 34:\n\t\t\tcase 35:\n\t\t\tcase 38:\n\t\t\t\t$temp = $temp - 1;\n\t\t\t\tbreak;\n\n\t\t\tcase 33:\n\t\t\tcase 36:\n\t\t\tcase 37:\n\t\t\tcase 39:\n\t\t\tcase 40:\n\t\t\t\t$temp = $temp - 2;\n\t\t\t\tbreak;\n\t\t}\t//end switch\n\n\t\t$temp = $temp % 30;\n\n\t\t$tA = $temp + 21;\n\t\tif ($temp == 29 ) $tA = $tA -1;\n\t\tif($temp == 28 And $Remain19 > 10) $tA = $tA - 1;\n\n\t\t//find the next Sunday\n\t\t$tB = ($tA - 19) % 7;\n\n\t\t$tC = (40 - $FirstDig) % 4;\n\t\tif ($tC == 3) $tC = $tC +1;\n\t\tif ($tC > 1) $tC = $tC +1;\n\n\t\t$temp = $year % 100;\n\t\t$tD = ($temp + ((int)($temp / 4)) ) % 7;\n\n\t\t$tE = ((20 -$tB - $tC - $tD) % 7 ) + 1;\n\t\t$da = $tA + $tE;\n\n\t\t//return the date\n\t\tif ( $da > 31 ) {\n\t\t\t$da = $da - 31;\n\t\t\t$mo = 4;\n\t\t} else {\n\t\t\t$mo = 3;\n\t\t}\n\n\t\treturn( gregorian_to_jd($mo, $da, $year) + $offset );\n\n\t}",
"public function followingHacknight()\n {\n return Event::where('starts_at', '>=', $this->ends_at)\n ->where('type', '=', Event::HACKNIGHT)\n ->first();\n }",
"function start_pointer($input)\n{\n /* set time zone */\n date_default_timezone_set('Asia/Calcutta');\n\n /* append day and month to current year */\n $date_input = $input;\n\n /* create new object of Date time and pass $input as variable */\n $dateTime = (new DateTime(rtrim($date_input)));\n\n /* setting offset of 7 days to traverse back 7 days */\n $offset = -7;\n\n $dateInterval = new DateInterval('P' . abs($offset) . 'D');\n if ($offset < 0) {\n $dateInterval->invert = 1;\n }\n\n /* append $dateInterval which go back 7 days to main datetime object */\n $dateTime->add($dateInterval);\n\n /* assign datetime object to $begin which contain 7 days back value of input data */\n $begin = $dateTime;\n\n /* assign $input data to end means value of end pointer */\n $end = new DateTime(rtrim($date_input));\n $end = $end->modify('+1 day');\n\n /* day range generator offset ITS DIFFERENT THEN BEFORE ONE */\n $interval = new DateInterval('P1D');\n\n\n $daterange = new DatePeriod($begin, $interval, $end);\n\n\n /* print or store in array */\n foreach ($daterange as $i => $date) {\n $rt_array[$i] = $date->format(\"d/m/Y\");\n }\n\n return $rt_array;\n\n}",
"public static function addDayToNow($count){\n $startDate = time();\n $date = date('Y-m-d', strtotime('+'.$count.' day', $startDate));\n return $date;\n }",
"private function nextDayShiftInfo($shiftForTheDay,$nextDay,$nextDate)\n {\n $this->outOfShiftMin = $this->todayMaxTime;\n $this->nextDayShift = $this->shiftForPunchInCheck($shiftForTheDay,$nextDay,$nextDate);\n $this->outOfShiftMax = $this->todayMinTime;\n }"
] | [
"0.7612667",
"0.68836385",
"0.678421",
"0.6588184",
"0.65747416",
"0.64728457",
"0.64715475",
"0.64234346",
"0.6367625",
"0.622929",
"0.6223433",
"0.62195903",
"0.6195394",
"0.61399776",
"0.6133045",
"0.6100721",
"0.60137105",
"0.5990598",
"0.5947617",
"0.5930861",
"0.59152484",
"0.58503884",
"0.580147",
"0.57690203",
"0.57641166",
"0.57626414",
"0.5712998",
"0.5705438",
"0.56863075",
"0.5658752",
"0.5623831",
"0.5592602",
"0.55872536",
"0.5524917",
"0.5505097",
"0.5453817",
"0.5417915",
"0.5381243",
"0.5378436",
"0.5343365",
"0.5340848",
"0.5332",
"0.53269655",
"0.53040683",
"0.5303664",
"0.5302458",
"0.5283597",
"0.5271548",
"0.5263873",
"0.5245363",
"0.5234334",
"0.5230285",
"0.5230243",
"0.52297074",
"0.5221213",
"0.52127033",
"0.5201158",
"0.5197624",
"0.5197442",
"0.5178755",
"0.5178676",
"0.51499116",
"0.51384085",
"0.5133367",
"0.51279545",
"0.51225835",
"0.5114658",
"0.5113078",
"0.51106924",
"0.5109611",
"0.51051486",
"0.5104039",
"0.5102098",
"0.5095503",
"0.50798076",
"0.50643855",
"0.50622743",
"0.50487584",
"0.50480986",
"0.50480825",
"0.50379443",
"0.5037755",
"0.5030276",
"0.5028997",
"0.50245357",
"0.50188214",
"0.5017736",
"0.50134563",
"0.50122464",
"0.50091934",
"0.49919513",
"0.4990286",
"0.49677423",
"0.49644515",
"0.4963324",
"0.49565762",
"0.49550378",
"0.4953862",
"0.49535993",
"0.49341133"
] | 0.80644 | 0 |
Create a new command instance. | public function __construct($asamblea_id)
{
parent::__construct();
$this->asamblea_id = $asamblea_id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }",
"public function createCommand()\r\n\t{\r\n\t\t$obj = new DbCommand($this,$this->dbms);\r\n\t\treturn $obj;\r\n\t}",
"public function createCommand() {\n\t\treturn new UnboxedCommand( $this );\n\t}",
"protected function createCommand($args) {\n $command = new Command();\n $command->id = ifseta($args, 'id');\n $command->name = ifseta($args, 'name');\n $command->url = ifseta($args, 'url');\n $command->description = ifseta($args, 'description');\n $command->uses = ifseta($args, 'uses');\n $command->creationDate = ifseta($args, 'creation_date');\n $command->lastUseDate = ifseta($args, 'last_use_date');\n $command->goldenEggDate = ifseta($args, 'golden_egg_date');\n return $command;\n }",
"static public function create($cmd = null, $args = null)\n {\n return new self($cmd, $args);\n }",
"public function createCommand($kernel, string $commandName = null, string $commandDescription = null): Command;",
"public function makeCommand() \n {\n if($this->CrontabCommandObject === NULL)\n {\n $this->CrontabCommandObject = new \\root\\library\\Crontab\\CrontabCommand\\CrontabCommand();\n }\n \n return $this->CrontabCommandObject;\n }",
"public function testInstantiation()\n {\n $command = new CreateRule('dummy name');\n }",
"public function command(Command $command);",
"public function __construct($command)\n {\n $this->command = $command;\n }",
"public static function create(array $data)\n {\n $command = new static();\n $command->exchangeArray($data);\n return $command;\n }",
"protected function getCreateCommand()\n {\n $command = new IndexCreateCommand();\n $command->setContainer($this->getContainer());\n\n return $command;\n }",
"public function createCommand($string = '')\n {\n return $this->createStringable($string);\n }",
"public function createCommand($type) {\r\n $command = $this->xml->createElement('command');\r\n $command->setAttribute('xsi:type', $type);\r\n $command->setAttribute('xmlns', '');\r\n $this->xmlSchema($command);\r\n return $command;\r\n }",
"public function __construct()\n {\n // We will go ahead and set the name, description, and parameters on console\n // commands just to make things a little easier on the developer. This is\n // so they don't have to all be manually specified in the constructors.\n if (isset($this->signature)) {\n $this->configureUsingFluentDefinition();\n } else {\n parent::__construct($this->name);\n }\n\n // Once we have constructed the command, we'll set the description and other\n // related properties of the command. If a signature wasn't used to build\n // the command we'll set the arguments and the options on this command.\n $this->setDescription((string) $this->description);\n\n $this->setHelp((string) $this->help);\n\n $this->setHidden($this->isHidden());\n\n if (! isset($this->signature)) {\n $this->specifyParameters();\n }\n }",
"public function make(string $name, PreprocessorInterface $preprocessor = null): CommandInterface;",
"private function _getCommandByClassName($className)\n {\n return new $className;\n }",
"public function newCommand($regex, $callable) {\n $cmd = new Command();\n $cmd->regex = $regex;\n $cmd->callable = $callable;\n return $this->addCommand($cmd);\n }",
"public static function create($commandID, ...$args)\n {\n $arguments = func_get_args();\n\n return new static(array_shift($arguments), $arguments);\n }",
"private function __construct($command = null)\n {\n $this->command = $command;\n }",
"public static function factory(string $command, string $before = '', string $after = ''): self\n {\n return new self($command, $before, $after);\n }",
"public function getCommand() {}",
"protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\ESCAPE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('tag', null, null, false))\n ->addArgument(new Argument($this->tag, null, null, true));\n\n return $command;\n }",
"public function testCanBeInstantiated()\n {\n $command = $this->createInstance();\n $this->assertInstanceOf('\\\\Dhii\\\\ShellInterop\\\\CommandInterface', $command, 'Command must be an interoperable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\ConfigurableCommandInterface', $command, 'Command must be a configurable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\MutableCommandInterface', $command, 'Command must be a mutable command');\n }",
"public function getCommand();",
"protected function createCommand($name, array $parameters = [])\n {\n return new Fluent(\n array_merge(\n compact('name'),\n $parameters)\n );\n }",
"public function testCanPassCommandStringToConstructor()\n {\n $command = new Command('/bin/ls -l');\n\n $this->assertEquals('/bin/ls -l', $command->getExecCommand());\n }",
"public function makeCommandInstanceByType(...$args): CommandInterface\n {\n $commandType = array_shift($args);\n\n switch ($commandType) {\n case self::PROGRAM_READ_MODEL_FETCH_ONE_COMMAND:\n return $this->makeFetchOneCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_COMMAND:\n return $this->makeFindCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_LITE_COMMAND:\n return $this->makeFindLiteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_TASK_COMMAND:\n return $this->makeItemCreateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_COMMAND:\n return $this->makeItemCreateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_TASK_COMMAND:\n return $this->makeItemUpdateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_COMMAND:\n return $this->makeItemUpdateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_TASK_COMMAND:\n return $this->makeItemDeleteTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_COMMAND:\n return $this->makeItemDeleteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_ADD_ID_COMMAND:\n return $this->makeItemAddIdCommand(...$args);\n\n default:\n throw new FactoryException(sprintf('Command bus for type `%s` not found!', (string) $commandType));\n }\n }",
"public function __construct($cmd)\n {\n $this->cmd = $cmd;\n }",
"public function getCommand()\n {\n }",
"public function command($class)\n {\n $runnable = $this->resolveClass($class);\n\n if ( ! $runnable instanceof Command) {\n throw new InvalidArgumentException(get_class($runnable).' must be an instance of '.Command::class.'.');\n }\n\n $command = $runnable;\n\n if ($runnable instanceof Taggable) {\n $command = new Cached($command, $this);\n }\n\n if ($runnable instanceof Transactional) {\n $command = new Transaction($command, $this, $this->makeFromContainer(ConnectionInterface::class));\n }\n\n if ($runnable instanceof Eventable) {\n $command = new Evented($command, $this);\n }\n\n return $this->newBuilder($command);\n }",
"protected function createCommandFactory(): CommandFactory\n {\n return new CommandFactory([\n 'CLOSE' => Command\\CLOSE::class,\n ]);\n }",
"public static function register() {\n\n if ( !defined( 'WP_CLI' ) || !WP_CLI ) {\n return;\n }\n \n $instance = new static;\n if(empty( $instance->namespace )) {\n throw new \\Exception(\"Command namespace not defined\", 1);\n \n }\n\t\t\\WP_CLI::add_command( $instance->namespace, $instance, $instance->args ?? null );\n\t}",
"public function addCommand($command);",
"public function add(Command $command);",
"abstract protected function getCommand();",
"public function createCommand()\r\n\t{\r\n\t\t//start the string\r\n\t\t$command = '';\r\n\t\t\r\n\t\t//add the java command or the path to java\r\n\t\t$command .= $this->java_path;\r\n\t\t\r\n\t\t//add the class path\r\n\t\t$command .= ' -cp \"'. $this->stanford_path . $this->seperator . '*\" ';\r\n\t\t\r\n\t\t//add options\r\n\t\t$options = implode(' ', $this->java_options);\r\n\t\t$command .= '-'.$options;\r\n\t\t\r\n\t\t//add the call to the pipeline object\r\n\t\t$command .= ' edu.stanford.nlp.pipeline.StanfordCoreNLP ';\r\n\r\n\t\t//add the annotators\r\n\t\t$command .= '-annotators '. $this->listAnnotators();\r\n\t\t\r\n\t\t//add the input and output directors\r\n\t\t$command .= ' -file '. $this->tmp_file . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//this is for testing purposes\r\n\t\t//$command .= ' -file '. $this->tmp_path .'\\\\nlp3F25.tmp' . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//if using regexner add this to the command string\r\n\t\tif($this->annotators['regexner'] === true)\r\n\t\t{\r\n\t\t\t$command .=' -regexner.mapping '. $this->regexner_path . $this->seperator . $this->regexner_file;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn $command;\r\n\t}",
"protected function createCommand(string $name, array $parameters = []): Fluent\n {\n return new Fluent(array_merge(compact('name'), $parameters));\n }",
"public function __construct()\n {\n parent::__construct(static::NAME, static::VERSION);\n $this->add(new DefaultCommand());\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->command_name = config(\"custom-commands.command_name\");\n\n parent::__construct($this->signature = $this->command_name);\n\n $this->commands = (array) config(\"custom-commands.commands\");\n \n $this->table = config(\"custom-commands.table\");\n\n $this->row = config(\"custom-commands.row\");\n\n $this->changeEnv = (boolean) config(\"custom-commands.change_env\");\n\n }",
"protected function createCommandFile()\n {\n $command_file_full_path = $this->command_dir_path . DIRECTORY_SEPARATOR . $this->arg->getCommandFileName();\n\n // Check if the command already exists\n if (file_exists($command_file_full_path)) {\n throw new Exception('Command already exists.');\n }\n\n // Create the file for the new command\n $command_file = fopen($command_file_full_path, 'w');\n\n // TODO: Create Script Generator to generate the PHP scripts for the new command.\n\n fclose($command_file);\n\n $this->console->getOutput()->println('File created at: ' . $command_file_full_path);\n $this->console->getOutput()->success('Command ' . $this->arg->getSignature() . ' created successfully.');\n }",
"public static function create() {}",
"public static function create() {}",
"public static function create() {}",
"public static function create(InteropContainer $container)\n {\n $middleware = $container->get('cmd.middleware');\n return new CommandBusFactory($middleware);\n }",
"private function createCli() {\n $this->cli = new Cli();\n $this->commands = $this->commandParser->getAllCommands();\n\n foreach ($this->commands as $command) {\n if ($command->isDefault()) {\n $this->cli->command(\"*\");\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n if ($command->getName() != \"\") {\n $this->cli->command($command->getName())->description($command->getDescription());\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n }\n\n\n }",
"public function testInstantiation()\n {\n $this->assertInstanceOf('Contao\\ManagerBundle\\Command\\InstallWebDirCommand', $this->command);\n }",
"public function command(string $command): self\n {\n $this->addCommands[] = $command;\n\n return $this;\n }",
"public function create() {}",
"protected function createProcess($cmd)\n {\n return new Process(explode(' ', $cmd));\n }",
"public function create(){}",
"protected function getCommandFactory(): Command\\Factory\n {\n return new Command\\RedisFactory();\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_API);\n }",
"public function testNewCommand() : void\n {\n $this->assertFalse($this->command->hasArguments());\n $this->assertEquals(\"\", $this->command->getArguments());\n }",
"protected function createCommandBuilder()\n\t{\n\t\treturn new CSqliteCommandBuilder($this);\n\t}",
"public function __construct($command, $config = [])\n {\n $this->command = $command;\n $this->_output = $this->getDefaultOutput();\n parent::__construct($config);\n }",
"public function __construct(){\n\n global $argv;\n\n if(!isset($argv[1])){\n echo 'You must supply a command!' . PHP_EOL;\n exit;\n }//if\n\n $args = $argv;\n\n $scriptName = array_shift($args);\n $method = array_shift($args);\n\n $method = explode('-',$method);\n foreach($method as $k => $v){\n if($k != 0){\n $method[$k] = ucwords($v);\n }//if\n }//foreach\n\n $method = implode('',$method);\n\n $resolved = false;\n\n if(method_exists($this,$method)){\n call_user_func(Array($this,$method), $args);\n $resolved = true;\n }//if\n else {\n foreach(static::$extendedCommands as $commandClass){\n if(method_exists($commandClass,$method)){\n call_user_func(Array($commandClass,$method), $args);\n $resolved = true;\n break;\n }//if\n }//foreach\n }//el\n\n if(!$resolved){\n echo \"`{$method}` is not a valid CLI command!\";\n }//if\n\n echo PHP_EOL;\n exit;\n\n }",
"public function forCommand($command)\n {\n $this->command = $command;\n $this->pipe = new NullPipe();\n $this->manager = new InteractiveProcessManager($this->userInteraction);\n\n return $this;\n }",
"public function __construct()\n {\n parent::__construct('pwman', '0.1.0');\n\n $getCommand = new Get();\n $this->add($getCommand);\n\n $setCommand = new Set();\n $this->add($setCommand);\n }",
"public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }",
"public function createCommand(?string $sql = null, array $params = []): Command;",
"public function __construct($command = NULL, $name = NULL)\n {\n $args = func_get_args();\n\n switch ($command) {\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n case self::CONSTR_CMD_POP_FROM_ARR:\n case self::CONSTR_CMD_POP_FROM_OBJ:\n case self::CONSTR_CMD_POP_FROM_DB:\n case self::CONSTR_CMD_NEW:\n $this->setup_name = $name;\n\n # shift off known args\n array_shift($args);\n array_shift($args);\n break;\n }\n\n switch ($command) {\n case self::CONSTR_CMD_POP_FROM_ARR:\n $this->applyArray($args[0]);\n break;\n case self::CONSTR_CMD_POP_FROM_OBJ:\n break;\n case self::CONSTR_CMD_POP_FROM_DB:\n break;\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n $this->applyArray($args[0]);\n $this->setAllLoaded();\n break;\n default:\n throw new OrmInputException('Guessing not supported, please explicitly specify construction type');\n self::constructGuess($args);\n }\n\n $this->ensureObjectInDb();\n }",
"public function generateCommands();",
"protected function newInstanceCommand($commandClass)\n {\n $class = new ReflectionClass($commandClass);\n\n return $class->newInstanceArgs($this->resolveCommandParameters($class));\n }",
"protected function buildCommand()\n {\n return $this->command;\n }",
"public function makeItemCreateCommand(string $processUuid, array $item): ItemCreateCommand\n {\n $processUuid = ProcessUuid::fromNative($processUuid);\n $uuid = Uuid::fromNative(null);\n $item = Item::fromNative($item);\n\n return new ItemCreateCommand($processUuid, $uuid, $item);\n }",
"public function __construct($commandName, $args = [], $description = '') {\n if (!$this->setName($commandName)) {\n $this->setName('--new-command');\n }\n $this->addArgs($args);\n\n if (!$this->setDescription($description)) {\n $this->setDescription('<NO DESCRIPTION>');\n }\n }",
"public function getCommand($name, array $args = array())\n {\n return parent::getCommand($name, $args)\n ->setRequestSerializer(RequestSerializer::getInstance());\n }",
"protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\DONT_ADD_SPACE_BEFORE_VALUE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('rev-parse'))\n ->addArgument(new Argument('HEAD'));\n\n return $command;\n }",
"protected function instantiateCommand(Request $request, $args)\n {\n $command = new DeletePackageCustomerCommand($args);\n\n $requestBody = $request->getParsedBody();\n\n $this->setCommandFields($command, $requestBody);\n\n return $command;\n }",
"public function createCommand($sql = null, $params = [])\n {\n $command = new Command([\n 'db' => $this,\n 'sql' => $sql,\n ]);\n\n return $command->bindValues($params);\n }",
"protected function setCommand($value) {\n\t\t$this->_command = trim($value);\n\t\treturn $this;\n\t}",
"public function setCommand($command)\n {\n $this->command = $command;\n\n return $this;\n }",
"public function buildCommand()\n {\n return parent::buildCommand();\n }",
"private function registerMakeModuleCommand()\n {\n $this->app->singleton('command.make.module', function($app) {\n return $app['Caffeinated\\Modules\\Console\\Generators\\MakeModuleCommand'];\n });\n\n $this->commands('command.make.module');\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->currentDirectory = getcwd();\n $this->baseIndentLevel = 0;\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\HelpCommand\", \"help\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\InitializePlanetCommand\", \"init\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackAndPushUniToolCommand\", \"packpushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackLightPluginCommand\", \"packlightmap\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushCommand\", \"push\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushUniverseSnapshotCommand\", \"pushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\UpdateSubscriberDependenciesCommand\", \"updsd\");\n\n }",
"public function getCommand(string $command);",
"protected function registerCommand(){\n\t\t$this->app->singleton('fakeid.command.setup', function ($app){\n\t\t\treturn new SetupCommand();\n\t\t});\n\n\t\t$this->commands('fakeid.command.setup');\n\t}",
"public function addCommand($command, $args = [], $data = [])\n {\n $item = new ScreenCommand();\n $item->screen_id = $this->id;\n $item->command = $command;\n $item->arguments = $args;\n $item->fill($data);\n $item->save();\n\n return $item;\n }",
"public function test_creating_command_from_container()\n {\n $now = new \\DateTime();\n $this->container->add('DateTime', $now);\n $command = 'Spekkionu\\DomainDispatcher\\Test\\Commands\\CommandWithConstructor';\n $result = $this->dispatcher->dispatch($command);\n $this->assertSame($now, $result);\n }",
"protected function createProcess(): Process\n {\n $command = [\n $this->settings['executable']\n ];\n\n $command[] = $this->from;\n $command[] = $this->to;\n\n // Set the margins if needed.\n if ($this->settings['marginsType'] !== self::MARGIN_TYPE_NO_MARGINS) {\n $command[] = '--marginsType=' . $this->settings['marginsType'];\n }\n\n // If we need to proxy with node we just need to prepend the $command with `node`.\n if ($this->settings['proxyWithNode']) {\n array_unshift($command, 'node');\n }\n\n // If there's no graphical environment we need to prepend the $command with `xvfb-run\n // --auto-servernum`.\n if (! $this->settings['graphicalEnvironment']) {\n array_unshift($command, '--auto-servernum');\n array_unshift($command, 'xvfb-run');\n }\n\n return new Process($command);\n }",
"private function registerCommand()\n {\n $this->app->singleton('command.shenma.push', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\Push();\n });\n\n $this->app->singleton('command.shenma.push.retry', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\PushRetry();\n });\n }",
"public function __construct(string $command, string $before = '', string $after = '')\n {\n $this->command = $command;\n $this->before = $before;\n $this->after = $after;\n }",
"public function generateCommand($singleCommandDefinition);",
"public function create() {\n }",
"public function create() {\n }",
"public function create() {\r\n }",
"public function create() {\n\n\t}",
"private function getImportCommand()\n {\n return new IndexImportCommand(self::getContainer());\n }",
"public function __construct($command)\n {\n $this->command = $command;\n\n $this->command->line('Installing Images: <info>✔</info>');\n }",
"public function __construct()\n {\n self::$instance =& $this;\n\n $commanddir = Config::main('directory');\n $excludes = Config::main('exclude');\n\n if(is_null($commanddir))\n die('Could not find commands directory. It should be specified in the main config.');\n\n //The directory where commands reside should be relative\n //to the directory with the clip executable.\n $dir = realpath(__DIR__.\"/{$commanddir}\");\n\n $cmdfiles = scandir($dir);\n //Loop through each file in the commands directory\n foreach($cmdfiles as $file)\n {\n //Assume that each file uses the standard '.php' file extension.\n $command = substr($file, 0, -4);\n\n //Ignore the unnecessary directories as commands and anything that\n //has been marked for exclusion then attempt to include the valid ones.\n if($file !== '.' && $file !== '..' && array_search($command, $excludes) === false && include(\"{$dir}/{$file}\"))\n {\n if(class_exists($command, false))\n {\n $obj = new $command;\n //Only load commands that use the clip command interface\n if($obj instanceof Command)\n $this->commands[strtolower($command)] = $obj;\n }\n }\n }\n }",
"public function __construct($action, $command = null) {\n parent::__construct($action, self::NAME);\n\n $fieldFactory = FieldFactory::getInstance();\n\n $commandField = $fieldFactory->createField(FieldFactory::TYPE_STRING, self::FIELD_COMMAND, $command);\n\n $this->addField($commandField);\n }",
"public function createCommand($db = null, $action = 'get')\n {\n if ($db === null) {\n $db = Yii::$app->get(Connection::getDriverName());\n }\n $this->addAction($action);\n $commandConfig = $db->getQueryBuilder()->build($this);\n\n return $db->createCommand($commandConfig);\n }",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();"
] | [
"0.8010746",
"0.7333379",
"0.72606754",
"0.7164165",
"0.716004",
"0.7137585",
"0.6748632",
"0.67234164",
"0.67178184",
"0.6697025",
"0.6677973",
"0.66454077",
"0.65622073",
"0.65437883",
"0.64838654",
"0.64696646",
"0.64292693",
"0.6382209",
"0.6378306",
"0.63773245",
"0.6315901",
"0.6248427",
"0.6241929",
"0.6194334",
"0.6081284",
"0.6075819",
"0.6069913",
"0.60685146",
"0.6055616",
"0.6027874",
"0.60132784",
"0.60118896",
"0.6011778",
"0.5969603",
"0.59618074",
"0.5954538",
"0.59404427",
"0.59388787",
"0.5929363",
"0.5910562",
"0.590651",
"0.589658",
"0.589658",
"0.589658",
"0.58692765",
"0.58665586",
"0.5866528",
"0.58663124",
"0.5852474",
"0.5852405",
"0.58442044",
"0.58391577",
"0.58154446",
"0.58055794",
"0.5795853",
"0.5780188",
"0.57653266",
"0.57640004",
"0.57584697",
"0.575748",
"0.5742612",
"0.5739361",
"0.5732979",
"0.572247",
"0.5701043",
"0.5686879",
"0.5685233",
"0.56819254",
"0.5675983",
"0.56670785",
"0.56606543",
"0.5659307",
"0.56567776",
"0.56534046",
"0.56343585",
"0.56290466",
"0.5626615",
"0.56255764",
"0.5608852",
"0.5608026",
"0.56063116",
"0.56026554",
"0.5599553",
"0.5599351",
"0.55640906",
"0.55640906",
"0.5561977",
"0.5559745",
"0.5555084",
"0.5551485",
"0.5544597",
"0.55397296",
"0.5529626",
"0.552908",
"0.552908",
"0.552908",
"0.552908",
"0.552908",
"0.552908",
"0.552908",
"0.552908"
] | 0.0 | -1 |
Alert For Some Unappropriate articles Very important feature..... | public function alert($prop_id, $prop_title){
// PropertyModel
$prop_model = model('PropertyModel');
// User Model
$user_model = model('UserModel');
// Session
$session = session();
// Check is user logged in
if(!$session->get('logged_in')) return redirect()->to(site_url('user'));
// Get Current Article
$current_article = $prop_model->ret_article($prop_id, $prop_title);
# Render #
return view("alert", [
'header' => view("admin/header"),
'footer' => view("admin/footer"),
'navigation' => view("navigation", [
'active_item' => 'home'
]),
'current_article' => $current_article[0],
'user_navigation' => view("user_navigation"),
'userdata' => $session->get('logged_data'),
'article' => $current_article,
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Article $article)\n {\n return 'cetet page n\\existe pas';\n }",
"public function verifArticle(){//Fonction qui s'active après qu'il y ait eu Validation\n\n //mettre les $_POST en variable.\n if (isset($_POST['nom_article'])&& !empty($_POST['nom_article'])&& isset($_POST['theme1'])&& ($_POST['theme1']!=\"choix\") && isset($_POST['contenu'])&& !empty($_POST['contenu'])){\n $this->recordArticle();\n\n } else {\n\n \t$_SESSION['nom_article']=$_POST['nom_article'];//permet de maintenir le nom de l'article en place si il y a des champs manquant\n \t$_SESSION['contenu']=$_POST['contenu'];//conserve le contenu si il y a des champs manquant\n\n\n $message='Oups, on dirait que tout les champs n’ont pas été remplis, si vous changez de page maintenant, vos données seront perdu';\n\n echo '<script type=\"text/javascript\">window.alert(\"'.$message.'\");</script>';\n\n\n \t\t}\n \t}",
"function devlyContentNotFound() {\n\t\n\t?>\n\t\n\t<article class=\" articleContainer clearfix\">\n\t\t<hgroup class=\"contentNotFound\">\n\t\t\t<h3>You appear to be lost...</h3>\n\t\t\t<h5>It's probably on us, so you can bet we're working on it.</h5>\n\t\t</hgroup>\n\t</article>\n\t\n\t<?php\n\t\n}",
"public function reject_article($request)\n {\n $this->status_id = 4;\n\n if($this->update()) {\n $message = new Article_Reject_Messages;\n $message->article_id = $this->id;\n $message->text = $request['reason'];\n if($message->save()){\n Session::flash('flash_message_text', 'Статья была успешно отклонена');\n Session::flash('flash_message_class', 'success');\n if(Auth::user()->user_type == 4) return redirect('/dashboard/administrator/moderation_list');\n return redirect('/dashboard/moderator/moderation_list');\n }\n else {\n Session::flash('flash_message_text', 'Ошибка создания сообщения');\n Session::flash('flash_message_class', 'danger');\n if(Auth::user()->user_type == 4) return redirect('/dashboard/administrator/moderation_list');\n return redirect('/dashboard/moderator/moderation_list');\n }\n\n }\n else {\n Session::flash('flash_message_text', 'Ошибка отклонения статьи');\n Session::flash('flash_message_class', 'danger');\n return back();\n }\n }",
"function _wp_posts_page_notice()\n {\n }",
"function page_articles() {\r\n \t\tglobal $admin_lang, $extern_action, $extern_sure, $extern_title, $extern_text, $extern_image, $extern_description, $extern_id, $_SERVER, $actual_user_id, $actual_user_showname;\r\n\t\t\r\n\t\tif(!isset($extern_action))\r\n\t\t\t$extern_action = '';\r\n\t\t\r\n\t\t$out = \"\\t\\t\\t<h3>\" . $admin_lang['articles'] . \"</h3><hr />\\r\\n\";\r\n\t\t\r\n\t\t//\r\n\t\t// delete the selected entrie\r\n\t\t//\r\n\t\tif($extern_action == \"delete\") {\r\n\t\t\tif(isset($extern_sure)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\tif($extern_sure == 1)\r\n\t\t\t\t\tdb_result(\"DELETE FROM \" . DB_PREFIX . \"articles WHERE article_id=\" . $extern_id);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$result = db_result(\"SELECT * FROM \" . DB_PREFIX . \"articles WHERE article_id=\" . $extern_id);\r\n\t\t\t\t$row = mysql_fetch_object($result);\r\n\t\t\t\t$out .= \"Den News Eintrag "\" . $row->article_title . \"" wirklich löschen?<br />\r\n\t\t\t<a href=\\\"admin.php?page=articles&action=delete&id=\" . $extern_id . \"&sure=1\\\" title=\\\"Wirklich Löschen\\\">ja</a> \r\n\t\t\t<a href=\\\"admin.php?page=articles\\\" title=\\\"Nicht Löschen\\\">nein</a>\";\r\n\t\t\t\r\n\t\t\t\treturn $out;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//\r\n\t\t// add a new entrie\r\n\t\t//\r\n\t\telseif($extern_action == \"new\") {\r\n\t\t\tif($extern_title != \"\" && $extern_description != \"\" && $extern_text) {\r\n\t\t\t\t$sql = \"INSERT INTO \".DB_PREFIX.\"articles\r\n\t\t\t\t\t(article_title, article_description, article_text, article_html, article_creator, article_date)\r\n\t\t\t\t\tVALUES ('$extern_title', '$extern_description', '$extern_text', '\" . convertToPreHtml($extern_text) . \"', '$actual_user_id', '\" . mktime() . \"')\";\r\n\t\t\t\tdb_result($sql);\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t//\r\n\t\t// update the selected entrie\r\n\t\t//\r\n\t\telseif($extern_action == \"update\") { \r\n\t\t\tif($extern_title != \"\" && $extern_description != \"\" && $extern_text != \"\" && $extern_id != 0) {\r\n\t\t\t\t$sql = \"UPDATE \".DB_PREFIX.\"articles SET \r\n\t\t\t\t\tarticle_title= '$extern_title', \r\n\t\t\t\t\tarticle_description= '$extern_description', \r\n\t\t\t\t\tarticle_text= '$extern_text',\r\n\t\t\t\t\tarticle_html= '\" . convertToPreHtml($extern_text) . \"',\r\n\t\t\t\t\tarticle_date= '\" . mktime() . \"' \r\n\t\t\t\t\tWHERE article_id=\".$extern_id;\r\n\t\t\t\tdb_result();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif($extern_action != \"edit\") {\r\n\t\t\t$out .= \"\\t\\t\\t<form method=\\\"post\\\" action=\\\"admin.php\\\">\r\n\t\t\t\t<input type=\\\"hidden\\\" name=\\\"page\\\" value=\\\"articles\\\" />\r\n\t\t\t\t<input type=\\\"hidden\\\" name=\\\"action\\\" value=\\\"new\\\" />\r\n\t\t\t\t<table>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Titel: <span class=\\\"info\\\">Hier den Titel des Artikels eingeben</span></td>\r\n\t\t\t\t\t\t<td><input type=\\\"text\\\" name=\\\"title\\\" maxlength=\\\"100\\\" value=\\\"\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Beschreibung: <span class=\\\"info\\\">Hier eine Zusammenfassung in einem Satz eingeben.</span></td>\r\n\t\t\t\t\t\t<td><input type=\\\"text\\\" name=\\\"description\\\" maxlength=\\\"200\\\" value=\\\"\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Text: <span class=\\\"info\\\">Hier den gesammten Text des Artikels eingeben.</span></td>\r\n\t\t\t\t\t\t<td><textarea cols=\\\"60\\\" rows=\\\"6\\\" name=\\\"text\\\"></textarea></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Eingelogt als \" . $actual_user_showname . \" </td><td><input type=\\\"submit\\\" class=\\\"button\\\" value=\\\"Senden\\\" /> <input type=\\\"reset\\\" class=\\\"button\\\" value=\\\"Zurücksetzen\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</table>\r\n\t\t\t\t<br />\r\n\t\t\t</form>\\r\\n\";\r\n\t\t}\r\n\t\t\r\n\t\tif(isset($extern_id) && $extern_action == \"edit\") {\r\n\t\t\t$sql = \"SELECT * FROM \" . DB_PREFIX . \"articles WHERE article_id=$extern_id\";\r\n\t\t\t$result = db_result($sql);\r\n\t\t\t$row = mysql_fetch_object($result);\r\n\t\t\t$out .= \"\\t\\t\\t<form method=\\\"post\\\" action=\\\"admin.php\\\">\r\n\t\t\t\t<input type=\\\"hidden\\\" name=\\\"page\\\" value=\\\"articles\\\" />\r\n\t\t\t\t<input type=\\\"hidden\\\" name=\\\"action\\\" value=\\\"update\\\" />\r\n\t\t\t\t<table>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Titel: <span class=\\\"info\\\">Hier den Titel des Artikels eingeben</span></td>\r\n\t\t\t\t\t\t<td><input type=\\\"text\\\" name=\\\"title\\\" maxlength=\\\"10\\\" value=\\\"\" . $row->article_title . \"\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Beschreibung: <span class=\\\"info\\\">Hier eine Zusammenfassung in einem Satz eingeben.</span></td>\r\n\t\t\t\t\t\t<td><input type=\\\"text\\\" name=\\\"description\\\" maxlength=\\\"60\\\" value=\\\"\" . $row->article_description . \"\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Text: <span class=\\\"info\\\">Hier den gesammten Text des Artikels eingeben.</span></td>\r\n\t\t\t\t\t\t<td><textarea cols=\\\"60\\\" rows=\\\"6\\\" name=\\\"text\\\">\" . $row->article_text . \"</textarea></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Eingelogt als \" . $actual_user_showname . \" </td><td><input type=\\\"submit\\\" class=\\\"button\\\" value=\\\"Speichern\\\" /> <input type=\\\"reset\\\" class=\\\"button\\\" value=\\\"Zurücksetzen\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</table>\r\n\t\t\t\t<br />\r\n\t\t\t</form>\\r\\n\";\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\t$out .= \"\\t\\t\\t<form method=\\\"post\\\" action=\\\"admin.php\\\">\r\n\t\t\t\t<input type=\\\"hidden\\\" name=\\\"page\\\" value=\\\"articles\\\" />\r\n\t\t\t\t<input type=\\\"hidden\\\" name=\\\"action\\\" value=\\\"update\\\" />\r\n\t\t\t\t<table>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Titel:</td>\r\n\t\t\t\t\t\t<td>Beschreibung:</td>\r\n\t\t\t\t\t\t<td>Text:</td>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['date'] . \"</td>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['creator'] . \":</td>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['actions'] . \":</td>\r\n\t\t\t\t\t</tr>\\r\\n\";\r\n\t\t//\r\n\t\t// write all news entries\r\n\t\t//\r\n\t\t$result = db_result(\"SELECT * FROM \" . DB_PREFIX . \"articles\");\r\n\t\twhile($row = mysql_fetch_object($result)) {\r\n\t\t\tif($extern_id == $row->article_id && $extern_action == \"edit\") {\t}\r\n\t\t\t//\r\n\t\t\t// show only the entrie\r\n\t\t\t//\r\n\t\t\telse {\r\n\t\t\t\t$out .= \"\\t\\t\\t\\t\\t<tr ID=\\\"dateid\" . $row->article_id . \"\\\">\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\" . $row->article_title . \"\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\" . $row->article_description . \"\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\" . $row->article_html . \"\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\" . date(\"d.m.Y\", $row->article_date) . \"\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\" . getUserByID($row->article_creator) . \"\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td colspan=\\\"2\\\">\r\n\t\t\t\t\t\t\t<a href=\\\"admin.php?page=articles&action=edit&id=\" . $row->article_id . \"#dateid\" . $row->article_id . \"\\\" title=\\\"Bearbeiten\\\">Bearbeiten</a>\r\n\t\t\t\t\t\t\t <a href=\\\"admin.php?page=articles&action=delete&id=\" . $row->article_id . \"\\\" title=\\\"Löschen\\\">Löschen</a>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\\r\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t$out .= \"\\t\\t\\t\\t</table>\r\n\t\t\t</form>\";\r\n\t\r\n\t\treturn $out;\r\n \t}",
"function showPageNotice()\n {\n // TRANS: Page notice. %s is a trustroot name.\n $this->element('p',null,sprintf(_m('%s has asked to verify your identity. Click Continue to verify your identity and login without creating a new password.'),$this->trust_root));\n }",
"public function is_article();",
"function show_admin_notice($post_id) {\n if($out = get_transient( get_current_user_id().'publisherror' ) ) {\n delete_transient( get_current_user_id().'publisherror' );\n\t\t$post = get_post($post_id);\n echo '<div class=\"updated notice notice-success\"><p>Article was saved as a Pending because you reached your limit. <a href=\"'.get_permalink($post).'\">Preview Article</a> <br>You can have a maximum of '.$out.' live articles at a time. <br>You can wait till one of you existing articles is published or move one of them into trash and publish this again.</p></div>';\n }\n}",
"function addThemengebietes(){\n\t\t$status = $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_topic_detail', array('title'=>htmlentities(t3lib_div::_POST('title'),ENT_QUOTES, 'UTF-8')));\n\t\treturn $status;\n\t}",
"function displayArticleInformation()\n {\n // query saved articles of the account\n $savedArticlesQuery = mysql_query(\"SELECT saved_article_id FROM argus_saved_articles WHERE account_id = '\".$this -> accountId.\"' AND status = 'SAVED'\") or die(mysql_error());\n \n // query deleted articles of the account\n $deletedArticlesQuery = mysql_query(\"SELECT saved_article_id FROM argus_saved_articles WHERE account_id = '\".$this -> accountId.\"' AND status = 'DELETED'\") or die(mysql_error());\n \n // calculate the number of articles\n $savedArticlesCount = mysql_num_rows($savedArticlesQuery);\n $deletedArticlesCount = mysql_num_rows($deletedArticlesQuery);\n $totalArticlesCount = $savedArticlesCount + $deletedArticlesCount;\n \n // display ARTICLE information\n echo \"\n <p>Article Information</p>\n <p id='box'>\n Saved Articles: \".$savedArticlesCount.\"<br />\n Trash Articles: \".$deletedArticlesCount.\"<br /><br>\n Total Articles: \".$totalArticlesCount.\"<br />\n </p>\";\n \n return;\n }",
"public function action_sportal_article()\n\t{\n\t\tglobal $context, $scripturl, $user_info, $modSettings;\n\n\t\t$article_id = !empty($_REQUEST['article']) ? $_REQUEST['article'] : 0;\n\n\t\tif (!is_int($article_id))\n\t\t{\n\t\t\t$article_id = Util::htmlspecialchars($article_id, ENT_QUOTES);\n\t\t}\n\n\t\t// Fetch and render the article\n\t\t$context['article'] = sportal_get_articles($article_id, true, true);\n\t\tif (empty($context['article']['id']))\n\t\t{\n\t\t\tthrow new Elk_Exception('error_sp_article_not_found', false);\n\t\t}\n\n\t\t$context['article']['style'] = sportal_select_style($context['article']['styles']);\n\t\t$context['article']['body'] = censor($context['article']['body']);\n\t\t$context['article']['body'] = sportal_parse_content($context['article']['body'], $context['article']['type'], 'return');\n\n\t\t// Fetch attachments, if there are any\n\t\tif (!empty($modSettings['attachmentEnable']) && !empty($context['article']['has_attachments']))\n\t\t{\n\t\t\tloadJavascriptFile('topic.js');\n\t\t\t$context['article']['attachment'] = sportal_load_attachment_context($context['article']['id']);\n\t\t}\n\n\t\t// Set up for the comment pagination\n\t\t$total_comments = sportal_get_article_comment_count($context['article']['id']);\n\t\t$per_page = min($total_comments, !empty($modSettings['sp_articles_comments_per_page']) ? $modSettings['sp_articles_comments_per_page'] : 20);\n\t\t$start = !empty($_REQUEST['comments']) ? (int) $_REQUEST['comments'] : 0;\n\n\t\tif ($total_comments > $per_page)\n\t\t{\n\t\t\t$context['page_index'] = constructPageIndex($scripturl . '?article=' . $context['article']['article_id'] . ';comments=%1$d', $start, $total_comments, $per_page, true);\n\t\t}\n\n\t\t// Load in all the comments for the article\n\t\t$context['article']['comments'] = sportal_get_comments($context['article']['id'], $per_page, $start);\n\n\t\t// Prepare the final template details\n\t\t$context['article']['time'] = $context['article']['date'];\n\t\t$context['article']['date'] = htmlTime($context['article']['date']);\n\t\t$context['article']['can_comment'] = $context['user']['is_logged'];\n\t\t$context['article']['can_moderate'] = allowedTo('sp_admin') || allowedTo('sp_manage_articles');\n\n\t\t// Commenting, new or an update perhaps\n\t\tif ($context['article']['can_comment'] && !empty($_POST['body']))\n\t\t{\n\t\t\tcheckSession();\n\t\t\tsp_prevent_flood('spacp', false);\n\n\t\t\trequire_once(SUBSDIR . '/Post.subs.php');\n\n\t\t\t// Prep the body / comment\n\t\t\t$body = Util::htmlspecialchars(trim($_POST['body']));\n\t\t\t$preparse = PreparseCode::instance();\n\t\t\t$preparse->preparsecode($body, false);\n\n\t\t\t// Update or add a new comment\n\t\t\t$parser = ParserWrapper::instance();\n\t\t\tif (!empty($body) && trim(strip_tags($parser->parseMessage($body, false), '<img>')) !== '')\n\t\t\t{\n\t\t\t\tif (!empty($_POST['comment']))\n\t\t\t\t{\n\t\t\t\t\tlist ($comment_id, $author_id,) = sportal_fetch_article_comment((int) $_POST['comment']);\n\t\t\t\t\tif (empty($comment_id) || (!$context['article']['can_moderate'] && $user_info['id'] != $author_id))\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new Elk_Exception('error_sp_cannot_comment_modify', false);\n\t\t\t\t\t}\n\n\t\t\t\t\tsportal_modify_article_comment($comment_id, $body);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tsportal_create_article_comment($context['article']['id'], $body);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set a anchor\n\t\t\t$anchor = '#comment' . (!empty($comment_id) ? $comment_id : ($total_comments > 0 ? $total_comments - 1 : 1));\n\t\t\tredirectexit('article=' . $context['article']['article_id'] . $anchor);\n\t\t}\n\n\t\t// Prepare to edit an existing comment\n\t\tif ($context['article']['can_comment'] && !empty($_GET['modify']))\n\t\t{\n\t\t\tcheckSession('get');\n\n\t\t\tlist ($comment_id, $author_id, $body) = sportal_fetch_article_comment((int) $_GET['modify']);\n\t\t\tif (empty($comment_id) || (!$context['article']['can_moderate'] && $user_info['id'] != $author_id))\n\t\t\t{\n\t\t\t\tthrow new Elk_Exception('error_sp_cannot_comment_modify', false);\n\t\t\t}\n\n\t\t\trequire_once(SUBSDIR . '/Post.subs.php');\n\n\t\t\t$context['article']['comment'] = array(\n\t\t\t\t'id' => $comment_id,\n\t\t\t\t'body' => str_replace(array('\"', '<', '>', ' '), array('"', '<', '>', ' '), un_preparsecode($body)),\n\t\t\t);\n\t\t}\n\n\t\t// Want to delete a comment?\n\t\tif ($context['article']['can_comment'] && !empty($_GET['delete']))\n\t\t{\n\t\t\tcheckSession('get');\n\n\t\t\tif (sportal_delete_article_comment((int) $_GET['delete']) === false)\n\t\t\t{\n\t\t\t\tthrow new Elk_Exception('error_sp_cannot_comment_delete', false);\n\t\t\t}\n\n\t\t\tredirectexit('article=' . $context['article']['article_id']);\n\t\t}\n\n\t\t// Increase the article view counter\n\t\tif (empty($_SESSION['last_viewed_article']) || $_SESSION['last_viewed_article'] != $context['article']['id'])\n\t\t{\n\t\t\tsportal_increase_viewcount('article', $context['article']['id']);\n\t\t\t$_SESSION['last_viewed_article'] = $context['article']['id'];\n\t\t}\n\n\t\t// Build the breadcrumbs\n\t\t$context['linktree'] = array_merge($context['linktree'], array(\n\t\t\tarray(\n\t\t\t\t'url' => $scripturl . '?category=' . $context['article']['category']['category_id'],\n\t\t\t\t'name' => $context['article']['category']['name'],\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'url' => $scripturl . '?article=' . $context['article']['article_id'],\n\t\t\t\t'name' => $context['article']['title'],\n\t\t\t)\n\t\t));\n\n\t\t// Auto video embedding enabled?\n\t\tif (!empty($modSettings['enableVideoEmbeding']))\n\t\t{\n\t\t\taddInlineJavascript('\n\t\t\t\t$(document).ready(function() {\n\t\t\t\t\t$().linkifyvideo(oEmbedtext);\n\t\t\t\t});', true\n\t\t\t);\n\t\t}\n\n\t\t// Needed for basic Lightbox functionality\n\t\tloadJavascriptFile('topic.js', ['defer' => false]);\n\n\t\t$context['description'] = trim(preg_replace('~<[^>]+>~', ' ', $context['article']['body']));\n\t\t$context['description'] = Util::shorten_text(preg_replace('~\\s\\s+| |"|'~', ' ', $context['description']), 384, true);\n\n\t\t// Off to the template we go\n\t\t$context['page_title'] = $context['article']['title'];\n\t\t$context['sub_template'] = 'view_article';\n\t}",
"public function checkGetArticle(){\n\t\tif(isset($_GET[self::$article])){\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}",
"protected function accessDenied()\n\t{\n\t\t$this->title = \"Доступ закрыт!\";\n\t\t$this->meta_desc = \"Доступ к данной странице закрыт.\";\n\t\t$this->meta_key = \"доступ закрыт, доступ закрыт страница, доступ закрыт страница 403\";\n\n\t\t$pm = new PageMessage();\n\t\t$pm->header = \"Доступ закрыт!\";\n\t\t$pm->text = \"У Вас нет прав доступа к данной странице.\";\n\t\t$this->render($pm);\n\t}",
"public function message()\n {\n return __('The link contains a keyword that is banned.');\n }",
"function erp_importer_notices() {\n if ( ! isset( $_REQUEST['page'] ) || $_REQUEST['page'] != 'erp-tools' || ! isset( $_REQUEST['tab'] ) || $_REQUEST['tab'] != 'import' ) {\n return;\n }\n\n if ( isset( $_REQUEST['imported'] ) ) {\n if ( intval( $_REQUEST['imported'] ) == 0 ) {\n $message = __( 'Nothing to import or items are already exists.', 'erp' );\n echo \"<div class='notice error'><p>\" . esc_html( $message ) . \"</p></div>\";\n } else {\n $message = sprintf( __( '%s items successfully imported.', 'erp' ),\n number_format_i18n( sanitize_text_field( wp_unslash( $_REQUEST['imported'] ) ) )\n );\n echo \"<div class='notice updated'><p>\" . esc_html( $message ) . \"</p></div>\";\n }\n }\n}",
"private function checkData(){\n $this->datavalidator->addValidation('article_title','req',$this->text('e10'));\n $this->datavalidator->addValidation('article_title','maxlen=250',$this->text('e11'));\n $this->datavalidator->addValidation('article_prologue','req',$this->text('e12'));\n $this->datavalidator->addValidation('article_prologue','maxlen=3000',$this->text('e13'));\n $this->datavalidator->addValidation('keywords','regexp=/^[^,\\s]{3,}(,? ?[^,\\s]{3,})*$/',$this->text('e32'));\n $this->datavalidator->addValidation('keywords','maxlen=500',$this->text('e33'));\n if($this->data['layout'] != 'g' && $this->data['layout'] != 'h'){ //if article is gallery dont need content\n $this->datavalidator->addValidation('article_content','req',$this->text('e14'));\n }\n $this->datavalidator->addValidation('id_menucategory','req',$this->text('e15'));\n $this->datavalidator->addValidation('id_menucategory','numeric',$this->text('e16'));\n $this->datavalidator->addValidation('layout','req',$this->text('e17'));\n $this->datavalidator->addValidation('layout','maxlen=1',$this->text('e18'));\n if($this->languager->getLangsCount() > 1){\n $this->datavalidator->addValidation('lang','req',$this->text('e19'));\n $this->datavalidator->addValidation('lang','numeric',$this->text('e20'));\n }\n //if user cannot publish articles check publish values\n if($_SESSION[PAGE_SESSIONID]['privileges']['articles'][2] == '1') {\n $this->datavalidator->addValidation('published','req',$this->text('e21'));\n $this->datavalidator->addValidation('published','numeric',$this->text('e22'));\n $this->datavalidator->addValidation('publish_date','req',$this->text('e23'));\n }\n $this->datavalidator->addValidation('topped','req',$this->text('e24'));\n $this->datavalidator->addValidation('topped','numeric',$this->text('e25'));\n $this->datavalidator->addValidation('homepage','req',$this->text('e30'));\n $this->datavalidator->addValidation('homepage','numeric',$this->text('e31'));\n $this->datavalidator->addValidation('showsocials','req',$this->text('e26'));\n $this->datavalidator->addValidation('showsocials','numeric',$this->text('e27'));\n \n $result = $this->datavalidator->ValidateData($this->data);\n if(!$result){\n $errors = $this->datavalidator->GetErrors();\n return array('state'=>'error','data'=> reset($errors));\n }else{\n return true;\n }\n }",
"public function maybeShowNotice() {\n\t\t$transientPosts = aioseo()->transients->get( 'v3_migration_in_progress_posts' );\n\t\t$transientTerms = aioseo()->transients->get( 'v3_migration_in_progress_terms' );\n\t\tif ( ! $transientPosts && ! $transientTerms ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Disable the notice for now since it is almost unnecessary. We can come back and revisit this in the future.\n\t\t// $this->showNotice();\n\t}",
"function updateThemengebietes() {\n\t\t$status = $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_topic_detail', 'uid='.t3lib_div::_POST('uid'), array('title'=>htmlentities(t3lib_div::_POST('title'),ENT_QUOTES, 'UTF-8')));\n\t\treturn $status;\n\t}",
"function site_admin_notice()\n {\n }",
"public function modifyArticle() {\n \n $article = ArticleFormValidation::getData();\n $mod = false;\n if(!is_null($article)){\n $mod = $this->model->modify($article);\n }\n if($mod){\n $msg = 'Article updated correctly';\n }else{\n $err = 'Error updating article';\n }\n include 'views/article-form.php';\n }",
"protected function isContentCorrect() {}",
"public function admin_notices()\n {\n if (isset($_GET['wpstg_licensing']) && !empty($_GET['message'])) {\n\n $message = urldecode($_GET['message']);\n\n switch ($_GET['wpstg_licensing']) {\n case 'false':\n ?>\n <div class=\"wpstg-error\" style=\"font-weight:500;\">\n <p><?php _e('WP Staging - Can not activate license key! ', 'wp-staging');\n echo $message; ?></p>\n </div>\n <?php\n break;\n\n case 'true':\n default:\n // Put a custom success message here for when activation is successful if they way.\n ?>\n <!--\t\t\t\t<div class=\"success\">\n <p><?php echo $message; ?></p>\n </div>-->\n <?php\n break;\n }\n }\n }",
"public function no_items() {\n\t\t_e( 'No reviews avaliable.', 'woo-better-reviews' );\n\t}",
"function showFeedback(AlertMessage $alertMessage)\n{\n if (isset($alertMessage) && $alertMessage->isComplete()) {\n echo '</br><div class=\"alert alert-' . $alertMessage->getStyle() . '\" role=\"alert\">' . $alertMessage->getMessage() . '</div>';\n }\n}",
"function message_mistake_validator($content) {\n\t\techo \"<div class='alert alert-danger'>\n\t\t\t\t<strong>Aviso!</strong><br>$content\n\t\t\t</div>\";\n\t}",
"public function message()\n {\n return __('This URL is already in use');\n }",
"public static function policy_text_changed_notice()\n {\n }",
"function network_admin_notices()\n {\n }",
"function maintenance_message( ){\n\t$message = single( 'select value from ' . DB_OPTIONS . ' where category=\"configuration_page_options\" and name=\"maintenance_message\"', 'value' );\n\tif( empty( $message ) ){\n\t\tglobal $SETTINGS;\n\t\t$message = $SETTINGS[ 'site_title' ] . ' is currently undergoing maintenance. Please try again later.';\n\t}\n\terror( $message, '' );\n}",
"function affichageErreur()\n\t{\n\t}",
"function sendto_editor_fail() {\n\tswitch($_GET['error']){\n\t\tcase 'postid_empty':\n\t\t\t$msg = 'Could not get the post_id of this post (notify tech)';\n\t\t\tbreak;\n\t\tcase 'title_empty':\n\t\t\t$msg = 'Please enter a title for this post';\n\t\t\tbreak;\n\t\tcase 'fbwall_empty':\n\t\t\t$msg = 'Please select a FB wall from the dropdown list';\n\t\t\tbreak;\n\t\tcase 'slug_empty':\n\t\t\t$msg = 'Could not get the post_name of this post (notify tech)';\n\t\t\tbreak;\n\t\tcase 'image_empty':\n\t\t\t$msg = 'Please add a featured image to this post';\n\t\t\tbreak;\n\t\tcase 'permalink_empty':\n\t\t\t$msg = 'Could not create permalink to this post (notify tech)';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$msg = 'Unkown error, try clicking \"Publish\" or \"Update\" then submitting again, if problem persists notify tech';\n\t}\n\techo <<<HTML\n<div class=\"error notice\">\n\t<p>Sending email to Editor failed.</p>\n\t<p>$msg</p>\n</div>\nHTML;\n}",
"protected function reason()\n {\n }",
"public function enableAlert(DataContainer $dc)\n\t{\n\t\tif (!$this->Input->get('pid') && $this->Input->get('act') == 'edit' && $this->Input->get('id'))\n\t\t{\n\t\t\t$this->Input->setGet('pid', $this->Database->prepare(\"SELECT pid FROM tl_news WHERE id=?\")->execute($this->Input->get('id'))->pid);\n\t\t}\n\t\t\n\t\tif ($this->Input->get('act') != '' && $this->Input->get('act') != 'delete' && $this->Input->get('act') != 'paste' && $this->Database->prepare(\"SELECT newsalert FROM tl_news_archive WHERE id=?\")->execute($this->Input->get('pid'))->newsalert)\n\t\t{\n\t\t\t\t$GLOBALS['TL_DCA']['tl_news']['palettes']['default'] = str_replace('published,', 'published,newsalert,', $GLOBALS['TL_DCA']['tl_news']['palettes']['default']);\n\t\t}\n\t}",
"public function noAction(){\r\n \t\r\n \t$id = $this->getRequest()->getParam('id');\r\n \t\r\n \t$cookie = Mage::getSingleton('core/cookie');\r\n \t$cookie->set('helpful'.$id, 'nothelpful' ,time()+86400,'/');\r\n \t\r\n \t$faq = Mage::getModel('faq/faq')->load($id);\r\n \t \r\n \t$data = $faq->toArray();\r\n \t \r\n \tMage::dispatchEvent('infinity_faq_count_not_helpful', $data);\r\n \t\r\n \t$url = Mage::getUrl('faq/details/',array('id'=>$id));\r\n \t\r\n \t$this->_redirectUrl($url);\r\n \t\r\n }",
"function admin_notices()\n {\n }",
"private function termNotFound()\n {\n exit('No posts found with the search term supplied. :(');\n }",
"public function admin_editarticle($article_id) {\n\t\t$article = Articles::find($article_id);\n\t\tif ( !$article ) {\n\t\t\tcUtils::set_app_message('Không tìm thấy thông tin bài viết (1) !!!', cUtils::ERROR_MSG);\n\t\t\t\t\t\n\t\t\treturn Redirect::to('news/article/listarticle');\n\t\t}\n\t\t$article_full = ArticleDetails::find($article_id);\n\t\tif ( !$article_full ) {\n\t\t\tcUtils::set_app_message('Không tìm thấy thông tin bài viết (2) !!!', cUtils::ERROR_MSG);\n\t\t\t\t\t\n\t\t\treturn Redirect::to('news/article/listarticle');\n\t\t}\n\t\t$cats_tree = Categories::getCatListAsTree_combobox();\t\t\n\t\n\t\tif ( !$this->userinfo->is_access(array('admin_news','sua_bai_viet')) ) {\n\t\t\t# xem co phai la sua bai viet cua chinh mình khong\n\t\t\tif ( $this->userinfo->id != $article->create_user ) {\n\t\t\t\treturn View::make('403')->with('message','Không có quyền truy cập !!!');\n\t\t\t}\n\t\t}\n\t\n\t\tif ( Input::has('do_save') && $article_id > 0 ) {\n\t\t\t# xu ly update\n\t\t\t$cat_id = Input::get('cboParentCat');\n\t\t\t$title = Input::get('txtTitle');\n\t\t\t$post_content = Input::get('txtContent');\n\t\t\t$post_date = Input::get('txtNgayDang');\n\t\t\t$sticky = (Input::has('chkSticky') ? Input::get('chkSticky') : 0);\t\t\t\n\t\t\t$hot = (Input::has('chkHot') ? Input::get('chkHot') : 0);\t\t\t\n\t\t\t\n\t\t\t# validate data\n\t\t\t$is_error = false;\n\t\t\tif ( $cat_id <= 0 ) {\n\t\t\t\t$is_error = true;\n\t\t\t\tcUtils::set_app_message('Chưa chọn danh mục !!!', cUtils::ERROR_MSG);\n\t\t\t}\n\t\t\tif ( empty($title) || $title == '' ) {\n\t\t\t\t$is_error = true;\n\t\t\t\tcUtils::set_app_message('Chưa nhập tiêu đề bài viết !!!', cUtils::ERROR_MSG);\n\t\t\t}\n\t\t\tif ( empty($post_content) || $post_content == '' ) {\n\t\t\t\t$is_error = true;\n\t\t\t\tcUtils::set_app_message('Chưa nội dung bài viết !!!', cUtils::ERROR_MSG);\n\t\t\t}\n\n //$post = preg_split('/<div class=\"my_summary\" style=\"page-break-after: always\"><span style=\"display:none\"> <\\/span><\\/div>/', $post_content);\n $post = preg_split('/<div style=\"summary-break: true\"><span style=\"border-radius:0px\"> <\\/span><\\/div>/', $post_content);\n\t\t\t//$post = explode(Config::get('news.summary_break'), $post_content);\t// [0] = summary, [0]+[1] = full post\n\t\t\t/*if ( count($post) != 2 ) {\n\t\t\t\t$is_error = true;\n\t\t\t\tcUtils::set_app_message('Nội dung bài viết phải có phần tóm lượt !!!', cUtils::ERROR_MSG);\n\t\t\t}*/\n\t\t\tif ( count($post) == 1 ) {\n\t\t\t\t# ko co phan summary\n\t\t\t\tarray_splice($post, 0, 0, '');\n\t\t\t}\n\t\t\t\n\t\t\tif ( !$is_error ) {\n\t\t\t\t$post_date_array = null;\n\t\t\t\tif ( !empty($post_date) && $post_date != '' ) {\n\t\t\t\t\t$tmp = explode(' ', $post_date);\t//[0] = ngay, [1] = gio\n\t\t\t\t\t$tmp1 = explode('/', $tmp[0]);\n\t\t\t\t\tif ( count($tmp) == 2 ) {\n\t\t\t\t\t\t$tmp2 = explode(':', $tmp[1]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$post_date_array = array(\n\t\t\t\t\t\t'd' => @$tmp1[0],\n\t\t\t\t\t\t'm' => @$tmp1[1],\n\t\t\t\t\t\t'Y' => @$tmp1[2],\n\t\t\t\t\t\t'H' => @$tmp2[0],\n\t\t\t\t\t\t'i' => @$tmp2[1],\n\t\t\t\t\t\t's' => @$tmp2[2]\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t$post_date = mktime($post_date_array['H'], $post_date_array['i'], $post_date_array['s'], $post_date_array['m'], $post_date_array['d'], $post_date_array['Y']);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$post_date = time();\n\t\t\t\t}\n\n $html_tags_allow = Config::get('news.strip_tags_allow');\n\t\t\t\t\n\t\t\t\t$title = strip_tags($title);\n\t\t\t\t$summary_text = strip_tags($post[0], $html_tags_allow);\n\t\t\t\t$post_full_text = strip_tags($post_content, $html_tags_allow);\n\t\t\t\t\t\t\t\t\n\t\t\t\t$article->cat_id = $cat_id;\n\t\t\t\t$article->title = $title;\n\t\t\t\t$article->title_seo = $article->id . '-' . substr(cUtils::str_normalize($title,'-',false,true),0,190);\n\t\t\t\t$article->summary_text = $summary_text;\n\t\t\t\t$article->summary_html = $post[0];\n\t\t\t\t$article->sticky = $sticky;\n\t\t\t\t$article->post_date = $post_date;\n\t\t\t\t$article->hot = $hot;\n\t\t\t\t#$article->create_at = time();\t\t\t\t\n\t\t\t\t#$article->create_user = Session::get('userinfo')->id;\t\t\t\t\n\t\t\t\t$article->daduyet = Config::get('news.default_daduyet');\t// reset trang thai duyet\n\t\t\t\t$article->published = Config::get('news.default_published');\t// reset trang thai publish\n $article->notshowsummaryindetail = Input::get('chkNotShowSummaryInViewDetail');\n\n\t\t\t\tif ( $article->save() ) {\n\t\t\t\t\t# save detail\n\t\t\t\t\t$article_detail = ArticleDetails::find($article_id);\n\t\t\t\t\t$article_detail->article_id = $article->id;\n\t\t\t\t\t$article_detail->full_content_text = $post_full_text;\n\t\t\t\t\t$article_detail->full_content_html = $post_content;\n\t\t\t\t\t\n\t\t\t\t\tif ( $article_detail->save() ) {\n\t\t\t\t\t\tcUtils::set_app_message('Lưu bài viết thành công !!!', cUtils::SUCCESS_MSG);\n\t\t\t\t\t\n\t\t\t\t\t\t#return Redirect::to('news/article/listarticle/'.$article->cat_id);\n\t\t\t\t\t\treturn Redirect::to('news/view/'.$article->title_seo);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t# xao bai viet vua dang\n\t\t\t\t\t\t$article->delete();\n\t\t\t\t\t\t\n\t\t\t\t\t\tcUtils::set_app_message('Lỗi khi lưu bài viết !!!', cUtils::ERROR_MSG);\n\t\t\t\t\t\n\t\t\t\t\t\treturn Redirect::to('news/article/listarticle/'.$article->cat_id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcUtils::set_app_message('Lỗi khi lưu bài viết !!!', cUtils::ERROR_MSG);\n\t\t\t\t\t\n\t\t\t\t\treturn Redirect::to('news/article/listarticle/'.$article->cat_id);\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\t\t\n\t\t\n\t\treturn View::make('mod/news/admin/article_form', array(\n\t\t\t'cats_tree' => $cats_tree,\n\t\t\t'cat_id' => $article->cat_id,\n\t\t\t'articleinfo' => $article,\n\t\t\t'articleinfo_full' => $article_full\n\t\t));\n\t}",
"function errorMsgForClient()\n{\n // TELLS THE CUSTOMER ONLY WHAT HE NEEDS TO KNOW. NOT MORE. ( BOTH FOR SAFETY & ABSTRACTION)\n\n echo (\"The website is facing difficulty due to some technical issues. Our Engineers are working on it. Please come back later\");\n\n}",
"public function spamCheck()\n {\n $action = __NAMESPACE__ . '\\actions\\SpamCheck';\n\n $result = $this->actionController->executeAction($action);\n $content = ($result->getSuccess()) ?: 'Your Answer Is Incorrect';\n\n $result->setContent($content)\n ->Render();\n }",
"public function importTransticketWarning()\n {\n $screen = get_current_screen();\n $filter = (isset($_GET['filter_action'])) ? $_GET['filter_action'] : false;\n\n $optionsChecked = (get_field('import_warning', 'option') == true && get_field('transticket_daily_cron', 'option') == true) ? true : false;\n if ($screen->post_type != 'event' || $optionsChecked != true || $filter || ! current_user_can('administrator')) {\n return;\n }\n\n $latestPost = get_posts(\"post_type=event&numberposts=1&meta_key=import_client&meta_value=transticket&post_status=any\");\n if (empty($latestPost[0]) || strtotime($latestPost[0]->post_date) > strtotime('-1 week')) {\n return;\n }\n\n echo '<div class=\"notice notice-warning is-dismissible\"><p>';\n _e('Transticket have not imported any events for atleast 7 days. Please control the importer.', 'event-manager');\n echo '</p></div>';\n }",
"function warningAlert($msgText)\n\t{\n\t\t$msgWarning = \"<div class='alert alert-warning alert-dismissible fade show'>\n\t\t\t\t\t\t<button type='button' class='close' data-dismiss='alert'>×</button>\n\t\t\t\t\t\t\" . $msgText . \"\n\t\t\t\t\t\t</div>\";\n\t\treturn $msgWarning;\n\t}",
"function no_items() {\n\t\tesc_attr_e( 'No assessment results found.' );\n\t}",
"function section_text_nr_ad() {\n\t\t_e('<p>Become a part of the nrelate advertising network and earn some extra money on your blog. Click on the ADVERTISING tab of a participating nRelate product settings page.</p>','nrelate');\n}",
"public function helpfulNothelpfulArticle(){\r\n\t\t$formData\t\t\t=\tInput::all();\r\n\t\t$user_id\t\t \t= Auth::user()->id;\r\n\t\t\r\n\t\tif(!empty($formData)){\r\n\t\t\t$obj \t\t\t\t\t\t= \tnew ProjectArticleHelpfulNothelpful();\r\n\t\t\t$obj->user_id\t\t \t\t= \tAuth::user()->id;\r\n\t\t\t$obj->article_id\t\t\t= \tInput::get('article_id');\r\n\t\t\t$obj->value\t\t\t\t\t= \tInput::get('value');\r\n\t\t\t$obj->save();\r\n\t\t}\r\n\t\techo $formData['value'];\r\n\t}",
"function final_status_hook() {\n\t$missing = '';\n\tif (isset($_SESSION['exp_missing_titles']) and is_array($_SESSION['exp_missing_titles'])) {\n\t\tforeach ($_SESSION['exp_missing_titles'] as $title => $is_missing) {\n\t\t\tif (!$is_missing)\n\t\t\t\tcontinue;\n\n\t\t\t$missing .= '<li>“' . $title . \"”</li>\\n\";\n\t\t}\n\t}\n\n\tif ($missing)\n\t\treturn <<<EOM\nThe following document titles were not translated in every language.<br/>\nThey may be untranslatable:\n<ul>\n$missing</ul>\nEOM;\n\n\treturn '';\n}",
"function warning() {\n\t\t\n\t\t\tglobal $blog_id; //get the current blog id\n\t\t\t\n\t\t\tif ( ( is_multisite() && ( $blog_id != 1 || ! current_user_can( 'manage_network_options' ) ) ) || ! current_user_can( 'activate_plugins' ) ) { //only display to network admin if in multisite\n\t\t\t\treturn;\n\t\t\t}\n\t\t\n\t\t\t//if there is a warning to display\n\t\t\tif ( get_option( 'bwps_intrusion_warning' ) == 1 ) {\n\t\t\t\n\t\t\t\tif ( ! function_exists( 'bit51_filecheck_warning' ) ) {\n\t\t\t\n\t\t\t\t\tfunction bit51_filecheck_warning(){\n\t\t\t\t\n\t\t\t\t\t\tglobal $plugname;\n\t\t\t\t\t\tglobal $plughook;\n\t\t\t\t\t\tglobal $plugopts;\n\t\t\t\t\t\t$adminurl = is_multisite() ? admin_url() . 'network/' : admin_url();\n\t\t\t\t\t\n\t\t\t\t\t echo '<div class=\"error\">\n\t\t\t\t <p>' . __( 'Better WP Security has noticed a change to some files in your WordPress installation. Please review the logs to make sure your system has not been compromised.', $plughook ) . '</p> <p><input type=\"button\" class=\"button \" value=\"' . __( 'View Logs', $plughook ) . '\" onclick=\"document.location.href=\\'?bit51_view_logs=yes&_wpnonce=' . wp_create_nonce('bit51-nag') . '\\';\"> <input type=\"button\" class=\"button \" value=\"' . __('Dismiss Warning', $plughook) . '\" onclick=\"document.location.href=\\'' . $adminurl . 'admin.php?bit51_dismiss_warning=yes&_wpnonce=' . wp_create_nonce( 'bit51-nag' ) . '\\';\"></p>\n\t\t\t\t\t </div>';\n\t\t\t\t \n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//put the warning in the right spot\n\t\t\t\tif ( is_multisite() ) {\n\t\t\t\t\tadd_action( 'network_admin_notices', 'bit51_filecheck_warning' ); //register notification\n\t\t\t\t} else {\n\t\t\t\t\tadd_action( 'admin_notices', 'bit51_filecheck_warning' ); //register notification\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//if they've clicked a button hide the notice\n\t\t\tif ( ( isset( $_GET['bit51_view_logs'] ) || isset( $_GET['bit51_dismiss_warning'] ) ) && wp_verify_nonce( $_REQUEST['_wpnonce'], 'bit51-nag' ) ) {\n\t\t\t\t\n\t\t\t\t//Get the options\n\t\t\t\tif ( is_multisite() ) {\n\t\t\t\t\t\t\n\t\t\t\t\tswitch_to_blog( 1 );\n\t\t\t\t\t\t\n\t\t\t\t\tdelete_option( 'bwps_intrusion_warning' );\n\t\t\t\t\t\t\n\t\t\t\t\trestore_current_blog();\n\t\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\tdelete_option( 'bwps_intrusion_warning' );\n\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//take them back to where they started\n\t\t\t\tif ( isset( $_GET['bit51_dismiss_warning'] ) ) {\t\t\t\t\n\t\t\t\t\twp_redirect( $_SERVER['HTTP_REFERER'], 302 );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//take them to the correct logs page\n\t\t\t\tif ( isset( $_GET['bit51_view_logs'] ) ) {\n\t\t\t\t\tif ( is_multisite() ) {\n\t\t\t\t\t\twp_redirect( admin_url() . 'network/admin.php?page=better-wp-security-logs#file-change', 302 );\n\t\t\t\t\t} else {\n\t\t\t\t\t\twp_redirect( admin_url() . 'admin.php?page=better-wp-security-logs#file-change', 302 );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}",
"public function dispatch_notices () {\n\t\t$notices = array_filter(apply_filters('upfront-thx-admin_notices', array(\n\t\t\t$this->_permalink_setup_check_notice(),\n\t\t)));\n\t\tif (empty($notices)) return false;\n\t\techo '<div class=\"error\"><p>' .\n\t\t\tjoin('</p><p>', $notices) .\n\t\t'</p></div>';\n\t}",
"public function admin_notices() {\n\t\t\t$notices = wct_get_global( 'feedback' );\n\n\t\t\tif ( empty( $notices['admin_notices'] ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t?>\n\t\t\t<div class=\"update-nag\">\n\t\t\t\t<?php foreach ( $notices['admin_notices'] as $notice ) : ?>\n\t\t\t\t\t<p><?php echo $notice; ?></p>\n\t\t\t\t<?php endforeach ;?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}",
"public function showArticleAjax(): void\n {\n // On vérifie si on est logué et si on a les droits administrateur.\n if(!\\Session::isLogged() || \\Session::get('role') != 'admin') {\n \\FlashMessage::setMessage('danger', 'Vous n’avez pas les droits pour accéder à cette page, veuillez vous connecter et réessayer.');\n \\Http::redirectTo('home');\n }\n \n // On récupère tous les articles\n $articles = $this->model->selectAll(['created_at DESC']);\n\n // On inclut la table des articles\n include 'views/admin/table-article.phtml';\n }",
"public function showFailed();",
"function news_operationError( $message ) {\n \n // for now, just print error message\n echo( \"ERROR: $message\" );\n die();\n }",
"public function selectArticle()\n\t{\n\t}",
"protected function maybe_display_notices() {\n\t\t$this->display_update_notices();\n\t\t$this->display_other_notices();\n }",
"function connect_notice() {\n\t\tif ( isset( $_GET['page'] ) && 'vaultpress' == $_GET['page'] )\n\t\t\treturn;\n\n\t\t$message = sprintf(\n\t\t\t__( 'You must enter your registration key before VaultPress can back up and secure your site. <a href=\"%1$s\">Register VaultPress</a>', 'vaultpress' ),\n\t\t\tadmin_url( 'admin.php?page=vaultpress' )\n\t\t);\n\t\t$this->ui_message( $message, 'notice', __( 'VaultPress needs your attention!', 'vaultpress' ) );\n\t}",
"public function removeArticle(){\n $article = ArticleFormValidation::getDataId();\n $remove = false;\n if(!is_null($article)){\n $remove = $this->model->remove($article);\n }\n if($remove){\n $msg = \"Article successfully removed\";\n }else{\n $err = \"Error removing article\";\n }\n include 'views/article-form.php';\n }",
"public function usecases_publish(Request $request){\n $articleIdx = $request->articleIdx;\n $article = Article::where('articleIdx', $articleIdx)->get()->first();\n $new['active'] = 1 - $article->active;\n if($new['active'] == 0 && $article->top_use_case == 1){\n Session::flash('flash_success', 'Usecase cannot be Unpublish, please remove from the homepage first'); \n return \"success\"; exit;\n }\n Article::where('articleIdx', $articleIdx)->update($new);\n \n if($new['active'] == 1) {\n Session::flash('flash_success', 'Usecase has been Published successfully'); \n }else {\n Session::flash('flash_success', 'Usecase has been Unpublished successfully'); \n } \n echo \"success\";\n }",
"protected function sendNewArticle(){\n if (!empty($_POST['title'] && !empty($_POST['article']))) {\n $this->sendArticle();\n header('Location: index.php');\n }\n else {\n $this->prepareCreateArticle();\n }\n }",
"function alert_setup_steps() {\n\t\t$requires = __( 'AdControl still requires the following actions to activate:', 'adcontrol' );\n\t\t$missing = '';\n\t\tif ( ! $this->get_option( 'wordads_approved' ) ) {\n\t\t\t$notice = sprintf(\n\t\t\t\t__( 'We are still waiting for your %sapplication%s to be approved. In the mean time, feel free to %scontact us%s with any questions.', 'adcontrol' ),\n\t\t\t\t'<a href=\"https://wordads.co/signup/\" target=\"_blank\">', '</a>',\n\t\t\t\t'<a href=\"https://wordads.co/contact/\" target=\"_blank\">', '</a>'\n\t\t\t);\n\n\t\t\t$missing .= \"<li>$notice</li>\";\n\t\t}\n\n\t\tif ( ! $this->get_option( 'tos' ) ) {\n\t\t\t$notice = sprintf(\n\t\t\t\t__( 'Please accept the %sWordAds Terms of Service%s in your %sSettings%s.', 'adcontrol' ),\n\t\t\t\t\t'<a href=\"https://wordpress.com/tos-wordads/\" target=\"_blank\">', '</a>',\n\t\t\t\t\t'<a href=\"https://wordpress.com/ads/settings/' . $this->blog_id . '\" target=\"_blank\">', '</a>'\n\t\t\t);\n\n\t\t\t$missing .= \"<li>$notice</li>\";\n\t\t}\n\n\t\techo <<<HTML\n\t\t<div class=\"notice error is-dismissible\">\n\t\t\t<p>$requires</p>\n\t\t\t<ul style=\"list-style:inherit;padding-left:40px;\">\n\t\t\t\t$missing\n\t\t\t</ul>\n\t\t</div>\nHTML;\n\t}",
"function article()\n {\n $id = $this->uri->segment(3);\n $article = $this->news->article($id);\n if($article == NULL) {\n flash('success', lang('Page not found'));\n redirect('news');\n }\n\n $articles = $this->news->articles(['limit' => 10]);\n\n page($this->module.'article', compact('article', 'articles'));\n }",
"public function hUnknownAction( $action, $article )\n\t{\n\t\t// make sure we are in the right namespace.\n\t\t$ns = $article->mTitle->getNamespace();\n\t\tif ($ns != NS_FILESYSTEM) return true; // continue hook chain.\n\n\t\t// second, make sure the user has the 'reload' right.\n\t\tglobal $wgUser;\n\t\tif ( !$wgUser->isAllowed('reload') )\n\t\t\treturn true;\n\n\t\t$text = self::getFileContentsFromTitle( $article->mTitle );\n\t\t\n\t\t$article->updateArticle( $text, '', false, false );\n\t\t\n\t\treturn false;\n\t}",
"function onUnknownAction($action, $article) {\n\t\tglobal $wgOut, $wgUser, $wgTitle, $wgParser, $wgRequest;\n\t\tglobal $wgServer, $wgArticlePath, $wgScriptPath, $wgUploadPath, $wgUploadDirectory, $wgScript, $wgStylePath;\n\n\t\t// We don't do any processing unless it's zipmanual\n\t\tif ($action != 'zipmanual') {\n\t\t\treturn true;\n\t\t}\n\n\t\t$zipAllowed = false;\n\t\tPonyDocsExtension::onUserCan( $wgTitle, $wgUser, 'zipmanual', &$zipAllowed );\n\t\tif ( !$zipAllowed ) {\n\t\t\terror_log(\"WARNING [\" . __METHOD__ . \"] User attempted to perform a ZIP Export without permission.\");\n\t\t\t$defaultRedirect = str_replace( '$1', PONYDOCS_DOCUMENTATION_NAMESPACE_NAME, $wgArticlePath );\n\t\t\theader( \"Location: \" . $defaultRedirect );\n\t\t\texit;\n\t\t}\n\t\n\t\t// Get the title and make sure we're in Documentation namespace\n\t\t$title = $article->getTitle();\n\t\tif($title->getNamespace() != PONYDOCS_DOCUMENTATION_NAMESPACE_ID) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Grab parser options for the logged in user.\n\t\t$opt = ParserOptions::newFromUser($wgUser);\n\n\t\t// Any potential titles to exclude\n\t\t$exclude = array();\n\n\t\t// Determine articles to gather\n\t\t$articles = array();\n\t\t$pieces = explode(\":\", $wgTitle->__toString());\n\n\t\t// Try and get rid of the TOC portion of the title\n\t\tif (strpos($pieces[2], \"TOC\") && count($pieces) == 3) {\n\t\t\t$pieces[2] = substr($pieces[2], 0, strpos($pieces[2], \"TOC\"));\n\t\t} else if (count($pieces) != 5) {\n\t\t\t// something is wrong, let's get out of here\n\t\t\t$defaultRedirect = str_replace( '$1', PONYDOCS_DOCUMENTATION_NAMESPACE_NAME, $wgArticlePath );\n\t\t\tif (PONYDOCS_REDIRECT_DEBUG) {\n\t\t\t\terror_log(\"DEBUG [\" . __METHOD__ . \":\" . __LINE__ . \"] redirecting to $defaultRedirect\");\n\t\t\t}\n\t\t\theader( \"Location: \" . $defaultRedirect );\n\t\t\texit;\n\t\t}\n\n\t\t$productName = $pieces[1];\n\t\t$ponydocs = PonyDocsWiki::getInstance($productName);\n\t\t$pProduct = PonyDocsProduct::GetProductByShortName($productName);\n\t\tif ($pProduct === NULL) { // product wasn't valid\n\t\t\twfProfileOut( __METHOD__ );\n\t\t\t$wgOut->setStatusCode(404);\n\t\t\treturn FALSE;\n\t\t}\n\t\t$productLongName = $pProduct->getLongName();\n\t\t\n\t\tif (PonyDocsProductManual::isManual($productName, $pieces[2])) {\n\t\t\t$pManual = PonyDocsProductManual::GetManualByShortName($productName, $pieces[2]);\n\t\t}\n\n\t\t$versionText = PonyDocsProductVersion::GetSelectedVersion($productName);\n\n\t\tif (!empty($pManual)) {\n\t\t\t// We should always have a pManual, if we're printing \n\t\t\t// from a TOC\n\t\t\t$v = PonyDocsProductVersion::GetVersionByName($productName, $versionText);\n\n\t\t\t$toc = new PonyDocsTOC($pManual, $v, $pProduct);\n\t\t\tlist($manualtoc, $tocprev, $tocnext, $tocstart) = $toc->loadContent();\n\n\t\t\t// We successfully got our table of contents. It's \n\t\t\t// stored in $manualtoc\n\t\t\tforeach($manualtoc as $tocEntry) {\n\t\t\t\tif($tocEntry['level'] > 0 && strlen($tocEntry['title']) > 0) {\n\t\t\t\t\t$title = Title::newFromText($tocEntry['title']);\n\t\t\t\t\t$articles[$tocEntry['section']][] = array('title' => $title, 'text' => $tocEntry['text']);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\terror_log(\"WARNING [\" . __METHOD__ . \"] \" . php_uname('n')\n\t\t\t\t. \": User attempted to export ZIP from a non TOC page with path:\" . $wgTitle->__toString());\n\t\t}\n\n\t\t$html = self::getManualHTML($pProduct, $pManual, $v);\n\n\t\t$coverPageHTML = self::getCoverPageHTML($pProduct, $pManual, $v, false);\n\n\n\t\t// Make a temporary directory to store our archive contents.\n\t\t$tempDirPath = sys_get_temp_dir() . '/ponydocs-zip-export-' . time();\n\t\t$success = @mkdir($tempDirPath);\n\t\tif (!$success) {\n\t\t\terror_log(\"FATAL [\" . __METHOD__ . \"] Failed to create temporary directory \" . $tempDirPath . \" for Zip Export.\");\n\t\t\tthrow new Exception('Failed to create temporary directory for Zip Export.');\n\t\t}\n\n\t\t// Now, let's fetch all the img elements for both and grab them all in \n\t\t// parallel.\n\t\t$imgData = array();\n\n\t\t// Initialize our RollingCurl instance\n\t\t$rollingCurl = new \\RollingCurl\\RollingCurl();\n\n\t\t$mh = curl_multi_init();\n\n\t\t$manualDoc = new DOMDocument();\n\t\t@$manualDoc->loadHTML($html);\n\t\t$coverPageDoc = new DOMDocument();\n\t\t@$coverPageDoc->loadHTML($coverPageHTML);\n\n\t\tself::prepareImageRequests($manualDoc, $rollingCurl, $tempDirPath, &$imgData);\n\t\tself::prepareImageRequests($coverPageDoc, $rollingCurl, $tempDirPath, &$imgData);\n\n\t\t// Execute the RollingCurl requests\n\t\t$rollingCurl->execute();\n\n\t\t// Now update all our image elements in our appropriate DOMDocs.\n\t\tforeach($imgData as $img) {\n\t\t\t// Put the data into it.\n\t\t\tfile_put_contents($img['local_path'], $img['request']->getResponseText());\n\t\t\t// Modify element\n\t\t\t$img['element']->setAttribute('src', $img['new_path']);\n\t\t\t// Do curl cleanup\n\t\t}\n\n\t\t$html = $manualDoc->saveHTML();\n\t\t$coverPageHTML = $coverPageDoc->saveHTML();\n\n\t\t// Write the HTML to a tmp file\n\t\t$file = tempnam($tempDirPath, \"zipexport-\");\n\t\t$fh = fopen($file, 'w+');\n\t\tfwrite($fh, $html);\n\t\tfclose($fh);\n\n\t\t// Okay, write the title page\n\t\t$titlepagefile = tempnam($tempDirPath, \"zipexport-\");\n\t\t$fh = fopen($titlepagefile, 'w+');\n\t\tfwrite($fh, $coverPageHTML);\n\t\tfclose($fh);\n\n\n\n\t\t// Disable output of our standard mediawiki output. We will be outputting a zip file instead.\n\t\t$wgOut->disable();\n\n\t\t// Create ZIP Archive which contains a cover and manual html\n\t\t$zip = new ZipArchive();\n\t\t$tempZipFilePath = tempnam($tempDirPath, \"zipexport-\");\n\t\t$zipFileName = $productName . '-' . $versionText . '-' . $pManual->getShortName() . '.zip';\n\t\t$zip->open($tempZipFilePath, ZipArchive::OVERWRITE);\n\t\t$zip->addFile($titlepagefile, 'cover.html');\n\t\t$zip->addFile($file, 'manual.html');\n\t\t// Iterate through all the images\n\t\tforeach($imgData as $img) {\n\t\t\t$zip->addFile($img['local_path'], $img['new_path']);\n\t\t}\n\t\t$zip->close();\n\t\theader(\"Content-Type: application/zip\"); \n\t\theader(\"Content-Length: \" . filesize($tempZipFilePath)); \n\t\theader(\"Content-Disposition: attachment; filename=\\\"\" . $zipFileName . \"\\\"\"); \n\t\treadfile($tempZipFilePath);\n\n\t\t// Now remove all temp files\n\t\tself::rrmdir($tempDirPath);\n\n\t\t\n\t\t// Okay, let's add an entry to the error log to dictate someone requested a pdf\n\t\terror_log(\"INFO [\" . __METHOD__ . \"] \" . php_uname('n') . \": zip export serve username=\\\"\"\n\t\t\t. $wgUser->getName() . \"\\\" version=\\\"$versionText\\\" \" . \" manual=\\\"\" . $pManual->getShortName() . \"\\\"\");\n\t\t// No more processing\n\t\treturn false;\n\t}",
"function hook_article_filter($article) {\n\t\tif (!function_exists(\"curl_init\")) return $article;\n\t\t\n\t\t// Stop if the user hasn't checked the Full Post checkbox in this particular feed's settings\n\t\t$enabled_feeds = $this->host->get($this, \"enabled_feeds\");\n\t\t$key = array_search($article[\"feed\"][\"id\"], $enabled_feeds);\n\t\tif ($key === FALSE) return $article;\n\t\t\n\t\t// Have Readability parse the page\n\t\ttry {\n\t\t\t$article['content'] = $this->get_full_post($article['link']);\n\t\t} catch (Exception $e) {\n\t\t\t// Readability failed (?!); don't modify the article's content and keep going\n\t\t}\n\t\t\n\t\treturn $article;\n\t}",
"public function requirements_not_met_notice() {\n\t\t// Output our error\n\t\techo '<div id=\"message\" class=\"error\">';\n\t\techo '<p>' . sprintf( __( 'Requirements have not been met so this plugin has been <a href=\"%s\">deactivated</a>. Please make sure all requirements are available.', 'ausm-plugin' ), admin_url( 'plugins.php' ) ) . '</p>';\n\t\techo '</div>';\n\t}",
"function manage_alerts(){\n\n// WP NONCE CHECK\ncheck_ajax_referer( 'my-special-string', 'security' );\n//\n\nglobal $wpdb;\nif ( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] ) && $_POST['action'] == 'manage_alerts' ) {\n\n$error = apply_filters( 'cptch_verify', true );\nif ( true === $error ) { \n\n$unique_id = htmlspecialchars($_POST['unique_id']);\n\n$unique_id = $wpdb->get_results( \"SELECT * FROM coinwink WHERE unique_id = '\".$unique_id.\"'\" );\n\n\nif($unique_id) {\n\tforeach($unique_id as $alert) {\n\t\techo('<div><br><form type=\"post\" id=\"form_delete_alert\" action=\"\">\n\t\t\t<h3 class=\"fs-labels\">\n\t\t\tAlert when <b>'. $alert->coin .' ('. $alert->symbol .')</b> is:<br>');\n\t\tif ($alert->below && $alert->below_sent) {\n\t\t\techo('<s>below: '. $alert->below .' '. $alert->below_currency .'</s>');\n\t\t}\n\t\telseif ($alert->below && !$alert->below_sent) {\n\t\t\techo('below: '. $alert->below .' '. $alert->below_currency .'');\n\t\t}\n\t\tif ($alert->below && $alert->above) {\n\t\t\techo('<br>');\n\t\t}\n\t\tif ($alert->above && $alert->above_sent) {\n\t\t\techo('<s>above: '. $alert->above .' '. $alert->above_currency .'</s>');\n\t\t}\n\t\telseif ($alert->above && !$alert->above_sent) {\n\t\t\techo('above: '. $alert->above .' '. $alert->above_currency .'');\n\t\t}\n\t\techo('<br>\n\t\t\t <input name=\"action\" type=\"hidden\" value=\"delete_alert\" />\n\t\t\t <input type=\"hidden\" name=\"alert_id\" id=\"alert_id\" value=\"'. $alert->ID .'\">\n\t\t\t <input type=\"submit\" style=\"margin-top:5px;\" class=\"submit\" value=\"Delete alert\" />');\n\t\techo('</h3></form></div>');\n\t\t}\n}\nelse {\n\techo(\"ID does not exist..\");\n}\n\t\ndie();\n\n}\n\nelse {\n\t\n\techo($error);\n\t}\n}\n}",
"function _wp_block_editor_posts_page_notice()\n {\n }",
"function warnings_script()\n{\n\tif (get_forum_type()!='ocf') warn_exit(do_lang_tempcode('NO_OCF')); else ocf_require_all_forum_stuff();\n\n\trequire_lang('ocf_warnings');\n\n\tif (!ocf_may_warn_members())\n\t\taccess_denied('SPECIFIC_PERMISSION','warn_members');\n\n\t$type=get_param('type');\n\n\tif ($type=='delete') // Delete a saved warning\n\t{\n\t\t$_title=post_param('title');\n\t\t$GLOBALS['FORUM_DB']->query_delete('f_saved_warnings',array('s_title'=>$_title),'',1);\n\t\t$content=paragraph(do_lang_tempcode('SUCCESS'));\n\t\t$echo=do_template('STYLED_HTML_WRAP',array('TITLE'=>do_lang_tempcode('DELETE_SAVED_WARNING'),'CONTENT'=>$content));\n\t\t$echo->evaluate_echo();\n\t\treturn;\n\t}\n\n\t// Show list of saved warnings\n\t// ---------------------------\n\n\t$content=new ocp_tempcode();\n\t$rows=$GLOBALS['FORUM_DB']->query_select('f_saved_warnings',array('*'),NULL,'ORDER BY s_title');\n\t$keep=symbol_tempcode('KEEP');\n\t$url=find_script('warnings').'?type=delete'.$keep->evaluate();\n\tforeach ($rows as $myrow)\n\t{\n\t\t$delete_link=hyperlink($url,do_lang_tempcode('DELETE'),false,false,'',NULL,form_input_hidden('title',$myrow['s_title']));\n\t\t$content->attach(do_template('OCF_SAVED_WARNING',array(\n\t\t\t'MESSAGE'=>$myrow['s_message'],\n\t\t\t'MESSAGE_HTML'=>comcode_to_tempcode($myrow['s_message'],$GLOBALS['FORUM_DRIVER']->get_guest_id()),\n\t\t\t'EXPLANATION'=>$myrow['s_explanation'],\n\t\t\t'TITLE'=>$myrow['s_title'],\n\t\t\t'DELETE_LINK'=>$delete_link,\n\t\t)));\n\t}\n\tif ($content->is_empty()) $content=paragraph(do_lang_tempcode('NO_ENTRIES'),'rfdsfsdf3t45');\n\n\t$echo=do_template('POPUP_HTML_WRAP',array('TITLE'=>do_lang_tempcode('CHOOSE_SAVED_WARNING'),'CONTENT'=>$content));\n\t$echo->evaluate_echo();\n}",
"public function editArticleSave(Request $request) //called when the user has finished editing article\n {\n $article = \\App\\Article::where('id', $request->articleID)->first();\n if ($article == null) // || Gate::denies('editArticle', $article))\n {\n $value = 'article not found';\n return '{ \"error\":\"'.$value.'\"}'; //view('authorizationError');\n }\n $article->name = $request->name;\n $article->teaser = $request->teaser;\n $article->content = $request->content;\n $article->save();\n $value = 'article saved';\n return '{ \"result\":\"'.$value.'\"}';\n }",
"function errorMessageIllegal( $page, $crewid, $expected, $actual ) {\n\techo \"<div class='body'>\";\n\t\techo \"<span class='fontTitle'>Warning!</span><br /><br />\";\n\t\techo \"You have attempted an illegal operation!\";\n\techo \"</div>\";\n}",
"function page_404(){\n$content = array(\n\t\t\t\t 'contents' => buddyexpressdesk_print('page:notfound:msg'),\n\t\t\t\t 'title' => buddyexpressdesk_print('page:notfound:code'),\n\t\t\t);\nreturn buddyexpressdesk_view_page(buddyexpressdesk_print('site:home'), buddyexpressdesk_layout_view('page_article', $content));\n}",
"public function validateEditAction()\n {\n $data = $this->Request()->getParams();\n $articleNumber = $data['articleNumber'];\n\n $builder = Shopware()->Models()->createQueryBuilder();\n\n $builder->select('articles')\n ->from('Shopware\\Models\\Article\\Article', 'articles')\n ->leftJoin('articles.details', 'details')\n ->where('details.number = :articleNumber')\n ->setParameter('articleNumber', $articleNumber);\n\n /** @var Shopware\\Models\\Article\\Article[] $articleModels */\n $articleModels = $builder->getQuery()->getResult();\n\n if (count($articleModels) < 1) {\n if (!empty($articleNumber)) {\n $this->view->assign(\n [\n 'data' => ['articleNumber' => $articleNumber, 'error' => 'articleNumber'],\n 'success' => false\n ]\n );\n\n return false;\n }\n\n $this->view->assign(\n [\n 'data' => ['articleName' => $data['articleName'], 'error' => 'articleName'],\n 'success' => false\n ]\n );\n\n return false;\n }\n\n if ($articleModels[0]->getMainDetail()->getEsd()) {\n $this->view->assign(\n [\n 'data' => ['articleNumber' => $articleNumber, 'error' => 'esd'],\n 'success' => false\n ]\n );\n\n return false;\n }\n\n return true;\n }",
"function wpc_client_permissions_admin_notice() {\r\n echo \"<div id='permissions-warning' class='error fade'><p><strong>\" . __( 'You do not have permission to access that page.', WPC_CLIENT_TEXT_DOMAIN ) . \"</strong></p></div>\";\r\n }",
"public function updateItem(){\n if($_SESSION[PAGE_SESSIONID]['privileges']['articles'][1] == '0' && $_SESSION[PAGE_SESSIONID]['privileges']['articles'][3] == '0') die($this->text('dont_have_permission'));\n\n //checking if data is valid\n $result = $this->checkData();\n if($result !== true) return $result;\n \n //checking if user is allowed to edit article category articles\n if(!$this->isPranetOfMenuitem($_SESSION[PAGE_SESSIONID]['privileges']['categoryaccess'],$this->data['id_menucategory'])) return array('state'=>'error','data'=> $this->text('t7'));\n \n //if user cannot publish articles set values\n if($_SESSION[PAGE_SESSIONID]['privileges']['articles'][2] == '0') {\n unset($this->data['published']);\n unset($this->data['publish_date']);\n }\n\n $this->datavalidator->addValidation('id','req',$this->text('e6'));\n $this->datavalidator->addValidation('id','numeric',$this->text('e7'));\n \n //if user can change article ownership set values\n if($_SESSION[PAGE_SESSIONID]['privileges']['articles'][4] == '0') {\n unset($this->data['added_by']);\n }else{\n $this->datavalidator->addValidation('added_by','req',$this->text('e1'));\n $this->datavalidator->addValidation('added_by','numeric',$this->text('e2'));\n }\n \n $result = $this->datavalidator->ValidateData($this->data);\n if(!$result){\n $errors = $this->datavalidator->GetErrors();\n return array('state'=>'error','data'=> reset($errors));\n }\n\n $id = $this->data['id'];\n unset($this->data['id']);\n\n if($this->data['keywords'] == ''){\n $keywordgenerator = new keywordgenerator($this->data['article_content'].' '.$this->data['article_prologue'].' '.$this->data['article_title']);\n $this->data['keywords'] = $keywordgenerator->get_keywords();\n }\n \n //pridal som koli chybe websupportu (low memory)////////////////////////\n //$article_content = preg_replace('/&/i','&',html_entity_decode($this->data['article_content'],ENT_COMPAT,'UTF-8'));\n /*$article_content = $this->data['article_content'];\n unset($this->data['article_content']);*/\n \n if(strlen($this->data['keywords']) > 500) $this->data['keywords'] = substr($this->data['keywords'],0,500);\n $this->data['alias'] = $this->registry['textprocessors']->createClearAlphanumericString($this->data['article_title']);\n $this->data['updated_by'] = $_SESSION[PAGE_SESSIONID]['id'];\n $this->data['article_title'] = strtr($this->data['article_title'],$this->htmltranslation);\n $this->data['article_prologue'] = strtr($this->data['article_prologue'],$this->htmltranslation);\n $this->data['article_content'] = stripslashes($this->data['article_content']);\n $this->data['article_changeDate'] = date('Y-m-d H:i:s');\n $this->data['publish_date'] = date('Y-m-d H:i:s',strtotime($this->data['publish_date']));\n \n if($this->languager->getLangsCount() < 2){\n $this->data['lang'] = $this->languager->getDefaultLangId();\n }\n \n $temp = dibi::query(\"UPDATE \" . DB_TABLEPREFIX . \"ARTICLES SET \",$this->data,\"WHERE id='\" . $id .\"'\");\n $returnvalue = array();\n if ($temp == 0 || $temp == 1) {\n $returnvalue = array('state'=>'highlight','data'=> $this->text('article_saved'));\n }else {\n $returnvalue = array('state'=>'error','data'=> $this->text('e3'));\n }\n\n //pridal som koli chybe websupportu (low memory)////////////////////////\n /*if(DEVELOPMENT_STATUS == true){\n $link = mysql_connect(DB_DEV_HOST, DB_DEV_USER, DB_DEV_PASSWORD);\n if (!$link) $returnvalue .= 'Could not connect: ' . mysql_error();\n mysql_select_db(DB_DEV_NAME);\n }else{\n $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);\n if (!$link) $returnvalue .= 'Could not connect: ' . mysql_error();\n mysql_select_db(DB_NAME);\n }\n $temp = mysql_query(\"UPDATE \" . DB_TABLEPREFIX . \"ARTICLES SET article_content='\" . mysql_real_escape_string($article_content). \"' WHERE id=\" . $id);\n mysql_close();\n if($temp == false) $returnvalue['data'] .= '<br />Nastala chyba pri ukladaní obsahu článku do databázy!';*/\n //potom sa odstrani/////////////////////////////////////////////////////\n\n unset($_SESSION['articles_dirname']);\n\n return $returnvalue;\n }",
"function accept_terms() {\n if (isset($_POST['check']))\n return true;\n $this->form_validation->set_message('accept_terms', 'Please read and accept our terms and conditions.');\n return false;\n }",
"function nbErreurs()\r\n{\r\n if (!isset($_REQUEST['erreurs'])) {\r\n return 0;\r\n } else {\r\n return count($_REQUEST['erreurs']);\r\n }\r\n/**\r\n * \\brief Ajoute le libellé d'une information au tableau des informations\r\n *\r\n * \\param String $msg Libellé de l'information\r\n *\r\n * \\return null\r\n */\r\n}",
"function show_deny() {\n\t\t\tshow_error(\n\t\t\t\t'403 Forbidden',\n\t\t\t\t'You do not have sufficient clearance to view this page.'\n\t\t\t);\n\t\t}",
"public static function add_notice_if_publish_failed_due_to_missing_taxonomies() {\n\t\tglobal $post;\n\n\t\t$meta_key = Posts::META_KEY_MISSING_TAXONOMIES;\n\n\t\tif ( isset( $post->ID ) ) {\n\t\t\t$missing_taxonomies = get_post_meta( $post->ID, $meta_key, true );\n\n\t\t\tif ( $missing_taxonomies ) {\n\t\t\t\techo '<div class=\"notice notice-error is-dismissible notice-missing-taxonomies\"><p>';\n\t\t\t\tprintf(\n\t\t\t\t\t__( '<strong>Error:</strong> Photo was not published because the following taxonomies are missing terms: %s', 'wporg-photos' ),\n\t\t\t\t\t'<strong>' . implode( '</strong>, <strong>', $missing_taxonomies ) . '</strong>'\n\t\t\t\t);\n\n\t\t\t\techo '</p></div>' . \"\\n\";\n\t\t\t\tdelete_post_meta( $post->ID, $meta_key );\n\t\t\t}\n\t\t}\n\t}",
"function suid_pageAccessMessage(){\t\r\n\t$NoAccess = '<div class=\"panel_warning\">';\r\n\t$NoAccess .= '<p><strong>You are not authorised to use this page</strong><br>';\r\n\t$NoAccess .= '<br>Please <a href=\"javascript:history.go(-1)\">return to previous page</a></p>';\r\n\t$NoAccess .= '</div>';\r\n\treturn $NoAccess;\r\n}",
"public function testSpecificWidgetArticleForGuest(): void\n {\n // Request\n $response = $this->get('api/cms/v1/widget-article/2');\n\n // Check response status\n $response->assertStatus(401);\n }",
"public function noteAction() {\n\tif($this->_getParam('id',false)) {\n\t$notes = new Findofnotereasons();\n\t$this->view->notes = $notes->getReasonDetails($this->_getParam('id'));\n\t} else {\n throw new Pas_Exception_Param($this->_missingParameter);\n\t}\n\t}",
"public function duplicateNotice()\n {\n if (!isset($_GET['duplicate'])) {\n return;\n }\n\n $id = $_GET['duplicate'];\n $msg = sprintf(__('This is a duplicate of the event: %s. If this is a new occasion for the same event, please %s and republish the original event', 'event-manager'), '<strong>\"' . get_the_title($id) . '\"</strong>', '<a href=\"' . esc_url(get_edit_post_link($id)) .'\">'.__('edit', 'event-manager').'</a>');\n\n echo '<div class=\"notice notice-warning is-dismissible\">';\n echo '<p>' . $msg . '</p>';\n echo '</div>';\n }",
"public function rejectedits() {\n\t\t\tglobal $db, $user;\n\t\t\t$query = \"delete from content where parent = '\".$this->guid.\"' and revision_id=1\";\n\t\t\t//print \"$query<br>\\n\";\n\t\t\tif ($db->query($query)) {\n\n\t\t\t\t// We have rejected edits to the page\n\t\t\t\taddHistory($user->id, \"\", $this->guid, \"Changes rejected\", $this->template_type.\"s\");\n\n\t\t\t\t// Update this page in the history table also\n\t\t\t\t$query = \"UPDATE history \n\t\t\t\t\tSET completed_action='CHANGES REJECTED', completed_date=now(), completed_by=\".$user->id.\" \n\t\t\t\t\tWHERE action='publish' \n\t\t\t\t\tAND completed_action is null\n\t\t\t\t\tAND (info='Page saved' OR info='Panel saved')\n\t\t\t\t\tAND guid='\".$this->guid.\"'\";\n\t\t\t\tif (!$db->query($query)) {\n\t\t\t\t\t//print \"failed($query)<br>\\n\";\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"function checkMySuggestToInstitutionPrivacyStatus($theId) {\n require_once (\"conn/config.php\");\n require_once (\"classes/database.php\");\n //--------------------\n $database = new mysqldatabase();\n $post_privacy_counter = 0;\n $suggest_privacy_msg_handler = \"\";\n $sql_privacy_posts = \"SELECT * FROM ogenius_nds_db_privacy_suggest_records WHERE ogenius_nds_db_privacy_suggest_records_user_id='{$theId}' ORDER BY ogenius_nds_db_privacy_suggest_records_id DESC LIMIT 1\";\n if ($query_privacy_posts = $database->query($sql_privacy_posts)) {\n //---------------------\n while ($res_privacy_posts = mysqli_fetch_array($query_privacy_posts)) {\n // $_privacy_posts_set_id = $res_privacy_posts['ogenius_nds_db_privacy_posts_records_id'];\n $_privacy_posts_set_txt_descr_1 = $res_privacy_posts['ogenius_nds_db_privacy_suggest_records_only_username'];\n $_privacy_posts_set_txt_descr_2 = $res_privacy_posts['ogenius_nds_db_privacy_suggest_records_username_and_location'];\n $_privacy_posts_set_txt_descr_3 = $res_privacy_posts['ogenius_nds_db_privacy_suggest_records_let_all_my_details_avail'];\n //--identify the posts algorithm--\n if ($_privacy_posts_set_txt_descr_1 == 1) {\n $suggest_privacy_msg_handler = \"all_the_details\";\n } else if ($_privacy_posts_set_txt_descr_2 == 1) {\n $suggest_privacy_msg_handler = \"only_username_and_location\";\n } else if ($_privacy_posts_set_txt_descr_3 == 1) {\n $suggest_privacy_msg_handler = \"only_username\";\n }\n $post_privacy_counter++;\n }\n //------------------\n if ($post_privacy_counter == 0) {\n $suggest_privacy_msg_handler = \"all_the_details\";\n }\n }\n return $suggest_privacy_msg_handler;\n}",
"function securite($alert) {\n\t\t$this -> profil($this -> vue -> afficheSecurite($alert));\n\t}",
"function reindexer_error_text() \n{\n $admin = admin_url('admin.php?page=envato_tweets_settings');\n echo '<div id=\"message\" class=\"error\"><p><strong>Envato Tweets</strong> authentication was not successful, make sure the <a href=\"'.$admin.'\">settings</a> are correct. Please contact <a href=\"mailto:[email protected]?subject=Envato Tweets is broken on '.get_bloginfo('site_name').'!\" target=\"_blank\">Derek Herman</a> if the problem persists.</p></div>';\n}",
"public function renderForNoPublicationHashSetInPiVarsReturnsPublishFailedMessage()\n {\n self::assertEquals(\n $this->fixture->translate('message_publishingFailed'),\n $this->fixture->render()\n );\n }",
"public function displayFunctionMissingNotice()\n {\n $currentUser = wp_get_current_user();\n if (!get_user_meta($currentUser->ID, 'AssignmentAttachmentIgnoreNag') && current_user_can('install_plugins')){\n $this->displayAdminError((sprintf(\n __('Regarding WPLMS Assignments Upload Assignment Functionality : It seems like your PHP installation is missing \"mime_content_type\" or \"finfo_file\" functions which are crucial '.\n 'for detecting file types of uploaded attachments. Please update your PHP installation OR be very careful with allowed file types, so '.\n 'intruders won\\'t be able to upload dangerous code to your website! | <a href=\"%1$s\">Hide Notice</a>','wplms-assignments'), '?AssignmentAttachmentIgnoreNag=1')), 'updated');\n }\n }",
"function mes_articles(){\n\t\tglobal $infos_id;\n\t\t$requete = \"SELECT titre, id FROM articles WHERE auteur='{$infos_id['id']}'\";\n\t\t$donnees = connexion($requete);\n\t\tif(mysql_num_rows($donnees) >= 1){\n\t\t\t$res = '<ul>';\n\t\t\twhile($ligne = mysql_fetch_assoc($donnees)){\n\t\t\t$res .= \t\"<li>\".\n\t\t\t\t\t\t\t\"<a href='index.php?where=article&id={$ligne['id']}'>\".$ligne['titre'].\"</a>\n\t\t\t\t\t\t</li>\";\n\t\t\t}\n\t\t\t$res .= \"</ul>\";\n\t\t\treturn $res;\n\t\t}else{\n\t\t\treturn \"<div>{$infos_id['prenom']} {$infos_id['nom']} a rédigé aucun article</div>\";\n\t\t}\n\t}",
"public function actionArticles()\n\t{\n\t\t$this -> layout = 'mainLayout';\n\t\t/*$stack = $this -> human_verbiages;\n\t\t$arts = Articles::GiveArticlesById(0, true);*/\n\t\t\n\t\t$criteria = new CDbCriteria;\n\t\t$criteria -> compare('level',0);\n\t\t$criteria -> compare('parent_id',0);\n\t\t$criteria -> compare('id_type',ArticleType::model() -> getNumber('bibl'));\n\t\t$articles = Articles::model() -> findAll($criteria);\n\t\t\n\t\t$arts = array();\n\t\tforeach ($articles as $art) {\n\t\t\t$arr = array();\n\t\t\t$arr['name'] = $art -> name;\n\t\t\t$arr['verbiage'] = $art -> verbiage;\n\t\t\t$arr['id'] = $art -> id;\n\t\t\t$arr['text'] = $art -> text;\n\t\t\t\n\t\t\t$arts[] = $arr;\n\t\t}\n\t\t\n\t\t/*$arts = array_filter($arts,function ($art) use ($stack){\n\t\t\treturn (!in_array($art [\"verbiage\"], $stack));\n\t\t});*/\n\t\t$this->render('//articles/show_all', array(\n\t\t\t//'articles' => Articles::GiveArticlesById(0, true)\n\t\t\t'articles' => $arts\n\t\t));\n\t}",
"function maintenance_nag()\n {\n }",
"public function adminNotices ()\n {\n\n if ( $this->errors ) {\n\n $this->handleNotices ( $this->errors, 'error' );\n\n }\n if ( $this->notices ) {\n\n $this->handleNotices ( $this->notices, 'update-nag' );\n\n }\n if ( $this->updates ) {\n\n $this->handleNotices ( $this->updates );\n\n }\n\n }",
"function hookNotices() {\r\n if (is_array(self::$errors))\r\n foreach (self::$errors as $error) {\r\n\r\n switch ($error['type']) {\r\n case 'fatal':\r\n self::showError(ucfirst(_PLUGIN_NAME_ . \" \" . $error['type']) . ': ' . $error['text'], $error['id']);\r\n die();\r\n break;\r\n case 'settings':\r\n if (isset(SQ_Tools::$options['ignore_warn']) && SQ_Tools::$options['ignore_warn'] == 1)\r\n break;\r\n\r\n /* switch off option for notifications */\r\n self::$switch_off = \"<a href=\\\"javascript:void(0);\\\" onclick=\\\"jQuery.post( ajaxurl, {action: 'sq_warnings_off', nonce: '\" . wp_create_nonce('sq_none') . \"'}, function(data) { if (data) { jQuery('#sq_ignore_warn').attr('checked', true); jQuery('.sq_message').hide(); jQuery('#toplevel_page_squirrly .awaiting-mod').fadeOut('slow'); } });\\\" >\" . __(\"Turn off warnings!\", _PLUGIN_NAME_) . \"</a>\";\r\n self::showError(ucfirst(_PLUGIN_NAME_) . \" \" . __('Notice: ', _PLUGIN_NAME_) . $error['text'] . \" \" . self::$switch_off, $error['id']);\r\n break;\r\n default:\r\n\r\n self::showError(ucfirst(_PLUGIN_NAME_) . \" \" . __('Note: ', _PLUGIN_NAME_) . $error['text'], $error['id']);\r\n }\r\n }\r\n self::$errors = array();\r\n }",
"public function check_admin_notices()\n {\n if (! \\wpSPIO()->env()->is_screen_to_use)\n return; // suppress all when not our screen.\n\n $this->doFilePermNotice();\n $this->doAPINotices();\n $this->doCompatNotices();\n $this->doUnlistedNotices();\n $this->doQuotaNotices();\n\n $this->doIntegrationNotices();\n\n $this->doHelpOptInNotices();\n }",
"public function message()\n {\n return __('Some products do not have sufficient quantity to do this adjustment');\n }",
"function alert_jetpack() {\n\t\t$notice = sprintf(\n\t\t\t__( 'AdControl requires %sJetpack%s to be installed and connected at this time. %sHelp getting started.%s', 'adcontrol' ),\n\t\t\t'<a href=\"https://jetpack.com/\" target=\"_blank\">', '</a>',\n\t\t\t'<a href=\"https://jetpack.com/support/getting-started-with-jetpack/\" target=\"_blank\">', '</a>'\n\t\t);\n\n echo <<<HTML\n <div class=\"notice error is-dismissible\">\n \t<p>$notice</p>\n </div>\nHTML;\n\t}",
"function isValidPetition($articleID = null)\n\t\t{\t\t\t\t\t\n\t\t\t$return = false;\n\t\t\t$query = \"select * from tbl_affiliate_articles \n\t\t\twhere article_id = '\".$articleID.\"'\";\n\t\t\t\n\t\t\t$rs = $this->Execute($query);\t\t\t\t\t\t\n\t\t\tif($row = $rs->FetchRow()) {\n\t\t\t\t\n\t\t\t\t$today = date('Y-m-d');\n\t\t\t\t//print_r($row);\n\t\t\t\t//die();\n\t\t\t\tif($today <= $row[\"voting_end\"] && $today >= $row[\"voting_start\"]) {\n\t\t\t\t\t$return = true;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $return;\n\t\t}",
"private function alert($message) {\n\t $this->load->helper('html'); \n\t $this->data['error'] = heading($message,3);\n\t}",
"function warn_user($id_auteur=0)\n{\n\tif (empty($id_auteur)) return;\n\n\t// On le recherche\n\t$is_spammer = sql_fetsel('id_auteur, user_spam_warnings', 'spip_auteurs_spipbb', \"id_auteur=$id_auteur\");\n\n\tif (is_array($is_spammer) and !empty($is_spammer['id_auteur']) )\n\t{\n\t\t@sql_updateq('spip_auteurs_spipbb', array(\n\t\t\t\t\t'user_spam_warnings' => $is_spammer['user_spam_warnings']+1),\n\t\t\t\t\"id_auteur=$id_auteur\");\n\t} else {\n\t\t@sql_insertq('spip_auteurs_spipbb', array(\n\t\t\t\t\t'id_auteur'\t=> $id_auteur,\n\t\t\t\t\t'user_spam_warnings' => 1)\n\t\t\t);\n\t}\n}",
"public static function output_markup_warning() {\n\t\tprintf('<p class=\"description\">%s</p>', __('Use \"Insert Markup\" if you don\\'t want to use shortcodes for your EasyAzon links. Any global changes to your link settings will not affect your non shortcode links.'));\n\t}",
"function alert_page($p_type, $p_msg, $p_page_title = ''){\n\tlayout_page_header();\n\tlayout_page_begin();\n\n\tif($p_page_title != '')\n\t\tpage_title($p_page_title);\n\n\techo '<div class=\"col-md-12-left\">';\n\n\talert($p_type, $p_msg);\n\n\techo '</div>';\n\tlayout_page_end();\n\texit();\n}",
"public function updateNotices()\n {\n // Fetch a list of users whos has not notice about article.\n $ar_unnoticed = User::find()\n ->leftJoin('{{%article_user}}', \n '{{%user}}.id = {{%article_user}}.user_id AND ' .\n sprintf('{{%%article_user}}.article_id = %d', $this->id)\n )\n ->andWhere(['IS', '{{%article_user}}.user_id', (new Expression('NULL'))])\n //->andWhere(['IS NOT', '{{%article_user}}.is_readed', (new Expression('NULL'))])\n ->andWhere(['=', '{{%user}}.is_active', User::STATUS_ACTIVE])\n ->andWhere(['<>','{{%user}}.id', \\Yii::$app->user->getId()])\n ->all();\n\n foreach ($ar_unnoticed as $account) {\n //$this->link('readers', $account, ['is_readed' => 1]);\n $this->link('readers', $account, ['is_readed' => 1]);\n }\n }"
] | [
"0.5907941",
"0.5873155",
"0.5843601",
"0.5801825",
"0.5747831",
"0.5707108",
"0.5694442",
"0.56772107",
"0.56337357",
"0.56204605",
"0.5557034",
"0.5552519",
"0.5549941",
"0.5540343",
"0.55329305",
"0.55115813",
"0.5503798",
"0.54987514",
"0.5481074",
"0.5477375",
"0.54694235",
"0.5465773",
"0.54495835",
"0.5436615",
"0.542991",
"0.54247177",
"0.5424259",
"0.54156405",
"0.5405441",
"0.5390302",
"0.53725946",
"0.5366202",
"0.53520703",
"0.5334414",
"0.5329859",
"0.5328991",
"0.53284997",
"0.53266835",
"0.5324883",
"0.53204495",
"0.5319109",
"0.53175324",
"0.5314549",
"0.5296748",
"0.52882624",
"0.52804327",
"0.5268601",
"0.5263986",
"0.5262256",
"0.52614367",
"0.52577627",
"0.5249866",
"0.5247847",
"0.52474844",
"0.52425075",
"0.5237984",
"0.52360094",
"0.52345073",
"0.52321815",
"0.52299774",
"0.52281153",
"0.52173483",
"0.52124375",
"0.52095366",
"0.5206575",
"0.5204276",
"0.52017885",
"0.5196384",
"0.51960486",
"0.5185568",
"0.51817137",
"0.5179374",
"0.5175674",
"0.5166957",
"0.5162677",
"0.51604444",
"0.51547277",
"0.5153352",
"0.5151669",
"0.51378495",
"0.5137282",
"0.5136397",
"0.5134693",
"0.51296306",
"0.5121695",
"0.5118766",
"0.5118734",
"0.51165795",
"0.51154387",
"0.5111919",
"0.5111317",
"0.51099527",
"0.51088375",
"0.5099497",
"0.5097353",
"0.50952065",
"0.5095059",
"0.50945234",
"0.5093979",
"0.50927097",
"0.5092022"
] | 0.0 | -1 |
Run the database seeds. | public function run()
{
$unidades = [
['H87', 'Pieza', 'Múltiplos/Fracciones/Decimales'],
['E48', 'Unidad de servicio', 'Unidades específicas de la industria (varias)'],
['EA', 'Elemento', 'Unidades de venta'],
['KGM', 'Kilogramo', 'Mecánica'],
];
foreach($unidades as $unidad){
UnidadDeMedida::create([
'clave' => $unidad[0],
'nombre' => $unidad[1],
'tipo' => $unidad[2],
'creado_por' => 0,
'actualizado_por' => 0
]);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }",
"public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }",
"public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }",
"public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }",
"public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }",
"public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }",
"public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }",
"public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }",
"public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }",
"public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }",
"public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }",
"public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }",
"public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }",
"public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }",
"public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }",
"public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }",
"public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}",
"public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }",
"public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}",
"public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }",
"public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }",
"public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }",
"public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }",
"public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }",
"public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }",
"public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}",
"public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }",
"public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }",
"public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }",
"public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }",
"public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }",
"public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }",
"public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }",
"public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }",
"public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }",
"public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }",
"public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }",
"public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }",
"public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }",
"public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }",
"public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}",
"public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }",
"public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }",
"public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }",
"public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }",
"public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }",
"public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }",
"public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }",
"public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }"
] | [
"0.8013876",
"0.79804534",
"0.7976992",
"0.79542726",
"0.79511505",
"0.7949612",
"0.794459",
"0.7942486",
"0.7938189",
"0.79368967",
"0.79337025",
"0.78924936",
"0.78811055",
"0.78790957",
"0.78787595",
"0.787547",
"0.7871811",
"0.78701615",
"0.7851422",
"0.7850352",
"0.7841468",
"0.7834583",
"0.7827792",
"0.7819104",
"0.78088796",
"0.7802872",
"0.7802348",
"0.78006834",
"0.77989215",
"0.7795819",
"0.77903426",
"0.77884805",
"0.77862066",
"0.7778816",
"0.7777486",
"0.7765202",
"0.7762492",
"0.77623445",
"0.77621746",
"0.7761383",
"0.77606887",
"0.77596676",
"0.7757001",
"0.7753607",
"0.7749522",
"0.7749292",
"0.77466977",
"0.7729947",
"0.77289546",
"0.772796",
"0.77167094",
"0.7714503",
"0.77140456",
"0.77132195",
"0.771243",
"0.77122366",
"0.7711113",
"0.77109736",
"0.7710777",
"0.7710086",
"0.7705484",
"0.770464",
"0.7704354",
"0.7704061",
"0.77027386",
"0.77020216",
"0.77008796",
"0.7698617",
"0.76985973",
"0.76973504",
"0.7696405",
"0.7694293",
"0.7692694",
"0.7691264",
"0.7690576",
"0.76882726",
"0.7687433",
"0.7686844",
"0.7686498",
"0.7685065",
"0.7683827",
"0.7679184",
"0.7678287",
"0.76776296",
"0.76767945",
"0.76726556",
"0.76708084",
"0.76690495",
"0.766872",
"0.76686716",
"0.7666299",
"0.76625943",
"0.7662227",
"0.76613766",
"0.7659881",
"0.7656644",
"0.76539344",
"0.76535016",
"0.7652375",
"0.7652313",
"0.7652022"
] | 0.0 | -1 |
Run the database seeds. | public function run()
{
if(env('APP_ENV') != 'production') {
DB::table('aulas')->truncate();
$aulas = factory(\App\Aula::class, 20)->create();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }",
"public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }",
"public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }",
"public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }",
"public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }",
"public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }",
"public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }",
"public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }",
"public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }",
"public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }",
"public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }",
"public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }",
"public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }",
"public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }",
"public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }",
"public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }",
"public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}",
"public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }",
"public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}",
"public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }",
"public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }",
"public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }",
"public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }",
"public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }",
"public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }",
"public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}",
"public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }",
"public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }",
"public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }",
"public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }",
"public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }",
"public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }",
"public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }",
"public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }",
"public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }",
"public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }",
"public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }",
"public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }",
"public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }",
"public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }",
"public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}",
"public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }",
"public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }",
"public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }",
"public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }",
"public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }",
"public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }",
"public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }",
"public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }"
] | [
"0.8013876",
"0.79804534",
"0.7976992",
"0.79542726",
"0.79511505",
"0.7949612",
"0.794459",
"0.7942486",
"0.7938189",
"0.79368967",
"0.79337025",
"0.78924936",
"0.78811055",
"0.78790957",
"0.78787595",
"0.787547",
"0.7871811",
"0.78701615",
"0.7851422",
"0.7850352",
"0.7841468",
"0.7834583",
"0.7827792",
"0.7819104",
"0.78088796",
"0.7802872",
"0.7802348",
"0.78006834",
"0.77989215",
"0.7795819",
"0.77903426",
"0.77884805",
"0.77862066",
"0.7778816",
"0.7777486",
"0.7765202",
"0.7762492",
"0.77623445",
"0.77621746",
"0.7761383",
"0.77606887",
"0.77596676",
"0.7757001",
"0.7753607",
"0.7749522",
"0.7749292",
"0.77466977",
"0.7729947",
"0.77289546",
"0.772796",
"0.77167094",
"0.7714503",
"0.77140456",
"0.77132195",
"0.771243",
"0.77122366",
"0.7711113",
"0.77109736",
"0.7710777",
"0.7710086",
"0.7705484",
"0.770464",
"0.7704354",
"0.7704061",
"0.77027386",
"0.77020216",
"0.77008796",
"0.7698617",
"0.76985973",
"0.76973504",
"0.7696405",
"0.7694293",
"0.7692694",
"0.7691264",
"0.7690576",
"0.76882726",
"0.7687433",
"0.7686844",
"0.7686498",
"0.7685065",
"0.7683827",
"0.7679184",
"0.7678287",
"0.76776296",
"0.76767945",
"0.76726556",
"0.76708084",
"0.76690495",
"0.766872",
"0.76686716",
"0.7666299",
"0.76625943",
"0.7662227",
"0.76613766",
"0.7659881",
"0.7656644",
"0.76539344",
"0.76535016",
"0.7652375",
"0.7652313",
"0.7652022"
] | 0.0 | -1 |
User name for DB connect | public function __construct(){
$user = 'root';
// User password for DB connect
$pass = 'root';
// Data for connect to DB
$dsn = 'mysql:dbname=colnect;host=localhost;port=8889;charset=utf8;';
try {
// Call class PDO for connection to DB
MySQL::$db = new \PDO(
$dsn,
$user,
$pass
);
} // try
catch(\PDOException $ex){
echo "Connection error.\n Info: $ex->getMessage()";
} // catch
// Connecting the folder with templates for twig
$this->loader = new Twig_Loader_Filesystem('./App/Templates');
$this->twig = new Twig_Environment($this->loader);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDbUsername(): string\n {\n return (string) Config::get('DB_USERNAME');\n }",
"public function getDatabaseUsername()\n {\n return $this->settings['db_username'];\n }",
"function get_database_user()\n\t{\n\t\treturn ($this -> database_user);\n\t}",
"protected function getConfiguredUsername() {}",
"public function username() {\n return $this->db['username'];\n }",
"function user_name () {\r\n\t$info = user_info();\r\n\treturn (isset($info[1]) ? $info[1] : 'default');\r\n}",
"public function getDbUser()\n\t{\n\t\treturn $this->db_user;\n\t}",
"public static function username() {\n return 'user_id';\n }",
"public function username(): string\n\t{\n\t\treturn \"username\";\n\t}",
"function _getUser()\n\t{\n\t\treturn 'root';\n\t}",
"public function name()\n\t{\n\t\treturn User::info('Username');\n\t}",
"public function getConnectionName();",
"public function getConnectionName();",
"public function getConnectionName();",
"public function getDBUserName(){\n\n\t\treturn $this->_username;\n\t}",
"protected function username()\n {\n return 'username';\n }",
"public function username()\n {\n return 'log';\n }",
"public function getName()\n {\n return 'pw_user';\n }",
"public function loginUsername()\n {\n return 'username';\n }",
"public function loginUsername()\n {\n return 'username';\n }",
"public function username()\n {\n return backpack_authentication_column();\n }",
"public function username(){\n return 'user_name';\n }",
"public function username()\n {\n return 'username';\n }",
"public function username()\n {\n return 'username';\n }",
"public function username()\n {\n return 'username';\n }",
"public function username()\n {\n return 'username';\n }",
"function getUserName() {\n return $this->userName . \".guest\";\n }",
"public function getUserName() : string\n {\n return $this->userName;\n }",
"public function getUserName() : string\n {\n return $this->userName;\n }",
"public function getSQLUsers() {\n\t return sprintf(\"SELECT user AS user_name FROM mysql.user ORDER BY user ASC\");\n\t}",
"function user_name($user = false)\n{\n $user = $user ? $user : $GLOBALS['user'];\n\n // first check if the name is in the DB\n if ($info = user_info($user))\n return $info['name'];\n\n //no, it isn't. fetch it from the master server\n return master_user_name($user);\n}",
"public function usualname()\n\t{\n\t\treturn coalesce(User::info('UsualName'), User::info('Username'));\n\t}",
"public function getUserName() {}",
"public function getUserName();",
"public static function getUsername ()\n {\n return config('auth', 'username');\n }",
"public function getuserName()\n {\n return $this->userName;\n }",
"public function dbname() {\n return $this->db['dbname'];\n }",
"public function getUsername()\n {\n return $this->getDuckname();\n }",
"final public function getDBname() {\n \t\treturn $this->dbase;\n }",
"public function getUsername()\n {\n return $this->getUserIdentifier();\n }",
"public function getName() {\n\t\treturn 'user';\n\t}",
"public function getUserName() {\n return $this->userName;\n }",
"public function getUserNameIdentifier()\n {\n return $this->user_name;\n }",
"public function GetUserName ();",
"function dbName()\n{\n\treturn $this->drv->dbName();\n}",
"public function getUserName()\n {\n return $this->user_name;\n }",
"public function database_name()\n\t{\n\t\treturn $this->database_name;\n\t}",
"protected function setName()\n {\n return self::$tbl_user;\n }",
"function connectionName ()\n\t{\n\t\tif (isset($this->conn_name)) {\n\t\t\treturn $this->conn_name;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"public function getUserName()\n {\n return $this->userName;\n }",
"public function getUserName()\n {\n return $this->userName;\n }",
"public function getConnectionName()\n\t{\n\t\treturn empty($this->db_conn) ? $this->db_conn_name : $this->getConnection()->getName();\n\t}",
"public function getUsername() {}",
"public function getDefaultConnectionName();",
"Public Function getDatabaseName() { Return $this->dbname; }",
"function get_user_name() {\n return $this->call('get_user_name', array(), TRUE);\n }",
"public function getUserName()\n {\n return $this->getName();\n }",
"public function getUsername()\n {\n return $this->getName();\n }",
"public function getUsername() {\n return $this->getConfig('username', $this->defaults['username']);\n }",
"public function getUsername()\n\t{\n\t\treturn $this->{config('auth.username.field')};\n\t}",
"function getUserName()\r\n\t{\r\n\t\treturn $this->UserName;\r\n\t}",
"final public function getUserName():string \n {\n return $this->userState->getUserName();\n }",
"public function getOwnerusername() {}",
"public function getUsername()\n {\n return $this->getConfig('username');\n }",
"public function getDbName () {\n return $this->dbName; \n }",
"public function getUserName() {\r\n return $this->userName;\r\n }",
"public function getUserName() {\n return $this->userName;\n }",
"public function getUserName()\n {\n return $this->userName;\n }",
"public function getUsername();",
"public function getUsername();",
"public function getUsername();",
"public function getUsername();",
"public function getUsername();",
"public function getDbName()\n\t{\n\t\treturn $this->db_name;\n\t}",
"public function getUserName()\n {\n return $this->config['username']; \n }",
"public function getUserName() {\n\t\treturn $this->userName;\n\t}",
"public function getUserName() {\n\t\treturn $this->userName;\n\t}",
"public function get_user_name() { \n\n\t\tif ($this->user == '-1') { return _('All'); } \n\t\t\n\t\t$user = new User($this->user);\n\t\treturn $user->fullname . \" (\" . $user->username . \")\";\n\t\t\n\t}",
"public function getUsername()\r\n\t{\r\n\t\treturn $this->admin['user'];\r\n\t}",
"public function getName()\n {\n return 'user';\n }",
"public function getName()\n {\n return parent::getUsername();\n }",
"static public function getDbName()\n\t{\t\t\n\t\treturn self::$_dbName;\n\t}",
"public function username(){\n \treturn $this->users->name.' '.$this->users->ape;\n }",
"public function getUserIdentifier(): string\n {\n return (string) $this->login;\n }",
"public function getUsername() : string\n {\n return explode(':', $this->uri->getUserInfo() ?: '')[0];\n }",
"public function username()\n {\n }",
"public function getUsername(): string\n {\n return $this->getCorreo();\n }",
"protected function username() {\n return 'email';\n }",
"protected function username()\n {\n return 'email';\n }",
"public static function username()\n {\n $username = self::variable(self::USERNAME);\n\n return $username;\n }",
"public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }",
"public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }",
"public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }",
"public function getCurrentUsername(): string;",
"public function getAuthIdentifierName() {\n return 'username';\n }",
"public static function defaultConnectionName() { return 'db_cake'; }",
"public function getUsername()\n {\n return $this->getLogin();\n }",
"public function getExternalUserName();",
"public function getDefaultUsername() : ?string;",
"private function get_DB_name() {\n global $CFG;\n return $CFG->dbname;\n }",
"protected function username(): string\n {\n return config('auth.method') === 'standard' ? 'email' : 'username';\n }"
] | [
"0.7437743",
"0.74318403",
"0.68889153",
"0.6870653",
"0.67985123",
"0.6521536",
"0.6501483",
"0.648917",
"0.6470702",
"0.6468964",
"0.646254",
"0.64451224",
"0.64451224",
"0.64451224",
"0.64131117",
"0.63837284",
"0.6376278",
"0.63732",
"0.63296354",
"0.63296354",
"0.6317948",
"0.6313486",
"0.6302781",
"0.6302781",
"0.6302781",
"0.6302781",
"0.6218412",
"0.6217868",
"0.6217868",
"0.61941695",
"0.61740106",
"0.6171309",
"0.6159208",
"0.615845",
"0.6150853",
"0.6141117",
"0.613237",
"0.61298835",
"0.61097926",
"0.6096512",
"0.6086537",
"0.60805",
"0.6075541",
"0.6069397",
"0.60640764",
"0.605804",
"0.6049061",
"0.6039688",
"0.60388196",
"0.6035478",
"0.6035478",
"0.60312694",
"0.6029639",
"0.60290337",
"0.6028338",
"0.6028276",
"0.6023526",
"0.6003645",
"0.59993494",
"0.59959996",
"0.59907174",
"0.5989321",
"0.59891427",
"0.598816",
"0.59814703",
"0.597823",
"0.5966521",
"0.59643364",
"0.59628874",
"0.59628874",
"0.59628874",
"0.59628874",
"0.59628874",
"0.5958101",
"0.59577864",
"0.5956342",
"0.5956342",
"0.5955923",
"0.5949105",
"0.59475297",
"0.5944711",
"0.5944265",
"0.59441066",
"0.59382606",
"0.5933234",
"0.59318054",
"0.5930984",
"0.59288275",
"0.5924477",
"0.59236276",
"0.59232116",
"0.59232116",
"0.59232116",
"0.5920089",
"0.5912294",
"0.59095794",
"0.5908891",
"0.59036225",
"0.5900155",
"0.5900063",
"0.5884252"
] | 0.0 | -1 |
Run the database seeds. | public function run()
{
for ($memberCount = 1; $memberCount <= 3; $memberCount++) {
$members = App\User::inRandomOrder()->take($memberCount * 15)->get()->toArray();
factory(App\Team::class, 15)->create(['max_size'=>$memberCount])->each(function (App\Team $u) use (&$members, $memberCount) {
for ($member = 0; $member < $memberCount; $member++) {
$member_object = array_pop($members);
$u->teamMembers()->create(['user_id' => $member_object['id']]);
if ($member == 0) {
$u->leader_user_id = $member_object['id'];
}
}
});
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }",
"public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }",
"public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }",
"public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }",
"public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }",
"public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }",
"public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }",
"public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }",
"public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }",
"public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }",
"public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }",
"public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }",
"public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }",
"public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }",
"public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }",
"public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }",
"public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}",
"public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }",
"public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}",
"public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }",
"public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }",
"public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }",
"public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }",
"public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }",
"public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }",
"public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}",
"public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }",
"public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }",
"public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }",
"public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }",
"public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }",
"public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }",
"public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }",
"public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }",
"public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }",
"public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }",
"public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }",
"public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }",
"public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }",
"public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }",
"public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}",
"public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }",
"public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }",
"public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }",
"public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }",
"public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }",
"public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }",
"public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }",
"public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }"
] | [
"0.8013876",
"0.79804534",
"0.7976992",
"0.79542726",
"0.79511505",
"0.7949612",
"0.794459",
"0.7942486",
"0.7938189",
"0.79368967",
"0.79337025",
"0.78924936",
"0.78811055",
"0.78790957",
"0.78787595",
"0.787547",
"0.7871811",
"0.78701615",
"0.7851422",
"0.7850352",
"0.7841468",
"0.7834583",
"0.7827792",
"0.7819104",
"0.78088796",
"0.7802872",
"0.7802348",
"0.78006834",
"0.77989215",
"0.7795819",
"0.77903426",
"0.77884805",
"0.77862066",
"0.7778816",
"0.7777486",
"0.7765202",
"0.7762492",
"0.77623445",
"0.77621746",
"0.7761383",
"0.77606887",
"0.77596676",
"0.7757001",
"0.7753607",
"0.7749522",
"0.7749292",
"0.77466977",
"0.7729947",
"0.77289546",
"0.772796",
"0.77167094",
"0.7714503",
"0.77140456",
"0.77132195",
"0.771243",
"0.77122366",
"0.7711113",
"0.77109736",
"0.7710777",
"0.7710086",
"0.7705484",
"0.770464",
"0.7704354",
"0.7704061",
"0.77027386",
"0.77020216",
"0.77008796",
"0.7698617",
"0.76985973",
"0.76973504",
"0.7696405",
"0.7694293",
"0.7692694",
"0.7691264",
"0.7690576",
"0.76882726",
"0.7687433",
"0.7686844",
"0.7686498",
"0.7685065",
"0.7683827",
"0.7679184",
"0.7678287",
"0.76776296",
"0.76767945",
"0.76726556",
"0.76708084",
"0.76690495",
"0.766872",
"0.76686716",
"0.7666299",
"0.76625943",
"0.7662227",
"0.76613766",
"0.7659881",
"0.7656644",
"0.76539344",
"0.76535016",
"0.7652375",
"0.7652313",
"0.7652022"
] | 0.0 | -1 |
Attempt to decode the incoming RAW post data from JSON. | function decodificarJSON($content)
{
$arrayObjetos = json_decode($content, true);
//If json_decode failed, the JSON is invalid.
if(!is_array($arrayObjetos))
{
throw new Exception('Received content contained invalid JSON!');
}
return $arrayObjetos;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function retrieveJsonPostData()\n {\n $rawData = file_get_contents(\"php://input\");\n // this returns null if not valid json\n return json_decode($rawData);\n }",
"public static function decodeJSON()\n {\n $body = file_get_contents('php://input');\n $object = json_decode($body);\n \n return $object;\n }",
"public function decode()\n {\n return json_decode(trim($this->body), true);\n }",
"public function decode($json);",
"private function _JsonData() \n {\n $raw = file_get_contents('php://input', true);\n $body = json_decode($raw);\n \n $this->__new((array) $body);\n }",
"function get_JSON_input()\n {\n global $_json_input;\n if ( $_json_input != null ) return $_json_input;\n\n // Receive the RAW post data.\n $content = trim(file_get_contents(\"php://input\"));\n\n // Attempt to decode the incoming RAW post data from JSON.\n $_json_input = json_decode($content, true);\n\n // If json_decode failed, the JSON is invalid.\n if (!is_array($_json_input)) {\n return null;\n }\n\n return $_json_input;\n }",
"protected function getJsonDecodedFromPost(){\n // $this->app->response()->header(\"Content-Type\", \"application/json\");\n // obtain the JSON of the body of the request\n $post = json_decode($this->app->request()->getBody(), true); // make it a PHP associative array\n return $post;\n }",
"protected function get_decoded_data() {\n return json_decode($this->get_data());\n }",
"public function decode($data) {}",
"public function decode($data) {}",
"public function decode($data) {}",
"public function decode($data) {}",
"public function decode($data) {}",
"private function decode_data ( $data ) {\n $cleanedData = $this->security->xss_clean ( $data );\n return json_decode ( $cleanedData, true ); \n }",
"public function decode($raw);",
"public function decode ($raw);",
"abstract public function decode($data);",
"function decode($json) {\n\t\t// Use the native function if possible\n\t\tif (function_exists('json_decode')) return json_decode($json);\n\n\t\t// Otherwise fall back on the JSON services library\n\t\t$jsonServices = $this->_getJsonServices();\n\t\treturn $jsonServices->decode($json);\n\t}",
"private function decodeResponseBody() {\n $type = $this->headers['content-type'];\n\n // Edge cases\n if (!$type)\n return $body;\n if ($this->body === null || $this->body === '')\n return $this->body;\n\n // JSON\n if (preg_match('@^application/json@', $type) === 1) {\n $decoded = json_decode($this->body, \n true, // Decode as an associative array (instead of object)\n 512, // Max stack depth for recursion\n JSON_BIGINT_AS_STRING); // Encode big ints as strings (instead of floats)\n\n if ($decoded === null) {\n // null is ambiguous in its meaning...\n $errorCode = json_last_error();\n if ($errorCode === JSON_ERROR_NONE) {\n // Really decoded a null\n return $decoded;\n }\n else {\n // Decode failed\n\n // Build JSON error message lookup\n $jsonErrors = [];\n $constants = get_defined_constants(true);\n $prefix = 'JSON_ERROR_';\n foreach ($constants['json'] as $name => $value) {\n if (strncmp($name, $prefix, strlen($prefix)) === 0)\n $jsonErrors[$value] = $name;\n }\n\n $message = $jsonErrors[$errorCode];\n if (!$message)\n $message = \"Unknown error code: $errorCode\";\n\n throw new WebEntityCodecError(\"json_decode() failed: $message\");\n }\n }\n else {\n // Decode succeeded\n return $decoded;\n }\n }\n // XML\n elseif (preg_match('@^(application|text)/xml@', $type) === 1) {\n $document = new DOMDocument();\n $document->loadXML($this->body);\n return $document;\n }\n // as-is\n else {\n return $this->body;\n }\n }",
"protected function getDecodedJsonBody()\n {\n $decoded = json_decode($this->getBody(), true);\n if ($decoded === null)\n {\n throw new BadJsonException(\n \"The JSON body could not be decoded\"\n );\n }\n\n return $decoded;\n }",
"public function decode($data);",
"private function safeDecode(string $json)\n {\n $decoded = json_decode($json, true);\n if (json_last_error() !== JSON_ERROR_NONE) {\n $err = json_last_error_msg();\n throw new JsonFormatException(\n \"Unable to parse invalid JSON ($err): $json\",\n JsonPath::root()\n );\n }\n return $decoded;\n }",
"public function decode($data) {\n return $this->encoder->decode($data->get('json_data'), \"json\");\n }",
"public static function DecodeJson (& $jsonStr);",
"private function process($data) {\n\t\treturn json_decode($data, true);\n\t}",
"protected static function data_decode($data) {\n //Return decoded data\n\t\t\tif (! self::valid($data)) {\n\t\t\t\t//Return a stdObj with failure codes and message\n\t\t\t\t$failure = new stdClass();\n\t\t\t\t$failure->code = -1;\n\t\t\t\t$failure->message = 'OandaWrap throws curl error: ' . curl_error(self::$socket);\n\n\t\t\t\treturn $failure;\n\t\t\t}\n\n\t\t\treturn json_decode(($decoded = @gzinflate(substr($data,10,-8))) ? $decoded : $data);\n\t\t}",
"public function decode($data)\n {\n $decoded = @json_decode($data, true);\n if ($decoded && isset($decoded['content']))\n return $decoded['content'];\n else\n return null;\n }",
"function decode_json($json) {\n\t$json = stripslashes($json);\n\n\tif(get_magic_quotes_gpc()) {\n\t}\n\treturn is_string($json) ? json_decode(str_replace('\\\"', '\"', $json), true) : $json;\n}",
"public function decode($rawContent);",
"function jsonDecode($json){\n return json_decode($json) ?? [];\n}",
"public function deserialize($json);",
"public function ParsePostData() {}",
"abstract public function getRawPostPayload() : array;",
"protected function decodeArrrayJsonContent()\n {\n return json_decode($this->getJsonContent(), true);\n }",
"protected function mapJson() {\n $post = json_decode(file_get_contents('php://input'), true);\n if(is_null($post)) return;\n foreach($post as $key => $value) {\n $this->data[$key] = $value;\n }\n }",
"public function parsePostData()\n {\n }",
"function getDecodedResponse () {\n if (function_exists('json_decode')) {\n return json_decode($this->responseBody, true);\n } else {\n return $this->responseBody;\n }\n }",
"private function getPostData() {\n\t\t$data = null;\n\t\t\n\t\t// Get from the POST global first\n\t\tif (empty($_POST)) {\n\t\t\t// For API calls we need to look at php://input\n\t\t\tif (!empty(file_get_contents('php://input'))) {\n\t\t\t\t$data = @json_decode(file_get_contents('php://input'), true);\n\t\t\t\tif ($data === false || $data === null) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//TODO: What is this for? isn't 'php://input' always empty at this point?\n\t\t\t\t$dataStr = file_get_contents('php://input');\n\t\t\t\tparse_str($dataStr, $data);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$data = $_POST;\n\t\t}\n\t\t\n\t\t// Normalize boolean values\n\t\tforeach ($data as $name => &$value) {\n\t\t\tif ($value === 'true') {\n\t\t\t\t$value = true;\n\t\t\t}\n\t\t\telse if ($value === 'false') {\n\t\t\t\t$value = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $data;\n\t}",
"protected function decodedBody()\n\t{\n\t\ttry {\n\t\t\treturn $this->response->json();\n\t\t} catch (Exception $e) {\n\t\t\tthrow new ParserException($e->getMessage(), $e->getCode());\n\t\t}\n\t}",
"public static function jsonDecode($json) {\n $data = json_decode($json);\n self::checkJsonError();\n return $data;\n }",
"private function convertFromJson() {\n if ($this->value == null) {\n $this->data = null;\n return;\n }\n\n // array\n $data = trim($this->value);\n if ($data == '[]') {\n $this->data = [];\n return;\n }\n\n // null value (as string)\n if (mb_strtolower($data) == 'null') {\n $this->data = null;\n return;\n }\n\n // is object\n $json = json_decode($data);\n if ($json != null) {\n $this->data = $json;\n return;\n }\n\n // simple type: numberic or string\n $this->data = $data;\n $data = mb_strtolower($data);\n if ($data == 'false') $this->data = false;\n else if ($data == 'true') $this->data = true;\n else if (is_int($data)) $this->data = (int)$data;\n else if (is_float($data)) $this->data = (float)$data;\n else if (is_double($data)) $this->data = (double)$data;\n }",
"public function decode(string $json): array;",
"protected function decodeJson(string $json): mixed\n {\n return json_decode($json, $this->decodesToArray, $this->depth, JSON_THROW_ON_ERROR);\n }",
"protected static function _rawurldecode($data){\n\n\t\tif(is_object($data)){\n\n\t\t\t$result = (object) static::_rawurldecode_object($data);\n\n\t\t}elseif(is_array($data)){\n\n\t\t\t$result = (array) static::_rawurldecode_array($data); \n\n\t\t}else{\n\n\t\t\t$result = rawurldecode($data);\n\t\t}\n\n\t\treturn $result;\n\t}",
"public function decode ($raw) {\n\t\t$this->data = $raw;\n\t\t$this->data = $raw;\n\t\treturn array();\n\t}",
"public function receive() {\n $this->_failIfNotAJsonRpcRequest();\n try {\n if (!$this->_request = $this->getInputData()) {\n throw new JsonRpcException('JSON cannot be decoded', JsonRpcException::PARSE_ERROR);\n }\n $this->_failIfRequestIsInvalid($this->_request);\n \n return $this->_request;\n } catch (JsonRpcException $e) {\n /*die(json_encode(array(\n 'jsonrpc' => $this->version,\n 'id' => isset($this->_request['id']) ? $this->_request['id'] : null,\n 'error' => $e->getErrorAsArray(),\n )));*/\n $this->_error = $e->getErrorAsArray();\n return false;\n }\n }",
"public static function decode(?string $json)\n {\n // The typehint is left as ?string for backwards compatibility\n if ($json === NULL) {\n throw new InvalidJSONException('Invalid JSON: Cannot decode a null value');\n }\n\n $result = json_decode($json, TRUE);\n\n if (json_last_error() !== JSON_ERROR_NONE) {\n throw new InvalidJSONException('Invalid JSON: '.json_last_error_msg());\n }\n\n return $result;\n }",
"public function json_decode($obj) {\r\n // Try to use native PHP 5.2+ json_encode\r\n // Switch back to JSON library included with Tiny MCE\r\n if(function_exists('json_decode')){\r\n return @json_decode($obj);\r\n } else {\r\n require_once(ABSPATH.\"/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/JSON.php\");\r\n $json_obj = new Moxiecode_JSON();\r\n $json = $json_obj->decode($obj);\r\n return $json;\r\n }\r\n }",
"public function decode_params( $params ) {\r\r\n /**\r\r\n * New method for future use.\r\r\n * Detects if there is a _decode_ prefixed input for the current field.\r\r\n * If so, then decodes and overrides the posted value.\r\r\n */\r\r\n foreach ($params as $k=>$v) {\r\r\n if (gettype($v) === \"string\" && substr($v, 0, strlen('_decode_')) == '_decode_') {\r\r\n $real_v = substr($v, strlen('_decode_'));\r\r\n $params[$k] = json_decode(base64_decode($real_v), true);\r\r\n }\r\r\n }\r\r\n return $params;\r\r\n }",
"function decode($x) {\n return NULL === ($obj = json_decode($x, FALSE)) ? $this->error('Parse error.', -32700) : $obj;\n }",
"public function parse($request)\r\n {\r\n $data = json_decode($request);\r\n $isError = true;\r\n switch (json_last_error()) {\r\n case JSON_ERROR_NONE:\r\n // No errors\r\n $isError = false;\r\n break;\r\n case JSON_ERROR_DEPTH:\r\n $this->errors[] = 'Maximum stack depth exceeded';\r\n break;\r\n case JSON_ERROR_STATE_MISMATCH:\r\n $this->errors[] = 'Underflow or the modes mismatch';\r\n break;\r\n case JSON_ERROR_CTRL_CHAR:\r\n $this->errors[] = 'Unexpected control character found';\r\n break;\r\n case JSON_ERROR_SYNTAX:\r\n $this->errors[] = 'Syntax error, malformed JSON';\r\n break;\r\n case JSON_ERROR_UTF8:\r\n $this->errors[] = 'Malformed UTF-8 characters, possibly incorrectly encoded';\r\n break;\r\n default:\r\n $this->errors[] = 'Unknown error';\r\n break;\r\n }\r\n return $isError ? NULL : $data;\r\n }",
"function json_decode_with_decrypt($paramHttpRawPostData)\n\t{\n\t\tglobal $result_string;\n\t\t$datetime_part_of_string = \"\";\n\t\t//echo \"Hi! <br />\\r\\n\";\n\t\t$result_string = \"\";\n\t\tif(!is_null($paramHttpRawPostData))\n\t\t{\n\t\t\t//echo \"Current Server DateTime |\".date(\"Y-m-d H:i:s\").\"|<br />\\r\\nAs Timestamp |\".var_export(date(\"U\"),true).\"|\";\n\t\t\t$decoded_http_raw_post_data = base64_decode(trim($paramHttpRawPostData) , false);\n\t\t\t//v a r _ d u m p($decoded_http_raw_post_data);\n\t\t\t$decoded_http_raw_post_data_as_array = unpack(\"C*\" , $decoded_http_raw_post_data);\n\t\t\t//echo str_replace(var_export($decoded_http_raw_post_data_as_array,true),array('\\r','\\n'),'');\n\t\t\t//echo '<br />\\r\\n';\n\t\t\tif(is_array($decoded_http_raw_post_data_as_array)&&(!is_null($decoded_http_raw_post_data_as_array)))\n\t\t\t{\n\t\t\t\tif(count($decoded_http_raw_post_data_as_array)>=19)\n\t\t\t\t{\n\t\t\t\t\t$ii = 0;\n\t\t\t\t\tfor($ii=count($decoded_http_raw_post_data_as_array)-1;($ii>1)&&(!is_null($decoded_http_raw_post_data_as_array[$ii-1]));$ii--)\n\t\t\t\t\t{\n\t\t\t\t\t\t$decoded_http_raw_post_data_as_array[$ii] ^= $decoded_http_raw_post_data_as_array[$ii-1];\n\t\t\t\t\t\t$result_string = chr($decoded_http_raw_post_data_as_array[$ii]) . $result_string;\n\t\t\t\t\t\tif($ii<18)\n\t\t\t\t\t\t\t$datetime_part_of_string .= chr($decoded_http_raw_post_data_as_array[$ii]);\n\t\t\t\t\t}\n\t\t\t\t\tif(($ii>=1)?(is_null($decoded_http_raw_post_data_as_array[$ii-1])):$ii==0)\n\t\t\t\t\t\tswitch($decoded_http_raw_post_data_as_array[$ii])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t$decoded_http_raw_post_data_as_array[$ii] = '6';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t$decoded_http_raw_post_data_as_array[$ii] = '8';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t$decoded_http_raw_post_data_as_array[$ii] = '7';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\t$decoded_http_raw_post_data_as_array[$ii] = '9';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\t$decoded_http_raw_post_data_as_array[$ii] = '3';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 5:\n\t\t\t\t\t\t\t\t$decoded_http_raw_post_data_as_array[$ii] = '5';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 6:\n\t\t\t\t\t\t\t\t$decoded_http_raw_post_data_as_array[$ii] = '4';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 7:\n\t\t\t\t\t\t\t\t$decoded_http_raw_post_data_as_array[$ii] = '0';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 8:\n\t\t\t\t\t\t\t\t$decoded_http_raw_post_data_as_array[$ii] = '2';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t$decoded_http_raw_post_data_as_array[$ii] = '1';\n\t\t\t\t\t\t}\n\t\t\t\t\t//$result_string = var_export($decoded_http_raw_post_data_as_array[0],true) . \"|\" . var_export($decoded_http_raw_post_data_as_array[1],true) . \"|\" . var_export($decoded_http_raw_post_data_as_array[2],true) . \"|\" . $result_string;\n\t\t\t\t\t$result_string = $decoded_http_raw_post_data_as_array[$ii] . $result_string;\n\t\t\t\t\t$datetime_part_of_string .= $decoded_http_raw_post_data_as_array[$ii];\n\t\t\t\t\t$datetime_part_of_string = trim($datetime_part_of_string);\n\t\t\t\t\t$datetime_timestamp = mktime( intval(substr($datetime_part_of_string,8,2)) , intval(substr($datetime_part_of_string,10,2)) , ((intval(substr($datetime_part_of_string,14))>=500)?1:0)+intval(substr($datetime_part_of_string,12,2)) , intval(substr($datetime_part_of_string,4,2)) , intval(substr($datetime_part_of_string,6,2)) , intval(substr($datetime_part_of_string,0,4)) );\n\t\t\t\t\t//$datetime_timestamp -= 25200; // Shift it to GMT (Greenich Mean Time)\n\t\t\t\t\t$server_timestamp = intval(date(\"U\"));\n\t\t\t\t\t$result_string = trim($result_string);\n\t\t\t\t\t//$resultFile = fopen(\"result_\".mb_substr($result_string , 0 , 17).\".txt\",\"w\");\n\t\t\t\t\t//fwrite($resultFile , $result_string);\n\t\t\t\t\t//fclose($resultFile);\n\t\t\t\t\t$json_part_of_string = mb_substr($result_string , 17);\n\t\t\t\t\tif(abs($datetime_timestamp-$server_timestamp)<=120)\n\t\t\t\t\t{\n\t\t\t\t\t\t//echo $json_part_of_string;\n\t\t\t\t\t\t//$jsonFile = fopen(\"apk-downloader-checker_\".mb_substr($result_string , 0 , 17).\".json\",\"w\");\n\t\t\t\t\t\t//fwrite($jsonFile , $json_part_of_string);\n\t\t\t\t\t\t//fclose($jsonFile);\n\t\t\t\t\t\treturn json_decode($json_part_of_string , true);\n\t\t\t\t\t\t////return $result_string;\n\t\t\t\t\t\t////return $json_part_of_string;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t////$json_part_of_string .= \";datetime_part_of_string='\".$datetime_part_of_string.\"';timestamp_diff=\".abs($datetime_timestamp-$server_timestamp);\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t// e c h o \"Gap \".abs($datetime_timestamp-$server_timestamp).\" seconds | Proper gap ? \".(?\"true\":\"false\").\"<br />\\r\\n|<br />\\r\\nDateTime Part |\".$datetime_part_of_string.\"|<br />\\r\\nJSON Part |\".$json_part_of_string.\"|\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}",
"function _postDecode($url) {\n\t\t$uri = parse_url($url);\n\t\tif (!$uri) {\n\t\t\treturn null;\n\t\t}\n\t\t$data = $uri['query'];\n\t\tunset($uri['query']);\n\n\t\tApp::import('Core', 'HttpSocket');\n\t\t$this->client = new HttpSocket;\n\t\t$result = $this->client->post($uri, $data);\n\t\tif (empty($result)) {\n\t\t\treturn null;\n\t\t}\n\t\t$result = json_decode($result);\n\t\treturn $result;\n\t}",
"public function fromJson() {\n return json_decode($this->getRequest()->getContent(),true);\n }",
"protected function getData()\n {\n if($this->jsonData === null)\n {\n $rawData = parent::getData();\n $this->jsonData = json_decode($rawData, true); // the second parameter turns JSON-objects into associative arrays which makes extracting the record fields easier\n if ($this->jsonData === null)\n {\n $error = json_last_error();\n // In case of an error 500, FF 6.6 does not return valid JSON; try to fix it\n $this->jsonData = json_decode('{'.$rawData.'}', true);\n if ($this->jsonData === null)\n throw new InvalidArgumentException('json_decode() raised error '.$error);\n }\n }\n return $this->jsonData;\n }",
"private function unpackData()\n {\n return json_decode($this->packedData, true);\n }",
"function base64decode($data, $strict = false) {\n $data = json_decode(base64_decode(base64_decode($data)));\n\n return $data;\n}",
"protected function handleResponse($raw){\n $data = json_decode($raw,true);\n\n if(!empty($data[\"error\"])){\n $reason = $data[\"error\"][\"errors\"][0][\"reason\"];\n $msg = $data[\"error\"][\"errors\"][0][\"message\"];\n\n switch ($reason) {\n case 'keyInvalid':\n throw new GoogleAuthException;\n break;\n\n default:\n throw new GoogleErrorException(\"Reason: {$reason}. Message: {$msg}.\");\n break;\n }\n }\n\n return $data;\n }",
"public function getDecodedJsonData()\n {\n return $this->decodedJsonData;\n }",
"protected function decode($value) {\n\t\tif (defined('JSON_PARSER_NOTSTRICT')) {\n\t\t\treturn json_decode($value, false, 512, JSON_PARSER_NOTSTRICT);\n\t\t}\n\t\treturn json_decode($value);\n\t}",
"public static function json()\n {\n return json_decode(file_get_contents('php://input'), true);\n }",
"public static function json()\n {\n return json_decode(file_get_contents('php://input'), true);\n }",
"public function decode($item)\n {\n $result = json_decode($item, true);\n if (!(is_array($result) && isset($result['type']))) {\n throw new dropr_Client_Exception('broken JSON string or no type specified: ' . $item . '('.gettype($result).')');\n }\n $item = $result['item'];\n if (!settype($item, $result['type']))\n throw new dropr_Client_Exception('invalid type: ' . $result['type']);\n return $item;\n }",
"protected function decodeData($value) {\n\t\treturn wireDecodeJSON($value);\n\t}",
"abstract public function parsePostData() : array;",
"protected function getBody()\n {\n $body = file_get_contents('php://input');\n json_decode($body);\n if(json_last_error() == JSON_ERROR_NONE){\n return json_decode($body);\n }else{\n return false;\n }\n }",
"public static function jsonDecode($rawResult)\n {\n return json_decode($rawResult);\n }",
"public static function parseJSON($json) {\n\t\tif (function_exists('json_decode')) {\n\t\t\t$return = json_decode(trim($json), true);\n\t\t\t// json_decode and UTF8 issues\n\t\t\tif (isset($return))\n\t\t\t\treturn $return;\n\t\t}\n\t\trequire_once('Zend/Json/Decoder.php');\n\t\treturn Zend_Json_Decoder::decode($json);\n\t}",
"protected function decodeResponse($body) {\n return json_decode(mb_convert_encoding($body, 'UTF-8', 'UTF-16LE'), TRUE);\n }",
"public function deserialize($data);",
"public function decode(string $json)\n {\n // max depth is 0+ for json_encode(), and 1+ for json_decode()\n $result = json_decode($json, $this->decodeObjectAsArray, $this->maxDepth + 1, $this->options);\n\n $this->checkLastError();\n\n return $result;\n }",
"function parse() {\r\n\t\t/* JSON */\r\n\t\tif (strpos ( $this->response_content_type, \"application/json\" ) !== false) {\r\n\t\t\t$this->response_parsed = json_decode($this->response_body);\r\n\t\t\t/* JSON STREAM */\r\n\t\t} elseif (strpos ( $this->response_content_type, \"json-stream\" ) !== false) {\r\n\t\t\t$stream = split ( \"\\n\", $this->response_body );\r\n\t\t\tif (count ( $stream ) < $stream [0] ['ResultLength']) {\r\n\t\t\t\t// echo \"Invalid JSON Stream. Result Length:\".count($stream);\r\n\t\t\t\t$this->client->status_code = 400;\r\n\t\t\t\t$GLOBALS ['ResultStack']->pushNew ( \"Invalid JSON Stream\", ERROR );\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t$jsonServer = new JSON ( JSON_LOOSE_TYPE );\r\n\t\t\t$this->response_parsed = array ();\r\n\t\t\tforeach ( $stream as $line )\r\n\t\t\t\t$this->response_parsed [] = $jsonServer->decode ( $line );\r\n\t\t\t/* DEFAULT */\r\n\t\t} else {\r\n\t\t\t$this->response_parsed = $this->response_body;\r\n\t\t}\r\n\t}",
"protected function decodeData($data)\n {\n if ($this->base64encode) {\n if (is_string($data)) {\n if (($data = base64_decode($data)) !== false) {\n $data = unserialize($data);\n } else {\n $data = null;\n }\n } else {\n $data = null;\n }\n }\n return $data;\n }",
"private function ProcessMessage($message) {\n\t\tif($message !== false) {\n\t\t\t$message = json_decode($message, true);\n\t\t\tif($message !== false) {\n\t\t\t\t$this->Consume($message['id'], $message['content']);\n\t\t\t} else throw new Exception('Error while decoding json message');\n\t\t}\n\t}",
"public static function jsonDecode($string)\n {\n if ($string) {\n $json = json_decode($string, true);\n // if json_decode failed\n if ($json === null) {\n self::jsonLastError();\n }\n return $json;\n } else {\n return false;\n }\n }",
"public static function Decode($json, $toAssoc = false) {\n if(substr($json, 0, 3) == pack(\"CCC\", 0xEF, 0xBB, 0xBF)) $json = substr($json, 3);\n \n try {\n $result = json_decode(trim($json), $toAssoc);\n $state = json_last_error();\n if ($state !== JSON_ERROR_NONE) {\n $error = JSON::getErrorMessage($state);\n throw new JsonDecodeException(\"JSON Error ({$state}): {$error}\"); \n }\n } catch (JsonDecodeException $e){\n $line = trim(date(\"[d/m @ H:i:s]\") . $e->getMessage()) . \"\\n\";\n if (preg_match('/<html[^>]{0,}>/i', $json)) {\n $message = preg_match('/<title>(.*)<\\/title>/i', $json);\n $line = trim(\"Error: \" . $message[1]) . \"\\n\";\n } else {\n $line = trim(\"Debug:\\n-->\\n\" . $json) . \"\\n<--\\n\";\n } \n error_log($line, 3, LOG_FILE);\n return false;\n }\n \n return $result;\n }",
"function deserialise(string $data): void;",
"#[Pure]\n public function getRawPostData() {}",
"public function decodeData($event)\n {\n $this->owner->{$this->dataAttribute} = Json::decode($this->owner->{$this->dataAttribute});\n }",
"protected static function jsonDecode(string $json)\n {\n $data = json_decode($json);\n $error = json_last_error();\n\n if ($error !== JSON_ERROR_NONE) {\n throw new JsonException(sprintf(\n 'Unable to decode the given JSON string (%s).',\n $error\n ));\n }\n\n return $data;\n }",
"private function JsonDecode($obj)\n {\n $json = \\json_decode($obj);\n if ($json !== null) {\n $obj = $json;\n }\n return $obj;\n }",
"public static function parse(?string $json, ?int $type = 0, ?int $flags = 0): mixed\n {\n $json = (string) $json;\n\n // Add default flags.\n $flags |= self::PARSE_FLAGS;\n\n if ($type) {\n switch ($type) {\n case self::ARRAY:\n return (array) json_decode($json, true, flags: $flags);\n case self::OBJECT:\n return (object) json_decode($json, false, flags: $flags);\n }\n }\n\n // Normal decode process.\n return json_decode($json, flags: $flags);\n }",
"protected function _decode($body) {\n\t\t$media = $this->_classes['media'];\n\n\t\tif ($media::type($this->_type)) {\n\t\t\t$decoded = $media::decode($this->_type, $body);\n\t\t\t$body = $decoded !== null ? $decoded : $body;\n\t\t}\n\t\treturn $body;\n\t}",
"protected function _json_decode($str, $asArray = false)\n {\n $str = $this->_reduce_string($str);\n \n switch (strtolower($str)) {\n case 'true':\n // JSON_checker test suite claims\n // \"A JSON payload should be an object or array, not a string.\"\n // Thus, returning bool(true) is invalid parsing, unless\n // we're nested inside an array or object.\n if (in_array($this->_level, array(self::IN_ARR, self::IN_OBJ))) {\n return true;\n } else {\n return null;\n }\n break;\n \n case 'false':\n // JSON_checker test suite claims\n // \"A JSON payload should be an object or array, not a string.\"\n // Thus, returning bool(false) is invalid parsing, unless\n // we're nested inside an array or object.\n if (in_array($this->_level, array(self::IN_ARR, self::IN_OBJ))) {\n return false;\n } else {\n return null;\n }\n break;\n \n case 'null':\n return null;\n \n default:\n $m = array();\n \n if (is_numeric($str) || ctype_digit($str) || ctype_xdigit($str)) {\n // Return float or int, or null as appropriate\n if (in_array($this->_level, array(self::IN_ARR, self::IN_OBJ))) {\n return ((float) $str == (integer) $str)\n ? (integer) $str\n : (float) $str;\n } else {\n return null;\n }\n break;\n \n } elseif (preg_match('/^(\"|\\').*(\\1)$/s', $str, $m)\n && $m[1] == $m[2]) {\n // STRINGS RETURNED IN UTF-8 FORMAT\n $delim = substr($str, 0, 1);\n $chrs = substr($str, 1, -1);\n $utf8 = '';\n $strlen_chrs = strlen($chrs);\n \n for ($c = 0; $c < $strlen_chrs; ++$c) {\n \n $substr_chrs_c_2 = substr($chrs, $c, 2);\n $ord_chrs_c = ord($chrs{$c});\n \n switch (true) {\n case $substr_chrs_c_2 == '\\b':\n $utf8 .= chr(0x08);\n ++$c;\n break;\n case $substr_chrs_c_2 == '\\t':\n $utf8 .= chr(0x09);\n ++$c;\n break;\n case $substr_chrs_c_2 == '\\n':\n $utf8 .= chr(0x0A);\n ++$c;\n break;\n case $substr_chrs_c_2 == '\\f':\n $utf8 .= chr(0x0C);\n ++$c;\n break;\n case $substr_chrs_c_2 == '\\r':\n $utf8 .= chr(0x0D);\n ++$c;\n break;\n \n case $substr_chrs_c_2 == '\\\\\"':\n case $substr_chrs_c_2 == '\\\\\\'':\n case $substr_chrs_c_2 == '\\\\\\\\':\n case $substr_chrs_c_2 == '\\\\/':\n if (($delim == '\"' && $substr_chrs_c_2 != '\\\\\\'') ||\n ($delim == \"'\" && $substr_chrs_c_2 != '\\\\\"')) {\n $utf8 .= $chrs{++$c};\n }\n break;\n \n case preg_match('/\\\\\\u[0-9A-F]{4}/i', substr($chrs, $c, 6)):\n // single, escaped unicode character\n $utf16 = chr(hexdec(substr($chrs, ($c + 2), 2)))\n . chr(hexdec(substr($chrs, ($c + 4), 2)));\n $utf8 .= $this->_utf162utf8($utf16);\n $c += 5;\n break;\n \n case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F):\n $utf8 .= $chrs{$c};\n break;\n \n case ($ord_chrs_c & 0xE0) == 0xC0:\n // characters U-00000080 - U-000007FF, mask 110XXXXX\n //see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8\n $utf8 .= substr($chrs, $c, 2);\n ++$c;\n break;\n \n case ($ord_chrs_c & 0xF0) == 0xE0:\n // characters U-00000800 - U-0000FFFF, mask 1110XXXX\n // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8\n $utf8 .= substr($chrs, $c, 3);\n $c += 2;\n break;\n \n case ($ord_chrs_c & 0xF8) == 0xF0:\n // characters U-00010000 - U-001FFFFF, mask 11110XXX\n // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8\n $utf8 .= substr($chrs, $c, 4);\n $c += 3;\n break;\n \n case ($ord_chrs_c & 0xFC) == 0xF8:\n // characters U-00200000 - U-03FFFFFF, mask 111110XX\n // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8\n $utf8 .= substr($chrs, $c, 5);\n $c += 4;\n break;\n \n case ($ord_chrs_c & 0xFE) == 0xFC:\n // characters U-04000000 - U-7FFFFFFF, mask 1111110X\n // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8\n $utf8 .= substr($chrs, $c, 6);\n $c += 5;\n break;\n \n }\n \n }\n \n if (in_array($this->_level, array(self::IN_ARR, self::IN_OBJ))) {\n return $utf8;\n } else {\n return null;\n }\n \n } elseif (preg_match('/^\\[.*\\]$/s', $str) || preg_match('/^\\{.*\\}$/s', $str)) {\n // array, or object notation\n \n if ($str{0} == '[') {\n $stk = array(self::IN_ARR);\n $this->_level = self::IN_ARR;\n $arr = array();\n } else {\n if ($asArray) {\n $stk = array(self::IN_OBJ);\n $obj = array();\n } else {\n $stk = array(self::IN_OBJ);\n $obj = new stdClass();\n }\n $this->_level = self::IN_OBJ;\n }\n \n array_push($stk, array('what' => self::SLICE,\n 'where' => 0,\n 'delim' => false));\n \n $chrs = substr($str, 1, -1);\n $chrs = $this->_reduce_string($chrs);\n \n if ($chrs == '') {\n if (reset($stk) == self::IN_ARR) {\n return $arr;\n \n } else {\n return $obj;\n \n }\n }\n \n $strlen_chrs = strlen($chrs);\n \n for ($c = 0; $c <= $strlen_chrs; ++$c) {\n \n $top = end($stk);\n $substr_chrs_c_2 = substr($chrs, $c, 2);\n \n if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == self::SLICE))) {\n // found a comma that is not inside a string, array, etc.,\n // OR we've reached the end of the character list\n $slice = substr($chrs, $top['where'], ($c - $top['where']));\n array_push($stk, array('what' => self::SLICE, 'where' => ($c + 1), 'delim' => false));\n //print(\"Found split at {$c}: \".substr($chrs, $top['where'], (1 + $c - $top['where'])).\"\\n\");\n \n if (reset($stk) == self::IN_ARR) {\n $this->_level = self::IN_ARR;\n // we are in an array, so just push an element onto the stack\n array_push($arr, $this->_json_decode($slice));\n \n } elseif (reset($stk) == self::IN_OBJ) {\n $this->_level = self::IN_OBJ;\n // we are in an object, so figure\n // out the property name and set an\n // element in an associative array,\n // for now\n $parts = array();\n \n if (preg_match('/^\\s*([\"\\'].*[^\\\\\\][\"\\'])\\s*:\\s*(\\S.*),?$/Uis', $slice, $parts)) {\n // \"name\":value pair\n $key = $this->_json_decode($parts[1]);\n $val = $this->_json_decode($parts[2]);\n \n if ($asArray) {\n $obj[$key] = $val;\n } else {\n $obj->$key = $val;\n }\n } elseif (preg_match('/^\\s*(\\w+)\\s*:\\s*(\\S.*),?$/Uis', $slice, $parts)) {\n // name:value pair, where name is unquoted\n $key = $parts[1];\n $val = $this->_json_decode($parts[2]);\n \n if ($asArray) {\n $obj[$key] = $val;\n } else {\n $obj->$key = $val;\n }\n } elseif (preg_match('/^\\s*([\"\\'][\"\\'])\\s*:\\s*(\\S.*),?$/Uis', $slice, $parts)) {\n // \"\":value pair\n //$key = $this->_json_decode($parts[1]);\n // use string that matches ext/json\n $key = '_empty_';\n $val = $this->_json_decode($parts[2]);\n \n if ($asArray) {\n $obj[$key] = $val;\n } else {\n $obj->$key = $val;\n }\n }\n \n }\n \n } elseif ((($chrs{$c} == '\"') || ($chrs{$c} == \"'\")) && ($top['what'] != self::IN_STR)) {\n // found a quote, and we are not inside a string\n array_push($stk, array('what' => self::IN_STR, 'where' => $c, 'delim' => $chrs{$c}));\n //print(\"Found start of string at {$c}\\n\");\n \n } elseif (($chrs{$c} == $top['delim']) &&\n ($top['what'] == self::IN_STR) &&\n ((strlen(substr($chrs, 0, $c)) - strlen(rtrim(substr($chrs, 0, $c), '\\\\'))) % 2 != 1)) {\n // found a quote, we're in a string, and it's not escaped\n // we know that it's not escaped becase there is _not_ an\n // odd number of backslashes at the end of the string so far\n array_pop($stk);\n //print(\"Found end of string at {$c}: \".substr($chrs, $top['where'], (1 + 1 + $c - $top['where'])).\"\\n\");\n \n } elseif (($chrs{$c} == '[') &&\n in_array($top['what'], array(self::SLICE, self::IN_ARR, self::IN_OBJ))) {\n // found a left-bracket, and we are in an array, object, or slice\n array_push($stk, array('what' => self::IN_ARR, 'where' => $c, 'delim' => false));\n //print(\"Found start of array at {$c}\\n\");\n \n } elseif (($chrs{$c} == ']') && ($top['what'] == self::IN_ARR)) {\n // found a right-bracket, and we're in an array\n $this->_level = null;\n array_pop($stk);\n //print(\"Found end of array at {$c}: \".substr($chrs, $top['where'], (1 + $c - $top['where'])).\"\\n\");\n \n } elseif (($chrs{$c} == '{') &&\n in_array($top['what'], array(self::SLICE, self::IN_ARR, self::IN_OBJ))) {\n // found a left-brace, and we are in an array, object, or slice\n array_push($stk, array('what' => self::IN_OBJ, 'where' => $c, 'delim' => false));\n //print(\"Found start of object at {$c}\\n\");\n \n } elseif (($chrs{$c} == '}') && ($top['what'] == self::IN_OBJ)) {\n // found a right-brace, and we're in an object\n $this->_level = null;\n array_pop($stk);\n //print(\"Found end of object at {$c}: \".substr($chrs, $top['where'], (1 + $c - $top['where'])).\"\\n\");\n \n } elseif (($substr_chrs_c_2 == '/*') &&\n in_array($top['what'], array(self::SLICE, self::IN_ARR, self::IN_OBJ))) {\n // found a comment start, and we are in an array, object, or slice\n array_push($stk, array('what' => self::IN_CMT, 'where' => $c, 'delim' => false));\n $c++;\n //print(\"Found start of comment at {$c}\\n\");\n \n } elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == self::IN_CMT)) {\n // found a comment end, and we're in one now\n array_pop($stk);\n $c++;\n \n for ($i = $top['where']; $i <= $c; ++$i)\n $chrs = substr_replace($chrs, ' ', $i, 1);\n \n //print(\"Found end of comment at {$c}: \".substr($chrs, $top['where'], (1 + $c - $top['where'])).\"\\n\");\n \n }\n \n }\n \n if (reset($stk) == self::IN_ARR) {\n return $arr;\n \n } elseif (reset($stk) == self::IN_OBJ) {\n return $obj;\n \n }\n \n }\n }\n }",
"public function _unserialize($data)\n\t{\n\t\treturn json_decode($data, TRUE);\n\t}",
"public static function decode($jsonString) {\n\t\t\t$decoded = json_decode($jsonString);\n\t\t\tif (!$decoded) {\n\t\t\t\tthrow new JsonException(\"Couldn't parse string as JSON: \".self::getJsonErrorMessage(json_last_error()));\n\t\t\t} else {\n\t\t\t\treturn $decoded;\n\t\t\t}\n\t\t}",
"function asp_decode_params( $params ) {\r\r\n /**\r\r\n * New method for future use.\r\r\n * Detects if there is a _decode_ prefixed input for the current field.\r\r\n * If so, then decodes and overrides the posted value.\r\r\n */\r\r\n foreach ($params as $k=>$v) {\r\r\n if (gettype($v) === \"string\" && substr($v, 0, strlen('_decode_')) == '_decode_') {\r\r\n $real_v = substr($v, strlen('_decode_'));\r\r\n $params[$k] = json_decode(base64_decode($real_v), true);\r\r\n }\r\r\n }\r\r\n return $params;\r\r\n}",
"function JDecode($arr){\r\n\t\tif (version_compare(PHP_VERSION,\"5.2\",\"<\"))\r\n\t\t{ \r\n\t\t\trequire_once(\"./JSON.php\"); //if php<5.2 need JSON class\r\n\t\t\t$json = new Services_JSON();//instantiate new json object\r\n\t\t\t$data=$json->decode($arr); //decode the data in json format\r\n\t\t} else {\r\n\t\t\t$data = json_decode($arr); //decode the data in json format\r\n\t\t}\r\n\t\treturn $data;\r\n\t}",
"function JDecode($arr){\r\n\t\tif (version_compare(PHP_VERSION,\"5.2\",\"<\"))\r\n\t\t{ \r\n\t\t\trequire_once(\"./JSON.php\"); //if php<5.2 need JSON class\r\n\t\t\t$json = new Services_JSON();//instantiate new json object\r\n\t\t\t$data=$json->decode($arr); //decode the data in json format\r\n\t\t} else {\r\n\t\t\t$data = json_decode($arr); //decode the data in json format\r\n\t\t}\r\n\t\treturn $data;\r\n\t}",
"function JDecode($arr){\r\n\t\tif (version_compare(PHP_VERSION,\"5.2\",\"<\"))\r\n\t\t{ \r\n\t\t\trequire_once(\"./JSON.php\"); //if php<5.2 need JSON class\r\n\t\t\t$json = new Services_JSON();//instantiate new json object\r\n\t\t\t$data=$json->decode($arr); //decode the data in json format\r\n\t\t} else {\r\n\t\t\t$data = json_decode($arr); //decode the data in json format\r\n\t\t}\r\n\t\treturn $data;\r\n\t}",
"function JDecode($arr){\r\n\t\tif (version_compare(PHP_VERSION,\"5.2\",\"<\"))\r\n\t\t{ \r\n\t\t\trequire_once(\"./JSON.php\"); //if php<5.2 need JSON class\r\n\t\t\t$json = new Services_JSON();//instantiate new json object\r\n\t\t\t$data=$json->decode($arr); //decode the data in json format\r\n\t\t} else {\r\n\t\t\t$data = json_decode($arr); //decode the data in json format\r\n\t\t}\r\n\t\treturn $data;\r\n\t}",
"function getPayload($rawBody,$asArray = true)\n {\n $bodyObj = json_decode($rawBody);\n\n $decrypt = $this->crypt($bodyObj->payload, 'd');\n\n $payload = json_decode($decrypt, $asArray);\n\n return $payload;\n }",
"static function get_data_from_callback()\n {\n $callbackJSONData = file_get_contents('php://input');\n return json_decode($callbackJSONData);\n }",
"public function processResponseData($rawResponseData);",
"static public function application_json($request_body)\n {\n $decoded = json_decode($request_body);\n\n if (json_last_error() !== JSON_ERROR_NONE)\n throw HTTP_Exception::factory(500, 'PARSE_ERROR_JSON_DECODE');\n\n return $decoded;\n }",
"public function getBjPayload()\n {\n $decoded = base64_decode($this->payload);\n if ($decoded === false) {\n throw new \\RuntimeException('Base64 invalid: '.$this->payload);\n }\n $data = json_decode($decoded, true);\n $lastError = json_last_error();\n if ($lastError !== JSON_ERROR_NONE) {\n throw new \\RuntimeException('Json invalid, json_last_error = '.$lastError);\n }\n return $data;\n }",
"public static function maybe_decode_json( $value ) {\n\t\tif ( self::is_json( $value ) ) {\n\t\t\treturn json_decode( $value, ARRAY_A );\n\t\t}\n\n\t\treturn $value;\n\t}",
"public function deserialize($data)\n {\n }",
"public function getJsonBody()\n {\n $input = json_decode($this->getRawInput(), true);\n\n if (json_last_error()) {\n throw new UnexpectedValueException('JSON string has syntax errors or POST has no parameters');\n }\n\n return $input;\n }",
"public static function getJsonBody()\n {\n // Get content of body of HTTP message\n $body = file_get_contents('php://input');\n\n // Replace EOL's and tabs by a space character (these chars are forbidden to be used within json strings)\n $body = preg_replace(\"/[\\n\\r\\t]/\", \" \", $body);\n\n if ($json = @json_decode($body, true)) {\n return $json;\n }\n\n return null;\n }",
"static function jsonDecode($string, $message = false, $empty_array_is_ok = false) {\n $json = json_decode($string, true);\n if (!$json) {\n if ($empty_array_is_ok && is_array($json)) {\n // the result is an empty array\n return $json;\n }\n self::checkResponse($string);\n if (substr($string, 0, 1) == \"<\") {\n throw new ExternalAPIException(\"Unexpectedly received HTML instead of JSON\" . ($message ? \" $message\" : \"\"));\n }\n if (strpos(strtolower($string), \"invalid key\") !== false) {\n throw new ExternalAPIException(\"Invalid key\" . ($message ? \" $message\" : \"\"));\n }\n if (strpos(strtolower($string), \"bad api key\") !== false) {\n throw new ExternalAPIException(\"Bad API key\" . ($message ? \" $message\" : \"\"));\n }\n if (strpos(strtolower($string), \"access denied\") !== false) {\n throw new ExternalAPIException(\"Access denied\" . ($message ? \" $message\" : \"\"));\n }\n if (strpos(strtolower($string), \"parameter error\") !== false) {\n // for 796 Exchange\n throw new ExternalAPIException(\"Parameter error\" . ($message ? \" $message\" : \"\"));\n }\n if (!$string) {\n throw new EmptyResponseException('Response was empty' . ($message ? \" $message\" : \"\"));\n }\n throw new ExternalAPIException('Invalid data received' . ($message ? \" $message\" : \"\"));\n }\n return $json;\n }"
] | [
"0.7149263",
"0.68835807",
"0.6729324",
"0.66388774",
"0.6582044",
"0.6524215",
"0.6516565",
"0.63638896",
"0.6350524",
"0.6350524",
"0.6350524",
"0.6350524",
"0.6350524",
"0.63103044",
"0.6293077",
"0.62666774",
"0.62552595",
"0.6244853",
"0.6139509",
"0.61326444",
"0.609216",
"0.608481",
"0.6055325",
"0.60073805",
"0.5995611",
"0.5940132",
"0.5933962",
"0.59227794",
"0.59159863",
"0.5890653",
"0.5839899",
"0.58325064",
"0.5817259",
"0.5810592",
"0.5809436",
"0.5801526",
"0.57921296",
"0.5774322",
"0.57588494",
"0.57515395",
"0.5746408",
"0.5714833",
"0.5705164",
"0.56849164",
"0.5678145",
"0.56241006",
"0.5619304",
"0.5617129",
"0.5594455",
"0.5586067",
"0.55667526",
"0.5566591",
"0.55649984",
"0.55334514",
"0.55316573",
"0.5520984",
"0.55145276",
"0.55120516",
"0.5502222",
"0.54983956",
"0.54899484",
"0.54899484",
"0.54871726",
"0.5479438",
"0.54376173",
"0.5422126",
"0.5412886",
"0.5412595",
"0.5404696",
"0.54034686",
"0.54004306",
"0.5398967",
"0.539558",
"0.5384499",
"0.5375456",
"0.53678215",
"0.5365203",
"0.53627074",
"0.5351221",
"0.53485435",
"0.53445995",
"0.5343405",
"0.53428566",
"0.53411806",
"0.53353953",
"0.5328206",
"0.53233933",
"0.5322775",
"0.5322775",
"0.5322775",
"0.5322775",
"0.5320658",
"0.53099287",
"0.5306627",
"0.5301783",
"0.52876943",
"0.52789557",
"0.5275734",
"0.5273843",
"0.5268436",
"0.5266557"
] | 0.0 | -1 |
this up() migration is autogenerated, please modify it to your needs | public function up(Schema $schema) : void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('CREATE TABLE historico_ticket (id INT AUTO_INCREMENT NOT NULL, ticket_id INT NOT NULL, cliente_id INT NOT NULL, empleado_id INT NOT NULL, grupo_id INT NOT NULL, estado_id INT NOT NULL, fecha DATETIME NOT NULL, asunto VARCHAR(255) NOT NULL, mensaje LONGTEXT NOT NULL, respuesta LONGTEXT NOT NULL, INDEX IDX_30462644700047D2 (ticket_id), INDEX IDX_30462644DE734E51 (cliente_id), INDEX IDX_30462644952BE730 (empleado_id), INDEX IDX_304626449C833003 (grupo_id), INDEX IDX_304626449F5A440B (estado_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE historico_ticket ADD CONSTRAINT FK_30462644700047D2 FOREIGN KEY (ticket_id) REFERENCES ticket (id)');
$this->addSql('ALTER TABLE historico_ticket ADD CONSTRAINT FK_30462644DE734E51 FOREIGN KEY (cliente_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE historico_ticket ADD CONSTRAINT FK_30462644952BE730 FOREIGN KEY (empleado_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE historico_ticket ADD CONSTRAINT FK_304626449C833003 FOREIGN KEY (grupo_id) REFERENCES `group` (id)');
$this->addSql('ALTER TABLE historico_ticket ADD CONSTRAINT FK_304626449F5A440B FOREIGN KEY (estado_id) REFERENCES estado (id)');
$this->addSql('ALTER TABLE `group` DROP historico_ticket_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function up();",
"abstract public function up();",
"abstract public function up();",
"abstract public function up();",
"public function up()\n {\n $this->execute(\"\n ALTER TABLE `tcmn_communication` \n CHANGE `tcmn_pprs_id` `tcmn_pprs_id` SMALLINT(5) UNSIGNED NULL COMMENT 'person',\n CHANGE `tcmn_tmed_id` `tcmn_tmed_id` TINYINT(4) UNSIGNED NULL COMMENT 'medijs';\n \");\n }",
"public function up()\n {\n // This migration was removed, but fails when uninstalling plugin\n }",
"public function up()\n {\n $this->execute(\"\n\n ALTER TABLE `cucp_user_company_position` \n ADD COLUMN `cucp_role` CHAR(20) NULL AFTER `cucp_name`;\n\n \");\n }",
"public function up()\n\t{\n\t\t$this->dbforge->add_column($this->table, $this->field);\n\t}",
"public function migrateUp()\n {\n //$this->migrate('up');\n $this->artisan('migrate');\n }",
"public function up()\n {\n dbexec('ALTER TABLE #__subscriptions_coupons\n ADD `created_on` datetime DEFAULT NULL AFTER `usage`,\n ADD `created_by` bigint(11) unsigned DEFAULT NULL AFTER `created_on`,\n ADD INDEX `created_by` (`created_by`),\n ADD `modified_on` datetime DEFAULT NULL AFTER `created_by`,\n ADD `modified_by` bigint(11) unsigned DEFAULT NULL AFTER `modified_on`,\n ADD INDEX `modified_by` (`modified_by`) \n ');\n \n dbexec('ALTER TABLE #__subscriptions_vats\n ADD `created_on` datetime DEFAULT NULL AFTER `data`,\n ADD `created_by` bigint(11) unsigned DEFAULT NULL AFTER `created_on`,\n ADD INDEX `created_by` (`created_by`),\n ADD `modified_on` datetime DEFAULT NULL AFTER `created_by`,\n ADD `modified_by` bigint(11) unsigned DEFAULT NULL AFTER `modified_on`,\n ADD INDEX `modified_by` (`modified_by`) \n ');\n }",
"public function up()\n\t{\n\t\t$this->dbforge->modify_column($this->table, $this->field);\n\t}",
"public function safeUp()\n {\n $this->createTable(\n $this->tableName,\n [\n 'id' => $this->primaryKey(),\n 'user_id' => $this->integer(). ' UNSIGNED NOT NULL' ,\n 'source' => $this->string()->notNull(),\n 'source_id' => $this->string()->notNull(),\n ],\n 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'\n );\n\n $this->addForeignKey('fk_social_auth_user_id_to_user_id', $this->tableName, 'user_id', '{{%user}}', 'id', 'CASCADE', 'CASCADE');\n }",
"public function up()\n {\n }",
"public function up()\n {\n $user = $this->table('products', ['collation' => 'utf8mb4_persian_ci', 'engine' => 'InnoDB']);\n $user\n ->addColumn('name', STRING, [LIMIT => 20])\n ->addColumn('count', STRING, [LIMIT => 75])\n ->addColumn('code', STRING, [LIMIT => 100])\n ->addColumn('buy_price', STRING, [LIMIT => 30])\n ->addColumn('sell_price', STRING, [LIMIT => 30])\n ->addColumn('aed_price', STRING, [LIMIT => 50])\n ->addTimestamps()\n ->save();\n }",
"public function up()\n {\n // Drop table 'table_name' if it exists\n $this->dbforge->drop_table('lecturer', true);\n\n // Table structure for table 'table_name'\n $this->dbforge->add_field(array(\n 'nip' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => true,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'nik' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => false,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'name' => array(\n 'type' => 'VARCHAR(24)',\n 'null' => false,\n ),\n\t\t\t'id_study_program' => array(\n\t\t\t\t'type' => 'VARCHAR(24)',\n\t\t\t\t'null' => false,\n\t\t\t)\n\n ));\n $this->dbforge->add_key('nik', true);\n $this->dbforge->create_table('lecturer');\n }",
"public function up()\n\t{\n\t\t// are not setting the foreign key constraint, to allow the examination module to work without the intravitreal\n\t\t// injection module being installed\n\t\t$this->addColumn('et_ophciexamination_injectionmanagementcomplex', 'left_treatment_id', 'int(10) unsigned');\n\t\t$this->addColumn('et_ophciexamination_injectionmanagementcomplex', 'right_treatment_id', 'int(10) unsigned');\n\t}",
"public function safeUp()\n {\n $this->createTable('tbl_hand_made_item',\n [\n \"id\" => \"int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY\",\n \"price\" => \"integer\",\n \"discount\" => \"integer\",\n \"preview_id\" => \"integer\",\n \"name\" => \"string\",\n \"description\" => \"text\",\n \"short_description\" => \"text\",\n \"slug\" => \"string\",\n ]\n );\n }",
"public function preUp()\n {\n }",
"public function up()\n\t{\n\t\t// create the purchase_order_details table\n\t\tSchema::create('purchase_order_details', function($table) {\n\t\t\t$table->engine = 'InnoDB';\n\t\t $table->increments('id');\t\t \n\t\t $table->integer('purchase_order_id')->unsigned();//->foreign()->references('id')->on('orders');\n\t\t $table->integer('product_id')->unsigned();//->foreign()->references('id')->on('products');\n\t\t $table->integer('quantity');\t\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\t\t \n\t\t $table->integer('updated_by')->unsigned();\n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}",
"public function up()\n {\n if (!$this->isEdu()) {\n return;\n }\n \n $this->edu_up();\n }",
"public function up()\n\t{\t\t\n\t\tDB::table('professor')->insert(array(\n\t\t\t'user_id'=>'2',\t\t\t\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\t\t\n\n\t\tDB::table('professor')->insert(array(\n\t\t\t'user_id'=>'3',\t\t\t\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\n\t\t//\n\t}",
"public function up()\n {\n $table = $this->table('qobo_translations_translations');\n $table->renameColumn('object_foreign_key', 'foreign_key');\n $table->renameColumn('object_model', 'model');\n $table->renameColumn('object_field', 'field');\n $table->renameColumn('translation', 'content');\n\n if (!$table->hasColumn('locale')) {\n $table->addColumn('locale', 'char', [\n 'default' => null,\n 'limit' => 6,\n ]);\n }\n $table->update();\n\n $table = TableRegistry::getTableLocator()->get(\"Translations.Translations\");\n $entities = $table->find()->all();\n foreach($entities as $entity) {\n $entity->setDirty('locale', true);\n $table->save($entity);\n }\n }",
"public function up()\n {\n $this->addForeignKey('tours_fk', 'tours', 'id', 'tour_to_hotel', 'tour_id');\n\n $this->addForeignKey('t2h_fkh', 'tour_to_hotel', 'hotel_id', 'hotels', 'id');\n $this->addForeignKey('t2h_fkt', 'tour_to_hotel', 'tour_id', 'tours', 'id');\n }",
"public function safeUp()\r\n {\r\n $this->createTable('tbl_job_application', array(\r\n 'id' => 'pk',\r\n 'job_id' => 'integer NOT NULL',\r\n 'user_id' => 'integer NULL',\r\n 'name' => 'string NOT NULL',\r\n 'email' => 'text NOT NULL',\r\n 'phone' => 'text NOT NULL',\r\n 'resume_details' => 'text NOT NULL',\r\n 'create_date' => 'datetime NOT NULL',\r\n 'update_date' => 'datetime NULL',\r\n ));\r\n }",
"public function up()\n {\n $fields = array(\n 'first_login' => array('type' => 'char', 'constraint' => '1', 'default' => '1'),\n );\n $this->dbforge->add_column('user', $fields);\n }",
"public function safeUp() {\n\n $this->createTable('word', [\n 'word_id' => Schema::TYPE_PK,\n 'word_lang_id' => $this->integer(),\n 'word_name' => $this->string(500) . ' NOT NULL',\n 'word_detais' => $this->string(1000),\n ]);\n\n // Add foreign key\n $this->addForeignKey('fk_language_word_1', 'word',\n 'word_lang_id', 'language', 'lang_id', 'CASCADE', 'NO ACTION');\n \n // Create index of foreign key\n $this->createIndex('word_lang_id_idx', 'word', 'word_lang_id');\n }",
"public function safeUp()\n {\n $this->alterColumn('item_keuangan', 'created_at', \"TIMESTAMP NOT NULL DEFAULT '2000-01-01 00:00:00'\");\n\n /* Tambah Field */\n $this->addColumn('item_keuangan', 'status', \"TINYINT(1) NOT NULL DEFAULT '1' COMMENT '0=tidak aktif; 1=aktif;' AFTER `jenis`\");\n }",
"public function up()\n {\n $this->addForeignKey(\n 'fk_category_product_from_category',\n 'category_product',\n 'category_id',\n 'category',\n 'id',\n 'NO ACTION',\n 'NO ACTION'\n );\n\n $this->addForeignKey(\n 'fk_category_product_from_product',\n 'category_product',\n 'product_id',\n 'product',\n 'id',\n 'NO ACTION',\n 'NO ACTION'\n );\n }",
"public function up()\n\t{\n\t\t$this->dropColumn('korzet','utca'); \n\t\t$this->addColumn('korzet','utca','string NOT NULL');\n\t}",
"public function up()\n {\n // $this->fields()->create([]);\n // $this->streams()->create([]);\n // $this->assignments()->create([]);\n }",
"public function up()\n {\n Schema::table($this->table, function (Blueprint $table) {\n // $table->bigInteger('user_id')->default(0)->after('id'); // Example\n $table->dropColumn([\n // 'user_id', // Example\n ]);\n });\n }",
"public function up()\n {\n $table = $this->table('admins');\n $table->addColumn('name', 'string')\n ->addColumn('role', 'string')\n ->addColumn('username', 'string')\n ->addColumn('password', 'string')\n ->addColumn('created', 'datetime')\n ->addColumn('modified', 'datetime', ['null' => true])\n ->create();\n\n\n $data = [ \n [\n 'name' => 'Pedro Santos', \n 'username' => '[email protected]',\n 'password' => '101010',\n 'role' => 'Suporte',\n 'modified' => false\n ],\n ];\n\n $adminTable = TableRegistry::get('Admins');\n foreach ($data as $value) {\n $adminTable->save($adminTable->newEntity($value));\n }\n }",
"public function up(): void\n {\n try {\n // SM: We NEVER delete this table.\n if ($this->db->tableExists('prom2_pages')) {\n return;\n }\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"CREATE TABLE `prom2_pages` (\n `cntPageID` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `txtRelativeURL` varchar(255) NOT NULL COMMENT 'Relative URL',\n `txtTitle` varchar(70) NOT NULL COMMENT 'Title',\n `txtContent` text NOT NULL COMMENT 'Content',\n `blnRobots_DoNotAllow` bit(1) NOT NULL DEFAULT b'1',\n PRIMARY KEY (`cntPageID`),\n UNIQUE KEY `txtRelativeURL` (`txtRelativeURL`),\n KEY `txtTitle` (`txtTitle`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }",
"public function up()\n\t{\n\t\t// Add data to committee-members\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Brian O\\'Sullivan',\n\t\t\t'role' => 'Chairman',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => '[email protected]'\n\t\t));\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Anthony Barker',\n\t\t\t'role' => 'PRO',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => '[email protected]'\n\t\t));\t\t\n\t}",
"public function up()\n {\n $this->query(\"UPDATE `subscription_types` SET `user_label` = `name` WHERE `user_label` = '' OR `user_label` IS NULL;\");\n\n $this->table('subscription_types')\n ->changeColumn('user_label', 'string', ['null' => false])\n ->update();\n }",
"public function safeUp()\n\t{\n $sql = <<<SQL\n alter table r add R8 inte;\nSQL;\n\t\t//$this->execute($sql);\n $sql = <<<SQL\n ALTER TABLE r ADD constraint FK_r8_elgz1 FOREIGN KEY (r8) REFERENCES elgz (elgz1) ON DELETE SET DEFAULT ON UPDATE CASCADE;\nSQL;\n //$this->execute($sql);\n\t}",
"public function up()\n\t{\n\t\techo $this->migration('up');\n\n\t\tci('o_role_model')->migration_add('Cookie Admin', 'Cookie Designer and Eater', $this->hash());\n\t\t\n\t\treturn true;\n\t}",
"public function up()\n {\n\t\t$this->addColumn('{{%user}}', 'is_super', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `status`\");\n\t\t\n\t\t//Add new column for Option Group table\n\t\t$this->addColumn('{{%option_group}}', 'option_type', Schema::TYPE_STRING . \"(25) NULL DEFAULT 'text' AFTER `title`\");\n\t\t\n\t\t//Add new column for Order table\n\t\t$this->addColumn('{{%order}}', 'is_readed', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `shipment_method`\");\n }",
"public function up()\n {\n $this->addColumn(\\backend\\models\\VodProfile::tableName(), 'language', \"char(5) not null default 'en-US'\");\n }",
"public function up()\n {\n if (!Schema::hasTable($this->table))\n Schema::create($this->table, function (Blueprint $table)\n {\n $table->integer('parent_id')->unsigned()->index();\n $table->foreign('parent_id')->references('id')->on('organisations')->onDelete('restrict');\n\n $table->integer('child_id')->unsigned()->index();\n $table->foreign('child_id')->references('id')->on('organisations')->onDelete('restrict');\n\n $table->primary(['parent_id','child_id'],'organisation_relations_primary');\n\n $table->timestamps();\n $table->softDeletes();\n\n $table->engine = 'InnoDB';\n });\n }",
"public function up(){\n $table = $this->table('users', array('id'=>false, 'primary_key'=>'id'));\n $table->addColumn('id', 'integer', array('identity'=>true, 'signed'=>false));\n $table->addColumn('email', 'string', array('limit'=>100));\n $table->save();\n }",
"public function up() { return $this->run('up'); }",
"public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t// examples:\n\t\t\t\t'l_label' => 'VARCHAR(200) NULL DEFAULT NULL',\n\t\t\t\t'l_announce' => 'TEXT NULL DEFAULT NULL',\n\t\t\t\t//'l_content' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_principles_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_principles_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}",
"public function up()\n\t{\n\t\t// create the purchase_orders table\n\t\tSchema::create('purchase_orders', function($table) {\n\t\t\t$table->engine = 'InnoDB';\n\t\t $table->increments('id');\n\t\t $table->string('order_number', 128);\n\t\t $table->string('approved',50);\n\t\t $table->date('purchase_date');\t\t \t \t\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\t\t \t\t \n\t\t $table->integer('updated_by')->unsigned();\t\t \n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}",
"public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'label' => 'VARCHAR(20) NULL DEFAULT NULL COMMENT \"language label\"',\n\t\t\t\t'code' => 'VARCHAR(5) NOT NULL COMMENT \"language code\"',\n\t\t\t\t'locale' => 'VARCHAR (5) NULL DEFAULT NULL',\n\n\t\t\t\t'visible' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not visible; 1 - visible\"',\n\t\t\t\t'published' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not published; 1 - published\"',\n\t\t\t\t'position' => 'INT UNSIGNED NOT NULL DEFAULT 0 COMMENT \"order by position DESC\"',\n\t\t\t\t'created' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - creation time\"',\n\t\t\t\t'modified' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - last entity modified time\"',\n\n\t\t\t\t'UNIQUE key_unique_code (code)',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\n\t\t$this->insert('{{language}}', array(\n\t\t\t'label' => 'рус',\n\t\t\t'code' => 'ru',\n\t\t\t'locale' => 'ru',\n\t\t));\n\t}",
"public function up()\n {\n $this->execute('Update goods SET price_rub = price WHERE currency_id = 1');\n }",
"public function up()\n\t{\n $this->dropColumn('calculo','fecha');\n\n //add column fecha in producto\n $this->addColumn('producto','fecha','date');\n\t}",
"public function up(){\n Schema::table('entries', function (Blueprint $table) {\n $table->renameColumn('value', 'entry_value');\n });\n }",
"public function safeUp() {\n\t$this->createTable('post', array(\n 'id' =>\"int(11) NOT NULL AUTO_INCREMENT\",\n 'created_on' =>\"int(11) NOT NULL\",\n 'title' =>\"varchar(255) NOT NULL\",\n 'context' =>\"text NOT NULL\",\n \"PRIMARY KEY (`id`)\"\n\t),'ENGINE=InnoDB DEFAULT CHARSET=utf8');\n }",
"public function getUpSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `department_summary`\n\n CHANGE `twitter_account` `positive_twitter_account` TEXT NOT NULL,\n\n ADD `negative_twitter_account` TEXT NOT NULL AFTER `positive_twitter_account`;\n\nALTER TABLE `tweets`\n\n CHANGE `positive_twitter_account` `twitter_account` TEXT NOT NULL,\n\n DROP `negative_twitter_account`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }",
"public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }",
"public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }",
"public function safeUp()\n {\n $this->addColumn('{{%organization}}', 'legal_entity', $this->string()->null());\n $this->addColumn('{{%organization}}', 'contact_name', $this->string()->null());\n $this->addColumn('{{%organization}}', 'about', $this->text()->null());\n $this->addColumn('{{%organization}}', 'picture', $this->string()->null());\n }",
"public function up()\n {\n $this->table('agent_order_consignee_address')\n ->addColumn(Column::string('order_number')->setUnique()->setComment('订单编号'))\n \t\t->addColumn(Column::integer('agent_id')->setComment('代理商ID'))\n\t ->addColumn(Column::integer('create_time')->setDefault(1)->setComment('创建时间'))\n\t \n\t ->addColumn(Column::string('consignee_name')->setComment('收货人姓名'))\n\t ->addColumn(Column::string('consignee_phone')->setComment('收货人电话'))\n\t ->addColumn(Column::string('province')->setComment('省份'))\n\t ->addColumn(Column::string('city')->setComment('城市'))\n\t ->addColumn(Column::string('area')->setComment('地区'))\n\t ->addColumn(Column::string('address')->setComment('收货人详细地址'))\n ->create(); \n }",
"public function up()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t'l_value' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_configuration_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_configuration_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}",
"public function safeUp()\r\n {\r\n $this->up();\r\n }",
"public function up(){\n // $table->table('kelas')\n // ->addColumn('Id', 'int', \"11\", false, null, true, true)\n // ->addColumn('NamaKelas', 'varchar', \"100\")\n // ->create();\n }",
"public function safeUp()\n\t{\n\t\t$this->createTable('pesquisa', array(\n\t\t\t'id' => 'serial NOT NULL primary key',\n\t\t\t'nome' => 'varchar',\n\t\t));\n\t}",
"public function safeUp()\n\t{\n\t\t$this->up();\n\t}",
"public function safeUp()\n {\n $this->up();\n }",
"public function safeUp()\n {\n $this->up();\n }",
"public function up(){\n // $table->table('kelassiswa')\n // ->addColumn('Id', 'int', \"11\", false, null, true, true)\n // ->addColumn('Kelas_Id', 'int', \"11\")\n // ->addColumn('Peserta_Id', 'int', \"11\")\n // ->addForeignKey('Peserta_Id', 'peserta', \"Id\", \"CASCADE\")\n // ->addForeignKey('Kelas_Id', 'kelas', \"Id\")\n // ->create();\n\n }",
"public function up()\n\t{\n\t\tSchema::table('project_sections', function($t){\n\t\t\t$t->integer('created_by_project_id')->nullable()->unsigned();\n\t\t\t$t->boolean('public')->default(0);\n\n $t->foreign('created_by_project_id')->references('id')->on('projects')->on_delete('SET NULL');\n\t\t});\n\t}",
"public function up(){\n\t\tglobal $wpdb;\n\n\t\t$wpdb->query('ALTER TABLE `btm_tasks` ADD COLUMN `last_run` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `date_created`;');\n\t}",
"public function up()\n {\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_create');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_mods');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_modpacks');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->boolean('solder_keys')->default(0);\n $table->boolean('solder_clients')->default(0);\n $table->boolean('modpacks_create')->default(0);\n $table->boolean('modpacks_manage')->default(0);\n $table->boolean('modpacks_delete')->default(0);\n });\n }",
"public function up()\n {\n Schema::dropIfExists('db_question_new.t_answer_type');\n Schema::create('db_question_new.t_answer_type', function (Blueprint $table){\n $table->increments('id');\n t_field($table->integer('answer_type_no'),\"答案序号\");\n t_field($table->string('name'),\"步骤名字\");\n t_field($table->integer('subject'),\"科目id\");\n t_field($table->integer('open_flag')->default(1),\"开启与否\");\n }); \n }",
"public function up()\n\t{\n\t\t$sql = \"create table tbl_rights\n\t\t\t\t(\n\t\t\t\t\titemname varchar(64) not null,\n\t\t\t\t\ttype integer not null,\n\t\t\t\t\tweight integer not null,\n\t\t\t\t\tprimary key (itemname),\n\t\t\t\t\tforeign key (itemname) references tbl_auth_item (name) on delete cascade on update cascade\n\t\t\t\t)\";\n\t\t $this->execute($sql);\n\t\t \n\t}",
"public function safeUp()\n\t{\n\t\t$this->createTable( 'tbl_auth_item', array(\n\t\t \"name\" => \"varchar(64) not null\",\n\t\t \"type\" => \"integer not null\",\n\t\t \"description\" => \"text\",\n\t\t \"bizrule\" => \"text\",\n\t\t \"data\" => \"text\",\n\t\t \"primary key (name)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_item_child\", array(\n \t\t\"parent\" => \" varchar(64) not null\",\n\t\t\"child\" => \" varchar(64) not null\",\n \t\t\"primary key (parent,child)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_assignment\",array(\n \t\t\"itemname\" => \"varchar(64) not null\",\n \t\t\"userid\" => \"varchar(64) not null\",\n \t\t\"bizrule\" => \"text\",\n \t\t\"data\"\t => \"text\",\n \t\t\"primary key (itemname,userid)\",\n\t\t));\n\n\t\t$this->addForeignKey('fk_auth_item_child_parent','tbl_auth_item_child','parent','tbl_auth_item','name','CASCADE','CASCADE');\n\t\t$this->addForeignKey('fk_auth_assignment_itemname','tbl_auth_assignment','itemname','tbl_auth_item','name');\n\t\t$this->addForeignKey('fk_auth_assignment_userid','tbl_auth_assignment','userid','tbl_user','id');\n\t}",
"public function up()\n {\n // add foreign key for table `articles`\n $this->addForeignKey(\n 'fk-comments-article_id',\n 'comments',\n 'article_id',\n 'article',\n 'id'\n );\n }",
"public function safeUp()\r\n\t{\r\n\t\t$this->up();\r\n\t}",
"public function up()\n {\n\n $tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\n $this->createTable($this->createTableName, [\n 'id' => $this->primaryKey(),\n 'name' => $this->string()->notNull(),\n 'type' => $this->integer(1)->notNull(),\n 'location' => $this->text()->defaultValue(null),\n 'description' => $this->text()->defaultValue(null),\n 'created_by' => $this->integer()->notNull(),\n 'start_at' => $this->integer()->defaultValue(null),\n 'active' => $this->boolean()->defaultValue(true),\n\n ],$tableOptions);\n\n\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n\n $moduleInvite = Module::findOne(['name' => 'Actioncalendar', 'slug' => 'actioncalendar']);\n if(empty($moduleInvite)) {\n $this->batchInsert('{{%module}}', ['parent_id', 'name', 'slug', 'visible', 'sorting'], [\n [null, 'Actioncalendar', 'actioncalendar', 1, 22],\n ]);\n }\n\n }",
"public function up()\n\t{\n\t\tSchema::table('user_hasil', function($table)\n\t\t{\n\t\t\t$table->create();\n\t\t\t$table->integer('user_id');\n\t\t\t$table->string('grade', 2);\n\t\t\t$table->decimal('hasil', 5, 2);\n\t\t\t$table->year('tahun');\n\t\t\t$table->timestamps();\n\n\t\t\t$table->foreign('user_id')->references('id')->on('users')->on_update('cascade');\n\t\t});\n\t}",
"public function safeUp()\r\n {\r\n $tableOptions = null;\r\n if ($this->db->driverName === 'mysql') {\r\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB';\r\n }\r\n\r\n $this->createTable('{{%contact_msg}}', [\r\n 'id' => Schema::TYPE_PK,\r\n 'from_email' => Schema::TYPE_STRING . \"(320) NOT NULL\",\r\n 'to_email' => Schema::TYPE_STRING . \"(320) NULL\",\r\n 'subject' => Schema::TYPE_STRING . \"(300) NOT NULL\",\r\n 'text' => Schema::TYPE_TEXT,\r\n 'viewed' => Schema::TYPE_BOOLEAN . \"(1) NOT NULL DEFAULT '0'\",\r\n 'created_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n 'updated_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n ], $tableOptions);\r\n }",
"public function up()\n {\n $this->alterColumn('{{%hystorical_data}}', 'project_id', $this->integer());\n\n $this->dropForeignKey('fk-hystorical_data-project_id',\n '{{%hystorical_data}}');\n\n $this->addForeignKey(\n 'fk-hystorical_data-project_id',\n '{{%hystorical_data}}',\n 'project_id',\n '{{%projects}}',\n 'id',\n 'SET NULL'\n );\n }",
"public function up()\n\t{\n\t\tSchema::create('flows_steps', function($table) {\n\n\t\t\t$table->engine = 'InnoDB';\n\n\t\t $table->increments('stepid');\n\t\t $table->integer('flowid');\n\t\t $table->string('step', 100);\n\t\t $table->integer('roleid');\n\t\t $table->integer('parentid');\n\t\t $table->integer('state');\n\t\t $table->integer('page');\n\t\t $table->integer('condition2');\n\t\t $table->timestamps();\n\n\t\t});\n\t}",
"public function safeUp()\n {\n $this->createTable('site_phrase', array(\n 'site_id' => self::MYSQL_TYPE_UINT,\n 'phrase' => 'string NOT NULL',\n 'hash' => 'varchar(32)',\n 'price' => 'decimal(10,2) NOT NULL',\n 'active' => self::MYSQL_TYPE_BOOLEAN,\n ));\n\n $this->addForeignKey('site_phrase_site_id', 'site_phrase', 'site_id', 'site', 'id', 'CASCADE', 'RESTRICT');\n }",
"public function up()\n\t{\n\t\tSchema::table('devices', function($table)\n\t\t{\n\t\t\t$table->string('uuid')->unique;\n\t\t\t$table->drop_column('uid');\n\t\t});\n\t}",
"public function up()\n\t{\n\t\t$this->execute(\"\n INSERT INTO `authitem` VALUES('D2finv.FiitInvoiceItem.*', 0, 'Edit invoice items', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FiitInvoiceItem.View', 0, 'View invoice items', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FinvInvoice.*', 0, 'Edit invoice records', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FinvInvoice.View', 0, 'View invoice records', NULL, 'N;');\n \n INSERT INTO `authitem` VALUES('InvoiceEdit', 2, 'Edit invoice records', NULL, 'N;');\n INSERT INTO `authitem` VALUES('InvoiceView', 2, 'View invoice records', NULL, 'N;');\n \n INSERT INTO `authitemchild` VALUES('InvoiceEdit', 'D2finv.FiitInvoiceItem.*');\n INSERT INTO `authitemchild` VALUES('InvoiceView', 'D2finv.FiitInvoiceItem.View');\n INSERT INTO `authitemchild` VALUES('InvoiceEdit', 'D2finv.FinvInvoice.*');\n INSERT INTO `authitemchild` VALUES('InvoiceView', 'D2finv.FinvInvoice.View');\n \");\n\t}",
"public function up()\n {\n $this->createTable('post',[\n 'id' => $this->primaryKey(),\n 'author_id' => $this->integer(),\n 'title' => $this->string(255)->notNull()->unique(),\n 'content' => $this->text(),\n 'published_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'updated_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'status' => \"ENUM('draft','published')\",\n 'image' => $this->string(255)\n ]); \n\n $this->addForeignKey(\n 'fk_post_author_id',\n 'post',\n 'author_id',\n 'user',\n 'id',\n 'CASCADE',\n 'NO ACTION'\n );\n }",
"public function up()\n\t{\n// $import->import();\n\t}",
"public function up()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{rights}}\")){\n\t\t\t$this->dropTable(\"authItem\");\n\t\t}\n\n\t\t$this->createTable(\"{{rights}}\", array(\n\t\t\t\"itemname\" => \"varchar(64) CHARACTER SET UTF8 NOT NULL\",\n\t\t\t\"type\"\t => \"int not null\",\n\t\t\t\"weight\" => \"int not null\",\n\t\t\t\"PRIMARY KEY (itemname)\"\n\t\t\t));\n\t}",
"public function up() {\r\n\t\t// UP\r\n\t\t$column = parent::Column();\r\n\t\t$column->setName('id')\r\n\t\t\t\t->setType('biginteger')\r\n\t\t\t\t->setIdentity(true);\r\n\t\tif (!$this->hasTable('propertystorage')) {\r\n\t\t\t$this->table('propertystorage', [\r\n\t\t\t\t\t\t'id' => false,\r\n\t\t\t\t\t\t'primary_key' => 'id'\r\n\t\t\t\t\t])->addColumn($column)\r\n\t\t\t\t\t->addColumn('path', 'text', ['limit' => 1024])\r\n\t\t\t\t\t->addColumn('name', 'text', ['limit' => 100])\r\n\t\t\t\t\t->addColumn('valuetype', 'integer',[])\r\n\t\t\t\t\t->addColumn('value', 'text', [])\r\n\t\t\t\t\t->create();\r\n\t\t}\r\n\t}",
"public function up()\n {\n $perfis = [\n [\n 'id' => 1,\n 'perfil' => 'Genérico',\n 'ativo' => 1\n ]\n ];\n\n $this->insert('singular_perfil', $perfis);\n\n $usuarios = [\n [\n 'id' => 1,\n 'nome' => 'Singular Framework',\n 'login' => 'singular',\n 'senha' => 'singular',\n 'perfil_id' => 1\n ]\n ];\n\n $this->insert('singular_usuario', $usuarios);\n }",
"public function safeUp()\n {\n $this->createTable('user', array(\n 'name' => 'string',\n 'username' => 'string NOT NULL',\n 'password' => 'VARCHAR(32) NOT NULL',\n 'salt' => 'VARCHAR(32) NOT NULL',\n 'role' => \"ENUM('partner', 'admin')\"\n ));\n }",
"public function up()\n\t{\n\t\t$demoUser = new User();\n\t\t$demoUser->username = \"demo\";\n\t\t$demoUser->email = '[email protected]';\n\t\t$demoUser->password = 'password';\n\t\t$demoUser->create_time = new CDbExpression('NOW()');\n\t\t$demoUser->update_time = new CDbExpression('NOW()');\n\n\t\t$demoUser->save();\n\n\t\t$adminUser = new User();\n\t\t$adminUser->username = \"admin\";\n\t\t$adminUser->email = '[email protected]';\n\t\t$adminUser->password = 'password';\n\t\t$adminUser->create_time = new CDbExpression('NOW()');\n\t\t$adminUser->update_time = new CDbExpression('NOW()');\n\n\t\t$adminUser->save();\n\n\t}",
"public function safeUp()\n {\n $tables = Yii::$app->db->schema->getTableNames();\n $dbType = $this->db->driverName;\n $tableOptions_mysql = \"CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB\";\n\n /* MYSQL */\n if (!in_array('question_tag', $tables)) {\n if ($dbType == \"mysql\") {\n $this->createTable('{{%question_tag}}', [\n 'question_id' => 'INT(11) NOT NULL',\n 'tag_id' => 'INT(11) NOT NULL',\n ], $tableOptions_mysql);\n }\n }\n }",
"public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t'like',\n\t\t\tarray(\n\t\t\t\t'id'=>'int(11) UNSIGNED NOT NULL AUTO_INCREMENT',\n\t\t\t\t'user_id' => 'int(11) UNSIGNED NOT NULL',\n\t\t\t\t'post_id' => 'int (11) NOT NULL',\n\t\t\t\t'status' => 'TINYINT(1)',\n\t\t\t\t'created_at' => 'int(11)',\n\t\t\t\t'updated_at' => 'int(11)',\n\t\t\t\t'PRIMARY KEY (id)',\n\t\t\t\t),\n\t\t\t'ENGINE=InnoDB'\n\n\t\t\t);\n\t}",
"public function up()\n\t{\n\t\tSchema::table('entries', function($table) {\n $table->create();\n $table->increments('id');\n $table->string('title', 128);\n $table->string('body');\n $table->integer('users_id')->unsigned();\n $table->index('users_id');\n $table->integer('last_edited_by');\n $table->foreign('users_id')->references('id')->on('users')->on_delete('no action');\n $table->timestamps();\n });\n\t}",
"public function up()\n {\n $this->alterColumn(\\app\\models\\EmailImportLead::tableName(), 'password', $this->string()->null());\n $this->alterColumn(\\app\\models\\EmailImportLead::tableName(), 'status', $this->integer()->null());\n }",
"public function up()\n {\n\t\t$tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\t\t\n\t\t$TABLE_NAME = 'HaberDeneme12';\n $this->createTable($TABLE_NAME, [\n 'HaberID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(12)->notNull(),\n 'Baslik' => $this->string(128)->notNull(),\n 'Ozet' => $this->text()->notNull(),\n 'Detay' => $this->text()->notNull(),\n 'Resim' => $this->text()->notNull(),\n 'EklenmeTarihi' => $this->date(),\n 'GuncellenmeTarihi' => $this->date()\n ], $tableOptions);\n\t\t\n\t\t\n\t\t$TABLE_NAME = 'HaberKategoriDeneme12';\n\t\t $this->createTable($TABLE_NAME, [\n 'KategoriID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(20)->notNull()\n ], $tableOptions);\n\t\t\n }",
"public function up()\n\t{\n\t\t$fields = array(\n \"`piezas` DECIMAL(3,2) DEFAULT NULL\",\n\n\t\t);\n\t\t$this->dbforge->add_column('rel_monto_servicios', $fields);\n\n\t}",
"public function up()\n {\n $this->insert('key_value', [\n 'key' => 'day_feed_count_dnr',\n 'value' => '15',\n ]);\n }",
"public function up()\n {\n // 创建操作记录表\n $tables = $this->table('history');\n // 用户动作\n $tables->addColumn('action', 'string', ['limit' => 20])\n ->addColumn('ip', 'string', ['limit' => 129])\n // 建立用户\n ->addColumn('user_id', 'integer')\n // 登录时间\n ->addColumn('operation_time', 'datetime')\n // 操作详情\n ->addColumn('desc', 'string',['limit'=>500,'null' => true])\n ->create();\n }",
"public function up()\n {\n $table = $this->table('vehicle_model_suggestions');\n\n if (!$table->exists()) {\n $table\n ->addPrimaryKey('id')\n ->addColumn('vehicle_id', 'integer', ['null' => false])\n ->addColumn('vehicle_model_id', 'integer', ['null' => false])\n ->addColumn('suggestion', 'text')\n ->addTimestamps()\n ->addColumn('deleted_at', 'datetime')\n ->create();\n }\n }",
"public function safeUp()\n {\n $this->insert('category',['name'=>'Uncategorized', 'slug'=>'uncategorized', 'description'=>'Default Category', 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()')]);\n $this->insert('user',['username'=>'Administrator', 'password_hash'=>'$2y$13$6yoLjvVORp/7EO1u8phYTuWYzhMSM4LVVsebZgcqEKj/EQLvo5nJK',\n 'email'=>'[email protected]',\n 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()'),\n 'status'=>1\n ]\n );\n }",
"public function safeUp()\n {\n $this->createTable($this->tableName, [\n 'post_id' => $this->bigInteger()->notNull(),\n 'category_id' => $this->bigInteger()->notNull(),\n ]);\n\n $this->addForeignKey('post_category_post_id_fk', $this->tableName, 'post_id', '{{%post}}', 'id', 'CASCADE', 'CASCADE');\n $this->addForeignKey('post_category_category_id_fk', $this->tableName, 'category_id', '{{%category}}', 'id', 'CASCADE', 'CASCADE');\n }",
"public function up()\n {\n Schema::table('categories', function(Blueprint $table)\n {\n $table->integer('parent_id', false, true)->nullable()->after('cat_order');\n });\n }",
"public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'application_id' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Ид приложения\"',\n\n\t\t\t\t'message' => 'TEXT NOT NULL DEFAULT \"\" COMMENT \"Оригинал\"',\n\t\t\t\t'category' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Категория\"',\n\t\t\t\t'language' => 'VARCHAR(5) NOT NULL DEFAULT \"\" COMMENT \"Язык\"',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}",
"public function up()\n\t{\n\t\t//\n\t\tSchema::create('options',function($table){\n\t\t\t$table->increments('id');\n\t\t\t$table->boolean('activate_pn');\n\t\t\t$table->string('basic_name');\n\t\t\t$table->string('basic_pass');\n\t\t\t$table->timestamps();\n\t\t});\n\n\t\t$o = new Option;\n\t\t$o->activate_pn = 0;\n\t\t$o->save();\n\t}",
"public function up() {\n\t\t$this->dbforge->add_field(array(\n\t\t\t'id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t\t'auto_increment' => TRUE\n\t\t\t),\n\t\t\t'name' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t),\n\t\t\t'path' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t)\n\t\t));\n\t\t$this->dbforge->add_key('id', TRUE);\n\t\t$this->dbforge->add_key('path');\n\t\t$this->dbforge->create_table('categories');\n\n\t\t// Table structure for table 'event_categories'\n\t\t$this->dbforge->add_field(array(\n\t\t\t'event_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t),\n\t\t\t'category_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t),\n\t\t));\n\t\t$this->dbforge->add_key('event_id', TRUE);\n\t\t$this->dbforge->add_key('category_id', TRUE);\n\t\t$this->dbforge->create_table('event_categories');\n\t}",
"public function up()\n {\n $this->createTable('usuario_refeicao', [\n 'id' => $this->primaryKey(),\n 'usuario_id' => $this->integer(),\n 'refeicao_id' => $this->integer(),\n 'alimento_id' => $this->integer(),\n 'data_consumo' => $this->date(),\n 'horario_consumo' => $this->time(),\n 'quantidade' => $this->double(5,2),\n 'created_at' => $this->integer(),\n 'updated_at' => $this->integer() \n ]);\n\n $this->addForeignKey('fk_usuariorefeicao_usuario_id', 'usuario_refeicao', 'usuario_id', \n 'user', 'id', 'CASCADE');\n $this->addForeignKey('fk_usuariorefeicao_refeicao_id', 'usuario_refeicao', 'refeicao_id', \n 'refeicoes', 'id', 'CASCADE');\n $this->addForeignKey('fk_usuariorefeicao_alimento_id', 'usuario_refeicao', \n 'alimento_id', 'alimentos', 'id', 'CASCADE');\n }"
] | [
"0.80072445",
"0.7915632",
"0.7915632",
"0.7915632",
"0.75720376",
"0.7561417",
"0.75285745",
"0.7499062",
"0.7494408",
"0.7454009",
"0.7446965",
"0.74338573",
"0.74321055",
"0.7427382",
"0.74184984",
"0.7378431",
"0.73753154",
"0.73706865",
"0.73640925",
"0.7351718",
"0.7329819",
"0.73133403",
"0.7299289",
"0.7295341",
"0.7292598",
"0.7291943",
"0.7291649",
"0.72850096",
"0.7284617",
"0.7273328",
"0.7272477",
"0.72667634",
"0.7263149",
"0.7262631",
"0.72570944",
"0.72505975",
"0.72503555",
"0.72449917",
"0.7241266",
"0.7238051",
"0.72190917",
"0.72189677",
"0.72044635",
"0.72040004",
"0.71960837",
"0.71918035",
"0.7190447",
"0.71773696",
"0.7176595",
"0.71679395",
"0.7165182",
"0.7165182",
"0.71600825",
"0.71480834",
"0.713639",
"0.7130628",
"0.7125675",
"0.71237975",
"0.7117571",
"0.71055365",
"0.71055365",
"0.7105213",
"0.7097307",
"0.7093728",
"0.7089113",
"0.7086878",
"0.70864815",
"0.708361",
"0.7083313",
"0.7078737",
"0.7070507",
"0.70692027",
"0.7066026",
"0.7062314",
"0.70593804",
"0.7059261",
"0.7056025",
"0.70559174",
"0.70555604",
"0.70511854",
"0.7048766",
"0.7048317",
"0.7047087",
"0.7045256",
"0.7044111",
"0.70391047",
"0.7038186",
"0.7037226",
"0.70344466",
"0.7032878",
"0.7032124",
"0.7027117",
"0.7015144",
"0.7010595",
"0.70071304",
"0.6988995",
"0.6985187",
"0.6962824",
"0.6961966",
"0.69592977",
"0.6957979"
] | 0.0 | -1 |
this down() migration is autogenerated, please modify it to your needs | public function down(Schema $schema) : void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('DROP TABLE historico_ticket');
$this->addSql('ALTER TABLE `group` ADD historico_ticket_id INT NOT NULL');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function down()\n {\n //add your migration here \n }",
"public function down()\n {\n //add your migration here\n }",
"public function down()\n\t{\n $this->dropColumn('producto','fecha');\n\n //add column fecha in producto\n $this->addColumn('calculo','fecha','date');\n\t}",
"public function down()\n {\n \t\n \t$this->createTable('os', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n \t$this->insert('os', ['id' => 1, 'name' => 'Any']);\n \t$this->insert('os', ['id' => 2, 'name' => 'CentOS']);\n \t$this->insert('os', ['id' => 3, 'name' => 'RHEL']);\n \t$this->insert('os', ['id' => 4, 'name' => 'Fedora']);\n \t \n \t$this->createTable('os_bit', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n\n return false;\n }",
"public function down()\n {\n //Schema::dropIfExists('c');//回滚时执行\n\n }",
"public function down()\n {\n $this->dbforge->drop_column('user', 'created_at');\n }",
"public function down()\n {\n $this->dropForeignKey(\n 'fk-video-blog_id',\n 'video'\n );\n\n\n echo \"m160820_150846_video_create reverted.\\n\";\n\n }",
"public function down()\n\t{\nDB::query(\n\"drop table haal;\");\nDB::query(\n\"drop table kandidaat;\");\nDB::query(\n\"drop table haaletaja;\");\nDB::query(\n\"drop table partei;\");\nDB::query(\n\"drop table valimisringkond;\");\n\t}",
"public function down()\n\t{\n\t\t// Remove data from committee_members\n\t\tDB::table('committee_members')->where('id', '<', 3)->delete();\t\n\t}",
"public function down(){\n $this->dropTable('users');\n }",
"public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `department_summary`\n\n CHANGE `positive_twitter_account` `twitter_account` TEXT NOT NULL,\n\n DROP `negative_twitter_account`;\n\nALTER TABLE `tweets`\n\n CHANGE `twitter_account` `positive_twitter_account` TEXT NOT NULL,\n\n ADD `negative_twitter_account` INTEGER NOT NULL AFTER `quality_tweet`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }",
"public function down()\n {\n Schema::table('attachments', function(Blueprint $table) {\n\n $table->dropColumn('viewable_id');\n $table->dropColumn('viewable_type');\n\n\n });\n }",
"public function down()\n\t{\n\t\t//Schema::drop('purchase_order_details');\n\t}",
"public function getDownSQL()\r\n {\r\n return array (\n 'propel' => '\r\n# This is a fix for InnoDB in MySQL >= 4.1.x\r\n# It \"suspends judgement\" for fkey relationships until are tables are set.\r\nSET FOREIGN_KEY_CHECKS = 0;\r\n\r\nDROP TABLE IF EXISTS `movimiento`;\r\n\r\n# This restores the fkey checks, after having unset them earlier\r\nSET FOREIGN_KEY_CHECKS = 1;\r\n',\n);\r\n }",
"public function down()\n\t{\n//\t\t$this->dbforge->drop_table('blog');\n\n//\t\t// Dropping a Column From a Table\n\t\t$this->dbforge->drop_column('categories', 'icon');\n\t}",
"public function down()\n\t{\n\t\t// nothing to do here.\n\t}",
"public function down(){\r\n $this->dbforge->drop_table('users'); //eliminacion de la tabla users\r\n }",
"public function down()\n\t{\n\t\tSchema::drop('student');\n\t\t//\n\t}",
"public function down()\n{\n\nSchema::drop('event_user');\nSchema::drop('events');\nSchema::drop('file');\nSchema::drop('file_ref');\nSchema::drop('groups');\nSchema::drop('project_user');\nSchema::drop('projects');\nSchema::drop('quicknote');\nSchema::drop('subtasks');\nSchema::drop('task_user');\nSchema::drop('tasks');\nSchema::drop('throttle');\nSchema::drop('timesheet');\nSchema::drop('todos');\nSchema::drop('user_profile');\nSchema::drop('users');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\n\n}",
"public function down() \n {\n \n }",
"public function down()\n\t{\n\t}",
"public function down()\n\t{\n\t}",
"public function down()\n\t{\n\t\t//\n\t}",
"public function down()\n\t{\n\t\t//\n\t}",
"public function down()\n\t{\n\t\t//\n\t}",
"public function down()\n {\n $this->table('contents')->drop()->save();\n }",
"public function down()\n\t{\n\t\tSchema::drop('education');\n\t}",
"public function down()\n\t{\n\t\tSchema::drop('l_wardrobe_table');\n\t}",
"public function down()\n\t{\n\t\techo $this->migration('down');\n\n\t\tci('o_role_model')->migration_remove($this->hash());\n\t\t\n\t\treturn true;\n\t}",
"public function safeDown()\n\t{\n $sql=\" ALTER TABLE `tbl_venta` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n //quitando la columna pto_venta de tbl_empleado\n $sql=\" ALTER TABLE `tbl_empleado` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n\t}",
"public function down()\n {\n\tSchema::drop('quizzes');\n }",
"public function down()\n {\n $this->output->writeln('Down migration is not available.');\n }",
"public function down()\n {\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=0');\n\n $this->executeSQL('DROP TABLE link');\n $this->executeSQL('DROP TABLE link_category');\n\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=1');\n }",
"public function down ()\n {\n }",
"abstract public function down();",
"abstract public function down();",
"abstract public function down();",
"public function down()\n {\n // This migration was removed, but fails when uninstalling plugin\n }",
"public function down()\r\n {\r\n $this->dbforge->drop_table('users');\r\n }",
"public function down() {\n\n\t}",
"public function down()\n {\n $this->dbforge->drop_table('lecturer', true);\n }",
"public function down()\n\t{\n\t\tSchema::drop('flows_steps');\n\t}",
"public function down(Schema $schema) : void\n {\n $this->addSql('CREATE TABLE galaxiee (id INT AUTO_INCREMENT NOT NULL, idu_id INT NOT NULL, nom VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_8576D2AF376A6230 (idu_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE trou_noir (id INT AUTO_INCREMENT NOT NULL, id_g_id INT DEFAULT NULL, nom VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_AB27242D95951086 (id_g_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('ALTER TABLE galaxiee ADD CONSTRAINT FK_8576D2AF376A6230 FOREIGN KEY (idu_id) REFERENCES univers (id)');\n $this->addSql('ALTER TABLE trou_noir ADD CONSTRAINT FK_AB27242D95951086 FOREIGN KEY (id_g_id) REFERENCES galaxie (id)');\n $this->addSql('DROP TABLE trounoir');\n $this->addSql('ALTER TABLE galaxie DROP FOREIGN KEY FK_1C880711376A6230');\n $this->addSql('DROP INDEX IDX_1C880711376A6230 ON galaxie');\n $this->addSql('ALTER TABLE galaxie CHANGE idu_id id_u_id INT NOT NULL');\n $this->addSql('ALTER TABLE galaxie ADD CONSTRAINT FK_1C8807116F858F92 FOREIGN KEY (id_u_id) REFERENCES univers (id)');\n $this->addSql('CREATE INDEX IDX_1C8807116F858F92 ON galaxie (id_u_id)');\n $this->addSql('ALTER TABLE planete DROP FOREIGN KEY FK_490E3E5712013DEC');\n $this->addSql('DROP INDEX IDX_490E3E5712013DEC ON planete');\n $this->addSql('ALTER TABLE planete ADD id_s_id INT NOT NULL, ADD nb_sattelite INT NOT NULL, DROP ids_id, DROP nb_satelite');\n $this->addSql('ALTER TABLE planete ADD CONSTRAINT FK_490E3E574AEED04E FOREIGN KEY (id_s_id) REFERENCES systeme (id)');\n $this->addSql('CREATE INDEX IDX_490E3E574AEED04E ON planete (id_s_id)');\n $this->addSql('ALTER TABLE systeme DROP FOREIGN KEY FK_95796DE3CD7AFD24');\n $this->addSql('DROP INDEX IDX_95796DE3CD7AFD24 ON systeme');\n $this->addSql('ALTER TABLE systeme CHANGE idg_id id_g_id INT NOT NULL');\n $this->addSql('ALTER TABLE systeme ADD CONSTRAINT FK_95796DE395951086 FOREIGN KEY (id_g_id) REFERENCES galaxie (id)');\n $this->addSql('CREATE INDEX IDX_95796DE395951086 ON systeme (id_g_id)');\n }",
"public function down() {\n $this->dbforge->drop_column('timesheets_items', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'reason_desc', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'reason_desc', TRUE);\n\n // change reason to note\n $fields = array(\n 'reason' => array(\n 'name' => 'note',\n 'type' => \"VARCHAR\",\n 'constraint' => 200,\n 'null' => TRUE\n )\n );\n $this->dbforge->modify_column('timesheets_items', $fields);\n $this->dbforge->modify_column('timesheets_expenses', $fields);\n }",
"public function down(): void\n {\n // Remove your data\n }",
"public function down()\n\t{\n\t\t//Schema::drop('purchase_orders');\n\t\t//Schema::drop('purchase_order_details');\n\t}",
"public function down()\n {\n\tSchema::drop('activities');\n }",
"public function down()\n {\n //return false;\n\t\t\n\t\t$TABLE_NAME = 'Haber';\n $this->dropTable($TABLE_NAME);\n\t\t\n\t\t$TABLE_NAME = 'HaberKategori';\n $this->dropTable($TABLE_NAME);\n }",
"public function down(){\n $this->dbforge->drop_table('subcategories_news'); //eliminacion de la tabla subcategories_news\n }",
"public function down()\n {\n }",
"public function down()\n {\n }",
"public function down()\n\t{\n\t\tDB::table('professor')->where('professor_id', '=', 1)->delete();\n\t\tDB::table('professor')->where('professor_id', '=', 2)->delete();\n\t\tDB::query('ALTER TABLE professor AUTO_INCREMENT = 1');\n\n\t\t//\n\t}",
"public function down(): bool {\n\t\t// Remove & add logic to revert the migration here.\n\t\techo \"M230123030315BaseTables cannot be rolled back.\\n\";\n\t\treturn false;\n\t}",
"public function getDownSQL()\r\n {\r\n return array (\n 'propel' => '\r\n# This is a fix for InnoDB in MySQL >= 4.1.x\r\n# It \"suspends judgement\" for fkey relationships until are tables are set.\r\nSET FOREIGN_KEY_CHECKS = 0;\r\n\r\nALTER TABLE `promocion` CHANGE `fecha_inicio` `fecha_inicio` DATE NOT NULL;\r\n\r\nALTER TABLE `promocion` CHANGE `fecha_fin` `fecha_fin` DATE NOT NULL;\r\n\r\nALTER TABLE `promocion` CHANGE `descuento` `descuento` DECIMAL;\r\n\r\nALTER TABLE `promocion`\r\n ADD `descripcion` VARCHAR(70) AFTER `id`,\r\n ADD `estado` VARCHAR(11) AFTER `fecha_fin`,\r\n ADD `promocion_global` TINYINT(1) NOT NULL AFTER `descuento`;\r\n\r\nALTER TABLE `promocion` DROP `activo`;\r\n\r\n# This restores the fkey checks, after having unset them earlier\r\nSET FOREIGN_KEY_CHECKS = 1;\r\n',\n);\r\n }",
"public function down()\n\t{\n\t\t//return false;\n\t}",
"public function down(): void\n {\n try {\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"DROP TABLE IF EXISTS prom2_pages\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }",
"public function down()\n\t{\n\t\t//\n\t\tSchema::drop('options');\n\t}",
"public function change()\n {\n $this->schema->table('recurring_expenses',function($table){\n $table->date('end_repeat')->nullable();\n $table->boolean('ended')->default(false);\n $table->enum('repeat',['0','1','7','14','30','365'])->nullable();\n });\n\n $this->schema->table('expenses',function($table){\n $table->dropColumn('end_repeat');\n $table->dropColumn('repeat');\n $table->integer('parent_id')->nullable();\n $table->foreign('parent_id')->references('id')->on('expenses')->onDelete('cascade');\n });\n }",
"public function down()\n {\n Schema::table('users', function (Blueprint $table) {\n $table->dropForeign('users_id_turma_foreign');\n });\n\n Schema::table('contato', function (Blueprint $table) {\n $table->dropForeign('contato_id_usuario_foreign');\n });\n\n Schema::table('monitores', function (Blueprint $table) {\n $table->dropForeign('monitores_id_turma_foreign');\n $table->dropForeign('monitores_id_usuario_foreign');\n });\n\n Schema::table('galeria_portifolio', function (Blueprint $table) {\n $table->dropForeign('galeria_portifolio_id_portifolio_foreign');\n });\n\n Schema::table('portifolio_alunos', function (Blueprint $table) {\n $table->dropForeign('portifolio_alunos_id_portifolio_foreign');\n $table->dropForeign('portifolio_alunos_id_usuario_foreign');\n });\n\n Schema::table('cobranca', function (Blueprint $table) {\n $table->dropForeign('cobranca_id_aluno_foreign');\n });\n\n Schema::table('lista_de_presenca', function (Blueprint $table) {\n $table->dropForeign('lista_de_presenca_id_usuario_foreign');\n });\n\n Schema::table('forum_da_turma', function (Blueprint $table) {\n $table->dropForeign('forum_da_turma_id_usuario_foreign');\n });\n\n Schema::table('posts_do_site', function (Blueprint $table) {\n $table->dropForeign('posts_do_site_id_usuario_foreign');\n });\n\n Schema::table('posts_do_forum', function (Blueprint $table) {\n $table->dropForeign('posts_do_forum_id_topico_foreign');\n $table->dropForeign('posts_do_forum_id_usuario_foreign');\n });\n }",
"public function down()\n\t{\n\t\t$this->dropForeignKey('FK_task_creator','tbl_task');\n\n\t\t$this->dropTable('tbl_task');\n\t}",
"public function down()\n {\n $this->table('articles')->drop()->save();\n $this->table('categories')->drop()->save();\n $this->table('football_ragistrations')->drop()->save();\n $this->table('friends')->drop()->save();\n $this->table('menus')->drop()->save();\n $this->table('picnic_ragistrations')->drop()->save();\n $this->table('products')->drop()->save();\n $this->table('profiles')->drop()->save();\n $this->table('skills')->drop()->save();\n $this->table('spouses')->drop()->save();\n $this->table('students')->drop()->save();\n $this->table('submenus')->drop()->save();\n $this->table('users')->drop()->save();\n }",
"public function down(){\n\t\tSchema::dropIfExists('cargo');\n\t}",
"public function down()\n {\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )->save();\n\n $this->table('users')\n ->removeIndexByName('FK_users_roles')\n ->update();\n\n $this->table('users')\n ->addColumn('can_edit', 'boolean', [\n 'after' => 'enabled',\n 'default' => '0',\n 'length' => null,\n 'null' => false,\n ])\n ->removeColumn('role_id')\n ->update();\n\n $this->table('stundenplan')\n ->changeColumn('note', 'string', [\n 'default' => null,\n 'length' => 255,\n 'null' => true,\n ])\n ->removeColumn('loggedInNote')\n ->update();\n\n $this->table('roles')->drop()->save();\n }",
"public function down()\n\t{\n\t\t//\n\t\tDB::query('TRUNCATE TABLE app_user_apps_publishes CASCADE');\n\t\tDB::query('TRUNCATE TABLE app_apps_fbapps CASCADE');\n\t\tDB::query('TRUNCATE TABLE app_apps_applications CASCADE');\n\t}",
"protected abstract function do_down();",
"public function down()\n\t{\n\t\t// Drop Table\n\t\tSchema::drop('activities_types');\n\t}",
"public function down(Schema $schema) : void\n {\n $this->addSql('CREATE TABLE encherir_acheteur (encherir_id INT NOT NULL, acheteur_id INT NOT NULL, INDEX IDX_41ABAAFBB0BA17BB (encherir_id), INDEX IDX_41ABAAFB96A7BB5F (acheteur_id), PRIMARY KEY(encherir_id, acheteur_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE encherir_lot (encherir_id INT NOT NULL, lot_id INT NOT NULL, INDEX IDX_3C56919BB0BA17BB (encherir_id), INDEX IDX_3C56919BA8CBA5F7 (lot_id), PRIMARY KEY(encherir_id, lot_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('ALTER TABLE encherir_acheteur ADD CONSTRAINT FK_41ABAAFB96A7BB5F FOREIGN KEY (acheteur_id) REFERENCES acheteur (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_acheteur ADD CONSTRAINT FK_41ABAAFBB0BA17BB FOREIGN KEY (encherir_id) REFERENCES encherir (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_lot ADD CONSTRAINT FK_3C56919BA8CBA5F7 FOREIGN KEY (lot_id) REFERENCES lot (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_lot ADD CONSTRAINT FK_3C56919BB0BA17BB FOREIGN KEY (encherir_id) REFERENCES encherir (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir DROP FOREIGN KEY FK_503B7C878EB576A8');\n $this->addSql('ALTER TABLE encherir DROP FOREIGN KEY FK_503B7C878EFC101A');\n $this->addSql('DROP INDEX IDX_503B7C878EB576A8 ON encherir');\n $this->addSql('DROP INDEX IDX_503B7C878EFC101A ON encherir');\n $this->addSql('ALTER TABLE encherir DROP id_acheteur_id, DROP id_lot_id');\n }",
"public function down()\n {\n $this->table('accounting_entries')\n ->dropForeignKey(\n 'accounting_entry_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('associations_events')\n ->dropForeignKey(\n 'event_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('events')\n ->dropForeignKey(\n 'event_type_id'\n )->save();\n\n $this->table('members')\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics')\n ->dropForeignKey(\n 'statistics_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics_event')\n ->dropForeignKey(\n 'statistics_id'\n )\n ->dropForeignKey(\n 'event_id'\n )->save();\n\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('accounting_entries')->drop()->save();\n $this->table('accounting_entry_type')->drop()->save();\n $this->table('associations')->drop()->save();\n $this->table('associations_events')->drop()->save();\n $this->table('event_type')->drop()->save();\n $this->table('events')->drop()->save();\n $this->table('members')->drop()->save();\n $this->table('roles')->drop()->save();\n $this->table('statistics')->drop()->save();\n $this->table('statistics_event')->drop()->save();\n $this->table('statistics_type')->drop()->save();\n $this->table('users')->drop()->save();\n }",
"public function down()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{user_block}}\")){\n\t\t\t$this->dropTable(\"{{user_block}}\");\n\t\t}\n\n\t}",
"public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `user_login`;\n\nALTER TABLE `user` DROP `user_mname`;\n\nALTER TABLE `user` DROP `user_user`;\n\nALTER TABLE `user` DROP `user_password`;\n\nALTER TABLE `user` DROP `user_date_lastlogin`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }",
"public function down()\n\t{\n\t\tSchema::table('officers', function($t){\n\t\t\t$t->drop_column('role');\n\t\t});\n\t}",
"public function safeDown()\n {\n $this->down();\n }",
"public function safeDown()\n {\n $this->down();\n }",
"public function down()\n\t{\n\t\tSchema::drop('refs');\n\t}",
"public function down () {\n\t\treturn $this->rename_column ('headline', 'title', 'string', array ('limit' => 72));\n\t}",
"public function down()\n\t{\n\t\tSchema::drop('appeals');\n\t}",
"public function safeDown()\r\n {\r\n $this->down();\r\n }",
"public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n<<<<<<< HEAD\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCF082E755');\n $this->addSql('ALTER TABLE affaire DROP FOREIGN KEY FK_9C3F18EFED813170');\n=======\n<<<<<<< HEAD:src/Migrations/Version20200418121015.php\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCF082E755');\n $this->addSql('ALTER TABLE affaire DROP FOREIGN KEY FK_9C3F18EFED813170');\n=======\n $this->addSql('ALTER TABLE liste_affaire_affaire DROP FOREIGN KEY FK_CA81ADF3F082E755');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2463CD7C3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA25D493FF4');\n $this->addSql('ALTER TABLE correspondant_administratif DROP FOREIGN KEY FK_E1E7152EBF396750');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA246135043');\n>>>>>>> e1e13eb645b79ada7517f9d2be860dc1655c42db:src/Migrations/Version20200318150734.php\n>>>>>>> 0c1c04bb7c2bbee076bc5fdb1e2456d1af817866\n $this->addSql('ALTER TABLE enfant_sejour DROP FOREIGN KEY FK_159E7E65450D2529');\n $this->addSql('ALTER TABLE enfant_sejour DROP FOREIGN KEY FK_159E7E6584CF0CF');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2463CD7C3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA25D493FF4');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2FF631228');\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCE2687AC3');\n $this->addSql('ALTER TABLE sejour DROP FOREIGN KEY FK_96F52028E2687AC3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA246135043');\n $this->addSql('ALTER TABLE correspondant_administratif DROP FOREIGN KEY FK_E1E7152E46135043');\n $this->addSql('DROP TABLE affaire');\n<<<<<<< HEAD\n $this->addSql('DROP TABLE affaire_liste_affaire');\n $this->addSql('DROP TABLE type_affaire');\n=======\n<<<<<<< HEAD:src/Migrations/Version20200418121015.php\n $this->addSql('DROP TABLE affaire_liste_affaire');\n $this->addSql('DROP TABLE type_affaire');\n=======\n $this->addSql('DROP TABLE centre');\n $this->addSql('DROP TABLE correspondant_administratif');\n $this->addSql('DROP TABLE responsable_legal');\n>>>>>>> e1e13eb645b79ada7517f9d2be860dc1655c42db:src/Migrations/Version20200318150734.php\n>>>>>>> 0c1c04bb7c2bbee076bc5fdb1e2456d1af817866\n $this->addSql('DROP TABLE enfant');\n $this->addSql('DROP TABLE enfant_sejour');\n $this->addSql('DROP TABLE sejour');\n $this->addSql('DROP TABLE centre');\n $this->addSql('DROP TABLE correspondant_administratif');\n $this->addSql('DROP TABLE etablissement');\n $this->addSql('DROP TABLE liste_affaire');\n $this->addSql('DROP TABLE responsable_legal');\n $this->addSql('DROP TABLE user');\n }",
"public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `user`;\n\nDROP TABLE IF EXISTS `question`;\n\nDROP TABLE IF EXISTS `answer`;\n\nDROP TABLE IF EXISTS `image`;\n\nDROP TABLE IF EXISTS `vote`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }",
"public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}",
"public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}",
"public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}",
"public function down()\n {\n $this->table('mail_contents')->drop()->save();\n }",
"public function down() {\n\t}",
"public function down() {\n\t}",
"public function down() {\n\t}",
"public function down()\n {\n Schema::dropIfExists('reunion');\n }",
"public function down(): void\n {\n $this->table('services')\n ->dropForeignKey(\n ['currency_id','billing_period_id']\n )->save();\n $this->execute('DELETE FROM currencies');\n $this->execute('DELETE FROM billing_periods');\n $this->table('services')->drop()->save();\n $this->table('currencies')->drop()->save();\n $this->table('billing_periods')->drop()->save();\n }",
"public function down()\n\t{\n\t\tSchema::drop('article_category');\n\t}",
"public function down()\n {\n Schema::table('users', function (Blueprint $table) {\n $table->renameColumn('first_name', 'name');\n $table->dropIndex('users_first_name_index');\n $table->dropIndex('users_created_at_index');\n $table->dropIndex('users_updated_at_index');\n $table->dropColumn(\"last_name\");\n $table->dropColumn(\"username\");\n $table->dropColumn(\"provider\");\n $table->dropColumn(\"provider_id\");\n $table->dropColumn(\"api_token\");\n $table->dropColumn(\"code\");\n $table->dropColumn(\"remember_token\");\n $table->dropColumn(\"role_id\");\n $table->dropColumn(\"last_login\");\n $table->dropColumn(\"status\");\n $table->dropColumn(\"root\");\n $table->dropColumn('backend');\n $table->dropColumn(\"photo_id\");\n $table->dropColumn(\"lang\");\n $table->dropColumn(\"color\");\n $table->dropColumn(\"about\");\n $table->dropColumn(\"facebook\");\n $table->dropColumn(\"twitter\");\n $table->dropColumn(\"linked_in\");\n $table->dropColumn(\"google_plus\");\n });\n }",
"public function down()\n\t{\n\t\tSchema::drop('entries');\n\t}",
"public function down()\n\t{\n\t\tSchema::table('precios_aterrizajes_despegues', function(Blueprint $table)\n\t\t{\n\t\t\t//\n\t\t});\n\t}",
"public function down()\n{\nSchema::drop('statustype');\nSchema::drop('area');\nSchema::drop('region');\nSchema::drop('territory');\nSchema::drop('trackedevent');\nSchema::drop('zip_territory');\nSchema::drop('messagetype');\nSchema::drop('optintype');\nSchema::drop('representative');\nSchema::drop('pediatrician');\nSchema::drop('application_messagestatus');\nSchema::drop('application_optin');\nSchema::drop('application_trackedevent');\nSchema::drop('application');\n}",
"public function down()\n\t{\n\t\tSchema::drop(Config::get('sentry::sentry.table.users_metadata'));\n\t}",
"protected function tearDown(): void {\n $migration = include __DIR__.'/../database/migrations/create_all_visitors_tables.php.stub';\n $migration->down();\n\n $migrationTest = include __DIR__.'/Support/migrations/2023_01_12_000000_create_test_models_table.php';\n $migrationTest->down();\n }",
"public function down(Schema $schema) : void\n {\n $this->addSql('ALTER TABLE classe_personne DROP FOREIGN KEY FK_350001418F5EA509');\n $this->addSql('ALTER TABLE matiere_classe DROP FOREIGN KEY FK_AF649A8B8F5EA509');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA148F5EA509');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0E8F5EA509');\n $this->addSql('ALTER TABLE cours DROP FOREIGN KEY FK_FDCA8C9CF46CD258');\n $this->addSql('ALTER TABLE matiere_classe DROP FOREIGN KEY FK_AF649A8BF46CD258');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA14F46CD258');\n $this->addSql('ALTER TABLE personne_matiere DROP FOREIGN KEY FK_4E9BB3B7F46CD258');\n $this->addSql('ALTER TABLE absence DROP FOREIGN KEY FK_765AE0C9A21BD112');\n $this->addSql('ALTER TABLE classe_personne DROP FOREIGN KEY FK_35000141A21BD112');\n $this->addSql('ALTER TABLE contacte DROP FOREIGN KEY FK_C794A022A21BD112');\n $this->addSql('ALTER TABLE demande DROP FOREIGN KEY FK_2694D7A5A21BD112');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA14A6CC7B2');\n $this->addSql('ALTER TABLE personne_matiere DROP FOREIGN KEY FK_4E9BB3B7A21BD112');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EE455FCC0');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EBDDFA3C9');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EDC304035');\n $this->addSql('ALTER TABLE absence DROP FOREIGN KEY FK_765AE0C9E3797A94');\n $this->addSql('ALTER TABLE personne DROP FOREIGN KEY FK_FCEC9EFA76ED395');\n $this->addSql('ALTER TABLE reset_password_request DROP FOREIGN KEY FK_7CE748AA76ED395');\n $this->addSql('DROP TABLE absence');\n $this->addSql('DROP TABLE classe');\n $this->addSql('DROP TABLE classe_personne');\n $this->addSql('DROP TABLE contacte');\n $this->addSql('DROP TABLE cours');\n $this->addSql('DROP TABLE demande');\n $this->addSql('DROP TABLE matiere');\n $this->addSql('DROP TABLE matiere_classe');\n $this->addSql('DROP TABLE news');\n $this->addSql('DROP TABLE note');\n $this->addSql('DROP TABLE personne');\n $this->addSql('DROP TABLE personne_matiere');\n $this->addSql('DROP TABLE reset_password_request');\n $this->addSql('DROP TABLE salle');\n $this->addSql('DROP TABLE seance');\n $this->addSql('DROP TABLE user');\n }",
"public function down()\n\t{\n\t\tSchema::drop('stor_mem');\n\t}",
"public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('ALTER TABLE booking DROP FOREIGN KEY FK_E00CEDDEA76ED395');\n $this->addSql('ALTER TABLE booking DROP FOREIGN KEY FK_E00CEDDE19FCD424');\n $this->addSql('DROP TABLE booking');\n $this->addSql('DROP TABLE product_image');\n $this->addSql('DROP TABLE family_page_container');\n $this->addSql('DROP TABLE user');\n $this->addSql('DROP TABLE time_line');\n $this->addSql('ALTER TABLE family DROP FOREIGN KEY FK_A5E6215B727ACA70');\n $this->addSql('DROP INDEX IDX_A5E6215B727ACA70 ON family');\n $this->addSql('ALTER TABLE family ADD page_content_id INT NOT NULL, DROP parent_id, DROP has_uniques_prices, DROP has_seasonal_products');\n $this->addSql('ALTER TABLE family ADD CONSTRAINT FK_A5E6215B8F409273 FOREIGN KEY (page_content_id) REFERENCES page_content (id)');\n $this->addSql('CREATE INDEX IDX_A5E6215B8F409273 ON family (page_content_id)');\n $this->addSql('ALTER TABLE link ADD page_container_id INT DEFAULT NULL, DROP url');\n $this->addSql('ALTER TABLE link ADD CONSTRAINT FK_36AC99F123D5B0C FOREIGN KEY (page_container_id) REFERENCES page_container (id)');\n $this->addSql('CREATE INDEX IDX_36AC99F123D5B0C ON link (page_container_id)');\n $this->addSql('ALTER TABLE product DROP content, DROP order_by, DROP is_generic, DROP type, CHANGE title label VARCHAR(50) NOT NULL COLLATE utf8mb4_unicode_ci');\n $this->addSql('ALTER TABLE unit DROP duration');\n }",
"public function down(Schema $schema) : void\n {\n $this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F5299398F5B7AF75');\n $this->addSql('ALTER TABLE suppliers DROP FOREIGN KEY FK_AC28B95C8486F9AC');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D6498486F9AC');\n $this->addSql('ALTER TABLE stock DROP FOREIGN KEY FK_4B365660D629F605');\n $this->addSql('ALTER TABLE stock DROP FOREIGN KEY FK_4B365660E308AC6F');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F46CFFE9AD6');\n $this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04ADEE45BDBF');\n $this->addSql('ALTER TABLE suppliers DROP FOREIGN KEY FK_AC28B95CEE45BDBF');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649EE45BDBF');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F464584665A');\n $this->addSql('ALTER TABLE product_theme DROP FOREIGN KEY FK_36299C544584665A');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649D60322AC');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F46DCD6110');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F462ADD6D8C');\n $this->addSql('ALTER TABLE product_theme DROP FOREIGN KEY FK_36299C5459027487');\n $this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F5299398A76ED395');\n $this->addSql('DROP TABLE address');\n $this->addSql('DROP TABLE format');\n $this->addSql('DROP TABLE material');\n $this->addSql('DROP TABLE `order`');\n $this->addSql('DROP TABLE order_detail');\n $this->addSql('DROP TABLE picture');\n $this->addSql('DROP TABLE product');\n $this->addSql('DROP TABLE product_theme');\n $this->addSql('DROP TABLE role');\n $this->addSql('DROP TABLE stock');\n $this->addSql('DROP TABLE suppliers');\n $this->addSql('DROP TABLE theme');\n $this->addSql('DROP TABLE user');\n }",
"public function down()\n {\n Schema::dropIfExists('data');\n }",
"public function down()\n\t{\n\t\tSchema::create('jobs',function($table){$table->increments('id');});\n\t\tSchema::create('job_location',function($table){$table->increments('id');});\n\t\tSchema::create('job_skill',function($table){$table->increments('id');});\n\t\tSchema::create('locations',function($table){$table->increments('id');});\n\t\tSchema::create('location_program',function($table){$table->increments('id');});\n\t\tSchema::create('location_scholarship',function($table){$table->increments('id');});\n\t\tSchema::create('positions',function($table){$table->increments('id');});\n\t\tSchema::create('programs',function($table){$table->increments('id');});\n\t\tSchema::create('program_subject',function($table){$table->increments('id');});\n\t\tSchema::create('scholarships',function($table){$table->increments('id');});\n\t\tSchema::create('scholarship_subject',function($table){$table->increments('id');});\n\t\tSchema::create('skills',function($table){$table->increments('id');});\n\t\tSchema::create('subjects',function($table){$table->increments('id');});\n\t}"
] | [
"0.7950277",
"0.78636813",
"0.76065636",
"0.7493955",
"0.7320625",
"0.7245268",
"0.7187498",
"0.71543235",
"0.715298",
"0.7141911",
"0.7135835",
"0.71214414",
"0.71154845",
"0.71057886",
"0.7098064",
"0.70800334",
"0.7078775",
"0.70729095",
"0.7068331",
"0.7066272",
"0.7053364",
"0.7053364",
"0.7042174",
"0.7042174",
"0.7042174",
"0.7041765",
"0.7040102",
"0.7028846",
"0.70253754",
"0.7021679",
"0.6988633",
"0.6986877",
"0.6978061",
"0.6971848",
"0.6944203",
"0.6944203",
"0.6944203",
"0.6942135",
"0.6941429",
"0.6939214",
"0.6935277",
"0.69334567",
"0.6928689",
"0.6924838",
"0.6924794",
"0.6913486",
"0.6902361",
"0.6897891",
"0.6897845",
"0.6897824",
"0.6897824",
"0.68886673",
"0.688262",
"0.6874051",
"0.6869844",
"0.6863713",
"0.6858435",
"0.68545175",
"0.68440175",
"0.6842142",
"0.6836981",
"0.6836124",
"0.6834763",
"0.68303466",
"0.68297166",
"0.68282366",
"0.6826686",
"0.6824025",
"0.68185335",
"0.6811099",
"0.68078107",
"0.68056506",
"0.68056506",
"0.6789167",
"0.67755204",
"0.67742497",
"0.6765081",
"0.67597127",
"0.67596203",
"0.67564446",
"0.67564446",
"0.67564446",
"0.6753443",
"0.6753351",
"0.6753351",
"0.6753351",
"0.6752681",
"0.674581",
"0.6743746",
"0.67387754",
"0.6733766",
"0.67331296",
"0.6731279",
"0.67302275",
"0.6727377",
"0.67273724",
"0.672722",
"0.672607",
"0.67173517",
"0.67139125",
"0.671303"
] | 0.0 | -1 |
Get the registered name of the component. | protected static function getFacadeAccessor()
{
return 'ees.elastic';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getComponentName()\n {\n return $this->_componentName;\n }",
"public function getComponentName()\n {\n $component = $this->argument('component') ?: app('components')->getUsedNow();\n\n $component = app('components')->findOrFail($component);\n\n return $component->getStudlyName();\n }",
"public function get_component_name() {\n return $this->plugintype.'_'.$this->pluginname;\n }",
"public function get_name() {\n if(get_config(constants::M_COMPONENT,'customname')){\n return get_config(constants::M_COMPONENT,'customname');\n }else {\n return get_string('pluginname', constants::M_COMPONENT);\n }\n }",
"public function getComponentName(): string;",
"public function get_component() : string\n {\n return $this->component;\n }",
"protected function getComponentName(): string {\n if ($this->isPageTemplate()) {\n return \"{$this->layout}-{$this->post->post_type}\";\n }\n\n if (str_contains($this->componentId, '-')) {\n return implode('', \\__::chain($this->componentId)\n ->split('-')\n ->map(fn ($string) => \\__::capitalize($string))\n ->value());\n }\n\n return \\__::chain($this->componentId)\n ->camelCase()\n ->capitalize()\n ->value();\n }",
"public function getName()\n {\n return $this->get(self::_NAME);\n }",
"public function getName()\n {\n return $this->get(self::_NAME);\n }",
"public function getName()\n {\n return $this->get(self::_NAME);\n }",
"public function getName()\n {\n return $this->get(self::_NAME);\n }",
"public function getName()\n {\n return $this->get(self::_NAME);\n }",
"public function getName()\n {\n return $this->get(self::_NAME);\n }",
"public function getName()\n {\n return $this->get(self::_NAME);\n }",
"public function getName()\n\t{\n\t\treturn $this->name ?: class_basename($this);\n\t}",
"public function getName()\n\t{\n\t\treturn isset($this->_name) ? $this->_name : spl_object_hash($this);\n\t}",
"public function getName() {\n return $this->get(self::NAME);\n }",
"public function getName() {\n return $this->get(self::NAME);\n }",
"public function getName() {\n return $this->get(self::NAME);\n }",
"protected static function _getName()\n {\n return isset(static::$_name) ? static::$_name : get_called_class();\n }",
"public function getName()\n {\n return $this->get(self::NAME);\n }",
"public function getName()\n {\n return $this->get(self::NAME);\n }",
"public static function getName(): string\n {\n return static::$name;\n }",
"function getComponentName()\n {\n $p = get_class($this);\n\n $reflector = new ReflectionClass($p);\n $path = dirname($reflector->getFileName());\n\n $component = str_replace(BW_PATH_COMPONENTS . DS, '', $path);\n $component = str_replace(DS . 'models', '', $component);\n\n if (bwFolder::is(BW_PATH_COMPONENTS . DS . $component)) {\n return $component;\n } else {\n return NULL;\n }\n }",
"public function getName() {\n return ($this->isInit()) ? $this->name : null;\n }",
"function getName() {\n return $this->instance->getName();\n }",
"public function name() : string\n {\n return call_user_func([get_called_class(), 'resolveName']);\n }",
"public static function name()\n {\n return isset(static::$name) ? static::$name : self::getClassShortName();\n }",
"public function get_registered_component( $name );",
"public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}",
"public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}",
"public function getName()\n {\n return $this->str_name;\n }",
"public function getName()\n\t{\n\t\treturn str_replace('\\\\', '_', __CLASS__);\n\t}",
"function get_name()\n {\n return $this->get_default_property(self :: PROPERTY_NAME);\n }",
"public function getName()\n {\n $value = $this->get(self::NAME);\n return $value === null ? (string)$value : $value;\n }",
"public function getName()\n {\n $value = $this->get(self::NAME);\n return $value === null ? (string)$value : $value;\n }",
"public function getName()\n {\n $value = $this->get(self::NAME);\n return $value === null ? (string)$value : $value;\n }",
"public function getName(): string\n {\n return $this->getIdentifier()->getName();\n }",
"public function name()\n {\n $name = get_class($this);\n\n return substr($name, strrpos($name, '\\\\') + 1);\n }",
"public function get_name() {\n\n\t\treturn $this->name;\n\t}",
"public static function getName();",
"public function getName()\n {\n return implode(',', $this->components['CN']);\n }",
"function get_name()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_NAME);\r\n }",
"public function getName() {\n\t\t\n\t\t// cut last part of class name\n\t\treturn substr( get_class( $this ), 0, -11 );\n\t\t\n\t}",
"static public function getName(): string\n {\n return static::$name;\n }",
"public function getName()\n {\n return $this->__get(\"name\");\n }",
"public function getName()\n {\n return $this->__get(\"name\");\n }",
"public function get_name() {\n return get_string('pluginname', 'forumngtype_' . $this->get_id());\n }",
"public function getName()\n {\n switch ($this->queriedContext) {\n case $this->i8n('context-keyword'):\n return $this->i8n('bridge-name') . ' - ' . $this->i8n('title-keyword') . ' : ' . $this->getInput('q');\n break;\n case $this->i8n('context-group'):\n return $this->i8n('bridge-name') . ' - ' . $this->i8n('title-group') . ' : ' . $this->getKey('group');\n break;\n case $this->i8n('context-talk'):\n return $this->i8n('bridge-name') . ' - ' . $this->i8n('title-talk') . ' : ' . $this->getTalkTitle();\n break;\n default: // Return default value\n return static::NAME;\n }\n }",
"public function getName(): string {\n\t\t\treturn $this->name;\n\t\t}",
"public function get_component_name() {\n return 'user';\n }",
"public function name() {\n\t\treturn $this->name;\n\t}",
"function getName () {\n\t\treturn $this->name;\n\t}",
"public function get_name() {\n\t\treturn $this->name;\n\t}",
"public function get_name() {\n\t\treturn $this->name;\n\t}",
"public function get_name() {\n\t\treturn $this->name;\n\t}",
"public function get_name() {\n\t\treturn $this->name;\n\t}",
"public function getName(): string\n {\n\t\treturn $this->name;\n\t}",
"public function getName ()\n {\n return $this->getLabel();\n }",
"public function getName() {\n $path = explode('\\\\', get_class($this->object[\"data\"]));\n return array_pop($path);\n }",
"public function getName() {\n return self::NAME;\n }",
"public function getName() {\n\t\treturn $this->current_name;\n\t}",
"public function getName () {\n\t\treturn $this->name;\n\t}",
"public function getName()\n {\n return $this->__call(__FUNCTION__, func_get_args());\n }",
"public function getName() {\n\t\treturn ($this->name);\n\t}",
"public function getName()\n {\n return $this->getConfig ( 'name' );\n }",
"public function getName(): string {\n return $this->name;\n }",
"public function getName() {\n\t\treturn $this->_name;\n\t}",
"public function getName() {\n\t\treturn $this->_name;\n\t}",
"public function get_name(): string\n {\n return $this->name;\n }",
"function getName() {\n\t\treturn $this->name;\n\t}",
"public function getName() {\r\n $parsed = Parser::parseClassName(get_class());\r\n return $parsed['className'];\r\n }",
"public function getName()\n {\n return $this->getValue('name');\n }",
"public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }",
"public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }",
"public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }",
"public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }",
"public function getName() {\n\t\treturn $this->name;\n\t}",
"public function getName() {\n\t\treturn $this->name;\n\t}",
"public function getName() {\n\t\treturn $this->name;\n\t}",
"public function getName() {\n\t\treturn $this->name;\n\t}",
"public function getName() {\n\t\treturn $this->name;\n\t}",
"public function getName() {\n\t\treturn $this->name;\n\t}",
"public function getName() {\n\t\treturn $this->name;\n\t}",
"public function getName() {\n\t\treturn $this->name;\n\t}",
"public function getName() {\n\t\treturn $this->name;\n\t}",
"public function getName() {\n\t\treturn $this->name;\n\t}",
"public function getName() {\n\t\treturn $this->name;\n\t}",
"public function getName() {\n\t\treturn $this->name;\n\t}",
"public function getName() {\n\t\treturn $this->name;\n\t}",
"public function getName() {\n\t\treturn $this->name;\n\t}",
"public function getName() {\n\t\treturn $this->name;\n\t}",
"public function getName() {\n\t\treturn $this->name;\n\t}",
"public function getName() {\n\t\treturn $this->name;\n\t}",
"public function getName() {\n\t\treturn $this->name;\n\t}",
"public function getName() {\n\t\treturn $this->name;\n\t}",
"public function getName() {\n\t\treturn $this->name;\n\t}",
"public function getName() {\n\t\treturn $this->name;\n\t}",
"public function getName() {\n\t\treturn $this->name;\n\t}",
"public function name()\n\t{\n\t\treturn $this->name;\n\t}",
"public function name()\n\t{\n\t\treturn $this->name;\n\t}"
] | [
"0.8145252",
"0.81059104",
"0.79843503",
"0.7875069",
"0.7621859",
"0.71461004",
"0.7101458",
"0.705496",
"0.705496",
"0.705496",
"0.705496",
"0.705496",
"0.705496",
"0.705496",
"0.70394325",
"0.70209575",
"0.69877225",
"0.69877225",
"0.69877225",
"0.6984164",
"0.6965933",
"0.6965933",
"0.69652396",
"0.69386864",
"0.69140494",
"0.68974113",
"0.68967915",
"0.68593174",
"0.68486273",
"0.68120587",
"0.68120587",
"0.67868453",
"0.6775167",
"0.6775155",
"0.6755135",
"0.6755135",
"0.6755135",
"0.6752984",
"0.674242",
"0.6710877",
"0.670616",
"0.6703415",
"0.67011756",
"0.6691306",
"0.668469",
"0.66830266",
"0.66830266",
"0.66790146",
"0.66775",
"0.66692185",
"0.6668179",
"0.66607153",
"0.6660571",
"0.6660436",
"0.6660436",
"0.6660436",
"0.6660436",
"0.66595274",
"0.6658804",
"0.66557944",
"0.6651633",
"0.66399175",
"0.6633721",
"0.6629492",
"0.662811",
"0.66218275",
"0.6617998",
"0.66178477",
"0.66178477",
"0.6610472",
"0.6607344",
"0.6605626",
"0.66048145",
"0.66030926",
"0.66030926",
"0.66030926",
"0.66030926",
"0.65967",
"0.65967",
"0.65967",
"0.65967",
"0.65967",
"0.65967",
"0.65967",
"0.65967",
"0.65967",
"0.65967",
"0.65967",
"0.65967",
"0.65967",
"0.65967",
"0.65967",
"0.65967",
"0.65967",
"0.65967",
"0.65967",
"0.65967",
"0.65967",
"0.65967",
"0.65966654",
"0.65966654"
] | 0.0 | -1 |
Run the database seeds. | public function run()
{
$voices=Voice::Where('language',$language)->get(['ssml_gender','name','natural_sample_rate_hertz']);
foreach($voices as $voice){
$ssml_gender=strtok($voice, ' ');
$voiceCode= substr($voice, strpos($voice, " ") + 1);
$languageCode2=substr($voiceCode, 0, strpos($voiceCode, '-', strpos($voiceCode, '-')+1));
if($languageCode1==$languageCode2){
$languageVoice=LanguageVoice::create([
'language_id' => $newLanguage->id,
'name' => $voiceCode,
'ssml_gender' =>$ssml_gender ,
'natural_sample_rate_hertz' => $voice->natural_sample_rate_hertz,
]);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }",
"public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }",
"public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }",
"public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }",
"public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }",
"public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }",
"public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }",
"public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }",
"public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }",
"public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }",
"public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }",
"public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }",
"public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }",
"public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }",
"public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }",
"public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }",
"public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}",
"public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }",
"public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}",
"public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }",
"public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }",
"public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }",
"public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }",
"public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }",
"public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }",
"public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}",
"public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }",
"public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }",
"public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }",
"public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }",
"public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }",
"public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }",
"public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }",
"public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }",
"public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }",
"public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }",
"public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }",
"public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }",
"public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }",
"public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }",
"public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}",
"public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }",
"public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }",
"public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }",
"public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }",
"public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }",
"public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }",
"public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }",
"public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }"
] | [
"0.8013876",
"0.79804534",
"0.7976992",
"0.79542726",
"0.79511505",
"0.7949612",
"0.794459",
"0.7942486",
"0.7938189",
"0.79368967",
"0.79337025",
"0.78924936",
"0.78811055",
"0.78790957",
"0.78787595",
"0.787547",
"0.7871811",
"0.78701615",
"0.7851422",
"0.7850352",
"0.7841468",
"0.7834583",
"0.7827792",
"0.7819104",
"0.78088796",
"0.7802872",
"0.7802348",
"0.78006834",
"0.77989215",
"0.7795819",
"0.77903426",
"0.77884805",
"0.77862066",
"0.7778816",
"0.7777486",
"0.7765202",
"0.7762492",
"0.77623445",
"0.77621746",
"0.7761383",
"0.77606887",
"0.77596676",
"0.7757001",
"0.7753607",
"0.7749522",
"0.7749292",
"0.77466977",
"0.7729947",
"0.77289546",
"0.772796",
"0.77167094",
"0.7714503",
"0.77140456",
"0.77132195",
"0.771243",
"0.77122366",
"0.7711113",
"0.77109736",
"0.7710777",
"0.7710086",
"0.7705484",
"0.770464",
"0.7704354",
"0.7704061",
"0.77027386",
"0.77020216",
"0.77008796",
"0.7698617",
"0.76985973",
"0.76973504",
"0.7696405",
"0.7694293",
"0.7692694",
"0.7691264",
"0.7690576",
"0.76882726",
"0.7687433",
"0.7686844",
"0.7686498",
"0.7685065",
"0.7683827",
"0.7679184",
"0.7678287",
"0.76776296",
"0.76767945",
"0.76726556",
"0.76708084",
"0.76690495",
"0.766872",
"0.76686716",
"0.7666299",
"0.76625943",
"0.7662227",
"0.76613766",
"0.7659881",
"0.7656644",
"0.76539344",
"0.76535016",
"0.7652375",
"0.7652313",
"0.7652022"
] | 0.0 | -1 |
===[ Pagesetter interface ]============================================== | function active()
{
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setPage(Page $page);",
"public function set_page($page);",
"protected function setupPage() {}",
"public function setPage($page){\n $this->page=$page;\n }",
"public function setPageID(){/*ACTUALLY NOT DEFINED*/}",
"public function setPage($value)\n {\n return $this->set('Page', $value);\n }",
"public function setPage($value)\n {\n return $this->set('Page', $value);\n }",
"public function setPage($value)\n {\n return $this->set('Page', $value);\n }",
"public function setPage($value)\n {\n return $this->set('Page', $value);\n }",
"public function setPage($value)\n {\n return $this->set('Page', $value);\n }",
"public function setPage($value)\n {\n return $this->set('Page', $value);\n }",
"public function setPage($value)\n {\n return $this->set('Page', $value);\n }",
"public function setPage($value)\n {\n return $this->set('Page', $value);\n }",
"public function setPage($value)\n {\n return $this->set('Page', $value);\n }",
"public function setPage($value)\n {\n return $this->set('Page', $value);\n }",
"public function setPage($value)\n {\n return $this->set('Page', $value);\n }",
"public function setPage($value)\n {\n return $this->set('Page', $value);\n }",
"public function setPage($value)\n {\n return $this->set('Page', $value);\n }",
"public function setPage($value)\n {\n return $this->set('Page', $value);\n }",
"public function setPage($value)\n {\n return $this->set('Page', $value);\n }",
"public function setPage($value)\n {\n return $this->set('Page', $value);\n }",
"public function setPage($value)\n {\n return $this->set('Page', $value);\n }",
"public function setPage($value)\n {\n return $this->set('Page', $value);\n }",
"public function setPage($value)\n {\n return $this->set('Page', $value);\n }",
"public function setPage($value)\n {\n return $this->set('Page', $value);\n }",
"public function setPage($value)\n {\n return $this->set('Page', $value);\n }",
"public function setPage($page){\n $this->page = $page;\n }",
"public function setPage($page) {\n\t\t$this->page =$page;\n\t}",
"public function setPage($value)\n {\n return $this->set(self::page, $value);\n }",
"public function setPage($page) {\n $this->page = $page;\n }",
"public function setCurrentPage( $page );",
"public function initPage() {}",
"public function initPage() {}",
"function setOnPage($value){\n\t\t$this->on_page = $value;\n\t}",
"public function setHtmlPage($page)\n\t{\n\t\t$this->page = (string)$page;\n\t\t$this->pageInitialized = false;\n\t}",
"protected function initPageRenderer() {}",
"protected function initPageRenderer() {}",
"public function setPage($value) {\n return $this->setParameter('page', $value);\n }",
"public function setPage($value) {\n return $this->setParameter('page', $value);\n }",
"public function setPage($value)\n {\n return $this->setParameter('page', $value);\n }",
"abstract protected function getPage() ;",
"protected function getPage() {}",
"protected function getPage() {}",
"public function postPageGeneration(OutputObjectInterface $page);",
"public function setPages() {\n $this->pages = array(\n array(\n 'page_title' => 'Open Badge',\n 'menu_title' => 'Open Badge',\n 'capability' => 'manage_options',\n 'menu_slug' => self::SLUG_PLUGIN,\n 'callback' => array(DashboardTemp::class, 'main'),\n 'icon_url' => 'dashicons-awards',\n 'position' => '110'\n )\n );\n }",
"public function prePageGeneration(OutputObjectInterface $page);",
"public function page_init() {\n }",
"public function setPage(int $page)\n {\n $this->page = $page;\n }",
"abstract protected function view_generatePageContent();",
"abstract protected function setPreviousPage();",
"public function setPages() {\n $this->pages = array(\n array(\n 'page_title' => 'PM Plugin',\n 'menu_title' => 'PM',\n 'capability' => 'manage_options',\n 'menu_slug' => 'pm_plugin',\n 'callback' => array($this->callbacks, 'adminDashboard'),\n 'icon_url' => 'dashicons-store',\n 'position' => 110,\n ),\n );\n\n }",
"protected function setupPage()\n {\n // Yes, hardcoded on purpose\n $this->pageRenderer->setXmlPrologAndDocType('<!DOCTYPE html>');\n $this->pageRenderer->setCharSet('utf-8');\n $this->pageRenderer->setLanguage($GLOBALS['LANG']->lang);\n $this->pageRenderer->addMetaTag('<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">');\n }",
"protected function _after_read(): void\n {\n $contents = PageContent::get_data_by( ['page_id' => $this->page_id], $offset = 0,$limit = 1, $use_like = FALSE, $sort_by = 'page_content_id', $sort_desc = TRUE );\n if (isset($contents[0]) && !$this->is_property_modified('page_content')) {\n $this->page_content = $contents[0]['page_content_data'];\n }\n\n if ($this->page_group_id && !$this->is_property_modified('page_group_uuid') ) {\n $PageGroup = new PageGroup($this->page_group_id);\n $this->page_group_uuid = $PageGroup->get_uuid();\n }\n\n //the property may be NULL not because it is not set/initialized but because it was explicitely set to NULL on another instance\n if (!$this->page_slug && !$this->is_property_modified('page_slug')) {\n $this->page_slug = $this->get_alias();\n }\n }",
"static public function setHTML() {\n\t\tself::$page_type = 0;\n\t}",
"public function testSetPage()\n {\n $viewCounterServiceMock = $this->getMockBuilder(ViewCounter::class)\n ->setConstructorArgs([$this->counterManagerMock, $this->requestStackMock, $this->viewcounterConfigMock])\n ->setMethods(['setPage'])\n ->getMock();\n\n $viewCounterServiceMock\n ->expects($this->once())\n ->method('setPage')\n ->with($this->pageMock)\n ->willReturn($viewCounterServiceMock);\n\n $viewCounterService = $this->invokeMethod($viewCounterServiceMock, 'setPage', [$this->pageMock]);\n\n $this->assertTrue($viewCounterService instanceof AbstractViewCounter);\n }",
"protected function set_page($page){\n self::$page_name = $page;\n }",
"public function setPage(int $page): void\n {\n $this->page = $page;\n }",
"function createPage();",
"public static function init() {\n\t\tif (self::$_initialized) {\n\t\t\treturn;\n\t\t}\n\t\tparent::setInstance(new Page());\n\t\tself::$_initialized = true;\n\t}",
"public function setPageID(){\n\t\t\n\t\t$id = 'page';\n\t\t$s = '-';\n\t\t$pound = (!self::USE_SPLASH)?'#':'';\n\t\t$prefix = $pound.$id.$s;\n\t\t$this->headerContainerId = $prefix.'header'.$s.'container';\n\t\t$this->headerId = $prefix.'header';\n\t\t$this->subtitleId = $prefix.'subtitle';\n\t\t$this->brandId = $prefix.'brand';\n\t\t\n\t}",
"public function setPage($page)\n {\n $this->page = intval($page);\n \n if ($this->page == 0) {\n $this->page = 1;\n }\n }",
"private function setPage(){\n\t if(!empty($_GET['page'])){\n\t if($_GET['page']>0){\n\t if($_GET['page'] > $this->pagenum){\n\t return $this->pagenum;\n\t }else{\n\t return $_GET['page'];\n\t }\n\t }else{\n\t return 1;\n\t }\n\t }else{\n\t return 1;\n\t }\n\t }",
"public function setPages($pages)\n\t{\n\t\t$this->pages = $pages;\n\t}",
"public static function setPage($page)\n {\n if(isset($page) && !empty($page)){\n self::$page = $page;\n }\n }",
"public function setPageMenu() {\n\t\t\tglobal $factory_impressive_page_menu;\n\n\t\t\t$dashicon = ( ! empty( $this->page_menu_dashicon ) ) ? ' ' . $this->page_menu_dashicon : '';\n\t\t\t$short_description = ( ! empty( $this->page_menu_short_description ) ) ? ' ' . $this->page_menu_short_description : '';\n\n\t\t\tif ( is_multisite() && is_network_admin() && ! $this->network ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$factory_impressive_page_menu[ $this->getMenuScope() ][ $this->getResultId() ] = [\n\t\t\t\t'type' => $this->type, // page, options\n\t\t\t\t'url' => $this->getBaseUrl(),\n\t\t\t\t'title' => $this->getPageTitle() . ' <span class=\"dashicons' . $dashicon . '\"></span>',\n\t\t\t\t'short_description' => $short_description,\n\t\t\t\t'position' => $this->page_menu_position,\n\t\t\t\t'parent' => $this->page_parent_page\n\t\t\t];\n\t\t}",
"public function setPageTitle($page_name);",
"public function setPageTitle($page_name);",
"public function setStartPage($page);",
"protected function setContentType()\n {\n $this->content_type = 'Page';\n }",
"protected function _prepare_page($page)\n {\n }",
"public function prePageContent();",
"public function setPageKey($key);",
"public function setPage($page)\n {\n $this->page = $page;\n return $this;\n }",
"abstract protected function render_page_content(): void;",
"public function setPage($page)\n\t{\n\t\tif((int) $page == 0)\n\t\t{\n\t\t\t$page = 1;\n\t\t}\n\t\t$this->page = $page;\n\t\t// (re-)calculate start rec\n\t\t//$this->calculateStart();\n\t}",
"function AssignPage($subpage = 0)\n\t{\treturn new AdminPageContent($subpage);\n\t}",
"public function setPage($value, $validatePage = false)\n {\n if ($value === null) {\n $this->zeroBasedCurrentPageNum = null;\n } else {\n $value = (int) $value;\n if ($validatePage && $this->validatePage) {\n $pageCount = $this->getPageCount();\n if ($value >= $pageCount) {\n $value = $pageCount - 1;\n }\n }\n if ($value < 0) {\n $value = 0;\n }\n $this->zeroBasedCurrentPageNum = $value;\n }\n }",
"public function getPage() {}",
"public function getPage() {}",
"function __construct($pagetype) {\t\n\t\t\t$page = $pagetype;\t\t\t\n\t\t}",
"function savePage(PageInterface $page);",
"private function setPageType($type) {\n\t\tif(!empty($type))\n\t\t\t$this->pageType = $type;\n\t\telse\n\t\t\tthrow new Exception('PageType cant be empty');\n\t}",
"public function setPageNum($num) {\n\t\t$this->pageNum = (int) $num;\t\n\t}",
"public function getPageHandler();",
"public function setPage(Page $oPage) {\n \t\n \t// Set our page\n \t$this->oPage = $oPage;\n \t\n \t// Return instance\n \treturn $this;\n }",
"protected function setPage_id($value)\n\t{\n\t\t$this->page_id = $value;\n\t}",
"function MyMod_Paging_Page_No_Set()\n {\n //$this->MyMod_Paging_No=$this->PresetPage;\n if (empty($this->MyMod_Paging_No))\n {\n $this->MyMod_Paging_No=$this->GetPOST($this->ModuleName.\"_Page\");\n if (empty($this->MyMod_Paging_No))\n {\n $this->MyMod_Paging_No=$this->GetGETOrPOST(\"Page\");\n }\n }\n\n if (\n empty($this->MyMod_Paging_No)\n ||\n $this->MyMod_Paging_No>$this->MyMod_Paging_N\n )\n {\n $this->MyMod_Paging_No=1;\n }\n }",
"function setCurrentPage($page) {\n $this->current_page = $page;\n }",
"function setAsStartPageObject()\n\t{\n\t\tglobal $ilCtrl, $lng;\n\n\t\t$this->checkPermission(\"write\");\n\n\t\tif (!is_array($_POST[\"imp_page_id\"]) || count($_POST[\"imp_page_id\"]) != 1)\n\t\t{\n\t\t\tilUtil::sendInfo($lng->txt(\"wiki_select_one_item\"), true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->object->removeImportantPage((int) $_POST[\"imp_page_id\"][0]);\n\t\t\t$this->object->setStartPage(ilWikiPage::lookupTitle((int) $_POST[\"imp_page_id\"][0]));\n\t\t\t$this->object->update();\n\t\t\tilUtil::sendSuccess($this->lng->txt(\"msg_obj_modified\"),true);\n\t\t}\n\t\t$ilCtrl->redirect($this, \"editImportantPages\");\n\t}",
"private function setPage($page)\n {\n $this->page = (int)$page;\n $this->offset = ($page - 1) * $this->limit;\n }",
"function SetupMultiPages() {\r\n\t\t$pages = new cSubPages();\r\n\t\t$pages->Add(0);\r\n\t\t$pages->Add(1);\r\n\t\t$pages->Add(2);\r\n\t\t$pages->Add(3);\r\n\t\t$pages->Add(4);\r\n\t\t$pages->Add(5);\r\n\t\t$pages->Add(6);\r\n\t\t$this->MultiPages = $pages;\r\n\t}",
"public function testPageValue() : void {\n\t\t$this->assertEquals('page', PostType::Page->value);\n\t}",
"function get(){\n\t$temp = $this->page;\n\t$this->addFooter();\n\t//restore the page for next call for\n\t$page= $this->page;\n\t$this->page = $temp;\n\n return $this->page;\n}",
"function MyMod_Paging_NPages_Set()\n {\n if ($this->NumberOfItems>$this->NItemsPerPage)\n {\n $this->MyMod_Paging_N=intval($this->NumberOfItems/$this->NItemsPerPage);\n $res=$this->NumberOfItems % $this->NItemsPerPage;\n if ($res>0) { $this->MyMod_Paging_N++; }\n }\n elseif ($this->NumberOfItems>0)\n {\n $this->MyMod_Paging_N=1;\n }\n else\n {\n $this->MyMod_Paging_N=0;\n }\n }",
"public function setPageNumber($pageNumber);",
"public function create()\n {\n //for the PAGE on which to create\n }",
"public function generatePage_postProcessing() {}",
"private function setPageSelect()\n {\n $GLOBALS['TSFE']->sys_page = Tx_Smarty_Service_Compatibility::makeInstance('t3lib_pageSelect');\n $GLOBALS['TSFE']->sys_page->versioningPreview = false;\n $GLOBALS['TSFE']->sys_page->versioningWorkspaceId = false;\n $GLOBALS['TSFE']->where_hid_del = ' AND pages.deleted=0';\n $GLOBALS['TSFE']->sys_page->init(false);\n $GLOBALS['TSFE']->sys_page->where_hid_del .= ' AND pages.doktype<200';\n $GLOBALS['TSFE']->sys_page->where_groupAccess\n = $GLOBALS['TSFE']->sys_page->getMultipleGroupsWhereClause('pages.fe_group', 'pages');\n }",
"public function page(){\n\t\t$pageLoader = $this->plugin->library('Page');\n\t\t$pageLoader->load('admin/settings');\n\t}",
"private function set_PageData() {\n\n\t\t\t// We have an existing page\n\t\t\t// should feed a wp_update_post not wp_insert_post\n\t\t\t//\n\t\t\tif ( $this->page_exists() ) {\n\t\t\t\t$this->pageData = array(\n\t\t\t\t\t'ID' => $this->linked_postid,\n\t\t\t\t\t'slp_notes' => 'pre-existing page',\n\t\t\t\t);\n\n\t\t\t\t// No page yet, default please.\n\t\t\t\t//\n\t\t\t} else {\n\t\t\t\t$this->pageData = array(\n\t\t\t\t\t'ID' => '',\n\t\t\t\t\t'post_type' => SLPlus::locationPostType,\n\t\t\t\t\t'post_status' => $this->pageDefaultStatus,\n\t\t\t\t\t'post_title' => ( empty( $this->store ) ? 'SLP Location #' . $this->id : $this->store ),\n\t\t\t\t\t'post_content' => '',\n\t\t\t\t\t'slp_notes' => 'new page',\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Apply our location page data filters.\n\t\t\t// This is what allows add-ons to tweak page data.\n\t\t\t//\n\t\t\t// FILTER: slp_location_page_attributes\n\t\t\t//\n\t\t\t$this->pageData = apply_filters( 'slp_location_page_attributes', $this->pageData );\n\n\t\t\treturn $this->pageData;\n\t\t}",
"public function getPages() {}"
] | [
"0.775415",
"0.7512885",
"0.7330351",
"0.71276003",
"0.7106843",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69661206",
"0.69501215",
"0.6831845",
"0.6816877",
"0.68136716",
"0.6790533",
"0.6790533",
"0.67520857",
"0.669356",
"0.66525775",
"0.66525126",
"0.6595817",
"0.6595817",
"0.65483683",
"0.65397567",
"0.653611",
"0.6536",
"0.6532065",
"0.6476222",
"0.64369303",
"0.64317954",
"0.64297944",
"0.6426875",
"0.64158034",
"0.63822716",
"0.63617074",
"0.63227314",
"0.6321651",
"0.632065",
"0.63127303",
"0.63092023",
"0.62994516",
"0.6296867",
"0.6290684",
"0.6284811",
"0.6278344",
"0.6278257",
"0.6275693",
"0.6271603",
"0.62664706",
"0.62664706",
"0.6238314",
"0.6232787",
"0.6203111",
"0.61726695",
"0.617247",
"0.61432296",
"0.6143129",
"0.6126747",
"0.6122888",
"0.61179143",
"0.61064726",
"0.61064726",
"0.60980624",
"0.60953456",
"0.60821193",
"0.6048479",
"0.6044989",
"0.6026968",
"0.60145366",
"0.600813",
"0.5996944",
"0.59871626",
"0.5982773",
"0.5972972",
"0.5972895",
"0.5958207",
"0.59489375",
"0.5942715",
"0.5937565",
"0.5936178",
"0.5932222",
"0.5917241",
"0.59132534",
"0.5911205"
] | 0.0 | -1 |
Dirty way to get field name | function OnPrePublicationCreated($args)
{
$tmp = explode(":", $this->name);
$fname = $tmp[2];
$this->parseTypeData();
foreach ($args['pubInfo']['fields'] as $field) {
if ($field['id'] === $this->fid){
$mkinfo = pagesetter_mymap_decode($args['pubData'][$field['name']]);
if (isset($mkinfo['lat'])) {
$coords = array('lat' => $mkinfo['lat'],'lng' => $mkinfo['lng']);
} else {
$marker = pnModAPIFunc('MyMap','user','getMarkers',array('id' => $mkinfo['mkid']));
$coords = array(
'lat' => $marker[0]['lat'],
'lng' => $marker[0]['lng']);
}
$info = pagesetter_mymap_reverse($coords, $this->infoType);
$args['pubData'][$fname] = $info;
}
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_field_name();",
"public function getFieldName() {}",
"public function getFieldName() {\n return $this->fieldName;\n }",
"public function getDbFieldName($field_name);",
"public function getFieldName($field) {\n return $field['name'];\n }",
"public function getFieldName()\n {\n return $this->fieldName;\n }",
"public function getFieldName()\n {\n return $this->fieldName;\n }",
"public function getFieldName()\n {\n return $this->fieldName;\n }",
"public function getFieldName() {\r\n return $this->_fieldName;\r\n }",
"public function getFieldName()\r\n\t{\r\n\t\treturn $this->name;\r\n\t}",
"function get_fields_name()\n\t{\n\t\treturn $this->db->list_fields( $this->table );\n\t}",
"public function get_field_name($field_name)\n {\n }",
"public function fieldName()\n\t{\n\t\tif(strpos($this->key, '_id'))\n\t\t{\n\t\t\treturn str_replace('_id', '', $this->key);\n\t\t}\n\n\t\treturn $this->key;\n\t}",
"public function getField(): string\n {\n return $this->field;\n }",
"function getFieldName($n){\n\t\t$field = $this->fields[$n]['Field'];\n\t\treturn $field;\n\t}",
"public function name($field) {\n\t\treturn $field;\n\t}",
"public function getField(): string;",
"function hc_field_name($field){\n\t\techo hc_get_field_name($field);\n\t}",
"public function getField($field_name);",
"public function get_field_label() {\n\t\treturn $this->get_field_attr( 'name' );\n\t}",
"public function get_field_name($name)\n {\n if( ! $this->_model)\n {\n return $name;\n }\n return $this->get_model()->get_field_name($name);\n }",
"public function getFieldName(): float|int|string|null\n {\n return $this->field?->getFieldName();\n }",
"public function getField()\n {\n $value = $this->name;\n if (null != $this->field) {\n $value = $this->field;\n }\n return $value;\n }",
"protected function getFieldNamePrefix() {}",
"protected function getFieldNamePrefix() {}",
"public function getName(){ return $this->getField('name'); }",
"function getName () {return $this->getFieldValue ('name');}",
"public function get_field(/* .... */)\n {\n return $this->_field;\n }",
"public function getName()\n {\n return $this->__get(self::FIELD_NAME);\n }",
"function getFieldName(DataProperty &$property)\n {\n if (!is_object($property)) debug($property); // <-- this throws an exception\n // support [database.]table.field syntax\n if (preg_match('/^(.+)\\.(\\w+)$/', $property->source, $matches)) {\n $table = $matches[1];\n $field = $matches[2];\n return $field;\n }\n }",
"function hc_get_field_name($field){\n\t\t$json = get_option('hc_extra_fields');\n\t\t$json = json_decode($json);\n\t\tforeach ($json as $key => $value) {\n\t\t\tif ($value->field == $field) {\n\t\t\t\treturn $value->fieldname;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public function getField();",
"public function getField();",
"public function getField();",
"function field_name($sth,$index){\n try{\n switch(dbconection::$conntype){\n case \"pdo\" : return $sth->getColumnMeta($index)[\"name\"]; break;\n case \"mysql\" : return mysqli_fetch_field_direct($sth,$index)->name; break;\n case \"postgresql\" : return pg_field_name($sth,$index); break;\n default : throw new Exception(\"Nenhum tipo de conexão definida.\");\n }\n }catch(Exception $e){\n printr(\"NAME FIELDS ERROR : \".$e->getMessage());\n }\n }",
"public function getField($fieldName) {}",
"public function getIdFieldName()\n {\n return $this->_idFieldName;\n }",
"public function getFieldName(): ?string\n {\n return $this->getOption('fieldname');\n }",
"public function field_name( $qHanle, $offset )\r\n\t{\r\n\t\treturn $qHanle->Fields( $offset )->Name;\r\n\t}",
"public abstract function field_name($offset);",
"public function get_field_key() {\n\t\treturn $this->get_field_attr( 'field_key' );\n\t}",
"public function getField($name) { return $this->fields[$name]; }",
"public function getSingleIdentifierFieldName(): string;",
"function fieldname($fieldnum) {\r\n\t\treturn @mysql_field_name( $this->result, $fieldnum );\r\n\t}",
"function db_field_name($qid, $fieldno) {\n\n\treturn mysqli_fetch_field_direct($qid, $fieldno);\n}",
"public function getIdFieldName()\n {\n return $this->prototype->getIdFieldName();\n }",
"function getFieldLabel($fieldName){\n\n\t\tif( isset($this->labels[$fieldName]) ) return $this->labels[$fieldName];\n\t\telse return ucwords( str_replace(\"_\", \" \", $fieldName) );\n\n\t}",
"function get_cf_name($field)\n\t{\n\t\treturn substr($field,1);\n\t}",
"public function getField()\n {\n return $this->field;\n }",
"public function getField()\n {\n return $this->field;\n }",
"public function getField()\n {\n return $this->field;\n }",
"public function getField()\n {\n return $this->field;\n }",
"public function getField()\n {\n return $this->_field;\n }",
"private function _getPureModelNameField()\n {\n $name = explode('Mapper_', get_class($this));\n $name = explode('_', $name[1]);\n $out = '';\n foreach($name as $k => $part)\n {\n if($k == 0)\n {\n $out .= strtolower($part);\n }\n else\n {\n $out .= ucfirst($part);\n }\n }\n return $out;\n }",
"public function getFieldName($field_name)\n {\n\n return sfConfig::get('app_sf_guard_plugin_profile_'.$field_name.'_name', $field_name);\n }",
"public function getField() {\n\t\treturn $this->field; \n\t}",
"function getFieldNames();",
"public function getField() {\n\t\treturn $this->field;\n\t}",
"public function getField(){\n return $this->field;\n }",
"function get_field_name( $str ){\n\t\treturn 'field-'.$this->id_base.'['.$this->number.']['.$str.']';\n\t}",
"public function getField() {\n\t\treturn $this->_field;\n\t}",
"function sql_field_name($res, $offset = 0)\n {\n $column = $res->getColumnMeta($offset);\n if ($column) {\n return $column['name'];\n }\n return false;\n }",
"private function course_bank_get_field_name($field) {\n return get_string($field, 'tool_coursebank');\n }",
"function wrapper_field_name($columnnum) {\n\t\treturn $this->functions['field_name']($this->query_id, $columnnum);\n\t}",
"public static function get_field_name($record)\n {\n return array_keys($record->getAttributes());\n }",
"public abstract function GetCurrentField();",
"abstract function getProfilePhpName($field_name);",
"public function field_name($result, $index){\r\n\t\t$obj_field = new ADOFieldObject();\r\n\t\t$obj_field = $result->FetchField($index);\r\n\t\treturn isset($obj_field->name) ? $obj_field->name : \"\";\r\n\t}",
"function _get_field_names()\n {\n return array();\n }",
"function getfield($field){\n\n\t\treturn($this->record[$field]);\n\t}",
"public function fieldName($name) {\n\t\treturn self::FORM_NAME.'['.$name.']';\n\t}",
"public function getFieldNames(){\n $names=[];\n if (!empty($this->dbFields)){\n foreach($this->dbFields as $dbField){\n $names[$dbField->id]=$dbField->name;\n }\n }\n return $names;\n }",
"function getField(){\n\t\treturn $this->Field;\n\t}",
"public function getRecordIdFieldName()\n {\n $metadata = $this->exportMetaData();\n $recordIdFieldName = $metadata[0]['field_name'];\n return $recordIdFieldName;\n }",
"public function getIdFieldName()\n {\n if (empty($this->_idFieldName)) {\n Virtual::throwException('Empty identifier field name');\n }\n\n return $this->_idFieldName;\n }",
"abstract function getProfileColumnName($field_name);",
"function getRealFieldName($fieldname){\n\t\tif ( isset( $this->_cache[__FUNCTION__][$fieldname] ) ){\n\t\t\t// Let's check the cache first to see if we have already calculated this value.\n\t\t\treturn $this->_cache[__FUNCTION__][$fieldname];\n\t\t}\n\t\t$data = $this->_parseSQL();\n\t\t$this->_expandGlobs($data);\n\t\t$column = null;\n\t\t\n\t\tforeach ($data['columns'] as $columninfo ){\n\t\t\tif ( $fieldname == $columninfo['alias'] ){\n\t\t\t\t//echo \"$fieldname foudn\";\n\t\t\t\tif ( $columninfo['type'] != 'ident' ){\n\t\t\t\t\t$out = null;\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t$out = $columninfo['value'];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else if ( !$columninfo['alias'] and $fieldname == $columninfo['value'] ){\n\t\t\t\t$out = $fieldname;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->_cache[__FUNCTION__][$fieldname] = $out;\n\t\treturn $out;\n\t\t\n\t}",
"abstract public function getAllFieldsRealNames(): array;",
"public function actionGetfieldname($id)\n\t{\n\t\t$field = Field::find()->where(['id' => $id])->one();\n\t\tif($field)\n\t\t{\n\t\t\treturn $field->getAttribute('name').' '.$field->getAttribute('model').' '.$field->getAttribute('value');\n\t\t}\n\t\treturn \"\";\n\t}",
"protected function getIdField()\n {\n return self::OBJ_NAME;\n }",
"protected function getIdField()\n {\n return self::OBJ_NAME;\n }",
"function getPropertyName() ;",
"public function getFieldNames() {}",
"public function getPropertyName() {}",
"public function getPropertyName() {}",
"public function getPropertyName() {}",
"public function field($field, $name = FALSE)\n\t{\n\t\tif (empty($this->_fields[$field]))\n\t\t{\n\t\t\t$this->_fields[$field] = Jelly_Meta::field($this, $field);\n\t\t}\n\t\t\n\t\tif ($name)\n\t\t{\n\t\t\tif (is_object($this->_fields[$field]))\n\t\t\t{\n\t\t\t\treturn $this->_fields[$field]->name;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->_fields[$field];\n\t\t}\n\t\t\n\t\treturn NULL;\n\t}",
"function GetFullFieldName($field, $table = \"\", $addAs = true, $connection = null)\n{\n\tglobal $strTableName, $cman;\n\t\n\tif( $table == \"\" )\n\t\t$table = $strTableName;\n\t\n\tif( !$connection )\n\t\t$connection = $cman->byTable( $table );\n\t$pSet = new ProjectSettings($table);\n\t\n\t$fname = RunnerPage::_getFieldSQL($field, $connection, $pSet);\n\t\n\tif($pSet->hasEncryptedFields() && !isEncryptionByPHPEnabled())\n\t{\n\t\t$cipherer = new RunnerCipherer($table);\n\t\treturn $cipherer->GetFieldName($fname, $field)\n\t\t\t.($cipherer->isFieldEncrypted($field) && $addAs ? \" as \".$connection->addFieldWrappers($field) : \"\");\n\t}\n\treturn $fname;\n}",
"public function getPropertyName();",
"public function getPropertyName();",
"function getFieldNameHeadName($name) {\n\t\tif (preg_match('/\\\\[([^\\\\[\\\\]]+)\\\\]$/', $name, $regs)) {\n\t\t\t$name = $regs[1];\n\t\t}\t\n\t\treturn $name;\n\t}",
"public function getName()\r\n\t{\r\n\t\tif ($this->def->getField(\"name\"))\r\n\t\t\treturn $this->getValue(\"name\");\r\n\t\tif ($this->def->getField(\"title\"))\r\n\t\t\treturn $this->getValue(\"title\");\r\n\t\tif ($this->def->getField(\"subject\"))\r\n\t\t\treturn $this->getValue(\"subject\");\r\n\t\tif ($this->def->getField(\"full_name\"))\r\n\t\t\treturn $this->getValue(\"full_name\");\r\n\t\tif ($this->def->getField(\"first_name\"))\r\n\t\t\treturn $this->getValue(\"first_name\");\r\n\r\n\t\treturn $this->getId();\r\n\t}",
"public abstract function getProjectFieldName();",
"protected function _getReferenceField($name) {\r\n \treturn $this->_referenceMap[$name]['field'];\r\n }",
"function get_cf_field($name)\n\t{\n\t\treturn self::CF_PREFIX.$name;\n\t}",
"public function get_field( string $field ) {\n\t\tif ( array_key_exists( $field, $this->data ) ) {\n\t\t\treturn $this->data[ $field ];\n\t\t}\n\n\t\treturn '';\n\t}",
"function graphql_format_field_name($field_name)\n {\n }",
"public function getField($name) {\n\t\treturn $this->fields[$name];\n\t}",
"function GetDisplayNameField($table = \"\")\n{\n\tglobal $cDisplayNameField;\n\treturn $cDisplayNameField;\n}",
"public function getTitleField() {\n\t\t$this->loadFields();\n\t\tforeach($this->fields as $field) {\n\t\t\tif (get_class($field) == \"ItemFieldString\") return $field;\n\t\t}\n\t}",
"private function getPropertyName($name)\n {\n $customField = $this->getWrapper()->getCustomFieldByApiName($name);\n if (empty($customField)) {\n return $name;\n }\n // CustomField detected\n return $customField->deputyField;\n }"
] | [
"0.91779",
"0.868267",
"0.8209913",
"0.82087165",
"0.8192724",
"0.81904155",
"0.81904155",
"0.81904155",
"0.818789",
"0.81417066",
"0.7969671",
"0.792807",
"0.7921345",
"0.789533",
"0.7858285",
"0.78532594",
"0.78172356",
"0.7812157",
"0.75323755",
"0.7526021",
"0.75194454",
"0.7508627",
"0.75042176",
"0.75030863",
"0.75030863",
"0.7494074",
"0.7445555",
"0.73753244",
"0.7372874",
"0.7367162",
"0.73472637",
"0.73388773",
"0.73388773",
"0.73388773",
"0.73381466",
"0.7330928",
"0.7324051",
"0.7319088",
"0.7275055",
"0.72606254",
"0.7259102",
"0.7249631",
"0.72496295",
"0.7240092",
"0.72151625",
"0.716896",
"0.7167628",
"0.71617955",
"0.7158428",
"0.7158428",
"0.7158428",
"0.7158428",
"0.7136046",
"0.7131901",
"0.71173674",
"0.71158403",
"0.71157855",
"0.70790684",
"0.7077207",
"0.70749956",
"0.70719135",
"0.70520705",
"0.70498246",
"0.70413595",
"0.70353824",
"0.70189047",
"0.7012212",
"0.7004948",
"0.69898605",
"0.6986171",
"0.69854796",
"0.69733113",
"0.6964858",
"0.69631886",
"0.69629055",
"0.6935614",
"0.6928931",
"0.69244325",
"0.6920434",
"0.6914228",
"0.6914228",
"0.69138914",
"0.6904402",
"0.68854254",
"0.68854254",
"0.68854254",
"0.6883842",
"0.6880767",
"0.6863968",
"0.6863968",
"0.6855087",
"0.6843852",
"0.68393546",
"0.6835974",
"0.6823853",
"0.68166894",
"0.6812918",
"0.6806743",
"0.6802349",
"0.6799904",
"0.67855304"
] | 0.0 | -1 |
/ Checkbox image opmaken | function CheckoxImage($value)
{
$ckecked = "checkbox_checked.gif";
$unckeched = "checkbox_unchecked.gif";
if ( $value == 0 )
{
return "<img src=\"images/".$unckeched."\" width=\"16\" height=\"16\" border=\"0\">";
}
else
{
return "<img src=\"images/".$ckecked."\" width=\"16\" height=\"16\" border=\"0\">";
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function surgeon_save_checkbox_image_field($data, $i) {\n $addon_option_image = $_POST['product_addon_option_image'][$i];\n for ( $ii = 0; $ii < sizeof( $data['options'] ); $ii++ ) {\n $image = sanitize_text_field( stripslashes( $addon_option_image[ $ii ] ) );\n $data['options'][$ii]['image'] = $image;\n }\n return $data;\n}",
"function _get_boolean_image($boolean) {\n $imgReturn = '<img style=\"position: relative; top: -2px; margin-left: 5px;\" height=\"10px\" src=\"' . url(path_to_theme() . '/images/cross.png', array('absolute' => true)) . '\"/>';\n if (!empty($boolean) && $boolean == 1) {\n $imgReturn = '<img style=\"position: relative; top: -2px; margin-left: 5px;\" height=\"10px\" src=\"' . url(path_to_theme() . '/images/tick.png', array('absolute' => true)) . '\"/>';\n }\n return $imgReturn;\n}",
"function admin_replaceTrueByChecked( $test, $clickable = true )\n{\n\tif ($clickable)\n\t{\n\t\t$test ? $img = 'checked.png' \t: $img = 'unchecked.png';\n\t} else {\n\t\t$test ? $img = 'status_yes.gif' : $img = 'status_no.gif';\n\t}\n\n\treturn '<img src=\"'.WEBSITE_PATH.'/admin/images/'.$img.'\" alt=\"checked\" border=\"0\" />';\n}",
"function surgeon_add_checkbox_image_field($post, $product_addons, $loop, $option) {\n wp_enqueue_media();\n ob_start();\n ?>\n <td class=\"checkbox_column\">\n <input type=\"hidden\" name=\"product_addon_option_image[<?php echo $loop; ?>][]\" value=\"<?php echo esc_attr( $option['image'] ); ?>\" class=\"image_attachment_id\" />\n <?php if (is_numeric($option['image'])) { \n $image_src = wp_get_attachment_image_src($option['image']);\n ?>\n <img class=\"image-preview\" src=\"<?php echo $image_src[0]; ?>\" width=\"60\" height=\"60\" style=\"max-height: 60px; width: 60px;\">\n <?php } ?>\n <input type=\"button\" class=\"button upload_image_button\" value=\"<?php _e( 'Upload image' ); ?>\" />\n </td>\n <?php\n $output = ob_get_clean();\n echo $output;\n\n}",
"function fillPostIconEnabled(){\n\t\t\t$enabled = (int) get_option( 'post_icon_enabled' );\n\t\t?>\n\t\t\t<input type=\"checkbox\" name='post_icon_enabled' value=\"1\" <?php checked( 1, $enabled, true ); ?> >\n\n\t\t<?php\n\t}",
"public static function renderCheckbox();",
"function sb_slideshow_checkbox( $value, $key, $name, $checked = array() ) {\n\treturn '<input type=\"checkbox\" name=\"sb_' . esc_attr( $name ) . '[]\" id=\"' . esc_attr( $name . '_' . $value ) . '\"\n\t\tvalue=\"' . esc_attr( $value ) . '\"' . (in_array( $value, (array)$checked ) ? 'checked=\"checked\"' : '') . ' />\n\t\t<label for=\"' . esc_attr( $name . '_' . $value ) . '\">' . $key . '</label><br />';\n}",
"function checkbox()\n {\n ?>\n <input type=\"hidden\" <?php $this->name_tag(); ?> value=\"0\" />\n <input type=\"checkbox\" <?php $this->name_tag(); ?> value=\"1\" class=\"inferno-setting\" <?php $this->id_tag('inferno-concrete-setting-'); if($this->setting_value) echo ' checked'; ?> />\n <label <?php $this->for_tag('inferno-concrete-setting-'); ?> data-true=\"<?php _e('On'); ?>\" data-false=\"<?php _e('Off'); ?>\"><?php if($this->setting_value) _e('On'); else _e('Off'); ?></label>\n <?php \n }",
"function checkbox($args) {\r\n\t\t$args = $this->apply_default_args($args) ;\r\n\t\techo \"<input name='$this->options_name[\" . $args['id'] . \"]' type='checkbox' value='1' \";\r\n\t\tchecked('1', $this->options[$args['id']]); \r\n\t\techo \" /> <span class='description'>\" . $args['description'] . \"</span>\" ;\r\n\t\t\r\n\t}",
"abstract public function checkboxOnClick();",
"function surgeon_add_checkbox_heading_fields($post, $addon, $loop) {\n echo '<th class=\"checkbox_column\"><span class=\"column-title\">Image</span></th>';\n}",
"function elm_admin_get_show_image_options() {\n\t$options = array(\n\t\t1 => __('Yes', 'elm'),\n\t\t0 => __('No', 'elm')\n\t);\n\t\n\treturn $options;\n}",
"function construct_single_image(){\n\t\t\t\n\t\t\tvc_add_param( 'vc_single_image', \n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'heading' => __(\"Add Photo Stack Effect\", \"CURLYTHEME\"),\n\t\t\t\t\t'param_name' => 'photo_frame',\n\t\t\t\t\t'weight'\t=> 1\n\t\t\t\t) \n\t\t\t);\n\t\t\t\n\t\t\tvc_add_param( 'vc_single_image', \n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'heading' => __(\"Add Zoomify Effect\", \"CURLYTHEME\"),\n\t\t\t\t\t'param_name' => 'zoomify',\n\t\t\t\t\t'weight'\t=> 2\n\t\t\t\t) \n\t\t\t);\n\t\t\t\n\t\t}",
"function output_checkbox_row( string $label, string $key, bool $checked = false ): void {\n\twp_enqueue_style( 'wpinc-meta-field' );\n\t?>\n\t<div class=\"wpinc-meta-field-single checkbox\">\n\t\t<label>\n\t\t\t<span class=\"checkbox\"><input <?php name_id( $key ); ?> type=\"checkbox\" <?php echo esc_attr( $checked ? 'checked' : '' ); ?>></span>\n\t\t\t<span><?php echo esc_html( $label ); ?></span>\n\t\t</label>\n\t</div>\n\t<?php\n}",
"function image_button ($src, $language, $is_button = false) {\n\t// $is_button=true will cancel the check in function \"image\".\n\t\t\n\t\t$this->is_button = $is_button;\n\t\t// Check only if STS is enabled.\n if (MODULE_STS_DEFAULT_STATUS==\"true\") {\n\t\t $check_file = STS_TEMPLATE_DIR . 'images/'. $language . '/' .$this->buttons_folder . '/' .$src;\n if (file_exists($check_file)) return $check_file;\n }\n\t\treturn '';\n\n\t}",
"public function check_change_image($checked)\n {\n\n if($checked!='on')\n {\n // echo \"-----------\" . $this->input->post('user_file');\n //$this->form_validation->set_rules('user_file', '<strong> Banner image file</strong>', 'required'); \n if($_FILES['userfile']['name']==\"\")\n {\n $this->form_validation->set_message('check_change_image', 'No Image file selected.');\n return false;\n }\n }\n \n\n return true;\n // if ($str == 'test')\n // {\n // $this->form_validation->set_message('username_check', 'The %s field can not be the word \"test\"');\n // return FALSE;\n // }\n // else\n // {\n // return TRUE;\n // }\n }",
"public function render_content() { ?>\n\t\t\t<div class=\"image_checkbox_control\">\n\t\t\t\t<?php if ( ! empty( $this->label ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<?php\t$chkbox_values = explode( ',', esc_attr( $this->value() ) ); ?>\n\t\t\t\t<input type=\"hidden\" id=\"<?php echo esc_attr( $this->id ); ?>\" name=\"<?php echo esc_attr( $this->id ); ?>\" value=\"<?php echo esc_attr( $this->value() ); ?>\" class=\"customize-control-multi-image-checkbox\" <?php $this->link(); ?> />\n\t\t\t\t<?php foreach ( $this->choices as $key => $value ) { ?>\n\t\t\t\t\t<label class=\"checkbox-label\">\n\t\t\t\t\t\t<input type=\"checkbox\" name=\"<?php echo esc_attr( $key ); ?>\" value=\"<?php echo esc_attr( $key ); ?>\" <?php checked( in_array( esc_attr( $key ), $chkbox_values, true ), 1 ); ?> class=\"multi-image-checkbox\"/>\n\t\t\t\t\t\t<img src=\"<?php echo esc_attr( $value['image'] ); ?>\" alt=\"<?php echo esc_attr( $value['name'] ); ?>\" title=\"<?php echo esc_attr( $value['name'] ); ?>\" />\n\t\t\t\t\t</label>\n\t\t\t\t<?php\t} ?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}",
"function acf_checkbox_input($attrs = array())\n{\n}",
"function render_checkbox( $args ) {\n\t\t\t$optionValue = Link_WP_LinkID::get_option_value( $args['key'] );\n\t\t\t$checked = $optionValue === null ? '' : checked( 1, $optionValue, false );\n\n\t\t\t?>\n\t\t\t<input type=\"checkbox\" value=\"1\"\n\t\t\t name=\"<?php echo \"link_linkid_settings[\" . $args['key'] . \"]\" ?>\" <?php echo $checked ?>>\n\t\t\t<p class=\"description\"><?php echo $args[\"description\"] ?></p>\n\t\t\t<?php\n\t\t}",
"function show_metabox_post_slider($post) {\r\n\t\t$slider = (get_post_meta($post->ID, 'slider', true)) ? 'checked' : '';\r\n\t\twp_nonce_field(__FILE__, '_articulo_slider_nonce');\r\n\t\techo \"<input type='checkbox' name='slider' id='slider' value='true' $slider> <label for='slider'>Mostrar las fotos del artículo en fotogalería.</label>\";\r\n\t}",
"function acf_get_checkbox_input($attrs = array())\n{\n}",
"function image_align_input_fields($post, $checked = '')\n {\n }",
"function checkboxes(){\n if($this->ChkReal->Checked){\n $this->avance_real = 'Si';\n }else{\n $this->avance_real = 'No';\n }\n if($this->ChkProg->Checked){\n $this->avance_prog = 'Si';\n }else{\n $this->avance_prog = 'No';\n }\n if($this->ChkComent->Checked){\n $this->comentario = 'Si';\n }else{\n $this->comentario = 'No';\n }\n if($this->ChkPermiso->Checked){\n $this->permiso = 'Si';\n }else{\n $this->permiso = 'No';\n }\n if($this->ChkTipoA->Checked){\n $this->tipo_admon = 'Si';\n }else{\n $this->tipo_admon = 'No';\n }\n }",
"private function display_checkbox_field($name, $value) {\n?>\n<input type=\"checkbox\" name=\"<?php echo htmlspecialchars($this->group); ?>[<?php echo htmlspecialchars($name); ?>]\" id=\"http_authentication_<?php echo htmlspecialchars($name); ?>\"<?php if ($value) echo ' checked=\"checked\"' ?> value=\"1\" /><br />\n<?php\n }",
"function checkbox_icon($var) {\r\n\r\n\tif ($var == 1) {\r\n\t\r\n\t\techo '✓';\r\n\t\t\r\n\t} else {\r\n\t\t\r\n\t\techo 'x';\r\n\t\t\r\n\t}\r\n}",
"function wpzoom_page_options() {\n global $post;\n\n ?>\n <fieldset>\n <p class=\"wpz_border\">\n <?php $isChecked = ( get_post_meta($post->ID, 'wpzoom_is_featured', true) == 1 ? 'checked=\"checked\"' : '' ); // we store checked checkboxes as 1 ?>\n <input type=\"checkbox\" name=\"wpzoom_is_featured\" id=\"wpzoom_is_featured\" value=\"1\" <?php echo esc_attr($isChecked); ?> /> <label for=\"wpzoom_is_featured\"><?php _e('Feature in Homepage Slider', 'wpzoom'); ?></label>\n </p>\n\n </fieldset>\n <?php\n}",
"function theme_checkbox(&$item) {\n\n\t\t$class = array('form-checkbox');\n\t\t_form_set_class($item, $class);\n\n\t\t$checked = \"\";\n\t\tif (!empty($item[\"#value\"])) {\n\t\t\t$checked = \"checked=\\\"checked\\\" \";\n\t\t}\n\n\t\t$retval = '<input '\n\t\t\t. 'type=\"checkbox\" '\n\t\t\t. 'name=\"'. $item['#name'] .'\" '\n\t\t\t. 'id=\"'. $item['#id'].'\" ' \n\t\t\t. 'value=\"'. $item['#return_value'] .'\" '\n\t\t\t. $checked\n\t\t\t. drupal_attributes($item['#attributes']) \n\t\t\t. ' />';\n\n\t\treturn($retval);\n\n\t}",
"function checkbox ($params) {\n\t\tif (!$params['id']) $params['id'] = $params['name'];\n if (!$params['y_value']) $params['y_value'] = 1;\n if (!$params['n_value']) $params['n_value'] = 0;\n?>\n\t\t<input type=\"hidden\" name=\"<?=$params['name']?>\" value=\"<?=$params['n_value']?>\" />\n\t\t<input\n\t\t\ttype=\"checkbox\" \n\t\t\tname=\"<?=$params['name']?>\" \n\t\t\tvalue=\"<?=$params['y_value']?>\"\n\t\t\tid=\"<?=$params['id']?>\" \n\t\t\tonclick=\"<?=$params['onclick']?>\"\n\t\t\t<? if ($params['checked']) echo 'checked=\"checked\"'; ?> \n\t\t\t<? if ($params['disabled']) echo 'disabled=\"disabled\"'; ?> \n\t\t\tstyle=\"display:inline;\"\n\t\t/>\n\t\t<label for=\"<?=$params['id']?>\" class=\"checkbox-label\"><?=$params['label']?></label>\n\t\t\n<?\n\t}",
"function checkbox($args = '', $checked = false) {\r\n $defaults = array('name' => '', 'id' => false, 'class' => false, 'group' => '', 'special' => '', 'value' => '', 'label' => false, 'maxlength' => false);\r\n extract(wp_parse_args($args, $defaults), EXTR_SKIP);\r\n\r\n $return = '';\r\n // Get rid of all brackets\r\n if (strpos(\"$name\", '[') || strpos(\"$name\", ']')) {\r\n $replace_variables = array('][', ']', '[');\r\n $class_from_name = $name;\r\n $class_from_name = \"wpi_\" . str_replace($replace_variables, '_', $class_from_name);\r\n } else {\r\n $class_from_name = \"wpi_\" . $name;\r\n }\r\n // Setup Group\r\n $group_string = '';\r\n if ($group) {\r\n if (strpos($group, '|')) {\r\n $group_array = explode(\"|\", $group);\r\n $count = 0;\r\n foreach ($group_array as $group_member) {\r\n $count++;\r\n if ($count == 1) {\r\n $group_string .= \"$group_member\";\r\n } else {\r\n $group_string .= \"[$group_member]\";\r\n }\r\n }\r\n } else {\r\n $group_string = \"$group\";\r\n }\r\n }\r\n // Use $checked to determine if we should check the box\r\n $checked = strtolower($checked);\r\n if ($checked == 'yes' ||\r\n $checked == 'on' ||\r\n $checked == 'true' ||\r\n ($checked == true && $checked != 'false' && $checked != '0')) {\r\n $checked = true;\r\n } else {\r\n $checked = false;\r\n }\r\n $id = ($id ? $id : $class_from_name);\r\n $insert_id = ($id ? \" id='$id' \" : \" id='$class_from_name' \");\r\n $insert_name = ($group_string ? \" name='\" . $group_string . \"[$name]' \" : \" name='$name' \");\r\n $insert_checked = ($checked ? \" checked='checked' \" : \" \");\r\n $insert_value = \" value=\\\"$value\\\" \";\r\n $insert_class = \" class='$class_from_name $class wpi_checkbox' \";\r\n $insert_maxlength = ($maxlength ? \" maxlength='$maxlength' \" : \" \");\r\n // Determine oppositve value\r\n switch ($value) {\r\n case 'yes':\r\n $opposite_value = 'no';\r\n break;\r\n case 'true':\r\n $opposite_value = 'false';\r\n break;\r\n }\r\n // Print label if one is set\r\n if ($label)\r\n $return .= \"<label for='$id'>\";\r\n // Print hidden checkbox\r\n $return .= \"<input type='hidden' value='$opposite_value' $insert_name />\";\r\n // Print checkbox\r\n $return .= \"<input type='checkbox' $insert_name $insert_id $insert_class $insert_checked $insert_maxlength $insert_value $special />\";\r\n if ($label)\r\n $return .= \" $label</label>\";\r\n return $return;\r\n }",
"public function form_field_images ( $args ) {\n\t\t$options = $this->get_settings();\n\t\t\n\t\tif ( isset( $args['data']['options'] ) && ( count( (array)$args['data']['options'] ) > 0 ) ) {\n\t\t\t$html = '';\n\t\t\tforeach ( $args['data']['options'] as $k => $v ) {\n\t\t\t\t$html .= '<input type=\"radio\" name=\"' . esc_attr( $this->token ) . '[' . esc_attr( $args['key'] ) . ']\" value=\"' . esc_attr( $k ) . '\"' . checked( esc_attr( $options[$args['key']] ), $k, false ) . ' /> ' . $v . '<br />' . \"\\n\";\n\t\t\t}\n\t\t\techo $html;\n\t\t\t\n\t\t\tif ( isset( $args['data']['description'] ) ) {\n\t\t\t\techo '<span class=\"description\">' . $args['data']['description'] . '</span>' . \"\\n\";\n\t\t\t}\n\t\t}\n\t}",
"function micheckbox($name, $form = array()) {\n\tif (isset($form[$name]) && $form[$name]) {\n\t\t$checked = \"checked=\\\"checked\\\" \";\n\t} else {\n\t\t$checked = \"\";\n\t}\n\treturn \"<input type=\\\"checkbox\\\" name=\\\"$name\\\" $checked />\";\n}",
"function productMark($post)\r\n{\r\n ?>\r\n <p>\r\n <span>Признак(новинка): </span>\r\n\r\n <input type=\"checkbox\" <?php if(get_post_meta($post->ID, \"mark\", 1)){\r\n echo \"checked\";\r\n } ?> name='extra[mark]' value=\"1\">\r\n </p>\r\n <?php\r\n}",
"public function getControlHtml()\n {\n if ( isset( $this->_arrProperties['value'] ) \n && $this->_arrProperties['value'] == 1 ) {\n $this->arrAttributes['checked'] = 'checked';\n }\n \n $this->arrAttributes['type'] = 'checkbox';\n \n return parent::getControlHtml();\n }",
"public static function edit_image()\n{\n\n\n\t/*\n\t* Change Background\n\t*/\n\n\t/*\n\t* Change other setting\n\t*/\n}",
"function idem_pop_up_inner_meta_box_cb( $post )\n{ \n $checked = ($post->ID == getDefault() ) ? \"checked\" : \"\";\n $check = \"<label>Par default</label><input type='checkbox' \" . $checked . \" name='idem_pop_up_default' value='1' >\";\n echo $check;\n}",
"function AttribCheckbox( $id, $value, $name )\n\t{\n\t\t$checkbox = \"\";\n\t\t$checked = \"\";\n if ($value == 'on')\n {\n \t$checked = \"checked='checked'\";\n }\n $checkbox .= \"<input type='checkbox' name='\".$name.\"' \" . $checked . \" />\";\n\t\treturn $checkbox;\n\t}",
"public function form_field_checkbox ( $args ) {\n\t\t$options = $this->get_settings();\n\n\t\t$has_description = false;\n\t\tif ( isset( $args['data']['description'] ) ) {\n\t\t\t$has_description = true;\n\t\t\techo '<label for=\"' . $this->token . '[' . esc_attr( $args['key'] ) . ']\">' . \"\\n\";\n\t\t}\n\t\techo '<input id=\"' . $args['key'] . '\" name=\"' . $this->token . '[' . esc_attr( $args['key'] ) . ']\" type=\"checkbox\" value=\"1\"' . checked( esc_attr( $options[$args['key']] ), '1', false ) . ' />' . \"\\n\";\n\t\tif ( $has_description ) {\n\t\t\techo $args['data']['description'] . '</label>' . \"\\n\";\n\t\t}\n\t}",
"function callback_checkbox(array $args)\n {\n }",
"public function show_checkbox( $name = \"ids[]\" ) {\n\t\t?>\n\t\t<input type=\"checkbox\" name=\"<?php echo $name; ?>\" value=\"<?php echo $this->get_ID(); ?>\"/>\n\t\t<?php\n\t}",
"function option_checkbox($label, $name, $value='', $comment='') {\r\n\t\tif ($value)\r\n\t\t\t$checked = \"checked='checked'\";\r\n\t\telse\r\n\t\t\t$checked = \"\";\r\n\t\techo \"<tr valign='top'><th scope='row'>\" . $label . \"</th>\";\r\n\t\techo \"<td><input type='hidden' id='$name' name='$name' value='0' /><input type='checkbox' name='$name' value='1' $checked />\";\r\n\t\techo \" $comment</td></tr>\";\r\n\t}",
"function checkbox_init(){\n add_meta_box(\"closing\", \"Closed ?\", \"closing\", \"closings\", \"normal\", \"high\");\n add_meta_box(\"delayed\", \"Delayed / Message ?\", \"delayed\", \"closings\", \"normal\", \"high\");\n add_meta_box(\"message_delayed\", \"Message:\", \"message_delayed\", \"closings\", \"normal\", \"high\");\n}",
"function pt_checkbox_autoplay_render()\n\t\t{ \n\t\t\t$options = get_option( 'pt_settings' );\n\t\t\t?>\n\t\t\t<input type='checkbox' name='pt_settings[pt_checkbox_field_autoplay]' value=\"1\" <?php checked( @$options['pt_checkbox_field_autoplay'], 1 ); ?>>\n\t\t\t<?php\n\t\t}",
"function _wp_image_editor_choose($args = array())\n {\n }",
"private function option_checkbox($name, $on, $label) {\n if ($on) {\n $checked = ' checked=\"checked\"';\n } else {\n $checked = '';\n }\n $name = 'userselector_' . $name;\n $output = '<p><input type=\"hidden\" name=\"' . $name . '\" value=\"0\" />' .\n // For the benefit of brain-dead IE, the id must be different from the name of the hidden form field above.\n // It seems that document.getElementById('frog') in IE will return and element with name=\"frog\".\n '<input type=\"checkbox\" id=\"' . $name . 'id\" name=\"' . $name . '\" value=\"1\"' . $checked . ' /> ' .\n '<label for=\"' . $name . 'id\">' . $label . \"</label></p>\\n\";\n user_preference_allow_ajax_update($name, PARAM_BOOL);\n return $output;\n }",
"public function myImage($id = NULL) {\n // formatted data:\n $ruta = $this->webroot . 'img/';\n switch ($id) {\n \tcase 1:\n \t\t$img = '<img src=\"'.$ruta.'checked.jpg\" alt=\"usuario\" style=\"width=\"32px\" height=\"32px\" !important\">';\n \t\tbreak;\n \t\n \tdefault:\n \t\t$img = '<img src=\"'.$ruta.'unchecked.jpg\" alt=\"usuario\" style=\"width=\"32px\" height=\"32px\" !important\">';\n \t\tbreak;\n }\n \t \n return $img;\n }",
"function _mai_cmb_hide_featured_image_show_on_cb() {\n\tif ( ! post_type_supports( get_post_type(), 'thumbnail' ) ) {\n\t\treturn false;\n\t}\n\tglobal $typenow;\n\t// Check if auto-displaying the featured image.\n\t$key = sprintf( 'singular_image_%s', $typenow );\n\t$display = genesis_get_option( $key );\n\t// Bail if not displaying.\n\tif ( ! $display ) {\n\t\treturn false;\n\t}\n\t// Bail if editing the WooCommerce Shop page.\n\tif ( class_exists( 'WooCommerce' ) && get_the_ID() === (int) get_option( 'woocommerce_shop_page_id' ) ) {\n\t\treturn false;\n\t}\n\treturn true;\n}",
"function zen_draw_checkbox_field($name, $value = '', $checked = false, $parameters = '') {\n return zen_draw_selection_field($name, 'checkbox', $value, $checked, $parameters);\n }",
"function store_sanitize_checkbox( $input ) {\n\t if ( $input == 1 ) {\n\t return 1;\n\t } else {\n\t return '';\n\t }\n\t}",
"public function setImg($name){\n if(is_null($this->getId())){\n return false;\n }\n\n $file = file_get_contents($name);\n\n if ( $file !== false ) {\n $name = 'cat-'.$this->getId().'-'.time().'.jpg';\n $this->getStorage()->store($name, $file);\n \n // update pictures for associated meal categories\n $this->updateAssociatedCategories();\n \n return true;\n }\n return false;\n }",
"public function AddCheckboxToComment()\n\t{\n\t\t$checked = get_option($this->GrOptionDbPrefix . 'comment_checked');\n\t\t?>\n\t\t<p>\n\t\t\t<input class=\"GR_checkbox\" value=\"1\" id=\"gr_comment_checkbox\" type=\"checkbox\" name=\"gr_comment_checkbox\"\n\t\t\t\t <?php if ($checked)\n\t\t\t\t { ?>checked=\"checked\"<?php } ?>/>\n\t\t\t<?php echo get_option($this->GrOptionDbPrefix . 'comment_label'); ?>\n\t\t</p><br/>\n\t\t<?php\n\t}",
"function print_checkbox($value){\n\t\techo $this->before_option_title.$value['name'].$this->after_option_title;\n\t\t$input_value = $this->get_field_value($value['id']);\n\t\techo '<div class=\"on-off\"><span></span></div>';\n\t\tif($input_value=='true'){\n\t\t\t$input_value='on';\n\t\t}\n\t\tif($input_value=='false'){\n\t\t\t$input_value='off';\n\t\t}\n\t\techo '<input name=\"'.$value['id'].'\" id=\"'.$value['id'].'\" type=\"hidden\" value=\"'.$input_value.'\" />';\n\t\t$this->close_option($value);\n\t}",
"private function option_checkbox($name, $on, $label) {\n if ($on) {\n $checked = ' checked=\"checked\"';\n } else {\n $checked = '';\n }\n $name = 'userselector_' . $name;\n // For the benefit of brain-dead IE, the id must be different from the name of the hidden form field above.\n // It seems that document.getElementById('frog') in IE will return and element with name=\"frog\".\n $output = '<div class=\"form-check\"><input type=\"hidden\" name=\"' . $name . '\" value=\"0\" />' .\n '<label class=\"form-check-label\" for=\"' . $name . 'id\">' .\n '<input class=\"form-check-input\" type=\"checkbox\" id=\"' . $name . 'id\" name=\"' . $name .\n '\" value=\"1\"' . $checked . ' /> ' . $label .\n \"</label>\n </div>\\n\";\n user_preference_allow_ajax_update($name, PARAM_BOOL);\n return $output;\n }",
"function render_field_checkbox($field)\n {\n }",
"function question_category_form_checkbox($name, $checked) {\n echo '<div><input type=\"hidden\" id=\"' . $name . '_off\" name=\"' . $name . '\" value=\"0\" />';\n echo '<input type=\"checkbox\" id=\"' . $name . '_on\" name=\"' . $name . '\" value=\"1\"';\n if ($checked) {\n echo ' checked=\"checked\"';\n }\n echo ' onchange=\"getElementById(\\'displayoptions\\').submit(); return true;\" />';\n echo '<label for=\"' . $name . '_on\">';\n print_string($name, 'quiz');\n echo \"</label></div>\\n\";\n}",
"function type_url_form_image()\n {\n }",
"public function AddCheckboxToCheckoutPage()\n\t{\n\t\t$checked = get_option($this->GrOptionDbPrefix . 'checkout_checked');\n\t\t?>\n\t\t<p class=\"form-row form-row-wide\">\n\t\t\t<input class=\"input-checkbox GR_checkoutbox\" value=\"1\" id=\"gr_checkout_checkbox\" type=\"checkbox\"\n\t\t\t name=\"gr_checkout_checkbox\" <?php if ($checked)\n\t\t\t { ?>checked=\"checked\"<?php } ?> />\n\t\t\t<label for=\"gr_checkout_checkbox\" class=\"checkbox\">\n\t\t\t\t<?php echo get_option($this->GrOptionDbPrefix . 'checkout_label'); ?>\n\t\t\t</label>\n\t\t</p>\n\t\t<?php\n\t}",
"function setTypeAsCheckbox($labeltext = false)\n\t{\n\t\t$this->type = \"checkbox\";\n\t\t$this->checkbox_label = $labeltext;\n\t\t\n\t\t// Formfield doesn't work if a checkbox\n\t\t$this->isformfield = false;\n\t}",
"function snoc_marquee_meta_box_option() {\r\n global $post;\r\n wp_nonce_field( basename( __FILE__ ), 'wpse_our_nonce' );\r\n $checkbox_value = get_post_meta($post->ID, '_marquee_latest_news', true);\r\n ?>\r\n <p>Please select option for text rotation on black bar.</p>\r\n <label><input name=\"marquee_news_check\" type=\"radio\" value=\"Yes\" <?php if($checkbox_value == \"Yes\"){ echo 'checked'; }?>>Yes </label>\r\n <label><input name=\"marquee_news_check\" type=\"radio\" value=\"No\" <?php if($checkbox_value != \"Yes\"){ echo 'checked'; }?>>No</label>\r\n <?php \r\n}",
"static function renderBooleanField($name, $value = false, $label = null, $attributes = null)\n {\n echo '<li>';\n self::renderHiddenField($name, ($value) ? '1' : '0', array('id' => $name));\n if ($label) echo '<label for=\"_wcmBox' . $name . '\">'.textH8($label).'</label>';\n echo '<input type=\"checkbox\"';\n if ($value) echo ' checked=\"checked\"';\n echo ' onclick=\"$(\\''.$name.'\\').value=(this.checked)?\\'1\\':\\'0\\';\"';\n echo 'name=\"_wcmBox' . $name . '\" id=\"_wcmBox' . $name . '\"';\n self::renderAttributes($attributes);\n echo '/>';\n echo '</li>';\n }",
"public function convertirCheckBox($param='') {\n if($param == \"on\" || $param == 1) {\n $param = \"S\";\n } else {\n $param = \"N\";\n }\n return $param;\n }",
"function fastshop_sanitize_checkbox( $checked ) {\n return (bool) $checked;\n}",
"private function selectedCheckbox($parametro)\n {\n if($parametro==1)\n {\n return 'checked';\n }\n else\n {\n return '';\n }\n }",
"public static function getType() {\n\t\treturn \"Checkbox\";\n\t}",
"function checkbox( $element )\n\t\t{\t\n\t\t\t$checked = \"\";\n\t\t\tif( $element['std'] != \"\" ) { $checked = 'checked = \"checked\"'; }\n\t\t\t\t\n\t\t\t$output = '<input '.$checked.' type=\"checkbox\" class=\"'.$element['class'].'\" ';\n\t\t\t$output .= 'value=\"'.$element['id'].'\" id=\"'.$element['id'].'\" name=\"'.$element['id'].'\"/>';\n\t\t\t\n\t\t\treturn $output;\n\t\t}",
"function ffw_port_checkbox_callback( $args ) {\n global $ffw_port_settings;\n\n $checked = isset($ffw_port_settings[$args['id']]) ? checked(1, $ffw_port_settings[$args['id']], false) : '';\n $html = '<input type=\"checkbox\" id=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\" name=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\" value=\"1\" ' . $checked . '/>';\n $html .= '<label for=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\"> ' . $args['desc'] . '</label>';\n\n echo $html;\n}",
"function dblions_desc_img() {\n\t$img = esc_attr( get_option( 'desc_img' ) );\n\tcreate_input_field( array(\n\t\t\t'upload-btn', '', 'button', 'Upload Picture', \n\t\t\t'', 'button button-secondary'\n\t\t) );\n\tcreate_input_field( array(\n\t\t\t'desc-img', 'desc_img', \n\t\t\t'hidden', $img, '', ''\n\t\t) );\n}",
"function checkBoxChecked($chkName, $optional){\n\t\t$checkBoxString = '';\n\t\t$chkText = '';\n\t\t\tif ( $_GET[$chkName->value]== 'on'){\n\t\t\t\t$chkText = 'checked';\n\t\t\t}\n\t\t\t $checkBoxString = $checkBoxString . '<input ' .$chkText. ' type=\"checkbox\" id=\"' .$chkName->value. '\" name=\"' .$chkName->value. '\" class=\"' .$chkName->class. '\" ' . $optional . '>' .$chkName->label. ' ';\n\t\t\n\t\treturn $checkBoxString;\n\t}",
"function make_a_switch($name,$value,$label_text,$label_width,$on_text,$off_text,$on_color,$off_color,$switch_checked = NULL){\r\n echo '<input type=\"checkbox\" \r\n name=\"'.$name.'\" \r\n value=\"'.$value.'\" \r\n\r\n data-label-text=\"'.$label_text.'\" \r\n data-label-width=\"'.$label_width.'\"\r\n\r\n data-on-text=\"'.$on_text.'\" \r\n data-off-text=\"'.$off_text.'\" \r\n\r\n data-on-color=\"'.$on_color.'\" \r\n data-off-color=\"'.$off_color.'\" \r\n \r\n data-size=\"mini\" ';\r\n \r\n if($switch_checked == '1'){\r\n \techo 'checked ';\r\n }elseif ($switch_checked == '0') {\r\n \techo '';\r\n }else{\r\n \techo 'checked ';\r\n }\r\n\r\n echo '>';\r\n\r\n}",
"function createCheckboxGroup($data) {\n foreach($data as $key => $value) {\n echo '<div class=\"form-check mb-2\">';\n echo \"<label class=\\\"form-check-label font-weight-bold\\\">\";\n echo \"<input type=\\\"checkbox\\\" class=\\\"form-check-input\\\" name=\\\"$value\\\" value=\\\"$value\\\"\";\n if(isset($_POST[$value]) && $_POST[$value]){\n echo \" checked=\\\"checked\\\"\";\n }\n echo \"> $key</label></div>\";\n }\n }",
"function themeslug_sanitize_checkbox( $checked ) {\r\n // Boolean check.\r\n return ( ( isset( $checked ) && true == $checked ) ? true : false );\r\n}",
"function render_flags_meta() {\n\t\tglobal $post;\n\t\t$flag = get_post_meta( $post->ID, 'country_code', true );\n\t\t$filepath = 'flags/' . strtolower( $flag ) . '.gif';\n\t\tif ( is_file( plugin_dir_path( __FILE__ ) . $filepath ) ) {\n\t\t\t?>\n\t\t\t<img name=\"flags\" src=\"<?php echo plugins_url( $filepath, __FILE__ ); ?>\" />\n\t\t\t<?php\n\t\t} else {\n\t\t\techo '<p>' . __( 'Flag image not available.' ) . '</p>';\n\t\t}\n\t}",
"public function AddCheckboxToBpRegistrationPage()\n\t{\n\t\t$bp_checked = get_option($this->GrOptionDbPrefix . 'bp_registration_checked');\n\t\t?>\n\t\t<div class=\"gr_bp_register_checkbox\">\n\t\t\t<label>\n\t\t\t\t<input class=\"input-checkbox GR_bpbox\" value=\"1\" id=\"gr_bp_checkbox\" type=\"checkbox\"\n\t\t\t\t name=\"gr_bp_checkbox\" <?php if ($bp_checked)\n\t\t\t\t{ ?> checked=\"checked\"<?php } ?> />\n\t\t\t\t<span\n\t\t\t\t\tclass=\"gr_bp_register_label\"><?php echo get_option($this->GrOptionDbPrefix . 'bp_registration_label'); ?></span>\n\t\t\t</label>\n\t\t</div>\n\t\t<?php\n\t}",
"function format_checkbox($p_id, $p_name, $p_checked = false, $p_class = 'input-xs', $p_style = '', $p_prop = ''){\n\treturn \t'<input type=\"checkbox\" id=\"' . $p_id . '\" name=\"' . $p_name . '\" class=\"ace ' . $p_class . '\" style=\"' . $p_style . '\" ' . $p_prop . ' ' . ($p_checked ? ' checked' : '') . '/>';\n}",
"public function form_field_multicheck ( $args ) {\n\t\t$options = $this->get_settings();\n\t\t\n\t\tif ( isset( $args['data']['options'] ) && ( count( (array)$args['data']['options'] ) > 0 ) ) {\n\t\t\t$html = '<div class=\"multicheck-container\">' . \"\\n\";\n\t\t\tforeach ( $args['data']['options'] as $k => $v ) {\n\t\t\t\t$checked = '';\n\n\t\t\t\tif ( in_array( $k, (array)$options[$args['key']] ) ) { $checked = ' checked=\"checked\"'; }\n\t\t\t\t$html .= '<input type=\"checkbox\" name=\"' . esc_attr( $this->token ) . '[' . esc_attr( $args['key'] ) . '][]\" class=\"multicheck multicheck-' . esc_attr( $args['key'] ) . '\" value=\"' . esc_attr( $k ) . '\"' . $checked . ' /> ' . $v . '<br />' . \"\\n\";\n\t\t\t}\n\t\t\t$html .= '</div>' . \"\\n\";\n\t\t\techo $html;\n\t\t\t\n\t\t\tif ( isset( $args['data']['description'] ) ) {\n\t\t\t\techo '<span class=\"description\">' . $args['data']['description'] . '</span>' . \"\\n\";\n\t\t\t}\n\t\t}\n\t}",
"function clix_uppe_meta_box(){\r\n\tglobal $post;\r\n\t// Use nonce for verification\r\n\techo '<input type=\"hidden\" name=\"clix_uppe_nonce\" id=\"clix_uppe_nonce\" value=\"' .\r\n\twp_create_nonce( plugin_basename(__FILE__) ) . '\" />';\r\n\t// Output checkboxes\r\n\t$options = array(\r\n\t\t'disable_home' \t\t\t=> 'Disable Listing on Home Page',\r\n\t\t'disable_tag' \t\t\t=> 'Disable on Tag Listings',\r\n\t\t'disable_archive' \t\t=> 'Disable Listing in Archives',\r\n\t\t'disable_search' \t\t=> 'Disable Listing in Search',\r\n\t\t'disable_unlesslogin' \t=> 'Disable Listing for Users Not Logged In',\r\n\t\t'disable_unlessshow'\t=> 'Disable but show available if Logged In'\r\n\t\t);\r\n\tforeach( $options as $option=>$legend ){\r\n?>\r\n<label for=\"clix_uppe_<?php echo $option; ?>\">\r\n\t<input type=\"checkbox\" name=\"_clix_uppe_<?php echo $option; ?>\" id=\"clix_uppe_<?php echo $option; ?>\" <?php\r\n\t\tif ( get_post_meta( $post->ID, \"_clix_uppe_$option\", true ) == '1' )\r\n\t\t\techo ' checked=\"checked\"';\r\n\t?>/>\r\n\t<?php echo $legend; ?>\r\n</label>\r\n<br /><?php\r\n\t}\r\n}",
"function get_checked($value)\n{\n\treturn ($value == TRUE) ? 'checked': ''; \n}",
"function setCheckboxParameter($value)\r\n {\r\n if (isset($_POST[$value]))\r\n return 1;\r\n else\r\n return 0;\r\n }",
"public function callback_checkbox( $args ) {\n\n $name_id = $args['name_id'];\n if ($args['parent']) {\n $value = $this->get_option( $args['parent']['id'], $args['section'], $args['std'], $args['global'] );\n $value = isset($value[$args['id']]) ? $value[$args['id']] : $args['std'];\n $args['disable'] = (isset( $args['parent']['disable'])) ? $args['parent']['disable'] : false;\n }else {\n $value = $this->get_option( $args['id'], $args['section'], $args['std'], $args['global'] );\n }\n\n $disable = (isset( $args['disable'] ) && $args['disable'] === true) ? 'disabled' : '';\n\n $html_condtions = '';\n\n if ( isset($args['conditions']) && $args['conditions'] === true ) {\n $name_id .= '[value]';\n $value = isset($value['value']) ? $value['value'] : 'off';\n $args['name_id'] .= '[options]';\n $html_condtions = $this->get_field_conditions_modal( $args );\n }\n\n $html = '<fieldset>';\n $html .= sprintf( '<label for=\"wpuf-%1$s\">', $name_id );\n $html .= sprintf( '<input type=\"hidden\" name=\"%1$s\" value=\"off\" />', $name_id );\n $html .= sprintf( '<input type=\"checkbox\" class=\"checkbox\" id=\"wpuf-%1$s\" name=\"%1$s\" value=\"on\" %2$s %3$s/>', $name_id, checked( $value, 'on', false ), $disable );\n $html .= sprintf( '%1$s</label>', $args['desc'] );\n $html .= $html_condtions;\n $html .= '</fieldset>';\n\n echo $html;\n }",
"function output_checkbox_row( string $label, string $key, bool $checked = false ): void {\n\t\t\\wpinc\\meta\\output_checkbox_row( $label, $key, $checked );\n\t}",
"function ed_setting_show_media_buttons_callback(){\n\techo '<input\n\tname=\"ed_setting_show_media_buttons\"\n\tid=\"ed_setting_show_media_buttons\"\n\ttype=\"checkbox\"\n\tvalue=\"1\"\n\tclass=\"code\"\n\t' . checked(1, get_option('ed_setting_show_media_buttons'), false).' />\n\tChoose if media buttons should be enabled';\n}",
"function exif_admin_settings_form() {\n $forms = array();\n /*$forms['exif_granularity'] = array(\n '#type'\t=>\t'select',\n '#title'=>\tt('Granularity'),\n '#options'=> array(0=>t('Default'),1=>('Day')),\n '#default_value'=>variable_get('exif_granularity',0),\n '#description'=>t('If a timestamp is select (for example the date the picture was taken), you can specify here how granular the timestamp should be. If you select default it will just take whatever is available in the picture. If you select Day, the Date saved will look something like 13-12-2008. This can be useful if you want to use some kind of grouping on the data.'),\n );*/\n\n $all_nodetypes = node_type_get_types();\n $all_nt = array();\n foreach ($all_nodetypes as $item) {\n $all_nt[$item->type] = $item->name;\n }\n $forms['exif_nodetypes'] = array(\n '#type' => 'checkboxes',\n '#title' => t('Nodetypes'),\n '#options' => $all_nt,\n '#default_value' => variable_get('exif_nodetypes', array()),\n '#description' => t('Select nodetypes which should be checked for itpc & exif data. In case the nodetypes contains more than one image field, the module will use the first one.'),\n );\n\n if (module_exists(\"media\")) {\n $all_mt = array();\n // Setup media types\n $types = media_type_get_types();\n foreach ($types as $key) {\n $all_mt[$key->name] = $key->name;\n }\n $forms['exif_mediatypes'] = array(\n '#type' => 'checkboxes',\n '#title' => t('Mediatypes'),\n '#options' => $all_mt,\n '#default_value' => variable_get('exif_mediatypes', array()),\n '#description' => t('Select mediatypes which should be checked for itpc & exif data.'),\n );\n }\n\n\n $forms['exif_update'] = array(\n '#type' => 'checkbox',\n '#title' => t('Refresh on node update'),\n '#default_value' => variable_get('exif_update', TRUE),\n '#description' => t('If you enable this option, Exif data is being updated when the node is being updated.'),\n );\n\n $forms['exif_empty_values'] = array(\n '#type' => 'checkbox',\n '#title' => t('Write empty image data?'),\n '#default_value' => variable_get('exif_empty_values', TRUE),\n '#description' => t(\"If checked all values will be written. So for example if you want to read the creation date from EXIF, but it's not available, it will just write an empty string. If unchecked, empty strings will not be written. This might be the desired behavior, if you have a default value for the CCK field.\"),\n );\n\n $all_vocabularies = taxonomy_get_vocabularies();\n $all_vocs = array();\n $all_vocs[0] = 'None';\n foreach($all_vocabularies as $item){\n $all_vocs[$item->vid] = $item->name;\n }\n $forms['exif_vocabulary'] = array(\n\t\t'#type'\t=>\t'select',\n\t\t'#title'=>\tt('Vocabulary'),\n\t\t'#options'=> $all_vocs,\n\t\t'#default_value'=>variable_get('exif_vocabulary',array()),\n\t\t'#description'=> t('Select vocabulary which should be used for itpc & exif data.'),\n );\n //TODO: add a button to create a vocabulary \"images'metadata\" (exif,iptc and xmp data contains in jpef file)\n //TODO : add a button to create an Photo node with default exif field (title,model,keywords) and default behavior but 'promoted to front'\n //TODO : Check if the media module is install to add automatically the image type active and add active default exif field (title,model,keywords).\n return system_settings_form($forms);\n}",
"function drawOptionLeftWork() {\r\n global $saveShowWork;?>\r\n <table width=\"100%\">\r\n <tr class=\"checkboxLabel\">\r\n <td >\r\n <?php echo ucfirst(i18n(\"labelShowLeftWork\".((isNewGui()?'':'Short'))));?>\r\n </td>\r\n <td style=\"width:36px\">\r\n <div title=\"<?php echo i18n('showLeftWork')?>\" dojoType=\"dijit.form.CheckBox\" \r\n type=\"checkbox\" id=\"listShowLeftWork\" name=\"listShowLeftWork\" class=\"whiteCheck\"\r\n <?php if ($saveShowWork=='1') { echo ' checked=\"checked\" '; }?> >\r\n <script type=\"dojo/method\" event=\"onChange\" >\r\n saveUserParameter('planningShowWork',((this.checked)?'1':'0'));\r\n refreshJsonPlanning();\r\n </script>\r\n </div> \r\n </td>\r\n </tr>\r\n </table>\r\n<?php \r\n}",
"function testGuessCheckbox() {\n\t\t$result = $this->helper->__guessInputType('Test.is_foo');\n\t\t$this->assertEqual($result, 'checkbox');\n\t}",
"function change_entry()\n\t{\n\t\t//Sprachen raussuchen\n\t\t$this->make_lang();\n\n\t\t//Es soll eingetragen werden\n\t\tif ( $this->checked->submitentry ) {\n\t\t\t//Bilddaten hochladen\n\t\t\tif ( !empty($_FILES['strFile']) ) {\n\t\t\t\t$this->intern_image->upload_picture();\n\t\t\t\t$this->checked->image_name = $this->content->template['image_name'];\n\t\t\t\t$this->checked->image_breite = $this->content->template['image_breite'];\n\t\t\t\t$this->checked->image_hoehe = $this->content->template['image_hoehe'];\n\t\t\t\t$this->checked->gruppe = $this->content->template['image_gruppe'];\n\t\t\t\t$this->checked->texte[1]['lang_id'] = 1;\n\t\t\t\t$this->checked->texte[1]['alt'] = $this->checked->messe_name;\n\t\t\t\t$this->checked->texte[1]['title'] = '';\n\t\t\t\t$this->checked->texte[1]['long_desc'] = '';\n\n\t\t\t\tif ( !empty($this->checked->image_name) ) {\n\t\t\t\t\t$this->intern_image->upload_save( 'no' );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( empty($this->checked->image_name) ) {\n\t\t\t\t$sql = sprintf( \"SELECT messe_logo FROM %s WHERE messe_id='%s'\", $this->cms->\n\t\t\t\ttbname['papoo_messe_daten'], $this->db->escape($this->checked->messe_id) );\n\t\t\t\t$this->checked->image_name = $this->db->get_var( $sql );\n\t\t\t}\n\t\t\tif ( !empty($this->checked->messe_id) ) {\n\t\t\t\t$von_ar = explode( \".\", $this->checked->messe_von );\n\t\t\t\t$bis_ar = explode( \".\", $this->checked->messe_bis );\n\t\t\t\tif ( is_numeric($von_ar[0]) && is_numeric($von_ar[1]) && is_numeric($von_ar[2]) ) {\n\t\t\t\t\t$von = mktime( 0, 0, 0, $von_ar[1], $von_ar[0], $von_ar[2] );\n\t\t\t\t\t$bis = mktime( 0, 0, 0, $bis_ar[1], $bis_ar[0], $bis_ar[2] );\n\t\t\t\t}\n\t\t\t\t$sql = sprintf( \"\tUPDATE %s SET \n\t\t\t\t\t\t\t\t\tmesse_von='%s', \n\t\t\t\t\t\t\t\t\tmesse_bis='%s', \n\t\t\t\t\t\t\t\t\tmesse_logo='%s', \n\t\t\t\t\t\t\t\t\tmesse_name='%s' \n\t\t\t\t\t\t\t\t\tWHERE messe_id='%s'\",\n\t\t\t\t\t$this->cms->tbname['papoo_messe_daten'],\n\t\t\t\t\t$this->db->escape($von),\n\t\t\t\t\t$this->db->escape($bis),\n\t\t\t\t\t$this->db->escape($this->checked->image_name),\n\t\t\t\t\t$this->db->escape($this->checked->messe_name),\n\t\t\t\t\t$this->db->escape($this->checked->messe_id)\n\t\t\t\t);\n\t\t\t\t$this->db->query( $sql );\n\t\t\t\t$insertid = $this->db->escape( $this->checked->messe_id );\n\t\t\t\t//Alle Sprachen linkliste_descrip\n\t\t\t\t$sql = sprintf( \"DELETE FROM %s WHERE messe_id_id='%s'\", $this->cms->tbname['papoo_messe_daten_lang'],\n\t\t\t\t\t$insertid );\n\t\t\t\t$this->db->query( $sql );\n\n\t\t\t\t//Alle Sprachen\n\t\t\t\tforeach ( $this->checked->messe_descrip as $key => $value ) {\n\t\t\t\t\t$sql = sprintf( \"\tINSERT INTO %s SET \n\t\t\t\t\t\t\t\t\t\tmesse_id_id='%s', \n\t\t\t\t\t\t\t\t\t\tmesse_lang_id='%s', \n\t\t\t\t\t\t\t\t\t\tmesse_descrip='%s'\",\n\t\t\t\t\t\t$this->cms->tbname['papoo_messe_daten_lang'],\n\t\t\t\t\t\t$insertid,\n\t\t\t\t\t\t$key,\n\t\t\t\t\t\t$value\n\t\t\t\t\t);\n\t\t\t\t\t$this->db->query( $sql );\n\t\t\t\t}\n\t\t\t\t//Sql Datei erneuern\n\t\t\t\t#$sql=sprintf(\"SELECT messe_xml_yn FROM %s\",\n\t\t\t\t#$this->cms->tbname['papoo_messe_pref']\n\t\t\t\t#\t);\n\t\t\t\t#\t$this->export_xml=$this->db->get_var($sql);\n\t\t\t\t#\tif ($this->export_xml==1){\n\t\t\t\t#\t\t$this->diverse->make_sql(\"messe\");\n\t\t\t\t#\t}\n\t\t\t}\n\n\t\t\t$location_url = $_SERVER['PHP_SELF'] . \"?menuid=\" . $this->checked->menuid .\n\t\t\t\t\"&template=\" . $this->checked->template . \"&fertig=drin\";\n\t\t\tif ( $_SESSION['debug_stopallredirect'] ) {\n\t\t\t\techo '<a href=\"' . $location_url . '\">Weiter</a>';\n\t\t\t}\n\t\t\telse {\n\t\t\t\theader( \"Location: $location_url\" );\n\t\t\t}\n\t\t\texit;\n\t\t}\n\t\tif ( !empty($this->checked->glossarid) ) {\n\t\t\t//Nach id aus der Datenbank holen\n\t\t\t$sql = sprintf( \"SELECT * FROM %s WHERE messe_id='%s'\",\n\t\t\t\t$this->cms->tbname['papoo_messe_daten'],\n\t\t\t\t$this->db->escape($this->checked->glossarid)\n\t\t\t);\n\n\t\t\t$result = $this->db->get_results( $sql );\n\n\t\t\tif ( !empty($result) ) {\n\t\t\t\tforeach ( $result as $glos ) {\n\t\t\t\t\t$this->content->template['messe_name'] = $glos->messe_name;\n\t\t\t\t\t$this->content->template['edit'] = \"ok\";\n\t\t\t\t\t$this->content->template['altereintrag'] = \"ok\";\n\t\t\t\t\t$this->content->template['messe_id'] = $glos->messe_id;\n\t\t\t\t\t$this->content->template['messe_logo'] = $glos->messe_logo;\n\t\t\t\t\tif ( is_numeric($glos->messe_von) ) {\n\t\t\t\t\t\t$this->content->template['messe_von'] = date( \"d.m.Y\", $glos->messe_von );\n\t\t\t\t\t}\n\t\t\t\t\tif ( is_numeric($glos->messe_bis) ) {\n\t\t\t\t\t\t$this->content->template['messe_bis'] = date( \"d.m.Y\", $glos->messe_bis );\n\t\t\t\t\t}\n\t\t\t\t\t$this->content->template['messe_logo'] = $glos->messe_logo;\n\t\t\t\t}\n\t\t\t\t//Sprachdaten raussuchen\n\t\t\t\t$sql = sprintf( \"SELECT * FROM %s WHERE messe_id_id='%s'\", $this->cms->tbname['papoo_messe_daten_lang'],\n\t\t\t\t\t$this->db->escape($this->checked->glossarid) );\n\t\t\t\t$resultx = $this->db->get_results( $sql );\n\n\t\t\t\tif ( !empty($resultx) ) {\n\t\t\t\t\tforeach ( $resultx as $lang ) {\n\t\t\t\t\t\t$wort[$lang->messe_lang_id] = \"nobr:\" . $lang->messe_descrip;\n\t\t\t\t\t\t#$des[$lang->linkliste_lang_lang] = \"nobr:\".$lang->linkliste_descrip;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->content->template['messe_descrip'] = $wort;\n\t\t\t\t#$this->content->template['linkliste_descrip']=$des;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t//Daten rausholen und als Liste anbieten\n\t\t\t$this->content->template['list'] = \"ok\";\n\t\t\t//Daten rausholen\n\t\t\t$sql = sprintf( \"\tSELECT * FROM %s, %s \n\t\t\t\t\t\t\t\tWHERE messe_id=messe_id_id \n\t\t\t\t\t\t\t\tAND messe_lang_id='1' \n\t\t\t\t\t\t\t\tORDER BY messe_name ASC\",\n\t\t\t\t$this->cms->tbname['papoo_messe_daten'],\n\t\t\t\t$this->cms->tbname['papoo_messe_daten_lang']\n\t\t\t);\n\t\t\t$result = $this->db->get_results( $sql, ARRAY_A );\n\n\t\t\t//Daten f�r das Template zuweisen\n\t\t\t$this->content->template['list_dat'] = $result;\n\t\t\t$this->content->template['messe_link'] = $_SERVER['PHP_SELF'] . \"?menuid=\" . $this->\n\t\t\t\tchecked->menuid . \"&template=\" . $this->checked->template . \"&glossarid=\";\n\t\t\t;\n\t\t}\n\t\tif ( $this->checked->fertig == \"drin\" ) {\n\t\t\t$this->content->template['eintragmakeartikelfertig'] = \"ok\";\n\t\t}\n\t\t//Anzeigen das Eintrag gel�scht wurde\n\t\tif ( $this->checked->fertig == \"del\" ) {\n\t\t\t$this->content->template['deleted'] = \"ok\";\n\t\t\t$this->content->template['messe_id'] = $this->checked->glossarid;\n\t\t}\n\t\t//Soll gel�scht werden\n\t\tif ( !empty($this->checked->submitdelecht) ) {\n\t\t\t//Eintrag nach id l�schen und neu laden\n\t\t\t$sql = sprintf( \"\tDELETE FROM %s \n\t\t\t\t\t\t\t\tWHERE messe_id='%s'\",\n\t\t\t\t$this->cms->tbname['papoo_messe_daten'],\n\t\t\t\t$this->db->escape($this->checked->messe_id)\n\t\t\t);\n\t\t\t$this->db->query( $sql );\n\t\t\t$insertid = $this->db->escape( $this->checked->messe_id );\n\t\t\t//Alle Sprachen linkliste_descrip\n\t\t\t$sql = sprintf( \"\tDELETE FROM %s \n\t\t\t\t\t\t\t\tWHERE messe_id_id='%s'\",\n\t\t\t\t$this->cms->tbname['papoo_messe_daten_lang'],\n\t\t\t\t$insertid\n\t\t\t);\n\t\t\t$this->db->query( $sql );\n\t\t\t$location_url = $_SERVER['PHP_SELF'] . \"?menuid=\" . $this->checked->menuid .\n\t\t\t\t\"&template=\" . $this->checked->template . \"&fertig=del\";\n\t\t\tif ( $_SESSION['debug_stopallredirect'] ) {\n\t\t\t\techo '<a href=\"' . $location_url . '\">Weiter</a>';\n\t\t\t}\n\t\t\telse {\n\t\t\t\theader( \"Location: $location_url\" );\n\t\t\t}\n\t\t\texit;\n\t\t}\n\n\t\t//Soll wirklich gel�scht werden?\n\t\tif ( !empty($this->checked->submitdel) ) {\n\t\t\t$this->content->template['glossarname'] = $this->checked->glossarname;\n\t\t\t$this->content->template['glossarid'] = $this->checked->glossarid;\n\t\t\t$this->content->template['fragedel'] = \"ok\";\n\t\t\t$this->content->template['edit'] = \"\";\n\t\t}\n\t}",
"function wpzoom_post_embed_info() {\n global $post;\n\n ?>\n <fieldset>\n\n <?php if (option::get('featured_type') == 'Featured Posts') { ?>\n\n <p class=\"wpz_border\">\n <?php $isChecked = ( get_post_meta($post->ID, 'wpzoom_is_featured', true) == 1 ? 'checked=\"checked\"' : '' ); // we store checked checkboxes as 1 ?>\n <input type=\"checkbox\" name=\"wpzoom_is_featured\" id=\"wpzoom_is_featured\" value=\"1\" <?php echo esc_attr($isChecked); ?> /> <label for=\"wpzoom_is_featured\"><?php _e('Feature in Homepage Slider', 'wpzoom'); ?></label>\n </p>\n\n <hr />\n\n <?php } ?>\n\n </fieldset>\n <?php\n}",
"function form_checkbox($forms){\r\n\t$name = isset($forms['name']) ? $forms['name'] : rand(1000 , 9999 ) ;\r\n\t$class = isset( $forms['class'] ) ? $forms['class'] : $forms['name'] ;\r\n\t$checked = $forms['value'] == '1' ? \"checked\" : \"\" ;\r\n\t$id = isset( $forms['id'] ) ? $forms['id'] : $forms['name'] ;\r\n\r\n\t$input = '<input onkeypress=\"return handleEnter(this, event)\" type=\"checkbox\" ';\r\n\t$input .= ' name=\"'.$name.'\" ';\r\n\t$input .= ' class=\"'.$class.'\" ';\r\n\t$input .= ' id=\"'.$id.'\" ';\r\n\t$input .= ' value=\"1\" '; \r\n\t$input .= ' '.$checked.' />';\r\n\r\n\treturn $input;\r\n\r\n}",
"static public function checkbox($name,$opts=[]) {\n $f3 = Base::instance();\n if ($f3->exists('POST.'.$name) && $f3->get('POST.'.$name)) {\n $opts[] = 'checked';\n }\n if (!isset($opts['value'])) $opts['value'] = 1;\n if (!isset($opts['type'])) $opts['type'] = 'checkbox';\n return self::input($name,$opts);\n }",
"public function setFeaturedimage() {\n if( $this->wp_post_id > 0 && count($this->image_blocks) > 0 ){\n $set_feat_img_cmd = \"wp post meta add {$this->wp_post_id} _thumbnail_id {$this->image_blocks[0]->wp_attachment_id}\";\n $output = shell_exec($set_feat_img_cmd);\n echo $output;\n return true;\n } else {\n return false;\n }\n }",
"function form_checkbox_group($field, $options) {\n\n}",
"function briavers_image_box_callback($post){\n wp_nonce_field('image_save_meta_box_data', 'image_meta_box_nonce');\n \n $approved = get_post_meta($post -> ID, '_approved', true);\n $approved = ($approved == 'true')? 'checked' : '';\n\n echo '<label for=\"approved\">'.__('is the picture allowed? ','briavers') . '</label>';\n echo '<input style=\"width:15px; height:15px; margin:0\"; type=\"checkbox\" id=\"approved\" name=\"approved\" value=\"true\" ' . $approved .'> <br>';\n \n \n\n\n\n echo '<label for=\"liked_by\">'.__('Geliked door? ','briavers') . '</label>';\n echo '<select name=\"liked_by[]\" id=\"liked_by\" multiple>';\n $blogUsers = get_users( array( 'fields' => array( 'display_name', 'id' ) ) );\n // Array of stdClass objects.\n foreach ( $blogUsers as $user ) {\n echo '<option value='. $user->id . '>' . $user->display_name . '</option> ';\n }\n echo '</select>';\n}",
"function format_input_hover_checkbox($p_id, $p_checked = false, $p_submit_action = ''){\n\t$t_input = format_checkbox($p_id . '-input', $p_id, $p_checked, 'input-hover-input', 'width:75px');\n\t$t_overlay = format_text($p_id . '-overlay', $p_id . '-overlay', $p_checked ? 'true' : 'false', '', 'input-hover-overlay', 'width:75px', 'readonly');\n\n\treturn format_input_hover_submit_reset($p_id, $t_input, $t_overlay, 'right:17px', 'right:4px', $p_submit_action);\n}",
"function checkbox()\n {\n //if (isset($_POST['accept_terms_checkbox']))\n if ($this->input->post('checkbox'))\n {\n return TRUE;\n }\n else\n {\n $error = 'Please read and accept our terms and conditions.';\n $this->form_validation->set_message('checkbox', $error);\n return FALSE;\n }\n }",
"public function render($name, $value = null, $attributes = array(), $errors = array())\n {\n if (is_array($value))\n {\n $flagObjectId = $value['id'];\n $value = $value['value'];\n }\n else\n {\n throw new InvalidArgumentException('$value must be an array, use id injection');\n }\n\n //create various ids\n $name = $name . '_' . uniqid();\n $this->setAttribute('name', $name);\n $this->setAttributes($this->fixFormId($this->getAttributes()));\n $id = $this->getAttribute('id');\n $idOfIndicator = $id . '_indicator';\n \n //is flag set to true or false?\n $image = ($value) ? 'checkbox_checked' : 'checkbox_unchecked';\n\n //read configuration (we should do some safety checking here)\n $urlToFlagHandler = $this->getOption('urlToFlagHandler');\n $flagName = $this->getOption('flag');\n $modelName = $this->getOption('model');\n \n //build complete URL to flag handler\n $flagHandlingUrl = $urlToFlagHandler .\n '?table=' . $modelName . '&id=' . $flagObjectId .\n '&flag=' . $flagName . '&value=' . (($value) ? 'false' : 'true');\n \n //set the id of this link so that we can replace it later on\n $html = ull_link_to(ull_image_tag($image, array('class' => $image), 9, 9, 'ullCore'),\n $flagHandlingUrl, array('id' => $id));\n \n\n //create the 'real' checkbox replacement HTML ...\n $widget = new sfWidgetFormInputCheckbox(array(), $attributes);\n $checkboxHTML = $widget->render($name, ($value) ? true : false);\n //... and add visual indicator code\n $checkboxHTML .= image_tag('/ullCoreThemeNGPlugin/images/indicator.gif',\n array('id' => $idOfIndicator, 'style' => 'display: none; vertical-align: middle;'));\n\n //append JS which will replace the faked image-checkbox\n //with the real, AJAX-enhanced one\n $html .= <<<EOF\n<script type=\"text/javascript\">\n//<![CDATA[\n$(function() {\n $(\"#$id\").replaceWith('$checkboxHTML'); \n\n $(\"#$id\").click(function()\n { \n flagToggle(this, $(\"#$idOfIndicator\"), '$urlToFlagHandler', '$modelName', $flagObjectId, '$flagName');\n return false;\n });\n});\n//]]>\n</script>\nEOF;\n\n return $html;\n }",
"function IMGattachment_fields($form_fields, $post) {\n\t$exp = get_post_meta($post->ID, '_eaNoExpand', true);\n\t$checked = ($exp) ? 'checked' : '';\n\t$form_fields['eaExpand'] = array(\n\t\t'label' => 'Dont Expand',\n\t\t'input' => 'html',\n\t\t'html' => \"<input type='checkbox' {$checked} name='attachments[{$post->ID}][eaExpand]' id='attachments[{$post->ID}][eaExpand]' />\",\n\t\t'value' => $exp,\n\t\t'helps' => 'Prevent this image from expanding in content.'\n\t\t);\n return $form_fields;\n}",
"public function getHaveImgAttribute(){\n return $this->attributes['have_img'] = empty($this->img) ? 0 : 1;\n }",
"function check ( $id , $texto , $plus = \"\" , $size = 3 ) {\r\n if ( is_numeric ( $plus ) ) {\r\n $size = $plus;\r\n $plus = '';\r\n }\r\n conf::$pkj_uid_comp ++;\r\n\r\n $idREF = \"pkj\" . conf::$pkj_uid_comp;\r\n $value = \"value = '$texto'\";\r\n\r\n if ( contains ( $plus , \"value\" ) ) {\r\n $value = \"\"; //melhor ficar quieto\r\n }\r\n $html = \"<label onclick='$(\\\"input[data-pkj-id=\\\\\\\"{$idREF}\\\\\\\"]\\\").trigger(\\\"click\\\")' style='margin-top:5px'><input data-pkj-id='$idREF' name='$id' type='checkbox' $value $plus /> {$texto}</label>\";\r\n echo div ( $html , $size );\r\n}",
"private function checkboxCustomField(): string\n {\n return Template::build($this->getTemplatePath('checkbox.html'), [\n 'id' => uniqid(\"{$this->id}-\", true),\n 'name' => $this->id,\n 'label' => $this->label,\n 'checked' => $this->getValue($this->index) ? 'checked' : '',\n 'index' => isset($this->index) ? $this->index : false\n ]);\n }",
"function post_upload_ui_encryption() {\n\tprintf(\n\t\t'<label for=\"upload_encrypted\"><input type=\"checkbox\" name=\"upload_encrypted\" id=\"upload_encrypted\"> %s</label>',\n\t\tesc_html__( 'Encrypt', 'encrypted-uploads' )\n\t);\n}",
"public function hasImage(): bool;",
"function taxonomy_meta_box_sanitize_cb_checkboxes($taxonomy, $terms)\n {\n }"
] | [
"0.6598669",
"0.6596252",
"0.6528963",
"0.65153515",
"0.63958496",
"0.6358763",
"0.6354054",
"0.6294119",
"0.62889445",
"0.61716133",
"0.6163863",
"0.60828614",
"0.6028327",
"0.6000511",
"0.59055394",
"0.5900837",
"0.58353907",
"0.5830131",
"0.5828242",
"0.58257085",
"0.57927096",
"0.57831687",
"0.5767528",
"0.5717883",
"0.5709882",
"0.57012486",
"0.5684308",
"0.56842107",
"0.5679317",
"0.56759155",
"0.5661927",
"0.56590414",
"0.5642335",
"0.56396425",
"0.56369257",
"0.5617346",
"0.5574832",
"0.5571563",
"0.5570281",
"0.55550134",
"0.5520465",
"0.5514218",
"0.550534",
"0.5489639",
"0.5479486",
"0.54787624",
"0.54755896",
"0.547238",
"0.54717696",
"0.54638386",
"0.5462145",
"0.5437807",
"0.5430537",
"0.54096115",
"0.5407774",
"0.54032093",
"0.5401097",
"0.5389752",
"0.5386821",
"0.53627086",
"0.5339109",
"0.533417",
"0.5320802",
"0.53109556",
"0.5307291",
"0.5302839",
"0.5301506",
"0.5300855",
"0.53007233",
"0.5300439",
"0.52983654",
"0.52933574",
"0.5290974",
"0.52904123",
"0.5287015",
"0.5285623",
"0.5284158",
"0.5282835",
"0.52761",
"0.5271472",
"0.52657515",
"0.5264319",
"0.5264163",
"0.5260255",
"0.5249813",
"0.5247062",
"0.52436846",
"0.5240912",
"0.5239811",
"0.5237353",
"0.5230514",
"0.52296937",
"0.52292246",
"0.52282727",
"0.52280664",
"0.52229035",
"0.522118",
"0.5217638",
"0.52156675",
"0.52095515"
] | 0.73031205 | 0 |
kijken of de user is ingelogd. | function LoginCheck()
{
if (isset($_SESSION['LoginCheck']) && $_SESSION['LoginCheck'] == 1 )
{
return true;
}
else
{
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function ingelogd() {\n\t\t\treturn $this->bLoggedIn;\n\t\t}",
"function verificalogin(){\n if(!isset($this->session->datosusu)){\n return true;\n }\n }",
"public function documentcheck() {\n $user = User::load(\\Drupal::currentUser()->id());\n bhge_user_registration_user_login($user);\n }",
"function user_logged_in($user_id) {\n \n }",
"public function is_logged_in() {\n\n\t}",
"function loggedin() {return $this->login_state!=0;}",
"protected function isUserLoggedIn() {}",
"protected function isUserLoggedIn() {}",
"function renren_user_logined() {\n global $RR_config;\n return isset($_COOKIE[$RR_config->APIKey.'_session_key']) || !empty($_COOKIE[$RR_config->APIKey.'_session_key']);\n}",
"public function isGerechtigd()\n {\n if(isset($_SESSION['gebruiker'])&&!empty($_SESSION['gebruiker']))\n {\n $gebruiker=$_SESSION['gebruiker'];\n if ($gebruiker->getRecht() == \"medewerker\")\n {\n return true;\n }\n else\n {\n return false;\n }\n }\n \n return false;\n \n \n }",
"function user_logged_in($user_id)\n\t{\n\t}",
"public function is_login(){\n if (empty($this->user['userid'])){\n return false;\n }\n return true;\n }",
"function getUserIsLoggedIn() {\r\n\r\n // For now, just return false\r\n return false;\r\n}",
"function wv_is_user_loggedin() {\n $output = 0;\n if (is_user_logged_in()) {\n $output = 1;\n } else {\n $output = 0;\n }\n return $output;\n }",
"abstract protected function isUserLoggedIn() ;",
"public function isGerechtigd() {\n if (isset($_SESSION['gebruiker']) && !empty($_SESSION['gebruiker'])) {\n $gebruiker = $_SESSION['gebruiker'];\n if ($gebruiker->geefRecht() == \"klant\") {\n return true;\n } else {\n return false;\n }\n }\n return false;\n }",
"public function isLogined()\n {\n return isset($_SESSION['userLogin']);\n }",
"public function loggedIn() {\r\n //if userID is not proper then return False.\r\n if (intval($this->id) <= 0) {\r\n return False;\r\n }\r\n // if we last checked for login under a second ago then return true.\r\n if (($this->id == $_SESSION['id']) && $_SESSION['lastLoginCheckTime'] > microtime(true) - 1) {\r\n return True;\r\n } elseif (isset($_SESSION['switched_user'])) {\r\n $checkID = $_SESSION['switched_user'];\r\n } else {\r\n $checkID = $this->id;\r\n }\r\n $thisUserInfo = $this->dbConn->queryFirstRow(\"SELECT `ip` FROM `usermap` WHERE `user_id` = \".intval($checkID).\" ORDER BY `last_date` DESC LIMIT 1\");\r\n if (!$thisUserInfo || $thisUserInfo['ip'] != $_SERVER['REMOTE_ADDR']) {\r\n return False;\r\n }\r\n $_SESSION['lastLoginCheckTime'] = microtime(true);\r\n return True;\r\n }",
"function isuserloggedin()\r\n{\r\n return false;\r\n}",
"function logged_in() {\n\t\tif (isset($_SESSION['admin_id'])) {\n\t\t\tif($_SESSION['username'] === \"main_admin\"){ \n\t\t\t\treturn 1; \n\t\t\t}\n\t\t}\n\t\treturn 0; \n\t}",
"function user_not_loggedin() {\n global $USER;\n return ($USER->id <= 0 || isguestuser());\n}",
"static public function isLoggedIn(){\n \treturn (self::getInstance()->getId()>1);\n }",
"function user_loggedin(){\n\t$app = \\Jolt\\Jolt::getInstance();\n\tif( !$app->store('user') ){\n\t\treturn false;\n\t}\n\treturn true;\n//\t$app->redirect( $app->getBaseUri().'/login',!$app->store('user') );\n}",
"public static function isLoged(){\n\t\t\treturn isset($_SESSION['data']['User']['idUsuario']);\n\t\t}",
"function customerIsLogedIn() {\n\t\treturn isset($_SESSION) && isset($_SESSION[\"webuser\"]) && isset($_SESSION[\"webuser\"][\"ID\"]);\n\t}",
"function isUserLogged() {\r\n return isset($_SESSION['user']);\r\n }",
"private function _logged_in()\n {\n /*if(someone is logged in)\n RETURN TRUE;*/\n }",
"public static function userLoggedIn()\n {\n //Hvis en bruker ikke er logget inn, vil han bli sent til login.php\n if (!isset($_SESSION['user'])) {\n //Lagrer siden brukeren er på nå slik at han kan bli redirigert hit etter han har logget inn\n $_SESSION['returnPage'] = $_SERVER['REQUEST_URI'];\n $alert = new Alert(Alert::ERROR, \"Du er nøtt til å være logget inn for å se den siden. Ikke prøv deg på noe.\");\n $alert->displayOnOtherPage('login.php');\n\n }\n }",
"public function check_user(){\n\t\tsession_regenerate_id(true);\n\t\tif((isset($_SESSION['angemeldet']) AND $_SESSION['angemeldet'] !== TRUE) OR !isset($_SESSION['angemeldet'])){\n\t\t\treturn FALSE;\n\t\t}else{\n\t\t\t$user = $this->sql->real_escape_string($_SESSION['benutzername']);\n\t\t\t$query = \"SELECT\n\t\t\t\t`\".IP.\"`, \n\t\t\t\t`\".USERAGENT.\"`,\n\t\t\t\t`\".REQUEST_TIME.\"`,\n\t\t\t\tUNIX_TIMESTAMP(`\".LIVESIGN.\"`) as \".LIVESIGN.\"\n\t\t\t\t\tFROM\n\t\t\t\t\t`\".USERS.\"`\n\t\t\t\t\tWHERE\n\t\t\t\t\t`\".USER.\"` = '\".$user.\"'\";\n\t\t\t$result = $this->sql->query($query);\n\t\t\tif ($result->num_rows == 1){\n\t\t\t\t$data = $result->fetch_object();\n\t\t\t\t$result->close();\n\t\t\t\t$ip \t\t\t\t\t= IP;\n\t\t\t\t$useragent \t\t= USERAGENT;\n\t\t\t\t$request_time = REQUEST_TIME;\n\t\t\t\t$livesign\t\t\t= LIVESIGN;\n\t\t\t\tif ($data->$ip !== $_SERVER['REMOTE_ADDR']) return FALSE;\n\t\t\t\tif ($data->$useragent !== $_SERVER['HTTP_USER_AGENT']) return FALSE;\n\t\t\t\tif ($data->$request_time !== $_SESSION['anmeldung']) return FALSE;\n\t\t\t\tif (($data->$livesign + 6000) <= $_SERVER['REQUEST_TIME']) return FALSE;\n\t\t\t}else{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\t$query = \"UPDATE\n\t\t\t\t`\".USERS.\"`\n\t\t\t\tSET\n\t\t\t\t`\".LIVESIGN.\"` = NOW()\n\t\t\t\tWHERE\n\t\t\t\t`\".USER.\"` = '\".$user.\"'\n\t\t\t\tLIMIT 1\";\n\t\t\tif($this->sql->query($query)){\n\t\t\t\treturn TRUE;\n\t\t\t}else{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t}",
"private static function utenteLoggato(){\n return true;\n }",
"function logged_in() {\n\t\treturn isset($_SESSION['USERID']);\n \n\t}",
"public function check_login()\n\t{\n\t\tif(isset($_SESSION[\"user_id\"]))\n\t\t{\n\t\t $this->_user_id = $_SESSION[\"user_id\"];\n\t\t\t$this->_client = $_SESSION[\"client\"];\n\t\t\t$this->_loged_in = true;\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_loged_in = false;\n\t\t\t$this->_client = false;\n\t\t\tunset($this->_user_id);\n\t\t}\n\t}",
"private function isLoggedin()\n\t{\n\t\t$this->idletime = 18000;\n\n\t\tif ((time()-$_SESSION['timestamp'])>$this->idletime)\n\t\t{\n\t\t\t$message = \"You are signed out from the previous session ! Please try sign in again!\";\n\t\t\t$this->logout($message);\n\t\t}\n\t\telseif($this->logged_in() == false)\n\t\t{\n\t\t\t$message = \"Invalid session !! Please try sign in again.\";\n\t\t\t$this->logout($message);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$_SESSION['timestamp'] = time();\n\t\t}\n\t}",
"function isLogged();",
"public static function LoggedIn() {\n\t\tif (empty($_SESSION['current_user'])) {\n\t\t\tnotfound();\n\t\t}\n\t}",
"function is_logged_in()\n{\n if (isset($_SESSION['ingelogd']) && $_SESSION['ingelogd'] == true) {\n return true;\n }\n return false;\n}",
"private function userNotLoggedin(){\n \n if (session()->get('grandidsession')===null || !session()->has('user_id')\n || (session()->get('role')!==config('constants.roles.USER_ROLE'))){\n return true;\n }\n return false;\n }",
"function is_login ()\r\n {\r\n if (($this->get_login()) && ($this->get_id() != USER_ID_RESET_VALUE) && ($this->get_name() != USER_NAME_RESET_VALUE) && ($this->get_name() != \"\"))\r\n return TRUE;\r\n return FALSE;\r\n }",
"public function isUserLogged(){\r\n return isset($_SESSION[$this->userSessionKey]);\r\n }",
"function get_user_id_on_fangate(){\n\tglobal $gianism;\n\treturn $gianism->fb->is_registered_user_on_fangate();\n}",
"public function logged_in()\n\t{\n\t\treturn $this->_me != NULL;\n\t}",
"public function loggedIn($user) {\n if ($user != null) \n return true;\n return false;\n\n }",
"function IsLoggedIn() {\t\tif( Member::currentUserID() ) {\r\n\t\t return true;\r\n\t\t}\r\n }",
"function is_logged_in() \n {\n return (empty($this->userID) || $this->userID == \"\") ? false : true;\n }",
"function user_login_status() {\n $g = get_session('user_data');\n if (!empty($g)) {\n return true;\n }\n return false;\n}",
"public function isLoggedIn() {\n if(isset($this->username)){\n return true;\n }\n return false;\n}",
"public function loggedIn()\n {\n if ($this->userId) {\n return true;\n } else {\n return false;\n }\n }",
"public function isLogged(){\n return isset($_SESSION[\"user\"]);\n }",
"public function check_insta_user() {\n \n }",
"public function IsLog()\r\n {\r\n if (isset($_SESSION['uid'])){\r\n //Retourne vrai\r\n return true;\r\n }\r\n else{\r\n //Retourne faux\r\n return false;\r\n }\r\n }",
"function logged_in() {\r\n\t\treturn isset($_SESSION[\"admin_id\"]);\r\n\t}",
"function is_logged_in()\n\t{\n\t\t$is_logged_in = $this->session->userdata('login');\n\t\t$level=$this->session->userdata('level');\n\t\t//jika session tidak ada atau levelnya bukan user maka akan menampilkan pesan error\n\t\tif(!isset($is_logged_in) || $is_logged_in != true || $level != 'hrd' )\n\t\t{\n\t\t\techo 'You don\\'t have permission to access this page. <a href=\"../backend\">Login</a>';\n\t\t\tdie();\n\t\t}\n\t}",
"function isLogged(){\n\n\tglobal $db;\n\tif(!isset($_COOKIE['caledonian']) || empty($_COOKIE['caledonian'])){\n\t\treturn false;\n\t}else{\n\t\t$db->where('session_token=?',array($_COOKIE['caledonian']))->getOne('users');\n\t\tif($db->count==0){return false;}else{return true;}\n\t}\n\n}",
"public function is_google_user_logged_in(){\n\t\treturn $this->session->userdata('current_google_user_id') != FALSE;\n\t}",
"public function isCurrentlyLoggedIn() {}",
"public function IsTheUserLoged(){\n\n\t\t// ¿is the admin_login index equal to 1?\n\t\t$is_different = ( $this->instance->session->userdata('admin_login') == 1 );\n\n\t\t// If the index exists and this actual url is equeal to login :)\n\t\tif( $is_different && $this->instance->uri->uri_string === $this->login_uri ){\n\t\t\t\n\t\t\t// redirect to admin dashboard\n redirect( site_url( 'admin/dashboard' ), 'refresh' );\n }\n\t}",
"public function isLogedInOrHasKey(){\n if (isset($_GET['key']) && (Yii::app()->user->isGuest) && (\n (in_array($_GET['key'], $this->keys) )) ) return true;\n \n if (isset($_POST['key']) && (Yii::app()->user->isGuest) && (\n (in_array($_POST['key'], $this->keys) )) ) return true;\n \n return false;\n }",
"public function getIsLoggedIn()\n {\n return !$this->getIsGuest();\n }",
"private function check_the_login(){\n \n if(isset($_SESSION['login_user'])){\n \n $this->login_user = $_SESSION['login_user'];\n $this->signed_in = true;\n \n }else{\n unset($this->login_user);\n $this->signed_in = false;\n }\n \n }",
"function auth_current_user_is_guest($db)\r\r\n{\r\r\n if (!ISSET($_SESSION['NX3_USER']))\r\r\n {\r\r\n return true;\r\r\n }\r\r\n else\r\r\n {\r\r\n return $_SESSION['NX3_USER']['user_id'] == (int)lookup_setting($db, 'nx3.global.guestuserid');\r\r\n }\r\r\n}",
"private function isLoggedIn()\n {\n return isset($_SESSION['user']); \n }",
"public function is_user_logged_in(){\n\t\treturn $this->session->userdata('current_user_id') != FALSE;\n\t}",
"private function compare_with_login()\n {\n }",
"public function user_previlage()\n {\n\n\n }",
"public function is_logged_in(){\r\n\t\t\treturn $this->logged_in;\r\n\t\t}",
"function logged_in() \n {\n return isset($_SESSION['current_username']);\n }",
"function identifyUser() {\n}",
"function isLogged()\n{\n\treturn $this->loggedUser? $this->loggedUser->isLogged() : false;\n}",
"function is_logged_in()\n\t{\n\t\t$is_logged_in = $this->session->userdata('login');\n\t\t$level=$this->session->userdata('level');\n\t\t//jika session tidak ada atau levelnya bukan user maka akan menampilkan pesan error\n\t\tif(!isset($is_logged_in) || $is_logged_in != true )\n\t\t{\n\t\t\techo 'You don\\'t have permission to access this page. <a href=\"login\">Login</a>';\n\t\t\tdie();\n\t\t}\n\t}",
"function pnUserLoggedIn()\r\n{\r\n if(pnSessionGetVar('uid')) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n}",
"function check_login_klant($con)\n\t{\n\t\n\t\tif(isset($_SESSION['idklant']))\n\t\t{\n\t\n\t\t\t$id = $_SESSION['idklant'];\n\t\t\t$query = \"select * from klant where idklant = '$id' limit 1\";\n\t\n\t\t\t$result = mysqli_query($con,$query);\n\t\t\tif($result && mysqli_num_rows($result) > 0)\n\t\t\t{\n\t\n\t\t\t\t$user_data = mysqli_fetch_assoc($result);\n\t\t\t\treturn $user_data;\n\t\t\t}\n\t\t}\n\t\n\t\t//redirect to login\n\t\theader(\"Location: login.php\");\n\t\tdie;\n\t\n\t}",
"private function checkCurrentUser(){\n return isset($_SESSION['user']);\n }",
"function isLoggedIn()\r\n{\r\n $currentUserId = 1;\r\n return $currentUserId;\r\n}",
"function loggedIn() {\n\t\t\treturn $this->logged_in();\n\t\t}",
"function has_logged_in()\n\t{\n\t\tif( $this->session->userdata('usir_nim') )\n\t\t{\n\t\t\tredirect('reminders');\n\t\t}\n\t\t\n\t}",
"public function isLoggedIn(){\n // Apakah user_session sudah ada di session\n if(isset($_SESSION['user_session']))\n {\n return true;\n }\n }",
"public function isLoggedin(){\n\n\t\treturn $this->_isLoggedin;\n\n\t}",
"public function isnotloggedin()\n {\n if (!$this->hasuser())\n {\n return TRUE;\n }\n }",
"public function logged_in()\n {\n if (isset($_SESSION['user_data'])) {\n return true;\n } else {\n return false;\n }\n }",
"public function isloggedin()\n {\n return Session::userIsLoggedIn();\n }",
"private function checkUserLoggedIn(): bool\n {\n $user = JFactory::getUser();\n if ($user->id > 0) {\n return true;\n } else {\n return false;\n }\n }",
"public function log_login() {\r\n\t\tif ($this->user_id) {\r\n\t\t\t$sql = \"UPDATE users SET last_seen = NOW() WHERE user_id = '$this->user_id' LIMIT 1\";\r\n\t\t\t$result = $this->dbc->query($sql)\r\n\t\t\tor die ($this->dbc->error);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public function check_login(){\n\n\t\tsession_id() == '' ? session_start(): NULL;\n\n\t\tif($this->LOGGED_IN){//IF THE LOGIN OBJECT VAR IS SET\n\t\t\treturn true;\n\t\t\t}\n\t\telse{\n\n\t\t\tif(isset($_SESSION['userLgInfo']['USER_ID'])){//IF SESSION IS SET\n\t\t\t\t$this->LOGGED_IN = true;\n\t\t\t\t$this->USER_ID = $_SESSION['userLgInfo']['USER_ID'];\n\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\telse if(isset($_COOKIE['user'])){\n\t\t\t\t$key = Janitor::decrypt_data($_COOKIE['user'], Config::$ENCRYPT_KEY);\n\t\t\t\t$sql = \"SELECT u.`USER_EMAIL`, u.`USER_ID`, u.`USER_FIRST_NAME`, u.`USER_LAST_NAME`, u.`USER_KEY`, u.`USER_PERM` FROM `user_tbl` AS u WHERE u.`USER_KEY`= ?\"; $bind = array($key); $db = new SqlCore;\n\t\t\t\t$userArr = $db->query_array($sql, $bind);\n\n\t\t\t\tif($userArr==NULL){ return false; }\n\n\t\t\t\t//SET LOGIN VARS\n\t\t\t\t$_SESSION['userLgInfo'] = array('USER_EMAIL' => $userArr[0]['USER_EMAIL'], 'USER_ID' => Janitor::encrypt_data($userArr[0]['USER_ID'], Config::$ENCRYPT_KEY), 'USER_FULL_NAME' => $userArr[0]['USER_FIRST_NAME'].' '.$userArr[0]['USER_LAST_NAME'], 'USER_FIRST_NAME' => $userArr[0]['USER_FIRST_NAME'], 'USER_LAST_NAME' => $userArr[0]['USER_LAST_NAME'], 'USER_PERM' => Janitor::encrypt_data($userArr[0]['USER_PERM'], Config::$ENCRYPT_KEY));\n\t\t\t\t$this->LOGGED_IN = true;\n\t\t\t\t$this->USER_ID = $userArr[0]['USER_ID'];\n\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public function isLoggedUser()\n {\n return $this->container->get('user')->isLogged();\n }",
"public function is_logged_in() {\n return isset($this->admin_id) && $this->last_login_is_recent();\n \n }",
"public function is_logged_in(){\n\t\treturn $this->_state_is_logged_in;\n\t}",
"public function needKuserFromPuser ( )\r\n\t{\r\n\t\treturn self::KUSER_DATA_KUSER_ID_ONLY;\r\n\t}",
"public function needKuserFromPuser ( )\r\n\t{\r\n\t\treturn self::KUSER_DATA_KUSER_ID_ONLY;\r\n\t}",
"public function isLoggedIn()\n {\n $database = new Database();\n $loggedIn = $database->getAdminByUsername($_SESSION['user']);\n $admin = new Admin($loggedIn['adminId'], $loggedIn['username'], $loggedIn['adminLevel'], $loggedIn['active']);\n if(isset($_SESSION['user']) === true && strpos($admin->getAdminLevel(), Partner) !== false && $admin->getActive() == 1) {\n $testLogin = true;\n } else {\n $this->_f3->reroute('/Login');\n }\n $this->_f3->set('login', $testLogin);\n $this->_f3->set('admin', $admin);\n }",
"function logged()\r\n\t{\r\n\t\treturn !empty($this->atoken);\r\n\t}",
"public function logged_in() {\n return !empty($this->session->userdata('user_id'));\n }",
"function loggedIn() {\n\t\treturn isset($_SESSION['username']);\n\t}",
"function logged_user_check() {\n if(is_user_logged())\n launch_error(\"You are already logged in.\");\n}",
"public function loggedIn(){\r\n if (isset($_SESSION['user_session']))\r\n return true;\r\n else\r\n return false;\r\n }",
"function userAdmin(){\n\tif(userConnecte() && $_SESSION['membre']['statut'] == '1'){\n\t\treturn true;\n\t}\n\telse{\n\t\treturn false;\n\t}\n}",
"public function m_Euser(){\n\t\tif ($this -> e_user !== '') {\n\t\t\techo $this -> E_inicio.$this -> e_user.$this -> E_fin;\n\t\t}\n\t}",
"public function isLoggedIn();",
"public function isLoggedIn();",
"public function check_login(){\n\t\t\tif( isset( $_SESSION['user_id'] ) ) {\n\t\t\t\t$this->user_id = $_SESSION['user_id'];\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset( $this->user_id );\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}",
"public function isLoggedIn()\n {\n return ($this->userInfo->userid ? true : false);\n }",
"public function isUserLoggedIn()\n {\n return $this->user_is_logged_in;\n }"
] | [
"0.6956884",
"0.6604249",
"0.6499653",
"0.64937097",
"0.6480486",
"0.64564633",
"0.64526325",
"0.64526325",
"0.64421487",
"0.6428092",
"0.639187",
"0.63469726",
"0.63437545",
"0.63436896",
"0.63381386",
"0.62929106",
"0.6264437",
"0.62553537",
"0.6235065",
"0.6224071",
"0.62035835",
"0.62028456",
"0.61962396",
"0.61924684",
"0.61832494",
"0.61735356",
"0.61606306",
"0.6158216",
"0.6156797",
"0.6143003",
"0.61380607",
"0.6133791",
"0.6131185",
"0.6125816",
"0.61168313",
"0.61144036",
"0.61087006",
"0.6106881",
"0.6102408",
"0.6099874",
"0.60936606",
"0.60877824",
"0.60845387",
"0.6083112",
"0.6080103",
"0.60691726",
"0.6068834",
"0.6066729",
"0.6064086",
"0.6061492",
"0.6055504",
"0.6049179",
"0.60463196",
"0.6043329",
"0.60428554",
"0.60426056",
"0.6041417",
"0.6030495",
"0.60293216",
"0.6022725",
"0.6021717",
"0.60199505",
"0.60154706",
"0.60147494",
"0.6013492",
"0.6011612",
"0.6001109",
"0.60004914",
"0.5991044",
"0.59860086",
"0.597465",
"0.5970831",
"0.59638137",
"0.5960779",
"0.59553295",
"0.5954477",
"0.59520406",
"0.5951398",
"0.59440005",
"0.5939941",
"0.5938419",
"0.59353787",
"0.59338135",
"0.5928598",
"0.59253603",
"0.5922193",
"0.5922041",
"0.5922041",
"0.5920144",
"0.59198636",
"0.59127396",
"0.59096336",
"0.59069633",
"0.5901646",
"0.5898878",
"0.5895161",
"0.58931935",
"0.58931935",
"0.58927935",
"0.5892704",
"0.5889093"
] | 0.0 | -1 |
Construct function, load user, tree, action auto. | public function __construct()
{
parent::__construct();
$this->session->set('docFrom', 'doc');
$this->libs = $this->doc->getLibPairs();
$this->loadModel('user');
$this->loadModel('tree');
$this->loadModel('action');
$this->loadModel('project', 'proj');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct () {\n\t\t\n\t\t$this->conf = config::get();\n\t\t\n\t\t$this->getParams();\n\t\t$this->initTemplate();\n\t\t\n\t\t# Create user object and log result if any\n\t\t$this->user = new user();\n\t\tif ($this->action == 'user') {\n\t\t\t$ret = $this->user->run($this->actionMethod);\n\t\t\tlogs::write($this->action, $ret);\n\t\t}\n\t\t\n\t\t# execute action if connected!\n\t\tif ($this->user->isConnected()) {\n\t\t\n\t\t\t# hide items\n\t\t\t$this->tpl->hideBlock('log_in');\n\t\t\t\n\t\t\t# execute plugin, then render it\n\t\t\t$plugin = new $this->action ();\n\t\t\t$html = $plugin->run($this->actionMethod);\n\t\t\t$this->setPluginVars($html);\n\t\t\t\n\t\t\t# search JS & CSS files\n\t\t\t$js = $plugin->getJS();\n\t\t\t$css = $plugin->getCSS();\n\t\t\t$this->setDependencies($js, $css);\n\t\t\t\n\t\t\t# search all plugins\n\t\t\t$modules = $this->listModules();\n\t\t\t$this->setVars($modules);\n\t\t} else {\n\t\t\t\n\t\t\t# hide items\n\t\t\t$this->tpl->hideBlock('log_out');\n\t\t\t$this->tpl->hideBlock('tools');\n\t\t\t\n\t\t\t# render homepage\n\t\t\t$this->tpl->setCurrentBlock('homepage');\n\t\t\t$this->tpl->setVariable(array (\n\t\t\t\t'error'\t=> $this->user->getError(),\n\t\t\t\t'date'\t=> date('l jS \\of F Y h:i:s A')\n\t\t\t));\n\t\t}\n\t\t\n\t\t# print general information\n\t\t$this->tpl->setCurrentBlock('__global__');\n\t\t$this->tpl->setVariable(array(\n\t\t\t'appTitle' \t\t=> $this->conf['general']['appTitle'],\n\t\t\t'appVersion'\t=> $this->conf['general']['version'],\n\t\t\t'themeName'\t\t=> $this->conf['theme']['name'],\n\t\t\t'appURL'\t\t=> $this->conf['general']['appURL'],\n\t\t\t'urlUpload'\t\t=> $this->conf['general']['appURL'] .'?action=upload.show',\n\t\t\t'urlCreateFolder'=>$this->conf['general']['appURL'] .'?action=create.folder&path=',\n\t\t\t'urlDisconnect'\t=> $this->conf['general']['appURL'] .'?action=user.logout',\n\t\t\t'urlConnect'\t=> $this->conf['general']['appURL'] .'?action=user.login',\n\t\t\t\n\t\t\t'username'\t\t=> $this->user->getUserName()\n\t\t));\n\t\t\n\t\t# print the page only if not standalone\n\t\tif (!$this->standalone) {\n\t\t\t$this->tpl->show();\n\t\t}\n\t}",
"public function initFEuser() {}",
"public function __construct() {\n \n require MODEL . 'ReadableDatabase.php';\n require MODEL . 'WritableDatabase.php';\n require MODEL . 'Session.php';\n require MODEL . 'LoginCredentials.php';\n require MODEL . 'User.php';\n require MODEL . 'Contact.php';\n require MODEL . 'Group.php';\n \n // split the url and get the controller, action and parameters to the action\n $this->prepareURL();\n \n // now we have controller, action and parameters seperated and stored in\n // variables that represent them\n // first check whether he controller exist\n // if yes display it, else print error(or you can redirect to the home page)\n if(file_exists(CONTROLLER . $this->controller . '.php')) {\n // create an object for this contrlooer\n $this->controller = new $this->controller;\n \n if(method_exists($this->controller, $this->action)) {\n // if the controller class has the method in action variable\n // then call it \n // not from here, but by using call_user_func_array\n call_user_func_array([$this->controller, $this->action], $this->prams);\n } else {\n // what if the method does not\n }\n } else {\n // the controller is not there\n echo 'Requested URL Can not be found :-(';\n }\n }",
"public function init() {\n\t\t$this->load_actions();\n\t}",
"public function __construct($newUsername){\n $this -> loadUser($newUsername);\n }",
"function __construct(){\n\t\tregister_activation_hook( __FILE__, array( $this, 'activate' ) );\n\t\tregister_deactivation_hook( __FILE__, array( $this, 'deactivate' ) );\n\t\tregister_uninstall_hook( __FILE__, array( __CLASS__, 'uninstall' ) );\n\n\t\t$this->constants();\n\t\t$this->includes();\n\n\t\tadd_action( 'init', array( $this, 'add_new_feed' ) );\n\t\tadd_filter( 'query_vars', array( $this, 'add_user_query_var' ) );\n\n\t\tadd_action( 'show_user_profile', array( $this, 'show_links' ) );\n\t\tadd_action( 'edit_user_profile', array( $this, 'show_links' ) );\n\n\t}",
"public function __construct() {\n\t\t\t$this->init_globals();\n\t\t\t$this->init_actions();\n\t\t}",
"public function __construct() {\n require 'views/view_user.php';\n require 'models/model_user.php';\n $this->view = new view_user();\n $this->model = new model_user ();\n }",
"function load() {\n global $url;\n global $area;\n $url = rtrim($url,\"/\");\n $urlArray = array();\n $urlArray = explode(\"/\",$url);\n \n $controller = DEFAULT_CONROLLER;\n $action = DEFAULT_ACTION;\n \n if($urlArray[0] == \"admin\") {\n $area = \"admin\";\n array_shift($urlArray);\n }\n \n if(!empty($urlArray[0])) {\n $controller = array_shift($urlArray);\n }\n \n if(!empty($urlArray[0])) {\n $action = array_shift($urlArray);\n }\n\n $controllerName = $controller;\n $controller = ucwords($controller);\n $controller .= 'Controller';\n\n if(!class_exists($controller)) {\n echo \"Class \" . $controller . \" not found\";\n }\n\n $class = new $controller();\n\n if (method_exists($controller, $action)) {\n call_user_func(array($class,$action));\n } else {\n echo \"Method \" . $action . \" not found\";\n }\n\n}",
"public function __construct(){\n $arr = $this->UrlProcess();\n\n // Xu ly controller\n if(!empty($arr)){\n if(file_exists(\"./source/controllers/\".$arr[0].\".php\")){\n $this->controller = $arr[0];\n unset($arr[0]); // loai bo controller khoi mang -> de lay params ben duoi\n }\n }\n \n\n require_once \"./source/controllers/\".$this->controller.\".php\";\n $this->controller = new $this->controller;\n\n // Xu ly action\n if(isset($arr[1])){\n if(method_exists($this->controller, $arr[1])){\n $this->action = $arr[1];\n }\n unset($arr[1]); // loai bo action khoi mang\n }\n\n //Xu li params\n $this->params = $arr?array_values($arr):[];\n \n call_user_func_array([$this->controller, $this->action], $this->params);\n\n }",
"protected function _init(){\n\t\tparent::_init();\n\t\t$this->applyFilter('__invoke', function($self, $params, $chain) {\n\t\t\textract($params);\n\t\t\t$action = $request->action;\n\t\t\t$config = $configKey = null;\n\t\t\tif (!empty($request->params['config'])) {\n\t\t\t\t$configKey = $request->params['config'];\n\t\t\t\t$self->runtime = Registry::get(\"sli_users.{$configKey}\");\n\t\t\t}\n\t\t\tif (!$self->runtime) {\n\t\t\t\t$actionKey = \"sli_users.{$configKey}.controller.actions.{$action}\";\n\t\t\t\t$handledAction = Registry::get($actionKey);\n\t\t\t\tif (isset($handledAction)) {\n\t\t\t\t\t$class = get_class($self);\n\t\t\t\t\t$exception = \"{$class}::{$action} cannot be run without a runtime config.\";\n\t\t\t\t\tthrow new \\RuntimeException($exception);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($self->runtime) {\n\t\t\t\t$self->_user =& Authorized::instance($self->runtime['name'], false, $self->runtime['class']);\n\t\t\t\t$library = Libraries::get('sli_users');\n\t\t\t\tMedia::setDefaults('html');\n\t\t\t\tMedia::addPaths('html', array(\n\t\t\t\t\t'template' => array(\n\t\t\t\t\t\t\"{:library}/views/{$configKey}/{:template}.{:type}.php\",\n\t\t\t\t\t\t$library['path'] . '/views/{:controller}/{:template}.{:type}.php',\n\t\t\t\t\t)\n\t\t\t\t), false);\n\t\t\t\t$self->set(array('sliUserConfig' => $configKey));\n\t\t\t}\n\t\t\treturn $chain->next($self, $params, $chain);\n\t\t});\n\t}",
"public function initUser( &$user, $autocreate=false )\n {\n\n }",
"function __construct()\n {\n $this ->user = User::createInstance();\n }",
"public static function init() {\n\t\tself::setup_actions();\n\t}",
"public function init() {\n\t\trequire(__DIR__ . '/../setup-scripts/createExplicitUsers.php');\n\t\trequire(__DIR__ . '/../setup-scripts/createExplicitGroups.php');\n\t\trequire(__DIR__ . '/../setup-scripts/createExplicitGroupsDifferentOU.php');\n\t\tparent::init();\n\t}",
"public function __construct() {\n //parent::__construct();\n\n $model = new AclModel();\n //$sections = new Sections();\n $privileges = new PrivilegesModel();\n $roles = new Roles();\n\n $this->recursiveRolesFill($roles->getTree());\n\n foreach($privileges->getResourcesArray() as $name)\n {\n $this->addResource($name);\n }\n\n foreach($model->getRules() as $rule)\n {\n $this->allow($rule->role, $rule->resource, $rule->privilege);\n }\n }",
"public function __construct()\n {\n $this->repository = new StatisticVisitRepository();\n $this->actionLate = new LateUserAction();\n $this->actionInTime = new InTimeUserAction();\n }",
"function __construct( $url = '', $user = '', $pass = '' ) {\n\t\t\n\t\tadd_action('wp_detection_checks',array(&$this, 'xmlrpc_check'),1);\n\t\tadd_action('wp_detection_checks',array(&$this, 'get_content'),10);\n\t\tadd_action('wp_detection_checks',array(&$this, 'meta_check'),15);\n\t\tadd_action('wp_detection_checks',array(&$this, 'get_feed_content'),20);\n\t\tadd_action('wp_detection_checks',array(&$this, 'feed_gen_check'),25);\n\t\tadd_action('wp_detection_checks',array(&$this, 'readme_check'),40);\n\t\t\n\t\tif ( !empty($url) ) {\n\t\t\t$this->doit($url, $user, $pass);\n\t\t}\n\t}",
"public function __construct()\n {\n $this->view = new Views('parameter');\n $this->manager = new UsersManager();\n $this->user = new Users();\n }",
"public static function init() {\n\t\tadd_action( 'user_register', array( __CLASS__, 'user_register' ) );\n\t}",
"public function __construct()\n {\n\n if($_SERVER[\"REQUEST_METHOD\"] !== \"GET\"){\n\n //store the funcitons obj\n $this->functions=new functions;\n \n //call the error_404 to show the 404 error\n $this->functions->error_pages()->error_404(); \n \n die();\n\n }else{\n\n \n //set $this->config to config class object\n $this->config=new config;\n\n //set $this->functions to functions class object\n $this->functions=new functions;\n \n //store all model's class to the $this->model_objs variable\n $this->model_objs=array(\n \"user_obj\"=>$this->model(\"user\"),\n \"ufile_obj\"=>$this->model(\"user_files\"),\n \"post_obj\"=>$this->model(\"post\"),\n \"pfile_obj\"=>$this->model(\"post_files\"),\n \"cat_obj\"=>$this->model(\"catagory\"),\n \"rate_obj\"=>$this->model(\"rate\"),\n \"nf_obj\"=>$this->model(\"notification\"),\n \"post_read_obj\"=>$this->model(\"post_read\"),\n \"reply_obj\"=>$this->model(\"reply\"),\n \"comment_obj\"=>$this->model(\"comment\"),\n );\n\n if($this->if_user_logged_in()){\n\n //store the logged user' info in $this->user_info variable\n $this->user_info=$this->logged_user_info($_SESSION[\"user_id\"]);\n \n //store the logged user' info in $this->data variable\n $this->data[\"common_info\"] = array(\n \"user_info\"=>$this->logged_user_info($_SESSION[\"user_id\"]),\n \"nf_info\"=>$this->fetch_nf_info($this->user_info['user_id'])\n );\n \n }\n }\n\n }",
"private function init_user() {\n global $USER, $DB;\n\n $userdata = new stdClass;\n $userdata->username = 'user';\n $userid = user_create_user($userdata);\n $USER = $DB->get_record('user', array('id' => $userid));\n context_user::instance($USER->id);\n }",
"function resolve(){\n $module = ucwords($_GET['module']);\n $controller = ucwords($_GET['controller']);//UsuarioController.php\n $function = ucwords($_GET['function']);\n // Modulo = carpeta\n // Controller = archivo\n // Funcion = metodo del controlador\n\n //La funcion is_dir valida si existe un determinado directorio en la ruta especificada\n if (is_dir(\"../controller/$module\")) {\n \n //La funcion file_exists valida si determinado archivo existe en la ruta especificada\n if (file_exists(\"../controller/$module/\".$controller.\"Controller.php\")) {\n\n //Importacion del controlador\n include_once \"../controller/$module/\".$controller.\"Controller.php\";\n //Asignacion al nombre de la clase\n $nameClass = $controller.\"Controller\";\n //Objeto que instacia la clase\n $object = new $nameClass;\n\n //Funcion que valida si existe una funcion\n if (method_exists( $object, $function )) {\n //Se invoca la funcion\n $object->$function();\n\n } else {\n\n echo \"La funcion especificada no Existe!\";\n \n }\n\n } else {\n \n echo \"El controlador especificado no Existe!\";\n \n }\n \n } else {\n\n echo \"El modulo especificado no Existe!\";\n \n }\n}",
"public function create(){\n\t\t$args = $this->getArgs();\n\t\t$out = $this->getModel()->getUcrDataByToken(UserController::getUcrRequestTokenHash($args[\"GET\"][\"token\"]));\n\t\tinclude 'gui/template/UserTemplate.php';\n\t}",
"public function functionconnect()\n {\n $action = $_GET['function'];\n switch ($action) {\n case 'getShotList':\n $this->getShotList();\n break;\n /* case 'removeUser':\n $this->removeUser();\n break;\n case 'retrieveUser':\n $this->retrieveUser();\n break;\n case 'saveUserEntityAssoc':\n $this->saveUserEntityAssoc();\n break;\n case 'saveUserEntityFieldAssoc':\n $this->saveUserEntityFieldAssoc();\n break; */\n }\n }",
"public function initializeTreeData() {}",
"public function initializeTreeData() {}",
"function __construct(){\n\t\tparent::__construct();\n\t\t\t\t\t\n\t\t/*\n\t\t * Authenticates user and verifies they are logged in\n\t\t * \tcall these methods before any loading done\n\t\t * */\n\t\t/*--------------------- Login Handler ------------------------*/\n\t\t$vc_user = json_decode($this->session->userdata('vc_user'));\n\t\tif(!isset($vc_user->super_admin)){\n\t\t\t$this->_logout();\n\t\t\tdie();\n\t\t}\n\t\tif($this->uri->segment(3) == 'logout'){\n\t\t\t$this->_logout();\n\t\t\tdie();\n\t\t}\n\t\t/*--------------------- End Login Handler --------------------*/\n\t\t\t\t\n\t\t$this->vc_user = $vc_user;\t\t\n\t\t\t\t\n\t\t$this->load->vars('users_oauth_uid', $vc_user->oauth_uid);\n\t\t$this->load->vars('subg', 'super_admins');\n\t\t\n\t}",
"public function __construct()\n {\n // Prepare the action for execution, leveraging constructor injection.\n }",
"public function actionInit()\n {\n $this->initRoles($this->roles);\n $this->initPermissions($this->permissions);\n $this->initDependencies($this->dependencies);\n }",
"protected function initializeAction() {\n\t\t$this->feusers = $this->feusersRepository->findByUid( $GLOBALS['TSFE']->fe_user->user['uid'] ) ;\n\t\t$this->schule = $this->feusers->getSchule();\n\t\n\t\t$this->extKey = $this->request->getControllerExtensionKey();\n\t\t$this->extPath = t3lib_extMgm::extPath($this->extKey);\n\t\n\t\t$this->importClassFile = $this->extPath.'Classes/tmp/class.importtext.php';\n\t\t$this->importClass = 'ImportText';\n\t \n\t\tif ( $this->settings[pidAjaxContainerKlassenuebersicht] > 0) $this->pidAjaxContainerKlassenuebersicht = (int) $this->settings[pidAjaxContainerKlassenuebersicht];\n\t\n\t}",
"public function __construct() {\n\n add_action( 'wpuf_add_post_after_insert', array( $this, 'save_user_anaytics_info' ), 10, 4 );\n add_action( 'user_register', array( $this, 'save_user_anaytics_on_registration' ), 10, 1 );\n\n add_action( 'add_meta_boxes', array( $this, 'add_meta_box' ) );\n\n add_action( 'edit_user_profile', array( $this, 'show_user_analytics_info' ), 11 );\n }",
"function __construct(){\n @session_start();\n $this->tmpl_init();\n $this->rights = new opc_um_rights($this);\n $this->groups = new opc_um_groups($this);\n $this->fields = new opc_um_fields($this);\n foreach(func_get_args() as $ar){\n if(is_string($ar) and is_readable($ar))\n\t$this->init__um_settings($ar);\n else if(is_string($ar))\n\t$this->init__um_key($ar); \n else if(is_bool($ar)) \n\t$this->init__pwd_mandatory($ar);\n else if($ar instanceof opc_fw)\n\t$this->init__fw($ar);\n else if($ar instanceof _tools_)\n\t$this->init__tool($ar);\n else if(is_array($ar))\n\t$this->init__array($ar);\n else \n\ttrigger_error('unkown construct-argument for opc_um' . var_export($ar,TRUE));\n }\n if(is_null($this->key)) $this->key = session_id();\n $this->cls_map = defca('cls_map_def',$this);\n }",
"public function __construct()\n {\n\n //On détermine s'il existe dans l'url un paramètre action correspondant à une action du contrôleur\n if (isset($_GET['action']) and method_exists($this, \"action_\" . $_GET[\"action\"])) {\n //Si c'est le cas, on appelle cette action\n $action = \"action_\" . $_GET[\"action\"];\n $this->$action();\n } else {\n $this->action_default(); //Sinon, on appelle l'action par défaut\n }\n }",
"public function init()\n {\n // Name might be set from outside\n if (!$this->MCONF['name']) {\n $this->MCONF = $GLOBALS['MCONF'];\n }\n $this->id = (int)GeneralUtility::_GP('id');\n $this->CMD = GeneralUtility::_GP('CMD');\n $this->perms_clause = $this->getBackendUser()->getPagePermsClause(1);\n $this->menuConfig();\n $this->handleExternalFunctionValue();\n }",
"function __construct()\n\t{\t\n\t\t$this ->user;\n\t\t$this ->needLogin = false;\n\t\t$this->categories = array();\n\t}",
"public function actionSetup()\n\t{\n\t\t$auth = Yii::app()->authManager;\n\t\t$auth->createOperation('viewUser');\n\t\t$auth->createOperation('updateUser');\n\t\t$auth->createOperation('deleteUser');\n\t\t\n\t\t$auth->createOperation('createSource');\n\t\t$auth->createOperation('updateSource');\n\t\t$auth->createOperation('deleteSource');\n\t\t\n\t\t$auth->createOperation('updateArticle');\n\t\t$auth->createOperation('deleteArticle');\n\t\t\n\t\t$task = $auth->createTask('viewOwnUser',\n\t\t\t'Allows a user to view their profile',\n\t\t\t'return $params[\"id\"] == Yii::app()->user->id;');\n\t\t$task->addChild('viewUser');\n\t\t\n\t\t$task = $auth->createTask('updateOwnUser',\n\t\t\t'Allows a user to update their profile',\n\t\t\t'return $params[\"id\"] == Yii::app()->user->id;');\n\t\t$task->addChild('updateUser');\n\t\t\n\t\t$task = $auth->createTask('updateOwnSource',\n\t\t\t'Allows an editor to update their source',\n\t\t\t'return $params[\"ownerId\"] == $params[\"userId\"]');\n\t\t$task->addChild('updateSource');\n\t\t\n\t\t$role = $auth->createRole('public');\n\t\t$role->addChild('viewOwnUser');\n\t\t$role->addChild('updateOwnUser');\n\t\t\n\t\t$role = $auth->createRole('editor');\n\t\t$role->addChild('public');\n\t\t$role->addChild('updateOwnSource');\n\t\t\n\t\t$role = $auth->createRole('admin');\n\t\t$role->addChild('editor');\n\t\t$role->addChild('createSource');\n\t\t$role->addChild('updateSource');\n\t\t$role->addChild('deleteSource');\n\t\t$role->addChild('viewUser');\n\t\t$role->addChild('updateUser');\n\t\t$role->addChild('deleteUser');\n\t\t$role->addChild('updateArticle');\n\t\t$role->addChild('deleteArticle');\n\t\t\n\t}",
"public function initializeAction() {}",
"public function initializeAction() {}",
"public function initializeAction() {}",
"public function initializeAction() {}",
"public function initializeAction() {}",
"public function initialize() {\r\n\t\t// Initialize the customer instance\r\n\t\t$this->user = new Customer();\r\n\t\t\r\n\t\t// Add default template arguments\r\n\t\t$this->output->setArguments(array(\r\n\t\t '{:PATH:}' => substr(WEB_ROOT, 0, -1), // absolute application web path without the ending slash\r\n\t\t));\r\n\t\t\r\n\t\t// Parse the path and set the class and method\r\n\t\t$this->parsePath();\r\n\t\t\r\n\t\t// Set the JSON flag (if needed)\r\n\t\t$this->setJSON();\r\n\t\t\r\n\t\t// Check the request token\r\n\t\t$this->checkCSRFToken();\r\n\t\t\r\n\t\t// Create a new token\r\n\t\t$this->createCSRFToken();\r\n\t}",
"public function __Construct() {\r\n\t\tprint(\"Searching in \" . self::FULL_URL . \"<br/>\");\r\n\t\t$this->tree = file_get_contents(self::FULL_URL);\r\n\t}",
"function __construct()\n\t{\n\t\t$this->load = new Load();\n\t\t$this->model = new Model();\n\n\t\t$this->home();\n\t}",
"public static function initFeUser() {}",
"public function init()\n\t{\n\t\tEvents::register('user_insert', array($this, 'user_insert'));\n\t\tEvents::register('user_insert_ldap', array($this, 'user_insert_ldap'));\n\t\tEvents::register('user_update', array($this, 'user_update'));\n\t\tEvents::register('user_delete', array($this, 'user_delete'));\n\t\tEvents::register('users_import', array($this, 'users_import'));\n\t}",
"public function __construct() {\n\t\t$this -> beforeFilter('check_admin');\n\t\t$this -> beforeFilter('csrf', array('on' => 'post'));\n\t\t$this -> beforeFilter('detectLang');\n\t\t$this -> beforeFilter('auth');\n\t\t$this -> beforeFilter('before');\n\t\t\n\t\tif(!defined('ASSETS_PATH_FULL')){\n\t\t\t define('ASSETS_PATH_FULL', '\\public\\assets\\site');\n \t}\n\t\t$settings = Setting::whereIn('varname', \n\t\t\t\t\t\tarray('usegravatar'))->get();\n\t\tforeach ($settings as $v) {\n\t\t\t\tView::share($v -> varname, $v -> value);\n\t\t} \n\t\t$user = Auth::user();\t\t\t\n\t\tif(!empty($user)){\n\t\t\t$user2 = new User;\t\n\t\t\t$user = $user2;\t\n\t\t\t$this -> user = $user;\n\t\t\t$roles = $user->currentRoleIds();\n\t\t\tif($roles['allow_admin']=='0'){\n\t\t\t\tURL::to('/');\n\t\t\t}\n\t\t\t$this->roles = $roles['roleIds'];\t\n\t\t}\t\t\n\t}",
"public function __construct() {\n // load our model\n $this->userModel = $this->model('User'); // will check models folder for User.php\n }",
"protected function initializeAction() {\n\t\t\t\n\t\t$this->feuser = $this->feusersRepository->findByUid( $GLOBALS['TSFE']->fe_user->user['uid'] ) ;\n\t\tif (!$this->feuser) throw new \\Tx_Blsvsa2013_Exception_Error('Angemeldeter User kann nicht ermittelt werden N° = ' . $GLOBALS['TSFE']->fe_user->user['uid'], 1349880193 );\n\t\t$this->schulnummer = $GLOBALS['TSFE']->fe_user->user['schule'];\n\t\t\n\t}",
"protected function initializeAction() {\n\t\t$this->frontendUserRepository = t3lib_div::makeInstance('Tx_GrbFeusermanager_Domain_Repository_FrontendUserRepository');\n\t}",
"public function perform()\n {\n // init template array to fill with node data\n $this->tplVar['title'] = '';\n $this->tplVar['branch'] = array(); \n $this->tplVar['childs'] = array();\n // Init template form field values\n $this->tplVar['error'] = FALSE;\n\n // fetch the current id_node. If no node the script assums that\n // we are at the top level with id_parent 0\n if(!isset($_REQUEST['id_node'])) \n {\n $this->tplVar['id_node'] = 0;\n $id_node = 0;\n }\n else\n {\n $this->tplVar['id_node'] = $_REQUEST['id_node'];\n $id_node = (int)$_REQUEST['id_node'];\n }\n \n // add node\n if( isset($_POST['addnode']) )\n {\n if(FALSE !== ($new_id_node = $this->addNode( $id_node )))\n {\n @header('Location: '.$this->model->baseUrlLocation.'/'.SMART_CONTROLLER.'?mod=navigation&view=editNode&id_node='.$new_id_node);\n exit;\n //throw new SmartForwardAdminViewException('naviagtion','index');\n }\n }\n \n // assign the template array $B->tpl_nodes with navigation nodes\n $this->model->action('navigation', 'getChilds', \n array('id_node' => (int)$id_node,\n 'order' => array('rank', 'asc'),\n 'status' => array('>=', 0),\n 'fields' => array('id_node','title','status'),\n 'result' => & $this->tplVar['childs'],\n 'error' => & $this->tplVar['error']));\n \n // assign the template array $B->tpl_nodes with navigation nodes\n $this->model->action('navigation',\n 'getBranch', \n array('result' => & $this->tplVar['branch'],\n 'id_node' => (int)$id_node,\n 'error' => & $this->tplVar['error'],\n 'fields' => array('title','id_node'))); \n\n // set template variable that show the link to add users\n // only if the logged user have at least editor rights\n if($this->viewVar['loggedUserRole'] <= 40)\n {\n $this->tplVar['showAddNodeLink'] = TRUE;\n }\n else\n {\n $this->tplVar['showAddNodeLink'] = FALSE;\n }\n }",
"public function __construct() {\r\n parent::Admin_Controller();\r\n $this->load->model('user/user_m', 'model_user');\r\n }",
"public function initializeAction() {\n parent::initializeAction();\n $this->umDiv = new Tx_Magenerator_Domain_UserManagement_Div();\n }",
"public function __construct()\n\t{\n\t\tparent::__construct(\"user\");\n\t}",
"public function __construct()\n\t{\n\t\t$this->aFunctions = array();\n\n\t\t$this->sRequestedFunction = null;\n\t\t\n\t\tif(isset($_GET['xjxfun']))\n\t\t{\n\t\t\t$this->sRequestedFunction = $_GET['xjxfun'];\n\t\t}\n\t\tif(isset($_POST['xjxfun']))\n\t\t{\n\t\t\t$this->sRequestedFunction = $_POST['xjxfun'];\n\t\t}\n\t}",
"function User() {\n\t switch ($_POST['method']) {\n\t\t case \"connect\":\n\t\t connectBL();\n\t\t break;\n\t\t \n\t\t case \"disconnect\":\n\t\t disconnectBL();\n\t\t break;\n\t\t \n\t\t case \"getDemands\":\n\t\t getDemandsBL();\n\t\t break;\n\t\t \n\t\t case \"getOffers\":\n\t\t getOffersBL();\n\t\t break;\n\t\t \n\t\t case \"register\":\n\t\t registerBL();\n\t\t break;\n\t\t \n\t\t case \"getUsername\":\n\t\t getUsernameBL();\n\t\t break; \n\t }\n }",
"protected function initializeAction() {}",
"protected function initializeAction() {}",
"protected function initializeAction() {}",
"function __construct()\n {\n parent::__construct();\n\n $this->load->model('user');\n \n }",
"function __construct(){\n \t$this->_ci =& get_instance();\n \t//Include the user_model so we can use it\n\t\t$this->_ci->load->model('Menu_model');\n }",
"function _construct() {\n \t\n\t\t\n\t}",
"public function __construct()\n {\n\t\t$this->user=User::find(Auth::id());\n\t\t$this->role_name=$this->user->role->name;\n\t\tif($this->role_name==\"Admin\" || $this->role_name==\"SubAdmin\")\n\t\t\t$this->entrypoints=Entrypoint::whereIn('type',[1,3])->get();\n\t\telseif($this->role_name==\"Receiption\" || $this->role_name==\"Entrypoint\" || $this->role_name==\"Desk\"){\n\t\t\t$this->entrypoints=$this->user->entrypoints()->get();\n\t\t\t$this->entrypoint_sub_type=$this->user->entrypoints()->first()->sub_type;\n\t\t}\n\t\telseif($this->role_name==\"Doctor\" || $this->role_name==\"Nursing\")\n\t\t\t$this->medicalunits=$this->user->medicalunits()->orderBy('type','asc')->get();\n \n }",
"function __construct(){\n\t\tparent::__construct('user');\n\t}",
"function User ( ){\n }",
"function run()\r\n {\r\n $type = Request :: get(self :: PARAM_TYPE);\r\n $identifiers = Request :: get(self :: PARAM_IDENTIFIER);\r\n\r\n $locations = array();\r\n\r\n switch($type)\r\n {\r\n \tcase RepositoryRights :: TYPE_CONTENT_OBJECT:\r\n \t\t$tree = RepositoryRights :: TREE_TYPE_CONTENT_OBJECT;\r\n \t\t$tree_identifier = 0;\r\n \t\tif(!$identifiers)\r\n \t\t{\r\n \t\t\t$locations[] = RepositoryRights :: get_content_objects_subtree_root();\r\n \t\t}\r\n \t\tbreak;\r\n \tcase RepositoryRights :: TYPE_EXTERNAL_INSTANCE:\r\n \t\t$tree = RepositoryRights :: TREE_TYPE_EXTERNAL_INSTANCE;\r\n \t\t$tree_identifier = 0;\r\n \t\tif(!$identifiers)\r\n \t\t{\r\n \t\t\t$locations[] = RepositoryRights :: get_external_instances_subtree_root();\r\n \t\t}\r\n \t\tbreak;\r\n \tdefault:\r\n \t\t$tree = RepositoryRights :: TREE_TYPE_USER;\r\n \t\t$tree_identifier = $this->get_user_id();\r\n \t\t if(!$identifiers)\r\n \t\t{\r\n \t\t\t$locations[] = RepositoryRights :: get_user_root($this->get_user_id());\r\n \t\t}\r\n \t\tbreak;\r\n }\r\n\r\n $this->tree = $tree;\r\n\r\n if ($identifiers && ! is_array($identifiers))\r\n {\r\n $identifiers = array($identifiers);\r\n }\r\n\r\n foreach ($identifiers as $identifier)\r\n {\r\n \t$locations[] = RepositoryRights :: get_location_by_identifier($type, $identifier, $tree_identifier, $tree);\r\n }\r\n\r\n if($type == RepositoryRights::TYPE_USER_CONTENT_OBJECT)\r\n $manager = RightsEditorManager :: factory($this->retrieve_content_object($identifier),$this, $locations);\r\n else\r\n $manager = RightsEditorManager :: factory(null, $this, $locations);\r\n //$manager = new RightsEditorManager($this, $locations);\r\n $manager->exclude_users(array($this->get_user_id()));\r\n $manager->run();\r\n }",
"public function __construct($args){\r\n\t\t\t$this->userName= $args[0];\r\n\t\t\t$this->password= $args[1];\r\n\t\t\t$this->level= $args[2];\r\n\t\t\t$this->name= $args[3];\r\n\t\t\t$this->lastName= $args[4];\r\n\t\t\t$this->email= $args[5];\r\n\t\t\t$this->image= $args[6];\r\n\t\t\t$this->active= $args[7];\r\n\t\t\t$this->idUser= $args[8];\r\n\t\t\t//Variable de conexión\r\n\t\t\t$this->con= new csConexion();\r\n\t\t}",
"public function __construct(){\n\t\tparent::__construct();\n\n\t\t$user = new \\models\\user;\n\n\t\tif(isset($_SESSION['eagleeyeuser_id'])){\n\t\t\t$this->data['auth'] = $user->find($_SESSION['eagleeye_user_id']);\n\t\t}\n\n\t\t// var_dump($this->data['auth'] );\n\n\t\t$complaint = new \\models\\complaint;\n\t\t$states = new \\models\\state;\n\n\t\t$this->data['states'] = $states->all();\n\n\t\t$this->data['autocomplete'] = $complaint->autocomplete_all();\n\n\t\t$this->language->load('welcome');\n\t}",
"function custom_construction() {\r\n\t\r\n\t\r\n\t}",
"public function __construct(){\n parent::__construct();\n permission();\n// Carregando modelo de Usuario\n$this->load->model('UsuarioModel');\n}",
"function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model('User_model');\n\t}",
"function initUser( &$user, $autocreate = false ) {\n $this->updateUser($user);\n }",
"public function __construct() {\n $this->load = new Load();\n $this->model = new Model();\n }",
"abstract public function user();",
"public static function instantiate(User $user);",
"public function loadInit() {}",
"function __construct()\r\n\t{\r\n\t\t$this->conexion=new Conect();\r\n\t\t$this->fun=new functions();\r\n\t}",
"function __construct(array $userActions) {\n $this->m_userActions = $userActions;\n }",
"public function __construct()\n\t{\n\t\t$this->sql_r = e107::getDb('sql_r');\n\t\t$this->isAdmin = FALSE;\n\n\t\t$this->fixed_classes = array(\n\t\t\t\t\t\t\te_UC_PUBLIC => UC_LAN_0,\n\t\t\t\t\t\t\te_UC_GUEST => UC_LAN_1,\n\t\t\t\t\t\t\te_UC_NOBODY => UC_LAN_2,\n\t\t\t\t\t\t\te_UC_MEMBER => UC_LAN_3,\n\t\t\t\t\t\t\te_UC_ADMIN => UC_LAN_5,\n\t\t\t\t\t\t\te_UC_MAINADMIN => UC_LAN_6,\n\t\t\t\t\t\t\te_UC_READONLY => UC_LAN_4,\n\t\t\t\t\t\t\te_UC_NEWUSER => UC_LAN_9,\n\t\t\t\t\t\t\te_UC_BOTS => UC_LAN_10\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\t\n\n\t\t$this->text_class_link = array('public' => e_UC_PUBLIC, 'guest' => e_UC_GUEST, 'nobody' => e_UC_NOBODY, 'member' => e_UC_MEMBER,\n\t\t\t\t\t\t\t\t\t'admin' => e_UC_ADMIN, 'main' => e_UC_MAINADMIN, 'new' => e_UC_NEWUSER, 'mods' => e_UC_MODS,\n\t\t\t\t\t\t\t\t\t'bots' => e_UC_BOTS, 'readonly' => e_UC_READONLY);\n\t\t\t\t\t\t\t\t\t\n\t\t\n\n\t\t$this->readTree(TRUE);\t\t\t// Initialise the classes on entry\n\t}",
"function __construct()\n {\n parent::__construct();\n $this->load->model('m_user');\n $this->load->model('m_user_group');\n $this->load->model('m_user_has_user_group');\n }",
"public function init()\n {\n $actionName = Yii::$app->controller->action->id;\n $function = new \\ReflectionClass($this->model->className());\n $modelName = $function->getShortName();\n $this->permissionSave = PermissionHelper::findPermissionModelAction($modelName, $actionName);\n\n parent::init();\n\n $this->initVariablesI18n();\n }",
"protected function loadObjects() { \n parent::loadObjects(); \n $factory = I2CE_FormFactory::instance();\n $user = null;\n $user_map = null;\n if ($this->isPost()) {\n if ($this->creatingNewUser()) {\n if (! ($user = $factory->createContainer( 'user')) instanceof I2CE_User_Form) {\n I2CE::raiseError(\"bad user form\");\n return false;\n }\n $user->load( $this->post );\n $user_map = $factory->createContainer( 'user_map');\n $user_map->load( $this->post );\n if ( !($username = $user->username) ) {\n I2CE::raiseError(\"bad user name\");\n return false;\n }\n $this->setEditing();\n if ( !$this->isSave(false) ) {\n $user->tryGeneratePassword();\n }\n $this->getPrimary()->username = array('user' , $username);\n }\n } else {\n $this->parent = $this->getParent();\n $user = $factory->createContainer( \"user\".'|0');\n if (( ($personObj = $this->getParent()) instanceof iHRIS_Person) && ($personObj->surname)) {\n $username = $this->generateUserName($personObj);\n $accessMech = I2CE::getUserAccess();\n $details = $accessMech->getAllowedDetails();\n $user->username = $username;\n if (in_array('lastname',$details)) {\n $user->lastname = $personObj->surname;\n }\n $role = false;\n if (I2CE::getConfig()->setIfIsSet($role,\"/modules/SelfService/default_user_role\") && I2CE_MagicDataNode::checkKey($role) && I2CE::getConfig()->is_parent(\"/I2CE/formsData/forms/role/$role\")) {\n $user->getField('role')->setFromDB('role|' . $role);\n }\n foreach($details as $detail) {\n if ($personObj->hasField($detail)) {\n $user->getField($detail)->setFromDB( $personObj->getField($detail)->getDBValue());\n }\n }\n if (I2CE_ModuleFactory::instance()->isEnabled('PersonContact')) {\n $contact_form = false;\n if (I2CE::getConfig()->setIfIsSet($contact_form,\"/modules/SelfService/default_user_contact_form\") && $contact_form) {\n $personObj->populateChildren($contact_form);\n foreach ($personObj->getChildren($contact_form) as $contactObj) {\n foreach($details as $detail) {\n if ($contactObj->hasField($detail)) {\n $user->getField($detail)->setFromDB( $contactObj->getField($detail)->getDBValue());\n }\n } \n break;\n }\n }\n }\n }\n }\n if ($user instanceof I2CE_User_Form) {\n $this->userObj = $user;\n $this->userMapObj = $user_map;\n $this->setObject( $user, I2CE_PageForm::EDIT_SECONDARY, 'user_fields');\n } \n return true;\n }",
"public function __construct(){\n\t\t// add_action('wp_ajax_nopriv_save_trans_row', array($this,'save_trans_row') );\n\t\tadd_action('admin_menu', array($this, 'manage_contragents') );\n\t\tif( isset($_POST['action_agent']) && !empty($_POST['action_agent'])) {\n\t\t\t\t$action_agent = $_POST['action_agent'].\"_agent\";\n\t\t\t\t$this->$action_agent(); \n\t\t\t\t// echo \"<pre>\";\n\t\t\t\t// \tprint_r( $_POST );\n\t\t\t\t// echo \"</pre>\";\n\t\t\t\t// die();\n\t\t}\n\t}",
"function __construct()\n {\n parent::__construct();\n\n if($this->value('action'))\n {\n\n /*\n\n This block of statement(s) are to handle all the actions supported by this Login class\n\n that is it could be the case that more then one action are handled by login\n\n for example at first the action is \"login\" then after submit say action is submit\n\n so if login is explicitly called we have the login action set (which is also our default action)\n\n else whatever action is it is set in $str.\n\n */\n\n $actionstr = $this->value('action');\n }\n else\n {\n\n $actionstr = \"notepad\"; //default if no action is specified\n }\n\n $this->action = $actionstr;\n\n if($this->get_checkLogin($this->action) == \"true\")\n {\n\n if(isset($_SESSION['username']) && isset($_SESSION['password']))\n {\n\n if(!$this->chk_login($_SESSION['username'], $_SESSION['password']))\n {\n\n header(\"location:index.php\");\n }\n }\n else\n {\n\n header(\"location:index.php\");\n }\n }\n\n if($this->userAccess($actionstr))\n {\n $actionstr = $actionstr . \"()\";\n eval(\"\\$this->$actionstr;\");\n }\n else\n {\n $this->output = $this->config['error_message'];\n }\n\n $this->display();\n }",
"function user_user_construct_($user){\n\t\t$CI =& get_instance();\n\t\t//if($user->is_logged() && $user->get()->avatar == '') $user->update('avatar',$CI->gears->user->avatar->default);\n\t}",
"public function __construct()\n\t{\n\t\tforeach(Config::item('core.preload') as $type => $load)\n\t\t{\n\t\t\tif ($load == FALSE) continue;\n\n\t\t\tforeach(explode(',', $load) as $name)\n\t\t\t{\n\t\t\t\tif (($name = trim($name)) == FALSE) continue;\n\n\t\t\t\tswitch($type)\n\t\t\t\t{\n\t\t\t\t\tcase 'libraries':\n\t\t\t\t\t\tif ($name == 'database')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->database();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->library($name);\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'models':\n\t\t\t\t\t\t$this->model($name);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"function __construct()\n {\n // Establecer zona horaria Colombia\n date_default_timezone_set('America/Bogota');\n\n // Se comprueba si se paso por metodo get una accion en concreto o sino se le asigna \"todos\"\n $action = ( isset($_GET[\"action\"]) ? $_GET[\"action\"] : \"todos\");\n\n // Comprueba si el metodo ingresado por el metodo get existe en la clase\n if (method_exists($this, $action)) {\n\n // Si existe el metodo procede a ejectutarlo\n $this->$action();\n } else {\n\n // Si no existe ejecutara la funcion error\n $this->error($action);\n }\n }",
"public function __construct(UserAction $model)\n {\n $this->model = $model;\n }",
"public function initializeAction() {\n\n\t}",
"function __construct() ;",
"public function init(){\r\n\t\t$this->_data = $this->_request->getParams();\r\n $controller = $this->_data['controller']; //Get controller\r\n $action = $this->_data['action']; //Get action\r\n \r\n $loadfunction = new Default_Model_Common();\r\n foreach($loadfunction->loadFunction($controller) as $value){\r\n if($action == $value['action']){\r\n $load = new $value['model_load']();\r\n $this->view->$value['varname'] = $load->$value['function_load']();\r\n }\r\n }\r\n\r\n $this->view->lang = Zend_Registry::get(\"lang\"); //load language\r\n \r\n //List menu\r\n $listmenu = Zend_Registry::get(\"listmenu\");\r\n $this->view->listmenu = $listmenu;\r\n \r\n $this->view->selectaccount = ' class=\"selected\"';\r\n }",
"public function __construct(){\n\t\t\tglobal $db_user;\n\t\t\tparent::__construct($db_user['module']);\n\t\t\t\n\t\t}",
"public function initUser( &$user, $autocreate=false ) {\n $user->mRealName = $this->ext_user['user_name'];\n $user->mEmail = $this->ext_user['user_mail'];\n }",
"public function __construct(){\n\t\tparent::__construct();\n $this->load->model('user_m');\n\t}",
"public function __construct()\n {\n $this->userobj = new User();\n }",
"public function init() {\n\t\tparent::init();\n\t\t$this->addToTitle(\"User\");\n\t}",
"function __construct()\n {\n $arr = $this->UrlProcess();\n\n //handling controller\n //check controller exists\n if(file_exists(\"./mvc/controllers/\".$arr[0].\".php\")){\n $this->controller = $arr[0];\n unset($arr[0]);\n }\n require_once \"./mvc/controllers/\". $this->controller.\".php\";\n $this->controller = new $this->controller;\n //handling acction\n //check if arr[1] exists\n if(isset($arr[1])){\n //method_exists(class, a method check)\n if( method_exists($this->controller, $arr[1])){\n $this->acction = $arr[1]; \n }\n unset($arr[1]);\n }\n //handding params\n $this->params = $arr?array_values($arr):[];\n\n call_user_func_array([$this->controller, $this->acction], $this->params);\n }",
"public function __construct()\n {\n parent::__construct();\n //自动加载相对应的数据模型\n if ($this->auto_load_model) {\n $model_name = $this->model_name ? $this->model_name . '_model' : $this->router->fetch_class() . '_model';\n $this->load->model($model_name, 'model');\n }\n $this->_set_user();\n $this->_check_resource();\n }",
"private function _initUser()\n {\n $this->username = Request::varchar('f_username', true);\n $this->password = Request::varchar('f_password');\n $this->name = Request::varchar('f_name', true);\n $this->email = Request::email();\n }",
"public function __construct($data = array()) {\n if($data) return parent::__construct($data);\n\n $root = kirby::instance()->roots()->accounts();\n\n foreach(dir::read($root) as $file) {\n\n // skip invalid account files\n if(f::extension($file) != 'php') continue;\n\n $user = new User(f::name($file));\n $this->append($user->username(), $user);\n\n }\n\n }"
] | [
"0.5636954",
"0.55494684",
"0.5490253",
"0.54815555",
"0.5401781",
"0.5395869",
"0.53925383",
"0.53900063",
"0.5333937",
"0.53282505",
"0.5321683",
"0.5299704",
"0.5282949",
"0.52812797",
"0.52801013",
"0.5276443",
"0.5247643",
"0.5246771",
"0.5240767",
"0.5230425",
"0.5222365",
"0.520054",
"0.5172276",
"0.51714414",
"0.5167358",
"0.51593757",
"0.51593757",
"0.51363105",
"0.51350284",
"0.5133692",
"0.51313853",
"0.5130159",
"0.5121185",
"0.51023936",
"0.50966966",
"0.50950176",
"0.5093215",
"0.5091875",
"0.5091875",
"0.5091875",
"0.5091875",
"0.5091875",
"0.5080536",
"0.50796914",
"0.50732684",
"0.50680804",
"0.506315",
"0.5058374",
"0.505776",
"0.50482327",
"0.5044843",
"0.5041247",
"0.50359726",
"0.50359195",
"0.50340873",
"0.50290906",
"0.5022464",
"0.5019492",
"0.50188756",
"0.50188756",
"0.50154436",
"0.50141865",
"0.5013991",
"0.5013513",
"0.500738",
"0.50043064",
"0.49890682",
"0.49861056",
"0.49827722",
"0.49809238",
"0.4972585",
"0.49713293",
"0.4969387",
"0.49649802",
"0.49628282",
"0.49612132",
"0.49591655",
"0.4958978",
"0.49586186",
"0.49568638",
"0.49459767",
"0.49453864",
"0.49448243",
"0.49440992",
"0.49433485",
"0.49357072",
"0.49324444",
"0.49308228",
"0.49298808",
"0.4928337",
"0.49271137",
"0.49211916",
"0.49193892",
"0.4917484",
"0.4908495",
"0.49081704",
"0.49065277",
"0.49054027",
"0.49039155",
"0.49018198",
"0.4899217"
] | 0.0 | -1 |
Go to browse page. | public function index()
{
$this->doc->setMainMenu();
$projects = $this->doc->getLimitLibs('project', '9');
$customLibs = $this->doc->getLimitLibs('custom', '9');
$subLibs = $this->doc->getSubLibGroups(array_keys($projects));
$this->view->title = $this->lang->doc->common . $this->lang->colon . $this->lang->doc->index;
$this->view->projects = $projects;
$this->view->customLibs = $customLibs;
$this->view->subLibs = $subLibs;
$this->display();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function index()\n {\n $this->locate(inlink('browse'));\n }",
"public function index()\n {\n $this->locate(inlink('browse'));\n }",
"public function index()\n { \n $this->locate(inlink('browse'));\n }",
"public function browse() {\n\n\t}",
"public function browse() {\n\n \n $data['view_name'] = \"filebrowse\";\n\n $this->load->view(\"admin/common/template\", $data);\n }",
"public function browseAction() {\r\n\r\n //GET PAGE OBJECT\r\n $pageTable = Engine_Api::_()->getDbtable('pages', 'core');\r\n $pageSelect = $pageTable->select()->where('name = ?', \"sitestoreproduct_wishlist_browse\");\r\n $pageObject = $pageTable->fetchRow($pageSelect);\r\n\r\n //GET SEARCH TEXT\r\n if ($this->_getParam('search', null)) {\r\n $metaParams['search'] = $this->_getParam('search', null);\r\n\r\n //SET META KEYWORDS\r\n Engine_Api::_()->sitestoreproduct()->setMetaKeywords($metaParams);\r\n }\r\n\r\n if(Engine_API::_()->seaocore()->checkSitemobileMode('fullsite-mode')) {\r\n $this->_helper->content\r\n ->setContentName($pageObject->page_id)\r\n ->setNoRender()\r\n ->setEnabled();\r\n }else{\r\n $this->_helper->content\r\n ->setNoRender()\r\n ->setEnabled();\r\n } \r\n }",
"public function indexAction()\n {\n $this->_forward($this->_getBrowseAction());\n }",
"public function browseAction()\n {\n $range = (int) $this->_getParam($this->_rangeParam, $this->_defaultPageRange);\n $page = (int) $this->_getParam($this->_pageParam, $this->_defaultPageNumber);\n\n $paginator = Zend_Paginator::factory($this->_getBrowseQuery());\n\n if ($range > 0) {\n $paginator->setPageRange($range);\n }\n\n if ($page > 0) {\n $paginator->setCurrentPageNumber($page);\n }\n\n $this->view->paginator = $paginator;\n }",
"function _browse()\n\t{\n\t\tif ($this->_access === 'BAAK')\n\t\t{\n\t\t\treturn $this->MatakuliahModel->browse();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tredirect(base_url('/auth/logout'));\n\t\t}\n\t}",
"public function goToPage($page)\n { $this->visit($page);\n $this->loadPage($page);\n }",
"public function enterBrowsePage($fromURL=false){\r\n if ($fromURL){\r\n $this->get($this->url . 'browse');\r\n } else {\r\n $browseButton = $this->wd->findElement(WebDriverBy::id('browse'));\r\n $this->wd->getMouse()->mouseMove($browseButton->getCoordinates());\r\n $browseButton->click();\r\n\r\n $browseContainer = $this->wd->findElement(WebDriverBy::id('browseContainer'));\r\n $categories = $this->wd->findElement(WebDriverBy::partialLinktext('By Category'));\r\n $groupOptions = $this->wd->findElement(WebDriverBy::id('broadCategoryOptions'));\r\n }\r\n }",
"public function actionDefault() \r\n {\r\n if ($this->user->isLoggedIn())\r\n $this->redirect('Browse:');\r\n }",
"public function browse()\n {\n return view('app.rjo.browse');\n }",
"function browse()\n {\n $sort = $this->GET('sort');\n if ($sort)\n $this->table->sort($sort . \" SORT_NULL\");\n $rows = (int) $this->GET('rows');\n if (empty($rows) || $rows < 1)\n $rows = 50;\n\n if ($this->table->count() > $rows) {\n $id = $this->GET('id');\n if (empty($id))\n $id = $this->table->first();\n $this->table->limit($rows, $id);\n\n $form = '<form action=\"' . $this->SELF . '\" method=\"get\"><p>';\n $aHref = '<a href=\"' . $this->SELF . '?method=browse&table=' . $this->table->tablename() . '&sort=' . urlencode($sort) . '&rows=' . $rows . '&id=';\n $first = $this->table->first();\n $prev = $this->table->prev($id, $rows);\n $next = $this->table->next($id, $rows);\n $last = $this->table->prev($this->table->last(), ($this->table->count() - 1) % $rows);\n if (strcmp($first, $id) == 0)\n $form .= '<< First | ';\n else\n $form .= $aHref . urlencode($first) . '\"><< First</a> | ';\n if ($prev === false)\n $form .= '< Previous | ';\n else\n $form .= $aHref . urlencode($prev) . '\">< Previous</a> | ';\n $form .= '<input name=\"method\" type=\"hidden\" value=\"browse\">';\n $form .= '<input name=\"table\" type=\"hidden\" value=\"' . $this->table->tablename() . '\">';\n $form .= '<input name=\"sort\" type=\"hidden\" value=\"' . htmlspecialchars($sort) . '\">';\n $form .= '<input type=\"submit\" value=\"Show\"> ';\n $form .= '<input name=\"rows\" size=\"4\" type=\"text\" value=\"' . $rows . '\"> rows starting from <span class=\"primary\" title=\"Row identifier\">id</span> ';\n $form .= '<input name=\"id\" size=\"12\" type=\"text\" value=\"' . htmlspecialchars($id) . '\"> | ';\n if ($next === false)\n $form .= 'Next > | ';\n else\n $form .= $aHref . urlencode($next) . '\">Next ></a> | ';\n if (strcmp($last, $id) == 0)\n $form .= 'Last >>';\n else\n $form .= $aHref . urlencode($last) . '\">Last >></a>';\n $form .= '</p></form>';\n }\n\n $this->displayHead();\n if (! empty($form))\n echo $form;\n\n echo '<table>';\n echo '<tr><th colspan=\"2\"></th>';\n foreach ($this->table->fields as $i => $field) {\n $field = $this->htmlQuote($field);\n echo '<th><a href=\"' . $this->SELF;\n echo '?method=browse&table=' . $this->table->tablename() . '&sort=' . urlencode($field);\n if ($sort == $field)\n echo urlencode(' DESC');\n echo '&rows=' . urlencode($rows);\n echo '\" title=\"Order\"';\n if (! $i)\n echo ' class=\"primary\"';\n echo '>' . $field . '</a>';\n if (strcmp($sort, $field) == 0)\n echo '+';\n elseif (substr($sort, 0, - 5) == $field)\n echo '-';\n echo '</th>';\n }\n echo '</tr>';\n\n while ($row = $this->table->each()) {\n echo '<tr><td>';\n if ($this->priv & PRIV_UPDATE)\n echo '<a href=\"' . $this->SELF . '?method=change&table=' . $this->table->tablename() . '&id=' . urlencode($row['id']) . '\">Edit</a>';\n echo '</td><td>';\n if ($this->priv & PRIV_DELETE)\n echo '<a class=\"danger\" href=\"' . $this->SELF . '?method=delete&table=' . $this->table->tablename() . '&id=' . urlencode($row['id']) . '\">Delete</a>';\n echo '</td>';\n foreach ($this->table->fields as $field) {\n if (! isset($row[$field]))\n $row[$field] = \"\";\n switch ($this->types[$field]) {\n case \"bool\":\n echo '<td align=\"center\">' . ($row[$field] ? '×' : '') . '</td>';\n break;\n case \"int\":\n case \"float\":\n echo '<td align=\"right\">' . $row[$field] . '</td>';\n break;\n case \"blob\":\n echo '<td><a href=\"' . $this->SELF;\n echo '?method=download&table=' . $this->table->tablename();\n echo '&id=' . urlencode($row['id']) . '&field=' . $field . '\"';\n echo ' class=\"download\" title=\"Download binary file\">';\n echo $this->htmlQuote($row[$field]) . '</a></td>';\n break;\n default:\n echo '<td>' . $this->htmlQuote($row[$field]) . '</td>';\n }\n }\n echo '</tr>';\n }\n echo '</table>';\n\n if (! empty($form))\n echo $form;\n if ($this->priv & PRIV_INSERT)\n echo '<p><a href=\"' . $this->SELF . '?method=change&table=' . $this->table->tablename() . '\">Insert new row</a></p>';\n }",
"function goToPage($page) {\n\t\t$this->link->setPage($page);\n\t\tResponse::sendRedirect($this->link->toString());\n\t}",
"public function browse_files_page(){\r\n\t\tglobal $wpdb;\r\n\r\n\r\n\t\t$files_table = $this->files_table;\r\n\r\n\t\tif(isset($_GET['action']) && $_GET['action'] == 'edit'){\r\n\t\t\t$nonce = esc_attr( $_REQUEST['_editnonce'] );\r\n\t\t \tif ( ! wp_verify_nonce( $nonce, 'edit_file' )) {\r\n\t\t \tdie( 'Error' );\r\n\t\t \t// echo $_GET['action'];\r\n\t\t }else{\r\n\t \t\t$data = $this->MD_Model->get_file($_GET['id']);\r\n\t \t\t$slug = get_post_field( 'post_name', $_GET['post'] );\r\n\r\n\t \t\tif(isset($_POST['submit'])){\r\n\t \t\t\t$data = $this->edit_file();\r\n\t \t\t}\r\n\r\n\t \t\t$dl_path = wp_upload_dir()['basedir'].'/downloads/reports/'.$slug.'/'.$data['filename']; \r\n\t\t $dl_path = base64_encode($dl_path);\r\n\r\n\t\t \tinclude($this->admin_url . 'view/market-reports-edit-file.php');\r\n\t\t }\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tinclude($this->admin_url . 'view/market-reports-browse-files.php');\t\r\n\t\t}\r\n\r\n\t\t\r\n\t}",
"function _showFileBrowser() {\r\n global $_ARRAYLANG;\r\n\r\n $this->_objTpl->loadTemplateFile('module_fileBrowser_frame.html');\r\n\r\n switch($this->_mediaType) {\r\n case 'webpages':\r\n $strWebPath = 'Webpages (DB)';\r\n break;\r\n default:\r\n if (array_key_exists($this->_mediaType, $this->mediaTypePaths)) {\r\n $strWebPath = $this->mediaTypePaths[$this->_mediaType][1].$this->_path;\r\n } else {\r\n $strWebPath = ASCMS_CONTENT_IMAGE_WEB_PATH.$this->_path;\r\n }\r\n }\r\n\r\n $this->_objTpl->setVariable(array(\r\n 'CONTREXX_CHARSET' => CONTREXX_CHARSET,\r\n 'FILEBROWSER_WEB_PATH' => $strWebPath,\r\n 'TXT_CLOSE' => $_ARRAYLANG['TXT_CLOSE']\r\n ));\r\n\r\n $this->_setNavigation();\r\n $this->_setUploadForm();\r\n $this->_setContent();\r\n $this->_showStatus();\r\n $this->_objTpl->show();\r\n }",
"public function index()\n {\n return view('browse::index');\n }",
"public function login_page_working()\n {\n $this->browse(function ($browser) {\n $browser->visit(new Login);\n });\n }",
"public function getPageOpen() {}",
"public function gotoSource(){\n if(!empty($this->website)){\n header(\"Location: \". $this->website);\n }\n else{\n header(\"Location: \". $this->getUri());\n }\n die();\n }",
"protected function redirectToCurrentPage() {}",
"protected function goHomePage()\n {\n $this->_redirect($this->homeURL);\n }",
"private function indexAction()\n {\n $page = isset($_GET['page']) ? substr($_GET['page'],0,-1) : \"home\" ;\n $this->reg->pages->getPageContent(strtolower($page));\n }",
"function html_browse($proj, $repos) {\n\n if (isset($_GET['b'])) {\n html_blob($proj, $_GET['b'], $repos);\n } else {\n // Get the tree, otherwise default to HEAD\n if (isset($_GET['t'])) {\n $tree = $_GET['t'];\n } else {\n $tree = \"HEAD\";\n }\n html_tree($proj, $tree, $repos);\n }\n}",
"public function goHome()\n {\n $this->redirect(url($this->getHomeUrl()));\n }",
"public function actionBrowse()\n\t{\n\t\t$categoriesModel = new Category;\n\t\t$categoriesData = $categoriesModel->getCategoryBrowseTree();\n\t\t$data['categoriesData'] = $categoriesData;\n\t\t$this->page = 'BrowseCategories';\n if (!Yii::app()->user->isGuest) {\n\t\t $avatar = $this->user['avatar']; \n\t\t $this->layoutParams['avatarUrl'] = getProfileImageUrl($avatar, \"sqr\", Yii::app()->user->getName());\n \t\t$this->layoutParams['author'] = Yii::app()->user->name;\n\t\t $this->layoutParams['profileUrl'] = Yii::app()->request->getBaseUrl() . \"/\" . Yii::app()->user->username . \"/profile\";\n }\n\t\t$this->render('clap/browse',$data);\n\t}",
"public function invoke()\r\n\t{\r\n\t\tif(isset($_GET['page']))\r\n\t\t{\r\n\t\t\t$pageName = $_GET['page'];\r\n\t\t\t$this->loadPage($pageName);\r\n\t\t}\r\n\t\telseif(!isset($_GET['page']))\r\n\t\t{\r\n\t\t\t$this->loadPage('home');\r\n\t\t}\r\n\t}",
"public function fileBrowser() {\r\n\t\t$document = JFactory::getDocument();\r\n\r\n\t\t$viewType\t= $document->getType();\r\n\t\t$viewName\t= JRequest::getCmd( 'view', $this->getName() );\r\n\t\t$viewLayout\t= JRequest::getCmd( 'layout', 'fileBrowser' );\r\n\r\n\t\t$this->view = $this->getView(\"languages\");\r\n\r\n\t\t// Set the layout\r\n\t\t$this->view->setLayout($viewLayout);\r\n\r\n\t\t$this->view->filebrowser();\r\n\t}",
"public static function goToHome(){\n $protocol = stripos($_SERVER['SERVER_PROTOCOL'],'https') === true ? 'https://' : 'http://';\n $host = $_SERVER['HTTP_HOST'];\n $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\\\');\n header(\"Location: $protocol$host$uri\");\n \n die();\n }",
"protected function decksSelectPage()\n {\n $request = $this->request();\n\n $this->result()\n ->changeRequest('decks_current_page', $request['decks_select_page'])\n ->setCurrent('Decks_shared');\n }",
"function clickGo()\n\t{\n\t\tif ($this->isElementPresent(\"filter-go\"))\n\t\t{\n\t\t\t$this->click(\"filter-go\");\n\t\t}\n\t}",
"public function browseAction(){\n\n\t\t$modelStatic = new Application_Model_Static();\n\n\t\t$images = $modelStatic->getMedia();\n \n\t\t$this->view->images = $images;\n \t\t\n\t\t$this->_helper->layout->setLayout('media');\n\t\t//$this->_helper->layout->disableLayout(0);\n\t\t$this->_helper->viewRenderer->setNoRender(true);\n\t\t\n \t}",
"public function goToBrewBloggerPage($page)\n {\n if ($page == 'login') {\n $this->getSession()->visit($this->locatePath(\"/user/login\"));\n }\n else {\n $this->getSession()->visit($this->locatePath(\"index.php?page=\" . $page));\n }\n }",
"function gotoStartPageObject()\n\t{\n\t\tglobal $ilCtrl;\n\t\t\n\t\tilUtil::redirect(ilObjWikiGUI::getGotoLink($this->object->getRefId()));\n\t}",
"function browse()\n\t{\n\t\t// Get the proper views and models\n\t\t$view\t \t=& CFactory::getView('apps');\n\t\t$appsModel\t=& CFactory::getModel('apps');\n\t\t$my\t\t\t= CFactory::getUser();\n\t\t$data\t\t= new stdClass();\n\t\t\n\t\t// Check permissions\n\t\tif($my->id == 0)\n\t\t{\n\t\t\treturn $this->blockUnregister();\n\t\t}\n\t\t\n\t\t// Get the application listing\n\t\t$apps\t\t= $appsModel->getAvailableApps();\n\n\t\tfor( $i = 0; $i < count( $apps ); $i++ )\n\t\t{\n\t\t\t$app\t\t=& $apps[$i];\n\t\t\t$app->title = $app->title;\n\t\t\t$app->added\t= $appsModel->isAppUsed( $my->id , $app->name ) ? true : false;\n\t\t}\n\n\t\t$data->applications\t= $apps;\n\t\t$data->pagination\t=& $appsModel->getPagination();\n\t\t\n\t\techo $view->get( __FUNCTION__ , $data );\n\t}",
"protected function actionBrowse(&$conditions)\n {\n // If no browse template defined, simply does nothing (without errors)\n if (empty($this->browse_template)) {\n return true;\n }\n\n $this->_pager_conditions =& $conditions;\n $this->appendToPage($this->browse_template);\n return true;\n }",
"function browser()\n\t{\n\t\tglobal $template, $Sajax, $basic_gui, $mod_loader;\n\t\t\n\t\t// basic thingies for the template\n\t\t$template->assign_block_vars( 'browser', '', array(\n\t\t\t'L_TITLE' => $this->lang[ 'Browser_title' ],\n\t\t\t'L_EXPLAIN' => $this->lang[ 'Browser_explain' ],\n\t\t) );\n\t\t$template->assign_switch( 'browser', TRUE );\n\t\t\n\t\t// get the browser\n\t\t$mods = $mod_loader->getmodule( 'filebrowser', MOD_FETCH_NAME, NOT_ESSENTIAL );\n// \t\t$mod_loader->port_vars( array( 'name' => 'editor1', 'quickpost' => FALSE, 'def_text' => stripslashes( $content ) ) );\n\t\t$mod_loader->execute_modules( 0, 'filebrowser' );\n// \t\t$browser = $mod_loader->get_vars( array( 'bla' ) );\n\t\t\n// \t\tprint_R( $browser );\n\t\t\n\t\t// the sajax stuff\n// \t\t$GLOBALS[ 'acp_advance' ] = &$this;\n// // \t\tprint_R( $GLOBALS );die();\n// \t\t$Sajax->add2export( 'ACP_advance->get_tree', '$folder' );\n// \t\t\n// \t\t// the JS\n// \t\t$basic_gui->add_JS( 'includes/ACP/browser.js' );\n\t}",
"function index() {\r\n \t\r\n // The default action is the showall action\r\n $this->browse();\r\n }",
"function browser( $fileName = false )\r\n\t{\r\n\t //echo SERVICE_BROWSER_PATH;\r\n\t\tif( Configure::read() == 0 )\r\n\t\t{\r\n\t\t\t$this->cakeError('error404');\r\n\t\t}\r\n\r\n\t\tif( $fileName == \"index\" )\r\n\t\t{\r\n\t\t\t$this->autoRender = true;\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->autoRender = true;\r\n\t\t\t$this->view = 'Media';\r\n\r\n\t\t\t$fileName = $this->_checkFile( $fileName );\r\n\r\n\t\t\tif( $fileName === false )\r\n\t\t\t{\r\n\t\t\t\t$this->cakeError('error404');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$params = array(\r\n\t\t\t\t'id' => $fileName,\r\n\t\t\t\t'name' => pathinfo ( $fileName, PATHINFO_FILENAME ),\r\n\t\t\t\t'download' => false,\r\n\t\t\t\t'extension' => pathinfo( $fileName, PATHINFO_EXTENSION ),\r\n\t\t\t\t'path' => SERVICE_BROWSER_PATH\r\n\t\t \t);\r\n\t \t\r\n\t\t \t$this->set($params);\t\t\t\r\n\t\t}\r\n\t}",
"protected function gotoHome()\n {\n redirect($this->homePath);\n }",
"function _browse()\n\t{\n\t\tif ($this->_access === 'Mahasiswa')\n\t\t{\n\t\t\treturn $this->khsModel->selfData($this->session->username);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tredirect(base_url('/auth/logout'));\n\t\t}\n\t\t\n\t}",
"public function actionBrowse()\n\t{\n\t\t// the browse view requires information on the basket contents\n\t\t$testBasket = Yii::app()->user->getState('basketContents');\n\t\tif(!isset($testBasket))\n\t\t{\n\t\t\tYii::app()->user->setState('basketContents',array());\n\t\t}\n\t\t\n\t\t// the user can't access ?r=image/browse without the offset value set\n\t\tif(!isset($_GET['browseOffset']))\n\t\t\t$this->redirect(array('search'));\n\t\t\t\n\t\t$currentlyviewedrow = $_GET['browseOffset'];\n\t\t\n\t\t// if someone tries to manually enter an invalid number, negative, it's set to 0\n\t\tif($currentlyviewedrow<0) $currentlyviewedrow = 0;\n\t\t\n\t\t// next and prev variables set.\n\t\t$next = $currentlyviewedrow + 1;\n\t\t$prev = $currentlyviewedrow - 1;\n\t\t\n\t\t$rollCriteria = Yii::app()->user->getState('imagesearchcriteria');\t\t\n\t\t\n\t\t$rollCriteria->offset = $currentlyviewedrow - 4;\n\n\t\tif($currentlyviewedrow<5)\n\t\t{\n\t\t\t$rollCriteria->limit = $currentlyviewedrow + 5;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$rollCriteria->limit = 9;\n\t\t}\n\t\t\n\t\t$rollDataProvider = new CActiveDataProvider('Image',array(\n\t\t\t'criteria'=>$rollCriteria,\n\t\t\t'Pagination'=>false,\n\t\t));\n\n\t\t$totalAmount = $rollDataProvider->getTotalItemCount();\n\t\t\n\t\t$this->render('browse',\n\t\t\tarray(\n\t\t\t\t'rollDataProvider'=>$rollDataProvider,\n\t\t\t\t'browseOffset'=>$currentlyviewedrow,\n\t\t\t\t'next'=>$next,\n\t\t\t\t'prev'=>$prev,\n\t\t\t\t'totalAmount'=>$totalAmount,\n\t\t\t)\n\t\t);\n\t\t\n\t}",
"function forwardToPage($page) {\n\t\techo \"<script language=\\\"javascript\\\" type=\\\"text/javascript\\\">\n\t\t\tdocument.location.href = \\\"\".$page.\"\\\"</script>\";\n\t}",
"function browse() {\r\n \t$this->user_group_model->can_access(VIEW_LIST_MENU, null, null);\r\n $start = $this->uri->segment(3,0);\r\n $limit_per_page = 20;\r\n// $menuId = $this->uri->segment(3,0);\r\n\t\r\n $this->load->model('menu_model'); // Instantiate the model\r\n \r\n\t\t//list all menuergories\r\n\t\t$aryNewsTypesList = array();\r\n\t\t$this->menu_model->getMenuegoryTree($aryNewsTypesList);\r\n\t\t$the_results['aryNewsTypesList'] = $aryNewsTypesList;\r\n \r\n $this->load->library('pagination');\r\n $this->load->helper('url');\r\n\r\n $config['total_rows'] = $this->menu_model->table_record_count;\r\n $config['per_page'] = $limit_per_page;\r\n $config['uri_segment'] = 4;\r\n $config['num_links'] = 3;\r\n $config['base_url'] = base_url().'menu/browse/';\r\n\r\n $this->pagination->initialize($config);\r\n\r\n $the_results['page_links'] = $this->pagination->create_links();\r\n $the_results['title'] = 'Danh sách tin';\r\n \t\t\r\n $this->_display('/menu/menu_grid', $the_results);\r\n }",
"public function add_browse_files_page() {\r\n\t $hook = add_submenu_page( \r\n\t // 'edit.php?post_type=market-reports', //or 'options.php'\r\n\t null,\r\n\t 'Browse Files',\r\n\t 'Browse Files',\r\n\t 'publish_market_reports',\r\n\t 'browse-files',\r\n \tarray($this,'browse_files_page')\r\n\t );\r\n\r\n\t if(isset($_GET['page']) && $_GET['page'] == 'browse-files'){\r\n\t\t add_action( \"load-$hook\", array($this, 'screen_option') );\r\n\t\t}\r\n\r\n\t}",
"public function default($name_of_page,$action){\r\n\r\n self::get_view($name_of_page,$action);// this function (get_view) talk this parameter and using it to call it in the browser to get main_view page\r\n }",
"public function testExample()\n {\n $this->browse(function ($browser) {\n $browser->clickLink('Homes');\n });\n }",
"public function goToIndex()\n\t{\n\t\theader('Location:'.$this->getDomainName().'sChat/index.php');\n\t}",
"function JumpToPage($pagefile, $args = null)\n{\n global $config;\n $path = $config[\"BaseUrl\"] . $pagefile;\n if(isset($args))\n {\n $first = true;\n foreach($args as $key => $value)\n {\n if($first) { $path = $path . '?'; $first = false; }\n else {$path = $path. '&'; }\n $path = $path . $key . \"=\" . $value;\n }\n }\n \n header(\"Location: \" . $path);\n exit;\n}",
"function open() {\n\t\t//recuperation de la page demande\n\t\tif (!empty($this->client_path_info)) {\n\t\t\t$actions=$this->compile_url($this->client_path_info);\n\t\t\tif (sizeof($actions)==0) { // page par defaut du site\n\t\t\t\t//a remplacer par l'index utilisateur\n\t\t\t\t//BASE_URL\n\t\t\t\t$base_url=CFG::get(\"BASE_URL\",\"Context\");\n\t\t\t\t$url=$base_url.MAIN.\".\".INDEX;\n\t\t\t\t//echo $url;\n\t\t\t\tURL::redirect($url);\n\t\t\t\texit;\n\t\t\t\t\n\t\t\t}\n\t\t\t$this->actions=$actions;\n\t\t} else { //page par defaut du site\n\t\t\t//a remplacer par l'index utilisateur\n\t\t\t$base_url=CFG::get(\"BASE_URL\",\"Context\");\n\t\t\t$url=$base_url.MAIN.\".\".INDEX;\n\t\t\t//echo $url;\n\t\t\tURL::redirect($url);\n\t\t\texit;\n\t\t\t\t\n\t\t}\n\n\t\tif ($this->validate()) {\n\t\t//if (Bleetz::config[\"Auth\"]===true) {//TODO\n\t\t\tif (true) {\n\n\t\t\tUS::checkpoint();\n\n\t\t\tif (!$this->authorize()) {\n\t\t\t\t//perform login\n\t\t\t\t//redirect to login page...\n\t\t\t\t//US::login...\n\t\t\t\t//URL::login...\n\t\t\t\theader('HTTP/1.1 401 Unauthorized');\n\t\t\t\t//ou page de demande de connection ou retour\n\t\t\t\t// exemple : vous n'avez pas accs la page demande\n\t\t\t\t// connectez vous....\n\t\t\t\tURL::redirect(\"admin.login\");\n\t\t\t\texit;\n\t\t\t};\n\n\t\t\t}\n\t\t} else {\n\t\t\t$this->actions=array();\n\t\t\t//par la suite\n\t\t\t//BZ::E404\n\t\t\tif (!CT::validate_action(E404)) {\n\t\t\t\tER::Report();\n\t\t\t\texit;\n\t\t\t}\n\t\t\t$ar=explode('.',E404);\n\t\t\t$controller=$ar[0];\n\t\t\t$action=$ar[1];\n\t\t\t$this->actions[]=array(\"controller\"=>$controller, \"action\"=>$action, \"case_items\"=>0 );\n/*\n\t\t\tif (!isset($this->admin)) {\n\t\t\t\t//BZ::LoadController(\"admin\");\n\t\t\t\techo CTLPATH;\n\t\t\t\trequire_once CTLPATH.\"admin.php\";\n\t\t\t\t$this->admin=$admin;\t\t\t//\n\t\t\t}\n*/\n\t\t}\n\t}",
"public function browseAction()\n {\n $table = $this->_helper->db->getTable();\n $select = $table->getSelect();\n $select->where('job_id IS NULL');\n $this->view->batch_upload_mapping_sets = $table->fetchObjects($select);\n }",
"function vistaportal_next($form, &$form_state) {\n $user = user_load($form_state['uid']);\n drupal_goto('preapp/upload' . $user -> uid);\n }",
"public function index()\n\t{\n\t\t$data = array(\n\t\t\t'body' => 'browse/index',\n\t\t\t'na_servers' => $this->browse_model->get_shards('na'),\n\t\t\t'eu_servers' => $this->browse_model->get_shards('eu')\n\t\t);\n\t\t$this->load->view('template', $data);\n\t}",
"public static function go(string $filename)\n\t{\n\t\theader(\"Location: \" . $filename);\n\t\texit;\n\t}",
"function index( $args )\n {\n // attempt to get settings for number of posts per page\n $settings = $this->app->settings('browse');\n \n // default top no message\n $action_message = null;\n \n // check for post data\n if( $_SERVER['REQUEST_METHOD'] == 'POST' ){\n if( isset($_POST['listings_per_page']) && \n $_POST['listings_per_page'] != null &&\n is_numeric( $_POST['listings_per_page'] )\n ){\n \n // set values and save\n $settings->set('per_page',\n (int)$_POST['listings_per_page']);\n $settings->save('; Browsing options');\n \n // set action message\n $action_message = 'Settings updated';\n } else {\n \n // failed message\n $action_message = 'Input must be a number.';\n }\n }\n \n // get value\n $listings_per_page_value = $settings->get('per_page');\n \n // check for set value\n if( $listings_per_page_value == null ){\n \n // let default be 10\n $listings_per_page_value = 10;\n }\n \n /* -----------------------------\n * Define action links for forms\n */\n $this->view->add('per_page_action', \n $this->app->form_path('admin?action=per_page')\n );\n \n \n // add value to page\n $this->view->add('listings_per_page_value',\n $listings_per_page_value);\n \n // add action message\n $this->view->add('action_message', $action_message );\n }",
"private function redirect(){\n\t\tredirect('browse/office_industrial');//default re-route\n\t}",
"public function index()\n {\n Config::setJsConfig('curPage', 'downloads-index');\n parent::displayIndex(get_class());\n }",
"public function showMeHtmlPageInBrowser() {\n\n $html_data = $this->getSession()->getDriver()->getContent();\n $file_and_path = '/tmp/behat_page.html';\n file_put_contents($file_and_path, $html_data);\n\n if (PHP_OS === \"Darwin\" && PHP_SAPI === \"cli\") {\n exec('open -a \"Safari.app\" ' . $file_and_path);\n };\n }",
"public function browse()\n {\n require_code('templates_donext');\n return do_next_manager(get_screen_title('INVOICES'), comcode_lang_string('DOC_ECOMMERCE'),\n array(\n array('menu/_generic_admin/add_one', array('_SELF', array('type' => 'add'), '_SELF'), do_lang('CREATE_INVOICE')),\n array('menu/adminzone/audit/ecommerce/outstanding_invoices', array('_SELF', array('type' => 'outstanding'), '_SELF'), do_lang('OUTSTANDING_INVOICES')),\n array('menu/adminzone/audit/ecommerce/undelivered_invoices', array('_SELF', array('type' => 'undelivered'), '_SELF'), do_lang('UNDELIVERED_INVOICES')),\n ),\n do_lang('INVOICES')\n );\n }",
"public function go($url)\r\n {\r\n header('Location: '.$url);\r\n }",
"public function go() {\n $pageID = $_POST[TOOLKIT_TAG . '_page_id'];\n\n # Get next page id\n if (isset($_POST[TOOLKIT_TAG . '_dir']) && $_POST[TOOLKIT_TAG . '_dir'] === SC_Survey_Flow::DIR_BACK) { // Moving backward\n # Store answers\n if ($this->bool_store_bwd) {\n $questionIDs = $this->process_answers($_POST);\n }\n \n # Revert to last page\n if (count($_SESSION[TOOLKIT_TAG]['pages'])) {\n $lastPage = array_pop($_SESSION[TOOLKIT_TAG]['pages']);\n $next = $lastPage['pageID'];\n \n } else { // Before the first page\n $next = SC_Page_Generator::START;\n }\n\n $_SESSION[TOOLKIT_TAG]['response'] = $this->getResponse();\n \n } else {\n # Store answers\n $questionIDs = $this->process_answers($_POST);\n\n # Store page\n ## Pages array must be numerically indexed, to ensure they are in the correct order.\n $_SESSION[TOOLKIT_TAG]['pages'][] = [\n 'pageID' => $pageID,\n 'questions' => $questionIDs\n ];\n\n $_SESSION[TOOLKIT_TAG]['response'] = $this->getResponse();\n\n \n # Calculate next page\n $next = $this->calculate_next_page($pageID);\n //$_SESSION[TOOLKIT_TAG]['pages'][] = $next;\n }\n \n return $next;\n }",
"public function submitPage() {}",
"public function go();",
"public function index() {\n $exploded = explode(\"/\", $this->_url);\n if (count($exploded) > 1) {\n $this->page(intval($exploded[1]));\n } else {\n $this->page(0);\n }\n }",
"function _setNavigation()\r\n {\r\n global $_ARRAYLANG;\r\n\r\n $ckEditorFuncNum = isset($_GET['CKEditorFuncNum']) ? '&CKEditorFuncNum='.contrexx_raw2xhtml($_GET['CKEditorFuncNum']) : '';\r\n $ckEditor = isset($_GET['CKEditor']) ? '&CKEditor='.contrexx_raw2xhtml($_GET['CKEditor']) : '';\r\n\r\n $this->_objTpl->addBlockfile('FILEBROWSER_NAVIGATION', 'fileBrowser_navigation', 'module_fileBrowser_navigation.html');\r\n $this->_objTpl->setVariable(array(\r\n 'FILEBROWSER_MEDIA_TYPE_MENU' => $this->_getMediaTypeMenu('fileBrowserType', $this->_mediaType, 'onchange=\"window.location.replace(\\''. \\Cx\\Core\\Csrf\\Controller\\Csrf::enhanceURI('index.php?cmd=FileBrowser').'&standalone=true&langId='.$this->_frontendLanguageId.'&type=\\'+this.value+\\''.$ckEditorFuncNum.'\\')\"'),\r\n 'TXT_FILEBROWSER_PREVIEW' => $_ARRAYLANG['TXT_FILEBROWSER_PREVIEW']\r\n ));\r\n\r\n if ($this->_mediaType != 'webpages') {\r\n // only show directories if the files should be displayed\r\n if (count($this->_arrDirectories) > 0) {\r\n foreach ($this->_arrDirectories as $arrDirectory) {\r\n $this->_objTpl->setVariable(array(\r\n 'FILEBROWSER_FILE_PATH' => \"index.php?cmd=FileBrowser&standalone=true&langId={$this->_frontendLanguageId}&type={$this->_mediaType}&path={$arrDirectory['path']}\" . $ckEditor . $ckEditorFuncNum,\r\n 'FILEBROWSER_FILE_NAME' => $arrDirectory['name'],\r\n 'FILEBROWSER_FILE_ICON' => $arrDirectory['icon']\r\n ));\r\n $this->_objTpl->parse('navigation_directories');\r\n }\r\n }\r\n }\r\n $this->_objTpl->parse('fileBrowser_navigation');\r\n }",
"static function goToURL($url) {\n header('Location: ' . $url);\n }",
"public function openContentpool() {\n $this->visitContentpoolPath('/');\n }",
"public function show() {\n $this->buildPage();\n echo $this->_page;\n }",
"function browse($name, $func, $file = '')\n {\n $this->initialize($name);\n\n //Put extension at end of filename again\n $type = array_search($this->request->accept[0], $this->request->mimetypes);\n if($type != 'html')\n $file .= '.' . $type;\n\n $file = urldecode($_SERVER['REQUEST_URI']);\n $file = substr($file, strpos($file, 'browse/') + 6);\n\n //Check if requested url is within the base path\n $basepath = realpath($this->settings['path']);\n $path = $basepath;\n if($file != '')\n $path .= '/' . $file;\n $path = realpath($path);\n\n if($path && $basepath && substr_compare($path, $basepath, 0, strlen($basepath)) != 0)\n throw new Tonic\\NotFoundException;\n\n //Handle directories\n if(is_dir($path))\n {\n $entries = array();\n $names = scandir($path);\n foreach($names as $filename)\n {\n if($filename[0] == '.')\n continue;\n if(!is_readable($path . '/' . $filename))\n continue;\n $entry = $this->app->uri(__CLASS__, array($name, $func));\n if($file != '')\n $entry .= '/' . $file;\n $entry .= '/' . $filename;\n if(is_dir($path . '/' . $filename))\n $entry .= '/';\n $entries[] = $this->encode_path($entry);\n }\n\n $res = array();\n $res['type'] = 'directory';\n $res['name'] = basename($path);\n if($path == $basepath)\n $res['name'] = $name;\n $res['entries'] = $entries;\n return json_encode($res, JSON_PRETTY_PRINT);\n }\n\n //Handle mp3 files\n if(is_file($path))\n {\n //Create new songinfo\n $tags = $this->getID3Tags($path);\n $res = new Song($path, $tags['title'], $tags['artist'], $path);\n $res->album = $tags['album'];\n $res->length = $tags['length'];\n return $res->toJSON();\n }\n\n throw new Tonic\\NotFoundException;\n }",
"function gotoPageObject($a_page = \"\")\n\t{\n\t\tglobal $ilCtrl;\n\t\t\n\t\tif ($a_page == \"\")\n\t\t{\n\t\t\t$a_page = $_GET[\"page\"];\n\t\t}\n\t\t\n\t\tinclude_once(\"./Modules/Wiki/classes/class.ilWikiPage.php\");\n\t\tif (ilWikiPage::_wikiPageExists($this->object->getId(),\n\t\t\tilWikiUtil::makeDbTitle($a_page)))\n\t\t{\n\t\t\t// to do: get rid of this redirect\n\t\t\tilUtil::redirect(ilObjWikiGUI::getGotoLink($this->object->getRefId(), $a_page));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (!$this->object->getTemplateSelectionOnCreation())\n\t\t\t{\n\t\t\t\t$this->object->createWikiPage($a_page);\n\n\t\t\t\t// redirect to newly created page\n\t\t\t\t$ilCtrl->setParameterByClass(\"ilwikipagegui\", \"page\", ilWikiUtil::makeUrlTitle(($a_page)));\n\t\t\t\t$ilCtrl->redirectByClass(\"ilwikipagegui\", \"edit\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$ilCtrl->setParameter($this, \"page\", ilWikiUtil::makeUrlTitle($_GET[\"page\"]));\n\t\t\t\t$ilCtrl->setParameter($this, \"from_page\", ilWikiUtil::makeUrlTitle($_GET[\"from_page\"]));\n\t\t\t\t$ilCtrl->redirect($this, \"showTemplateSelection\");\n\t\t\t}\n\t\t}\n\t}",
"public function HandlePage()\n\t\t{\n\t\t\t$this->SetOrderData();\n\n\t\t\t$action = \"\";\n\t\t\tif(isset($_REQUEST['action'])) {\n\t\t\t\t$action = isc_strtolower($_REQUEST['action']);\n\t\t\t}\n\n\t\t\tswitch($action) {\n\t\t\t\tdefault: {\n\t\t\t\t\t$this->FinishOrder();\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public function nextAction()\n {\n $this->pageAction('goToNextPage');\n }",
"public function index()\n\t{\n\t\tredirect(base_url(\"index.php\"));\n\t}",
"public function browse($id)\n {\n if (!Gate::allows('Owner')) return redirect('/home')->with('warning', __('Somehow you the system tried to let you do something which is not allowed. So you are sent home!'));\n $house = $this->checkAccess($id);\n\n $myfiles = [];\n $uploaddir = [];\n $uploaddir['Housegraphics'] = public_path().'/housegraphics/' . $id . '/';\n $uploaddir['Housedocuments'] = public_path().'/housedocuments/' . $id . '/';\n $uploaddir['Gallery'] = public_path().'/housegraphics/' . $id . '/gallery1/';\n\n foreach ($uploaddir as $key => $dir)\n {\n if (file_exists($dir)) $myfiles[$key] = scandir($dir);\n else $myfiles[$key] = [__('No files have been uploaded')];\n }\n\n return view('house/browse', ['myfiles' => $myfiles, 'id' => $id, 'housename' => $house->name]);\n }",
"public function videoconferenciaHome( ) {\n $this->setComando(\"HOME\");\n }",
"public function handleImageBrowse() {\n\t\t$this->templateName = 'ImageBrowser.latte';\n\n\t\t$this->template->filePath = $this->template->basePath . '/' . $this->storage->getBaseUrl();\n\t\t$this->template->images = $this->storage->getImages();\n\t\t$this->template->setFile(__DIR__ . '/templates/' . $this->templateName);\n\t\t$this->template->render();\n\t\t$this->getPresenter()->terminate();\n\t}",
"public function pageAction()\n {\n return $this->indexAction();\n }",
"protected function passNetworkBrowseMode()\n {\n return true;\n }",
"function invokeDefaultPage() {\r\n require(\"controllers/IndexController.php\");\r\n $controller = new IndexController();\r\n $controller->index();\r\n }",
"public function index()\n\t{\n\t\tif ( $this->auth->check() )\n\t\t{\t\t\n\t\t\t// MUESTRA LA PAGINA\n\t\t\t$this->show_page();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tredirect ( $this->_base_url );\n\t\t}\n\t}",
"public function test_search_page_is_loading(){\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->clickLink(\"Search Items\")\n ->assertPathIs('/item-search');\n });\n }",
"public function send()\n\t{\n\t\t$this->page->generatePage();\n\t\texit;\n\t}",
"function go()\n {\n $this->session->layout == 'gallery' ? \n $this->data['pagebody'] = 'Roster/rosterGal' : \n $this->data['pagebody'] = 'Roster/rosterTab'; \n $this->render();\n }",
"public function page () {\n\t\tinclude _APP_ . '/views/pages/' . $this->_reg->controller . '/' . $this->_page . '.phtml';\n\t}",
"function OnGoBack(){\n if (strlen($this->host_library_ID))\n $this->library_ID = $this->host_library_ID;\n\n if ($this->is_context_frame)\n\t\t\t$url = \"?package=context&page=contextframe&event=close\";\n\t\telse\n\t\t\t$url =\"?\".($this->Package!=\"\" ? \"package=\".$this->Package.\"&\" : \"\").\"page=\" . $this->listHandler . \"&\" . $this->library_ID . \"_start=\" . $this->start . \"&\" . $this->library_ID . \"_order_by=\" . $this->order_by . \"&library=\" . $this->library_ID . \"&\" . $this->library_ID . \"_parent_id=\" . $this->parent_id . \"&\" . $this->restore;\n\n $this->AfterSubmitRedirect($url);\n }",
"function showFileViewerContent() {\r\n global $currentPath;\r\n global $root;\r\n global $directory;\r\n global $parentPath;\r\n\r\n echo \"Path: \" . $currentPath . \"<br>\";\r\n\r\n addExitButton(); // Exit button directs the user to the home page.\r\n\r\n /* If parent path is the root path, we don't show the \"Back\" button, because if we do so, the user will see\r\n other users' folders and have access to them. */\r\n if ($parentPath != $root) {\r\n addBackButton($parentPath);\r\n }\r\n\r\n echo \"<hr>\";\r\n\r\n listFilesAndFolders($directory);\r\n}",
"public function indexAction()\n {\n // parameter.\n $rawDocFilename = $this->_getParam(self::DOCUMENT_KEYWORD);\n $documentFilename = urldecode($rawDocFilename);\n // TODO: Should use a different gateway and different access function.\n $gateway = new Application_Model_ActivityGateway();\n $contents = $gateway->getActivityList($documentFilename);\n\n // This is not a dynamic page, so don't have to differentiate \n // between the initial display or a callback from a button action.\n\n // Make the document contents available to the View Renderer.\n $this->view->pageContents = $contents;\n }",
"function go($url){\n\theader(\"Location: \".$url);\n\texit();\n}",
"function showUploadCompletePage() {\n\t\t$this->setCacheLevelNone();\n\t\t$this->render($this->getTpl('uploadComplete', '/account'));\t\t\n\t\n\t}",
"public function updatingSearch()\n {\n $this->gotoPage(1);\n }",
"function _browse($id_dosen = '', $id_ajar = '')\n\t{\n\t\tif ($this->_access === 'BAAK' || $this->_access === 'Dosen')\n\t\t{\n\t\t\treturn ($this->ajarModel->browse($id_dosen));\n\t\t}\t\t\n\t\telse\n\t\t{\n\t\t\tredirect(base_url('/auth/logout'));\n\t\t}\n\t\t\n\t}",
"public function main()\n {\n $url = ModUtil::url($this->name, 'admin', 'tree');\n return System::redirect($url);\n }",
"public function setBrowseBase($path)\n {\n\n $this->browseBase = $path;\n }",
"public function action() {\n // $this->view->page();\n }",
"function showPage() \n\t{\n\t\t$this->xt->display($this->templatefile);\n\t}",
"public function goHome()\n {\n $this->redirect(config('default_module').'/'.config('default_controller').'/'.config('default_action'));\n }",
"function goToConsulta(){\n header(\"location:movimentacao-consulta.php\");\n }",
"public function home() {\n\n\t\t$alphabets = array('a'=>'A',\n\t\t'b'=>'B',\n\t\t'c'=>'C',\n\t\t'd'=>'D',\n\t\t'e'=>'E',\n\t\t'f'=>'F',\n\t\t'g'=>'G',\n\t\t'h'=>'H',\n\t\t'i'=>'I',\n\t\t'j'=>'J',\n\t\t'k'=>'K',\n\t\t'l'=>'L',\n\t\t'm'=>'M',\n\t\t'n'=>'N',\n\t\t'o'=>'O',\n\t\t'p'=>'P',\n\t\t'q'=>'Q',\n\t\t'r'=>'R',\n\t\t's'=>'S',\n\t\t't'=>'T',\n\t\t'u'=>'U',\n\t\t'v'=>'V',\n\t\t'w'=>'W',\n\t\t'x'=>'X',\n\t\t'y'=>'Y',\n\t\t'z'=>'Z');\n\t\t$alpha_links = array();\n\t\t$i=0;\n\t\tforeach ($alphabets as $k=>$v) {\n\t\t\t$alpha_links[$i][\"link\"] = $this->request->createURL(\"Listing\", \"browseCategory\", \"search=$k\");\n\t\t\t$alpha_links[$i][\"text\"] = $v;\n\t\t\t$i++;\n\t\t}\n\t\t$this->page->assign(\"alpha_links\",$alpha_links);\t\n\t\t\n\t\t//Add Meta Tags\n\t\t$this->page->addMetaDescription(\"Pink Pages is a local search and business directory that provides truly local results for services and products\");\n\t\t$this->page->addMetaKeywords(\"pink pages, truly local, business directory, products, services\");\t\t\n\t\t\t\n $this->page->assign(\"do\", \"Listing\");\n $this->page->assign(\"action\", \"search\");\n\t\t$this->page->assign(\"home\",$this->request->createURL(\"Affiliate\", \"showhomePageAffiliate\"));\n $this->page->assign(\"SearchAction\",$this->request->createURL(\"Listing\", \"search\"));\n\t\t//dev_log::write(\"home() F1\");\n\t\t$this->page->assign(\"browse_by_category\",$this->request->createURL(\"Listing\", \"browseCategory\"));\n\t\t$this->page->assign(\"searchStreetAction\",$this->request->createURL(\"Listing\", \"searchStreet\"));\n\t\t$this->page->assign(\"searchStreetForm\",$this->request->createURL(\"Listing\", \"searchStreetForm\"));\n\t\t$this->page->assign(\"faq\",$this->request->createURL(\"Content\", \"faq\"));\n\t\t$this->page->assign(\"contactUs\",$this->request->createURL(\"Content\",\"contactUs\"));\n\t\t\n $this->page->addJsFile(\"bsn.AutoSuggest_2.1.3.js\");\n $this->page->addJsFile(\"default_values.js\");\t\t\n $this->page->addCssStyle(\"autosuggest_inquisitor.css\");\n\t\t$bannerArray=$this->CommonFacade->getBanner(\"0\");\n\t\t//dev_log::write(\"home() F2\");\n\t\t$this->page->assign(\"viewdemo\",$this->request->createURL(\"Listing\", \"demoAddListing\"));\n\t\t//dev_log::write(\"home() F2.1\");\n\t\t$this->page->assign(\"bannerArray\",$bannerArray);\n\t\t//dev_log::write(\"home() F2.2\");\n\t\t//$resip=$this->CommonFacade->addIp(); // Hereward 20121003 - remove redundant code\n\t\t//dev_log::write(\"home() F2.5\");\n\t\t//$this->CommonFacade->popularPageCount(\"1\"); // Hereward 20121003 - remove redundant code\n\t\t//dev_log::write(\"home() F3\");\n $this->page->getPage('home.tpl');\n }",
"private function show_page()\n\t{\n\t\t$parse['user_link']\t= $this->_base_url . 'recruit/' . $this->_friends[0]['user_name'];\n\t\n\t\t$this->template->page ( FRIENDS_FOLDER . 'friends_view' , $parse );\t\n\t}",
"function index() {\r\n $this->page();\r\n }"
] | [
"0.75257325",
"0.75257325",
"0.74997085",
"0.7149494",
"0.69553435",
"0.6946902",
"0.6825591",
"0.6692888",
"0.6443369",
"0.6431612",
"0.64211005",
"0.6336887",
"0.6127397",
"0.6080071",
"0.607097",
"0.6005378",
"0.59615505",
"0.58307827",
"0.58027107",
"0.5797956",
"0.5784501",
"0.5750632",
"0.5734748",
"0.573432",
"0.57264006",
"0.5709052",
"0.5705808",
"0.5649723",
"0.5643341",
"0.56351537",
"0.5623685",
"0.5602689",
"0.55983394",
"0.55880076",
"0.55873823",
"0.55774194",
"0.55660605",
"0.5562838",
"0.5523762",
"0.5518442",
"0.55085385",
"0.55056965",
"0.54905224",
"0.5478251",
"0.5472865",
"0.5451918",
"0.5448862",
"0.54320955",
"0.54234356",
"0.5400216",
"0.5373085",
"0.5342896",
"0.5315912",
"0.5314019",
"0.5290615",
"0.52859914",
"0.527556",
"0.5273431",
"0.52708745",
"0.525906",
"0.52535635",
"0.5248274",
"0.5247268",
"0.5238668",
"0.5230332",
"0.521862",
"0.5215945",
"0.52121776",
"0.5211312",
"0.52063864",
"0.51907074",
"0.5189639",
"0.5161442",
"0.51599115",
"0.51506674",
"0.5150646",
"0.5150205",
"0.51492435",
"0.51363003",
"0.5133592",
"0.5133038",
"0.5130733",
"0.51166713",
"0.5097214",
"0.5094741",
"0.50913996",
"0.50911355",
"0.50905216",
"0.5083588",
"0.5076727",
"0.5076334",
"0.50752085",
"0.506972",
"0.5063716",
"0.5063608",
"0.5060189",
"0.50549746",
"0.50488436",
"0.5046554",
"0.5031556",
"0.50079167"
] | 0.0 | -1 |
Show libs for project. | public function projectLibs($projectID)
{
$this->doc->setMainMenu();
$project = $this->dao->select('id,name')->from(TABLE_PROJECT)->where('id')->eq($projectID)->fetch();
$this->view->title = $project->name;
$this->view->project = $project;
$this->view->libs = $this->doc->getLibsByProject($projectID);
$this->display();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function includeLibs()\n {\n $string = '';\n\n if($this->css_files)\n {\n foreach( $this->css_files as &$css_file )\n {\n $string .= '<link rel=\"stylesheet\" href=\"' . $css_file . '\" type=\"text/css\" />';\n }\n }\n \n if($this->js_files)\n {\n foreach( $this->js_files as &$js_file )\n {\n $string .= PHP_EOL . '<script src=\"' . $js_file . '\" type=\"text/javascript\"></script>';\n }\n }\n $this->tpl->assign(\"libs\", $string . PHP_EOL);\n }",
"public function output_libraries()\n {\n $libraries = '';\n foreach($this->_config->item('javascript', 'libraries') as $lib){\n $libraries .= '<script type=\"text/javascript\" src=\"'.\n $this->_config->item('base_url').$lib.\"\\\"></script>\\n\";\n }\n \n return $libraries;\n }",
"function instances()\n {\n echo \"There are \" . Library::$libraries . \" libraries.\";\n }",
"function asu_isearch_libraries_info() {\n // Expected to be extracted into 'sites/all/libraries/jqtree'.\n $libraries['jqtree'] = array(\n 'name' => 'jQTree Library',\n 'vendor url' => 'http://mbraak.github.io/jqTree/',\n 'download url' => 'https://github.com/mbraak/jqTree/archive/0.22.0.zip',\n 'version callback' => 'asu_isearch_short_circuit_version',\n 'files' => array(\n 'js' => array('tree.jquery.js'),\n 'css' => array('jqtree.css'),\n ),\n );\n\n return $libraries;\n}",
"public function index()\n {\n $this->doc->setMainMenu();\n\n $projects = $this->doc->getLimitLibs('project', '9');\n $customLibs = $this->doc->getLimitLibs('custom', '9');\n $subLibs = $this->doc->getSubLibGroups(array_keys($projects));\n\n $this->view->title = $this->lang->doc->common . $this->lang->colon . $this->lang->doc->index;\n $this->view->projects = $projects;\n $this->view->customLibs = $customLibs;\n $this->view->subLibs = $subLibs;\n $this->display();\n }",
"public function index()\n {\n $libarys = Libary::all();\n return view('libary.list', compact('libarys'));\n }",
"public function getLibraries(Editor $editor);",
"public static function getFullList()\n {\n return self::$library;\n }",
"public function buildLibraries($docs = FALSE);",
"public function getLibraries()\n {\n return $this->libraries;\n }",
"public function index()\n\t{\n\n\t\t$ch = curl_init(base_url('/api/restLibraries/'));\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t\tcurl_setopt($ch, CURLOPT_HEADER, false);\n\t\t$data['libraries'] = json_decode(curl_exec($ch), true);\n\t\tcurl_close($ch);\n\n\t\t$this->load->view('theme/header'); \n\t\t$this->load->view('library/list', $data);\n\t\t$this->load->view('theme/footer');\n\t}",
"public function list()\n {\n $plugins = Plugin::orderBy('name', 'asc')->where('vsrepo', 0)->where('vs_included', 0)->with('categories')->get();\n\t\treturn view('vsrepo.list', compact('plugins'));\n }",
"public static function getLibrary() {}",
"function fcollab_project_list(){\r\n\t$output = 'list project';\r\n\t\r\n\treturn $output;\r\n}",
"public function show(libros $libros)\n {\n //\n }",
"protected function getLibraries(): array\n {\n return [];\n }",
"public function listaLibros() {\n $consultaListaLibros = $this->db->select(\"SELECT * FROM libro \"\n . \"ORDER BY titulo\");\n return $consultaListaLibros;\n }",
"public function loadLibraries(){\n // twig\n require_once LIBRARY_PATH.DIRECTORY_SEPARATOR.'Twig'.DIRECTORY_SEPARATOR.'lib'.DIRECTORY_SEPARATOR.'Twig'.DIRECTORY_SEPARATOR.'Autoloader.php';\n Twig_Autoloader::register();\n \n }",
"public function index()\n {\n $libros=Libro::all();\n return view('libros.index', compact('libros'));\n }",
"private function showProjectInfo()\n {\n // URLs\n $this->output->writeln('');\n $this->output->writeln('<info>'. $this->project->getName(false) .'</info> has now been created.');\n $this->output->writeln('<comment>Development:</comment> ' . $this->project->getDevUrl());\n $this->output->writeln('<comment>Staging:</comment> ' . $this->project->getStagingUrl());\n $this->output->writeln('<comment>Production:</comment> N/A');\n\n // Database credentials\n $databaseCredentials = $this->project->getDatabaseCredentials('dev');\n $this->output->writeln('');\n $this->output->writeln('<info>Development MySQL credentials</info>');\n $this->output->writeln('Username: ' . $databaseCredentials['username']);\n $this->output->writeln('Password: ' . $databaseCredentials['password']);\n $this->output->writeln('Database: ' . $databaseCredentials['database']);\n\n $databaseCredentials = $this->project->getDatabaseCredentials('staging');\n $this->output->writeln('');\n $this->output->writeln('<info>Staging MySQL credentials</info>');\n $this->output->writeln('Username: ' . $databaseCredentials['username']);\n $this->output->writeln('Password: ' . $databaseCredentials['password']);\n $this->output->writeln('Database: ' . $databaseCredentials['database']);\n $this->output->writeln('');\n\n // We're done!\n $this->output->writeln('<info>You can now run \"cd '. $this->project->getName() .' && vagrant up\"</info>');\n }",
"public function show()\n {\n $service = Config::get(\"ProjectLister::service\");\n $method = \"fetch_$service\";\n // Fetch\n $projects = self::$method();\n // Sort the list\n $projects = Project::sort( $projects );\n\n $output = '';\n foreach($projects as $project)\n {\n $template = ( Config::get(\"ProjectLister::template\") ) ? Config::get(\"ProjectLister::template\") : Project::getProjectTemplate();\n\n $template = str_replace('{{PROJECT_URL}}', $project->url, $template);\n $template = str_replace('{{PROJECT_NAME}}', htmlentities($project->name), $template);\n $template = str_replace('{{PROJECT_WATCHER_COUNT}}', $project->watchers, $template);\n $template = str_replace('{{PROJECT_DESCRIPTION}}', htmlentities($project->description), $template);\n $template = str_replace('{{PROJECT_SOURCE}}', $project->source, $template);\n $template = str_replace('{{PROJECT_WATCHER_NOUN}}', $project->watcher_noun, $template);\n\n $output .= $template . \"\\n\";\n }\n return $output;\n }",
"public function getLibsByProject($projectID, $mode = '')\n {\n $projectLibs = $this->dao->select('*')->from(TABLE_DOCLIB)->where('deleted')->eq(0)->andWhere('project')->eq($projectID)->orderBy('order, id')->fetchAll('id');\n\n $libs = array();\n foreach($projectLibs as $lib)\n {\n if($this->hasRight($lib)) $libs[$lib->id] = $lib->name;\n }\n\n if(strpos($mode, 'onlylib') === false)\n {\n if(commonModel::hasPriv('doc', 'showFiles')) $libs['files'] = $this->lang->doc->files;\n }\n\n return $libs;\n }",
"private function loadLib() {\r\n $this->load->library( 'javascript' );\r\n\r\n $this->load->helper( 'url' );\r\n $this->load->helper( 'html' );\r\n }",
"public function library($lib){\n include LIB_PATH.\"$lib.php\";\n }",
"public function index()\n\t\t{\n\t\t\t$this->data['libraries'] = $this->library->getLibraries();\n\t\t $this->load->view('front/index', $this->data);\n\t\t}",
"protected function RequireLibs()\n {\n\n }",
"public function index()\n {\n $file=Library::all();\n return view('view',compact('file'));\n }",
"public function show($id)\n {\n $library = Library::find($id);\n return view('backend.library.show', compact('library'));\n }",
"public function ShowVendors()\n\t{\n\t\t$GLOBALS['BreadCrumbs'] = array(\n\t\t\tarray(\n\t\t\t\t'name' => GetLang('Vendors')\n\t\t\t)\n\t\t);\n\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->SetPageTitle(GetConfig('StoreName').' - '.GetLang('Vendors'));\n\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate('vendors');\n\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate();\n\t}",
"public function index()\n {\n $libros = Libro::get(); // tambien podemos utilizar paginate()\n return $libros; //view('libro', ['libros' => $libros]);\n }",
"public function library() {\n\t\t\n\t\t//$m = zend('Zend_Pdf');\n\t\t\n\t\t//print_r($m);\n\t\t\n\t\t$tag = $this->getAllDocumentTagging();\n\t\t\n\t\t$metatype = model::getAllMetadataType();\n\t\t\t\t\t\t\t\n\t\t$view .= $this->optionGear;\n\t\t\n\t\t$view .= \"<div class='layan-libraryFilter-container-header'>Library View</div>\";\n\t\t\n\t\t$view .= \"<div class='layan-libraryFilter-container'>\";\n\t\t\n\t\t\t$view .= \"<div class='layan-libraryFilter-1'>\";\n\t\t\t\n\t\t\t\t$view .= \"<select data-placeholder='Pilih klasifikasi...' class='layan-libraryFilter-1-select'>\";\n\t\t\t\t\t\n\t\t\t\t\t$view .= \"<option selected value=''>Semua Klasifikasi</option>\";\n\t\t\t\t\t\n\t\t\t\t\t$view .= core::getKlasifikasi(null);\n\t\t\t\t\t\n\t\t\t\t$view .= \"</select>\";\n\t\t\t\n\t\t\t$view .= \"</div>\";\n\t\t\t\n\t\t\t$view .= \"<div class='layan-libraryFilter-2'>\";\n\t\t\t\n\t\t\t\t$view .= \"<select data-placeholder='Pilih Subyek...' class='layan-libraryFilter-2-select' multiple>\";\n\t\t\t\t\n\t\t\t\t\tforeach ($tag as $key => $value) {\n\t\t\t\t\t\n\t\t\t\t\t\t$view .= \"<option class='layan-libraryFilter-2-select-option' value='\".$value['CAP_TAG_ID'].\"'>\".ucwords(strtolower($value['CAP_TAG_VALUE'])).\"</option>\";\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$view .= \"</select>\";\n\t\t\t\n\t\t\t$view .= \"</div>\";\n\t\t\t\n\t\t\t$view .= \"<div class='layan-libraryFilter-5'>\";\n\t\t\t\n\t\t\t\t$view .= \"<select data-placeholder='Pilih Metadata...' class='layan-libraryFilter-5-select'>\";\n\t\t\t\t\tif (!empty($metatype)) {\t\t\n\t\t\t\t\t\tforeach ($metatype as $key => $value) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (strtoupper($value) == 'JUDUL DOKUMEN') {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$view .= \"<option selected class='layan-libraryFilter-5-select-option' value='\".$value.\"'>\".$value.\"</option>\";\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$view .= \"<option class='layan-libraryFilter-5-select-option' value='\".$value.\"'>\".$value.\"</option>\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$view .= \"</select>\";\n\t\t\t\n\t\t\t$view .= \"</div>\";\n\t\t\t\n\t\t\t$view .= \"<div class='layan-libraryFilter-3'>\";\n\t\t\t\n\t\t\t\t$view .= \"<input placeholder='Text...' type='text' class='layan-libraryFilter-2-input'>\";\n\t\t\t\n\t\t\t$view .= \"</div>\";\n\t\t\t\t\t\t\n\t\t\t$view .= \"<div class='layan-libraryFilter-4'>\";\n\t\t\t\n\t\t\t\t$view .= \"<input type='submit' class='layan-libraryFilter-4-input-layan' value='Cari'>\";\n\t\t\t\n\t\t\t$view .= \"</div>\";\n\t\t\n\t\t$view .= \"</div>\";\n\t\t\n\t\t\n\t\t$view .= \"<div class='layan-libraryFilter-container-header2' style='display:none;'>Order View</div>\";\n\t\t\n\t\t$view .= \"<div class='layan-libraryFilter-container2' style='display:none;'>\";\n\t\t\n\t\t\t$view .= \"<div class='layan-libraryFilter-1'>\";\n\t\t\t\n\t\t\t\t$view .= \"<li class='layan-library_content-action-horizontal'><a class='layan-library_content-action-printCheckout'>Checkout dan Print</a></li>\";\n\t\t\t\n\t\t\t$view .= \"</div>\";\n\t\t\n\t\t$view .= \"</div>\";\n\t\t\n\t\t$view .= \"<div class='layan-library-content-container'>\";\n\t\t\n\t\t$view .= self::library_content();\n\t\t\n\t\t$view .= \"</div>\";\n\t\t\n\techo $view;\n\t\t\n\t}",
"public function index() \n {\n $projects = Project::where('systemID', app('system')->id)->get();\n return view('projects.index', compact('projects'));\n }",
"function ShowAllSoftware()\n{\n\tget_all_software();\n\n\t//show_table_title( \"Click a Build CRC to see panic data\" );\n\t//show_all_software();\t\t\n\n\tshow_table_title( \"Official Release (Click a Build CRC to see panic data)\" );\n\tshow_all_official_software();\t\t\n\n\tshow_table_title( \"Unofficial Release (Click a Build CRC to see panic data)\" );\n\tshow_all_test_software();\t\t\n}",
"public function index()\n {\n $libraries = Library::paginate(10);\n $row_number = 1;\n //dd(Library::count());\n return view('backend.library.index', compact('libraries', 'row_number'));\n }",
"protected function renderCssLibraries() {}",
"function config()\n\t{\n\t\t// Bootstrap (CDN) v3.3.6.\n\t\t$libraries['cdn.bootstrap'] = array(\n\t\t\t'name' => 'Bootstrap (CDN)',\n\t\t\t'vendor_url' => 'http://getbootstrap.com/',\n\t\t\t'download_url' => 'https://github.com/twbs/bootstrap/releases/download/v3.3.6/bootstrap-3.3.6-dist.zip',\n\t\t\t'version_arguments' => array(\n\t\t\t\t'file' => 'js/bootstrap.min.js',\n\t\t\t\t// Bootstrap v3.3.6\n\t\t\t\t'pattern' => '/Bootstrap\\s+v(3\\.\\d\\.\\d+)/',\n\t\t\t\t'lines' => 5,\n\t\t\t),\n\t\t\t// Override library path to CDN.\n\t\t\t'library_path' => 'https://cdn.jsdelivr.net/bootstrap/3.3.6/',\n\t\t\t'files' => array(\n\t\t\t\t'js' => array(\n\t\t\t\t\t'js/bootstrap.min.js' => array(\n\t\t\t\t\t\t'zone' => 2,\n\t\t\t\t\t\t'type' => 'url',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'css' => array(\n\t\t\t\t\t'css/bootstrap.min.css' => array(\n\t\t\t\t\t\t'zone' => 2,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\n\t\t// Font-Awesome (CDN) v4.6.3.\n\t\t$libraries['cdn.fontawesome'] = array(\n\t\t\t'name' => 'Font-Awesome (CDN)',\n\t\t\t'vendor_url' => 'http://fontawesome.io/',\n\t\t\t'download_url' => 'http://fontawesome.io/',\n\t\t\t'version_arguments' => array(\n\t\t\t\t'file' => 'css/font-awesome.min.css',\n\t\t\t\t// Font Awesome 4.6.3 by\n\t\t\t\t'pattern' => '/(\\d\\.\\d\\.\\d+)/',\n\t\t\t\t'lines' => 10,\n\t\t\t),\n\t\t\t// Override library path to CDN.\n\t\t\t'library_path' => 'https://cdn.jsdelivr.net/fontawesome/4.7.0/',\n\t\t\t'files' => array(\n\t\t\t\t'css' => array(\n\t\t\t\t\t'css/font-awesome.min.css' => array(\n\t\t\t\t\t\t'zone' => 2,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\n\t\treturn $libraries;\n\t}",
"public function index()\n {\n return view('project.index', $this->repository->projectResources())->with('nav', $this->nav);\n ;\n }",
"protected function renderMainJavaScriptLibraries() {}",
"function pkg_build_repo_list() {\n\t$repos = pkg_list_repos();\n\t$list = array();\n\n\tforeach ($repos as $repo) {\n\t\t$list[$repo['name']] = $repo['descr'];\n\t}\n\n\treturn($list);\n}",
"public function view_package_includes()\n\n {\n $packData['view'] = Product::packData();\n\n return view('admin.package-includes', ['packData' => $packData]);\n }",
"public function index()\n {\n $packages = Packages::getAll();\n $languages = Language::getAll();\n\n return view('admin/packages/index', compact('packages', 'languages'));\n }",
"function BBFontLibs()\n {\n $fonts = File::directories('public/fonts');\n foreach ($fonts as $font) {\n if (file_exists($font . '/config.json')) {\n $config = json_decode(file_get_contents($font . '/config.json'));\n $resources[] = [\n 'title' => $config->title,\n 'folder' => basename($font)\n ];\n }\n }\n\n return $resources;\n }",
"public function index()\n {\n $projects = Project::all();\n $formats = Format::all();\n $format_terms = FormatTerm::all();\n $archetypes = Archetype::all();\n\n return view('projects.index', ['projects' => $projects, 'formats' => $formats, 'archetypes' => $archetypes,\n 'format_terms' => $format_terms]);\n }",
"public function show($id)\n\t{\n\n\t\t$ch = curl_init(base_url('/api/restLibraries/'.$id));\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t\tcurl_setopt($ch, CURLOPT_HEADER, false);\n\t\t$data['library'] = json_decode(curl_exec($ch), true);\n\t\tcurl_close($ch);\n\n\t\tif (count($data['library'][0])<=0) {\n\t\t\tredirect('/library/');\n\t\t}\n\n\t\t$this->load->view('theme/header');\n\t\t$this->load->view('library/show', $data);\n\t\t$this->load->view('theme/footer');\n\t}",
"public function show(Libro $libro)\n {\n //\n }",
"public function index()\n {\n $packages = Package::all();\n return view('backend.pages.packages.index', compact('packages'));\n }",
"public function getLibrariesPath() {\n return $this->_libraries_path;\n }",
"public function library()\n\t{\n\t\n\t}",
"public function index()\n { \n $libros = Libro::orderBy('id', 'desc')->paginate(10);\n \n return view('libros-vue.index')->with('libros', $libros);\n }",
"function include_js_lib($libs='')\n{\n $js_libs = '';\n $content = '<script src=\"http://www.google.com/jsapi\"></script>';\n if (is_array($libs)) {\n for ($i=0; $i < count($libs); $i++) { \n $_lib = split(\"-\",$libs[$i]);\n $lib = $_lib[0];\n $_version = split(\"-\",$libs[$i]);\n $version = $_version[1];\n $js_libs .= \"google.load('${lib}','${version}');\";\n }\n } else {\n $_lib = split(\"-\",$libs);\n $lib = $_lib[0];\n $_version = split(\"-\",$libs);\n $version = $_version[1];\n $js_libs = \"google.load('${lib}','${version}');\";\n }\n $output = $content;\n $output .= '<script type=\"text/javascript\" charset=\"utf-8\">';\n $output .= $js_libs;\n $output .= '</script>';\n echo $output;\n}",
"private function overview()\n {\n foreach ($this->manager->getTranslationFiles() as $lang => $namespaces) {\n $files = 0;\n foreach ($namespaces as $namespace) {\n $files += count($namespace);\n }\n\n $this->info(\n $lang . ': Found ' . $files . ' files with ' . count($this->manager->getTranslationValues($lang)) .\n ' values' . (config('app.locale', null) == $lang ? ' *primary locale' : '')\n );\n }\n }",
"public function index()\n {\n return 'list of all projects';\n }",
"public static function showInfo()\n {\n printf('Version: %.1f' . PHP_EOL, self::VERSION);\n }",
"public function index()\n {\n $data['title'] = \"packages\";\n $data['packages'] = Packages::orderby('id', 'DESC')->get();\n return view('/admin/packages/index', $data)->render();\n }",
"protected function getBoilerplate()\n {\n return '# Project Licenses\nThis file was generated by the [PHP Legal Licenses](https://github.com/Comcast/php-legal-licenses) utility. It contains the name, version and commit sha, description, homepage, and license information for every dependency in this project.\n\n## Dependencies\n\n';\n }",
"public function render_dependencies(): string;",
"public function index()\n {\n $projects = Api::get('api/v1/project', Session::get('session.token'));\n return View::make('project::site.project.list', ['projects' => $projects]);\n }",
"public function index()\n {\n $packages = Package::all();\n return view('admin.packages.index',compact('packages'));\n }",
"public function showAllProductLicenses()\n {\n $epi_products = $this->getAllEpiProductsData();\n\n if (empty($epi_products)) {\n return;\n }\n\n ob_start();\n\n $plugin_dir_name = '';\n $inactive_epi_plugins = 0;\n // Get all license views\n foreach ($epi_products as $product_data) {\n $plugin_dir_name = end(explode('/', $product_data['baseFolderDir']));\n if ($product_data['isTheme']) {\n if (wp_get_theme()->name != $product_data['pluginName']) {\n $inactive_epi_plugins++;\n continue;\n }\n } else {\n if (! is_plugin_active($plugin_dir_name.'/'.$product_data['mainFileName'])) {\n $inactive_epi_plugins++;\n continue;\n }\n }\n $this->displayProductLicense($product_data);\n }\n\n if ($inactive_epi_plugins === count($epi_products)) {\n ?>\n <tr>\n <td colspan=\"4\">\n <?php _e('No active plugins found', $this->pluginSlug); ?>\n </td>\n </tr>\n <?php\n }\n $content = ob_get_clean();\n\n echo $content;\n }",
"function pkgDisplayDotProject(& $subject) {\r\n\t\tparent :: __construct($subject);\r\n\t}",
"function ShowSingleSoftware()\n{\n\tglobal $sw_version, $build_crc;\n\t\n\tget_all_packages();\n\tclassify_panic_packages();\n\n\tshow_table_title( \"$sw_version (Build CRC: $build_crc)\" );\n\n\tshow_panic_group();\t\t\n\n\t//show_panic_packages();\t\t\n}",
"public function loadLibraries($var = array())\n {\n $this->load->library($var);\n }",
"public function get_plugins_list()\n {\n $baseUrl = 'http://prismjs.com/plugins/';\n\n // JS and related CSS file name must be same, except extension\n return [\n 1 => ['name' => 'Autolinker ', 'url' => $baseUrl . 'autolinker/', 'file' => 'prism-autolinker', 'need_css' => 1],\n 2 => ['name' => 'Autoloader ', 'url' => $baseUrl . 'autoloader/', 'file' => 'prism-autoloader', 'need_css' => 0],\n\n 3 => ['name' => 'Command Line', 'url' => $baseUrl . 'command-line/', 'file' => 'prism-command-line', 'need_css' => 1],\n 4 => ['name' => 'Copy to Clipboard', 'url' => $baseUrl . 'copy-to-clipboard/', 'file' => 'prism-copy-to-clipboard', 'need_css' => 1],\n\n 5 => ['name' => 'File Highlight ', 'url' => $baseUrl . 'file-highlight/', 'file' => 'prism-file-highlight', 'need_css' => 0],\n 6 => ['name' => 'Line Highlight', 'url' => $baseUrl . 'line-highlight/', 'file' => 'prism-line-highlight', 'need_css' => 1],\n 7 => ['name' => 'Line Numbers', 'url' => $baseUrl . 'line-numbers/', 'file' => 'prism-line-numbers', 'need_css' => 1],\n\n 8 => ['name' => 'Preview: Base', 'url' => $baseUrl . 'previewer-base/', 'file' => 'prism-previewer-base', 'need_css' => 1],\n 9 => ['name' => 'Preview: Angle', 'url' => $baseUrl . 'previewer-angle/', 'file' => 'prism-previewer-angle', 'need_css' => 1],\n 10 => ['name' => 'Preview: Color', 'url' => $baseUrl . 'previewer-color/', 'file' => 'prism-previewer-color', 'need_css' => 1],\n 11 => ['name' => 'Preview: Easing', 'url' => $baseUrl . 'previewer-easing/', 'file' => 'prism-previewer-easing', 'need_css' => 1],\n 12 => ['name' => 'Preview: Gradient', 'url' => $baseUrl . 'previewer-gradient/', 'file' => 'prism-previewer-gradient', 'need_css' => 1],\n 13 => ['name' => 'Preview: Time', 'url' => $baseUrl . 'previewer-time/', 'file' => 'prism-previewer-time', 'need_css' => 1],\n\n 14 => ['name' => 'Show Invisibles', 'url' => $baseUrl . 'show-invisibles/', 'file' => 'prism-show-invisibles', 'need_css' => 1],\n 15 => ['name' => 'Show Language', 'url' => $baseUrl . 'show-language/', 'file' => 'prism-show-language', 'need_css' => 1],\n // Docs not correctly linking\n // 16 => array('name' => 'WebPlatform Docs', 'url' => $base_url . 'wpd/', 'file' => 'prism-wpd', 'need_css' => 1),\n 16 => ['name' => 'Normalize Whitespace', 'url' => $baseUrl . 'normalize-whitespace/', 'file' => 'prism-normalize-whitespace', 'need_css' => 0],\n ];\n }",
"private static function loadLibs(){\n $file = Storange::getBaseWowPath().'wow/lib/readbeans/rb.php';\n if(file_exists($file)){\n include_once $file;\n }\n }",
"public function models()\n {\n $this->_display('models');\n }",
"public function actionLibrary()\n {\n $all_videos = VideoLibrary::model()->findAll();\n $this->render('library', array('data'=>$all_videos,'redirect'=>'index.php?r=video/third'));\n }",
"public function getDescriptions()\n {\n return [\n 'debug applications' => 'Show all loaded applications'\n ];\n }",
"public function projectBrief(){\n \treturn view('Application/project');\n }",
"private function loadLib(){\n foreach($this->lib as $key=>$lib){\n $this->$key = RO::lib($lib);\n }\n }",
"private function lib($id)\r\n\t\t{\r\n\t\t\treturn $_SESSION['vimofy'][$this->c_ssid]['lib'][$id];\r\n\t\t}",
"public function index()\n {\n $license = (new Markdown())->parse(file_get_contents(streams_path('LICENSE')));\n\n return view('distribution::license', compact('license'));\n }",
"public function getLibraryName();",
"function showResources() {\n $output = $this->outputBoilerplate('resources.html');\n return $output;\n }",
"public function index()\n {\n // Create Summary for library.\n $results = Book::with('section', 'authors')->paginate(10);\n return view('summary', compact('results', $results));\n }",
"protected function displayReleases()\n\t{\n\t\t$releases = $this->releasesManager->getValidationFile();\n\t\t$this->command->comment('Here are the available releases :');\n\n\t\t$key = 0;\n\t\tforeach ($releases as $name => $state) {\n\t\t\t$name = DateTime::createFromFormat('YmdHis', $name);\n\t\t\t$name = $name->format('Y-m-d H:i:s');\n\t\t\t$method = $state ? 'info' : 'error';\n\t\t\t$state = $state ? '✓' : '✘';\n\n\t\t\t$key++;\n\t\t\t$this->command->$method(sprintf('[%d] %s %s', $key, $name, $state));\n\t\t}\n\t}",
"public function library()\n {\n $user = auth()->user();\n $email = $user->email;\n\n $images = [];\n $files_in_folder = \\File::files('images/' . $email);\n\n foreach ($files_in_folder as $path) {\n $images[] = pathinfo($path);\n }\n\n return view('library')->with('images', $images)->with('email', $email)->with('name', $user->name);\n }",
"public static function DaftFrameworkConsoleSources() : array;",
"public function show(Project $project)\n {\n //\n }",
"public function show(Project $project)\n {\n //\n }",
"public function show(Project $project)\n {\n //\n }",
"public function show(Project $project)\n {\n //\n }",
"public function show(Project $project)\n {\n //\n }",
"public function show(Project $project)\n {\n //\n }",
"public function show(Project $project)\n {\n //\n }",
"public function show(Project $project)\n {\n //\n }",
"public function show(Project $project)\n {\n //\n }",
"public function actionIndex()\n\t{\n\t\t$projects = SlideProject::model()->findAllByAttributes(array('status'=>1), array('order'=>'t.id ASC'));\n\t\t$this->render('index', array(\n\t\t\t'projects'=>$projects\n\t\t\t));\n\t}",
"public function index()\n\t{\n\t\t$vendors = $this->vendor->all();\n\n\t\treturn View::make('vendors.index', compact('vendors'));\n\t}",
"public function index() // метод для отображения данных всех проектов\n {\n return view('project.index',\n [\n \"projects\" => $this->projects->all(),\n //\"task\" => $this->tasks->all(),\n ]\n );\n }",
"public function index()\n {\n $projects = Project::all();\n\n return $this->showAll($projects);\n }",
"public function printAssets() {\n $output = '';\n\n foreach($this->getSortedAssets() as $package => $assets) {\n // if minification enabled then replace the assets with minified ones\n if ($this->_minify) {\n $assets = $this->_minifier->minify($assets, $package);\n }\n \n foreach($assets as $asset) {\n $output .= '<link rel=\"stylesheet\" href=\"'. $asset->getUrl() .'\" data-package=\"'. $package .'\">'. NL;\n }\n }\n\n return $output;\n }",
"public function library_path()\n\t{\n\t\treturn $this->vendor_path();\n\t}",
"public function sdkInfo()\n {\n return view('client.sms-sdk-info');\n }",
"protected function setupAssetsInfo() {\n JQuery::registerJQuery();\n $this->addYiiGemsCommonCss();\n $this->addFontAwesomeCss();\n $this->addAssetInfo(\n array( \"$this->style.css\", \"faq.js\"),\n dirname(__FILE__) . \"/assets\"\n );\n $this->addGradientAssets($this->gradient);\n }",
"public function listFrameworkFiles() {\r\n\t\t$preload = array(\r\n\t\t\t\"Yii.js\",\r\n\t\t\t\"base/CComponent.js\",\r\n\t\t\t\"base/CApplicationComponent.js\",\r\n\t\t\t\"base/CException.js\",\r\n\t\t\t\"base/CEvent.js\",\r\n\t\t\t\"base/CEnumerable.js\",\r\n\t\t\t\"base/CModule.js\",\r\n\t\t\t\"collections/CList.js\",\r\n\t\t\t\"collections/CMap.js\",\r\n\t\t\t\"validators/CValidator.js\",\r\n\t\t\t\"i18n/CMessageSource.js\",\r\n\t\t\t\"web/filters/CFilter.js\",\r\n\t\t\t\"web/renderers/CViewRenderer.js\",\r\n\t\t\t\"web/form/CFormElement.js\",\r\n\t\t\t\"web/CBaseController.js\",\r\n\t\t\t\"web/widgets/CWidget.js\",\r\n\t\t\t\"logging/CLogRoute.js\",\r\n\t\t\t\"logging/CWebLogRoute.js\",\r\n\t\t\t\"web/CView.js\",\r\n\t\t);\r\n\t\t\r\n\t\t$return = array();\r\n\t\t$fullPath = $this->frameworkPath;\r\n\t\r\n\t\tforeach($preload as $file) {\r\n\t\t\t$return[] = $fullPath.\"/\".$file;\r\n\t\t}\r\n\t\t\r\n\t\t$options = array(\r\n\t\t\t\"fileTypes\" => array(\"js\"),\r\n\t\t\t\"exclude\" => array_merge($preload, array(\r\n\t\t\t\t\"data\", \"messages\"\r\n\t\t\t))\r\n\t\t);\r\n\t\t\r\n\t\t$return = array_merge($return, CFileHelper::findFiles($fullPath,$options));\r\n\t\t\r\n\t\t\r\n\t\treturn $return;\r\n\t}",
"public function actionList() {\r\n\t\t$response = new AJSONResponse();\r\n\r\n\t\t$response->packages = new CAttributeCollection();\r\n\t\tforeach(Yii::app()->packageManager->packages as $package) {\r\n\t\t\t$response->packages[$package->name] = $package;\r\n\t\t}\r\n\t\t$response->packages = $response->packages->toArray();\r\n\t\t$response->render();\r\n\t}",
"protected function setupAssetsInfo() {\n JQuery::registerJQuery();\n $this->addAssetInfo(\n array(\"js/jquery.cookie.js\" ),\n $this->getCommonAssetDir()\n );\n $this->addAssetInfo(\n \"smartScrollPane.css\",\n dirname(__FILE__) . \"/assets\"\n );\n }",
"public function index()\n {\n $compkge=Common_pack::all();\n return view ('commonpack::commonpackage.index',compact('compkge'));\n }",
"public function index()\n {\n return view('admin.project.index', $this->projectRepositoryInterface->indexProject());\n }",
"public function index()\n {\n $packages= Package::all();\n return view('Packages.index',compact('packages'));\n }"
] | [
"0.60208815",
"0.5907887",
"0.56242406",
"0.5551945",
"0.552166",
"0.54081833",
"0.53306717",
"0.5310104",
"0.52883095",
"0.52828646",
"0.52627695",
"0.5251477",
"0.5222435",
"0.5171557",
"0.5169163",
"0.5168592",
"0.5087217",
"0.50619435",
"0.5047678",
"0.50367916",
"0.50146484",
"0.5005974",
"0.49914762",
"0.49905673",
"0.49853414",
"0.49603617",
"0.49537158",
"0.4951542",
"0.49491245",
"0.49466342",
"0.4946366",
"0.491732",
"0.49133888",
"0.48941085",
"0.4877202",
"0.48544377",
"0.4851894",
"0.48518366",
"0.4851485",
"0.48402753",
"0.48336378",
"0.4801959",
"0.47868136",
"0.4779647",
"0.47750804",
"0.47703338",
"0.4770268",
"0.476974",
"0.47696072",
"0.47645584",
"0.4761147",
"0.47458443",
"0.4743284",
"0.473714",
"0.47354847",
"0.47248855",
"0.4724026",
"0.46973386",
"0.4685525",
"0.46830428",
"0.46689615",
"0.466832",
"0.4663126",
"0.46595925",
"0.4655578",
"0.46503004",
"0.46403998",
"0.46383226",
"0.46274343",
"0.46233958",
"0.46222538",
"0.46216714",
"0.46099156",
"0.45972198",
"0.45764422",
"0.4567206",
"0.45650426",
"0.4564222",
"0.4564222",
"0.4564222",
"0.4564222",
"0.4564222",
"0.4564222",
"0.4564222",
"0.4564222",
"0.4564222",
"0.45546848",
"0.45527527",
"0.4551562",
"0.45421726",
"0.4538862",
"0.4538331",
"0.4537024",
"0.45322397",
"0.45303163",
"0.452991",
"0.4527905",
"0.4525094",
"0.45200533",
"0.45162547"
] | 0.6026059 | 0 |
Show files for project. | public function showFiles($projectID, $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$this->doc->setMainMenu();
$uri = $this->app->getURI(true);
$this->app->session->set('taskList', $uri);
$this->app->session->set('docList', $uri);
$project = $this->dao->select('id,name')->from(TABLE_PROJECT)->where('id')->eq($projectID)->fetch();
/* Load pager. */
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
$this->view->title = $project->name;
$this->view->project = $project;
$this->view->files = $this->doc->getLibFiles($projectID, $pager);
$this->view->pager = $pager;
$this->display();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function index()\n {\n\n $this->types->trackFilter();\n\n return view('site::file.index', [\n 'repository' => $this->files,\n 'items' => $this->files->paginate(config('site.per_page.file', 10), ['files.*'])\n ]);\n }",
"public function show()\n {\n return view('files::show');\n }",
"public function index()\n {\n $files = Files::where('uid', Auth::user()->id);\n\n return view('files.index')->with([\n 'files' => $files,\n ]);\n }",
"public function ShowFiles() {\n $i = 0;\n if ($handle = opendir($this->filePath)) {\n while (false !== ($file = readdir($handle))) {\n if (($file != '..') && ($file != '.') && ($file != 'Thumbs.db')) {\n $files[$i] = $file;\n $i++;\n }\n }\n closedir($handle);\n }\n return($files);\n }",
"public function actionIndex()\n {\n $this->isAllow();\n $searchModel = new FilesSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function index() {\n return view('files::index');\n }",
"public function index()\n {\n return view('Files.all');\n }",
"public function view_file() {\n\t\t$currentPath = implode('/', $this->passedArgs);\n\t\t$fullPath = $this->path . $currentPath;\n\t\t$previousPath = implode('/', array_slice($this->passedArgs, 0, count($this->passedArgs) -1));\n\t\t$upOneFolder = implode('/', array_slice($this->passedArgs, 0, count($this->passedArgs) -2));\n\n\t\tif (!file_exists($fullPath)) {\n\t\t\t$this->_notFound(__('No file exists with that name', true));\n\t\t}\n\t\ttry {\n\t\t\t$docs = $this->ApiFile->loadFile($fullPath);\n\t\t} catch(Exception $e) {\n\t\t\t$this->_notFound($e->getMessage());\n\t\t}\n\t\t$classIndex = ClassRegistry::init('ApiGenerator.ApiClass')->getClassIndex();\n\t\tlist($dirs, $files) = $this->ApiFile->read($this->path . $previousPath);\n\n\t\tif (!empty($docs)) {\n\t\t\t$this->set('showSidebar', true);\n\t\t\t$this->set('sidebarElement', 'sidebar/file_sidebar');\n\t\t\t$this->set(compact('currentPath', 'previousPath', 'upOneFolder', 'docs', 'dirs', 'files', 'classIndex'));\n\t\t} else {\n\t\t\t$this->set('previousPath', $previousPath);\n\t\t\t$this->render('no_class');\n\t\t}\n\t}",
"public function viewAllFiles()\n {\n $totalEnabledFiles = File::where('status', 1)->count();\n $enabledFiles = File::where('status', 1)->latest()->paginate(30, ['*'], 'enabledTable');\n $totaldisabledFiles = File::where('status', 1)->count();\n $disabledFiles = File::where('status', 0)->latest()->paginate(30, ['*'], 'disabledTable');\n return view('admin.file.viewAllFiles', compact('totalEnabledFiles', 'enabledFiles', 'totaldisabledFiles', 'disabledFiles'));\n }",
"public function displayFiles()\n {\n // Specify the location of the stored files\n $path = \"application/export/files/\";\n \n // Open the folder \n $dir_handle = @opendir($path); \n\n // Loop through the files \n while ($file = readdir($dir_handle)) { \n\n if($file == \".\" || $file == \"..\" || $file == \"index.php\" ) \n\n continue; \n $myfile = $path.$file;\n $checksum = md5($myfile);\n echo \"<a href=\\\"index.php?mid=700&action=download&f=$file&csum=$checksum&area=export\\\"><span class=\\\"iconSpanExport\\\"><img src=\\\"images/icons/drive-download.png\\\" alt=\\\"User Control\\\" title=\\\"User Control\\\"/><br/>$file</a>\"; \n\n } \n // Close \n closedir($dir_handle); \n \n return;\n \n }",
"public function show()\n {\n $service = Config::get(\"ProjectLister::service\");\n $method = \"fetch_$service\";\n // Fetch\n $projects = self::$method();\n // Sort the list\n $projects = Project::sort( $projects );\n\n $output = '';\n foreach($projects as $project)\n {\n $template = ( Config::get(\"ProjectLister::template\") ) ? Config::get(\"ProjectLister::template\") : Project::getProjectTemplate();\n\n $template = str_replace('{{PROJECT_URL}}', $project->url, $template);\n $template = str_replace('{{PROJECT_NAME}}', htmlentities($project->name), $template);\n $template = str_replace('{{PROJECT_WATCHER_COUNT}}', $project->watchers, $template);\n $template = str_replace('{{PROJECT_DESCRIPTION}}', htmlentities($project->description), $template);\n $template = str_replace('{{PROJECT_SOURCE}}', $project->source, $template);\n $template = str_replace('{{PROJECT_WATCHER_NOUN}}', $project->watcher_noun, $template);\n\n $output .= $template . \"\\n\";\n }\n return $output;\n }",
"public function show($file)\n {\n return view ('admin.files.show');\n }",
"public function show($id)\n {\n $this->project = Project::findOrFail($id);\n $this->upload = true;\n\n if(company()->package->max_storage_size != -1) {\n $fileStorage = FileStorage::all();\n if(company()->package->storage_unit == 'mb') {\n $totalSpace = company()->package->max_storage_size;\n } else {\n $totalSpace = company()->package->max_storage_size*1024;\n }\n //used space in mb\n $usedSpace = $fileStorage->count() > 0 ? round($fileStorage->sum('size')/(1000*1024), 4) : 0;\n\n if($usedSpace > $totalSpace) {\n $this->upload = false;\n }\n }\n\n return view('admin.projects.project-files.show', $this->data);\n }",
"public function show(Project $project)\n {\n //\n }",
"public function show(Project $project)\n {\n //\n }",
"public function show(Project $project)\n {\n //\n }",
"public function show(Project $project)\n {\n //\n }",
"public function show(Project $project)\n {\n //\n }",
"public function show(Project $project)\n {\n //\n }",
"public function show(Project $project)\n {\n //\n }",
"public function show(Project $project)\n {\n //\n }",
"public function show(Project $project)\n {\n //\n }",
"public function index()\n {\n $files=File::where('user_id',auth()->user()->id)->paginate(10);\n return view ('admin.files.index',compact('files'));\n }",
"public function show()\n {\n include $this->path . '.php';\n }",
"public function index()\n\t{\n\t\techo \"Files index controller\";\n\t}",
"public function actionShow()\n\t{\n\t\t$this->render('show',array('model'=>$this->loadfiles()));\n\t}",
"function getFilesPanel() {\n $result = '';\n\n if ($this->params['filter_mode'] == 'tags' && isset($this->params['tag_id'])) {\n $files = $this->getFilesByTag(\n $this->params['tag_id'],\n $this->params['limit_files'],\n $this->params['offset_files'],\n $this->params['file_sort'],\n $this->params['file_order']\n );\n $tag = $this->getBaseTags()->getTags(\n $this->params['tag_id'],\n $this->lngSelect->currentLanguageId\n );\n $title = sprintf($this->_gt('Files by tag \"%s\"'), $tag[$this->params['tag_id']]['tag_title']);\n } elseif ($this->params['filter_mode'] == 'search') {\n if (isset($this->params['search']['q'])) {\n $this->params['search']['q'] = trim($this->params['search']['q']);\n } else {\n $this->params['search']['q'] = '';\n }\n $files = $this->findFiles(\n $this->params['search'],\n $this->params['limit_files'],\n $this->params['offset_files'],\n $this->params['file_sort'],\n $this->params['file_order']\n );\n $title = $this->_gt('Files for search');\n } elseif (isset($this->params['folder_id'])) {\n $files = $this->getFiles(\n $this->params['folder_id'],\n $this->params['limit_files'],\n $this->params['offset_files'],\n $this->params['file_sort'],\n $this->params['file_order']\n );\n if ($this->params['folder_id'] == 0) {\n $title = $this->_gt('Desktop');\n } else {\n $title = $this->currentFolder['folder_name'];\n }\n }\n\n if (isset($files) && is_array($files) && count($files) > 0) {\n $viewMode = 'list';\n if (isset($this->params['mode_view'])) {\n switch ($this->params['mode_view']) {\n case 'tile' :\n case 'list' :\n case 'thumbs' :\n $viewMode = $this->params['mode_view'];\n break;\n }\n }\n $result .= sprintf(\n '<dialog title=\"%s\" action=\"%s#top\" id=\"mediaFilesList\">'.LF,\n papaya_strings::escapeHTMLChars($title),\n papaya_strings::escapeHTMLChars($this->getBaseLink())\n );\n $result .= sprintf(\n '<listview mode=\"%s\">'.LF,\n papaya_strings::escapeHTMLChars($viewMode)\n );\n\n $result .= $this->getFilesPagingBar(\n $this->absCount, $this->params['limit_files'], $this->params['offset_files']\n );\n\n if (is_array($files) && count($files) > 0) {\n if ($this->params['file_sort'] == 'date') {\n if ($this->params['file_order'] == 'asc') {\n $sortLinkDateParams = array('file_sort' => 'date', 'file_order' => 'desc');\n $sortImageDate = 'asc';\n } else {\n $sortLinkDateParams = array('file_sort' => 'date', 'file_order' => 'asc');\n $sortImageDate = 'desc';\n }\n $sortImageName = 'none';\n $sortImageSize = 'none';\n $sortLinkNameParams = array('file_sort' => 'name', 'file_order' => 'asc');\n $sortLinkSizeParams = array('file_sort' => 'size', 'file_order' => 'asc');\n } elseif ($this->params['file_sort'] == 'name') {\n if ($this->params['file_order'] == 'asc') {\n $sortLinkNameParams = array('file_sort' => 'name', 'file_order' => 'desc');\n $sortImageName = 'asc';\n } else {\n $sortLinkNameParams = array('file_sort' => 'name', 'file_order' => 'asc');\n $sortImageName = 'desc';\n }\n $sortImageDate = 'none';\n $sortImageSize = 'none';\n $sortLinkDateParams = array('file_sort' => 'date', 'file_order' => 'asc');\n $sortLinkSizeParams = array('file_sort' => 'size', 'file_order' => 'asc');\n } else {\n if ($this->params['file_order'] == 'asc') {\n $sortLinkSizeParams = array('file_sort' => 'size', 'file_order' => 'desc');\n $sortImageSize = 'asc';\n } else {\n $sortLinkSizeParams = array('file_sort' => 'size', 'file_order' => 'asc');\n $sortImageSize = 'desc';\n }\n $sortImageDate = 'none';\n $sortImageName = 'none';\n $sortLinkDateParams = array('file_sort' => 'date', 'file_order' => 'asc');\n $sortLinkNameParams = array('file_sort' => 'name', 'file_order' => 'asc');\n }\n\n $result .= '<cols>'.LF;\n if ($viewMode != 'tile') {\n $result .= '<col />'.LF;\n $result .= '<col />'.LF;\n }\n $result .= sprintf(\n '<col href=\"%s\" sort=\"%s\">%s</col>'.LF,\n papaya_strings::escapeHTMLChars($this->getLink($sortLinkNameParams)),\n papaya_strings::escapeHTMLChars($sortImageName),\n papaya_strings::escapeHTMLChars($this->_gt('Filename'))\n );\n $result .= sprintf(\n '<col href=\"%s\" sort=\"%s\">%s</col>'.LF,\n papaya_strings::escapeHTMLChars($this->getLink($sortLinkDateParams)),\n papaya_strings::escapeHTMLChars($sortImageDate),\n papaya_strings::escapeHTMLChars($this->_gt('Uploaded'))\n );\n $result .= sprintf(\n '<col href=\"%s\" sort=\"%s\">%s</col>'.LF,\n papaya_strings::escapeHTMLChars($this->getLink($sortLinkSizeParams)),\n papaya_strings::escapeHTMLChars($sortImageSize),\n papaya_strings::escapeHTMLChars($this->_gt('Filesize'))\n );\n $result .= '</cols>'.LF;\n $result .= '<items>'.LF;\n foreach ($files as $fileId => $file) {\n $editLink = $this->getLink(array('cmd' => 'edit_file', 'file_id' => $fileId));\n if ($file['mimetype_icon'] != '') {\n $icon = $file['mimetype_icon'];\n } else {\n $icon = $this->defaultTypeIcon;\n }\n $selected = (isset($this->params['file_id']) && $this->params['file_id'] == $fileId)\n ? ' selected=\"selected\"' : '';\n if (strlen($file['file_name']) > 30) {\n $name = papaya_strings::escapeHTMLChars(\n papaya_strings::truncate(\n $file['file_name'], 30, '', '...'.substr($file['file_name'], -7)\n )\n );\n } else {\n $name = papaya_strings::escapeHTMLChars($file['file_name']);\n }\n $hint = papaya_strings::escapeHTMLChars($file['file_name']);\n if (in_array($viewMode, array('tile', 'thumbs'))) {\n $icon = $this->mimeObj->getMimeTypeIcon($icon);\n if (in_array($file['mimetype'], $this->imageMimeTypes)) {\n include_once(PAPAYA_INCLUDE_PATH.'system/base_thumbnail.php');\n $thumbnail = new base_thumbnail;\n $thumbFile = $thumbnail->getThumbnail(\n $file['file_id'],\n $file['current_version_id'],\n ($viewMode == 'thumbs') ? 100 : 48,\n ($viewMode == 'thumbs') ? 80 : 48\n );\n if ($thumbFile) {\n $icon = $this->getWebMediaLink(\n $thumbFile, 'thumb', $name\n );\n }\n }\n $result .= sprintf(\n '<listitem href=\"%s\" image=\"%s\" title=\"%s\" subtitle=\"%s\" hint=\"%s\" %s>'.LF,\n papaya_strings::escapeHTMLChars($editLink),\n papaya_strings::escapeHTMLChars($icon),\n papaya_strings::escapeHTMLChars($name),\n date('Y-m-d H:i', $file['file_date']),\n papaya_strings::escapeHTMLChars($hint),\n $selected\n );\n $checked = (isset($this->params['batch_files'][$fileId])) ? ' checked=\"checked\"' : '';\n $idName = 'mdb_batch_files_'.$fileId;\n $result .= sprintf(\n '<subitem align=\"center\"><input type=\"checkbox\" name=\"%s[batch_files][%s]\"'.\n ' id=\"%s\" value=\"1\" %s/></subitem>'.LF,\n papaya_strings::escapeHTMLChars($this->paramName),\n papaya_strings::escapeHTMLChars($fileId),\n papaya_strings::escapeHTMLChars($idName),\n $checked\n );\n $result .= '</listitem>'.LF;\n } else {\n $result .= sprintf(\n '<listitem href=\"%s\" image=\"%s\" %s>'.LF,\n papaya_strings::escapeHTMLChars($editLink),\n papaya_strings::escapeHTMLChars($this->mimeObj->getMimeTypeIcon($icon)),\n $selected\n );\n $checked = (isset($this->params['batch_files'][$fileId])) ? ' checked=\"checked\"' : '';\n $idName = 'mdb_batch_files_'.$fileId;\n $result .= sprintf(\n '<subitem align=\"center\"><input type=\"checkbox\" name=\"%s[batch_files][%s]\"'.\n ' id=\"%s\" value=\"1\" %s/></subitem>'.LF,\n papaya_strings::escapeHTMLChars($this->paramName),\n papaya_strings::escapeHTMLChars($fileId),\n papaya_strings::escapeHTMLChars($idName),\n $checked\n );\n $result .= sprintf(\n '<subitem overflow=\"hidden\"><a href=\"%s\" title=\"%s\"'.\n ' style=\"display: block; overflow: hidden;\">%s</a></subitem>'.LF,\n papaya_strings::escapeHTMLChars($editLink),\n papaya_strings::escapeHTMLChars($hint),\n papaya_strings::escapeHTMLChars($name)\n );\n $result .= sprintf(\n '<subitem align=\"center\" wrap=\"nowrap\">%s</subitem>'.LF,\n date('Y-m-d H:i', $file['file_date'])\n );\n $result .= sprintf(\n '<subitem align=\"center\" wrap=\"nowrap\">%s</subitem>'.LF,\n papaya_strings::escapeHTMLChars($this->formatFileSize($file['file_size']))\n );\n $result .= '</listitem>'.LF;\n }\n }\n $result .= '</items>'.LF;\n }\n $result .= '</listview>'.LF;\n if ($viewMode != 'thumbs') {\n $result .= sprintf(\n '<dlgbutton type=\"button\" caption=\"%s\" hint=\"%s\"'.\n ' onclick=\"invertCheckBoxes(this);\" image=\"%s\"/>'.LF,\n papaya_strings::escapeHTMLChars($this->_gt('Invert Selection')),\n papaya_strings::escapeHTMLChars($this->_gt('Invert Selection')),\n papaya_strings::escapeHTMLChars($this->images['status-node-checked'])\n );\n $result .= sprintf(\n '<dlgbutton name=\"%s[batch_cmd][cut]\" value=\"1\" caption=\"%s\" hint=\"%s\" image=\"%s\"/>'.LF,\n papaya_strings::escapeHTMLChars($this->paramName),\n papaya_strings::escapeHTMLChars($this->_gt('Cut')),\n papaya_strings::escapeHTMLChars($this->_gt('Cut')),\n papaya_strings::escapeHTMLChars($this->images['actions-edit-cut'])\n );\n $result .= sprintf(\n '<dlgbutton name=\"%s[batch_cmd][move]\" value=\"1\" caption=\"%s\" hint=\"%s\" image=\"%s\"/>'.LF,\n papaya_strings::escapeHTMLChars($this->paramName),\n papaya_strings::escapeHTMLChars($this->_gt('Move')),\n papaya_strings::escapeHTMLChars($this->_gt('Move')),\n papaya_strings::escapeHTMLChars($this->images['actions-page-move'])\n );\n $result .= sprintf(\n '<dlgbutton name=\"%s[batch_cmd][delete]\" value=\"1\" caption=\"%s\"'.\n ' hint=\"%s\" image=\"%s\"/>'.LF,\n papaya_strings::escapeHTMLChars($this->paramName),\n papaya_strings::escapeHTMLChars($this->_gt('Delete')),\n papaya_strings::escapeHTMLChars($this->_gt('Delete')),\n papaya_strings::escapeHTMLChars($this->images['places-trash'])\n );\n $result .= sprintf(\n '<dlgbutton name=\"%s[batch_cmd][tags]\" value=\"1\" caption=\"%s\" hint=\"%s\" image=\"%s\"/>'.LF,\n papaya_strings::escapeHTMLChars($this->paramName),\n papaya_strings::escapeHTMLChars($this->_gt('Tag')),\n papaya_strings::escapeHTMLChars($this->_gt('Tag')),\n papaya_strings::escapeHTMLChars($this->images['items-tag'])\n );\n }\n $result .= '</dialog>'.LF;\n }\n return $result;\n }",
"public function index()\n {\n $data = $this->searchFiles();\n $datasources = Datasource::get(['id', 'datasource_name']);\n\n return view('uploaded_file.index', ['data' => $data, 'datasources' => $datasources]);\n\n // return view('upload.index');\n }",
"public function actionIndexFiles()\n {\n $manager = new Manager(['module' => $this->module]);\n $manager->indexAll();\n }",
"public function index() // метод для отображения данных всех проектов\n {\n return view('project.index',\n [\n \"projects\" => $this->projects->all(),\n //\"task\" => $this->tasks->all(),\n ]\n );\n }",
"public function browse_files()\n {\n // Scan file directory, render the images.\n if (is_dir($this->file_path)) {\n $files = preg_grep('/^([^.])/', scandir($this->file_path));\n return $files;\n }\n \n }",
"public function index()\n {\n return view('project.index', $this->repository->projectResources())->with('nav', $this->nav);\n ;\n }",
"public function index()\n {\n\n // return view('home')->with('files', $files);\n }",
"public function show(File $file)\n {\n //\n }",
"public function show(File $file)\n {\n //\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $files = $em->getRepository('TikaBundle:UpFile')->findAllOrdered();\n\n return array(\n 'files' => $files,\n );\n }",
"public function index()\n {\n $files = File::all();\n return view('drives.index')->with(['files' => $files]);\n }",
"function fileList(){\n\t\tchdir('./../cloud/books/'); //Move to template directory\n\t\t\n\t\tif ($handle = opendir(getcwd())) { //Open dir\n\t\t echo '<ul class=\"list-group\">';\n\t\t while (false !== ($entry = readdir($handle))) { //While directory not end - return files list\n\t\t \tif ($entry != \".\" && $entry != \".DS_Store\" && $entry != \"..\") { //Filter trash\n\t\t \t\tif(is_dir($entry)){ //IF dir then return button with folder icon \n\t\t \t\t\techo '<a href=\"#\" class=\"list-group-item cat\"><i class=\"fa fa-folder-o\" aria-hidden=\"true\"></i> '.$entry.'</a>';\n\t\t \t\t}else{ //else return file button\n\t\t \t\t\t$FileInfo = new SplFileInfo($entry); //Get file info\n\t\t \t\t\t$ext = $FileInfo->getExtension(); //Get file extension\n\t\t \t\t\tif($ext == \"png\" or $ext == \"jpg\" or $ext == \"bmp\") //IF file is image then return button with image icon\n\t\t \t\t\t\techo '<a href=\"/files/cloud/books/'.$entry.'\" class=\"list-group-item file\"><i class=\"fa fa-file-image-o\" aria-hidden=\"true\"></i> '.$entry.'</a>';\n\t\t \t\t\telse //Else return button with file-code icon\n\t\t \t\t\t\techo '<a href=\"/files/cloud/books/'.$entry.'\" class=\"list-group-item file\"><i class=\"fa fa-file-o\" aria-hidden=\"true\"></i> '.$entry.'</a>';\n\t\t \t\t}\n\t\t \t}\n\t\t }\n\t\t echo '</ul>';\n\t\t closedir($handle); //Close dir\n\t\t}\n\t}",
"public function actionIndex()\n\t{\n\t\t$projects = SlideProject::model()->findAllByAttributes(array('status'=>1), array('order'=>'t.id ASC'));\n\t\t$this->render('index', array(\n\t\t\t'projects'=>$projects\n\t\t\t));\n\t}",
"public function display(): string\n {\n // Apply any defaults for missing metadata\n $this->setDefaults();\n\n // Get the Files\n if (! isset($this->data['files'])) {\n // Apply a target user\n if ($this->data['userId']) {\n $this->model->whereUser($this->data['userId']);\n }\n\n // Apply any requested search filters\n if ($this->data['search']) {\n $this->model->like('filename', $this->data['search']);\n }\n\n // Sort and order\n $this->model->orderBy($this->data['sort'], $this->data['order']);\n\n // Paginate non-select formats\n if ($this->data['format'] !== 'select') {\n $this->setData([\n 'files' => $this->model->paginate($this->data['perPage'], 'default', $this->data['page']),\n 'pager' => $this->model->pager,\n ], true);\n } else {\n $this->setData([\n 'files' => $this->model->findAll(),\n ], true);\n }\n }\n\n // AJAX calls skip the wrapping\n if ($this->data['ajax']) {\n return view('Tatter\\Files\\Views\\Formats\\\\' . $this->data['format'], $this->data);\n }\n\n return view('Tatter\\Files\\Views\\index', $this->data);\n }",
"public function files();",
"public function files();",
"public function files();",
"public function index()\n {\n $projects = Project::getAll();\n require_once('views/projects/index.php');\n }",
"public function index()\n {\n $my_files=Myfile::paginate(5);\n return view('index',compact('my_files'));\n }",
"public function index()\n {\n $files = $this->files\n ->getFilesPaginated(config('core.sys.file.default_per_page'))\n ->items();\n return $this->handler\n ->apiResponse($files);\n }",
"public function filemanager()\n\t{\n\t\t$url = config('files.url') . '?langCode=' . config('app.locale');\n\n\t\treturn view('admin.filemanager', compact('url'));\n\n\t}",
"public function show(projects $projects)\n {\n //\n }",
"public function loadFilesLaunch()\r\n {\r\n $id = Input::get('ID');\r\n $project = Project::find($id);\r\n $files=[];\r\n if($project!=null)\r\n {\r\n $internalAndPublicFiles = $project->filesByType(array('public','clientVendor'));\r\n foreach($internalAndPublicFiles as $file)\r\n {\r\n $files[]=['id'=>$file->id,'name'=>$file->fileName,'url'=>$file->url,'projectId'=>$id];\r\n }\r\n }\r\n return json_encode($files);\r\n }",
"public function loadFilesProject()\r\n {\r\n $id = Input::get('ID');\r\n $project = Project::find($id);\r\n $files=[];\r\n if($project!=null)\r\n {\r\n $internalAndPublicFiles = $project->filesByType(array('internal','public'));\r\n foreach($internalAndPublicFiles as $file)\r\n {\r\n $files[]=['id'=>$file->id,'name'=>$file->fileName,'url'=>$file->url,'date'=>$file->created_at];\r\n }\r\n }\r\n return json_encode($files);\r\n }",
"function list_files () {\n\t\t$root = $this->get_root();\n\t\t\n\t\treturn $this->_list_files($root);\n\t}",
"public function index()\n {\n $files = File::paginate(10);\n\n\n //dd($files);\n return view('files.index',[\n 'files' => $files\n ]);\n\n }",
"public function show(Projects $projects)\n {\n //\n }",
"public function show(Project $project)\n {\n foreach($project->users as $user){\n echo $user->name.\"<br>\";\n }\n }",
"public function index()\n\t{\n\t\treturn View::make('file_templates.index',array('templates'=>Filetemplate::all()))\n\t\t\t\t\t->with('title','File Templates')\n\t\t\t\t\t->with('activeLink','system_manager');\n\t}",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('HypoTestBundle:File')->findAll();\n\n return array('entities' => $entities);\n }",
"public function index(Request $request)\n\t{\n\t\t/*$doc = config('options.mime.doc');\n\t\tdd(Files::name($request->get('name'))->where('mime', $doc));*/\n\n\t\t$files = Files::name($request->get('name'))->orderBy('id', 'DESC')->paginate();\n\n\t\t// $files = Files::filterAndPaginate($request->get('name'));\n\n\t\treturn view('admin.files.index', compact('files'));\n\t}",
"function arquivos() {\n\t\t$this->validate();\n\t\t$this->setupTemplate(true);\n\t\t$templateMgr =& TemplateManager::getManager();\n\n\t\t//carregar lista de arquivos:\n\t\t$templateMgr->assign('files', $this->listar());\n\t\t$templateMgr->display('files/files.tpl');\n\t}",
"public function index()\n {\n return view('admin.project.index', $this->projectRepositoryInterface->indexProject());\n }",
"public function index()\n {\n $this->doc->setMainMenu();\n\n $projects = $this->doc->getLimitLibs('project', '9');\n $customLibs = $this->doc->getLimitLibs('custom', '9');\n $subLibs = $this->doc->getSubLibGroups(array_keys($projects));\n\n $this->view->title = $this->lang->doc->common . $this->lang->colon . $this->lang->doc->index;\n $this->view->projects = $projects;\n $this->view->customLibs = $customLibs;\n $this->view->subLibs = $subLibs;\n $this->display();\n }",
"public function index()\n {\n $projects = Project::all();\n\n return $this->showAll($projects);\n }",
"public function index()\n {\n $projects = Project::all();\n $formats = Format::all();\n $format_terms = FormatTerm::all();\n $archetypes = Archetype::all();\n\n return view('projects.index', ['projects' => $projects, 'formats' => $formats, 'archetypes' => $archetypes,\n 'format_terms' => $format_terms]);\n }",
"public function get_files_list($project_id = null , $file_parent_id = null){\r\n \r\n $this->IdeFile->recursive = 0;\r\n $condition = array(\"IdeFile.project_id \" => $project_id , \"IdeFile.file_parent_id \" => $file_parent_id );\r\n $results = $this->IdeFile->find(\"all\",array('conditions' => $condition));\r\n $this->set('ideFiles',$this->shift_array_file($results) );\r\n }",
"public function index()\n {\n return view('files.upload')->render();\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => ProjectContent::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function renderFiles() {\r\n\t\tlist($name, $id) = $this->resolveNameID();\r\n\t\t$id .= \"-files\";\r\n\t\t$basePath = $this->basePath;\r\n\t\tif (is_array($basePath)) {\r\n\t\t\t$basePath = array_shift($basePath); // the first folder is selected by default\r\n\t\t}\r\n\t\tob_start();\r\n\t\t$this->widget('zii.widgets.jui.CJuiSelectable', array(\r\n\t\t\t'items'=>array(\r\n\t\t\t\t'id1'=>'<strong>blah</strong> Item 1',\r\n\t\t\t\t'id2'=>'Item 2',\r\n\t\t\t\t'id3'=>'Item 3',\r\n\t\t\t),\r\n\t\t\t'id' => $id,\r\n\t\t));\r\n\t\tYii::app()->clientScript->registerCSS(__CLASS__.\":\".$id,<<<CSS\r\n#$id .ui-selecting { background: #FECA40; }\r\n#$id .ui-selected { background: #F39814; color: white; }\r\n#$id { list-style-type: none; margin: 0; padding: 0; }\r\n#$id li {\r\n\tmargin: 3px;\r\n\tpadding: 10px;\r\n\tfloat: left;\r\n\twidth: 60px;\r\n\theight: 40px;\r\n\ttext-align: center;\r\n\t}\r\n\t\t\r\nCSS\r\n\t\t);\r\n\t\t$html = ob_get_clean();\r\n\t\treturn $html;\r\n\t}",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $trialProtocolFiles = $em->getRepository('ErpBundle:TrialProtocolFile')->findAll();\n\n return $this->render('trialprotocolfile/index.html.twig', array(\n 'trialProtocolFiles' => $trialProtocolFiles,\n ));\n }",
"public function index()\n {\n if(Auth::user()->is_admin == 1){ \n $files = File::all(); \n return view('admin.files.index', ['files'=>$files]);\n }else{\n $id = Auth::user()->id; \n $files = File::where('user_id', Auth::id())->get(); \n return view('pages.files.index', ['files'=>$files]);\n }\n \n }",
"private function overview()\n {\n foreach ($this->manager->getTranslationFiles() as $lang => $namespaces) {\n $files = 0;\n foreach ($namespaces as $namespace) {\n $files += count($namespace);\n }\n\n $this->info(\n $lang . ': Found ' . $files . ' files with ' . count($this->manager->getTranslationValues($lang)) .\n ' values' . (config('app.locale', null) == $lang ? ' *primary locale' : '')\n );\n }\n }",
"public function index()\n\t{\n $projects = $this->project->all();\n\n\t\treturn view('projects.index', compact('projects'));\n\t}",
"public function actionIndex()\n {\n $searchModel = new FileSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n\t\tif(!Yii::$app->user->can(User::STATUS_ACTIVE)){\n\t\t\t$searchModel->user_id = Yii::$app->user->getId();\n\t\t}\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function file(){\n $multilevel = menuadmin::get_data();\n $index = menuadmin::where('part','file')->first();\n $aktif_menu = menuadmin::aktif_menu($index['id']);\n return view('backend.att.file', compact('multilevel','aktif_menu'));\n }",
"public function index(Request $request)\n {\n $files = scandir(public_path('admin'));\n unset($files[0]);\n unset($files[1]);\n $files['backpath'] = null;\n $path = 'general_folder';\n $name = '';\n\n return view('Admin::file.index', compact('files', 'name', 'path'));\n }",
"public function index() \n {\n $projects = Project::where('systemID', app('system')->id)->get();\n return view('projects.index', compact('projects'));\n }",
"public function loadFilesAdmin()\r\n {\r\n $id = Input::get('ID');\r\n $project = Project::find($id);\r\n $files=[];\r\n if($project!=null){\r\n $files = $project->files;\r\n }\r\n return json_encode($files);\r\n }",
"public function actionIndex()\n {\n $searchModel = new ProjectSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function actionIndex()\n {\n $searchModel = new ProjectSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function index()\n {\n return view('file_upload/index');\n }",
"function _showFileBrowser() {\r\n global $_ARRAYLANG;\r\n\r\n $this->_objTpl->loadTemplateFile('module_fileBrowser_frame.html');\r\n\r\n switch($this->_mediaType) {\r\n case 'webpages':\r\n $strWebPath = 'Webpages (DB)';\r\n break;\r\n default:\r\n if (array_key_exists($this->_mediaType, $this->mediaTypePaths)) {\r\n $strWebPath = $this->mediaTypePaths[$this->_mediaType][1].$this->_path;\r\n } else {\r\n $strWebPath = ASCMS_CONTENT_IMAGE_WEB_PATH.$this->_path;\r\n }\r\n }\r\n\r\n $this->_objTpl->setVariable(array(\r\n 'CONTREXX_CHARSET' => CONTREXX_CHARSET,\r\n 'FILEBROWSER_WEB_PATH' => $strWebPath,\r\n 'TXT_CLOSE' => $_ARRAYLANG['TXT_CLOSE']\r\n ));\r\n\r\n $this->_setNavigation();\r\n $this->_setUploadForm();\r\n $this->_setContent();\r\n $this->_showStatus();\r\n $this->_objTpl->show();\r\n }",
"public function index(Request $request, Project $project, $branch_name){\n\t\treturn view(\n\t\t\t'files_and_folders.index',\n\t\t\t[\n\t\t\t\t'project' => $project,\n\t\t\t\t'branch_name' => $branch_name,\n\t\t\t\t'filename' => $request->filename\n\t\t\t]\n\t\t);\n\t}",
"public function index()\n {\n $projects = Project::paginate(12);\n\n return view('admin.project.index', [\n 'records' => $projects,\n 'base' => $this->base\n ]);\n }",
"public function index()\n {\n $files = Upload::all();\n return view('upload', compact('files'));\n }",
"public function index()\n {\n //\n return view('admin.projects.index')->with('projects', Project::all());\n }",
"private function printProjectNames(String $path, String $name)\n {\n $finder = new Finder();\n $finder->files()->name('/\\.yaml$/');\n $this->output->writeln('');\n $this->output->writeln('<fg=green;options=bold>'.$name.':</>');\n foreach (iterator_to_array($finder->in($path), false) as $file) {\n $this->output->writeln(\n ' <options=bold>'\n . $this->yamlFileNameToCommandName($file->getRelativePathname())\n . '</>'\n . ($this->info ? ' <fg=blue>('.$file->getRealPath().')</>' : '')\n );\n }\n }",
"public function actionIndex() {\n $searchModel = new FingerDownloadSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $path = Yii::getAlias('@webroot').'/fingerfile/';\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'path' => $path\n ]);\n }",
"private function printSelectionPage() {\n\t\techo '<ul data-role=\"listview\" data-inset=\"true\">';\n\t\t$dir = new DirectoryIterator ( $this::filesPath );\n\t\tforeach ( $dir as $fileinfo ) {\n\t\t\tif (! $fileinfo->isDot ()) {\n\t\t\t\t$fileName = pathinfo ( $fileinfo->getFilename (), PATHINFO_FILENAME );\n\t\t\t\t$fileFullPath = $fileinfo->getPath () . '/' . $fileinfo;\n\t\t\t\t$lection = fgets ( fopen ( $fileFullPath, 'r' ) );\n\t\t\t\tif (strcmp ( \"-stat\", substr ( $fileName, - 5 ) ) != 0) {\n\t\t\t\t\techo '<li>\n\t\t\t\t\t\t<a class=\"ui-btn ui-btn-icon-right ui-icon-carat-r\" data-form=\"ui-btn-up-a\" href=\"?q=lesson&l=', $fileName, '\">', $lection, '</a>\n\t\t\t\t\t\t</li>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\techo '</ul>';\n\t}",
"public function show() {\n\t\t$buffer = \"\";\n\n\t\t// Load the files\n\t\tforeach ($this->files as $file) {\n\t\t\t$buffer .= file_get_contents($file);\n\t\t}\n\n\t\t// Compress the files\n\t\t$buffer = preg_replace('!/\\*[^*]*\\*+([^/][^*]*\\*+)*/!', '', $buffer); // comments\n\t\t$buffer = str_replace(': ', ':', $buffer); // space after colon\n\t\t$buffer = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\", \"\\t\", ' ', ' ', ' '), '', $buffer); // whitespace\n\n\t\t// Enable zip compression\n\t\tob_start(\"ob_gzhandler\");\n\t\theader('Cache-Control: public');\n\t\theader('Expires: ' . gmdate('D, d M Y H:i:s', time() + 86400) . ' GMT'); // 1 day\n\t\theader(\"Content-type: text/css\");\n\n\t\t// Output to browser\n\t\techo($buffer);\n\t}",
"public function getFiles ();",
"public function getFiles();",
"public function getFiles();",
"public function getFiles();",
"public function index()\n {\n $projects = Project::get();\n return view('project.index', compact('projects'));\n }",
"public function index()\n {\n $images = File::all();\n return view('view-uploads')->with('images', $images);\n }",
"public function getFiles()\n {\n echo json_encode($this->galery->getFiles());\n }",
"public function index(){\n\t\treturn view('project');\n\t}",
"public function index() {\n\n $projects = Project::whereRaw('1=1')->get();\n //->paginate(self::COUNT_PER_PAGE);\n\n return view('backend.project.list', [\n 'projects' => $projects\n ]);\n }",
"public function browse() {\n\n \n $data['view_name'] = \"filebrowse\";\n\n $this->load->view(\"admin/common/template\", $data);\n }",
"public function listCommand() {\n\t\t$iterator = new DirectoryIterator(UploadManager::UPLOAD_FOLDER);\n\n\t\t$counter = 0;\n\t\tforeach ($iterator as $file) {\n\t\t\tif ($file->isFile()) {\n\t\t\t\t$counter++;\n\t\t\t\t$this->outputLine($file->getFilename());\n\t\t\t}\n\t\t}\n\n\t\t$this->outputLine();\n\t\t$this->outputLine(sprintf('%s temporary file(s).', $counter));\n\t}",
"public function index()\n {\n \t//Obtenemos todos los archivos almacenados\n $archivos = Storage::disk('local')->files();\n //Filtramos los archivos, y nos quedamos sólo con los txt\n $archivos_txt = array_filter($archivos, function ($item) {return strpos($item, 'txt');});\n //Les quitamos la extensión\n $archivos_txt = array_map(function ($item){return substr($item,0, -4);}, $archivos_txt);\n //Mostramos la vista\n return View::make(\"listTxt\", compact('archivos_txt'));\n }",
"public function index()\n {\n $project = Project::all();\n return view('admin.projects.index', ['projects' => $projects]);\n }"
] | [
"0.690084",
"0.6798628",
"0.66780096",
"0.6556828",
"0.6529496",
"0.64509404",
"0.6388526",
"0.63789344",
"0.6368741",
"0.631704",
"0.6311938",
"0.62367433",
"0.62305564",
"0.6224735",
"0.6224735",
"0.6224735",
"0.6224735",
"0.6224735",
"0.6224735",
"0.6224735",
"0.6224735",
"0.6224735",
"0.62086344",
"0.61655915",
"0.61598",
"0.61400187",
"0.61375",
"0.61167365",
"0.6105942",
"0.60941017",
"0.6081213",
"0.6077606",
"0.6077568",
"0.6074284",
"0.6074284",
"0.60658866",
"0.6044965",
"0.602846",
"0.60144913",
"0.5990069",
"0.59841",
"0.59841",
"0.59841",
"0.59639597",
"0.59587765",
"0.59536135",
"0.59503955",
"0.59326786",
"0.5930896",
"0.59183395",
"0.5902336",
"0.590084",
"0.58924675",
"0.58780706",
"0.5877361",
"0.5870976",
"0.5859463",
"0.5857972",
"0.5850592",
"0.5843432",
"0.5839628",
"0.5838182",
"0.5836711",
"0.581206",
"0.58051133",
"0.5802749",
"0.57976866",
"0.57908833",
"0.5781352",
"0.57772106",
"0.5772893",
"0.57702327",
"0.5762807",
"0.57583845",
"0.575187",
"0.5749393",
"0.5749393",
"0.57459027",
"0.5745536",
"0.57440567",
"0.5739771",
"0.5734702",
"0.57312876",
"0.57274175",
"0.5724475",
"0.5713726",
"0.5703928",
"0.5703179",
"0.57011086",
"0.57011086",
"0.57011086",
"0.5698678",
"0.5698298",
"0.5693521",
"0.56777567",
"0.5675559",
"0.56709003",
"0.56696594",
"0.5669477",
"0.5664004"
] | 0.6256061 | 11 |
Run the database seeds. | public function run()
{
Ayar::create(['name' => 'baslik', 'value' => 'Yazılım Dünyası']);
Ayar::create(['name' => 'author', 'value' => 'Ahmet TORPİL']);
Ayar::create(['name' => 'aciklama', 'value' => 'Az kod Çok iş..']);
Ayar::create(['name' => 'keywords', 'value' => 'yazlılım, php, java']);
Ayar::create(['name' => 'facebook', 'value' => 'https://www.facebook.com/ahmet.torpil.3']);
Ayar::create(['name' => 'twitter', 'value' => 'https://www.twitter.com/torpilahmet']);
Ayar::create(['name' => 'github', 'value' => 'https://www.github.com/torpilahmet']);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }",
"public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }",
"public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }",
"public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }",
"public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }",
"public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }",
"public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }",
"public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }",
"public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }",
"public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }",
"public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }",
"public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }",
"public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }",
"public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }",
"public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }",
"public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }",
"public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}",
"public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }",
"public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}",
"public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }",
"public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }",
"public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }",
"public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }",
"public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }",
"public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }",
"public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}",
"public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }",
"public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }",
"public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }",
"public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }",
"public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }",
"public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }",
"public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }",
"public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }",
"public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }",
"public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }",
"public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }",
"public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }",
"public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }",
"public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }",
"public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}",
"public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }",
"public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }",
"public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }",
"public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }",
"public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }",
"public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }",
"public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }",
"public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }"
] | [
"0.8013876",
"0.79804534",
"0.7976992",
"0.79542726",
"0.79511505",
"0.7949612",
"0.794459",
"0.7942486",
"0.7938189",
"0.79368967",
"0.79337025",
"0.78924936",
"0.78811055",
"0.78790957",
"0.78787595",
"0.787547",
"0.7871811",
"0.78701615",
"0.7851422",
"0.7850352",
"0.7841468",
"0.7834583",
"0.7827792",
"0.7819104",
"0.78088796",
"0.7802872",
"0.7802348",
"0.78006834",
"0.77989215",
"0.7795819",
"0.77903426",
"0.77884805",
"0.77862066",
"0.7778816",
"0.7777486",
"0.7765202",
"0.7762492",
"0.77623445",
"0.77621746",
"0.7761383",
"0.77606887",
"0.77596676",
"0.7757001",
"0.7753607",
"0.7749522",
"0.7749292",
"0.77466977",
"0.7729947",
"0.77289546",
"0.772796",
"0.77167094",
"0.7714503",
"0.77140456",
"0.77132195",
"0.771243",
"0.77122366",
"0.7711113",
"0.77109736",
"0.7710777",
"0.7710086",
"0.7705484",
"0.770464",
"0.7704354",
"0.7704061",
"0.77027386",
"0.77020216",
"0.77008796",
"0.7698617",
"0.76985973",
"0.76973504",
"0.7696405",
"0.7694293",
"0.7692694",
"0.7691264",
"0.7690576",
"0.76882726",
"0.7687433",
"0.7686844",
"0.7686498",
"0.7685065",
"0.7683827",
"0.7679184",
"0.7678287",
"0.76776296",
"0.76767945",
"0.76726556",
"0.76708084",
"0.76690495",
"0.766872",
"0.76686716",
"0.7666299",
"0.76625943",
"0.7662227",
"0.76613766",
"0.7659881",
"0.7656644",
"0.76539344",
"0.76535016",
"0.7652375",
"0.7652313",
"0.7652022"
] | 0.0 | -1 |
A visual identifier that represents this user. | public function getUsername(): string
{
return (string) $this->email;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getUserVisibleName() {\n\t\t\treturn $this->getUID();\n\t\t}",
"public function getName()\n {\n return self::USER_ID;\n }",
"public function getVisualId()\n {\n return $this->getId();\n }",
"public function getId() {\n\t\treturn SYS_USERNAME;\n\t}",
"public function getIdentifier()\n {\n return $this->uid;\n }",
"public function getIdentifier()\n {\n return $this->user->email;\n }",
"function accountViewTemplate()\n {\n return $this->AccountIdentifier;\n }",
"public function getUserIdentifier()\n {\n // that's why I am sending the id here\n return $this->id;\n }",
"public function getUserIdentifier(): string\n\t{\n\t\treturn (string)$this->siret;\n\t}",
"public function getAuthIdentifier() {\n return $this->id_user;\n }",
"public function getAuthIdentifier()\n {\n return (string) $this->user['id'];\n }",
"public function getUserIdentifier(): string\n {\n return (string) $this->username;\n }",
"public function getUserNameIdentifier()\n {\n return $this->user_name;\n }",
"public function id()\n {\n return $this->user->id;\n }",
"public static function username() {\n return 'user_id';\n }",
"public function getUserID () {\n return $this->id;\n }",
"public function getId()\n {\n return $this->ID_user;\n }",
"public function getId()\n {\n return $this->username;\n }",
"public function uniqueId(): string\n {\n return strval($this->user->id);\n }",
"public static function id ()\n {\n return self::user()->getId();\n }",
"public function getID() {\n return $this->user_id;\n }",
"public function getUser_ident()\n {\n return $this->user_ident;\n }",
"public static function getNameIdentification() {\n global $advancedCustomUser;\n if (self::isLogged()) {\n if (!empty(self::getName()) && empty($advancedCustomUser->doNotIndentifyByName)) {\n return self::getName();\n }\n if (!empty(self::getMail()) && empty($advancedCustomUser->doNotIndentifyByEmail)) {\n return self::getMail();\n }\n if (!empty(self::getUserName()) && empty($advancedCustomUser->doNotIndentifyByUserName)) {\n return self::getUserName();\n }\n if (!empty(self::getUserChannelName())) {\n return self::getUserChannelName();\n }\n }\n return __(\"Unknown User\");\n }",
"public function getUserId()\n {\n return parent::getValue('user_id');\n }",
"public function getUsername() {\n\t\treturn parent::getId();\n\t}",
"public function getUserIdentifier(): string\n {\n return (string) $this->login;\n }",
"function getUserIdentifier()\n\t{\n\t\tif ($this->serverType == \"activedirectory\") {\n\t\t\treturn $this->attr_sambalogin;\n\t\t} else {\n\t\t\treturn $this->attr_login;\n\t\t}\n\t}",
"public function getUserIdName()\n {\n return $this->userRepo->getUserIdName();\n }",
"public function id() {\n return isset($this->_adaptee->user_info['user_id']) ? $this->_adaptee->user_info['user_id'] : null;\n }",
"public function id()\n {\n return $this->user()->getEmail();\n }",
"public function getUserIdentifier(): string\n {\n return (string) $this->getEmail();\n }",
"public function id()\n {\n return $this->_getAuthId();\n }",
"public function getUserId()\n {\n return $this->getValue('nb_user_id');\n }",
"public function getUserId()\n {\n return UsniAdaptor::app()->user->getId();\n }",
"public function getUserIdentifier(): string\n {\n return (string)$this->key_hash;\n }",
"public function getId_user()\n {\n return $this->id_user;\n }",
"public function getId_user()\n {\n return $this->id_user;\n }",
"public function getId_user()\n {\n return $this->id_user;\n }",
"public function getId_user()\n {\n return $this->id_user;\n }",
"Public Function UserId() {\n\t\treturn $this->userId;\n\t\n\t}",
"public function getUsername()\n {\n return $this->getUserIdentifier();\n }",
"public function get_user_id();",
"public function getAuthIdentifier() {\n return $this->username;\n }",
"public function getAuthIdentifierName()\n {\n return $this->getKey();\n }",
"public function getIdentifier() {\n\n\t\t// String Prefix muss vorhanden sein -> reiner Zahlenwert wirft Exception nach dem Absenden\n\t\t// @see: https://wiki.typo3.org/Exception/CMS/1210858767\n\t\treturn md5($this->contentObject->data['uid']);\n\t}",
"public function getId()\n {\n return $this->user->id;\n }",
"public function get_id_user()\n\t{\n\t\treturn $this->id_user;\n\t}",
"public function getIduser()\n {\n return $this->iduser;\n }",
"public function getId_user()\n {\n return $this->_id_user;\n }",
"public function getId_user()\n {\n return $this->_id_user;\n }",
"public function getID(): string {\n\t\treturn 'user_ldap';\n\t}",
"public function getUserid()\n {\n return $this->get(self::_USERID);\n }",
"public function getUserid()\n {\n return $this->get(self::_USERID);\n }",
"public function getUserid()\n {\n return $this->get(self::_USERID);\n }",
"public function getAuthIdentifierName() {\n return 'username';\n }",
"public function getAuthIdentifierName(){\n return 'id';\n }",
"public function getAuthIdentifierName()\n {\n return 'id';\n }",
"public function getAuthIdentifierName()\n {\n return 'id';\n }",
"public function getAuthIdentifierName()\n {\n return 'id';\n }",
"public function getAuthIdentifierName()\n {\n return 'id';\n }",
"public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }",
"public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }",
"public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }",
"public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }",
"public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }",
"public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }",
"public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }",
"public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }",
"public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }",
"public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }",
"public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }",
"public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }",
"public function getIstId() {\n return $this->data->username;\n }",
"public function getNameIdentificationBd() {\n global $advancedCustomUser;\n if (!empty($this->name) && empty($advancedCustomUser->doNotIndentifyByName)) {\n return $this->name;\n }\n if (!empty($this->email) && empty($advancedCustomUser->doNotIndentifyByEmail)) {\n return $this->email;\n }\n if (!empty($this->user) && empty($advancedCustomUser->doNotIndentifyByUserName)) {\n return $this->user;\n }\n if (!empty($this->channelName)) {\n return $this->channelName;\n }\n return __(\"Unknown User\");\n }",
"public function getId()\n {\n return $this->app['security']->getToken()->getUser()->getId();\n }",
"public function getUserID() {\n\t\t\treturn $this->iUser; \t\n\t\t}",
"public function getIdUser()\n {\n return $this->id_user;\n }",
"public function getIdUser()\n {\n return $this->id_user;\n }",
"public function getIdUser()\n {\n return $this->id_user;\n }",
"protected function author()\n {\n if ($this->presenter->wasByCurrentUser() || !$this->wrappedObject->user_id) {\n return 'You ';\n }\n\n if (!$this->wrappedObject->security) {\n return 'This user ';\n }\n\n return $this->presenter->author().' ';\n }",
"public function getIdentifier()\n {\n return $this->getAttribute('metadata.name', null);\n }",
"public function getAuthIdentifierName()\n {\n return \"id\";\n }",
"public function getUserID(){\n return($this->userID);\n }",
"public function getId() {\n foreach ($this->generateCarsInfo() as $prop) {\n $id_user = $prop->getId_user() . \"\\n\";\n }\n return $id_user;\n }",
"public function diviroids_user_id($atts)\n {\n return DiviRoids_Security::get_current_user('ID');\n }",
"public function uid() {\n return $this->uid;\n }",
"public function getUserId()\n {\n return $this->getUserAttribute(static::ATTRIBUTE_ID);\n }",
"public function getDisplaySvrId()\n {\n return $this->get(self::_DISPLAY_SVR_ID);\n }",
"public function get_tyk_id() {\n\t\treturn get_user_meta($this->user->ID, self::META_TYK_USER_ID_KEY, true);\n\t}",
"public function getDisplayHolderNameAttribute()\n {\n if ($this->user_id) return $this->user->displayName;\n return '<a href=\"http://'.$this->alias.'.deviantart.com\">'.$this->alias.'@dA</a>';\n }",
"public function getIdentityField() \n {\n return self::FIELD_SLUG;\n }",
"public function column_user_id( $item ) {\n\n\t\treturn '<strong>' . $item['user_id'] . '</strong> - ' . $item['user_name'];\n\n\t}",
"public static function UserID()\n\t\t{\n\t\treturn sprintf\n\t\t\t(\n\t\t\t'%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n\t\t\tmt_rand(0, 0xffff),\n\t\t\tmt_rand(0, 0xffff),\n\t\t\tmt_rand(0, 0xffff),\n\t\t\tmt_rand(0, 0x0fff) | 0x4000,\n\t\t\tmt_rand(0, 0x3fff) | 0x8000,\n\t\t\tmt_rand(0, 0xffff),\n\t\t\tmt_rand(0, 0xffff),\n\t\t\tmt_rand(0, 0xffff)\n\t\t\t);\n\t\t}",
"public function getIdUser()\n {\n return $this->idUser;\n }",
"public function getIdUser()\n {\n return $this->idUser;\n }",
"function get_id() : string {\n\t$current_user = wp_get_current_user();\n\treturn sha1( $current_user->user_email );\n}",
"public function getIdentifier()\n {\n return 1;\n }",
"public function getUserID() {\n\t\treturn $this->_user_id;\n\t}",
"public function getUserId() {\n\t\treturn (string) $this->photo->owner['nsid'];\n\t}",
"public function getIdentifier();",
"public function getIdentifier();"
] | [
"0.69463336",
"0.68791765",
"0.6734728",
"0.6636532",
"0.65999246",
"0.6594324",
"0.6588144",
"0.6577275",
"0.6567396",
"0.6563488",
"0.6538281",
"0.6509249",
"0.650821",
"0.64903057",
"0.64898163",
"0.6444243",
"0.642105",
"0.64198184",
"0.64189166",
"0.6388467",
"0.6387211",
"0.6385023",
"0.6371535",
"0.6359807",
"0.63464564",
"0.63459617",
"0.6344992",
"0.63408",
"0.6338429",
"0.6219284",
"0.62136734",
"0.6206838",
"0.6188641",
"0.6173003",
"0.61712456",
"0.6170825",
"0.6170825",
"0.6170825",
"0.6170825",
"0.6156896",
"0.6148574",
"0.61478376",
"0.6136719",
"0.6135528",
"0.6132647",
"0.6129844",
"0.6120322",
"0.61160237",
"0.6112655",
"0.6112655",
"0.6102091",
"0.6097745",
"0.6097745",
"0.6097745",
"0.6095868",
"0.6088018",
"0.6086944",
"0.6086944",
"0.6086944",
"0.6086944",
"0.6077544",
"0.6077544",
"0.6077544",
"0.6077544",
"0.6077544",
"0.6077544",
"0.6077544",
"0.6077544",
"0.6077544",
"0.6077544",
"0.6077544",
"0.6077544",
"0.6073797",
"0.60706794",
"0.60637754",
"0.60630727",
"0.605864",
"0.605864",
"0.605864",
"0.6054552",
"0.60536",
"0.60516477",
"0.6044654",
"0.6043466",
"0.6042622",
"0.60408235",
"0.60403705",
"0.6038593",
"0.60328907",
"0.60189325",
"0.6005347",
"0.6004857",
"0.5998194",
"0.59976816",
"0.59976816",
"0.5996608",
"0.5996022",
"0.59951305",
"0.5987702",
"0.59870106",
"0.59870106"
] | 0.0 | -1 |
Ensures handler is responsible for this $object type | protected function isExpectedObject($object)
{
return $object instanceof Page;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function isHandler($object): bool;",
"public function handledClass();",
"protected function get_object_type()\n {\n }",
"public function handle($obj)\n {\n\n }",
"abstract protected function handle();",
"public function handlesObject(object $object, ?string $statusName = null): bool;",
"protected abstract function supportsObject($object);",
"private function changelog_validate_object () {\n\t\t# set valid objects\n\t\t$objects = array(\n\t\t\t\t\t\t\"ip_addr\",\n\t\t\t\t\t\t\"subnet\",\n\t\t\t\t\t\t\"section\"\n\t\t\t\t\t\t);\n\t\t# check\n\t\treturn in_array($this->object_type, $objects) ? true : false;\n\t}",
"abstract public function handle();",
"abstract public function handle();",
"protected function verifyHandlerType(HookHandler $handler) {\n\t\tif (!is_callable(array($handler,$this->hookName))) {\n\t\t\ttrigger_error('Could not locate a method named: '.$this->hookName.' or a generic __call method on the handler. Handler methods has to be the same as the hook name or provide a _call method',E_USER_ERROR);\n\t\t}\n\t}",
"private static function validate_type( $object_type ) {\n\t\tif ( ! in_array( $object_type, array( 'post', 'term' ), true ) ) {\n\t\t\tthrow WPSEO_Invalid_Argument_Exception::invalid_type( $object_type );\n\t\t}\n\t}",
"public function type_handler() {\r\n\t\t\r\n\t\t\t$this->next_step();\r\n\t\r\n\t}",
"static private function checkRequirments($object) {\n if (!is_object($object)) {\n self::fail('Must pass an object');\n }\n if (!self::getConfig('allowBlank') && empty((array)$object)) {\n self::fail('Empty object, and allowBlank is disabled');\n }\n if (!isset($object->_id) || empty($object->_id)) {\n $object->_id = self::getId();\n }\n if (!isset($object->_type) || empty($object->_type)) {\n $object->_type = self::getType($object);\n }\n return $object;\n }",
"protected function postCreateHook($object) { }",
"public function isHandled() {\n if (!is_null($this->handler)) {\n return true;\n }\n return false;\n }",
"abstract protected function createHandler();",
"public function getActualHandler();",
"public function testContentTypeHandler()\n {\n $contentHandler = $this->persistenceHandler->contentTypeHandler();\n $this->assertInstanceOf( 'ezp\\\\Persistence\\\\Content\\\\Type\\\\Handler', $contentHandler );\n $this->assertInstanceOf( 'ezp\\\\Persistence\\\\Storage\\\\InMemory\\\\ContentTypeHandler', $contentHandler );\n }",
"public function handlerNeedsRequest()\n {\n }",
"abstract public function shouldHandle(): bool;",
"abstract public function handler() : void;",
"protected function checkForObjectIsValid()\n {\n if (!isset($this->for_object) || !$this->for_object instanceof BaseObject)\n {\n throw new Exception (sprintf('Cannot show comments for object of type %s',\n isset($this->for_object)\n ? ( is_object($this->for_object) ? get_class($this->for_object) : gettype($this->for_object) )\n : \"null\"\n ));\n }\n }",
"abstract protected function handle(): void;",
"final private function markAsHandled(hookHandler $handler) {\n\t\t$this->handled[spl_object_hash($handler)] = true;\n\t}",
"abstract function is_handle($var);",
"function getObjtype() {\n return $this->objtype;\n }",
"abstract public function objType();",
"static private function getType($object) {\n return get_class($object);\n }",
"public function canSetTheContentObjectClassMapAndGetARegisteredContentObject() {}",
"public function handle() {}",
"public function checkObject(): object\n {\n if (!is_object($this->getValue())) {\n throw new TypeInvalidException('object', gettype($this->getValue()));\n }\n\n return $this->getValue();\n }",
"protected abstract function handleRequest();",
"private function checkAccepted(object $object): void\n {\n if (!$object instanceof $this->accepted) {\n throw new InvalidTypeException($this->accepted, get_class($object));\n }\n }",
"function actions_init($event, $object_type, $object) {\n \tregister_action(\"error\");\n \treturn true;\n }",
"function rest_is_object($maybe_object)\n {\n }",
"public function postProcess($object);",
"public function dispatch($object);",
"function onSave()\n {\n $object = parent::onSave();\n }",
"public function isNoValidationTypeDetermined($object): bool;",
"protected abstract function handleData();",
"abstract protected function listensTo($typeName);",
"public static function validateClass( $object ) {\n return is_object( $object ) &&\n in_array( \n get_class($object),\n ['UKMNorge\\Arrangement\\Program\\Hendelse']\n );\n }",
"public function getTypeHandler()\n {\n return $this->handlers[$this->getType()];\n }",
"public function checkType() {\n\t\t//Because the DB gave us a string for the card type, we must\n\t\t//ensure that they are strings and compare accordingly.\n\t\tif (strcmp($this->getTypeAsStr(), \"aspect\")==0) {\n\t\t\t$this->boostInfo = 0;\n\t\t\t$this->magnitude = 0;\n\t\t}\n\t}",
"abstract protected function post_type();",
"abstract public function handleRequest($request);",
"abstract protected function _postHandle();",
"public function testHandler()\n {\n $this->assertInstanceOf( 'ezp\\\\Persistence\\\\Handler', $this->persistenceHandler );\n $this->assertInstanceOf( 'ezp\\\\Persistence\\\\Storage\\\\InMemory\\\\Handler', $this->persistenceHandler );\n }",
"public function handle(): ?bool\n {\n $this->createInterface();\n parent::handle();\n return true;\n }",
"public function getTypeObject()\n {\n return $this->typeObject;\n }",
"public function getIsObject() {\n $primitives = array(\"boolean\", \"integer\", \"int\", \"string\", \"float\");\n return !is_numeric(array_search($this->getType(), $primitives));\n }",
"private function verifyTypes($connectObj) {\n if(method_exists($connectObj, 'getMetadata')){\n $type = $connectObj::getMetadata()->COM_type;\n }\n else{\n $type = get_class($connectObj);\n }\n\n if (array_search($type, $this->connectTypes) === false) {\n throw new \\Exception(sprintf(\"The specified aspect, %s, does not support %s objects\", $this->className(), $type));\n }\n }",
"public static function post_is_object(){\n if( count($_POST)>=1) return (object)$_POST;\n }",
"static public function raise($type) {\n $otherParams = func_get_args();\n unset($otherParams[0]);\n $params[] = $request = Arta::$globals['request'];\n\n switch ($type) {\n\n case 'U':\n $title = 'Unauthorized User Handler';\n $factoryDef = Arta::$unauthorizedHandler;\n $params[] = $request->currentUrl();\n break;\n\n case 'I':\n $title = 'Illegal User Handler';\n $factoryDef = Arta::$illegalHandler;\n $params[] = $request->currentUrl();\n break;\n\n case 'X':\n $title = 'Exception Handler';\n $factoryDef = Arta::$exceptionHandler;\n break;\n\n case 'F':\n $title = 'No Factory Handler';\n $factoryDef = Arta::$nofactoryHandler;\n break;\n\n case 'N':\n $title = 'URL Not Found Handler';\n $factoryDef = Arta::$notfoundHandler;\n $params[] = $request->currentUrl();\n break;\n\n case 'A':\n $title = 'Not Ajax Request Handler';\n $factoryDef = Arta::$notajaxHandler;\n $params[] = $request->currentUrl();\n break;\n\n default:\n $title = null;\n $factoryDef = null;\n }\n\n if ($otherParams) {\n if (is_array($otherParams)) {\n $params = array_merge($params, $otherParams);\n } else {\n $params[] = $otherParams;\n }\n }\n /* load factory */\n if (!$factoryDef || count($factoryDef) != 4) {\n if (DEBUG) {\n Inspect::dumpException(new EventHandler(EventHandler::HANDLER_NOT_DEFINED, $title));\n }\n die;\n }\n list($facPath, $tplObjectName, $facClass, $facMethod) = $factoryDef;\n if (!file_exists($facPath)) {\n if (DEBUG) {\n Inspect::dumpException(new EventHandler(EventHandler::HANDLER_FILE_NOT_EXISTS, array($title, $facPath)));\n }\n die;\n }\n\n require_once 'Template.php';\n require_once 'Response.php';\n require_once 'Database.php';\n require_once $facPath;\n\n if (!$facClass) {\n if (!function_exists($facMethod)) {\n if (DEBUG) {\n Inspect::dumpException(\n new EventHandler(\n EventHandler::HANDLER_METHOD_NOT_EXISTS,\n array($title, $facPath, $facMethod)\n )\n );\n }\n die;\n }\n $params[] = $tplObjectName;\n call_user_func_array($facMethod, $params);\n die;\n }\n\n if (!class_exists($facClass)) {\n if (DEBUG) {\n Inspect::dumpException(\n new EventHandler(\n EventHandler::HANDLER_CLASS_NOT_EXISTS,\n array($title, $facPath, $facClass)\n )\n );\n }\n die;\n }\n\n Arta::$factory = $factory = new $facClass();\n if (!method_exists($factory, $facMethod)) {\n if (DEBUG) {\n Inspect::dumpException(\n new EventHandler(\n EventHandler::HANDLER_METHOD_NOT_EXISTS,\n array($title, $facPath, $facMethod)\n )\n );\n }\n die;\n }\n\n if (property_exists($factory, '__tpl')) {\n $factory->__tpl = $tplObjectName;\n }\n\n call_user_func_array(array(&$factory, $facMethod), $params);\n die;\n }",
"abstract public function isHandle(): bool;",
"protected function initHandlers()\n\t{\n\t}",
"protected function validateObject(&$object) {\n // types of objects that people can create. Will expand later.\n $test_array = [ \"Note\" ];\n // make sure it is an accepted ActivityPub object type\n if (!isset($object['type']) || !in_array($object['type'],$test_array)) return false;\n // require all objects to have a declared attribution\n if (!isset($object['attributedTo'])) return false;\n // there needs to be something actually being posted\n if (!isset($object['content'])) return false;\n \n return true;\n }",
"public function get_handler()\n {\n }",
"private function bind_object_class(): void\n\t{\n\t\tPrototype::from(Prototyped::class)['get_app'] = function() {\n\n\t\t\treturn $this;\n\n\t\t};\n\t}",
"public function allowBody($object)\n\t{\n\t\treturn (($object instanceof PNavMenuItem) || ($object instanceof PNavMenuItemContainer));\n\t}",
"protected function ensureOriginalHandlerExists(): void\n {\n $reflectionProperty = new ReflectionProperty(VarDumper::class, 'handler');\n $reflectionProperty->setAccessible(true);\n $handler = $reflectionProperty->getValue();\n\n if (! $handler) {\n // No handler registered yet, so we'll force VarDumper to create one.\n $reflectionMethod = new ReflectionMethod(VarDumper::class, 'register');\n $reflectionMethod->setAccessible(true);\n $reflectionMethod->invoke(null);\n }\n }",
"public function isAok($object) \n {\n return $object instanceof $this; \n }",
"protected function handleItself()\n {\n if ($this->isMoved($this->event)) {\n if ($this->getResource()->exists() && $this->addWatch() === $this->id) {\n return;\n }\n\n $this->unwatch($this->id);\n }\n\n if ($this->getResource()->exists()) {\n if ($this->isIgnored($this->event) || $this->isMoved($this->event) || !$this->id) {\n $this->setEvent($this->id ? IN_MODIFY : IN_CREATE);\n $this->watch();\n }\n } elseif ($this->id) {\n $this->event = IN_DELETE;\n $this->getBag()->remove($this);\n $this->unwatch($this->id);\n $this->id = null;\n }\n }",
"abstract public function object();",
"public function get_type(){ return $this->_type;}",
"public function isObject(): bool\n {\n return $this->phpType === self::OBJECT;\n }",
"abstract public function handleRequest(Request $request);",
"public function handleRequest() {}",
"public function getObjectType();",
"public function getObjectType();",
"public function getHandler()\n {\n }",
"public function get_object_type($rule)\n {\n }",
"protected function _after_read(): void\n {\n //it is not supposed to be readable is the object is not readable\n //$this->get_object();//will trigger the permission denied if there is no permission to read the target object\n //TODO - add permission check\n //instantiating the object here may trigger a recursion as the object itself may be creating the alias in its _after_read\n }",
"final private function wasHandled(hookHandler $handler) {\n\t\treturn isset($this->handled[spl_object_hash($handler)]);\n\t}",
"public static function usesCustomHandler();",
"protected function ensureViolationHandler()\n {\n if ($this->violationHandler === null) {\n $this->violationHandler = new Violation\\HttpViolationHandler();\n }\n }",
"public function handleData();",
"public function throwExceptionWhenSettingValueThatsNotInstanceOfObjectsType()\n {\n ATM_Config_Collection::$objectsType='stdClass';\n $object = $this->getMock('ATM_Config_Abstract', array('getName'));\n $expect = false;\n try {\n $this->object[]=$object;\n } catch (InvalidArgumentException $exception) {\n $this->assertContains('stdClass', $exception->getMessage());\n $expect = true;\n }\n $this->assertTrue($expect);\n $this->assertFalse(isset($this->object['name']));\n ATM_Config_Collection::$objectsType='ATM_Config_Abstract';\n try {\n $this->object[]=$object;\n } catch (InvalidArgumentException $exception) {\n $this->assertContains('ATM_Config_Abstract', $exception->getMessage());\n $expect = false;\n }\n $this->assertTrue($expect);\n $this->assertTrue(isset($this->object[0]));\n }",
"abstract public function handle_request();",
"public function handleRequest();",
"public function handleRequest();",
"public function handleRequest();",
"public function handlePut()\n {\n return parent::handlePut();\n }",
"public function getHandler() {}",
"public function objType()\n {\n return $this->objType;\n }",
"protected function postUpdateHook($object) { }",
"function widget_manager_create_object_handler($event, $object_type, $object) {\n\n\tif (elgg_instanceof($object, \"object\", \"widget\", \"ElggWidget\")) {\n\t\t$owner = $object->getOwnerEntity();\n\t\t// Updates access for privately created widgets in a group\n\t\tif ($owner instanceof ElggGroup && $object->access_id === ACCESS_PRIVATE) {\n\t\t\t$old_ia = elgg_set_ignore_access();\n\t\t\t$object->access_id = $owner->group_acl;\n\t\t\t$object->save();\n\t\t\telgg_set_ignore_access($old_ia);\n\t\t}\n\t\t\t\t\n\t\t// Adds a relation between a widget and a multidashboard object\n\t\t$dashboard_guid = get_input(\"multi_dashboard_guid\");\n\t\tif ($dashboard_guid && widget_manager_multi_dashboard_enabled()) {\n\t\t\t$dashboard = get_entity($dashboard_guid);\n\t\t\tif (elgg_instanceof($dashboard, \"object\", MultiDashboard::SUBTYPE, \"MultiDashboard\")) {\n\t\t\t\tadd_entity_relationship($object->getGUID(), MultiDashboard::WIDGET_RELATIONSHIP, $dashboard->getGUID());\n\t\t\t}\n\t\t}\n\t}\n}",
"function checkResource() {\n if (is_resource($this->_handler) && (get_resource_type($this->_handler) == 'stream')) {\n \treturn true;\n }\n return false;\n }",
"abstract protected function getObject(EventArgs $args);",
"public function handleWebhook()\n {\n $payload = (array) json_decode(Request::getContent(), true);\n \n $method = 'handle'.studly_case(str_replace('.', '_', $payload['type']));\n \n if (method_exists($this, $method)) {\n return $this->{$method}($payload);\n }\n else {\n return $this->missingMethod();\n }\n }",
"public function getObjType()\r\n {\r\n return $this->objType;\r\n }",
"protected function postDeleteHook($object) { }",
"abstract public function objectIsComplete($object);",
"protected function initializeHandle() {}",
"protected function initializeHandle() {}",
"public function process(object $event) {\r\n\r\n }",
"function setObjtype($objtype) {\n $this->objtype = $objtype;\n }",
"public static function getHandlerClass(): string;",
"public function checkObject($value)\n {\n return $this->checkHasType($value, 'object');\n }",
"abstract protected function _preHandle();"
] | [
"0.6535716",
"0.64086235",
"0.638438",
"0.63834167",
"0.59654367",
"0.5922701",
"0.5818496",
"0.574152",
"0.57183313",
"0.57183313",
"0.55841714",
"0.55027235",
"0.54724306",
"0.5465892",
"0.54625785",
"0.54527295",
"0.54465985",
"0.5443516",
"0.54137474",
"0.5413743",
"0.54112035",
"0.53675395",
"0.53611416",
"0.5355946",
"0.5350189",
"0.5334352",
"0.52962416",
"0.5286231",
"0.52860886",
"0.5266693",
"0.52649546",
"0.5240808",
"0.5236802",
"0.5232783",
"0.52324134",
"0.5220629",
"0.5168798",
"0.51527405",
"0.51474977",
"0.5142915",
"0.5127379",
"0.5122041",
"0.51152897",
"0.5114674",
"0.5110788",
"0.5107932",
"0.51061785",
"0.50800335",
"0.507278",
"0.5072706",
"0.5068619",
"0.5067793",
"0.5067541",
"0.5060402",
"0.5036702",
"0.5035656",
"0.50306624",
"0.5024478",
"0.5014226",
"0.50138634",
"0.5007102",
"0.50014037",
"0.49861315",
"0.49856842",
"0.49850678",
"0.49845794",
"0.49834657",
"0.49766818",
"0.49724585",
"0.4968945",
"0.4968945",
"0.49669507",
"0.4966048",
"0.495423",
"0.49526292",
"0.49502304",
"0.49483562",
"0.4947589",
"0.49472097",
"0.49438396",
"0.494271",
"0.494271",
"0.494271",
"0.49373192",
"0.49350983",
"0.4933426",
"0.49282148",
"0.49282074",
"0.4917755",
"0.4909484",
"0.49076757",
"0.48963",
"0.48934835",
"0.48931912",
"0.48881856",
"0.48881856",
"0.48873836",
"0.48809344",
"0.48807457",
"0.4877284",
"0.48731458"
] | 0.0 | -1 |
Removes the routing cache each time there is a change in page so that the new routes get cached | public function clearRouteCache()
{
$isSuccess = $this->removeRoutingCache();
$this->addRemoveNotification($isSuccess);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function clearRouteCache() { \n self::$_cache = [];\n }",
"protected function clearRewriteCache()\n {\n $cache = (int) Shopware()->Config()->routerCache;\n $cache = $cache < 360 ? 86400 : $cache;\n\n $sql = \"SELECT `id` FROM `s_core_config_elements` WHERE `name` LIKE 'routerlastupdate'\";\n $elementId = Shopware()->Db()->fetchOne($sql);\n\n $sql = \"\n SELECT v.shop_id, v.value\n FROM s_core_config_values v\n WHERE v.element_id=?\n \";\n $values = Shopware()->Db()->fetchPairs($sql, array($elementId));\n\n foreach ($values as $shopId => $value) {\n $value = unserialize($value);\n $value = min(strtotime($value), time() - $cache);\n $value = date('Y-m-d H:i:s', $value);\n $value = serialize($value);\n $sql = '\n UPDATE s_core_config_values SET value=?\n WHERE shop_id=? AND element_id=?\n ';\n Shopware()->Db()->query($sql, array($value, $shopId, $elementId));\n }\n }",
"public function clearCache()\n\t{\n\t\tYii::app()->cache->delete('customurlrules');\n\t}",
"public function clearCache()\n\t{\n\t\tYii::app()->cache->delete('customurlrules');\n\t}",
"public function resetRoutes() {\n \t$this->routes = [];\n }",
"function eve_api_clear_page_cache($name) {\n ctools_include('object-cache');\n ctools_object_cache_clear('eve_api', $name);\n}",
"public static function removeCache() {\n\t}",
"static function clear() {\n self::$_routes = array();\n }",
"public function clear()\n {\n $this->routes = array();\n }",
"public function purgePageCache()\n\t{\n\t\t// Purge the folder\n\t\t$objFolder = new \\Folder('system/cache/html');\n\t\t$objFolder->purge();\n\n\t\t// Add a log entry\n\t\t$this->log('Purged the page cache', __METHOD__, TL_CRON);\n\t}",
"public function clearCache() {}",
"public function clearCache() {}",
"private function _clearCache()\n {\n Cache::forget(\"roaddamage-resource:{$this->id}\");\n foreach ($this->getReports() as $report) {\n Cache::forget(\"report-resource:{$report->id}\");\n }\n }",
"private function clearCache() {\n\t\t\n\t\tCore\\Cache::clear();\n\t\t\n\t}",
"function clearCache()\n {\n $cacheDir = $this->container->getParameter('kernel.cache_dir');\n\n $kernel = $this->container->get('kernel');\n\n $cacheDir = realpath($cacheDir.'/../');\n\n\n foreach (array (/*'frontdev','frontprod',*/'dev','prod') as $env)\n {\n foreach (array ('UrlGenerator','UrlMatcher') as $file)\n {\n $cachedFile = $cacheDir.'/'.$env.'/app'.ucfirst($env).$file.'.php';\n //print '<br>'.$cachedFile;\n if (file_exists($cachedFile)) @unlink ($cachedFile);\n\n\n $cachedFile = $cacheDir.'/'.$env.'/app'.$env.$file.'.php';\n //print '<br>'.$cachedFile;\n if (file_exists($cachedFile)) @unlink ($cachedFile);\n }\n }\n\n\n if (function_exists('apc_clear_cache')) apc_clear_cache('user');\n //exit();\n\n }",
"final public function clearViewsCache() {\n\t\t$this->allViews = null;\n\t}",
"public function clearCache() {\n\t\tYii::app()->user->setState('nlsLoadedResources', array());\n\t}",
"public function refreshAPCCache()\n {\n $configModel = new Default_Model_Configuration();\n $server = $configModel->getKey('api_url');\n $hash = isset($server) ? hash('sha1', $server) : '';\n \n $cache = Frapi_Cache::getInstance(FRAPI_CACHE_ADAPTER);\n\n $cache->delete($hash . '-Output.default-format');\n }",
"protected function reloadRoutes()\n {\n Router::reload();\n }",
"public static function clear() \n\t\t{\n\t\t\tSite_CacheManager::flush('page');\n\t\t}",
"protected function cacheRoutesPerLocale()\n {\n // Store the default routes cache,\n // this way the Application will detect that routes are cached.\n $allLocales = $this->getSupportedLocales();\n\n array_push($allLocales, null);\n\n foreach ($allLocales as $locale) {\n\n $routes = $this->getFreshApplicationRoutesForLocale($locale);\n\n if (count($routes) == 0) {\n $this->error(\"Your application doesn't have any routes.\");\n return;\n }\n\n foreach ($routes as $route) {\n $route->prepareForSerialization();\n }\n\n $this->files->put(\n $this->makeLocaleRoutesPath($locale), $this->buildRouteCacheFile($routes)\n );\n }\n }",
"public function rebuild()\n {\n // Don't bother if there's no cache file in config\n if (empty($this->cacheFile)) {\n throw new \\Exception(\n 'Cannot rebuild route cache because no file is provided in config.'\n );\n }\n // Get all published routes\n $routes = $this->pageModel->getPublishedRoutes();\n\n // Smash them into a pipe-separated string\n $pipedRoutes = implode('|', $routes);\n\n // Write to the cache file\n file_put_contents($this->cacheFile, $pipedRoutes);\n }",
"public function removeCache() {\r\n $files = $this->caches;\r\n while (count($files) > 0) {\r\n @unlink(array_shift($files));\r\n }\r\n\r\n }",
"public function clearCache()\n {\n }",
"public function dettachCache()\n {\n if (!is_null($this->_cache)) {\n unset($this->_cache);\n }\n }",
"public function refreshAPCCache()\n {\n $configModel = new Default_Model_Configuration();\n $server = $configModel->getKey('api_url');\n $hash = isset($server) ? hash('sha1', $server) : '';\n \n $cache = Frapi_Cache::getInstance(FRAPI_CACHE_ADAPTER);\n\n $cache->delete($hash . '-Partners.emails-keys');\n $cache->delete($hash . '-configFile-partners');\n }",
"public function removeCache()\n {\n $this->getHttpClientBuilder()->removeCache();\n }",
"public function removeFromCache()\n {\n Cache::tags('file')->forget(strtolower($this->alias));\n }",
"protected function _rebuildRoutes() {\n \\Drupal::service('router.builder')->rebuild();\n }",
"public function clear()\n {\n $this->_cache->clearByNamespace('/');\n }",
"public function clearPageCacheContent() {}",
"public function invalidateCaches()\n {\n ManifestHelper::invalidateCaches();\n }",
"public function clearCache(): void;",
"public function clearCacheAndStats() {\n\t\tif (Shop::isFeatureActive()) {\n\t\t\tforeach (Shop::getContextListShopID() as $id_shop) {\n\t\t\t\tif (file_exists(_PS_CACHE_DIR_ . 'pagecache/' . $id_shop)) {\n\t\t\t\t\tTools::deleteDirectory(_PS_CACHE_DIR_ . 'pagecache/' . $id_shop, false);\n\t\t\t\t}\n\t\t\t}\n\t\t\tPageCacheDAO::resetCache(Shop::getContextListShopID());\n\t\t}\n\t\telse {\n\t\t\tif (file_exists(_PS_CACHE_DIR_ . 'pagecache/')) {\n\t\t\t\tTools::deleteDirectory(_PS_CACHE_DIR_ . 'pagecache', false);\n\t\t\t}\n\t\t\tPageCacheDAO::resetCache();\n\t\t}\n\t}",
"public static function clearCache()\n {\n static::$eventMap = [];\n \\Cache::forget(static::EVENT_CACHE_KEY);\n }",
"public static function clearCache()\n {\n static::$eventMap = [];\n \\Cache::forget(static::EVENT_CACHE_KEY);\n }",
"public function refreshAPCCache()\n {\n $configModel = new Default_Model_Configuration();\n $server = $configModel->getKey('api_url');\n $hash = isset($server) ? hash('sha1', $server) : '';\n \n $cache = Frapi_Cache::getInstance(FRAPI_CACHE_ADAPTER);\n \n $cache->delete($hash . '-Errors.user-defined');\n $cache->delete($hash . '-configFile-errors');\n }",
"public function flushCache() {\n\t\t// is deleted. If it cleared our static cache variables\n\t\t// here, they would in effect be useless.\n\t}",
"public static function clearCache() {\n $cached=sugar_cached('include/externalAPI.cache.php');\n if ( file_exists($cached) ) {\n unlink($cached);\n }\n $cached=sugar_cached('include/externalAPI.cache.js');\n if ( file_exists($cached) ) {\n unlink($cached);\n }\n }",
"protected function purgeCache() {\n\t\tConfigboxCacheHelper::purgeCache();\n\t}",
"public function __destruct()\n {\n if ($this->cacheProvider !== null && !$this->cacheProvider->contains('routerCache')) {\n $this->cacheProvider->save(\n 'routerCache',\n $this->getData(),\n (int) $this->cacheLifetime\n );\n }\n }",
"public function removeCache() {\r\n $this->output->set_header('Last-Modified:' . gmdate('D, d M Y H:i:s') . 'GMT');\r\n $this->output->set_header('Cache-Control: no-store, no-cache, must-revalidate');\r\n $this->output->set_header('Cache-Control: post-check=0, pre-check=0', false);\r\n $this->output->set_header('Pragma: no-cache');\r\n }",
"public function clear_cache(): void;",
"public function cacheInvalidate() {\n }",
"public function populate_router() {\n if (Cache::has(APP_NAME.\"_Marmalade\\Router\\Routes\")) {\n $this->routes = Cache::get(APP_NAME.\"_Marmalade\\Router\\Routes\");\n } else {\n $this->build_route_map(Routes::load_routes());\n if (ENABLE_CACHE) {\n Cache::set(APP_NAME.\"_Marmalade\\Router\\Routes\", $this->routes);\n }\n }\n }",
"public function clearCachesOfRegisteredPageIds() {}",
"public static function routesAreCached(){\n return \\Illuminate\\Foundation\\Application::routesAreCached();\n }",
"public function menu_reset_static_cache()\n {\n return menu_reset_static_cache();\n }",
"public static function resetCache();",
"public function cache()\n {\n\n $route = Route::requireRoueFiiles();\n if (file_put_contents($this->cacheFile, serialize($route))) {\n echo 'OK';\n } else {\n echo 'ERROR';\n }\n }",
"function tilemmetry_clear_cache()\n{\n theme_reset_all_caches();\n}",
"public static function resetCache()\n\t{\n\t\tTagDependency::invalidate(Yii::$app->cache, static::getCacheTag());\n\t}",
"public static function resetCache()\n\t{\n\t\tTagDependency::invalidate(Yii::$app->cache, static::getCacheTag());\n\t}",
"public function clearTemplateCache()\n {\n $this->loadedTemplates = array();\n }",
"function ClearCache()\n\t{\n\t\tglobal $gCms;\n\t\t$smarty =& $gCms->GetSmarty();\n\n\t\t$smarty->clear_all_cache();\n\t\t$smarty->clear_compiled_tpl();\n\n\t\tif (is_file(TMP_CACHE_LOCATION . '/contentcache.php'))\n\t\t{\n\t\t\tunlink(TMP_CACHE_LOCATION . '/contentcache.php');\n\t\t}\n\n\t\t@touch(cms_join_path(TMP_CACHE_LOCATION,'index.html'));\n\t\t@touch(cms_join_path(TMP_TEMPLATES_C_LOCATION,'index.html'));\n\t}",
"public function clearCache()\n {\n $this->userAgentCache->clear();\n $this->deviceCache->clear();\n $this->clientCache->clear();\n }",
"abstract protected function clearCache();",
"public function removeAllCache()\n {\n $this->removeBasicCache();\n $this->deleteDirectory($this->pubStatic);\n $this->deleteDirectory($this->varViewPreprocessed);\n $this->deleteDirectory($this->varGeneration);\n $this->deleteDirectory($this->generated);\n }",
"public static function clearCache()\n {\n self::$cache = array();\n }",
"public function routerRebuilding() {\n $this->rebuilding = TRUE;\n }",
"public function clearCache(){\n if(file_exists($this->file)){\n @unlink($this->file);\n }\n }",
"function clear_cache() {\n $this->output->set_header(\"cache-control: no-store, no-cache, must-revalidate, no-transform, max-age=0, post-check=0, pre-check=0\");\n $this->output->set_header(\"Pragma:no-cache\");\n }",
"public function reset_cache() {\n remove_theme_mod( 'athen_customizer_css_cache' );\n }",
"function clearCacheIfSet()\t{\n\t\tif ($this->conf['clearCacheOfPages'])\t{\n\t\t\t$cc_pidList = $GLOBALS['TYPO3_DB']->cleanIntList($this->conf['clearCacheOfPages']);\n\t\t\t$GLOBALS['TSFE']->clearPageCacheContent_pidList($cc_pidList);\n\t\t}\n\t}",
"private static function CLEAR_CACHE() {\n\t\tclearstatcache();\n\t}",
"function clearCache () {\n $this->clearThumbCache ();\n $this->clearPreviewCache ();\n }",
"function elgg_filepath_cache_reset() {\n\t$cache = elgg_get_filepath_cache();\n\t$view_types_result = $cache->delete('view_types');\n\t$views_result = $cache->delete('views');\n\treturn $view_types_result && $views_result;\n}",
"public static function getCache() {\n\n if (Config::get('app.cache') != 0 && !Auth::check()) { //\n $page = (Paginator::getCurrentPage() > 1 ? Paginator::getCurrentPage() : '');\n $key = 'route-' . Str::slug(Request::fullurl()) . $page;\n\n if (Cache::has($key)) {\n die(Cache::get($key));\n }\n }\n }",
"public function clearCachefiles () {\r\n\t\r\n\t}",
"protected function removeExpiredCacheEntries() {}",
"function roots_flush_rewrites() {\n\nif(of_get_option('flush_htaccess', false) == 1 || get_transient(\"was_flushed\") === false) {\n\t\n\t\tglobal $wp_rewrite;\n\t\t$wp_rewrite->flush_rules();\n\t\n\t\tset_transient(\"was_flushed\", true, 60 * 60 * 24 * 7 );\n\t}\n}",
"private function refreshCache()\n {\n\n\t\t// any valid date in the past\n\t\theader(\"Expires: Mon, 26 Jul 1997 05:00:00 GMT\");\n\t\t// always modified right now\n\t\theader(\"Last-Modified: \" . gmdate(\"D, d M Y H:i:s\") . \" GMT\");\n\t\t// HTTP/1.1\n\t\theader(\"Cache-Control: private, no-store, max-age=0, no-cache, must-revalidate, post-check=0, pre-check=0\");\n\t\t// HTTP/1.0\n\t\theader(\"Pragma: no-cache\");\n\t}",
"function clean_page_cache($id)\n {\n }",
"private function delete_cache() {\n\t\twp_cache_add_global_groups( [ 'locale-associations' ] );\n\n\t\twp_cache_delete( 'subdomains', 'locale-associations' );\n\t\twp_cache_delete( 'locale-list', 'locale-associations' );\n\t\twp_cache_delete( 'local-sites', 'locale-associations' );\n\t\twp_cache_delete( 'id-locale', 'locale-associations' );\n\t}",
"function al3_flush_rewrite_rules_events() {\n\tflush_rewrite_rules();\n}",
"public function clearCache()\n {\n if ($this->clear_cache && !empty($this->pageinfo)) {\n $dataHandler = GeneralUtility::makeInstance(DataHandler::class);\n $dataHandler->start([], []);\n $dataHandler->clear_cacheCmd($this->id);\n }\n }",
"public function stopCache() {}",
"function odin_flush_rewrite() {\n\tflush_rewrite_rules();\n}",
"function odin_flush_rewrite() {\n\tflush_rewrite_rules();\n}",
"public static function clearCache()\n\t{\n\t\tself::$definitions = null;\n\t}",
"public static function clearCache()\n\t{\n\t\tparent::clearCache(__CLASS__);\n\t}",
"public static function removeCacheFiles() {}",
"public function cleanLookupCache(){\n\t\t$this->lookup = [];\n\t}",
"public function getAppRoutes(){\n $cache=Yii::$app->cache;\n $key = [__METHOD__, Yii::$app->getUniqueId()];\n if(($result = $cache->get($key)) === false){\n $result=$this->getRouteRecrusive('frontend');\n $cache->set($key, $result, \"3600\", new TagDependency([\n 'tags' => self::CACHE_TAG,\n ]));\n }\n return $result;\n }",
"public static function purgeCaches() {}",
"private function _remove_rewrite_rules()\n\t{\n\t\t$this->rewriter->remove_wp_rewrite_rules();\n\t\t// remove rewrite rules in cache directory\n\t\t$this->rewriter->remove_cache_rewrite_rules();\n\t}",
"public function handleClearCache()\n {\n if ($dir = $this->getContext()->getParameters()['tempDir'] . '/cache') {\n opcache_reset();\n \\Devrun\\Utils\\FileTrait::purge($dir = dirname(__DIR__) . \"/temp/cache\");\n $this->redirect('this');\n }\n\n }",
"public function delete_cache()\r\n {\r\n $this->clear_file_cache();\r\n }",
"function wp_cache_reset()\n {\n }",
"public function removeGeneratedCache()\n {\n $this->removeBasicCache();\n $this->deleteDirectory($this->varGeneration);\n\n if($this->storeInfo->getMagentoCloud()) {\n $this->deleteDirectory($this->generated);\n }\n }",
"function wp_clean_update_cache()\n {\n }",
"function delete_cache_and_back_home() {\n global $tupf, $reviewingwordsidscache, $reviewingwordindexcache, $coursemoduleid;\n\n $reviewingwordsidscache->delete($tupf->id);\n $reviewingwordindexcache->delete($tupf->id);\n\n $url = new moodle_url('/mod/tupf/view.php', ['id' => $coursemoduleid]);\n redirect($url);\n}",
"public function reloadCaches() {}",
"protected function loadCachedRoutes()\n {\n $this->app->booted(function()\n {\n require $this->app->getCachedRoutesPath();\n });\n }",
"public function afterLoadRoutes() {\n if (!$this->beforeConfig) {\n $this->createRoutes($this->m->Routing->routes);\n $current = $this->m->Routing->route;\n if (is_array($current) and isset($current['priority'])) {\n if ($current['priority'] > $this->priority)\n return;\n }\n if ($this->checkPath($this->request->path)) {\n \n }\n }\n }",
"function _deleteCache() {\n require_once(\"Cache/Output.php\");\n $cache = new Cache_Output($GLOBALS[\"BX_config\"][\"popoon\"][\"cacheContainer\"], $GLOBALS[\"BX_config\"][\"popoon\"][\"cacheParams\"] );\n \n // for the time being, just flush everything...\n @$cache->flush('outputcache');\n $cache->flush('');\n }",
"public function clear_cache() {\n\t\tif (file_exists($this->cache_path)) {\n\t\t\tunlink($this->cache_path);\n\t\t}\n\t}",
"function wp_listings_deactivation() {\n\n\t\tflush_rewrite_rules();\n}",
"public static function initCache()\n {\n// $cache->delete('config');\n }",
"function theme_flush_rewrite_rules() {\n\tflush_rewrite_rules();\n}"
] | [
"0.79029155",
"0.69259477",
"0.6717992",
"0.6717992",
"0.6548481",
"0.6507365",
"0.65009224",
"0.64128596",
"0.6369026",
"0.63547254",
"0.63236314",
"0.63236314",
"0.62545705",
"0.62499845",
"0.62346107",
"0.62163705",
"0.62129873",
"0.62043697",
"0.61919767",
"0.6161796",
"0.61587244",
"0.6151387",
"0.61491936",
"0.6144151",
"0.61172605",
"0.60975426",
"0.60681325",
"0.60647285",
"0.60643744",
"0.60638",
"0.6053471",
"0.60503906",
"0.6047049",
"0.6039993",
"0.6038192",
"0.6038192",
"0.60314184",
"0.60220224",
"0.6020826",
"0.6013654",
"0.6009126",
"0.5999141",
"0.5985262",
"0.5982225",
"0.59734684",
"0.59718966",
"0.5971185",
"0.5944568",
"0.5929707",
"0.59280753",
"0.59187216",
"0.59048575",
"0.59048575",
"0.59023505",
"0.58862776",
"0.5883088",
"0.5863536",
"0.58615196",
"0.5857897",
"0.58563226",
"0.5850737",
"0.5845028",
"0.5840959",
"0.5840094",
"0.5836461",
"0.58154136",
"0.58012384",
"0.57963896",
"0.5790122",
"0.57862043",
"0.5785507",
"0.57852596",
"0.578185",
"0.57715535",
"0.5766279",
"0.5764917",
"0.5758535",
"0.5757985",
"0.5757985",
"0.57573956",
"0.57507724",
"0.57449937",
"0.5742047",
"0.5738976",
"0.57345825",
"0.572827",
"0.57209975",
"0.5718108",
"0.571761",
"0.5715876",
"0.5714911",
"0.5694105",
"0.5675224",
"0.56730413",
"0.5664867",
"0.566266",
"0.56614697",
"0.5645228",
"0.5641619",
"0.563852"
] | 0.7894451 | 1 |
Adds flash message to request bag | protected function addRemoveNotification($isSuccess)
{
/** @var FlashBag $flashBag */
$flashBag = $this->request->getSession()->getFlashBag();
if ($isSuccess) {
return $flashBag->add(
"success",
"Routing cache was removed successfully."
);
}
return $flashBag->add(
"error",
"Error occurred while removing routing cache."
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function addFlashMessages() {}",
"protected function flash()\n\t{\n\t\t$this->session->flash($this->sessionKey, $this->bag->toJson());\n\t}",
"public function getFlashBag();",
"public function flashAction(Request $request){\n $session = $request->getSession();\n $session->getFlashbag()->add('info','Something information here');\n return $this->redirect($this->generateUrl('view_product', array('id' => 5)));\n }",
"public function add(Message $flash);",
"protected function addErrorFlashMessage() {}",
"public function flash(): void\n {\n $this->session()->flashInput($this->input());\n }",
"function flash($message, $level = 'info')\n{\n session()->put('flash_message', $message);\n session()->put('flash_message_level', $level);\n}",
"public function flash(): void\n {\n (new Session())->set(\"flash\", $this);\n\n }",
"public function renderFlashMessages() {}",
"public static function setFlash($message) \n\t{\n\t\tYii::app()->user->setFlash('yiiBasket',$message);\n\t}",
"protected function renderFlashMessages() {}",
"protected function flash($key, $value)\n {\n $this->session->getFlashBag()->set($key, $value);\n }",
"public function flashes(): FlashBag;",
"public function prepareFlashMessages()\n {\n global $session;\n\n $messages = [];\n foreach ($session->getFlashBag()->all() as $msgType => $msg) {\n $messages[$msgType] = $msg;\n }\n //print_r($messages);\n //exit;\n\n $this->addTwigVar('messages', $messages);\n }",
"private function add($params)\n {\n $flash_messages = isset($_SESSION['flash_messages']) ? $_SESSION['flash_messages'] : array();\n $_SESSION['flash_messages'][] = $params;\n }",
"function flash($message = null, $level = 'info')\n{\n $session = app('session');\n if (!is_null($message)) {\n $session->flash('flash_notification.message', $message);\n $session->flash('flash_notification.level', $level);\n }\n}",
"function flash($message)\n{\n session()->flash('message', $message);\n}",
"protected function showFlashMessages()\n{\n //set the flash messages to all types of laravel session\n session()->flash('error', $this->errorMessages);\n session()->flash('info', $this->infoMessages);\n session()->flash('success', $this->successMessages);\n session()->flash('warning', $this->warningMessages);\n}",
"public function setFlash($_type, $_message) {\n return $this->_container->get('session')->getFlashBag()->add($_type, $_message);\n }",
"public function setFlash($_type, $_message) {\n return $this->_container->get('session')->getFlashBag()->add($_type, $_message);\n }",
"public function setFlash($_type, $_message) {\n return $this->_container->get('session')->getFlashBag()->add($_type, $_message);\n }",
"public function setFlash($_type, $_message) {\n return $this->_container->get('session')->getFlashBag()->add($_type, $_message);\n }",
"public function setFlash($_type, $_message) {\n return $this->_container->get('session')->getFlashBag()->add($_type, $_message);\n }",
"protected function setFlashMessage()\n {\n if ($message = $this->session()->getFlash('flash-message')) {\n if ($this->session()->getFlash('flash-error')) {\n $this->pageView()->setError($message);\n } else {\n $this->pageView()->setMessage($message);\n }\n }\n }",
"function flash($message){\n\t$flash = app('App\\Http\\Flash');\n\n\treturn $flash->message($message);\n}",
"function set_flash($k, $v) {\n Session::flash($k, $v, false);\n}",
"public static function addFlash(Flash $flash) {\n $_SESSION['Flash'][] = $flash;\n }",
"protected function _set_flash_cookie()\n\t{\n\t\tif (count($this->flashdata) > 0)\n\t\t{\n\t\t\tee('Cookie')->setSignedCookie('flash', $this->flashdata, 86500);\n\t\t}\n\t}",
"function flash($type, $message) {\n // creates the flash holder, if not defined yet\n if(!isset($_SESSION['flash'])) {\n $_SESSION['flash'] = array();\n $_SESSION['flash']['uri'] = $_SERVER['REQUEST_URI'];\n }\n // sets the message\n $_SESSION['flash'][$type] .= $message;\n}",
"public function flash($name, $data);",
"public function flash($name, $data);",
"public function flash($name, $data);",
"function setFlash($type, $message)\n{\n $_SESSION['message'] = [$type, $message];\n}",
"function flash_message($type, $message) {\n $_SESSION['message'] = array('type' => $type, 'message' => $message);\n if (isset($_SESSION['message'])) {\n\t\tprint_r( $_SESSION['message']);\n\t}\n}",
"private function getFlashBag()\n {\n return $this->getSession()->getFlashBag();\n }",
"public function addFlashMsg( $flashType, $message )\n {\n $messageBag = \\Session::get( $flashType, new MessageBag() );\n $messageBag->add( 'default', $message );\n \\Session::flash( $flashType, $messageBag );\n }",
"public function pushErrorMessagesToFlashMessageQueue() {}",
"function _show_message($message)\n\t{\n\t\t$this->session->set_flashdata('message', $message);\n\t\tredirect('/auth/');\n\t}",
"public function flash(string $msg): void\n {\n $this->authService->flash($msg);\n }",
"public function showFlashMessage()\n {\n \tif (isset($_SESSION['flashMessage'])) {\n \t\techo '<div class=\"alert alert-' . $_SESSION['flashMessage']['type'] . '\" role=\"alert\">';\n \t\techo '<strong>'. $_SESSION['flashMessage']['message'] . '</strong>';\n \t\techo '</div>';\n\n \t\tunset($_SESSION['flashMessage']);\n \t}\n }",
"public function putInSession()\n {\n if (!$this->flashNotifications) {\n return;\n }\n if ($this->plural) {\n $this->session->flash(\n \"notifications.$this->plural\", $this->flashNotifications\n );\n } else {\n if (count($this->flashNotifications) === 1) {\n $this->session->flash(\n \"notifications.$this->name\", $this->flashNotifications[0]\n );\n } else {\n throw new Exception(\n \"Could not flash multiple notifications without '\n .'a plural version of the name of the bag.\"\n );\n }\n }\n }",
"public function add2Flash(ErrorMessage $objErrorMsg): void\n {\n $this->getSession()->getFlashBag()->add($this->flashBagKey, $objErrorMsg->get());\n }",
"protected function flash_message($message, $alert, $redirect = '')\r\n {\r\n $_SESSION['flash'] = [$alert => $message];\r\n\r\n if ($redirect !== '')\r\n {\r\n $this->redirect($redirect);\r\n }\r\n }",
"protected function setFlashNotice($message)\n {\n $this->get('session')->getFlashBag()->add('notice', $message);\n }",
"protected function setFlashError($message)\n {\n $this->get('session')->getFlashBag()->add('error', $message);\n }",
"protected function setFlashSuccess($message)\n {\n $this->get('session')->getFlashBag()->add('success', $message);\n }",
"protected function _processFlashMessage(Redirect_Flash $flash)\n\t{\n\t\t$session = $this->_application->getServiceLocator()->get('web.Session');\n\t\t$ns = $session->getNamespace('flash');\n\t\t$ns->message = $flash->getMessage();\n\t\t$ns->type = $flash->getType();\n\t\t$ns->setLifetime('message', 1);\n\t\t$ns->setLifetime('type', 1);\n\t}",
"public function setFlashData($flash_data);",
"public function onKernelResponse(FlashMessageResponseEvent $event)\n {\n if (HttpKernel::MASTER_REQUEST !== $event->getRequestType()) {\n return;\n }\n\n // Flash messages are stored in the session. If there is none, there\n // can't be any flash messages in it. $session->getFlashBag() would\n // create a session, we need to avoid that.\n if (!$this->session->isStarted()) {\n return;\n }\n\n $flashBag = $this->session->getFlashBag();\n $flashes = $flashBag->all();\n\n if (empty($flashes)) {\n return;\n }\n\n $response = $event->getResponse();\n\n $cookies = $response->headers->getCookies(ResponseHeaderBag::COOKIES_ARRAY);\n $host = (null === $this->options['host']) ? '' : $this->options['host'];\n if (isset($cookies[$host][$this->options['path']][$this->options['name']])) {\n $rawCookie = $cookies[$host][$this->options['path']][$this->options['name']]->getValue();\n $flashes = array_merge($flashes, json_decode($rawCookie));\n }\n\n $cookie = new Cookie(\n $this->options['name'],\n json_encode($flashes),\n 0,\n $this->options['path'],\n $this->options['host'],\n $this->options['secure'],\n false\n );\n\n $response->headers->setCookie($cookie);\n }",
"function setFlash($message, $type = 'success') {\n $this->session->set_flashdata($type, $message);\n }",
"public function postDispatch()\n {\n $this->view->flashMessenger = array_merge(\n $this->_flashMessenger->getMessages(), $this->_flashMessenger->getCurrentMessages()\n );\n $this->_flashMessenger->clearCurrentMessages();\n }",
"public function flash($key, $value) {\n if (isset($this->environment['lee.flash'])) {\n $this->environment['lee.flash']->set($key, $value);\n }\n }",
"public function renderFlash()\n {\n // get the feedback (they are arrays, to make multiple positive/negative messages possible)\n $feedback_positive = Session::get('feedback_positive');\n $feedback_negative = Session::get('feedback_negative');\n\n // echo out positive messages\n if (isset($feedback_positive)) {\n foreach ($feedback_positive as $feedback) {\n echo '<div class=\"flash success\">'.$feedback.'</div>';\n }\n }\n\n // echo out negative messages\n if (isset($feedback_negative)) {\n foreach ($feedback_negative as $feedback) {\n echo '<div class=\"flash error\">'.$feedback.'</div>';\n }\n }\n\n // delete these messages (as they are not needed anymore and we want to avoid to show them twice\n Session::set('feedback_positive', null);\n Session::set('feedback_negative', null);\n }",
"protected function save(): void\n\t{\n\t\t$this->session->set($this->flashKey, $this->flashRecord);\n\t}",
"function flash($name = '', $message = '', $class = 'uk-alert-success')\n{\n //We can only do something if the name isn't empty\n if (!empty($name)) {\n //No message, create it\n if (!empty($message) && empty($_SESSION[$name])) {\n if (!empty($_SESSION[$name])) {\n unset($_SESSION[$name]);\n }\n if (!empty($_SESSION[$name . '_class'])) {\n unset($_SESSION[$name . '_class']);\n }\n\n $_SESSION[$name] = $message;\n $_SESSION[$name . '_class'] = $class;\n }\n //Message exists, display it\n elseif (!empty($_SESSION[$name]) && empty($message)) {\n $class = !empty($_SESSION[$name . '_class']) ? $_SESSION[$name . '_class'] : 'uk-alert-success';\n echo '<div class=\"' . $class . '\" uk-alert> <a class=\"uk-alert-close\" uk-close></a> <p>' . $_SESSION[$name] . '</p></div>';\n unset($_SESSION[$name]);\n unset($_SESSION[$name . '_class']);\n }\n }\n}",
"function setFlash($message = null)\n{\n $flash = $message;\n if ($message === null && isset($_SESSION['flash.message'])) {\n $flash = $_SESSION['flash.message'];\n unset($_SESSION['flash.message']);\n } else {\n $_SESSION['flash.message'] = $message;\n }\n\n return $flash;\n}",
"public function testFlashAssertionsAfterRender(): void\n {\n $this->enableRetainFlashMessages();\n $this->get('/posts/index/with_flash');\n\n $this->assertResponseCode(200);\n\n $this->assertSession('An error message', 'Flash.flash.0.message');\n }",
"public function addFlash($key, $val)\n {\n $this->start();\n \n if (! isset($this->_flash[$key])) {\n $this->_flash[$key] = array();\n }\n \n if (! is_array($this->_flash[$key])) {\n settype($this->_flash[$key], 'array');\n }\n \n $this->_flash[$key][] = $val;\n }",
"public static function flash($name = '', $message = '', $class = 'alert alert-success') {\n // Needs a name to work\n if (empty($name)) return;\n \n if(!empty($message) && empty($_SESSION[$name])) {\n self::setFlash($name, $message, $class);\n } elseif (empty($message) && !empty($_SESSION[$name])) {\n self::renderFlash($name);\n self::unsetFlashSession($name);\n }\n }",
"public function testFlashAssertionsRemoveInBeforeRender(): void\n {\n $this->enableRetainFlashMessages();\n $this->get('/posts/index/with_flash/?clear=true');\n $this->assertResponseOk();\n\n $this->assertFlashElement('flash/error');\n $this->assertFlashMessage('An error message');\n }",
"public function injectFlashMessageContainer(Tx_Extbase_MVC_Controller_FlashMessages $flashMessageContainer) {\n\t\t$this->flashMessageContainer = $flashMessageContainer;\n\t}",
"static function flashMessage ()\n {\n if (Session::has ('message')) {\n list ($flashType, $message, $title) = explode ('|', Session::get ('message')) + [''] + [''];\n $title = $title ? \"<h4>$title</h4>\" : '';\n return <<<HTML\n<div class=\"alert alert-$flashType\">\n $title$message\n</div>\n</script>\nHTML;\n }\n }",
"function flash( $name = '', $message = '', $class = 'success fadeout-message', $url = '' )\n{\n if( !empty( $name ) )\n {\n //No message, create it\n if( !empty( $message ) && empty( $_SESSION[$name] ) )\n {\n if( !empty( $_SESSION[$name] ) )\n {\n unset( $_SESSION[$name] );\n }\n if( !empty( $_SESSION[$name.'_class'] ) )\n {\n unset( $_SESSION[$name.'_class'] );\n }\n \n $_SESSION[$name] = $message;\n $_SESSION[$name.'_class'] = $class;\n }\n //Message exists, display it\n elseif( !empty( $_SESSION[$name] ) && empty( $message ) )\n {\n $class = !empty( $_SESSION[$name.'_class'] ) ? $_SESSION[$name.'_class'] : 'success';\n echo '<div class=\"'.$class.'\" id=\"msg-flash\">'.$_SESSION[$name].'</div>';\n unset($_SESSION[$name]);\n unset($_SESSION[$name.'_class']);\n }\n }\n\tif( !empty( $url ) || $url != '' )\n {\n\t\theader('Location: '.$url);\n\t\texit();\n\t}\n}",
"private function getFlashMessageFromSession() {\n $error = \\Tools\\Session::get('error');\n \\Tools\\Session::clear('error');\n $warning = \\Tools\\Session::get('warning');\n \\Tools\\Session::clear('warning');\n $success = \\Tools\\Session::get('success');\n \\Tools\\Session::clear('success');\n\n if(isset($error))\n \\Tools\\FlashMessage::addErrorSet($error);\n if(isset($warning))\n \\Tools\\FlashMessage::addWarningSet($warning);\n if(isset($success))\n \\Tools\\FlashMessage::addSuccessSet($success);\n }",
"function flashMessage()\n{\n if (isset($_SESSION['flash']))\n {\n $flash = $_SESSION['flash'];\n unset($_SESSION['flash']);\n foreach ($flash as $key => $value)\n {\n switch ($key)\n {\n case 'fail':\n echo '<p class=\"flash\" style=\"background:#f9ccca\">';\n break;\n case 'success':\n echo '<p class=\"flash\" style=\"background:#b6e5af\">';\n break;\n default:\n echo '<p class=\"flash\" style=\"background:#f9ccca\">';\n }\n echo $value . '</p>';\n }\n }\n}",
"public function flash(Request $request, $key, $value)\n {\n $request->getSession()->getFlashbag()->add($key, $value);\n\n return $this;\n }",
"public function addFlash($msg = '', $class = 'info')\n {\n $key = $this->getNexMultiFlashKey();\n if ($key === false)\n Yii::trace(\"Stack overflow in addFlash\", 'application.webuser.addFlash()');\n else {\n $this->setFlash($key, array($msg, $class));\n }\n }",
"public function setFlash(string $key, string $message)\n {\n $_SESSION[self::FLASH_KEY][$key] = [\n 'remove' => false,\n 'value' => $message\n ];\n }",
"function flash()\n{\n return get_view()->flash();\n}",
"public function flash($title, $message = null, $status = 'success')\n {\n $this->set(\n 'flash_message',\n [\n 'title' => $title,\n 'message' => $message,\n 'status' => $status,\n ]\n );\n }",
"protected function getFlashMessagesFromSession() {}",
"private function _flashdata_mark() {\n\t\tforeach ($_SESSION as $name => $value) {\n\t\t\t$parts = explode(':new:', $name);\n\t\t\tif (is_array($parts) && count($parts) == 2) {\n\t\t\t\t$new_name = $this->flash_key.':old:'.$parts[1];\n\t\t\t\t$this->set_userdata($new_name, $value);\n\t\t\t\t$this->unset_userdata($name);\n\t\t\t}\n\t\t}\n\t}",
"function flashMessage() {\n if (isset($_SESSION['add'])){\n echo('<p style=\"color: red;\">'.htmlentities($_SESSION['add']).\"</p>\");\n unset($_SESSION['add']);\n }\n if (isset($_SESSION['success'])) {\n echo('<p style=\"color: green;\">'.htmlentities($_SESSION['success']).\"</p>\\n\");\n unset($_SESSION['success']);\n }\n if (isset($_SESSION['error'])) {\n echo('<p style=\"color:red;\">'.htmlentities($_SESSION['error']).\"</p>\\n\");\n unset($_SESSION['error']);\n }\n}",
"public function message($message, $type='info')\n {\n $this->session->flash('flashi.message', $message);\n $this->session->flash('flashi.type', $type);\n }",
"private function setErrorMessage(ServerRequest $request, $message)\n {\n $messages = (array)$request->getSession()->read('Flash.flash');\n $messages[] = [\n 'key' => 'flash',\n 'element' => 'Flash/error',\n 'params' => [],\n 'message' => $message,\n ];\n $request->getSession()->write('Flash.flash', $messages);\n }",
"protected static function addMessage(stdClass $message) {\n $i = PitSession::get('PitFlash', 'i', 1);\n $msgs = PitSession::get('PitFlash', 'messages', array());\n $msgs[$i] = $message;\n PitSession::set('PitFlash', 'i', $i + 1);\n PitSession::set('PitFlash', 'messages', $msgs);\n }",
"function FlashSet($key,$value){\n\n $_SESSION['Flash'][$key]=$value;\n }",
"function flash( $name = '', $message = '', $class = 'success fadeout-message' )\n{\n //We can only do something if the name isn't empty\n if( !empty( $name ) )\n {\n //No message, create it\n if( !empty( $message ) && empty( $_SESSION[$name]))\n {\n if( !empty( $_SESSION[$name] ) )\n {\n unset( $_SESSION[$name] );\n }\n if( !empty( $_SESSION[$name.'_class'] ) )\n {\n unset( $_SESSION[$name.'_class'] );\n }\n\n $_SESSION[$name] = $message;\n $_SESSION[$name.'_class'] = $class;\n }\n //Message exists, display it\n elseif( !empty( $_SESSION[$name] ) && empty( $message ))\n {\n $class = !empty( $_SESSION[$name.'_class'] ) ? $_SESSION[$name.'_class'] : 'success';\n echo '<div id =\"message\" class=\"alert alert-'.$class.' alert-dismissible fade show\" role=\"alert\">'\n .$_SESSION[$name]\n .'<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n <span aria-hidden=\"true\">×</span>\n </button>\n </div>';\n unset($_SESSION[$name]);\n unset($_SESSION[$name.'_class']);\n }\n }\n}",
"public function add($message, $type)\n {\n $_SESSION['flash_message'] = [\n 'type' => $type,\n 'message' => $message,\n ];\n }",
"public function flashSave(Request $request, bool $success)\n {\n if ($success) {\n $request->session()->flash('alert-success', trans('common.saved_successfully')); \n } else {\n $request->session()->flash('alert-failure', trans('common.save_failed')); \n }\n }",
"function flashMessage() {\n\t$message = Template::getFlashMessage();\n\tif ( ! empty($message) ) {\n\t\t$messageHtml .= \"<div class='collection'>\";\n\t\t$messageHtml .= \"<a href='#' class='collection-item \" . $message[\"type\"] . \"'>\" . $message[\"body\"] . \"</a>\";\n\t\t$messageHtml .= \"</div>\";\n\n\t\techo $messageHtml;\n\t}\n\treturn NULL;\n}",
"public function _age_flashdata()\n\t{\n\t\tforeach($this->flashdata as $key => $val)\n\t\t{\n\t\t\tif (strpos($key, ':old:') !== 0)\n\t\t\t{\n\t\t\t\tif (strpos($key, ':new:') === 0)\n\t\t\t\t{\n\t\t\t\t\t$this->flashdata[substr($key, 5)] = $val;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->flashdata[':old:'.$key] = $val;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tunset($this->flashdata[$key]);\n\t\t}\n\n\t\t$this->_set_flash_cookie();\n\t}",
"public function addFlash($message,$type = self::MSG_SUCCESS,$clear = false){\n if($clear == false){\n $old_msg = Yii::app()->user->getFlash($type,'');\n if($old_msg!=''){\n $message = $old_msg.'<br/>'.$message;\n }\n }\n Yii::app()->user->setFlash($type,$message);\n }",
"protected function _flash($message, $type = Coda_Helper_Flash::SUCCESS)\n {\n $this->_helper->flash($message, $type);\n }",
"public function getFlashMessage($request)\n {\n $session = $request->session();\n\n $flash_message['type'] = $session->get(\"{$this->flash_name}.type\");\n $flash_message['message'] = $session->get(\"{$this->flash_name}.message\");\n return $flash_message;\n }",
"public function flashKeep() {\n if (isset($this->environment['lee.flash'])) {\n $this->environment['lee.flash']->keep();\n }\n }",
"function tflash($message, $type = 'info', $id = null, $visibility = null, $removed_ids = null) {\n switch ($type) {\n case 'info':\n $type = TFLASH::INFO;\n break;\n case 'success':\n $type = TFLASH::SUCCESS;\n break;\n case 'error':\n $type = TFLASH::ERROR;\n break;\n default:\n trigger_error('Invalid TFLASH message type \"'. $type .'\" (allowed: info, success, error)', E_USER_WARNING);\n $type = 'info';\n }\n\n TFLASH::add($message, $type, $id, $visibility, $removed_ids);\n}",
"public function add_message()\n {\n $result = $this->message->verify_message();\n if($result != NULL)\n {\n $this->session->set_flashdata('errors', $result);\n redirect('/messages/'.$this->session->userdata(\"selected_user_to_view\").'');\n }\n else\n {\n $this->message->add_message($this->input->post(NULL, TRUE));\n redirect('/messages/'.$this->session->userdata(\"selected_user_to_view\").'');\n }\n }",
"function flash( $name = '', $message = '', $class = 'success fadeout-message' )\n{\n if( !empty( $name ) )\n {\n //No message, create it\n if( !empty( $message ) && empty( $_SESSION[$name] ) )\n {\n if( !empty( $_SESSION[$name] ) )\n {\n unset( $_SESSION[$name] );\n }\n if( !empty( $_SESSION[$name.'_class'] ) )\n {\n unset( $_SESSION[$name.'_class'] );\n }\n \n $_SESSION[$name] = $message;\n $_SESSION[$name.'_class'] = $class;\n }\n //Message exists, display it\n elseif( !empty( $_SESSION[$name] ) && empty( $message ) )\n {\n $class = !empty( $_SESSION[$name.'_class'] ) ? $_SESSION[$name.'_class'] : 'success';\n echo '<div class=\"'.$class.'\" id=\"msg-flash\">'.$_SESSION[$name].'</div>';\n unset($_SESSION[$name]);\n unset($_SESSION[$name.'_class']);\n }\n }\n}",
"function setFlash($msg,$class=\"info\"){\n if($msg!=\"\")\n \t{\n $this->flashMsg = \"<div class='flash'><div class='message $class'><p>\".$msg.\"</p></div></div>\";\n }\n else\n {\n $this->flashMsg = '';\n }\n }",
"function set_flashdata( $index,$message ){\n\t\t$_SESSION[$index] = $message ;\n\t}",
"public static function set_message($alert = NULL)\n\t{\n\t\tSession::instance()->set_flash('alert', $alert);\n\t}",
"function printFlashMessage() {\n if (!isset($_SESSION['flashMessage'])) {\n return;\n }\n\n echo '<div class=\"alert alert-success mb-4\" id=\"FlashMessage\">'.$_SESSION['flashMessage']\n .'<button type=\"button\" class=\"close\" onclick=\"location.reload(true); return false;\">'\n .'<span aria-hidden=\"true\">×</span>'\n .'</button>'\n .'</div>';\n $_SESSION['flashMessage'] = null;\n}",
"protected function setFlash($key, $value)\n {\n $this->session()->setFlash($key, $value);\n }",
"function flash_message()\n\t{\n\t\t$ci =& get_instance();\n\t\t$flashmsg = $ci->session->flashdata('falshmsg');\n\t\t$html = '';\n\t\tif (is_array($flashmsg)){\n\t\t\t$html = '<div id=\"flashmessage\" class=\"'.$flashmsg['type'].'\">\n\t\t\t\t\t<img style=\"float: right; cursor: pointer\" id=\"closemessage\" src=\"'.base_url().'img/close.png\" />\n\t\t\t\t\t\t\t<p>'.$flashmsg['content'].'</p>\n\t\t\t\t\t\t\t\t\t</div>';\n\t\t}\n\t\treturn $html;\n\t}",
"public function benjaminButtonFlashdata()\n\t{\n\t\tforeach($this->flashdata as $key => $val)\n\t\t{\n\t\t\tif (strpos($key, ':new:') === FALSE &&\n\t\t\t\tstrpos($key, ':old:') === FALSE)\n\t\t\t{\n\t\t\t\t$this->flashdata[':new:'.$key] = $val;\n\t\t\t}\n\n\t\t\tunset($this->flashdata[$key]);\n\t\t}\n\n\t\t$this->_set_flash_cookie();\n\t}",
"protected function getErrorFlashMessage() {}",
"public function assertFlash($message) {\r\n\t\t$flash = $this->Categories->Session->read('Message.flash');\r\n\t\t$this->assertEqual($flash['message'], $message);\r\n\t\t$this->Categories->Session->delete('Message.flash');\r\n\t}",
"function flash($name = '', $message = '', $class = 'alert alert-success')\n{\n // Check that a name is passed in \n // We are storimg the session $name as the KEY\n if (!empty($name)) {\n if (!empty($message) && empty($_SESSION[$name])) {\n if (!empty($_SESSION[$name])) {\n unset($_SESSION[$name]);\n }\n\n if (!empty($_SESSION[$name . '_class'])) {\n unset($_SESSION[$name . '_class']);\n }\n\n // And we are storing the $message as the VALUE\n $_SESSION[$name] = $message;\n\n // setting the class inside of the session variable\n $_SESSION[$name . '_class'] = $class;\n } elseif (empty($message) && !empty($_SESSION[$name])) {\n $class = !empty($_SESSION[$name . '_class']) ? $_SESSION[$name . '_class'] : '';\n // display it here, the div with the class\n echo '<div class=\"' . $class . '\" id=\"msg-flash\">' . $_SESSION[$name] . '</div>';\n // unsetting it\n unset($_SESSION[$name]);\n unset($_SESSION[$name . '_class']);\n }\n }\n}",
"function osc_add_flash_warning_message($msg, $section = 'pubMessages') {\n Session::newInstance()->_setMessage($section, $msg, 'warning');\n }"
] | [
"0.7813819",
"0.75208616",
"0.72758305",
"0.7113392",
"0.7032096",
"0.70204556",
"0.68060786",
"0.6765197",
"0.675048",
"0.67157406",
"0.6712126",
"0.669395",
"0.66656977",
"0.6662019",
"0.6631557",
"0.6602355",
"0.65978765",
"0.6554176",
"0.649974",
"0.6499506",
"0.6499506",
"0.6499506",
"0.6499506",
"0.6499506",
"0.64975315",
"0.6470656",
"0.6468069",
"0.6450588",
"0.6424",
"0.63663745",
"0.6365768",
"0.6365768",
"0.6365768",
"0.63589776",
"0.63405955",
"0.6269754",
"0.6254605",
"0.62269396",
"0.6221112",
"0.62099355",
"0.6208028",
"0.6206722",
"0.61871254",
"0.6179831",
"0.616742",
"0.61601216",
"0.61588323",
"0.6155316",
"0.6152233",
"0.6149452",
"0.6121801",
"0.60897195",
"0.6088078",
"0.6078749",
"0.60526466",
"0.6051212",
"0.60502166",
"0.6038314",
"0.6029544",
"0.6014479",
"0.6001406",
"0.59998006",
"0.59977543",
"0.59922516",
"0.5990241",
"0.59764946",
"0.5975237",
"0.597418",
"0.59735537",
"0.59606445",
"0.59555125",
"0.59441245",
"0.5942144",
"0.59337604",
"0.5933537",
"0.5928553",
"0.59249455",
"0.59247965",
"0.5920667",
"0.5908001",
"0.59060913",
"0.5900197",
"0.58951044",
"0.5891751",
"0.5883657",
"0.5881937",
"0.58730155",
"0.5833108",
"0.5831255",
"0.58304703",
"0.5825926",
"0.5819703",
"0.58127177",
"0.58084977",
"0.5798213",
"0.57942104",
"0.57889515",
"0.57745117",
"0.5771867",
"0.5763093",
"0.57604605"
] | 0.0 | -1 |
Initializes internal state of Base\TblProdInfo object. | public function __construct()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function init()\r\n {\r\n $this->table_name = 'libelles';\r\n $this->table_type = 'system';\r\n $this->table_gateway_alias = 'Sbm\\Db\\SysTableGateway\\Libelles';\r\n $this->id_name = array(\r\n 'nature',\r\n 'code'\r\n );\r\n }",
"public function clear()\n {\n if (null !== $this->aTblEra) {\n $this->aTblEra->removeTblProdInfo($this);\n }\n if (null !== $this->aTblGeneral) {\n $this->aTblGeneral->removeTblProdInfo($this);\n }\n if (null !== $this->aTblMenus) {\n $this->aTblMenus->removeTblProdInfo($this);\n }\n if (null !== $this->aTblProdPhotos) {\n $this->aTblProdPhotos->removeTblProdInfo($this);\n }\n if (null !== $this->aTblProdPrices) {\n $this->aTblProdPrices->removeTblProdInfo($this);\n }\n if (null !== $this->aTblProdPricing) {\n $this->aTblProdPricing->removeTblProdInfo($this);\n }\n if (null !== $this->aTblProdSmaller) {\n $this->aTblProdSmaller->removeTblProdInfo($this);\n }\n if (null !== $this->aTblShippingCategories) {\n $this->aTblShippingCategories->removeTblProdInfo($this);\n }\n $this->prod_id = null;\n $this->prod_price_id = null;\n $this->prod_name = null;\n $this->prod_alt1 = null;\n $this->prod_alt2 = null;\n $this->prod_alt3 = null;\n $this->prod_alt4 = null;\n $this->prod_code = null;\n $this->prod_category = null;\n $this->prod_category_shipping = null;\n $this->prod_writeup = null;\n $this->prod_length = null;\n $this->prod_wingspan = null;\n $this->prod_height = null;\n $this->prod_scale = null;\n $this->prod_links = null;\n $this->prod_linkdescription = null;\n $this->prod_front = null;\n $this->prod_keywords = null;\n $this->prod_keywords_writeup = null;\n $this->prod_title = null;\n $this->prod_description = null;\n $this->prod_general = null;\n $this->prod_era = null;\n $this->prod_company = null;\n $this->prod_related = null;\n $this->prod_related_pa = null;\n $this->prod_related_m3 = null;\n $this->prod_related2 = null;\n $this->prod_saveas = null;\n $this->prod_aircraftreg = null;\n $this->mb = null;\n $this->pa = null;\n $this->m3 = null;\n $this->alreadyInSave = false;\n $this->clearAllReferences();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }",
"protected function _initialize() {\n $this->tableName = 'user_product';\n }",
"protected function _construct()\n {\n $this->_init(self::TABLE_NAME, self::TABLE_ID);\n }",
"public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)\n {\n $keys = TblProdInfoTableMap::getFieldNames($keyType);\n\n if (array_key_exists($keys[0], $arr)) {\n $this->setProdId($arr[$keys[0]]);\n }\n if (array_key_exists($keys[1], $arr)) {\n $this->setProdPriceId($arr[$keys[1]]);\n }\n if (array_key_exists($keys[2], $arr)) {\n $this->setProdName($arr[$keys[2]]);\n }\n if (array_key_exists($keys[3], $arr)) {\n $this->setProdAlt1($arr[$keys[3]]);\n }\n if (array_key_exists($keys[4], $arr)) {\n $this->setProdAlt2($arr[$keys[4]]);\n }\n if (array_key_exists($keys[5], $arr)) {\n $this->setProdAlt3($arr[$keys[5]]);\n }\n if (array_key_exists($keys[6], $arr)) {\n $this->setProdAlt4($arr[$keys[6]]);\n }\n if (array_key_exists($keys[7], $arr)) {\n $this->setProdCode($arr[$keys[7]]);\n }\n if (array_key_exists($keys[8], $arr)) {\n $this->setProdCategory($arr[$keys[8]]);\n }\n if (array_key_exists($keys[9], $arr)) {\n $this->setProdCategoryShipping($arr[$keys[9]]);\n }\n if (array_key_exists($keys[10], $arr)) {\n $this->setProdWriteup($arr[$keys[10]]);\n }\n if (array_key_exists($keys[11], $arr)) {\n $this->setProdLength($arr[$keys[11]]);\n }\n if (array_key_exists($keys[12], $arr)) {\n $this->setProdWingspan($arr[$keys[12]]);\n }\n if (array_key_exists($keys[13], $arr)) {\n $this->setProdHeight($arr[$keys[13]]);\n }\n if (array_key_exists($keys[14], $arr)) {\n $this->setProdScale($arr[$keys[14]]);\n }\n if (array_key_exists($keys[15], $arr)) {\n $this->setProdLinks($arr[$keys[15]]);\n }\n if (array_key_exists($keys[16], $arr)) {\n $this->setProdLinkdescription($arr[$keys[16]]);\n }\n if (array_key_exists($keys[17], $arr)) {\n $this->setProdFront($arr[$keys[17]]);\n }\n if (array_key_exists($keys[18], $arr)) {\n $this->setProdKeywords($arr[$keys[18]]);\n }\n if (array_key_exists($keys[19], $arr)) {\n $this->setProdKeywordsWriteup($arr[$keys[19]]);\n }\n if (array_key_exists($keys[20], $arr)) {\n $this->setProdTitle($arr[$keys[20]]);\n }\n if (array_key_exists($keys[21], $arr)) {\n $this->setProdDescription($arr[$keys[21]]);\n }\n if (array_key_exists($keys[22], $arr)) {\n $this->setProdGeneral($arr[$keys[22]]);\n }\n if (array_key_exists($keys[23], $arr)) {\n $this->setProdEra($arr[$keys[23]]);\n }\n if (array_key_exists($keys[24], $arr)) {\n $this->setProdCompany($arr[$keys[24]]);\n }\n if (array_key_exists($keys[25], $arr)) {\n $this->setProdRelated($arr[$keys[25]]);\n }\n if (array_key_exists($keys[26], $arr)) {\n $this->setProdRelatedPa($arr[$keys[26]]);\n }\n if (array_key_exists($keys[27], $arr)) {\n $this->setProdRelatedM3($arr[$keys[27]]);\n }\n if (array_key_exists($keys[28], $arr)) {\n $this->setProdRelated2($arr[$keys[28]]);\n }\n if (array_key_exists($keys[29], $arr)) {\n $this->setProdSaveas($arr[$keys[29]]);\n }\n if (array_key_exists($keys[30], $arr)) {\n $this->setProdAircraftreg($arr[$keys[30]]);\n }\n if (array_key_exists($keys[31], $arr)) {\n $this->setMb($arr[$keys[31]]);\n }\n if (array_key_exists($keys[32], $arr)) {\n $this->setPa($arr[$keys[32]]);\n }\n if (array_key_exists($keys[33], $arr)) {\n $this->setM3($arr[$keys[33]]);\n }\n }",
"function __construct() \n\t{\n\t\tparent::__construct( 'rt_products', 'id', 'prd' );\n\t}",
"public function __construct() \n\t{\n\t\t$strSqlModel = \n\t\t'SELECT cat.*, prd.* \n\t\tFROM \n\t\t(\n\t\t\t(\n\t\t\t\t(\n\t\t\t\t\t(\n\t\t\t\t\t\tproducts prd INNER JOIN categories cat ON (prd.prd_cat_id = cat.cat_id)\n\t\t\t\t\t) INNER JOIN prices pri ON (prd.prd_id = pri.pri_prd_id)\n\t\t\t\t) INNER JOIN countries cnt ON (pri.pri_cnt_id = cnt.cnt_id)\n\t\t\t) INNER JOIN currencies cur ON (cnt.cnt_cur_id = cur.cur_id)\n\t\t)\n\t\tINNER JOIN stocks stk ON (prd.prd_id = stk.stk_prd_id) \n\t\t'.CONF_TAG_LIST_SQL_CRITERIA.' \n\t\tGROUP BY prd.prd_id \n\t\tORDER BY cat.cat_id ASC, prd.prd_id ASC \n\t\t'.CONF_TAG_LIST_SQL_LIMIT.'';\n\t\t\n\t\t$intPageNbRow = CONF_LIST_PAGE_COUNT_ROW_PROD;\n\t\t\n\t\t$tabCritOperation = array();\n\t\t$tabCritOperation['cur_id'] = \"(cur.cur_id = \".CONF_TAG_LIST_SQL_OPE_VALUE.\")\";\n\t\t\n\t\tparent::__construct($strSqlModel, $tabCritOperation, $intPageNbRow);\n\t}",
"protected function _initsTable() {}",
"public function __construct()\n {\n $this->mapper = \\Lib\\DataMapper::instance();\n $this->product = new Product();\n }",
"public function initialize()\n {\n $this->setSchema(\"atiempo_prod\");\n $this->hasMany('id', 'AcCartaAvalDetalle', 'id_carta', ['alias' => 'AcCartaAvalDetalle']);\n }",
"public function _construct()\n {\n $this->_initProductCollection();\n parent::_construct();\n }",
"private function initProductDao()\n {\n if(empty($this->productDao))\n {\n $pdo = new PDO(\"sqlite:\".self::PRODUCTION_DATABASE_FILE);\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n \n $this->productDao = new ProductDao($pdo);\n }\n }",
"public function init() {\n $this->initContent(\"Product\");\n $this->loadSession();\n }",
"public function __construct()\n\n {\n parent::__construct();\n\n $this->tablename=\"produit\";\n $this->idp = 'null' ;\n $this->idc = 0 ;\n $this->id_cat = 0 ;\n $this->desi = \"\" ;\n $this->photo = \"\" ;\n $this->prixa = 0 ;\n $this->prixv = 0 ;\n $this->qnt = 0 ;\n $this->composer = 0 ;\n $this->ftech = \"\" ;\n $this->flag = 0 ;\n }",
"public function init()\n {\n\n // initialize the prepared statements\n $this->addFinder($this->finderFactory->createFinder($this, SqlStatementKeys::PRODUCT_VARCHARS));\n $this->addFinder($this->finderFactory->createFinder($this, SqlStatementKeys::PRODUCT_VARCHARS_BY_PK_AND_STORE_ID));\n $this->addFinder($this->finderFactory->createFinder($this, SqlStatementKeys::PRODUCT_VARCHAR_BY_ATTRIBUTE_CODE_AND_ENTITY_TYPE_ID_AND_STORE_ID));\n $this->addFinder($this->finderFactory->createFinder($this, SqlStatementKeys::PRODUCT_VARCHAR_BY_ATTRIBUTE_CODE_AND_ENTITY_TYPE_ID_AND_STORE_ID_AND_VALUE));\n $this->addFinder($this->finderFactory->createFinder($this, SqlStatementKeys::PRODUCT_VARCHAR_BY_ATTRIBUTE_CODE_AND_ENTITY_TYPE_ID_AND_STORE_ID_AND_PK));\n }",
"protected function _construct()\n {\n $this->_init(\\MagentoCoders\\CustomCatalog\\Model\\Product::class, Product::class);\n }",
"public function __construct(){\r\n\t\t\trequire_once(\"conectar_bd.php\");\r\n\t\t\t$this->db=Conectar::conexion();\r\n\t\t\t$this->productos=array();\r\n\t\t}",
"public function __construct()\n\t{\n\t\t$this->modelProducts = new ProductsModel();\n\t\t/* ********** fin initialisation Model ********** */\n\t}",
"public function initialize()\n {\n parent::initialize();\n $this->setSchema(\"salesDB\");\n $this->setSource(\"product_category\");\n $this->hasMany('id', 'App\\Models\\Product', 'product_category_id', ['alias' => 'Product']);\n $this->belongsTo('user_updated', 'App\\Models\\User', 'id', ['alias' => 'UserUpdated']);\n $this->belongsTo('user_created', 'App\\Models\\User', 'id', ['alias' => 'UserCreated']);\n $this->belongsTo('client_id', 'App\\Models\\Client', 'id', ['alias' => 'Client']);\n $this->belongsTo('sync_status_id', 'App\\Models\\SyncStatus', 'id', ['alias' => 'SyncStatus']);\n }",
"public function init()\r\n {\r\n $dbTable = new Application_Model_DbTable_Fournisseur();\r\n $this->mapper = new Application_Model_Mapper_Fournisseur($dbTable);\r\n }",
"function __construct() {\r\n\t\t$this->production_total = \"0\";\r\n\t\t$this->id_state = 1;\r\n\t}",
"public function _construct()\n {\n $this->_init('configbox_magento_xref_mprod_cbprod', 'id');\n }",
"protected function _construct()\r\n {\r\n $this->_init('ss_price', 'price_id');\r\n }",
"function __construct($table_name = NULL, $data_row_name = NULL, $id_row_name = NULL){\r\n\t\t$this->Init($table_name, $data_row_name, $id_row_name);\r\n\t}",
"public function __construct()\n { \n parent::__construct();\n\n $this->init($this->_sCoreTable);\n }",
"function __construct($product_inventory)\n\t{\n\t\tparent::__construct($product_inventory);\n\t\t$this->row[\"NAME\"] = NULL;\n\t\t$this->row[\"COST_PRICE\"] = NULL;\n\t\t$this->row[\"SALE_PRICE\"] = NULL;\n\t\t$this->row[\"STOCK_LEVEL\"] = NULL;\n\t\t$this->row[\"DESCRIPTION\"] = NULL;\n\t}",
"public function __construct()\n\t{\n\t\t$this->tableObjects = Array();\n\t\t$this->count = 0;\n\t}",
"private function init() {\n\t\tlist(, $this->db, $this->table) = explode('_', get_called_class(), 3);\n\t\t$this->db = defined('static::DB') ? static::DB : $this->db;\n\t\t$this->table = defined('static::TABLE') ? static::TABLE : $this->table;\n\t\t$this->pk = defined('static::PK') ? static::PK : 'id';\n\t}",
"public function init()\n {\n if($this->_mAction == 'add_prod')\n {\n $product_name = $_POST['product_name'];\n $product_description = $_POST['product_description'];\n $product_price = $_POST['product_price'];\n \n if($product_name == null)\n $this->mErrorMessage = 'Product name is empty';\n \n if($product_description == null)\n $this->mErrorMessage = 'Product description is empty';\n\n if($product_price == null || !is_numeric($product_price))\n $this->mErrorMessage = 'Product price must be a number';\n\n if($this->mErrorMessage == null)\n {\n Catalog::AddProductToCategory($this->mCategoryId, $product_name, $product_description, $product_price);\n header('Location: ' . htmlspecialchars_decode($this->mLinkToCategoryProductsAdmin));\n }\n }\n\n\n //If we want to see a product details \n if($this->_mAction == 'edit_prod')\n {\n header('Location: ' . htmlspecialchars_decode(Link::ToProductAdmin($this->mDepartmentId, $this->mCategoryId, $this->_mActionedProductId)));\n exit();\n }\n\n\n\n //Load the products in a specific category\n $this->mProducts = Catalog::GetCategoryProducts($this->mCategoryId);\n $this->mProductsCount = count($this->mProducts);\n }",
"protected function _construct()\n {\n $this->_init(ProductResourceModel::class);\n }",
"public function __construct() {\n\t\t$this->model = new Model();\n\t\t$this->view = new View();\n\t\t$this->cart = array();\n\t\t$this->productArray = array();\n\t\t$this->productVar = array();\n\t\t\n\t}",
"public function init ($functablename) {\n\t\t$result = parent::init($functablename);\n\t\tif ($result) {\n\t\t\t$cnf = GeneralUtility::makeInstance('tx_ttproducts_config');\n\n\t\t\t$tableconf = $cnf->getTableConf($functablename);\n\t\t\t$tabledesc = $cnf->getTableDesc($functablename);\n\n\t\t\t$tableObj = $this->getTableObj();\n\t\t\t$tablename = $this->getTablename();\n\n\t\t\t$tableObj->setConfig($tableconf);\n\t\t\t$defaultFieldArray = $this->getDefaultFieldArray();\n\t\t\t$tableObj->setDefaultFieldArray($defaultFieldArray);\n\t\t\t$tableObj->setNewFieldArray();\n\t\t\t$requiredFields = 'uid,pid,title';\n\n\t\t\tif (!empty($tableconf['requiredFields'])) {\n\t\t\t\t$tmp = $tableconf['requiredFields'];\n\t\t\t\t$requiredFields = ($tmp ? $tmp : $requiredFields);\n\t\t\t}\n\n\t\t\t$requiredListArray = GeneralUtility::trimExplode(',', $requiredFields);\n\t\t\t$tableObj->setRequiredFieldArray($requiredListArray);\n\t\t\t$tableObj->setTCAFieldArray($tablename);\n\n\t\t\tif (isset($tabledesc) && is_array($tabledesc)) {\n\t\t\t\t$this->fieldArray = array_merge($this->fieldArray, $tabledesc);\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}",
"public function __construct($tableinfo) {\n\t\t\tparent::__construct( $tableinfo ); }",
"public function initTable(){\n\t\t\t\n\t\t}",
"function __construct()\n {\n $this->_table = \"products_locations_type\"; \n }",
"function Products() {\n\t\t$this->log =LoggerManager::getLogger('product');\n\t\t$this->log->debug(\"Entering Products() method ...\");\n\t\t$this->db = & getSingleDBInstance();\n\t\t$this->column_fields = getColumnFields('Products');\n\t\t$this->log->debug(\"Exiting Product method ...\");\n\t}",
"function __construct($_dataTableName = 'Application_Model_DbTable_ProjectCcLicense')\n {\n $this->_dataTableName = $_dataTableName;\n $this->_dataTable = new $this->_dataTableName;\n }",
"public function init()\n {\n $this->_equipo = new Application_Model_DeporEquipo();\n }",
"protected function _construct()\n {\n $this->_init('encora_productduplicator_tmp', 'id');\n }",
"public function init()\n\t{\n\t\t$this->dictionary = new Dictionary($this->iblockId);\n\t\t$this->storage = new Storage($this->iblockId);\n\t\tif (self::$catalog === null)\n\t\t{\n\t\t\tself::$catalog = \\Bitrix\\Main\\Loader::includeModule(\"catalog\");\n\t\t}\n\n\t\tif (self::$catalog)\n\t\t{\n\t\t\t$catalog = \\CCatalogSKU::getInfoByProductIBlock($this->iblockId);\n\t\t\tif (!empty($catalog) && is_array($catalog))\n\t\t\t{\n\t\t\t\t$this->skuIblockId = $catalog[\"IBLOCK_ID\"];\n\t\t\t\t$this->skuPropertyId = $catalog[\"SKU_PROPERTY_ID\"];\n\t\t\t}\n\t\t}\n\t}",
"private function init() {\n // Set environment variables MUST BE DONE IN THIS ORDER!\n self::initDefaultFormValues(); // Assign default values to forms\n self::initTablePriorityHash();\n self::initTableTypePriorityHash();\n self::initTableHash(); // assign tables.\n self::initTableColumnsHash(); // assign hash with column details.\n #self::initSurveyHash(); // Assign Surveys TODO Place this back in when surveys are merged.\n self::initAstroFilterHash(); // Assign Filters\n self::initQualityFlags(); // assign hash with column details for all quality flag tables.\n }",
"public function __construct()\n\t{\n\t\tparent::__construct();\n $this->tbls_material = [\n '7_material',\n '7_material_000',\n '7_material_001',\n '7_material_004',\n '7_material_005',\n '7_material_006',\n ];\n\t}",
"public function initialize()\n\t{\n\t // attributes\n\t\t$this->setName('producto');\n\t\t$this->setPhpName('Producto');\n\t\t$this->setClassname('Producto');\n\t\t$this->setPackage('lib.model.geografia');\n\t\t$this->setUseIdGenerator(true);\n\t\t// columns\n\t\t$this->addPrimaryKey('ID_PRODUCTO', 'IdProducto', 'INTEGER', true, 11, null);\n\t\t$this->addColumn('ID_CATEGORIA', 'IdCategoria', 'INTEGER', true, 11, null);\n\t\t$this->addColumn('ID_TIPO', 'IdTipo', 'INTEGER', true, 11, null);\n\t\t$this->addColumn('ID_LINEA', 'IdLinea', 'INTEGER', true, 11, null);\n\t\t$this->addColumn('CODIGO', 'Codigo', 'VARCHAR', true, 10, null);\n\t\t$this->addColumn('NOME_PRODUCTO', 'NomeProducto', 'VARCHAR', true, 20, null);\n\t\t$this->addColumn('DESCRICAO', 'Descricao', 'LONGVARCHAR', true, null, null);\n\t\t$this->addColumn('MEDIDA', 'Medida', 'VARCHAR', true, 100, null);\n\t\t$this->addColumn('FOTO', 'Foto', 'VARCHAR', true, 30, null);\n\t\t$this->addColumn('FOTO2', 'Foto2', 'VARCHAR', true, 30, null);\n\t\t$this->addColumn('FOTO3', 'Foto3', 'VARCHAR', true, 30, null);\n\t\t$this->addColumn('ARQUIVO', 'Arquivo', 'VARCHAR', true, 50, null);\n\t\t$this->addColumn('STATUS', 'Status', 'CHAR', true, null, null);\n\t\t$this->addColumn('DESTAQUE', 'Destaque', 'CHAR', true, null, null);\n\t\t// validators\n\t}",
"public function __construct(Products $_products = null)\n {\n \n $this->products = $_products;\n }",
"function __construct($TableName = 'item_type') {\r\n $this->idItem_Type = new DB_Field('idItem_Type', 0, new DbIntSanitizer(), TRUE, TRUE);\r\n $this->Category_Type = new DB_Field('Category_Type', 0, new DbIntSanitizer(), TRUE, TRUE);\r\n $this->Type_Description = new DB_Field('Type_Description', '', new DbStrSanitizer(100), TRUE, TRUE);\r\n $this->Order_Line_Type_Id = new DB_Field('Order_Line_Type_Id', 0, new DbIntSanitizer(), TRUE, TRUE);\r\n\r\n parent::__construct($TableName);\r\n }",
"public function _construct()\n {\n $this->_init('warehouse/warehouse', 'id');\n\t\t//$this->_isPkAutoIncrement = false;\n }",
"public function __construct() {\n parent::__construct(self::TABLE_NAME, self::ID, self::NAME);\n $this->_age_model_method = null;\n $this->_core_id = null;\n $this->_age_model_notes = array();\n $this->_contact_id = null;\n $this->_age_model_id_status = 0;\n }",
"function __construct()\n {\n parent::__construct();\n\t\t// Other stuff\n\t\t$this->_prefix = $this->config->item('DX_table_prefix');\n\t\t$this->_table = $this->_prefix.$this->config->item('DX_app_module');\n }",
"function __construct() {\n \t$this->tablename \t\t\t= \"block_ilp_plu_dd\";\n \t$this->data_entry_tablename = \"block_ilp_plu_dd_ent\";\n\t\t$this->items_tablename \t\t= \"block_ilp_plu_dd_items\";\n\tparent::__construct();\n }",
"public function init()\n {\n $this->yatimsModel = new Admin_Model_DbTable_GestYatims();\n $this->dateImpl = new Default_Model_DateImpl();\n }",
"function __construct() {\n // Initialize the dbms pointer.\n AbstractMapper::__construct();\n\n // Initialize table name.\n $this->tableName = \"service_company_branches\";\n }",
"private function setup_products() {\n\t\tglobal $wpdb;\n\n\t\t$ids = [];\n\t\t$d = $wpdb->get_results( \"SELECT distinct `products` FROM `{$wpdb->prefix}thespa_data`\", ARRAY_A );\n\t\tforeach ( $d as $datum ) {\n\t\t\t$prs = explode( \",\", $datum['products'] );\n\t\t\tforeach ( $prs as $pr ) {\n\t\t\t\tif ( !isset( $ids[$pr] ) ) {\n\t\t\t\t\tarray_push($ids, $pr );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$i = 0;\n\t\tforeach ( $ids as $id ) {\n\t\t\t$product = wc_get_product( $id );\n\t\t\tif ( is_object( $product ) ) {\n\t\t\t\t$this->products[$i] = [\n\t\t\t\t\t'id' => $id,\n\t\t\t\t\t'name' => $product->get_title(),\n\t\t\t\t\t'url' => $product->get_permalink(),\n\t\t\t\t\t'img' => wp_get_attachment_image_src( get_post_thumbnail_id( $id ), 'medium', true )[0],\n\t\t\t\t\t'cost' => $product->get_price_html(),\n\t\t\t\t];\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t}",
"private function init() {\n\t\t$GLOBALS[\"mlauto_db_version\"] = 1.0;\n\n\t\t//If SQL Table isn't initiated, initiate it\n\t\tClassificationModel::intializeTable();\n\t\tTermModel::intializeTable();\n\n\t\t$this->buildConfig();\n\n\t\tupdate_option(\"MLAuto_version\", $GLOBALS[\"mlauto_db_version\"]);\n\t}",
"public function init()\n {\n $this->setProcessor(new NoticesDBProcessor());\n }",
"public function __construct() {\r\n parent::__construct();\r\n $this->setId('productGrid');\r\n $this->setDefaultSort('entity_id');\r\n $this->setDefaultDir('DESC');\r\n $this->setSaveParametersInSession(true);\r\n }",
"public function _initialize() {\n parent::_initialize();\n\t\t$this->db = model('order');\n\t\t$this->log_db = model('order_log');\n\t\t$this->order_goods = model('order_goods');\n\t\t$this->parcel_db=model('order_parcel');\n $this->goods_kc = model(\"goods_products\");\n $this->goods = model(\"goods\");\n $this->_order_staging = model('order_staging');//订单分期表查询\n $this->_order_pact =model(\"order_pact\");//订单合同表查询\n $this->_order_goods_staging=model(\"order_goods_staging\");//订单商品分期表\n $this->user= model(\"User\");\n $this->order = model(\"Order\");\n }",
"public static function ppInit()\n\t{\n\t\tself::$definition['fields'] = array_merge(self::$definition['fields'], array(\n\t\t\t'minimal_quantity' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'validateProductQuantity'), \t\t\t'minimal_quantity_fractional' => array('type' => self::TYPE_FLOAT, 'shop' => true, 'validate' => 'isUnsignedFloat')\n\t\t));\n\t}",
"public function _construct()\n {\n parent::_construct();\n $this->_init('wholesale/product');\n }",
"public function initialize()\n {\n $this->setSchema(\"watches_online\");\n $this->setSource(\"product\");\n }",
"function __construct()\n\t{\n parent::__construct();\n\t\t$this->set_table_name(\"vdo_gallerys\");\n\t\t\n\t\t$this->tbl_vdo_name = \"vdo\";\n\t\t//$this->tbl_product_type_name = \"product_type\";\n\t}",
"private function setupProducts()\n {\n $products = [\n ['name' => 'Product 1'],\n ['name' => 'Product 2'],\n ['name' => 'Product 3'],\n ['name' => 'Product 4'],\n ];\n\n $container = $this->setupData($products, Product::class);\n\n $this->products = $container;\n }",
"public function initialize(){\n $this->hasMany(\n \"category_id\", \n \"Multiple\\\\Frontend\\\\Models\\\\Products\", \n \"category\",\n array(\n \"reusable\" => true\n )\n );\n \n $this->hasManyToMany(\n \"category_id\", \n \"Multiple\\\\Frontend\\\\Models\\\\Products\", \n \"category\", \n \"vendor_id\", \n \"Multiple\\\\Frontend\\\\Models\\\\Vendor\", \n \"vendor_id\",\n array(\n \"reusable\" => true,\n \"alias\" => \"AliasVendorPro\"\n )\n );\n }",
"public function init() {\n $this->table = 'depenses';\n }",
"public function initialize()\n {\n $this->setSource('Customer');\n $this->hasMany(\"Number\", \"Arrears\", \"CustomerNumber\");\n $this->hasMany(\"Number\", \"Charge\", \"CustomerNumber\");\n\n $c = $this;\n $c->IsCut = 0;\n $c->ArrearsCount = 0;\n $c->CutCount = 0;\n $c->IsClean = 0;\n $c->IsControl = 0;\n $c->Money = 0;\n $c->IsRent = 0;\n $c->RenterPhone = \"\";\n\n $c->CanCut = 0;\n $c->IsSpecial = 0;\n $c->CutStyle=\"\";\n $c->PressCount = 0;\n }",
"function __construct($TableName = 'rate_breakpoint') {\n $this->idrate_breakpoint = new DB_Field('idrate_breakpoint', 0, new DbIntSanitizer());\n $this->Household_Size = new DB_Field('Household_Size', 0, new DbIntSanitizer(), TRUE, TRUE);\n $this->Rate_Category = new DB_Field('Rate_Category', '', new DbStrSanitizer(4), TRUE, TRUE);\n $this->Breakpoint = new DB_Field('Breakpoint', 0, new DbIntSanitizer(), TRUE, TRUE);\n $this->Timestamp = new DB_Field('Timestamp', NULL, new DbDateSanitizer(\"Y-m-d H:i:s\"));\n\n // This line stays at the end of the function.\n parent::__construct($TableName);\n }",
"public function __construct()\n {\n $this->productList = new ProductList();\n }",
"public function __construct()\n {\n $this->currentId = Piwik_DataTable_Manager::getInstance()->addTable($this);\n }",
"public function __construct()\n {\n $this->table = 'products';\n $this->primary_key = 'id';\n \n $this->has_many['pictures'] = array(\n 'foreign_model' => 'Pictures_model',\n 'foreign_table' => 'pictures',\n 'foreign_key' => 'product_id',\n 'local_key' => 'id'\n );\n \n $this->has_many['options'] = array(\n 'foreign_model' => 'Product_options_model',\n 'foreign_table' => 'product_options',\n 'foreign_key' => 'product_id',\n 'local_key' => 'id'\n );\n\n \n \n parent::__construct();\n }",
"public function __construct()\n\t{\n\t\t$this->dbInfo = new DbInfo();\n\t}",
"public function __construct($table_n) {\n\t\t$this->set_vals($table_n);\n\t\t//Uses above values to generate query components\n\t\t$this->set_query_components();\n\t\t//if the table is empty kill the script... Should be customized per ones needs\n\t\tif($this->record_count() == 0) {\n\t\t\texit(\"No Records\");\n\t\t}\n\t\t//or assign total the value\n\t\t$this->total = $this->record_count();\n\t\t//array of \"UI component observers\"\n\t\t$this->_observers = array();\n\t}",
"protected function initialize()\n {\n $this->data = new stdClass();\n $this->data->ownId = null;\n $this->data->amount = new stdClass();\n $this->data->amount->currency = self::AMOUNT_CURRENCY;\n $this->data->amount->subtotals = new stdClass();\n $this->data->items = [];\n $this->data->receivers = [];\n }",
"public function __construct()\n {\n parent::__construct();\n // check if user has products capability\n if(User::userCan('products') === false)\n {\n abort(403, 'Unauthorized action.');\n }\n $this->product \t\t= new Products;\n $this->category \t= new Categories;\n $this->att \t = new ProductAttributes;\n }",
"protected function _construct()\n {\n $this->_init(CarrierModel::RATE_TABLE_NAME, 'rate_id');\n }",
"public function init() {\n//\t\tif (checkTable()) {\n//\t\t\t$this->model->upgrade();\n//\t\t}\n//\t\telse {\n\t\t\t$this->model->install();\n\t\t\t$this->loadDefaults();\n//\t\t}\n\t\t\n\t}",
"public function initPurchaseDetails()\n\t{\n\t\t$this->collPurchaseDetails = array();\n\t}",
"function __construct() \n\t\t{\n\t\t \n\t\t \t$this->bi_config(); \t\t\t\n\t\t\t// setup all variables \n\t\t\t$this->clear();\n\t\t\t\n\t\t}",
"public function __construct(){\n\t\t\t$this->productoDetalleModelo = new productoDetalleModelo;\n\t\t\t$this->productoFavoritoControlador = new productoFavoritoControlador();\n\t\t\t$this->productoEstrellaControlador = new productoEstrellaControlador();\n\t\t\t$this->productoCarritoControlador = new productoCarritoControlador();\n\t\t}",
"public function initialize()\n {\n $this->setSchema(\"cubicfox\");\n $this->setSource(\"rates\");\n\n $this->hasManyToMany(\n \"id\",\n \"Users\",\n \"user_id\", \n \"product_id\",\n \"Products\",\n \"id\"\n );\n }",
"public function __construct(){\n parent::__construct();\n $this->load->library('services/Product_services');\n $this->services = new Product_services;\n \n $this->load->model( array(\n\t\t\t'category_model',\n\t\t\t'product_model' ,\n\t\t\t'store_model' ,\n ));\n $this->product_model->set_message_delimiters( '', '' );\n $this->product_model->set_error_delimiters( '', '' );\n }",
"public function init() {\n\t\t$this->store_url = 'https://getblocklab.com';\n\t\t$this->product_slug = 'block-lab-pro';\n\t}",
"public function initialize() {\n $this->setSchema(\"coopdb\");\n $this->setSource(\"pedidosdetalle\");\n $this->belongsTo('IDKEY', 'Pedidos', 'TxnID', ['alias' => 'Pedidos']);\n }",
"public function __construct() {\n\t\tforeach ($this as $key => $value) \n\t\t\t$this->$key = '';\n\t\t$this->log_date = $this->seller_PP_ProfileStartDate = $this->timestmp = '0000-00-00 00:00:00';\n\t\t$this->vendor_id = 0;\n\t}",
"function __construct()\n\t{\n\t\t// this->model = new Producto();\n\t}",
"function load_product_info()\n {\n if (self::get_total_number_of_courses() > 0) {\n //cycle through course(s), load productInfo if available\n foreach ($this->courses as $key => $course) {\n $this->courses[$key] = array_merge($course,$this->get_product_info($course['course_id']));\n foreach ($course['modules'] as $module){\n $course['modules'][$module['module_id']]['product_info'] = $this->get_product_info($module['module_id']);\n }\n }\n }\n }",
"function __construct() {\n // Initialize the dbms pointer.\n AbstractMapper::__construct();\n\n // Initialize table name.\n $this->tableName = \"orders\";\n }",
"function __construct() {\n // Initialize the dbms pointer.\n AbstractMapper::__construct();\n\n // Initialize table name.\n $this->tableName = \"special_fees\";\n }",
"function InitLibraryData()\n {\n if ($this->debug_mode)\n echo $this->ClassName . \"::InitLibraryData();\" . \"<HR>\";\n if ($this->listSettings->HasItem(\"MAIN\", \"DB_USE_ABSTRACTTABLE\"))\n $this->use_abstracttable = $this->listSettings->GetItem(\"MAIN\", \"DB_USE_ABSTRACTTABLE\");\n\n $use_db_columns = false;\n //--check if defined flag use database columns definition\n if ($this->listSettings->HasItem(\"MAIN\", \"DB_USE_COLUMNDEFINITION\"))\n $use_db_columns = $this->listSettings->GetItem(\"MAIN\", \"DB_USE_COLUMNDEFINITION\");\n\n if (! $this->use_abstracttable) { //--if dont use abstracttable class (use storage class)\n $this->Kernel->ImportClass(\"data.\" . strtolower($this->Table), $this->Table);\n if (! class_exists($this->Table)) { //check if class-table exists\n user_error(\"Can't find table class <b>$this->Table</b> for library $this->library_ID\", E_USER_ERROR);\n die();\n }\n else {\n $this->Storage = new $this->Table($this->Kernel->Connection, $this->Kernel->Settings->GetItem(\"database\", $this->Table), $use_db_columns);\n }\n }\n else { //--else (use abstracttable class)\n $this->Storage = new AbstractTable($this->Kernel->Connection, $this->Kernel->Settings->GetItem(\"database\", $this->Table), true);\n }\n\n //--check if defined flag use database columns definition\n if ($this->listSettings->HasItem(\"MAIN\", \"DB_USE_COLUMNDEFINITION\"))\n $use_db_columns = $this->listSettings->GetItem(\"MAIN\", \"DB_USE_COLUMNDEFINITION\");\n if ($use_db_columns)\n TableHelper::prepareColumnsDB($this->Storage, true, false);\n\n if ($this->listSettings->HasItem(\"LIST\", \"FIELDS_COUNT\")) {\n $fields_count = $this->listSettings->GetItem(\"LIST\", \"FIELDS_COUNT\");\n }\n else {\n $this->AddEditErrorMessage(\"EMPTY_RECORDCOUNT_SETTINGS\", array(), true);\n }\n $this->ProcessMainSection();\n\n for ($i = 0; $i < $fields_count; $i ++) {\n \tif ($this->CheckFieldPackage($i))\n \t$this->GetFieldSettings($i);\n } // for\n\n\n }",
"protected function _construct()\n {\n $this->_init(SetupSchema::TABLE_ORDER, OrderReferenceInterface::ENTITY_ID);\n }",
"public function __construct()\n {\n $con = new PDO('mysql:host=localhost;dbname=inventorymanagement', 'root', '');\n $con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);\n $con->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n $this->setDbConx($con);\n }",
"private function getTables() {\n\t\t$this->_vm_product = $this->getTable('vm_product');\n\t}",
"public function initialize()\n {\n $this->data = new stdClass();\n }",
"public function __construct() {\n parent::__construct(self::TABLE_NAME, self::ID, self::NAME);\n $this->_old_gcd_access_id = null;\n $this->_site_country = null;\n $this->_site_region_id = null;\n $this->_site_land_id = null;\n $this->_biome_type_id = null;\n $this->_site_type_id = null;\n $this->_basin_size_id = null;\n $this->_basin_size_value = null;\n $this->_catch_size_id = null;\n $this->_catch_size_value = null;\n $this->_local_veg_id = null;\n $this->_regional_veg_id = null;\n $this->_flow_type_id = null;\n $this->_site_id_status = 0 ;\n \n $this->_list_site_notes = array();\n $this->_liste_publi_id = array(); //xli initialisation des publications.\n\n $this->_temp_status_import_id = null;\n $this->_temp_latitude_value = null;\n $this->_temp_longitude_value = null;\n $this->_temp_elevation_value = null;\n $this->_temp_charcoal_pref_unit_id = null;\n $this->_temp_water_depth_value = null;\n $this->_temp_age_model_method_id = null;\n $this->_temp_data_source_id = null;\n $this->_temp_database_version_id = null;\n $this->_temps_age_units_id = null;\n $this->_list_core = array();\n }",
"public function __construct()\n\t\t{\n\t\t\t$this->_db_table = new Application_Model_DbTable_TourType();\n\t\t}",
"function __construct() {\n\t \n\t \t\t$this->bi_config(); \t\t\t\n\t\t\t// setup all variables \n\t\t\t$this->Clear();\n\t}",
"public function _construct()\n {\n $this->_init('inwardproduct/inwardproduct', 'inwardproduct_id');\n }",
"public function __construct() {\n parent::__construct();\n $this->_table_columns = array(\"id\", \"entry_date\", \"account_type\", \"entry_value\", \"memo\", \"expense\", \"confirm\", \"deleted\", \"create_stamp\", \"modified_stamp\");\n }",
"protected function initStorageObjects()\n {\n $this->sellerDetail = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }",
"public function initialize()\n\t{\n\t\t$this->data = new stdClass();\n\t}",
"public function initialize(){\n\t\t $db_params = OpenContext_OCConfig::get_db_config();\n\t\t $db = new Zend_Db_Adapter_Pdo_Mysql($db_params);\n\t\t $db->getConnection();\n\t\t $this->setUTFconnection($db);\n\t\t $this->db = $db;\n\t\t $this->checkTableIndex();\n\t\t $this->solrDocArray = false;\n\t\t $this->toDoList = false;\n\t\t $this->toDoCount = 0;\n\t\t $this->errors = array();\n\t\t $this->totalIndexed = 0;\n }",
"public function __construct()\n {\n add_filter('woocommerce_dev_product_data', array($this, 'filter_product_data'), 10, 2);\n\n // Add Custom Query Params\n add_filter('woocommerce_product_data_store_cpt_get_products_query', array($this, 'handle_custom_query_var'), 10, 2);\n\n // Clear Cache Product After Update\n if (self::$enable_cache) {\n add_action('woocommerce_update_product', array($this, 'remove_cache_after_update_product'), 10, 2);\n add_action('woocommerce_delete_product', array($this, 'remove_cache_after_delete_product'));\n add_action('woocommerce_delete_product_variation', array($this, 'remove_cache_after_delete_product'));\n }\n }",
"public function loadProducts()\n {\n if (!isset($this->mix_id)) {\n return false;\n }\n\n $this->products = array();\n $query = \"SELECT mg.*, sup.*, p.product_id, p.product_nr, p.name, p.paint_chemical, coat.coat_desc as coatDesc \" .\n \"FROM \" . TB_MIXGROUP . \" mg \" .\n \"JOIN \" . TB_PRODUCT . \" p ON p.product_id = mg.product_id \" .\n \"JOIN \" . TB_SUPPLIER . \" sup ON p.supplier_id = sup.supplier_id \" .\n \"JOIN \" . TB_COAT . \" coat ON coat.coat_id = coating_id \" .\n \"WHERE mg.mix_id = {$this->db->sqltext($this->mix_id)}\";\n\n $this->db->query($query);\n if ($this->db->num_rows() == 0) {\n return false;\n }\n\n $productsData = $this->db->fetch_all();\n\n $unittype = new Unittype($this->db);\n //get pfp if exist\n $pfp = $this->getPfp();\n $pfpProduct = array();\n if ($pfp) {\n $pfpProducts = $pfp->getProducts();\n }\n\n foreach ($productsData as $productData) {\n $mixProduct = new MixProduct($this->db);\n foreach ($productData as $property => $value) {\n if (property_exists($mixProduct, $property)) {\n $mixProduct->$property = $productData->$property;\n }\n }\n //\tTODO: add userfriendly records to product properties\n $mixProduct->initializeByID($mixProduct->product_id);\n\n //\tif there is a primary product then this is an pfp-based mix\n if ($mixProduct->is_primary) {\n $this->isPfp = true;\n }\n\n if ($productData->ratio) {\n $mixProduct->ratio_to_save = $productData->ratio;\n }\n\n $mixProduct->unittypeDetails = $unittype->getUnittypeDetails($mixProduct->unit_type);\n $unittypeClass = $unittype->getUnittypeClass($mixProduct->unit_type);\n\n $mixProduct->unittypeDetails['unittypeClass'] = $unittypeClass;\n $mixProduct->initUnittypeList($unittype);\n\n $mixProduct->json = json_encode($mixProduct);\n //get is Ratio \n foreach ($pfpProducts as $pfpProduct) {\n if ($pfpProduct->getProductId() == $productData->product_id) {\n if (!is_null($pfpProduct->getRatioFromOriginal()) && !is_null($pfpProduct->getRatioToOriginal())) {\n $mixProduct->isRange = true;\n $mixProduct->range_ratio = trim($pfpProduct->getRatioFromOriginal()) . '-' . trim($pfpProduct->getRatioToOriginal());\n } else {\n $mixProduct->isRange = false;\n }\n break;\n }\n }\n //\tpush to mix products\n array_push($this->products, $mixProduct);\n }\n\n return $this->products;\n }"
] | [
"0.68105006",
"0.651888",
"0.6446361",
"0.620798",
"0.6200149",
"0.619444",
"0.61800057",
"0.61496913",
"0.6143833",
"0.61148447",
"0.6112663",
"0.6097498",
"0.6095022",
"0.6072521",
"0.6048642",
"0.6027924",
"0.5995149",
"0.5994371",
"0.5961943",
"0.59225196",
"0.59165114",
"0.58986133",
"0.5898602",
"0.5896352",
"0.58921236",
"0.5891518",
"0.587948",
"0.58762044",
"0.58757794",
"0.5873121",
"0.5857035",
"0.5852912",
"0.58082944",
"0.5806142",
"0.57948464",
"0.5782062",
"0.5780441",
"0.5765756",
"0.57548034",
"0.5751686",
"0.5751082",
"0.5742479",
"0.5730044",
"0.5729564",
"0.5721596",
"0.571842",
"0.5714152",
"0.57119477",
"0.5707993",
"0.5690185",
"0.5685807",
"0.5685078",
"0.56586725",
"0.5658479",
"0.5654544",
"0.5616648",
"0.5616158",
"0.56091374",
"0.5603095",
"0.5600437",
"0.5597093",
"0.5586476",
"0.5581004",
"0.5576576",
"0.557379",
"0.5570201",
"0.5570042",
"0.5569034",
"0.5565547",
"0.5560318",
"0.55503964",
"0.5550064",
"0.55422264",
"0.55408263",
"0.5536941",
"0.55267054",
"0.552401",
"0.55222946",
"0.55197185",
"0.5518743",
"0.5511652",
"0.5506311",
"0.5504769",
"0.5503349",
"0.5503344",
"0.54973054",
"0.5494117",
"0.54918116",
"0.54836845",
"0.5476385",
"0.54669833",
"0.5466108",
"0.5463736",
"0.5443573",
"0.5437122",
"0.5433038",
"0.54306614",
"0.5429629",
"0.54244983",
"0.5423676",
"0.5423276"
] | 0.0 | -1 |
Returns whether the object has been modified. | public function isModified()
{
return !!$this->modifiedColumns;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function isModified() {\n\t\treturn $this->_Modified;\n\t}",
"function isModified() {\n\t\treturn $this->_Modified;\n\t}",
"function isModified() {\n\t\treturn $this->_Modified;\n\t}",
"function isModified() {\n\t\treturn $this->_Modified;\n\t}",
"function isModified() {\n\t\t$modified = $this->_Modified;\n\t\tif ( !$modified && $this->getCount() > 0 ) {\n\t\t\tforeach ( $this as $oObject ) {\n\t\t\t\t$modified = $modified || $oObject->isModified();\n\t\t\t}\n\t\t}\n\t\treturn $modified;\n\t}",
"function isModified() {\n\t\t$modified = $this->_Modified;\n\t\tif ( !$modified && $this->getCount() > 0 ) {\n\t\t\tforeach ( $this as $oObject ) {\n\t\t\t\t$modified = $modified || $oObject->isModified();\n\t\t\t}\n\t\t}\n\t\treturn $modified;\n\t}",
"public function isModified()\n {\n\treturn $this->modified;\n }",
"function isModified() {\n\t\t$modified = $this->_Modified;\n\n\t\treturn $modified;\n\t}",
"function isModified() {\n\t\t$modified = $this->_Modified;\n\n\t\treturn $modified;\n\t}",
"function isModified() {\n\t\t$modified = $this->_Modified;\n\n\t\treturn $modified;\n\t}",
"public function isModified(): bool;",
"function isModified() { return $this->_modified; }",
"function isModified() { return $this->_modified; }",
"public function isModified() {\n return count($this->modifiedAttributes) > 0;\n }",
"public function isModified();",
"public function isDirty()\n {\n return $this->isModified;\n }",
"public function wasModified()\n\t{\n\t\tif ($this->get('modified') && $this->get('modified') != '0000-00-00 00:00:00')\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function isDirty() {\n\t\treturn count($this->_modified);\n\t}",
"public function isChanged() : bool\n {\n\n return $this->_changed;\n\n }",
"public function isChanged() {\n\t\treturn $this->_changed > 0;\n\t}",
"public function hasChanged(): bool\n {\n return $this->changed;\n }",
"public function hasChanges () {\n return !!$this->dirty;\n }",
"public function hasIfNotModified()\n {\n return isset($this->if_not_modified);\n }",
"function isUpdated() {\n\t\treturn $this->_Updated;\n\t}",
"public function isChanged()\n {\n return ! empty(array_diff_assoc($this->items, $this->clone));\n }",
"public function getHasChanged()\r\n {\r\n return $this->_hasChanged;\r\n }",
"public function isModified($name) {\n\t\treturn isset($this->_modified[$name]);\n\t}",
"public function hasChanged() { return $this->changed; }",
"public function isDirty()\n\t{\n\t\treturn (bool)count($this->dirtyFields);\n\t}",
"public function getIsModifiedOnStage() {\n\t\treturn true;\n\t}",
"public function hasChanged(): bool\n {\n if (! $this->isSynced()) {\n return true;\n }\n\n return $this->attributes !== $this->original;\n }",
"public function isDirty();",
"public function isDirty()\r\n {\r\n if (!$this->id)\r\n return true;\r\n \r\n return $this->dirty;\r\n }",
"public function isDirty(): bool;",
"public function dirty() {\n\t\treturn ! $this->exists or count($this->get_dirty()) > 0;\n\t}",
"public function isDirty()\r\n\t{\r\n\t\treturn (count($this->changelog)>0) ? true : false;\r\n\t}",
"public function isDirty(): bool\n {\n return count($this->changedAttributesName()) > 0;\n }",
"public function areDirty()\n {\n return !empty($this->current) || !empty($this->remove);\n }",
"public function isModified($name = NULL);",
"public function isUpdated() {}",
"public function hasChanged(): bool;",
"public function hasChanged(): bool;",
"public function isDirty()\n {\n if (count($this->errors)) {\n return true;\n }\n\n return false;\n }",
"public function hasChangedFields()\n {\n return (count($this->_changedFields) > 0);\n }",
"public function getIsUpdated()\n {\n return $this->isUpdated;\n }",
"public function hasDirtyData(): bool\n {\n return ($this->state == self::STATE_MANAGED\n && ($data = $this->itemReflection->dehydrate($this->item))\n && (! $this->isDataEqual($data, $this->originalData))\n );\n }",
"public function has_changes() {\n\t\t\t$properties = array_keys(get_object_vars($this));\n\t\t\t$order = SalesOrderEdit::load($this->sessionid, $this->orderno);\n\n\t\t\tforeach ($properties as $property) {\n\t\t\t\tif ($this->$property != $order->$property) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"public function hasChanged();",
"public function hasChanged();",
"function isDirty() : bool;",
"public function canBeUpdated()\n {\n return $this->isNotYetSubmitted();\n }",
"public function isModifyProtected() {\n\t\treturn $this->getModifyProtected();\n\t}",
"function isChanged(): bool;",
"public function changed() {\n\t\t\tif (!$this->original_data) {\n\t\t\t\tthrow new Exception('call exists() before calling changed()');\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->last_change != $this->original_last_change ||\n\t\t\t $this->last_change_reason != $this->original_last_change_reason ||\n\t\t\t $this->lanes_affected != $this->original_lanes_affected ||\n\t\t\t $this->traffic_impact != $this->original_traffic_impact ||\n\t\t\t $this->reason != $this->original_reason) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\treturn false;\n\t\t}",
"public function beenUpdated()\n {\n return count($this->updatePlan) > 0;\n }",
"public function hasChanging()\n {\n return $this->changing !== null;\n }",
"public function _isDirty() {}",
"function isUpdating()\r\n {\r\n return $this->_updatecounter != 0;\r\n }",
"public function isNotChanged()\n {\n return empty(array_diff_assoc($this->items, $this->clone));\n }",
"public function dirty()\n\t{\n\t\tif ( ! $this->app['files']->exists($this->cacheFilePath))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function hasChanged() {\n\t\treturn trim( $this->fileSize ) != trim( $this->currentSize );\n\t}",
"private function GetModified()\n\t\t{\n\t\t\treturn $this->modified;\n\t\t}",
"public function hasLastModifiedMs()\n {\n return $this->LastModifiedMs !== null;\n }",
"public function get_hasIfModifiedSince()\n {\n return $this->hasIfModifiedSince;\n }",
"private function changed() {\n return !empty($this->tags['new']) || \n !empty($this->tags['del']);\n }",
"public function isMutable(): bool\n {\n return $this->mutable;\n }",
"public function hasChange()\n {\n return (\n count($this->getFieldsWithUpdate()) > 0\n || count($this->getIndexesWithUpdate()) > 0\n || $this->addSoftDelete\n || $this->dropSoftDelete\n || $this->addTimestamps\n || $this->dropTimestamps);\n }",
"public function hasUpdate();",
"public function getModified()\r\n {\r\n return $this->modified;\r\n }",
"public function hasLastUpdated() {\n\t\treturn $this->lastUpdated !== null;\n\t}",
"function &modified()\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n return $this->Modified;\n }",
"public function dataModified()\n\t{\n\t\treturn $this->_dataModified;\n\t}",
"public function isUpdate(){\n\t\treturn isset($this->{$this->getPrimaryKey()}) ? true : false;\n\t}",
"public function getModified()\n {\n return $this->modified;\n }",
"public function getModified()\n {\n return $this->modified;\n }",
"public function getModified()\n {\n return $this->modified;\n }",
"public function getModified()\n {\n return $this->modified;\n }",
"public function getModified()\n {\n return $this->modified;\n }",
"public function getModified()\n {\n return $this->modified;\n }",
"public function getModified() {\n\t\treturn $this->modified;\n\t}",
"public function isNew()\n {\n return $this->hasUpdates;\n }",
"public function hasDataChanged($object)\n {\n if (!$object->getOrigData()) {\n return true;\n }\n\n $fields = $this->_getWriteAdapter()->describeTable($this->_getTableByValue($object));\n foreach (array_keys($fields) as $field) {\n if ($object->getOrigData($field) != $object->getData($field)) {\n return true;\n }\n }\n\n return false;\n }",
"public function props_changed()\n\t{\n\t\treturn $this->props_changed;\n\t}",
"public function getModified() {}",
"function _isDirty() ;",
"public function hasRebuilt() {\n return $this->rebuilt;\n }",
"public function _isDirty($propertyName = null)\n {\n return $this->getIgnoreDirty() ? false : parent::_isDirty($propertyName);\n }",
"public function hasUpdates();",
"public function hasUserUpdated(): bool\n {\n return !is_null($this->getUserUpdatedDate());\n }"
] | [
"0.83879375",
"0.83879375",
"0.83879375",
"0.83879375",
"0.83082765",
"0.83082765",
"0.82983106",
"0.8264392",
"0.8264392",
"0.8264392",
"0.82167906",
"0.8185849",
"0.8185849",
"0.8012204",
"0.8002042",
"0.7990688",
"0.7959424",
"0.78494513",
"0.7748471",
"0.76909226",
"0.7662409",
"0.7564684",
"0.753955",
"0.7426324",
"0.7422529",
"0.73244715",
"0.73049587",
"0.73000896",
"0.72799104",
"0.7220559",
"0.7209738",
"0.7200451",
"0.7185374",
"0.7170065",
"0.71207875",
"0.71140164",
"0.70766956",
"0.70691174",
"0.70137835",
"0.6997324",
"0.69782245",
"0.69782245",
"0.6949931",
"0.69284666",
"0.6852744",
"0.6836523",
"0.6834188",
"0.6833336",
"0.6833336",
"0.68139327",
"0.6779439",
"0.67446846",
"0.6744323",
"0.6725337",
"0.67062134",
"0.6672819",
"0.66715664",
"0.6656254",
"0.66482455",
"0.6647019",
"0.6618729",
"0.66000205",
"0.659532",
"0.6586289",
"0.6586185",
"0.6547806",
"0.65279406",
"0.6519053",
"0.65122813",
"0.6506241",
"0.648458",
"0.6478157",
"0.64670545",
"0.64664054",
"0.64664054",
"0.64664054",
"0.64664054",
"0.64664054",
"0.64664054",
"0.6466069",
"0.6464838",
"0.64558595",
"0.6451433",
"0.6436788",
"0.6405211",
"0.63460875",
"0.6339113",
"0.63282025",
"0.6320045"
] | 0.77422196 | 30 |
Has specified column been modified? | public function isColumnModified($col)
{
return $this->modifiedColumns && isset($this->modifiedColumns[$col]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isModified()\n {\n return !!$this->modifiedColumns;\n }",
"public function isModified()\n {\n return !!$this->modifiedColumns;\n }",
"public function isModified()\n {\n return !!$this->modifiedColumns;\n }",
"public function isModified()\n {\n return !!$this->modifiedColumns;\n }",
"public function isModified()\n {\n return !!$this->modifiedColumns;\n }",
"public function isModified()\n {\n return !!$this->modifiedColumns;\n }",
"public function isModified()\n {\n return !!$this->modifiedColumns;\n }",
"public function isModified()\n {\n return !!$this->modifiedColumns;\n }",
"public function isModified()\n {\n return !!$this->modifiedColumns;\n }",
"public function isModified()\n {\n return !!$this->modifiedColumns;\n }",
"public function isModified()\n {\n return !!$this->modifiedColumns;\n }",
"public function isModified()\n {\n return !!$this->modifiedColumns;\n }",
"public function isAltered(): bool\n {\n return count($this->alteredColumns) > 0;\n }",
"public function isModified($column)\n {\n if (empty($this->cleanData) || !array_key_exists($column, $this->cleanData)) {\n return array_key_exists($column, $this->data);\n }\n return $this->cleanData[$column] !== $this->data[$column];\n }",
"public function isChanged() {\n\t\treturn $this->_changed > 0;\n\t}",
"public function hasChange()\n {\n return (\n count($this->getFieldsWithUpdate()) > 0\n || count($this->getIndexesWithUpdate()) > 0\n || $this->addSoftDelete\n || $this->dropSoftDelete\n || $this->addTimestamps\n || $this->dropTimestamps);\n }",
"public function trackChanges()\n {\n \n if (!isset(static::$cols['m_version'] ))\n return false;\n\n return static::$trackChanges;\n\n }",
"public function hasChanged(): bool;",
"public function hasChanged(): bool;",
"public function hasChanged(): bool\n {\n return $this->changed;\n }",
"public function hasChanged($fieldName=null) {}",
"public function isModified(): bool;",
"public function isUpdate(){\n\t\treturn isset($this->{$this->getPrimaryKey()}) ? true : false;\n\t}",
"function isChanged(): bool;",
"public function isChanged() : bool\n {\n\n return $this->_changed;\n\n }",
"public function hasChanges () {\n return !!$this->dirty;\n }",
"function isMemberChanged(string $name): bool;",
"public function isUpdated() {}",
"public function hasChangedFields()\n {\n return (count($this->_changedFields) > 0);\n }",
"function has_changes() {\n $changed = (count($this->add['tables' ]) + count($this->update['tables' ]) + count($this->remove['tables' ]) +\n count($this->add['routines']) + count($this->update['routines']) + count($this->remove['routines']) +\n count($this->add['events' ]) + count($this->update['events' ]) + count($this->remove['events' ]) +\n count($this->add['views' ]) + count($this->update['views' ]) + count($this->remove['views' ]) +\n count($this->add['triggers']) + count($this->update['triggers']) + count($this->remove['triggers'])\n );\n return ($changed != 0 or isset($this->schema->charset) or isset($this->schema->collate));\n }",
"public function checkEnableColumnEdit()\n\t{\n\t\treturn false;\n\t}",
"public function hasChanged() { return $this->changed; }",
"public function hasChanged();",
"public function hasChanged();",
"public function isDirty()\r\n\t{\r\n\t\treturn (count($this->changelog)>0) ? true : false;\r\n\t}",
"public function hasUpdate();",
"public function getHasChanged()\r\n {\r\n return $this->_hasChanged;\r\n }",
"public function changed() {\n\t\t\tif (!$this->original_data) {\n\t\t\t\tthrow new Exception('call exists() before calling changed()');\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->last_change != $this->original_last_change ||\n\t\t\t $this->last_change_reason != $this->original_last_change_reason ||\n\t\t\t $this->lanes_affected != $this->original_lanes_affected ||\n\t\t\t $this->traffic_impact != $this->original_traffic_impact ||\n\t\t\t $this->reason != $this->original_reason) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\treturn false;\n\t\t}",
"public function isModified();",
"public function hasChanged(): bool\n {\n if (! $this->isSynced()) {\n return true;\n }\n\n return $this->attributes !== $this->original;\n }",
"public function isDirty() {\n\t\treturn count($this->_modified);\n\t}",
"public function isDirty();",
"public function isChanged($field = null) {\n return $field ? array_key_exists($field, $this->_changed_data) : $this->_is_changed;\n }",
"public function markUserAsUpdated(): bool\n {\n return $this->fill([$this->UPDATECOLUMN, Chronos::date()->stamp()])\n ->save();\n }",
"public function getModifiedColumn()\n {\n return $this->modifiedColumn;\n }",
"public function isDirty(): bool;",
"public function has(string $col) : bool;",
"private function changed() {\n return !empty($this->tags['new']) || \n !empty($this->tags['del']);\n }",
"public function isDirty(): bool\n {\n return count($this->changedAttributesName()) > 0;\n }",
"public function hasColumn($name);",
"public function wasModified()\n\t{\n\t\tif ($this->get('modified') && $this->get('modified') != '0000-00-00 00:00:00')\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function isModified() {\n return count($this->modifiedAttributes) > 0;\n }",
"public function hasChangedEntries();",
"function isDirty() : bool;",
"public function hasChanging()\n {\n return $this->changing !== null;\n }",
"public function hasDataChanged($object)\n {\n if (!$object->getOrigData()) {\n return true;\n }\n\n $fields = $this->_getWriteAdapter()->describeTable($this->_getTableByValue($object));\n foreach (array_keys($fields) as $field) {\n if ($object->getOrigData($field) != $object->getData($field)) {\n return true;\n }\n }\n\n return false;\n }",
"public function getIsUpdatedAttribute (): bool\n {\n return $this->created_at < $this->updated_at;\n }",
"public function hasUpdates();",
"public function columnIsPersisted($column, $table)\n {\n $columns = $this->getColumns($table);\n\n return isset($columns[$column]);\n }",
"public function hasDirtyValueOfAttribute($attributeName);",
"public function isUpdatable(): bool\n {\n return true;\n }",
"public function isModified()\n {\n\treturn $this->modified;\n }",
"protected function hasHook($column)\n {\n // If developer provided column prefixed with table name we will\n // not even try to map the column, since obviously the value\n // refers to the actual column name on the queried table.\n return is_string($column) && strpos($column, '.') === false;\n }",
"public function isModified($name = NULL);",
"function isModified() {\n\t\treturn $this->_Modified;\n\t}",
"function isModified() {\n\t\treturn $this->_Modified;\n\t}",
"function isModified() {\n\t\treturn $this->_Modified;\n\t}",
"function isModified() {\n\t\treturn $this->_Modified;\n\t}",
"function isModified() { return $this->_modified; }",
"function isModified() { return $this->_modified; }",
"public function hasColumn($columnName)\r\n {\r\n }",
"public function hasCommitRow(){\n return $this->_has(3);\n }",
"public function isDirty()\n\t{\n\t\treturn (bool)count($this->dirtyFields);\n\t}",
"function verify_column( $column, $table, $db = null ) {\n\n\t\t$columns = $this->get_columns( $table, $db );\n\t\treturn in_array( $column, $columns );\n\n\t}",
"protected function modelIsWritable() {\n\t\t// Check if model has method dbUpdate\n\t\t$model = $this->model;\n\t\treturn method_exists($model, \"dbUpdate\");\n\t}",
"private function checkForNewRecord(): bool\n {\n return null === $this->getOldName();\n }",
"public function has_changes() {\n\t\t\t$properties = array_keys(get_object_vars($this));\n\t\t\t$order = SalesOrderEdit::load($this->sessionid, $this->orderno);\n\n\t\t\tforeach ($properties as $property) {\n\t\t\t\tif ($this->$property != $order->$property) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"function isModified() {\n\t\t$modified = $this->_Modified;\n\t\tif ( !$modified && $this->getCount() > 0 ) {\n\t\t\tforeach ( $this as $oObject ) {\n\t\t\t\t$modified = $modified || $oObject->isModified();\n\t\t\t}\n\t\t}\n\t\treturn $modified;\n\t}",
"function isModified() {\n\t\t$modified = $this->_Modified;\n\t\tif ( !$modified && $this->getCount() > 0 ) {\n\t\t\tforeach ( $this as $oObject ) {\n\t\t\t\t$modified = $modified || $oObject->isModified();\n\t\t\t}\n\t\t}\n\t\treturn $modified;\n\t}",
"function has_column($column_name)\n {\n if (empty($this->object->_table_columns)) {\n $this->object->lookup_columns();\n }\n return array_search($column_name, $this->object->_table_columns) !== FALSE;\n }",
"public function _isDirty() {}",
"public function changed($attribute) {\n\t\treturn array_get($this->attributes, $attribute) != array_get($this->original, $attribute);\n\t}",
"function f_fieldExists($link, $table, $column, $column_attr = \"VARCHAR( 255 ) NULL\") {\r\n $exists = false;\r\n $columns = mysqli_query($link, \"SHOW COLUMNS FROM $table LIKE '\".$column.\"'\");\r\n //ferror_log(\"SQL: $sql \". \"returns \". $num_rows . \" rows.\");\r\n $exists = ( mysqli_num_rows($columns) )?TRUE:FALSE;\r\n if (!$exists) {\r\n ferror_log(\"ALTER TABLE `$table` ADD `$column` $column_attr\");\r\n if (mysqli_query($link, \"ALTER TABLE `$table` ADD `$column` $column_attr\")) {\r\n return TRUE;\r\n }\r\n } else {\r\n return TRUE;\r\n }\r\n return FALSE;\r\n}",
"public function isDirty()\n {\n return $this->isModified;\n }",
"function isUpdated() {\n\t\treturn $this->_Updated;\n\t}",
"public function hasColumn($name) {\n $info = $this->_data->getDeepValue('columns/' . $name);\n return !empty($info);\n }",
"public function changed($field)\n {\n $origin = $this->findByPk($this->id);\n\n if (!empty($origin))\n $return = ($this->$field !== $origin->$field);\n else\n $return = false;\n \n return $return;\n }",
"protected function hasSourceFieldChanged() {\n $source_field_name = $this->getSource()->getConfiguration()['source_field'];\n $current_items = $this->get($source_field_name);\n return isset($this->original) && !$current_items->equals($this->original->get($source_field_name));\n }",
"function updatesAllowed() {\n\t\treturn $this->getupdatable() == 1 ? true : false;\n\t}"
] | [
"0.7803793",
"0.7803793",
"0.7803793",
"0.7803793",
"0.7803793",
"0.7803793",
"0.7803793",
"0.7803793",
"0.7803793",
"0.7803793",
"0.7803793",
"0.7803793",
"0.76689327",
"0.74715585",
"0.6770546",
"0.665858",
"0.6598173",
"0.65959066",
"0.65959066",
"0.658281",
"0.6565356",
"0.65565914",
"0.6542204",
"0.65260285",
"0.65092653",
"0.65077126",
"0.64919895",
"0.6458011",
"0.6446284",
"0.64264953",
"0.64245707",
"0.64060384",
"0.63415945",
"0.63415945",
"0.6332399",
"0.6318948",
"0.6310929",
"0.6285219",
"0.6271517",
"0.6259267",
"0.62524843",
"0.62486196",
"0.6247919",
"0.62125546",
"0.61937326",
"0.61885864",
"0.61854553",
"0.6172047",
"0.6149735",
"0.6128346",
"0.6103792",
"0.6102932",
"0.6092682",
"0.60786396",
"0.60763127",
"0.6075518",
"0.60726655",
"0.6069761",
"0.60603637",
"0.6049906",
"0.60456437",
"0.6039846",
"0.6039652",
"0.60324323",
"0.602011",
"0.602011",
"0.602011",
"0.602011",
"0.601568",
"0.601568",
"0.59772795",
"0.5968133",
"0.5964057",
"0.595693",
"0.59515536",
"0.59390354",
"0.59384227",
"0.59196776",
"0.59196776",
"0.58959675",
"0.5880618",
"0.586018",
"0.5848224",
"0.58447695",
"0.58353496",
"0.58339256",
"0.5826916",
"0.58128357",
"0.58126026"
] | 0.8052138 | 9 |
Get the columns that have been modified in this object. | public function getModifiedColumns()
{
return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getColumns()\r\n\t{\r\n\t\tif($this->dirty) {\r\n\t\t\t$this->setColumns();\r\n\t\t\t$this->dirty = false;\r\n\t\t}\r\n\r\n\t\treturn $this->columns;\r\n\t}",
"public function getColumns() {\n return $this->columns;\n }",
"public function getColumns() {\n\t\treturn( $this->getTable()->getColumns() );\n\t}",
"public function getColumns()\n {\n return $this->_columns;\n }",
"public function getColumns()\n {\n return $this->columns;\n }",
"public function getColumns()\n {\n return $this->columns;\n }",
"public function getColumns()\n {\n return $this->columns;\n }",
"public function getColumns()\n {\n return $this->columns;\n }",
"public function getColumns()\n {\n return $this->columns;\n }",
"public function getColumns()\n {\n return $this->columns;\n }",
"public function getColumns()\n {\n return $this->columns;\n }",
"public function getColumns()\n {\n return $this->columns;\n }",
"public function getColumns()\n {\n return $this->columns;\n }",
"public function getColumns()\n {\n return $this->columns;\n }",
"public function getColumns()\n {\n return $this->columns;\n }",
"public function getColumns() {\n\t\treturn $this->columns;\n\t}",
"public function getColumns() {\n return $this->aColumns;\n }",
"public function updateColumns()\n\t{\n\t\treturn $this->updateColumns;\n\t}",
"public function columns()\n\t{\n\t\treturn $this->columns;\n\t}",
"public function columns()\n\t{\n\t\treturn $this->columns;\n\t}",
"public function getColumns()\n\t{\n\t\treturn $this->columns;\n\t}",
"public function getColumns()\n\t{\n\t\treturn $this->columns;\n\t}",
"public function getColumns()\n {\n if (! is_null($this->columns)) {\n return collect($this->columns);\n }\n\n return $this->columns = collect($this->rows->first())\n ->except(['created_at', 'updated_at', 'deleted_at', 'id'])\n ->keys();\n }",
"public function Columns()\n {\n return $this->columns;\n }",
"public function getModifiedColumn()\n {\n return $this->modifiedColumn;\n }",
"public function getColumns(): array\n {\n return $this->columns;\n }",
"public function getColumns(): array\n {\n return $this->columns;\n }",
"public function columns()\n {\n $this->addColumn();\n return $this->columns;\n }",
"public function get_columns_information() {\n return $this->columns_information;\n }",
"function getColumns() {return $this->_columns;}",
"public function getImportedColumns()\n {\n return $this->importedColumns;\n }",
"function get_columns( ) {\r\n\t\treturn self::mla_manage_columns_filter();\r\n\t}",
"public function getColumns()\n {\n // code...\n return $this->__COLUMNS__ ?? [];\n }",
"public function columns()\n {\n return $this->get('columns', []);\n }",
"public function getSpecificColumns()\n {\n return $this->_specificColumns;\n }",
"public function getTableColumns() { return $this->table->getColumns(); }",
"public function getColumns()\n\t\t{\n\t\t\tstatic $columns = array(\n\t\t\t\t'date_modified', 'date_created', 'cfe_event_id', 'name','short_name'\n\t\t\t);\n\t\t\treturn $columns;\n\t\t}",
"protected function getColumns(): array\n {\n if (is_null(self::$_columns)) {\n self::$_columns = parent::addColumns();\n }\n return self::$_columns;\n }",
"public function getColumns()\n\t\t{\n\t\t\tstatic $columns = array(\n\t\t\t\t'date_modified', 'date_created', 'cfe_action_type_id',\n\t\t\t\t'name'\n\t\t\t);\n\t\t\treturn $columns;\n\t\t}",
"public function getColumns()\n\t{\n\t\treturn $this->properties;\n\t}",
"public function columns()\n {\n if (!isset($this->columns)) {\n $this->columns = new Columns;\n }\n\n return $this->columns;\n }",
"public function getColumns()\n {\n return $this->allColumns ?: $this->defineListColumns();\n }",
"public function getModifiedArrayCopy()\n {\n $columns = array_intersect_key(\n $this->data,\n array_filter($this->modifiedDataFields)\n );\n\n return array_diff_key(\n $columns,\n array_combine(array_keys($this->relations), array_keys($this->relations))\n );\n }",
"public function getFields() {\n\t\treturn $this->tca['columns'];\n\t}",
"function readColumns() { return $this->_columns; }",
"protected function getAllColumns(){\n\t\t\treturn array_merge($this->columns, $this->keys);\n\t\t}",
"public function all()\n {\n return $this->columns;\n }",
"public function getColumnProperties()\n {\n return $this->columnProperties;\n }",
"public function getChangedFields()\n {\n return $this->_changedFields;\n }",
"public function get_columns()\n {\n }",
"public function get_columns()\n {\n }",
"public function get_columns()\n {\n }",
"public function get_columns()\n {\n }",
"public function get_columns()\n {\n }",
"public function get_columns()\n {\n }",
"protected function getUpdateColumns(){\n\t\t\t$updateColumns = null;\n\t\t\tif($this->toUpdate){\n\t\t\t\t$updateColumns = array();\n\t\t\t\tforeach ($this->toUpdate as $column) {\n\t\t\t\t\t$updateColumns[] = \"$column = :$column\";\n\t\t\t\t}\n\t\t\t\t$updateColumns = implode(\", \", $updateColumns);\n\t\t\t}\n\t\t\treturn $updateColumns;\n\t\t}",
"public function allColumns() {\n\t\treturn $this->allColumns;\n\t}",
"public static function getColumns()\n {\n $type = static::getType();\n return $type::getColumns();\n }",
"function getCols() { return $this->_cols; }",
"final public function cols()\n {\n return $this->doCols();\n }",
"final public function getColumns() {\n return implode(\",\", array_keys($this->_columns));\n }",
"public function getColumns()\n {\n if (null === $this->columns) {\n $this->columns = new Collection;\n }\n return $this->columns;\n }",
"function lookup_columns()\n {\n // Avoid doing multiple SHOW COLUMNS if we can help it\n $key = C_Photocrati_Transient_Manager::create_key('col_in_' . $this->get_table_name(), 'columns');\n $this->_table_columns = C_Photocrati_Transient_Manager::fetch($key, FALSE);\n if (!$this->_table_columns) {\n $this->object->update_columns_cache();\n }\n return $this->_table_columns;\n }",
"public function get_columns() {\n\n $instance = Envira_Gallery_Common::get_instance();\n return $instance->get_columns();\n\n }",
"public static function getUpdateColumns(): array {\n return ['appointment_id', 'create_time', 'update_time', 'state', 'tax_rate',\n 'amount_due', 'amount_payed', 'discount_rate'];\n }",
"public static function columns()\n {\n if (Deal::first() ?? false) {\n return array_diff(array_keys(Deal::first()->attributesToArray()), Deal::first()->exclude); \n } else {\n return array();\n }\n }",
"public function getColumns() {\n\t\t$spec = self::$specs[$this->id];\n\t\treturn array_value($spec, \"columns\", []);\n\t}",
"public function getColumns()\n\t{\n\t\tstatic $columns = array(\n\t\t\t'id',\n\t\t\t'application_id',\n\t\t\t'event_id',\n\t\t\t'response_id',\n\t\t\t'target_id',\n\t\t\t'mode',\n\t\t\t'date_created',\n\t\t);\n\t\t\n\t\treturn $columns;\n\t}",
"public static function getColumns()\n {\n return array();\n }",
"public function getColumns()\r\n {\r\n }",
"public function isModified()\n {\n return !!$this->modifiedColumns;\n }",
"public function isModified()\n {\n return !!$this->modifiedColumns;\n }",
"public function isModified()\n {\n return !!$this->modifiedColumns;\n }",
"public function isModified()\n {\n return !!$this->modifiedColumns;\n }",
"public function isModified()\n {\n return !!$this->modifiedColumns;\n }",
"public function isModified()\n {\n return !!$this->modifiedColumns;\n }",
"public function isModified()\n {\n return !!$this->modifiedColumns;\n }",
"public function isModified()\n {\n return !!$this->modifiedColumns;\n }",
"public function isModified()\n {\n return !!$this->modifiedColumns;\n }",
"public function isModified()\n {\n return !!$this->modifiedColumns;\n }",
"public function isModified()\n {\n return !!$this->modifiedColumns;\n }",
"public function isModified()\n {\n return !!$this->modifiedColumns;\n }",
"public function getColumns() {\n return sizeof($this->columns) ? $this->columns : $this->csvColumns;\n }",
"public function getColumns()\n\t{\n\t\t\n $result = $this->fetchingData(array(\n 'query' => \"SHOW FULL COLUMNS FROM `$this->table`\"\n ));\n\n return $result;\n\t}",
"public static function getColumns()\n {\n return array('libraryId', 'signature', 'summary', 'status', 'userId');\n }",
"public function getFieldsWithUpdate()\n {\n return array_filter($this->fieldChanges, function ($fieldChange) {\n return $fieldChange->hasChange();\n });\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }"
] | [
"0.7925953",
"0.75937617",
"0.7570396",
"0.75701535",
"0.7569227",
"0.7569227",
"0.7569227",
"0.7569227",
"0.7569227",
"0.7569227",
"0.7569227",
"0.7569227",
"0.7569227",
"0.7569227",
"0.7569227",
"0.7503249",
"0.74628466",
"0.7447904",
"0.7441013",
"0.7441013",
"0.74355763",
"0.74355763",
"0.74065137",
"0.74034506",
"0.7371772",
"0.7357032",
"0.7357032",
"0.7325891",
"0.72939277",
"0.7281526",
"0.72501177",
"0.7174382",
"0.7170188",
"0.7159537",
"0.7120454",
"0.7107243",
"0.70336485",
"0.7025712",
"0.7003546",
"0.6968521",
"0.6964028",
"0.6957394",
"0.6944906",
"0.69404536",
"0.69322675",
"0.6924199",
"0.6912034",
"0.69115555",
"0.69044405",
"0.6901945",
"0.6901945",
"0.6901945",
"0.6901945",
"0.6901601",
"0.6901601",
"0.6885449",
"0.68840396",
"0.6822647",
"0.6817412",
"0.6814309",
"0.67998457",
"0.6792759",
"0.6748361",
"0.6712788",
"0.6686923",
"0.66866267",
"0.66861445",
"0.66854674",
"0.667492",
"0.66586727",
"0.66520256",
"0.66520256",
"0.66520256",
"0.66520256",
"0.66520256",
"0.66520256",
"0.66520256",
"0.66520256",
"0.66520256",
"0.66520256",
"0.66520256",
"0.66520256",
"0.6647511",
"0.6629506",
"0.6627929",
"0.6618568",
"0.6610133",
"0.6610133",
"0.6610133"
] | 0.8734276 | 11 |
Returns whether the object has ever been saved. This will be false, if the object was retrieved from storage or was created and then saved. | public function isNew()
{
return $this->new;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function is_saved()\n\t\t{\n\t\t\treturn $this->hash && file_exists($this->get_path_hashed()) || $this->saved;\n\t\t}",
"public function isAlreadySaved()\n\t\t{\n\t\t\treturn $this->_alreadySaved == true;\n\t\t}",
"public function isPersisted() {}",
"public function isPersisted();",
"public function isPersisted();",
"public function isPersisted();",
"public function canSave()\n {\n return $this->save;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function getNeedsSaving ()\n {\n return $this->needsSaving;\n }",
"protected function canSave()\n {\n if( $this->ticket != null and\n $this->filename != null)\n {\n return true;\n }\n else\n return false;\n }",
"protected function onSaved()\n {\n return true;\n }",
"function save()\n {\n $save = false;\n if ( $this->lastActivity === NULL )\n return false;\n foreach ( $this->dataInterfaces as $data )\n {\n if ( $data->save() )\n $save = true;\n }\n return $save;\n }",
"public function persist(): bool\n {\n // No caching for now and no extra call needed because of that.\n return true;\n }",
"public function save(): bool\n {\n $data = [\n 'date' => $this->getDate(),\n 'type' => $this->getType(),\n 'recorded' => $this->getRecorded(),\n 'route' => $this->getRoute(),\n 'place' => $this->getPlace(),\n 'mileage' => $this->getMileage(),\n 'place_manual' => $this->getPlaceManual(),\n 'description' => $this->getDescription()\n ];\n if ($this->getId()) {\n if ((new db\\Update('event', $data, $this->getId()))->run() !== false) {\n return true;\n }\n } else {\n if ($newId = (new db\\Insert('event', $data))->run()) {\n $this->setId($newId);\n return true;\n }\n }\n return false;\n }",
"protected function onSaving()\n {\n return true;\n }",
"public function saved()\n\t{\t\n\t\treturn $this->_saved;\n\t}",
"function beforesave(){\n\t\t// if it returns true, the item will be saved; if it returns false, it won't\n\t\treturn true;\n\t}",
"public function persisted()\n {\n return $this->_persisted;\n }",
"public function persist(): bool\n {\n return $this->repository->persist();\n }",
"public function save(): bool\n {\n return $this->id > 0\n ? $this->actionHandler->update()\n : $this->actionHandler->insert();\n }",
"public function save()\n {\n return FALSE;\n }",
"protected abstract function canSave();",
"public function save()\n {\n $rc = true;\n $ak = array_keys($this->_objData);\n if (isset($this->_objData[$ak[0]][$this->_objField]) && $this->_objData[$ak[0]][$this->_objField]) {\n $rc = $this->update();\n } else {\n $rc = $this->insert();\n }\n return $rc;\n }",
"public function checkIsSaved()\n {\n if (isset($this->owner->primaryKey) == false) {\n throw new ModelIsUnsaved();\n }\n }",
"public function onSave()\n\t{\n\t\t$value = $this->getValue();\n\t\tif(!empty( $value ))\n\t\t{\n\t\t\treturn $this->getLookupTable()->set(\n\t\t\t\t $this->getValue(),\n\t\t\t\t $this->getValueObject()->getKey()\n\t\t\t ) > 0;\n\t\t}\n\t\treturn false;\n\t}",
"public function save()\n\t{\n\t\tif ($this->modified) {\n\t\t\t$user = $this->guard->user();\n\t\t\t$userId = -1;\n\n\t\t\tif ($user !== null) {\n\t\t\t\t$userId = $user->getAuthIdentifier();\n\t\t\t}\n\n\t\t\treturn $this->flush($userId);\n\t\t}\n\n\t\treturn false;\n\t}",
"public function save(): bool;",
"public function save(): bool;",
"public function isPersistent(): bool;",
"public function save()\n {\n $this->setData(array(\n 'modified' => time(),\n 'modifiedReadable' => Zend_Date::now()->get(Zend_Date::ISO_8601)\n ));\n \n $unmappedData = $this->getBean()->asDeepArray(true);\n if(key_exists('_id', $unmappedData)) {\n unset($unmappedData['_id']);\n }\n\n if (!($id = $this->_save($unmappedData, $this->getId()))) {\n return false;\n }\n\n $this->_setId($id);\n \n return true;\n }",
"public function isPersistent()\n {\n return $this->persistent;\n }",
"public function isDirty()\r\n {\r\n if (!$this->id)\r\n return true;\r\n \r\n return $this->dirty;\r\n }",
"public function hasChanges () {\n return !!$this->dirty;\n }",
"public function save()\n {\n $success = $this->obj->save();\n\n if (! $success)\n {\n if ($this->obj->valid)\n {\n $this->_set_error('Failed to save data!');\n }\n else\n {\n //Validation error\n $this->_set_error();\n }\n }\n\n return $success;\n }",
"public function dirty() {\n\t\treturn ! $this->exists or count($this->get_dirty()) > 0;\n\t}",
"public function save()\n\t{\n\n\t\tif (!$this->saveAttributeGroup()) return false;\n\n\t\tif (!$this->saveAttributes()) return false;\n\n\t\treturn true;\n\t}",
"public function isDirty()\n {\n return $this->isModified;\n }",
"function isSaveAllowed() {\n\t\t\treturn $this->isAllowedAction( 'save' );\n\t\t}",
"public function save()\n {\n return false;\n }",
"public function getSaveDoc(): bool\n {\n return $this->saveDoc;\n }",
"public function have_settings_been_saved() {\n\t\treturn self::$settings_saved;\n\t}",
"public function isPersistent() {\n\t\treturn false;\n\t}",
"public function isPersistent() {\n\t\treturn false;\n\t}",
"protected function _isPersistent(){\n\t\treturn (bool) false;\n\t}",
"public function save()\n\t{\n\t\tif ($this->loaded === FALSE)\n\t\t{\n\n\t\t}\n\t\treturn parent::save();\n\t}",
"public function isDirty(): bool;",
"public function isPersistent()\n {\n }",
"public function isDirty()\n\t{\n\t\treturn (bool)count($this->dirtyFields);\n\t}",
"public function isStorable()\n {\n return ((int)$this->storable === 1);\n }",
"public function save()\n {\n try {\n $instanceState = $this->toArray();\n if (empty($instanceState['id'])) {\n unset($instanceState['id']);\n Db::getInstance()->insert($this->getTableName(), $instanceState);\n } else {\n Db::getInstance()->update($this->getTableName(), $instanceState, ['id' => $instanceState['id']]);\n }\n\n return true;\n } catch (DbException $e) {\n return false;\n }\n }",
"public function save(): bool\n {\n\n $bytes_written = file_put_contents($this->file_name, json_encode($this->getData()));\n\n if ($bytes_written === FALSE) {\n return false;\n }\n\n return true;\n }",
"protected function autosave_check() {\n\t\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"public function get_saved_status() {\n\t\treturn $this->successfully_saved;\n\t}",
"public function save() {\n\t\tif ( ! $this->dirty()) return true;\n\n\t\tif (static::$timestamps) {\n\t\t\t$this->timestamp();\n\t\t}\n\n\t\t$this->fire_event('saving');\n\n\t\t// If the model exists, we only need to update it in the database, and the update\n\t\t// will be considered successful if there is one affected row returned from the\n\t\t// fluent query instance. We'll set the where condition automatically.\n\t\tif ($this->exists) {\n\t\t\t$query = $this->query()->where(static::$key, '=', $this->get_key());\n\n\t\t\t$result = $query->update($this->get_dirty()) === 1;\n\n\t\t\tif ($result) $this->fire_event('updated');\n\t\t}\n\n\t\t// If the model does not exist, we will insert the record and retrieve the last\n\t\t// insert ID that is associated with the model. If the ID returned is numeric\n\t\t// then we can consider the insert successful.\n\t\telse {\n\t\t\t$id = $this->query()->insert_get_id($this->attributes, $this->key());\n\n\t\t\t$this->set_key($id);\n\n\t\t\t$this->exists = $result = is_numeric($this->get_key());\n\n\t\t\tif ($result) $this->fire_event('created');\n\t\t}\n\n\t\t// After the model has been \"saved\", we will set the original attributes to\n\t\t// match the current attributes so the model will not be viewed as being\n\t\t// dirty and subsequent calls won't hit the database.\n\t\t$this->original = $this->attributes;\n\n\t\tif ($result) {\n\t\t\t$this->fire_event('saved');\n\t\t}\n\n\t\treturn $result;\n\t}",
"protected function beforeSave()\n\t{\n\t\tif (parent::beforeSave()) {\n\t\t\t// auto deal with date added and date modified\n\t\t\tif ($this->isNewRecord) {\n\t\t\t\t$this->date_added = $this->date_modified = time();\n\t\t\t} else {\n\t\t\t\t$this->date_modified = time();\n\t\t\t}\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function save() : bool {\n\t\t// Check if record is new\n\t\t$isNew = isset($this->{$this->primaryKey}) && $this->{$this->primaryKey} ? false : true;\n\n\t\tif ($isNew) {\n\t\t\t// Insert\n\t\t\t$this->database->query('INSERT INTO ' . $this->tableNamePrefixed, $this->getValuesForDatabase());\n\t\t\tif ($this->database->getInsertId()) {\n\t\t\t\t$this->{$this->primaryKey} = $this->database->getInsertId();\n\t\t\t}\n\t\t} else {\n\t\t\t// Update\n\t\t\t$this->database->query(\n\t\t\t\t'UPDATE ' . $this->tableNamePrefixed . ' SET',\n\t\t\t\t$this->getValuesForDatabase(),\n\t\t\t\t'WHERE ' . $this->primaryKey . ' = ?', $this->{$this->primaryKey}\n\t\t\t);\n\t\t}\n\n\t\treturn true;\n\t}",
"public function getWillSave() {}",
"protected function afterSave()\n {\n return true;\n }",
"public function alreadyExists()\n\t{\n\t\tif(file_exists($this->getSavePath())) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function isDirty();",
"public function save()\n {\n // If the model already exists in the database we can just update our record\n // that is already in this database using the current IDs in this \"where\"\n // clause to only update this model. Otherwise, we'll just insert them.\n if ($this->exists) {\n $saved = $this->isDirty() ? $this->performUpdate() : true;\n }\n\n // If the model is brand new, we'll insert it into our database and set the\n // ID attribute on the model to the value of the newly inserted row's ID\n // which is typically an auto-increment value managed by the database.\n else {\n $saved = $this->performInsert();\n }\n\n // If the model is successfully saved, we need to do a few more things once\n // that is done. We will call the \"saved\" method here to run any actions\n // we need to happen after a model gets successfully saved right here.\n if ($saved) {\n $this->syncOriginal();\n }\n\n return $saved;\n }",
"public function save()\n\t{\n\t\treturn false;\n\t}",
"public function isPersistent(): bool\n {\n return (bool) ($this->getGC()->u->type_info & ReferenceCountedInterface::GC_PERSISTENT);\n }",
"public function save()\n {\n $saved = true;\n\n foreach ($this->_relationsToSave as $model) {\n $model->{$this->relPrimaryKey} = $this->owner->primaryKey;\n\n if (!$model->save()) {\n $this->owner->addErrors($model->getErrors());\n\n $saved = false;\n }\n }\n\n return $saved;\n }",
"public function save() {\n // If this object hasn't had its values changed, then abort.\n if(!$this->isModified()) {\n return false;\n }\n\n // Discard cached objects\n $this->invalidateCache();\n\n foreach($this->modifiedAttributes as $a) {\n $this->payload[$a] = $this->values[$a];\n }\n\n // Set request method to POST\n $this->method = \"POST\";\n\n // Run the request\n // TODO This should return the modified object - use it\n $this->get();\n return true;\n }",
"public function Save()\r\n {\r\n return false;\r\n }",
"protected function save(): bool\n\t{\n\t\t$res = JobTable::update(\n\t\t\t$this->id,\n\t\t\t[\n\t\t\t\t'STATUS' => $this->status,\n\t\t\t\t'STATUS_MESSAGE' => $this->statusMessage,\n\t\t\t\t'STATE' => $this->state,\n\t\t\t\t'STEP' => $this->step,\n\t\t\t]\n\t\t);\n\n\t\treturn $res->isSuccess();\n\t}",
"public function hasObject()\n {\n return (bool)!empty($this->object);\n }",
"public function save()\n {\n $temp = [];\n foreach ($this as $prop => $value) {\n $temp[$prop] = $value;\n }\n\n self::update($temp);\n if (isset($temp[(new static)->key])) {\n self::where((new static)->key, '=', $temp[(new static)->key]);\n }\n if (self::execute()->errno == 0) {\n return true;\n }\n return false;\n }",
"public function hasStored()\n\t{\n\t\tif( $_SESSION[__CLASS__][$this->questionId] !== null )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public function isAfterSaveActionsEnabled(): bool\n\t{\n\t\treturn $this->isAfterSaveActionsEnabled;\n\t}",
"public function save() {\t\t\t\t\n\t\tif (file_put_contents($this->filename, $this->objects)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function save() {\r\n $dateNow = date('Y-m-d H:i:s', time());\r\n $this->id = (int) $this->id;\r\n \r\n if (!empty($this->id)) {\r\n //update case\r\n if ($this->_update()) {\r\n return true;\r\n }\r\n }\r\n else {\r\n //Insert case\r\n if ($this->_insert()) {\r\n return true;\r\n }\r\n }\r\n }",
"public function save()\n {\n Logger::getInstance()->po_log(\"PO:save \" . get_class($this));\n\n if (!$this->validate(true)) return false;\n \n //Logger::getInstance()->po_log(\"PO:save post validate\");\n\n $this->executeBeforeSave();\n\n //Logger::getInstance()->on();\n try\n {\n //Logger::getInstance()->po_log(\"PO:save BEGIN\");\n $pm = PersistentManager::getInstance();\n $pm->withTransaction();\n $pm->save($this);\n $pm->commitTransaction();\n //Logger::getInstance()->po_log(\"PO:save COMMIT\");\n }\n catch(Exception $e)\n {\n // TODO: log de $e\n Logger::getInstance()->po_log(\"PO:save ROLLBACK \". $e->getMessage() .\" <pre>\". $e->getTraceAsString() .\"</pre>\");\n \n $pm->rollbackTransaction();\n return false;\n }\n //Logger::getInstance()->off();\n\n $this->executeAfterSave();\n \n // Validacion\n return true;\n }",
"protected function beforeSave() {\n if (parent::beforeSave()) {\n $this->create_time = time();\n return true;\n }\n }",
"public function isDirty() {\n\t\treturn count($this->_modified);\n\t}",
"public function isDirty()\r\n\t{\r\n\t\treturn (count($this->changelog)>0) ? true : false;\r\n\t}",
"protected function beforeSave()\n\t{\n\t\tif(parent::beforeSave())\n\t\t{\n\t\t\tif($this->isNewRecord)\n\t\t\t{\n\t\t\t\t$this->created = $this->modified = date('Y-m-d H:i:s');\n\t\t\t\t$this->user_id=1;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t//\t$this->update_time=time();\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}",
"public function valid()\n {\n return $this->storage->valid();\n }",
"public function save()\r\n {\r\n if( empty($this->dirty) ) return true;\r\n \r\n $pkName = $this->pkName();\r\n //is it an update?\r\n if( isset($this->data[$pkName]) ){\r\n $this->table->update($this->dirty, \"{$pkName}=?\", array($this->data[$pkName]) );\r\n $merged_data[$pkName] = $this->data[$pkName];\r\n } else {\r\n //it's an insert\r\n $merged_data = array_merge(\r\n $this->array_diff_schema($this->dirty),\r\n $this->array_diff_schema($this->data)\r\n );\r\n $this->table->insert($merged_data);\r\n $pk = $this->pkName();\r\n if( !isset($merged_data[$pk]) )\r\n $merged_data[$pk] = $this->table->lastInsertId();\r\n }\r\n $this->reset($merged_data);\r\n return true;\r\n }",
"protected function saveCustomFields() : bool\n {\n if ($this->hasCustomFields()) {\n foreach ($this->customFields as $key => $value) {\n if (!property_exists($this, $key)) {\n $this->set($key, $value);\n }\n }\n }\n\n return true;\n }",
"public function isSynced(): bool\n {\n return $this->synced;\n }",
"public function save()\n {\n if(!$this->canSave())\n return false;\n\n try\n {\n if ($this->id == null) //new object\n {\n $stmt = $this->connection->prepare(\"insert into \" . self::$table_name . \"(ticketID, filename) values(?, ?)\");\n $stmt->execute([$this->ticket->id, $this->filename]);\n $this->id = $this->connection->lastInsertId();\n }\n else //updating is not possible\n {\n return false;\n }\n\n return true;\n }\n catch (\\PDOException $e)\n {\n print_r($e->errorInfo);\n return false;\n }\n }",
"public function isSaveToHistoryEnabled(): bool\n\t{\n\t\treturn $this->isSaveToHistoryEnabled;\n\t}",
"public function isDirty(): bool\n {\n return count($this->changedAttributesName()) > 0;\n }",
"private function _isCardSaved() {\n\t $tokenId = (int) $this->getInfoInstance()->getAdditionalInformation('token_id');\n\t return (boolean)($this->getInfoInstance()->getAdditionalInformation('create_token') === 'true') &&\n\t !($tokenId && ($tokenId > 0));\n\t}",
"public function hasDirtyData(): bool\n {\n return ($this->state == self::STATE_MANAGED\n && ($data = $this->itemReflection->dehydrate($this->item))\n && (! $this->isDataEqual($data, $this->originalData))\n );\n }",
"public function shouldBeSaved($entityName, $data) {\n $storage = $this->storageFactory->getStorage($entityName);\n if ($storage === null)\n return false;\n return $storage->shouldBeSaved($data);\n }",
"public function beforeSave() {\r\n\t\tif ($this->isNew) {\r\n\t\t\t$this->created = date(\"Y-m-d H:i:s\");\r\n\t\t\t$this->modified = $this->created;\r\n\t\t\t$this->user = Auth::User()->id;\r\n\t\t} else {\r\n\t\t\t$this->modified = date(\"Y-m-d H:i:s\");\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public function isCreated()\n {\n return (bool) $this->eid;\n }",
"public function isNew()\n {\n return $this->hasUpdates;\n }",
"function save() {\n\t\t$return = false;\n\t\tif ( $this->getUserID() ) {\n\t\t\tif ( $this->isModified() ) {\n\t\t\t\t/*\n\t\t\t\t * Clear all existing objects\n\t\t\t\t */\n\t\t\t\t$this->delete();\n\t\t\t\t\n\t\t\t\tif ( $this->getCount() > 0 ) {\n\t\t\t\t\t$query = '\n\t\t\t\t\t\tINSERT INTO '.system::getConfig()->getDatabase('mofilm_content').'.userEventFavourites\n\t\t\t\t\t\t\t(userID, eventID, sequence)\n\t\t\t\t\t\tVALUES';\n\t\t\t\t\t\n\t\t\t\t\t$values = array();\n\t\t\t\t\tforeach ( $this as $index => $oObject ) {\n\t\t\t\t\t\t$values[] = \"({$this->getUserID()}, {$oObject->getID()}, $index)\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ( count($values) > 0 ) {\n\t\t\t\t\t\t$query .= implode(', ', $values);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$oStmt = dbManager::getInstance()->prepare($query);\n\t\t\t\t\t\tif ( $oStmt->execute() ) {\n\t\t\t\t\t\t\t$return = true;\n\t\t\t\t\t\t\t$this->setModified(false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$oStmt->closeCursor();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $return;\n\t}"
] | [
"0.81485754",
"0.79410106",
"0.7855305",
"0.7850718",
"0.7850718",
"0.7850718",
"0.7827253",
"0.75811595",
"0.75811595",
"0.75811595",
"0.75811595",
"0.75811595",
"0.75811595",
"0.75811595",
"0.75811595",
"0.75811595",
"0.75811595",
"0.7467159",
"0.73795795",
"0.72870225",
"0.7254647",
"0.7208073",
"0.71416736",
"0.7086247",
"0.7075227",
"0.70711404",
"0.7048772",
"0.70428824",
"0.70063967",
"0.7004021",
"0.6997888",
"0.6993423",
"0.6980872",
"0.69421947",
"0.6941911",
"0.69187266",
"0.69187266",
"0.6904399",
"0.6867285",
"0.68509686",
"0.6836574",
"0.6823985",
"0.6800708",
"0.6794424",
"0.67919725",
"0.67913866",
"0.67557085",
"0.67524046",
"0.67425555",
"0.67422366",
"0.6732641",
"0.6732641",
"0.6728516",
"0.66976404",
"0.66966593",
"0.66588116",
"0.6652189",
"0.6646509",
"0.663556",
"0.66322654",
"0.66188216",
"0.66081876",
"0.66003424",
"0.6599429",
"0.65856457",
"0.65833515",
"0.65809506",
"0.65747094",
"0.656935",
"0.6568187",
"0.6565198",
"0.6546514",
"0.65442663",
"0.65377265",
"0.6536561",
"0.65249467",
"0.6524577",
"0.65238154",
"0.65228975",
"0.6499959",
"0.64672697",
"0.6467186",
"0.64652526",
"0.6448569",
"0.64434654",
"0.6419362",
"0.6389401",
"0.6386802",
"0.6386058",
"0.6370417",
"0.6345085",
"0.6325342",
"0.6324831",
"0.6320924",
"0.631703",
"0.6315657",
"0.63113654",
"0.6300256",
"0.62958735",
"0.62911403",
"0.6289424"
] | 0.0 | -1 |
Setter for the isNew attribute. This method will be called by Propelgenerated children and objects. | public function setNew($b)
{
$this->new = (boolean) $b;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isNew() {\n return $this->_is_new;\n }",
"public function isNew() {\n return $this->isNew;\n }",
"public function getIsNew()\n {\n return $this->_isNew;\n }",
"public function isNew() {\r\n\t\treturn $this->isNew;\r\n\t}",
"public function isNew()\n {\n return $this->new;\n }",
"public function isNew()\n {\n return $this->new;\n }",
"public function isNew()\n {\n return $this->new;\n }",
"public function isNew()\n {\n return $this->new;\n }",
"public function isNew()\n {\n return $this->new;\n }",
"public function isNew()\n {\n return $this->new;\n }",
"public function isNew()\n {\n return $this->new;\n }",
"public function isNew()\n {\n return $this->new;\n }",
"public function isNew()\n {\n return $this->new;\n }",
"public function isNew()\n {\n return $this->new;\n }",
"public function isNew()\n {\n return $this->new;\n }",
"public function isNew()\n {\n return $this->new;\n }",
"public function isNew()\n {\n return $this->new;\n }",
"public function setIsNew($isNew) {\r\n\t\t$this->isNew = (bool) $isNew;\r\n\t}",
"public function isNew()\n {\n\n return $this->isNew;\n\n }",
"public function isNew()\n {\n return $this->_isNew;\n }",
"public function isNew()\n {\n return false;\n }",
"private function isNew()\n {\n return true;\n }",
"public function setIsNew($isNew)\n {\n $this->_isNew = (bool) $isNew;\n }",
"public function setIsNew($new = true)\n {\n\n $this->isNew = $new;\n\n }",
"public function isNew();",
"public function isNew();",
"public function isNew() {}",
"public function isNew(){return $this->new;}",
"public function isNew(): bool\n {\n return $this->state == self::STATE_NEW;\n }",
"public function isNew()\n\t{\n\t\treturn (!$this->id || strncmp($this->id, 'new', 3) === 0);\n\t}",
"public function isNew(?bool $new = null)\n {\n if ($new === null) {\n return $this->_new;\n }\n\n return $this->_new = $new;\n }",
"public function is_new() {\r\n return $this->orm->is_new();\r\n }",
"public function _isNew() {}",
"public function isNew($new = null)\n {\n if ($new === null) {\n return $this->_new;\n }\n\n $new = (bool)$new;\n\n return $this->_new = $new;\n }",
"public function isNew(): bool\n {\n return $this->status === static::STATUS_NEW;\n }",
"public function isNew() {\n return $this->id === 0;\n }",
"public function isNew(): bool;",
"public function isNew(): bool;",
"public function is_new() {\n return false;\n }",
"public function get_isNew()\n {\n return intval($this->isNew);\n }",
"public function setIsNew($new) {\n\t\t$this->new = $new;\n\t}",
"public function isNew()\n {\n if (static::getId()=== null) {\n return true;\n } else {\n return false;\n }\n }",
"function _isNew() ;",
"public function isNew()\n {\n // Check if the user is seeing a post of another mb\n if($this->object->user_id != $this->user->getPrimaryId()) {\n return false;\n }\n\n // Check if a isNew value is already stored\n if(!is_null($this->isNew)) {\n return $this->isNew;\n }\n\n // Confront the user lastView with the post child_datetime\n if(is_null($this->lastView)) {\n return $this->isNew = true;\n }\n elseif($this->object->child_datetime > $this->user->mbLastView->datetime) {\n return $this->isNew = true;\n }\n else {\n return $this->isNew = false;\n }\n }",
"public function isNewRecord()\n\t{\n\t\treturn $this->getIsNewRecord();\n\t}",
"function is_new()\n {\n return $this->id() ? FALSE : TRUE;\n }",
"public function isNew($value) { // check action is for new input or update\n $this->isNew = $value;\n }",
"public function MetaIsNew() {\n\t\t\treturn $this->metaNew;\n\t\t}",
"function is_new_record() {\n\t\t\treturn $this->new_record;\n\t\t}",
"public function isNew()\n {\n return $this->hasUpdates;\n }",
"public function setNew($new = true)\n {\n $this->new = $new;\n\n return $this;\n }",
"public function isNew()\n\t{\n\t\treturn empty($this->id_techquestion);\n\t}",
"protected function isModelNew()\n {\n $model = $this->getModel();\n return ($model && $model->getId()) ? false : true;\n }",
"public function setIsNewTransaction(bool $isNew): void\n {\n }",
"public function afterSave(array $data, $isNew)\n {\n return true;\n }",
"public function getIsNewRecord () {\n return $this->_item === null;\n }",
"public function getIsNewRecord()\n {\n return $this->_item === null;\n }",
"public function setIsNewRecord($value)\n\t{\n\t\t$this->_new=$value;\n\t}",
"public function isNewRecord(){\n return !isset($this->data['id']);\n }",
"public function isNewView()\r\n {\r\n return $this->isNewView;\r\n }",
"public function isNew()\n\t{\n\t return (count($this->getContentBlocks()) == 0);\n\t}",
"public function beforeSave(array &$data, $isNew, \\Zend_Form $form = null)\n {\n return true;\n }",
"public function setIsNewView($isNewview)\r\n {\r\n $this->isNewView = $isNewview;\r\n }",
"public function isNewStates()\n {\n if ($this->isNonexistent) return false;\n\n return !!$this->countNewStates();\n }",
"function is_new_record() {\n\t\treturn (is_null($this->id) || $this->id == '');\n\t}",
"public function isNew(Varien_Object $object)\n {\n $isNew = null === $object->getOrigData();\n\n return $isNew;\n }",
"public function enforceIsNew($value = TRUE);",
"function isNew()\n {\n\t $counter = $this->get( 'session.counter' );\n\t\tif( $counter === 1 ) {\n\t\t\treturn true;\n\t\t}\n return false;\n }",
"public function new()\n {\n $this->setStatus(self::STATUS_NEW);\n }",
"public function isNewCategory(): bool {\n return !$this->category->exists;\n }",
"public function parserStatusNew(): bool\n {\n $this->model->parser_status = static::PARSER_STATUS_NEW;\n\n return $this->model->save();\n }",
"protected function _isNew($product) {\r\n $from = strtotime ( $product->getData ( 'news_from_date' ) );\r\n $to = strtotime ( $product->getData ( 'news_to_date' ) );\r\n return $this->_checkDate ( $from, $to );\r\n }",
"public function isNewEditorEnabled()\n\t{\n\t\treturn true;\n\t}",
"public function createNewVersion()\n {\n if ( !$this->Node )\n {\n return false;\n }\n\n $object = $this->Node->object();\n\n $contentObjectVersion = $object->createNewVersion();\n\n return $contentObjectVersion ? $contentObjectVersion->attribute( 'version' ) : false;\n }",
"function &create($isNew = true)\t{\r\n\t\t$yogurt_scraps = new yogurt_scraps();\r\n\t\tif ($isNew) {\r\n\t\t\t$yogurt_scraps->setNew();\r\n\t\t}\r\n\t\telse{\r\n\t\t$yogurt_scraps->unsetNew();\r\n\t\t}\r\n\r\n\t\t\r\n\t\treturn $yogurt_scraps;\r\n\t}",
"public function isNewPossible()\n {\n // Check if ProductsModels exist\n $productmodels = $this->em->getRepository('ValentinStockBundle:Material')->countRecords();\n\n return ($productmodels > 0) ? true : false;\n }",
"protected function isAddingNew( $value = NULL ) {\n\t\tif( is_null( $value ) ) {\n\t\t\treturn( $this->_isAddingNew );\n\t\t}\n\t\t$this->_isAddingNew = $value;\n\t}",
"public function onBeforeSaveProperty($namespace, $row, $is_new)\n {\n // $row->owner_name = JRequest::getVar( 'owner_name', '');\n return true;\n }",
"function SaveNew($deep = false)\n\t{\n\t\t$this->supplierId = '';\n\t\treturn $this->Save($deep);\n\t}",
"function isNew($heading)\n{\n\t$isNew = false;\n\t\n\tif (strcmp($heading, \"New\") == 0)\n\t{\n\t\t$isNew = true;\n\t}\n\t\n\treturn $isNew;\n}",
"public static function getNewRevisionDefault() {\n return FALSE;\n }",
"protected function _beforeSave()\r\n {\r\n \t// invoke the parent method\r\n \tparent::_beforeSave();\r\n // check the product type (has to be a package product)\r\n $typeInstance = $this->getTypeInstance(true);\r\n // check if a ID is available, if not the package is new\r\n if ($this->getId() == 0 &&\r\n $typeInstance instanceof Faett_Package_Model_Product_Type) {\r\n $this->_isNew = true;\r\n $this->setHasOptions(1);\r\n }\r\n }",
"public function beforeSave() {\n if ($this->isNewRecord) {\n $this->created_date = new CDbExpression(\"now()\");\n }\n $this->updated_date = new CDbExpression(\"now()\");\n\n return true;\n }",
"public function getNew($existing);",
"protected function _beforeSave()\r\n {\r\n parent::_beforeSave();\r\n $now = Mage::getSingleton('core/date')->gmtDate();\r\n if ($this->isObjectNew()) {\r\n $this->setCreatedAt($now);\r\n }\r\n $this->setUpdatedAt($now);\r\n return $this;\r\n }",
"protected function beforeSave() {\n\t\tif (parent::beforeSave()) {\n\t\t\tif ($this->isNewRecord && $this->hasAttribute('createTime')) {\n\t\t\t\t$this->createTime = new CDbExpression('NOW()');\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"protected function _beforeSave()\n {\n parent::_beforeSave();\n $now = Mage::getSingleton('core/date')->gmtDate();\n if ($this->isObjectNew()) {\n $this->setCreatedAt($now);\n }\n $this->setUpdatedAt($now);\n return $this;\n }",
"protected function _beforeSave()\n {\n parent::_beforeSave();\n if ($this->isObjectNew()) {\n $this->setData($this->_sliderPrefix . 'created_at', Varien_Date::now());\n }\n return $this;\n }",
"protected function _beforeSave()\n\t{\n\t\tparent::_beforeSave();\n\n $date = Mage::getModel('core/date')->date('Y-m-d H:i:s');\n\t\tif ($this->isObjectNew()) {\n\t\t\t$this->setCreatedAt($date);\n\t\t\t$this->setUpdatedAt($date);\n\t\t} else {\n\t\t\t$this->setUpdatedAt($date);\n\t\t}\t\n\t\t\n\t\treturn $this;\n\t}"
] | [
"0.79710007",
"0.7835108",
"0.7832491",
"0.78101975",
"0.7809465",
"0.7809465",
"0.7809465",
"0.7809465",
"0.7809465",
"0.7809465",
"0.7809465",
"0.7809465",
"0.7809465",
"0.7809465",
"0.7809465",
"0.7809465",
"0.7809465",
"0.78018904",
"0.7751557",
"0.7751402",
"0.76770586",
"0.76696634",
"0.7623393",
"0.7617967",
"0.7579972",
"0.7579972",
"0.74892855",
"0.73697954",
"0.7340142",
"0.73385",
"0.7323379",
"0.73009974",
"0.72859585",
"0.7269601",
"0.7164924",
"0.7159261",
"0.71177447",
"0.71177447",
"0.7099223",
"0.7086734",
"0.708662",
"0.70272624",
"0.6980226",
"0.69748175",
"0.6954791",
"0.6868432",
"0.68454355",
"0.68348944",
"0.6705292",
"0.66985637",
"0.66140056",
"0.6571535",
"0.6544461",
"0.65012765",
"0.6460386",
"0.6454131",
"0.64035594",
"0.6384816",
"0.63727367",
"0.63452065",
"0.63413864",
"0.6257219",
"0.624274",
"0.6234266",
"0.61931795",
"0.6049055",
"0.58548987",
"0.5831025",
"0.56569594",
"0.56144446",
"0.55992013",
"0.5542265",
"0.5530551",
"0.55215806",
"0.5498614",
"0.54655194",
"0.54465115",
"0.5429463",
"0.5414313",
"0.53964484",
"0.53906006",
"0.5379091",
"0.5374597",
"0.5364276",
"0.5336119",
"0.5335176",
"0.5330505",
"0.531958",
"0.5307122"
] | 0.6408553 | 65 |
Whether this object has been deleted. | public function isDeleted()
{
return $this->deleted;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isDeleted() {\n\t\treturn $this->deleted;\n\t}",
"public function isDeleted()\n\t{\n\t\treturn $this->deleted;\n\t}",
"public function isDeleted()\n\t {\t\n\t\tif($this->deleted){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t }",
"public function isDeleted() {\n $result = $this->deleted !== null ? true : false;\n\n return $result;\n }",
"public function isDeleted()\n {\n return $this->status === self::STATUS_DELETED;\n }",
"public function isDeleted()\n\t{\n\t\treturn ($this->get('state') == static::ANSWERS_STATE_DELETE);\n\t}",
"public function hasIsDeleted()\n {\n return $this->IsDeleted !== null;\n }",
"public function isDeleted()\r\n\t{\r\n\t\treturn $this->getValue(\"f_deleted\");\r\n\t}",
"public function isDeleted()\n {\n return !empty($this->source['deleted']);\n }",
"public function getIsDeletedRecord() {\n return $this->_deleted;\n }",
"public function isDeleted() {}",
"public function isDeleted() {}",
"protected static function is_deleted(): mixed\n\t{\n\t\treturn self::$query->is_deleted;\n\t}",
"public function isDeleted();",
"public function isDeleted();",
"public function isDeleted()\n {\n $filter = static::idToFilter($this);\n $query = static::filterToQuery($filter, ['from-trash']);\n\n if (empty($query['_id'])) {\n return false;\n }\n\n return static::getCollection()->count($query) > 0;\n }",
"public function isDeleted(): bool;",
"public function isDeleted(): bool;",
"public function isDeleted()\r\n {\r\n $isDeleted = false;\r\n \r\n // Check to see if the ride status is deleted\r\n if ($this->getStatusId() == RideStatuses::$statuses[RideStatuses::RIDE_DELETED])\r\n {\r\n $isDeleted = true;\r\n }\r\n \r\n return $isDeleted;\r\n }",
"public function getIsDeleted()\n {\n return $this->isDeleted;\n }",
"public function isDeletedOrReleased();",
"public function getIsDeleted();",
"public function isDeletedOrReleased() {\n\t\treturn $this->released || $this->released;\n\t}",
"protected function isDeleted(){\n return parent::isStatusOf(STATUS_TYPE_SSS_COMMENT_DELETED);\n }",
"public function getIsDelete()\n {\n return $this->getMethod() === 'DELETE';\n }",
"public function isDeleted(): ?bool\n {\n return $this->deleted;\n }",
"public function isRemoved() : bool\n {\n return $this->trashed();\n }",
"public function wasDeleted(){\n\t\t//if data pk and no orig pk i was probably deleted at some unknow nesting depth\n\t\t$ret = false;\n\t\tif(isset($this->data[$this->primaryKey])){\n\t\t\tif($this->data[$this->primaryKey]){\n\t\t\t\tif(!isset($this->orig[$this->primaryKey])){\n\t\t\t\t\t$ret = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public function isDelete()\n {\n return ($this->getMethod() == 'DELETE') ? true : false;\n }",
"public function isDelete() {\n return $this->method == self::METHOD_DELETE;\n }",
"public function isDelete()\n {\n return $this->getMethod() === 'DELETE';\n }",
"public function hasDeletedAt() : bool;",
"public function isDelete(): bool\n {\n return $this->getMethod() === self::METHOD_DELETE;\n }",
"public function canBeDeleted() : bool\n\t{\n\t\t$countUsers = $this->users()->lockForUpdate()->count();\n\t\t$isFuture = $this->flight_at->isFuture();\n\n\t\tif ($countUsers === 0 && $isFuture) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function isDelete()\n\t{\n\t\treturn $this->httpMethod() == self::MethodDelete;\n\t}",
"public function isDelete()\n {\n return $this->method === self::METHOD_DELETE;\n }",
"public function isDelete() {\n if($this->method === 'DELETE') {\n return true;\n } else {\n return false;\n }\n }",
"public function isDelete(): bool {}",
"protected function isDeleting()\n {\n return $this->option('delete') == 'true';\n }",
"public function isDelete() {\n\t\tif ('DELETE' == $this->getMethod())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function isDeleteable()\n {\n return $this->_isDeleteable;\n }",
"public function isSoftDelete(): bool\n {\n return !$this->isDestructiveDelete();\n }",
"public function isDelete() {\n return $this->method == 'DELETE';\n }",
"public function isDelete();",
"public function isDelete()\n {\n return $this->isMethod('DELETE');\n }",
"public function isDelete()\n {\n return $this->isMethod('DELETE');\n }",
"public function delete(): bool\n {\n return $this->isAllowed(self::DELETE);\n }",
"public function getDeleted(): ?bool\n {\n\n return $this->deleted;\n\n }",
"public function isDelete()\n {\n return $this->_getMethod() === \\Yana\\Http\\Requests\\MethodEnumeration::DELETE;\n }",
"public function delete(): bool\n\t{\n\t\treturn true;\n\t}",
"private function isSoftDeleted(): bool\n {\n return $this->resource::softDeletes() && $this->model->trashed();\n }",
"public function deleted(bool $deleted = null) : bool\n {\n return $this->setGetPersisted('deleted', $deleted);\n }",
"public function is_deletable()\r\n {\r\n return !$this->id || Validator_identifiers::instance()->where('id_dataset_active', $this->id)->count_all() || \r\n Upload_queue::instance()->where('id_dataset_active', $this->id)->count_all()\r\n ? FALSE : TRUE;\r\n }",
"abstract public function isUndeleting();",
"abstract public function isUndeleting();",
"public function canDelete()\n {\n return in_array('delete', $this->actions);\n }",
"public function removed() {\n\t\treturn $this->_isRemoved;\n\t}",
"public function flagDelete()\n {\n if(!$this->getId()) {\n return false;\n }\n \n if(!$this->setProperty('delete', true)->save()) {\n return false;\n }\n \n return $this->apply();\n }",
"protected function onDeleted()\n {\n return true;\n }",
"private function GetDeleted()\n\t\t{\n\t\t\treturn $this->deleted;\n\t\t}",
"public function delete() {\n return true;\n }",
"public function delete(): bool\n {\n\n return false;\n }",
"public function get_deleted() {\n return $this->deleted;\n }",
"public function delete(): bool\n {\n return $this->actionHandler->delete();\n }",
"public function isDelete(){\n\t\treturn (strtoupper($this->getHeader('REQUEST_METHOD'))=='DELETE')? true : false;\n\t}",
"public static function isDelete(): bool {\r\n return static :: isMethod('delete');\r\n }",
"public function isDeleteInstanceCall(): bool\n {\n return $this->getUserId() === self::$remoteCallDelete;\n }",
"public function exists()\n\t{\n\t\treturn ! $this->hasBeenRemoved;\n\t}",
"public function deleted(bool $deleted = null): bool\n {\n return $this->setGetPersisted('entityDeleted', $deleted);\n }",
"public function getCanDeleteProperty()\n {\n return $this->deleteConfirm === $this->staff->email;\n }",
"function is_delete_statement()\n {\n return isset($this->object->_query_args['is_delete']) && $this->object->_query_args['is_delete'];\n }",
"public function isRemoved(): bool\n {\n return $this->state == self::STATE_REMOVED;\n }",
"public function getDeleted()\n {\n return $this->deleted;\n }",
"public function isRemoved() {\n\t\treturn $this->removed;\n\t}",
"public function isRecipientDelete() {\n\t\treturn $this -> data['r_delete'];\n\t}",
"public function canDelete()\n {\n return $this->canGet();\n }",
"public function getDeleted() {\n\t\treturn $this->deleted;\n\t}",
"public function getDeleted() {\n\t\treturn $this->deleted;\n\t}",
"public function getdeleted()\n {\n return $this->deleted;\n }",
"public function isRemoved(): bool;",
"function is_delete_statement()\n {\n return $this->object->_delete_clause ? TRUE : FALSE;\n }",
"public function can_delete () {\r\n\r\n return $this->permissions[\"D\"] ? true : false;\r\n\r\n }",
"public function getDeleted()\n {\n return $this->Deleted;\n }",
"public function canDelete()\n {\n if ( null === $this->_canDelete )\n {\n $model = new Application_Model_AudioJobMapper();\n $results = $model->fetchAll( 'service_id = ' . $this->id );\n $this->_canDelete = !(bool) count( $results );\n }\n return $this->_canDelete;\n }",
"public function isScheduledForDelete($document)\n {\n return isset($this->documentDeletions[spl_object_hash($document)]);\n }",
"protected function canDelete()\n {\n if (!Validate::isLoadedObject($this)) {\n return true;\n }\n\n /** @var Gamifications $module */\n $module = Module::getInstanceByName('gamifications');\n $em = $module->getEntityManager();\n\n /** @var GamificationsRewardRepository $rewardRepository */\n $rewardRepository = $em->getRepository(__CLASS__);\n $isInUse = $rewardRepository->isRewardInUse($this->id);\n\n return !$isInUse;\n }",
"public function isDeletable(): bool\n {\n return true;\n }"
] | [
"0.8562077",
"0.85489553",
"0.847859",
"0.841372",
"0.83469534",
"0.8306214",
"0.8253008",
"0.8204199",
"0.8199161",
"0.8129381",
"0.8055836",
"0.8054757",
"0.79842097",
"0.7902642",
"0.7902642",
"0.7884733",
"0.78280705",
"0.78280705",
"0.78085715",
"0.78014433",
"0.7751264",
"0.7698325",
"0.76524943",
"0.7627169",
"0.76254547",
"0.7613928",
"0.75592804",
"0.75555116",
"0.75431854",
"0.74965906",
"0.74714035",
"0.7461427",
"0.7454671",
"0.7429072",
"0.74133974",
"0.74092996",
"0.73741585",
"0.7366803",
"0.7303786",
"0.72961664",
"0.7274234",
"0.7245742",
"0.7234247",
"0.7223253",
"0.72021425",
"0.72021425",
"0.7175076",
"0.71367335",
"0.7114438",
"0.7078824",
"0.70780396",
"0.7038669",
"0.7038443",
"0.70136315",
"0.70136315",
"0.69723594",
"0.6968767",
"0.69503313",
"0.69122493",
"0.69046587",
"0.6899449",
"0.6898434",
"0.68960387",
"0.68803096",
"0.6870304",
"0.6866478",
"0.68517554",
"0.6851124",
"0.6845885",
"0.6834237",
"0.6816175",
"0.6810907",
"0.68064183",
"0.6796909",
"0.67916775",
"0.6790438",
"0.67857367",
"0.67857367",
"0.6777366",
"0.67658556",
"0.6747036",
"0.6740301",
"0.67227286",
"0.6713996",
"0.66826993",
"0.6667371",
"0.66656435"
] | 0.85768765 | 13 |
Specify whether this object has been deleted. | public function setDeleted($b)
{
$this->deleted = (boolean) $b;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isDeleted()\n {\n return $this->deleted;\n }",
"public function isDeleted()\n {\n return $this->deleted;\n }",
"public function isDeleted()\n {\n return $this->deleted;\n }",
"public function isDeleted()\n {\n return $this->deleted;\n }",
"public function isDeleted()\n {\n return $this->deleted;\n }",
"public function isDeleted()\n {\n return $this->deleted;\n }",
"public function isDeleted()\n {\n return $this->deleted;\n }",
"public function isDeleted()\n {\n return $this->deleted;\n }",
"public function isDeleted()\n {\n return $this->deleted;\n }",
"public function isDeleted()\n {\n return $this->deleted;\n }",
"public function isDeleted()\n {\n return $this->deleted;\n }",
"public function isDeleted()\n {\n return $this->deleted;\n }",
"public function isDeleted()\n {\n return $this->deleted;\n }",
"public function isDeleted()\n {\n return $this->deleted;\n }",
"public function isDeleted() {}",
"public function isDeleted() {}",
"public function isDeleted() {\n\t\treturn $this->deleted;\n\t}",
"public function isDeleted()\n\t{\n\t\treturn $this->deleted;\n\t}",
"public function isDeleted();",
"public function isDeleted();",
"public function isDeleted()\r\n\t{\r\n\t\treturn $this->getValue(\"f_deleted\");\r\n\t}",
"public function isDeleted()\n\t {\t\n\t\tif($this->deleted){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t }",
"public function getIsDeletedRecord() {\n return $this->_deleted;\n }",
"public function isDeleted(): bool;",
"public function isDeleted(): bool;",
"public function getIsDeleted();",
"public function isDeleted()\n {\n return $this->status === self::STATUS_DELETED;\n }",
"public function isDeleted()\n\t{\n\t\treturn ($this->get('state') == static::ANSWERS_STATE_DELETE);\n\t}",
"public function getIsDelete()\n {\n return $this->getMethod() === 'DELETE';\n }",
"public function getIsDeleted()\n {\n return $this->isDeleted;\n }",
"public function isDeleted() {\n $result = $this->deleted !== null ? true : false;\n\n return $result;\n }",
"public function isDeleted()\n {\n return !empty($this->source['deleted']);\n }",
"public function isDelete(): bool {}",
"protected static function is_deleted(): mixed\n\t{\n\t\treturn self::$query->is_deleted;\n\t}",
"public function isDeletedOrReleased();",
"public function isDelete();",
"public function isDelete()\n {\n return ($this->getMethod() == 'DELETE') ? true : false;\n }",
"public function isDelete()\n {\n return $this->getMethod() === 'DELETE';\n }",
"public function flagDelete()\n {\n if(!$this->getId()) {\n return false;\n }\n \n if(!$this->setProperty('delete', true)->save()) {\n return false;\n }\n \n return $this->apply();\n }",
"public function hasIsDeleted()\n {\n return $this->IsDeleted !== null;\n }",
"public function isDelete() {\n return $this->method == self::METHOD_DELETE;\n }",
"protected function isDeleted(){\n return parent::isStatusOf(STATUS_TYPE_SSS_COMMENT_DELETED);\n }",
"public function isDelete(): bool\n {\n return $this->getMethod() === self::METHOD_DELETE;\n }",
"public function setIsDeleted($bool);",
"public function isDelete()\n\t{\n\t\treturn $this->httpMethod() == self::MethodDelete;\n\t}",
"public function isDelete() {\n return $this->method == 'DELETE';\n }",
"public function isDelete()\n {\n return $this->method === self::METHOD_DELETE;\n }",
"public function isDelete() {\n if($this->method === 'DELETE') {\n return true;\n } else {\n return false;\n }\n }",
"protected function isDeleting()\n {\n return $this->option('delete') == 'true';\n }",
"public function isDeleted(): ?bool\n {\n return $this->deleted;\n }",
"public function isDeleteable()\n {\n return $this->_isDeleteable;\n }",
"protected function onDeleted()\n {\n return true;\n }",
"public function isDelete()\n {\n return $this->isMethod('DELETE');\n }",
"public function isDelete()\n {\n return $this->isMethod('DELETE');\n }",
"public function isDelete() {\n\t\tif ('DELETE' == $this->getMethod())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function hasDeletedAt() : bool;",
"public function beforeDelete() {\n\t\tif (parent::beforeDelete() && $this->hasAttribute('status')) {\n\t\t\t$this->status = self::STATUS_DELETED;\n\t\t\t$this->save(false);\n\t\t\treturn false; // Prevent actual DELETE query from being run\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}",
"public function delete(): bool\n {\n return $this->isAllowed(self::DELETE);\n }",
"public function isDelete()\n {\n return $this->_getMethod() === \\Yana\\Http\\Requests\\MethodEnumeration::DELETE;\n }",
"public function isSoftDelete(): bool\n {\n return !$this->isDestructiveDelete();\n }",
"public function delete() {\n return true;\n }",
"public function setIsDeletedRecord($value) {\n $this->_deleted = $value;\n }",
"abstract public function isUndeleting();",
"abstract public function isUndeleting();",
"public function isDeleted()\r\n {\r\n $isDeleted = false;\r\n \r\n // Check to see if the ride status is deleted\r\n if ($this->getStatusId() == RideStatuses::$statuses[RideStatuses::RIDE_DELETED])\r\n {\r\n $isDeleted = true;\r\n }\r\n \r\n return $isDeleted;\r\n }",
"public function isDeletedOrReleased() {\n\t\treturn $this->released || $this->released;\n\t}",
"public function getCanDeleteProperty()\n {\n return $this->deleteConfirm === $this->staff->email;\n }",
"public function deleted(bool $deleted = null) : bool\n {\n return $this->setGetPersisted('deleted', $deleted);\n }",
"public function setDeleted() {}",
"public function get_deleted() {\n return $this->deleted;\n }",
"public function delete(): bool\n\t{\n\t\treturn true;\n\t}",
"public function getDeleted(): ?bool\n {\n\n return $this->deleted;\n\n }",
"public function getDeleteFlag()\r\n {\r\n return $this->deleteFlag;\r\n }",
"public function delete(): bool\n {\n\n return false;\n }",
"protected function onDeleting()\n {\n return true;\n }",
"public function allowDeletion()\n {\n return $this->allowDeletion;\n }",
"public function canDelete()\n {\n return in_array('delete', $this->actions);\n }",
"public function isDeleted()\n {\n $filter = static::idToFilter($this);\n $query = static::filterToQuery($filter, ['from-trash']);\n\n if (empty($query['_id'])) {\n return false;\n }\n\n return static::getCollection()->count($query) > 0;\n }",
"public function isDelete(){\n\t\treturn (strtoupper($this->getHeader('REQUEST_METHOD'))=='DELETE')? true : false;\n\t}",
"public function wasDeleted(){\n\t\t//if data pk and no orig pk i was probably deleted at some unknow nesting depth\n\t\t$ret = false;\n\t\tif(isset($this->data[$this->primaryKey])){\n\t\t\tif($this->data[$this->primaryKey]){\n\t\t\t\tif(!isset($this->orig[$this->primaryKey])){\n\t\t\t\t\t$ret = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"protected function markAsDeleted()\n {\n $this->deleted = true;\n }",
"public function deleted(bool $deleted = null): bool\n {\n return $this->setGetPersisted('entityDeleted', $deleted);\n }",
"public function getdeleted()\n {\n return $this->deleted;\n }",
"private function GetDeleted()\n\t\t{\n\t\t\treturn $this->deleted;\n\t\t}",
"public function getDeleted()\n {\n return $this->deleted;\n }",
"public function canBeDeleted() : bool\n\t{\n\t\t$countUsers = $this->users()->lockForUpdate()->count();\n\t\t$isFuture = $this->flight_at->isFuture();\n\n\t\tif ($countUsers === 0 && $isFuture) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function canDelete()\n {\n return 1;\n }",
"public function delete() : bool;",
"public function delete() : bool;",
"function is_delete_statement()\n {\n return isset($this->object->_query_args['is_delete']) && $this->object->_query_args['is_delete'];\n }",
"public function isRecipientDelete() {\n\t\treturn $this -> data['r_delete'];\n\t}",
"public function can_delete () {\r\n\r\n return $this->permissions[\"D\"] ? true : false;\r\n\r\n }",
"public function getDeleted() {\n\t\treturn $this->deleted;\n\t}",
"public function getDeleted() {\n\t\treturn $this->deleted;\n\t}",
"public function delete(): bool\n {\n return $this->actionHandler->delete();\n }",
"public function isDeleteResource();",
"public function getDeleted()\n {\n return $this->Deleted;\n }",
"public static function isDelete(): bool {\r\n return static :: isMethod('delete');\r\n }",
"public function setIsDeleted(bool $isDeleted): self;",
"public function isDeletable(): bool\n {\n return true;\n }",
"public function isDeletable();"
] | [
"0.7958723",
"0.7958723",
"0.7958723",
"0.7958723",
"0.7958723",
"0.7958723",
"0.7958723",
"0.7958723",
"0.7958723",
"0.7958723",
"0.7958723",
"0.7958723",
"0.7958723",
"0.7958723",
"0.7906329",
"0.790587",
"0.7845915",
"0.7823076",
"0.7796806",
"0.7796806",
"0.7724928",
"0.76845294",
"0.7664809",
"0.7632415",
"0.7632415",
"0.760229",
"0.7584437",
"0.75048935",
"0.74239624",
"0.740569",
"0.7390836",
"0.73759604",
"0.73692226",
"0.73431045",
"0.7336944",
"0.73191667",
"0.7287871",
"0.7273728",
"0.72659874",
"0.72179",
"0.7198129",
"0.7195683",
"0.7195104",
"0.7187674",
"0.71606696",
"0.7154971",
"0.7110393",
"0.7094886",
"0.70543057",
"0.70493853",
"0.70478064",
"0.7007285",
"0.70062464",
"0.70062464",
"0.7005544",
"0.69573635",
"0.6927341",
"0.6911983",
"0.6892316",
"0.6885477",
"0.6875172",
"0.6871333",
"0.68673027",
"0.68673027",
"0.68567085",
"0.68535787",
"0.6848141",
"0.6838641",
"0.6832112",
"0.6810033",
"0.6808392",
"0.68076783",
"0.67985225",
"0.6745192",
"0.6744861",
"0.67402214",
"0.673311",
"0.6724785",
"0.6724327",
"0.66986614",
"0.66707313",
"0.6664695",
"0.66616464",
"0.66429675",
"0.66361785",
"0.662793",
"0.659449",
"0.6590289",
"0.6590289",
"0.6584705",
"0.65709156",
"0.65640795",
"0.65609425",
"0.65609425",
"0.6543515",
"0.65332127",
"0.65324223",
"0.65137774",
"0.6503221",
"0.6469983",
"0.6432574"
] | 0.0 | -1 |
Sets the modified state for the object to be false. | public function resetModified($col = null)
{
if (null !== $col) {
if (isset($this->modifiedColumns[$col])) {
unset($this->modifiedColumns[$col]);
}
} else {
$this->modifiedColumns = array();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setUnmodified()\n {\n\t$this->modified= false;\n }",
"protected function resetCleanState()\n {\n $this->isModified = false;\n }",
"public function resetBooleans()\n {\n $this->setShowSize(false);\n $this->setShowDescription(false);\n $this->setShowExtension(false);\n $this->setShowLastUpdate(false);\n }",
"public function resetDirty()\n {\n $this->dirty = false;\n $this->dirtyOne = false;\n $this->dirtyMany = false;\n }",
"public function clearChangedState()\n {\n\n $this->_changed = false;\n\n }",
"abstract protected function setModifiedState();",
"public function unsetBoolean(): void\n {\n $this->boolean = [];\n }",
"public function markUnchanged();",
"function resetModified() { $this->_modified = 0; }",
"function resetModified() { $this->_modified = 0; }",
"public function markAsNotDirty()\n {\n foreach ($this->getDirty() as $key) {\n $this->setDirty($key, false);\n }\n }",
"public function disable() {\n\t\t$this->update(TRUE);\n\t}",
"public function setInactive()\r\n {\r\n $this->active = false;\r\n }",
"public function setBoolean($trueFalse);",
"public function unsetBooleanValue(): void\n {\n $this->booleanValue = [];\n }",
"public function resetIsDirty()\r\n\t{\r\n\t\t$this->changelog = array();\r\n\t}",
"function _isDirty() ;",
"function setNotCreated() \n {\n $this->setValueByFieldName( 'statevar_isCreated', 0 );\n $this->updateDBTable();\n }",
"public final function setImmutable()\n {\n $this->isImmutable = true;\n }",
"public function _isDirty() {}",
"public static function setUnlocked()\n {\n self::$locked = false;\n }",
"public function readOnly()\n {\n return !$this->_allowModifications;\n }",
"function setNoModify($no_modify) {\n $this->fields['no_modify'] = $no_modify;\n return $this;\n }",
"protected function _resetModifiedAttributesFlags() {\n\t\t$this->_modifiedAttributes = array();\n\t}",
"protected function isUnchanged() {}",
"function freeze()\n {\n $this->_flagFrozen = true;\n return true;\n }",
"public function reset() {\n $this->_property = false;\n $this->_interface = false;\n $this->_variable = false;\n }",
"public function reset() {\n $this->_property = false;\n $this->_interface = false;\n $this->_variable = false;\n }",
"public static function disable(){\n self::$disabled = true; \n self::$enabled = false;\n }",
"public function DoNotDeleteOldStates() {\n $this->deleteOldStates = false;\n }",
"public function setReadOnly ()\n {\n $this->resetNeedsSaving();\n $this->readOnly = true;\n }",
"public function canBeEdited()\n {\n return false;\n }",
"public static function disable()\n {\n self::$_enabled = FALSE;\n }",
"public function setInternal($bool)\n {\n $this->arguments['internal'] = (bool) $bool;\n }",
"public function setIsBlocked($bool);",
"public function setIsHandled($bool);",
"public function disable()\n {\n $this->enabled = false;\n }",
"public function setDirtyState($dirtyState) {}",
"function modified() { $this->_modified=1; }",
"function modified() { $this->_modified=1; }",
"public function __wakeup()\n\t{\n\t $this->boolTrain = FALSE;\n\t}",
"public function setChanged()\n {\n\n $this->_changed = true;\n\n }",
"public function setIsPure(): void;",
"function OzState() {$this->reset();}",
"public function setBad($bad = true)\n\t{\n\t\t$this->bad = !!$bad;\n\t}",
"public function testSetNotForPaymentDisabledFields()\n {\n $this->slipData->setWithReferenceNumber(false);\n $this->slipData->setWithBankingCustomerId(false);\n\n $this->slipData->setNotForPayment(true);\n }",
"public function modif_boolbin() \r\n\t{\r\n\t\t$this->boolbin = abs($this->boolbin-1);\t\r\n\t}",
"public function disabled();",
"public function disabled();",
"public function disable();",
"public static function disable() {\n\t\tself::$enabled = false;\n\t}",
"public function clearModified()\n\t{\n\t\t$this->_modified = array();\n\t}",
"public static function disable(): void\n {\n static::$_enabled = false;\n }",
"public function toggleEnabled()\n {\n $this->bean->enabled = ! $this->bean->enabled;\n R::store($this->bean);\n }",
"public function set()\n {\n\t\tif ($this->model->state())\n $this->model->set();\n }",
"protected static function _isMutable()\n {\n return false;\n }",
"public function setDisabled($disabled);",
"public static function isMutable()\n {\n return false;\n }",
"public function setPublic()\n {\n $this->private = false;\n }",
"public function cleanState()\n {\n $this->state = array();\n $this->saveState();\n }",
"function disable_false() {\r\n return FALSE;\r\n}",
"public function restore(): bool\n {\n return false;\n }",
"public function setDisabledYes()\n\t{\n\t\t$this->setAttribute( \"disabled\");\n\t}",
"public function toggleSave() : void\n {\n }",
"public function setNoSave()\n {\n $this->no_save = true;\n\n return $this;\n }",
"public function setPrivate()\n {\n $this->private = true;\n }",
"public function setNoCopy(?bool $noCopy) : self\n {\n $this->noCopy = $noCopy;\n return $this;\n }",
"public function disable(): void\n {\n $this->disabled = true;\n }",
"public function disable() {}",
"public function setReadOnly($flag);",
"public function setNew($b)\n {\n $this->new = (boolean) $b;\n }",
"public function setNew($b)\n {\n $this->new = (boolean) $b;\n }",
"public function setNew($b)\n {\n $this->new = (boolean) $b;\n }",
"public function setNew($b)\n {\n $this->new = (boolean) $b;\n }",
"public function setNew($b)\n {\n $this->new = (boolean) $b;\n }",
"public function setNew($b)\n {\n $this->new = (boolean) $b;\n }",
"public function setNew($b)\n {\n $this->new = (boolean) $b;\n }",
"public function setNew($b)\n {\n $this->new = (boolean) $b;\n }",
"public function setNew($b)\n {\n $this->new = (boolean) $b;\n }",
"public function setNew($b)\n {\n $this->new = (boolean) $b;\n }",
"public function setNew($b)\n {\n $this->new = (boolean) $b;\n }",
"public function setNew($b)\n {\n $this->new = (boolean) $b;\n }",
"public function setForReferenceOnly($flag = true)\n {\n $this->forReferenceOnly = (boolean)$flag;\n }",
"public function setPrivate(bool $value) {\n $this->private = $value;\n }",
"public function setHasChanged($state = false)\r\n {\r\n if ($state == true) {\r\n $this->_hasChanged = true;\r\n } else {\r\n $this->_hasChanged = false;\r\n }\r\n\r\n return $this;\r\n }",
"final public function __clone()\n {\n $this->aliased = false;\n }",
"public function disable(): bool {}",
"public function doNotSaveFiles() {\n $this->_saveToFile = false;\n }",
"private function __wakeup() {\n\t\t\treturn false;\n\t\t}",
"public function unsetEnabled(): void\n {\n $this->enabled = [];\n }",
"public function setHidden(){\n $this->_hidden = true;\n }",
"public function isFrozen() {}",
"private function changed()\n {\n $this->isDirty = true;\n }",
"public static function disableCache($state = true)\n\t{\n\t\tself::$activateCache = !$state;\n\t}",
"public function setIsNot($v)\n {\n if ($v !== null) {\n if (is_string($v)) {\n $v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;\n } else {\n $v = (boolean) $v;\n }\n }\n\n if ($this->is_not !== $v) {\n $this->is_not = $v;\n $this->modifiedColumns[] = FeatureCvtermPeer::IS_NOT;\n }\n\n\n return $this;\n }",
"public function setReadOnly()\n {\n $this->_allowModifications = false;\n foreach ($this->_data as $key => $value) {\n if ($value instanceof Zend_Config) {\n $value->setReadOnly();\n }\n }\n }",
"public static function setEditable($bool) {\n\t\tself::$editable = $bool;\n\t}",
"public function disable_step($old_state);",
"public function enabledInEditMode()\n\t{\n\t\treturn false;\n\t}",
"public function isNotChanged()\n {\n return empty(array_diff_assoc($this->items, $this->clone));\n }",
"function isModified() { return $this->_modified; }"
] | [
"0.79724675",
"0.6914967",
"0.681861",
"0.6604693",
"0.6559294",
"0.6538363",
"0.6529017",
"0.6525662",
"0.65205616",
"0.65205616",
"0.6460042",
"0.64104676",
"0.6399038",
"0.6397247",
"0.6286152",
"0.6149016",
"0.6117093",
"0.61135846",
"0.6074225",
"0.6031991",
"0.60030097",
"0.5976631",
"0.5920046",
"0.59032935",
"0.5866358",
"0.58268106",
"0.5825719",
"0.5825719",
"0.5810786",
"0.5785853",
"0.5770366",
"0.5767918",
"0.57625234",
"0.57538784",
"0.57031363",
"0.5698267",
"0.5681559",
"0.56773686",
"0.56744516",
"0.56744516",
"0.5665129",
"0.56540036",
"0.5620527",
"0.5620048",
"0.56106746",
"0.5598119",
"0.55912775",
"0.5575742",
"0.5575742",
"0.5562475",
"0.5562389",
"0.55416805",
"0.5535831",
"0.55336356",
"0.5521106",
"0.5520118",
"0.5511659",
"0.5503963",
"0.54944456",
"0.5493886",
"0.54869896",
"0.54831636",
"0.5471782",
"0.54700345",
"0.54688436",
"0.54663205",
"0.54540867",
"0.5441536",
"0.5440421",
"0.54384875",
"0.5432136",
"0.5432136",
"0.5432136",
"0.5432136",
"0.5432136",
"0.5432136",
"0.5432136",
"0.5432136",
"0.5432136",
"0.5432136",
"0.5432136",
"0.5432136",
"0.54288137",
"0.54192305",
"0.54162675",
"0.5414944",
"0.54077715",
"0.53980076",
"0.5394371",
"0.5387335",
"0.53790843",
"0.5376958",
"0.53752345",
"0.53697133",
"0.53671354",
"0.53661305",
"0.5365029",
"0.535784",
"0.5357372",
"0.53526634",
"0.5347981"
] | 0.0 | -1 |
Compares this with another TblProdInfo instance. If obj is an instance of TblProdInfo, delegates to equals(TblProdInfo). Otherwise, returns false. | public function equals($obj)
{
if (!$obj instanceof static) {
return false;
}
if ($this === $obj) {
return true;
}
if (null === $this->getPrimaryKey() || null === $obj->getPrimaryKey()) {
return false;
}
return $this->getPrimaryKey() === $obj->getPrimaryKey();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function equals($obj): bool;",
"public function equals(TechDivision_Lang_Object $obj)\r\n\t{\r\n\t\tif ($obj === $this) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\r\n\t}",
"public function equals($obj)\r\n {\r\n return $this == $obj;\r\n }",
"public function equals($other) { return $this->obj==Sandbox::unwrap($other); }",
"public function equals(Object $obj = null);",
"public function equals($obj): bool\n {\n if (! $obj instanceof Optional) {\n return false;\n }\n return $this->orElse(null) === $obj->orElse(null);\n }",
"public static function equal($objA, $objB)\n {\n if ($objA === $objB) {\n return true;\n }\n if ($objA instanceof ObjectInterface && $objB instanceof ObjectInterface) {\n return $objA->equals($objB);\n }\n return $objA == $objB;\n }",
"public function has_changes() {\n\t\t\t$properties = array_keys(get_object_vars($this));\n\t\t\t$order = SalesOrderEdit::load($this->sessionid, $this->orderno);\n\n\t\t\tforeach ($properties as $property) {\n\t\t\t\tif ($this->$property != $order->$property) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"public function equals($o){\n\t\t// There is always one single instance of a given class.\n\t\treturn $this === $o;\n\t}",
"function isEqualTo ( &$anObject ) {\n \t\treturn ($this === $anObject);\n \t}",
"public function equals($cmp) {\n return (\n $cmp instanceof self && \n $cmp->name === $this->name && \n $cmp->attributes == $this->attributes\n );\n }",
"function isEqual ( &$anObject ) {\n \t\treturn $this->isEqualTo($anObject);\n \t}",
"public function equals(self $to_compare)\n {\n $class = get_class($to_compare);\n return ($class::$table_name === static::$table_name) && ($this->id === $to_compare->id);\n }",
"public function equals($cmp) {\n return (\n $cmp instanceof self && \n $this->name === $cmp->name && \n $this->ttl === $cmp->ttl && \n $this->order === $cmp->order &&\n $this->pref === $cmp->pref &&\n $this->flags === $cmp->flags &&\n $this->service === $cmp->service &&\n $this->regex === $cmp->regex &&\n $this->replacement === $cmp->replacement\n );\n }",
"public function equals($cmp) {\n return \n $cmp instanceof self && \n $cmp->real === $this->real &&\n $cmp->imag === $this->imag\n ;\n }",
"public final function compare($fld)\n {\n if (!isset($this->data->{$this->pk}))\n Throw new Error('Db field compare is allowed only with existing pk value in your current dataset.');\n\n // Create a new model of our current model\n $model = $this->getModel();\n\n // We want only the field set as parameter\n $model->setField($fld);\n\n // The data to compare must be the current record in db\n $model->setFilter($this->pk . '={int:' . $this->pk . '}', array(\n $this->pk => $this->data->{$this->pk}\n ));\n\n // Only the value of field for comparision wanted\n $value = $model->read('val');\n\n // Is it different from the current set data?\n return $value == $this->data->{$fld};\n }",
"function is_compared($product_id)\n {\n if($this->session->userdata('compare') == ''){\n $this->session->set_userdata('compare','[]');\n }\n $compared = json_decode($this->session->userdata('compare'),true);\n foreach ($compared as $row) {\n if($row == $product_id){\n return 'yes';\n }\n }\n return 'no';\n }",
"public function equals($record)\n {\n if ($this->getIsNewRecord() || $record->getIsNewRecord()) {\n return false;\n }\n\n return get_class($this) === get_class($record) && $this->getPrimaryKey() === $record->getPrimaryKey();\n }",
"function editProduct($prodInfo, $prodId)\n {\n $this->db->where('id', $prodId);\n $this->db->update('tbl_products', $prodInfo);\n \n return TRUE;\n }",
"public function equals($cmp) {\n return $cmp instanceof self && $this->hashCode() === $cmp->hashCode();\n }",
"public function equals(Object $object);",
"public function equals($cmp) {\n return (\n $cmp instanceof self && \n $this->name === $cmp->name && \n $this->ttl === $cmp->ttl && \n $this->address->equals($cmp->address)\n );\n }",
"function Update($obj, $debbug=false, $pk='id')\r\n\t{\r\n\t\tglobal $MSG;\r\n\t\tif (!is_object($obj)) return false;\r\n\t\t$act_obj = $this->Retrieve(get_class($obj), $obj->get($pk), TRUE, TRUE);\r\n\t\t$this->Return = FALSE;\r\n\t\t$this->connect();\r\n\t\t$this->sql = $this->SQL_Update($obj, $act_obj, $pk);\r\n\r\n\t\tif(mysql_query($this->sql))\r\n\t\t{\r\n\t\t\t$this->Return = TRUE;\r\n\t\t}\r\n\t\tif ($debbug)\r\n\t\t{\r\n\t\t\t$MSG->info[] = $this->sql;\r\n\t\t\tif (mysql_error())\r\n\t\t\t{\r\n\t\t\t\t$MSG->error[] = mysql_error();\r\n\t\t\t}\r\n\t\t}\r\n\t\t//mysql_close();\r\n\t\treturn $this->Return;\r\n\t}",
"public function buildCriteria()\n {\n $criteria = new Criteria(TblProdInfoTableMap::DATABASE_NAME);\n\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_ID)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_ID, $this->prod_id);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_PRICE_ID)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_PRICE_ID, $this->prod_price_id);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_NAME)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_NAME, $this->prod_name);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_ALT1)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_ALT1, $this->prod_alt1);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_ALT2)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_ALT2, $this->prod_alt2);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_ALT3)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_ALT3, $this->prod_alt3);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_ALT4)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_ALT4, $this->prod_alt4);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_CODE)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_CODE, $this->prod_code);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_CATEGORY)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_CATEGORY, $this->prod_category);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_CATEGORY_SHIPPING)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_CATEGORY_SHIPPING, $this->prod_category_shipping);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_WRITEUP)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_WRITEUP, $this->prod_writeup);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_LENGTH)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_LENGTH, $this->prod_length);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_WINGSPAN)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_WINGSPAN, $this->prod_wingspan);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_HEIGHT)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_HEIGHT, $this->prod_height);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_SCALE)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_SCALE, $this->prod_scale);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_LINKS)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_LINKS, $this->prod_links);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_LINKDESCRIPTION)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_LINKDESCRIPTION, $this->prod_linkdescription);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_FRONT)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_FRONT, $this->prod_front);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_KEYWORDS)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_KEYWORDS, $this->prod_keywords);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_KEYWORDS_WRITEUP)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_KEYWORDS_WRITEUP, $this->prod_keywords_writeup);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_TITLE)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_TITLE, $this->prod_title);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_DESCRIPTION)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_DESCRIPTION, $this->prod_description);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_GENERAL)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_GENERAL, $this->prod_general);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_ERA)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_ERA, $this->prod_era);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_COMPANY)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_COMPANY, $this->prod_company);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_RELATED)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_RELATED, $this->prod_related);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_RELATED_PA)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_RELATED_PA, $this->prod_related_pa);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_RELATED_M3)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_RELATED_M3, $this->prod_related_m3);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_RELATED2)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_RELATED2, $this->prod_related2);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_SAVEAS)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_SAVEAS, $this->prod_saveas);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_AIRCRAFTREG)) {\n $criteria->add(TblProdInfoTableMap::COL_PROD_AIRCRAFTREG, $this->prod_aircraftreg);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_MB)) {\n $criteria->add(TblProdInfoTableMap::COL_MB, $this->mb);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PA)) {\n $criteria->add(TblProdInfoTableMap::COL_PA, $this->pa);\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_M3)) {\n $criteria->add(TblProdInfoTableMap::COL_M3, $this->m3);\n }\n\n return $criteria;\n }",
"public function equalsTo(ValueObjectInterface $object): bool {\n return $this->get() === $object->get();\n }",
"public function equalsTo(ValueObjectInterface $object): bool {\n return $this->get() === $object->get();\n }",
"function equals($vo) {\n\t\treturn $this->FiscaalGroepID == $vo->FiscaalGroepID &&\n\t\t\t$this->FiscaalGroupType == $vo->FiscaalGroupType &&\n\t\t\t$this->GewijzigdDoor == $vo->GewijzigdDoor &&\n\t\t\t$this->GewijzigdOp == $vo->GewijzigdOp;\n\t}",
"public function hashCode()\n {\n $validPk = null !== $this->getProdId();\n\n $validPrimaryKeyFKs = 3;\n $primaryKeyFKs = [];\n\n //relation tbl_prod_info_fk_c95266 to table tbl_prod_photos\n if ($this->aTblProdPhotos && $hash = spl_object_hash($this->aTblProdPhotos)) {\n $primaryKeyFKs[] = $hash;\n } else {\n $validPrimaryKeyFKs = false;\n }\n\n //relation tbl_prod_info_fk_55d783 to table tbl_prod_prices\n if ($this->aTblProdPrices && $hash = spl_object_hash($this->aTblProdPrices)) {\n $primaryKeyFKs[] = $hash;\n } else {\n $validPrimaryKeyFKs = false;\n }\n\n //relation tbl_prod_info_fk_937b39 to table tbl_prod_smaller\n if ($this->aTblProdSmaller && $hash = spl_object_hash($this->aTblProdSmaller)) {\n $primaryKeyFKs[] = $hash;\n } else {\n $validPrimaryKeyFKs = false;\n }\n\n if ($validPk) {\n return crc32(json_encode($this->getPrimaryKey(), JSON_UNESCAPED_UNICODE));\n } elseif ($validPrimaryKeyFKs) {\n return crc32(json_encode($primaryKeyFKs, JSON_UNESCAPED_UNICODE));\n }\n\n return spl_object_hash($this);\n }",
"abstract public function equals(ValueObject $valueObject);",
"public function equals(ValueObject $other)\n {\n return $this->toString() == $other->toString();\n }",
"public static function isEqual(Piwik_DataTable $table1, Piwik_DataTable $table2)\n {\n $rows1 = $table1->getRows();\n $rows2 = $table2->getRows();\n\n $table1->rebuildIndex();\n $table2->rebuildIndex();\n\n if ($table1->getRowsCount() != $table2->getRowsCount()) {\n return false;\n }\n\n foreach ($rows1 as $row1) {\n $row2 = $table2->getRowFromLabel($row1->getColumn('label'));\n if ($row2 === false\n || !Piwik_DataTable_Row::isEqual($row1, $row2)\n ) {\n return false;\n }\n }\n\n return true;\n }",
"protected function _hasTierPriceChanged(Mage_Catalog_Model_Product $product)\n\t{\n\t\t$orig = $product->getOrigData('tier_price');\n\t\t$new = $product->getData('tier_price');\n\t\t\n\t\tif (count($orig) != count($new)) return true;\n\n\t\tif (is_array($new))\n\t\t{\n\t\t\tforeach ($new as $i => $tier)\n\t\t\t{\n\t\t\t\tif ($tier['website_id'] != $orig[$i]['website_id']) return true;\n\n\t\t\t\tif ($tier['price_qty'] != $orig[$i]['price_qty']) return true;\n\n\t\t\t\tif ($tier['price'] != $orig[$i]['price']) return true;\n\n\t\t\t\tif (isset($tier['delete']) && $tier['delete']) return true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"function basel_is_product_in_compare( $id ) {\n\t\t$list = basel_get_compared_products();\n\n\t\treturn in_array( $id, $list, true );\n\t}",
"public function equals()\n {\n $this->assertTrue($this->stubRefProperty->equals($this->stubRefProperty));\n $stubRefProperty1 = new stubReflectionProperty('stubTestProperty1', 'property');\n $stubRefProperty2 = new stubReflectionProperty('stubTestProperty1', 'anotherProperty');\n $this->assertTrue($this->stubRefProperty->equals($stubRefProperty1));\n $this->assertTrue($stubRefProperty1->equals($this->stubRefProperty));\n $this->assertFalse($this->stubRefProperty->equals($stubRefProperty2));\n $this->assertFalse($this->stubRefProperty->equals('foo'));\n $this->assertFalse($stubRefProperty2->equals($this->stubRefProperty));\n }",
"public function isProduct()\n {\n return $this -> name == config('constant.categorytype.product_id');\n }",
"public function equals($cmp) {\n return $cmp instanceof self && $cmp->list === $this->list;\n }",
"public function addProduct(Cart $cartObj) :bool\n {\n $orderObj = new Order();\n $orderObj->createOrder();\n $query = $this->pdo->prepare(\"SELECT orders_products.id from orders_products\nINNER JOIN orders on orders_products.order_id = orders.id\nWHERE orders.user_id = :user_id AND orders.status='cart' AND orders_products.product_id=:product_id\");\n $query->execute(array('product_id'=>$cartObj->getProductId(),'user_id'=> $orderObj->getUserId()));\n $row = $query->fetchALL(PDO::FETCH_ASSOC);\n if (empty($row)) {\n $query = $this->pdo->prepare(\"\n INSERT INTO orders_products\n SELECT NULL,id,:product_id,:quantity FROM orders WHERE user_id = :user_id AND status ='cart'\");\n $query->execute(array\n (\n 'product_id' => $cartObj->getProductId(),\n 'user_id' => $orderObj->getUserId(),\n 'quantity'=>$cartObj->getQuantity()));\n $product = new Product();\n $product->decreaseQuantity($cartObj->getOrderId(), $cartObj->getQuantity());\n unset($query);\n } else {\n $query = $this->pdo->prepare(\"UPDATE orders_products \n SET quantity = quantity+:quantity WHERE product_id =:product_id;\");\n $query->execute(array\n (\n 'product_id'=>$cartObj->getProductId(),\n 'quantity'=>$cartObj->getQuantity()));\n $product = new Product();\n $product->decreaseQuantity($cartObj->getProductId(), $cartObj->getQuantity());\n unset($query);\n }\n return true;\n }",
"public function testEquality()\n {\n $m1 = new BigMoney(Decimal::fromInteger(100), new Currency('EUR'));\n $m2 = new BigMoney(Decimal::fromInteger(100), new Currency('EUR'));\n $m3 = new BigMoney(Decimal::fromInteger(100), new Currency('USD'));\n $m4 = new BigMoney(Decimal::fromInteger(50), new Currency('EUR'));\n\n $this->assertTrue($m1->equals($m2));\n $this->assertFalse($m1->equals($m3));\n $this->assertFalse($m1->equals($m4));\n }",
"protected function doInsert(ConnectionInterface $con)\n {\n $modifiedColumns = array();\n $index = 0;\n\n $this->modifiedColumns[TblProdInfoTableMap::COL_PROD_ID] = true;\n if (null !== $this->prod_id) {\n throw new PropelException('Cannot insert a value for auto-increment primary key (' . TblProdInfoTableMap::COL_PROD_ID . ')');\n }\n\n // check the columns in natural order for more readable SQL queries\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_ID)) {\n $modifiedColumns[':p' . $index++] = 'prod_id';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_PRICE_ID)) {\n $modifiedColumns[':p' . $index++] = 'prod_price_id';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_NAME)) {\n $modifiedColumns[':p' . $index++] = 'prod_name';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_ALT1)) {\n $modifiedColumns[':p' . $index++] = 'prod_alt1';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_ALT2)) {\n $modifiedColumns[':p' . $index++] = 'prod_alt2';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_ALT3)) {\n $modifiedColumns[':p' . $index++] = 'prod_alt3';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_ALT4)) {\n $modifiedColumns[':p' . $index++] = 'prod_alt4';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_CODE)) {\n $modifiedColumns[':p' . $index++] = 'prod_code';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_CATEGORY)) {\n $modifiedColumns[':p' . $index++] = 'prod_category';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_CATEGORY_SHIPPING)) {\n $modifiedColumns[':p' . $index++] = 'prod_category_shipping';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_WRITEUP)) {\n $modifiedColumns[':p' . $index++] = 'prod_writeup';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_LENGTH)) {\n $modifiedColumns[':p' . $index++] = 'prod_length';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_WINGSPAN)) {\n $modifiedColumns[':p' . $index++] = 'prod_wingspan';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_HEIGHT)) {\n $modifiedColumns[':p' . $index++] = 'prod_height';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_SCALE)) {\n $modifiedColumns[':p' . $index++] = 'prod_scale';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_LINKS)) {\n $modifiedColumns[':p' . $index++] = 'prod_links';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_LINKDESCRIPTION)) {\n $modifiedColumns[':p' . $index++] = 'prod_linkdescription';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_FRONT)) {\n $modifiedColumns[':p' . $index++] = 'prod_front';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_KEYWORDS)) {\n $modifiedColumns[':p' . $index++] = 'prod_keywords';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_KEYWORDS_WRITEUP)) {\n $modifiedColumns[':p' . $index++] = 'prod_keywords_writeup';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_TITLE)) {\n $modifiedColumns[':p' . $index++] = 'prod_title';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_DESCRIPTION)) {\n $modifiedColumns[':p' . $index++] = 'prod_description';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_GENERAL)) {\n $modifiedColumns[':p' . $index++] = 'prod_general';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_ERA)) {\n $modifiedColumns[':p' . $index++] = 'prod_era';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_COMPANY)) {\n $modifiedColumns[':p' . $index++] = 'prod_company';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_RELATED)) {\n $modifiedColumns[':p' . $index++] = 'prod_related';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_RELATED_PA)) {\n $modifiedColumns[':p' . $index++] = 'prod_related_pa';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_RELATED_M3)) {\n $modifiedColumns[':p' . $index++] = 'prod_related_m3';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_RELATED2)) {\n $modifiedColumns[':p' . $index++] = 'prod_related2';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_SAVEAS)) {\n $modifiedColumns[':p' . $index++] = 'prod_saveas';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PROD_AIRCRAFTREG)) {\n $modifiedColumns[':p' . $index++] = 'prod_aircraftreg';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_MB)) {\n $modifiedColumns[':p' . $index++] = 'mb';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_PA)) {\n $modifiedColumns[':p' . $index++] = 'pa';\n }\n if ($this->isColumnModified(TblProdInfoTableMap::COL_M3)) {\n $modifiedColumns[':p' . $index++] = 'm3';\n }\n\n $sql = sprintf(\n 'INSERT INTO tbl_prod_info (%s) VALUES (%s)',\n implode(', ', $modifiedColumns),\n implode(', ', array_keys($modifiedColumns))\n );\n\n try {\n $stmt = $con->prepare($sql);\n foreach ($modifiedColumns as $identifier => $columnName) {\n switch ($columnName) {\n case 'prod_id':\n $stmt->bindValue($identifier, $this->prod_id, PDO::PARAM_INT);\n break;\n case 'prod_price_id':\n $stmt->bindValue($identifier, $this->prod_price_id, PDO::PARAM_INT);\n break;\n case 'prod_name':\n $stmt->bindValue($identifier, $this->prod_name, PDO::PARAM_STR);\n break;\n case 'prod_alt1':\n $stmt->bindValue($identifier, $this->prod_alt1, PDO::PARAM_STR);\n break;\n case 'prod_alt2':\n $stmt->bindValue($identifier, $this->prod_alt2, PDO::PARAM_STR);\n break;\n case 'prod_alt3':\n $stmt->bindValue($identifier, $this->prod_alt3, PDO::PARAM_STR);\n break;\n case 'prod_alt4':\n $stmt->bindValue($identifier, $this->prod_alt4, PDO::PARAM_STR);\n break;\n case 'prod_code':\n $stmt->bindValue($identifier, $this->prod_code, PDO::PARAM_STR);\n break;\n case 'prod_category':\n $stmt->bindValue($identifier, $this->prod_category, PDO::PARAM_STR);\n break;\n case 'prod_category_shipping':\n $stmt->bindValue($identifier, $this->prod_category_shipping, PDO::PARAM_INT);\n break;\n case 'prod_writeup':\n $stmt->bindValue($identifier, $this->prod_writeup, PDO::PARAM_STR);\n break;\n case 'prod_length':\n $stmt->bindValue($identifier, $this->prod_length, PDO::PARAM_STR);\n break;\n case 'prod_wingspan':\n $stmt->bindValue($identifier, $this->prod_wingspan, PDO::PARAM_STR);\n break;\n case 'prod_height':\n $stmt->bindValue($identifier, $this->prod_height, PDO::PARAM_STR);\n break;\n case 'prod_scale':\n $stmt->bindValue($identifier, $this->prod_scale, PDO::PARAM_STR);\n break;\n case 'prod_links':\n $stmt->bindValue($identifier, $this->prod_links, PDO::PARAM_STR);\n break;\n case 'prod_linkdescription':\n $stmt->bindValue($identifier, $this->prod_linkdescription, PDO::PARAM_STR);\n break;\n case 'prod_front':\n $stmt->bindValue($identifier, $this->prod_front, PDO::PARAM_STR);\n break;\n case 'prod_keywords':\n $stmt->bindValue($identifier, $this->prod_keywords, PDO::PARAM_STR);\n break;\n case 'prod_keywords_writeup':\n $stmt->bindValue($identifier, $this->prod_keywords_writeup, PDO::PARAM_STR);\n break;\n case 'prod_title':\n $stmt->bindValue($identifier, $this->prod_title, PDO::PARAM_STR);\n break;\n case 'prod_description':\n $stmt->bindValue($identifier, $this->prod_description, PDO::PARAM_STR);\n break;\n case 'prod_general':\n $stmt->bindValue($identifier, $this->prod_general, PDO::PARAM_INT);\n break;\n case 'prod_era':\n $stmt->bindValue($identifier, $this->prod_era, PDO::PARAM_INT);\n break;\n case 'prod_company':\n $stmt->bindValue($identifier, $this->prod_company, PDO::PARAM_STR);\n break;\n case 'prod_related':\n $stmt->bindValue($identifier, $this->prod_related, PDO::PARAM_STR);\n break;\n case 'prod_related_pa':\n $stmt->bindValue($identifier, $this->prod_related_pa, PDO::PARAM_STR);\n break;\n case 'prod_related_m3':\n $stmt->bindValue($identifier, $this->prod_related_m3, PDO::PARAM_STR);\n break;\n case 'prod_related2':\n $stmt->bindValue($identifier, $this->prod_related2, PDO::PARAM_STR);\n break;\n case 'prod_saveas':\n $stmt->bindValue($identifier, $this->prod_saveas, PDO::PARAM_INT);\n break;\n case 'prod_aircraftreg':\n $stmt->bindValue($identifier, $this->prod_aircraftreg, PDO::PARAM_STR);\n break;\n case 'mb':\n $stmt->bindValue($identifier, $this->mb, PDO::PARAM_INT);\n break;\n case 'pa':\n $stmt->bindValue($identifier, $this->pa, PDO::PARAM_INT);\n break;\n case 'm3':\n $stmt->bindValue($identifier, $this->m3, PDO::PARAM_INT);\n break;\n }\n }\n $stmt->execute();\n } catch (Exception $e) {\n Propel::log($e->getMessage(), Propel::LOG_ERR);\n throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), 0, $e);\n }\n\n try {\n $pk = $con->lastInsertId();\n } catch (Exception $e) {\n throw new PropelException('Unable to get autoincrement id.', 0, $e);\n }\n $this->setProdId($pk);\n\n $this->setNew(false);\n }",
"public function isEqualTo( $other )\n {\n if( ( $this->connection == $other->connection() ) &&\n ( $this->ulA->ID == $other->ulA->ID ) &&\n ( $this->ulB->ID == $other->ulB->ID ) &&\n ( $this->ulA->db->ID == $other->ulA->db->ID ) &&\n ( $this->ulB->db->ID == $other->ulB->db->ID ) )\n { return true; }\n return false;\n }",
"protected function _fcpoCompareBaskets($oBasket, $oShadowBasket) {\n $blGeneralCheck = (\n $oShadowBasket instanceof oxBasket &&\n $oBasket instanceof oxBasket\n );\n if ($blGeneralCheck == false) {\n $blReturn = false;\n } else {\n // compare brut sums\n $dBruttoSumBasket = $oBasket->getBruttoSum();\n $dBruttoSumShadowBasket = $oShadowBasket->getBruttoSum();\n\n $blReturn = ($dBruttoSumBasket == $dBruttoSumShadowBasket);\n }\n\n return $blReturn;\n }",
"public function equals(Orm $that)\n {\n return FALSE;\n }",
"public function getTblProdSmaller(ConnectionInterface $con = null)\n {\n if ($this->aTblProdSmaller === null && ($this->prod_id !== null)) {\n $this->aTblProdSmaller = ChildTblProdSmallerQuery::create()->findPk($this->prod_id, $con);\n // Because this foreign key represents a one-to-one relationship, we will create a bi-directional association.\n $this->aTblProdSmaller->setTblProdInfo($this);\n }\n\n return $this->aTblProdSmaller;\n }",
"function o_eq($a, $b) {\n\t\t\treturn Obj::singleton()->equal($a, $b);\n\t\t}",
"function compareObjects(&$ob1, &$ob2) {\n\tprint_pre('o1 == o2 : ' . bool2str($ob1 == $ob2));\n\tprint_pre('o1 != o2 : ' . bool2str($ob1 != $ob2));\n\tprint_pre('o1 === o2 : ' . bool2str($ob1 === $ob2));\n\tprint_pre('o1 !== o2 : ' . bool2str($ob1 !== $ob2));\n}",
"abstract protected function isEntityEqual($sProperty, JobEntityInterface $oJobEntityA, JobEntityInterface $oJobEntityB);",
"abstract public function equals(ilADT $a_adt);",
"function comprobarProductoDuplicado() {\n\t\tif($this->id_nombre_producto == NULL) {\n\t\t\t$consulta = sprintf(\"select id_nombre_producto from nombre_producto where nombre=%s and version=%s and activo=1\",\n\t\t\t\t$this->makeValue($this->nombre, \"text\"),\n\t\t\t\t$this->makeValue($this->version, \"double\"));\n\t\t} else {\t\n\t\t\t$consulta = sprintf(\"select id_nombre_producto from nombre_producto where nombre=%s and version=%s and id_nombre_producto<>%s and activo=1\",\n\t\t\t\t$this->makeValue($this->nombre, \"text\"),\n\t\t\t\t$this->makeValue($this->version, \"double\"),\n\t\t\t\t$this->makeValue($this->id_nombre_producto, \"int\"));\n\t\t}\n\t\t$this->setConsulta($consulta);\n\t\t$this->ejecutarConsulta();\n\t\tif($this->getNumeroFilas() == 0) {\n\t\t\treturn false;\t\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}",
"public function isEqualTo(Doctrine_Record $subj);",
"public function equals(Setoid $that): bool;",
"public function testCmpart()\n {\n $oA = new stdClass();\n $oA->cnt = 10;\n\n $oB = new stdClass();\n $oB->cnt = 10;\n\n $this->assertTrue(cmpart($oA, $oB) == 0);\n\n $oA->cnt = 10;\n $oB->cnt = 20;\n\n $this->assertTrue(cmpart($oA, $oB) == -1);\n }",
"public function equals(self $other): bool\n {\n // check that attribute types match\n if ($this->oid() !== $other->oid()) {\n return false;\n }\n $matcher = $this->value->equalityMatchingRule();\n\n return $matcher->compare($this->value->stringValue(), $other->value->stringValue()) === true;\n }",
"public function syncProductPrice(EcwidProductType $obj) {\n if ($obj->price === null) {\n throw new Exception('The price is required');\n }\n\n $response = $this->getConnector()->exportProduct($obj);\n\n $aResponse = (array)json_decode($response);\n\n if (!isset($aResponse['updateCount'])) {\n throw new Exception(sprintf('Unexpected response: %s', var_export($response, true)));\n }\n\n return $aResponse['updateCount'] == 1;\n }",
"function is_model($obj)\n {\n return is_subclass_of($obj, 'C_DataMapper_Model') or get_class($obj) == 'C_DataMapper_Model';\n }",
"public function equals(ValueObject $valueObjectToCompare): bool\n {\n return ($this->weight() === $valueObjectToCompare->weight());\n }",
"public function ensureConsistency()\n {\n if ($this->aTblProdPhotos !== null && $this->prod_id !== $this->aTblProdPhotos->getProdId()) {\n $this->aTblProdPhotos = null;\n }\n if ($this->aTblProdPrices !== null && $this->prod_id !== $this->aTblProdPrices->getProdId()) {\n $this->aTblProdPrices = null;\n }\n if ($this->aTblProdSmaller !== null && $this->prod_id !== $this->aTblProdSmaller->getProdId()) {\n $this->aTblProdSmaller = null;\n }\n if ($this->aTblProdPricing !== null && $this->prod_price_id !== $this->aTblProdPricing->getProdPriceId()) {\n $this->aTblProdPricing = null;\n }\n if ($this->aTblMenus !== null && $this->prod_category !== $this->aTblMenus->getMenuAlias()) {\n $this->aTblMenus = null;\n }\n if ($this->aTblShippingCategories !== null && $this->prod_category_shipping !== $this->aTblShippingCategories->getProdShippingPriceId()) {\n $this->aTblShippingCategories = null;\n }\n if ($this->aTblGeneral !== null && $this->prod_general !== $this->aTblGeneral->getProdGeneral()) {\n $this->aTblGeneral = null;\n }\n if ($this->aTblEra !== null && $this->prod_era !== $this->aTblEra->getEraId()) {\n $this->aTblEra = null;\n }\n }",
"private function compareData() {\n if ($this->remove_table) {\n\n foreach ($this->two_db_tables as $two_table_name => $val2) {\n\n if (!array_key_exists($two_table_name, $this->one_db_tables)) {\n\n array_push($this->delete_tables, $two_table_name);\n }\n }\n }\n\n /*\n * Birini db de olup 2. db de olmayan tablolar\n */\n\n foreach ($this->one_db_tables as $table_name => $val) {\n\n if (array_key_exists($table_name, $this->two_db_tables)) {\n\n if (!array_key_exists($table_name, $this->delete_tables)) {\n\n $this->compareColumns($table_name, $this->one_db_table_columns[$table_name], $this->two_db_table_columns[$table_name]);\n \n \n \n }\n } else {\n\n array_push($this->create_tables, $table_name);\n }\n }\n\n\n\n return $this;\n }",
"function equals($a, $b){\n\tif (method_exists($a, 'equals'))\n\t\treturn $a->equals($b);\n\telse\n\t\treturn $a===$b;\n}",
"public function equals($to) {\n return\n get_class($this) == get_class($to) &&\n Core::equals($this->status, $to->status) && parent::equals($to);\n }",
"public function CachedIsAssociatedWith(QBaseClass $objForeign, $blnForceUpdate = false) {\r\n\t\t\t$strForeign = get_class($objForeign);\r\n\t\t\t\r\n\t\t\t// Have we already fetched the list and cached it?\r\n\t\t\tif ($blnForceUpdate || !(isset($this->objAssociatedCache[$strForeign])))\r\n\t\t\t\t$this->objAssociatedCache[$strForeign] = $this->{sprintf('Get%sArray', $strForeign)}();\r\n\t\t\t\t\r\n\t\t\tforeach ($this->objAssociatedCache[$strForeign] as $objCached)\r\n\t\t\t\tif ($objCached->Id == $objForeign->Id)\r\n\t\t\t\t\treturn true;\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}",
"public function hasProduct()\n {\n return $this->Product !== null;\n }",
"public function exists(){\r\n\r\n\t\ttry {\r\n\t\t\tglobal $ks_db;\r\n\t\t\tglobal $ks_log;\r\n\t\t\t\r\n\t\t\t$bReturn = false;\r\n\t\t\t\r\n\t\t\tif (! isset ( $this->id )) { \r\n\t\t\t\techo \"Fatal Error: Id is not set for the object! Please do \\$objA->setId(\\$id); in: \" . __METHOD__;\r\n\t\t\t\texit ();\r\n\t\t\t}\r\n\r\n\t\t\t$sql = \"SELECT COUNT(*) as totalRow FROM $this->sqlTable WHERE lp_id = ?\";\r\n\r\n\t\t\t//count how many rows found\r\n\t\t\t$totalRow = $ks_db->fetchOne ( $sql, $this->id );\r\n\t\t\t\r\n\t\t\tif ($totalRow > 0) {\r\n\t\t\t\t$bReturn = true;\r\n\t\t\t}else {\r\n\t\t\t\t$bReturn = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $bReturn;\r\n\t\t\t\r\n\t\t} catch(Exception $e) {\r\n\t\t\t$ks_log->info ( 'Fatal Error: ' . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage () );\r\n\t\t\t$ks_log->info ( '<br>SQL Statement: ' . $sql);\r\n\t\t\techo \"Fatal Error: \" . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage ();\r\n\t\t\techo \"SQL Statement: \" . $sql;\r\n\t\t}\r\n\t}",
"function recordExists()\n {\n global $objDatabase;\n\n $query = \"\n SELECT 1\n FROM \".DBPREFIX.\"module_shop\".MODULE_INDEX.\"_products\n WHERE id=$this->id\";\n $objResult = $objDatabase->Execute($query);\n if (!$objResult || $objResult->EOF) return false;\n return true;\n }",
"public function equals($to) {\n return\n get_class($this) == get_class($to) &&\n $this->code == $to->code;\n }",
"public function equals( $A, $B );",
"public function equals(self $currencyPair): bool\n {\n return $this->getBaseCurrency()->equals($currencyPair->getBaseCurrency()) && $this->getQuoteCurrency()->equals($currencyPair->getQuoteCurrency());\n }",
"private function comparaObjetoObjetoUltimaVersao($objeto)\n {\n \t// codificando objeto para comparacao\n \t$objetoCodificado = Basico_OPController_UtilOPController::codificar($objeto);\n \t// recuperando id da relacao de categoria chave estrangeira\n \t$categoriaChaveEstrangeira = $this->_categoriaAssocChaveEstrangeiraOPController->retornaObjetoCategoriaChaveEstrangeiraCVC($objeto);\n \t// recuperando id generico do objeto\n \t$idGenerico = Basico_OPController_PersistenceOPController::bdRetornaValorIdGenericoObjeto($objeto);\n \t\n \t// recuperando objeto CVC contendo a ultima versao do objeto\n \t$objUltimaVersao = self::retornaObjUltimaVersao($categoriaChaveEstrangeira->id, $idGenerico);\n\n \t// retornando resultado da comparacao entre objetos\n \treturn (strcmp($objetoCodificado, $objUltimaVersao->objeto) === 0);\n }",
"public function equals($cmp) {\n return (\n $cmp instanceof InternetAddress and \n $this->personal.$this->localpart.$this->domain === $cmp->personal.$cmp->localpart.$cmp->domain\n );\n }",
"protected function isDataEqual(&$a, &$b): bool\n {\n // empty string is considered null in dynamodb\n if (\n (\\is_null($a) && \\is_string($b) && $b === '')\n || (\\is_null($b) && \\is_string($a) && $a === '')\n ) {\n return true;\n }\n\n if (gettype($a) != gettype($b)) {\n return false;\n }\n\n switch (true) {\n case (is_double($a)):\n return \"$a\" == \"$b\";\n break;\n case (is_array($a)):\n if (count($a) !== count($b)) {\n return false;\n }\n foreach ($a as $k => &$v) {\n if ( ! key_exists($k, $b)) {\n return false;\n }\n if ( ! $this->isDataEqual($v, $b[$k])) {\n return false;\n }\n }\n\n // every $k in $a can be found in $b and is equal\n return true;\n break;\n case (is_resource($a)):\n case (is_object($a)):\n throw new ODMException(\"DynamoDb data cannot contain value of resource/object\");\n break;\n default:\n return $a === $b;\n }\n }",
"function equals($other);",
"public function equals($price) {\n $equal = true;\n if($price->tax !== $this->tax) $equal = false;\n if($price->net !== $this->net) $equal = false;\n return $equal;\n }",
"public function equals($arg);",
"public static function areSame($model1,$model2){\n if($model1->modelName==$model2->modelName && $model1->id==$model2->id){\n return true;\n }\n return false;\n }",
"protected function equalsSelf(ValueObjectInterface $otherObject)\n {\n return $this->toString() === $otherObject->toString();\n }",
"public function reload($deep = false, ConnectionInterface $con = null)\n {\n if ($this->isDeleted()) {\n throw new PropelException(\"Cannot reload a deleted object.\");\n }\n\n if ($this->isNew()) {\n throw new PropelException(\"Cannot reload an unsaved object.\");\n }\n\n if ($con === null) {\n $con = Propel::getServiceContainer()->getReadConnection(TblProdInfoTableMap::DATABASE_NAME);\n }\n\n // We don't need to alter the object instance pool; we're just modifying this instance\n // already in the pool.\n\n $dataFetcher = ChildTblProdInfoQuery::create(null, $this->buildPkeyCriteria())->setFormatter(ModelCriteria::FORMAT_STATEMENT)->find($con);\n $row = $dataFetcher->fetch();\n $dataFetcher->close();\n if (!$row) {\n throw new PropelException('Cannot find matching row in the database to reload object values.');\n }\n $this->hydrate($row, 0, true, $dataFetcher->getIndexType()); // rehydrate\n\n if ($deep) { // also de-associate any related objects?\n\n $this->aTblEra = null;\n $this->aTblGeneral = null;\n $this->aTblMenus = null;\n $this->aTblProdPhotos = null;\n $this->aTblProdPrices = null;\n $this->aTblProdPricing = null;\n $this->aTblProdSmaller = null;\n $this->aTblShippingCategories = null;\n } // if (deep)\n }",
"function IsProduct() {\r\n\t\treturn true;\r\n\t}",
"public function equals(Constrainer $constrainer);",
"public function isSupportedProduct()\n {\n /** @var Oyst_OneClick_Model_Catalog $oystCatalog */\n $oystCatalog = Mage::getModel('oyst_oneclick/catalog');\n\n return $oystCatalog->isSupportedProduct($this->getProduct());\n }",
"function is_equal(tree $other): bool {\n // We must treat the triples array as an unordered set\n // (where the two sets are equal even if values are present\n // in a different order).\n // Therefore, we cannot simply check if array_values()\n // for each set is equal.\n foreach($this->triples as $k => $t) {\n $o = @$other->triples[$k];\n if(!$o || !$t->is_equal($o)){\n return false;\n }\n }\n foreach($other->triples as $k => $t) {\n $o = @$this->triples[$k];\n if(!$o || !$t->is_equal($o)){\n return false;\n }\n }\n return true;\n }",
"public function Equals___T($other);",
"private function tableIsEqual($table)\n {\n //check columns\n if ($this->getMissingCols($table)) {\n return false;\n }\n\n //check structure\n $table1 = $this->getTableStmt($this->conn1, $table);\n $table2 = $this->getTableStmt($this->conn2, $table);\n return $this->tblStmtHash($table1) == $this->tblStmtHash($table2);\n }",
"function checkAvailableProduct($prodNum )\n\t\t{\n\t\t\t$db = dbConnect::getInstance();\n \t\t $mysqli = $db->getConnection();\n\t\t\t$query = \" select * from products_tb where id= '\".$prodNum.\"' and status ='1' \"; \n $res = $mysqli->query($query) or die (mysqli_error($mysqli));\n\t\t\tif(mysqli_num_rows($res) > 0)\n\t\t\t{\n\t\t\t\treturn true;\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"public function update()\n\t{\n\t\t$sql_array = array();\n\t\tforeach ($this->object_config as $name => $config_array)\n\t\t{\n\t\t\t// No need to update the sql identifier\n\t\t\tif ($name == $this->sql_id_field)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$property_value = $this->validate_property($this->$name, $config_array);\n\n\t\t\t// Property value has not changed\n\t\t\t// Comparison with == is fine\n\t\t\tif (isset($this->sql_data[$name]) && $this->sql_data[$name] == $property_value)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$sql_array[$name] = $property_value;\n\t\t}\n\n\t\tif (empty($sql_array))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$sql = 'UPDATE ' . $this->sql_table . '\n\t\t\tSET ' . $this->db->sql_build_array('UPDATE', $sql_array) . '\n\t\t\tWHERE ' . $this->sql_id_field . ' = ' . $this->{$this->sql_id_field};\n\t\t$this->db->sql_query($sql);\n\n\t\t// Merge sql data back\n\t\t$this->sql_data = array_merge($this->sql_data, $sql_array);\n\n\t\tif ($this->db->sql_affectedrows())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function actualizar($obj) {\n\n $model = new DiaNoSubsidiado();\n $model = $obj;\n $query = \"\n UPDATE dias_nosubsidiados\n SET \n cantidad_dia = ?,\n cod_tipo_suspen_relacion_laboral = ?,\n fecha_inicio=?,\n fecha_fin=?\n WHERE id_dia_nosubsidiado = ?; \n \";\n\n $stm = $this->pdo->prepare($query);\n $stm->bindValue(1, $model->getCantidad_dia());\n $stm->bindValue(2, $model->getCod_tipo_suspen_relacion_laboral());\n $stm->bindValue(3, $model->getFecha_inicio());\n $stm->bindValue(4, $model->getFecha_fin());\n $stm->bindValue(5, $model->getId_dia_nosubsidiado());\n\n $stm->execute();\n //$lista = $stm->fetchAll();\n $stm = null;\n return true;\n }",
"public function equals($x);",
"public function equals(ValueObject $valueObjectToCompare): bool\n {\n return ($this->latitude() === $valueObjectToCompare->latitude());\n }",
"public function equals($other)\n\t{\n\t\tif($other instanceof self) {\n\t\t\treturn $this == $other;\n\t\t} elseif(is_array($other)) {\n\t\t\treturn $this->value == $other['val'] && $this->prefix == $other['pre'] && $this->postfix == $other['post'] && !$this->valueEncoded && $this->prefixEncoded && $this->postfixEncoded;\n\t\t} else {\n\t\t\treturn $this->prefix === null && $this->postfix === null && $this->value == $other && !$this->valueEncoded;\n\t\t}\n\t}",
"public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)\n {\n $keys = TblProdInfoTableMap::getFieldNames($keyType);\n\n if (array_key_exists($keys[0], $arr)) {\n $this->setProdId($arr[$keys[0]]);\n }\n if (array_key_exists($keys[1], $arr)) {\n $this->setProdPriceId($arr[$keys[1]]);\n }\n if (array_key_exists($keys[2], $arr)) {\n $this->setProdName($arr[$keys[2]]);\n }\n if (array_key_exists($keys[3], $arr)) {\n $this->setProdAlt1($arr[$keys[3]]);\n }\n if (array_key_exists($keys[4], $arr)) {\n $this->setProdAlt2($arr[$keys[4]]);\n }\n if (array_key_exists($keys[5], $arr)) {\n $this->setProdAlt3($arr[$keys[5]]);\n }\n if (array_key_exists($keys[6], $arr)) {\n $this->setProdAlt4($arr[$keys[6]]);\n }\n if (array_key_exists($keys[7], $arr)) {\n $this->setProdCode($arr[$keys[7]]);\n }\n if (array_key_exists($keys[8], $arr)) {\n $this->setProdCategory($arr[$keys[8]]);\n }\n if (array_key_exists($keys[9], $arr)) {\n $this->setProdCategoryShipping($arr[$keys[9]]);\n }\n if (array_key_exists($keys[10], $arr)) {\n $this->setProdWriteup($arr[$keys[10]]);\n }\n if (array_key_exists($keys[11], $arr)) {\n $this->setProdLength($arr[$keys[11]]);\n }\n if (array_key_exists($keys[12], $arr)) {\n $this->setProdWingspan($arr[$keys[12]]);\n }\n if (array_key_exists($keys[13], $arr)) {\n $this->setProdHeight($arr[$keys[13]]);\n }\n if (array_key_exists($keys[14], $arr)) {\n $this->setProdScale($arr[$keys[14]]);\n }\n if (array_key_exists($keys[15], $arr)) {\n $this->setProdLinks($arr[$keys[15]]);\n }\n if (array_key_exists($keys[16], $arr)) {\n $this->setProdLinkdescription($arr[$keys[16]]);\n }\n if (array_key_exists($keys[17], $arr)) {\n $this->setProdFront($arr[$keys[17]]);\n }\n if (array_key_exists($keys[18], $arr)) {\n $this->setProdKeywords($arr[$keys[18]]);\n }\n if (array_key_exists($keys[19], $arr)) {\n $this->setProdKeywordsWriteup($arr[$keys[19]]);\n }\n if (array_key_exists($keys[20], $arr)) {\n $this->setProdTitle($arr[$keys[20]]);\n }\n if (array_key_exists($keys[21], $arr)) {\n $this->setProdDescription($arr[$keys[21]]);\n }\n if (array_key_exists($keys[22], $arr)) {\n $this->setProdGeneral($arr[$keys[22]]);\n }\n if (array_key_exists($keys[23], $arr)) {\n $this->setProdEra($arr[$keys[23]]);\n }\n if (array_key_exists($keys[24], $arr)) {\n $this->setProdCompany($arr[$keys[24]]);\n }\n if (array_key_exists($keys[25], $arr)) {\n $this->setProdRelated($arr[$keys[25]]);\n }\n if (array_key_exists($keys[26], $arr)) {\n $this->setProdRelatedPa($arr[$keys[26]]);\n }\n if (array_key_exists($keys[27], $arr)) {\n $this->setProdRelatedM3($arr[$keys[27]]);\n }\n if (array_key_exists($keys[28], $arr)) {\n $this->setProdRelated2($arr[$keys[28]]);\n }\n if (array_key_exists($keys[29], $arr)) {\n $this->setProdSaveas($arr[$keys[29]]);\n }\n if (array_key_exists($keys[30], $arr)) {\n $this->setProdAircraftreg($arr[$keys[30]]);\n }\n if (array_key_exists($keys[31], $arr)) {\n $this->setMb($arr[$keys[31]]);\n }\n if (array_key_exists($keys[32], $arr)) {\n $this->setPa($arr[$keys[32]]);\n }\n if (array_key_exists($keys[33], $arr)) {\n $this->setM3($arr[$keys[33]]);\n }\n }",
"function hasModel(){ return (tep_not_null($this->productInfo['products_model'])); }"
] | [
"0.5974638",
"0.58890516",
"0.5838681",
"0.53373724",
"0.5244692",
"0.51087123",
"0.5049009",
"0.5047194",
"0.5045512",
"0.49910748",
"0.4970721",
"0.49246427",
"0.48588404",
"0.48126227",
"0.47819924",
"0.47780332",
"0.47546092",
"0.47462583",
"0.47450653",
"0.47381195",
"0.47367492",
"0.47226855",
"0.47083354",
"0.47041193",
"0.46848926",
"0.46848926",
"0.46824837",
"0.46745056",
"0.46713796",
"0.46549898",
"0.46445787",
"0.4640256",
"0.4591835",
"0.45821586",
"0.4576003",
"0.45635682",
"0.45547685",
"0.45425308",
"0.45395038",
"0.45389694",
"0.45224783",
"0.44885486",
"0.44791046",
"0.44764557",
"0.44747248",
"0.44716278",
"0.44678062",
"0.4461616",
"0.44491196",
"0.4427252",
"0.44228977",
"0.4411044",
"0.4407475",
"0.44014075",
"0.43891707",
"0.4387976",
"0.43813396",
"0.43751186",
"0.4364889",
"0.43472147",
"0.4346991",
"0.43390098",
"0.43339592",
"0.43315634",
"0.43185",
"0.43172038",
"0.43165213",
"0.43009505",
"0.4296799",
"0.42951766",
"0.42943326",
"0.42778552",
"0.42762798",
"0.42761093",
"0.42739335",
"0.42596722",
"0.4255523",
"0.4254368",
"0.42433745",
"0.42416036",
"0.42412475",
"0.42382315",
"0.42209092",
"0.42106292",
"0.42046744",
"0.41989425",
"0.4194409",
"0.4194179",
"0.4176816"
] | 0.56141466 | 13 |
Get the associative array of the virtual columns in this object | public function getVirtualColumns()
{
return $this->virtualColumns;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function toArray()\n\t{\n\t\t$columns = array();\n\t\t\n\t\t$rf = new ReflectionClass($this);\n\t\t$props = $rf->getProperties();\n\t\tforeach ($props as $prop)\n\t\t{\n\t\t\t$column = AttributeReader::PropertyAttributes($this,$prop->getName())->Column;\n\t\t\tif ($column != \"\")\n\t\t\t\t$columns[$column] = $prop->getValue($this);\n\t\t}\n\n\t\treturn $columns;\n\t}",
"public function toArray()\n {\n return collect($this->columns)->toArray();\n }",
"public function getColumns()\n {\n // code...\n return $this->__COLUMNS__ ?? [];\n }",
"public function columns()\n {\n return $this->get('columns', []);\n }",
"public function toArray()\n {\n $fields = array(); \n foreach ($GLOBALS['InfusionsoftApp']->fields[$this->_table] as $field)\n {\n $fields[$field] = $this->$field;\n } \n return $fields;\n }",
"public function toArray() {\n\t\treturn $this->tblAttributes;\n\t}",
"public function getTableColumns() { return $this->table->getColumns(); }",
"public function getColumns(): array\n {\n return $this->columns;\n }",
"public function getColumns(): array\n {\n return $this->columns;\n }",
"public function getColumns()\n {\n if (! is_null($this->columns)) {\n return collect($this->columns);\n }\n\n return $this->columns = collect($this->rows->first())\n ->except(['created_at', 'updated_at', 'deleted_at', 'id'])\n ->keys();\n }",
"public function get_columns() {\n\n\t\treturn array(\n\t\t\t'id' \t\t => '%d',\n\t\t\t'name' \t\t => '%s',\n\t\t\t'date_created' \t=> '%s',\n\t\t\t'date_modified' => '%s',\n\t\t\t'status'\t\t=> '%s',\n\t\t\t'ical_hash'\t\t=> '%s'\n\t\t);\n\n\t}",
"public function getColumns()\n\t{\n\t\treturn $this->properties;\n\t}",
"public function getColumns() {\n\t\treturn( $this->getTable()->getColumns() );\n\t}",
"public function attributes()\r\n {\r\n return array_keys($this->getDb()->getTableSchema($this->layoutName())->columns);\r\n }",
"public function table_attributes() {\n return static::find_by_sql(\"SHOW COLUMNS FROM \".static::$table_name);\n }",
"protected function attributes(): array\n {\n try {\n $attributes = [];\n $i = 0;\n foreach (static::$db_columns as $column) {\n $attributes[$column] = $this->$column;\n $i++;\n }\n return $attributes;\n } catch (Exception $e) {\n die(\"Error \" . $e);\n }\n }",
"protected function getAllColumns(){\n\t\t\treturn array_merge($this->columns, $this->keys);\n\t\t}",
"public function get_columns() {\n\t\treturn array(\n\t\t\t'id' => '%d',\n\t\t\t'user_id' => '%d',\n\t\t\t'username' => '%s',\n\t\t\t'name' => '%s',\n\t\t\t'email' => '%s',\n\t\t\t'product_count' => '%d',\n\t\t\t'sales_count'\t => '%d',\n\t\t\t'sales_value'\t => '%f',\n\t\t\t'status'\t\t => '%s',\n\t\t\t'notes' => '%s',\n\t\t\t'date_created' => '%s',\n\t\t);\n\t}",
"public function getColumnProperties()\n {\n return $this->columnProperties;\n }",
"public function getColumns(): array;",
"public function Columns()\n {\n return $this->columns;\n }",
"public function toArray()\n {\n return array(\n 'id' => $this->_id,\n 'name' => $this->_name,\n 'language' => $this->_language,\n 'columnOption' => $this->_columnOption,\n 'specificColumns' => $this->_specificColumns\n );\n }",
"function getColumns() {return $this->_columns;}",
"public static function columns()\n {\n if (Deal::first() ?? false) {\n return array_diff(array_keys(Deal::first()->attributesToArray()), Deal::first()->exclude); \n } else {\n return array();\n }\n }",
"protected function getColumnsAttribute()\n {\n return $this->fetchData[self::COLUMNS];\n }",
"public function getColumns() {\n\t\t$spec = self::$specs[$this->id];\n\t\treturn array_value($spec, \"columns\", []);\n\t}",
"protected function attributes() {\n\t $attributes = array();\n\t foreach(static::$table_fields as $field) {\n\t if(property_exists( $this, $field)) {\n\t $attributes[$field] = $this->$field;\n\t }\n\t }\n\t return $attributes;\n }",
"public function toArray(): array {\n\n $data = array();\n $mappings = array_merge($this->mappings, self::$defaultMappings);\n\n foreach ($mappings as $dbColumn => $propertyName) {\n $method = $propertyName;\n $data[$dbColumn] = $this->$method() ?? null;\n }\n return $data;\n }",
"public function get_columns_information() {\n return $this->columns_information;\n }",
"public function toJSON()\n\t{\n\t\t$columns = array();\n\t\t\n\t\t$rf = new ReflectionClass($this);\n\t\t$props = $rf->getProperties();\n\t\tforeach ($props as $prop)\n\t\t{\n\t\t\t$column = AttributeReader::PropertyAttributes($this,$prop->getName())->Column;\n\t\t\t$columns[$column] = $prop->getValue($this);\n\t\t}\n\n\t\treturn json_encode($columns);\n\t}",
"public static function getColumns()\n {\n return array();\n }",
"public function getColumns() {\n return $this->aColumns;\n }",
"public function columns()\n\t{\n\t\treturn $this->columns;\n\t}",
"public function columns()\n\t{\n\t\treturn $this->columns;\n\t}",
"public function getColumns()\n {\n return $this->columns;\n }",
"public function getColumns()\n {\n return $this->columns;\n }",
"public function getColumns()\n {\n return $this->columns;\n }",
"public function getColumns()\n {\n return $this->columns;\n }",
"public function getColumns()\n {\n return $this->columns;\n }",
"public function getColumns()\n {\n return $this->columns;\n }",
"public function getColumns()\n {\n return $this->columns;\n }",
"public function getColumns()\n {\n return $this->columns;\n }",
"public function getColumns()\n {\n return $this->columns;\n }",
"public function getColumns()\n {\n return $this->columns;\n }",
"public function getColumns()\n {\n return $this->columns;\n }",
"private function getColumns() : array\r\n {\r\n return [\r\n self::column('id'),\r\n self::column('type_id'),\r\n self::column('region_id'),\r\n self::column('district_id'),\r\n self::column('phone'),\r\n self::column('fax'),\r\n self::column('zip'),\r\n self::column('rate'),\r\n self::column('discount'),\r\n self::column('website'),\r\n self::column('email'),\r\n self::column('active'),\r\n self::column('closed'),\r\n self::column('legal_address'),\r\n self::column('legal_name'),\r\n self::column('lat'),\r\n self::column('lng'),\r\n self::column('lng'),\r\n self::column('city_tax_include'),\r\n self::column('contact_full_name'),\r\n self::column('contact_position'),\r\n self::column('contact_email'),\r\n self::column('contact_first_phone'),\r\n self::column('contact_second_phone'),\r\n self::column('checkin_from'),\r\n self::column('checkin_to'),\r\n self::column('checkout_from'),\r\n self::column('checkout_to'),\r\n self::column('payment_time'),\r\n self::column('breakfast'),\r\n self::column('has_restaurant'),\r\n self::column('restaurant_opening'),\r\n self::column('restaurant_closing'),\r\n self::column('center_distance'),\r\n self::column('penality_enabled'),\r\n self::column('penality_not_taken_after'),\r\n self::column('penality_not_later_arrival'),\r\n self::column('penality_cancelation_item'),\r\n self::column('penality_cancelation_type'),\r\n self::column('penality_percentage'),\r\n self::column('penality_percentage_type'),\r\n self::column('card_required'),\r\n HotelTranslationMapper::column('lang_id'),\r\n HotelTranslationMapper::column('name'),\r\n HotelTranslationMapper::column('address'),\r\n HotelTranslationMapper::column('description')\r\n ];\r\n }",
"public function getColumns() {\n return $this->columns;\n }",
"public function getCol() : array\n\t{\n\t\treturn $this->fetchAllFromColumn();\n\t}",
"public function getColumns()\n {\n return $this->_columns;\n }",
"public function getFields() {\n $columns = $this->schema();\n if (empty($columns)) {\n trigger_error(__d('cake_dev', '(Model::getColumnTypes) Unable to build model field data. If you are using a model without a database table, try implementing schema()'), E_USER_WARNING);\n }\n\n $results = array();\n foreach ($columns as $key => $col) {\n $results[] = $key;\n }\n unset($columns);\n return $results;\n }",
"public function arrGetViewColumns() {\n if(is_array($this->_arrViewColumns)) return $this->_arrViewColumns;\n $this->XaoThrow(\n \"_EntBase->arrGetViewColumns(): A valid list of columns has not\" .\n \" been supplied using _EntBase->SetViewColumns().\"\n );\n }",
"public static function getColumns(): array {\n return ['invoice_id', 'appointment_id', 'create_time', 'update_time', 'state', 'tax_rate',\n 'amount_due', 'amount_payed', 'discount_rate'];\n }",
"protected function properties()\n {\n // return get_object_vars($this);\n\n $properties = array();\n foreach (self::$db_table_fields as $db_field) {\n if (property_exists($this, $db_field)) {\n $properties[$db_field] = $this->$db_field;\n }\n }\n\n return $properties;\n }",
"protected function properties()\n {\n // return get_object_vars($this);\n\n $properties = array();\n foreach (self::$db_table_fields as $db_field) {\n if (property_exists($this, $db_field)) {\n $properties[$db_field] = $this->$db_field;\n }\n }\n\n return $properties;\n }",
"public static function getColumns()\n {\n return array('libraryId', 'signature', 'summary', 'status', 'userId');\n }",
"public function getAccessibleColumn(){\n return [\n 'name'=>'Name',\n 'price'=>'Price',\n 'updated_price_at'=>'Updated Price At',\n 'copy_number'=>'Quantity',\n // 'view'=>'View',\n 'categoryName'=>'Category',\n\n 'columnCount' => '',\n // 'brands' => 'Brands',\n\n // 'imageCount'=>'Images',\n // 'commentCount'=>'Comment',\n // 'upVoteCount'=> 'Up Vote',\n // 'downVoteCount'=> 'Down Vote'\n // 'category_id'=>'Category',\n ];\n }",
"public function getTableColumns(){\n\n $show_columns_statement = $this->grammer->compileShowColumns($this);\n return $this->connection->getTableColumns($show_columns_statement);\n\n }",
"function asArray() {\n\t\t\n\t\t\t$myArray = array();\n\t\t\t\n\t\t\tforeach (get_object_vars($this) as $column => $value) {\n\t\t\t\tif (substr($column, 0, 1) != '_') {\n\t\t\t\t\t$myArray[$column] = $value;\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturn $myArray;\n\t\t\t\n\t\t}",
"public function getColumns()\n\t{\n\t\t\n $result = $this->fetchingData(array(\n 'query' => \"SHOW FULL COLUMNS FROM `$this->table`\"\n ));\n\n return $result;\n\t}",
"public function column(): array\n {\n if ($this->shouldEmulateExecution()) {\n return [];\n }\n\n /** TODO add support for orderBy */\n return $this->executeScript('Column', $this->attribute);\n }",
"public function getTableColumns() {\n return $this->getConnection()->getSchemaBuilder()->getColumnListing($this->getTable());\n }",
"public function getColumns() {\n\t\treturn $this->columns;\n\t}",
"function &columns() {\n // return by reference\n //ts('Contact Id') => 'contact_id',\n $columns = array(\n ts('Name') => 'sort_name',\n ts('Job Title') => 'job_title',\n ts('media') => 'current_employer',\n );\n return $columns;\n }",
"public function getColumnsList(){\n return $this->_get(3);\n }",
"public function getColumns() {\n $columns = array();\n foreach($this->mapping as $key => $value) {\n array_push($columns, $value);\n }\n return $columns;\n }",
"public function columns()\n {\n $this->addColumn();\n return $this->columns;\n }",
"protected function getColumns(): array\n {\n if (is_null(self::$_columns)) {\n self::$_columns = parent::addColumns();\n }\n return self::$_columns;\n }",
"public function render(): array\n {\n return array_merge($this->attributes, [\n 'cols' => $this->table->toArray()\n ]);\n }",
"public function attributes()\n {\n $attributes = array();\n foreach(self::$db_fields as $field)\n {\n if(property_exists($this,$field))\n {\n $attributes[$field] = $this->$field;\n }\n }\n return $attributes;\n }",
"public function getColumns()\n\t{\n\t\treturn $this->columns;\n\t}",
"public function getColumns()\n\t{\n\t\treturn $this->columns;\n\t}",
"private function getColumns() : array\n {\n return [\n self::column('id'),\n self::column('order'),\n RoomCategoryTranslationMapper::column('lang_id'),\n RoomCategoryTranslationMapper::column('name'),\n ];\n }",
"public function getColumns(){\n $rows = array();\n return $rows; \n }",
"public function __debugInfo()\n {\n $properties = $this->_properties;\n foreach ($this->_virtual as $field) {\n $properties[$field] = $this->$field;\n }\n\n return $properties;\n }",
"public static function availableColumns()\n {\n return static::availableColumnData()->pluck('value');\n }",
"public function getDataAllColumns() : array{\n\n $columns = [];\n foreach ($this->configs->fields as $k => $value) {\n $columns[$k] = array_column($this->model->getValuesColumn($value),$value);\n }\n return $columns;\n }",
"public function getSavLibraryMvcColumns(): array\n {\n return $this->savLibraryMvcColumns;\n }",
"abstract protected function getColumns(): array;",
"public function getFields() : array\n {\n return get_object_vars($this);\n }",
"public function columnMap()\n {\n return [\n 'id' => 'id',\n 'level' => 'level',\n 'name' => 'name',\n 'sort' => 'sort',\n 'type' => 'type',\n 'value' => 'value',\n 'token' => 'token',\n 'pid' => 'pid'\n ];\n }",
"public function getColumns()\n {\n return $this->select_list;\n }",
"public function get_columns() {\n\n $instance = Envira_Gallery_Common::get_instance();\n return $instance->get_columns();\n\n }",
"protected function getColumns() {\n $driver = $this->connection->getAttribute(\\PDO::ATTR_DRIVER_NAME);\n\n // Calculate the driver class. Why don't they do this for us?\n $class = '\\\\Aura\\\\SqlSchema\\\\' . ucfirst($driver) . 'Schema';\n $schema = new $class($this->connection, new ColumnFactory());\n return array_keys($schema->fetchTableCols($this->table));\n }",
"protected function addVirtualColumns()\n {\n \n }",
"public function getFields() {\n $fields = $this->_fields;\n\n if ($this->getJoins() && !$fields && $this->getType() === self::SELECT) {\n return array_keys($this->getRepository()->getSchema()->getColumns());\n }\n\n return $fields;\n }",
"public function getFieldColumns()\n {\n $options = [];\n foreach ($this->fields as $field) {\n $type = 'text';\n $options[$this->getEntityTypeCode()][] = [\n 'field' => $field,\n 'type' => $type,\n 'select' => []\n ];\n }\n return $options;\n }",
"public function get()\n {\n $joins = $this->build_relationship();\n\n return array('columns' => implode(',', $this->columns),\n 'joins' => $joins );\n }",
"public function getTableColumns()\n {\n $tableColumns = $this->getConnection()->getSchemaBuilder()->getColumnListing($this->getTable());\n return $tableColumns;\n }",
"private function getFieldsOnTable()\n{\n\n $returnArray=array(); \n foreach ($this->tableStructure as $ind => $fieldArray) { \n $returnArray[$fieldArray['columnName']]=$fieldArray['columnName'];\n }\n \n return $returnArray; \n}"
] | [
"0.76158535",
"0.7158348",
"0.70720017",
"0.69968843",
"0.6985094",
"0.6938954",
"0.69297487",
"0.6901429",
"0.6901429",
"0.6895026",
"0.683313",
"0.6832541",
"0.67884564",
"0.67727613",
"0.6764035",
"0.6741913",
"0.6737029",
"0.67210835",
"0.671678",
"0.67081195",
"0.669189",
"0.6686751",
"0.66631263",
"0.6659377",
"0.6634233",
"0.663",
"0.6623042",
"0.6623015",
"0.6586502",
"0.65810263",
"0.6580494",
"0.65798736",
"0.65798134",
"0.65798134",
"0.6579592",
"0.6579592",
"0.6579592",
"0.6579592",
"0.6579592",
"0.6579592",
"0.6579592",
"0.6579592",
"0.6579592",
"0.6579592",
"0.6579592",
"0.6575402",
"0.6571967",
"0.6560487",
"0.65579724",
"0.6536247",
"0.6534311",
"0.65101165",
"0.65032214",
"0.65032214",
"0.6497843",
"0.6491099",
"0.64852256",
"0.64814824",
"0.647079",
"0.64674646",
"0.64662504",
"0.6463747",
"0.64570844",
"0.6444771",
"0.64435554",
"0.64281905",
"0.64225423",
"0.64146245",
"0.6397123",
"0.6391929",
"0.6391929",
"0.63862383",
"0.6384632",
"0.63792723",
"0.6371894",
"0.63698626",
"0.63663334",
"0.63649625",
"0.63618183",
"0.63612384",
"0.63584465",
"0.6356076",
"0.63529694",
"0.63469297",
"0.63412035",
"0.6334445",
"0.6324438",
"0.62954885",
"0.62940586"
] | 0.83912134 | 10 |
Checks the existence of a virtual column in this object | public function hasVirtualColumn($name)
{
return array_key_exists($name, $this->virtualColumns);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function columnExists(Property $property);",
"public function hasColumn($columnName)\r\n {\r\n }",
"public function hasColumn($name);",
"public function exists()\n {\n return ! is_null($this->first([Grammar::VIRTUAL_META_ID_COLUMN]));\n }",
"function has_column($column_name)\n {\n if (empty($this->object->_table_columns)) {\n $this->object->lookup_columns();\n }\n return array_search($column_name, $this->object->_table_columns) !== FALSE;\n }",
"private function has_column($column)\n {\n $object_vars = get_object_vars($this);\n\n //check if the key exists\n return array_key_exists($column, $object_vars);\n }",
"public function columnExists( $tablename, $columnname );",
"public function columnExists($columnName)\n {\n return $this->getChildren()->controlExists($columnName, 'ContainerModelBase');\n }",
"public function hasColumn($tableName, $columnName);",
"public function __isset($columnName)\n {\n return array_key_exists($columnName, $this->data);\n }",
"function mf_mysql_column_exist($table_name, $column_name,$dbh) {\r\n\r\n\t\t$query = \"SHOW COLUMNS FROM $table_name LIKE '$column_name'\";\r\n\t\t$sth = mf_do_query($query,array(),$dbh);\r\n\t\t$row = mf_do_fetch_result($sth);\r\n\t\t\r\n\t\tif(!empty($row)){\r\n\t\t\treturn true;\t\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public function __isset($property_name)\n\t{\n\t\tif (in_array($property_name, $this->getModel()->getColumns()))\n\t\t{\n\t\t\treturn $this->getModel()->$property_name != NULL;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn parent::__isset($property_name);\n\t\t}\n\t}",
"public function hasColumns(){\n return $this->_has(3);\n }",
"public function has(string $col) : bool;",
"public function hasProperty($column)\n\t{\t\n\t\tif(!$this->columns->isKey($column))\n\t\t\tthrow new NoColumnInTableException($column, $this->table_name());\n\t\treturn true;\n\t}",
"public function HasVirtualAttribute($strName) {\n\t\t\t$strName = QQ::GetVirtualAlias($strName);\n\t\t\tif (array_key_exists($strName, $this->__strVirtualAttributeArray)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"public function HasVirtualAttribute($strName) {\n\t\t\t$strName = QQ::GetVirtualAlias($strName);\n\t\t\tif (array_key_exists($strName, $this->__strVirtualAttributeArray)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"public function checkColumnExists($fieldKey)\n {\n\n if(in_array($fieldKey, $this->_tableFields)) {\n return true;\n }\n return false;\n }",
"function issetTableColumn($table_name, $column_name)\n{\n global $wpdb;\n $columns = $wpdb->get_results(\"SHOW COLUMNS FROM \" . $table_name, ARRAY_A);\n foreach ($columns as $column) {\n if ($column['Field'] == $column_name) {\n return true;\n }\n }\n}",
"function columnExists($tableName, $columnName) {\n\t\t$siteDao =& DAORegistry::getDAO('SiteDAO');\n\t\t$dict = NewDataDictionary($siteDao->getDataSource());\n\n\t\t// Make sure the table exists\n\t\t$tables = $dict->MetaTables('TABLES', false);\n\t\tif (!in_array($tableName, $tables)) return false;\n\n\t\t// Check to see whether it contains the specified column.\n\t\t// Oddly, MetaColumnNames doesn't appear to be available.\n\t\t$columns = $dict->MetaColumns($tableName);\n\t\tforeach ($columns as $column) {\n\t\t\tif ($column->name == $columnName) return true;\n\t\t}\n\t\treturn false;\n\t}",
"public function hasColumn($column)\n {\n $table = $this->container->make($this->getModelName())->getTable();\n\n if (!isset($this->db_columns[$table])) {\n $this->db_columns[$table] = \\Schema::getColumnListing($table);\n }\n return in_array($column, $this->db_columns[$table]);\n }",
"public function hasColumn($column) {\n\t\t$returnValue = FALSE;\n\t\tif (array_key_exists($column, $this->_allowedColumns)) {\n\t\t\t$returnValue = TRUE;\n\t\t}\n\n\t\treturn $returnValue;\n\t}",
"public function hasColumn($name) {\n $info = $this->_data->getDeepValue('columns/' . $name);\n return !empty($info);\n }",
"function column_exists($column, $table)\n {\n $exists = false;\n $this->container->db->setQuery(\"SHOW columns FROM `{$table}`\");\n $columns = $this->contaner->db->loadAssocList();\n\n if (is_array($columns)) while (list ($key, $val) = each($columns)) {\n if ($val['Field'] == $column) {\n $exists = true;\n break;\n }\n }\n\n return $exists;\n }",
"public function columnExists($column)\n {\n return isset($this->columns[$column]);\n }",
"function f_fieldExists($link, $table, $column, $column_attr = \"VARCHAR( 255 ) NULL\") {\r\n $exists = false;\r\n $columns = mysqli_query($link, \"SHOW COLUMNS FROM $table LIKE '\".$column.\"'\");\r\n //ferror_log(\"SQL: $sql \". \"returns \". $num_rows . \" rows.\");\r\n $exists = ( mysqli_num_rows($columns) )?TRUE:FALSE;\r\n if (!$exists) {\r\n ferror_log(\"ALTER TABLE `$table` ADD `$column` $column_attr\");\r\n if (mysqli_query($link, \"ALTER TABLE `$table` ADD `$column` $column_attr\")) {\r\n return TRUE;\r\n }\r\n } else {\r\n return TRUE;\r\n }\r\n return FALSE;\r\n}",
"function diy_check_table_columns($table_name, $field_name, $db_connection = 'mysql') {\n\t\t$connection = DB::connection($db_connection);\n\t\treturn $connection->getSchemaBuilder()->hasColumn($table_name, $field_name);\n\t}",
"function field_exists($field) {\n\t\tif (method_exists($this, 'set_'.$field)) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ($this->columns && key_exists($field, $this->columns)) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif(isset($this->associations[$field])) {\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"private function isHasEntity($property){\n\t\tif(isset($this->columns[$property]) && \n\t\t(is_object($this->columns[$property]) OR is_array($this->columns[$property])) ){\n\t\t\treturn true;\t\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}",
"function verify_column( $column, $table, $db = null ) {\n\n\t\t$columns = $this->get_columns( $table, $db );\n\t\treturn in_array( $column, $columns );\n\n\t}",
"protected function addVirtualColumns()\n {\n \n }",
"public function is_virtual() {\n\t\treturn true;\n\t}",
"public function is_virtual() {\n\t\treturn true;\n\t}",
"public function is_virtual() {\n\t\treturn true;\n\t}",
"public function hasField();",
"public function fieldExists($field) {\n\t\tif (strstr($field, \".\")) {\n\t\t\t// use the path to get to the data poing\n\t\t\t$fieldParts = explode(\".\", $field);\n\t\t\t$key = array_pop($fieldParts);\n\t\t\t\n\t\t\t// add the field parts to the entityPath to get the correct model\n\t\t\tEntity::_setEntityPath($fieldParts);\n\t\t} else {\n\t\t\t$key = $field;\n\t\t\t$fieldParts = array();\n\t\t}\n\t\t\n\t\t$model = Entity::currentPathClass();\n\t\t\n\t\tEntity::_revertEntityPath(count($fieldParts));\n\t\t\n\t\tApp::uses($model, \"Model\");\n\n\t\t// if field is not defined in db, and it's not a defined html helper func, then just print whatever it is\n\t\t$types = $this->entityFields($model);\n\t\t\n\t\tif (@$types[$key] == \"virtual\") {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tif (isset($types[$key]))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t}",
"public function __isset($_name) {\n\t\treturn array_key_exists(\n\t\t\t$_name,array_merge($this->fields,$this->virtual)\n\t\t);\n\t}",
"public function column_exists($table_name, $column, $dbname = null)\n {\n $columns = $this->columns($table_name, $dbname);\n return sizeof(array_intersect($columns, (array) $column)) === sizeof((array) $column);\n }",
"protected function checkColumnExists($column) {\n\t\tif (array_key_exists($column, $this->columns)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function hasColumn(string $id): bool\r\n {\r\n return array_key_exists($id, $this->columns);\r\n }",
"public function hasProperty($field);",
"static public function hasColumn($table, $column)\n {\n return self::call(__FUNCTION__ , func_get_args());\n }",
"public function hasPreviewColumn($id);",
"public function has($_field);",
"public function isdef($_name) {\n\t\treturn array_key_exists($_name,$this->virtual);\n\t}",
"public function hasColumnNumber(){\n return $this->_has(5);\n }",
"public function isVirtual()\n {\n return $this->getIsVirtual();\n }",
"private function checkColumn($columnName,\n $table = TABLE_ORDERS_SHOPGATE_ORDER\n ) {\n $result = xtc_db_query(\"show columns from `{$table}`\");\n\n $exists = false;\n while ($field = xtc_db_fetch_array($result)) {\n if ($field['Field'] == $columnName) {\n $exists = true;\n break;\n }\n }\n\n return !$exists;\n }",
"public function __isset($name)\n {\n return in_array($name, $this->columns);\n }",
"public function hasPrimaryKeyColumns(){\n return $this->_has(4);\n }",
"public function isFieldPresentByColumnTable($columnName, $tableName)\n\t{\n\t\tif (!isset($this->_fieldby_tblcol_cache[$tableName])) {\n\t\t\t$rows = (new App\\Db\\Query())->select(['columnname'])->from('vtiger_field')->where(['tablename' => $tableName, 'presence' => [0, 2]])->column();\n\t\t\tif ($rows) {\n\t\t\t\t$this->_fieldby_tblcol_cache[$tableName] = $rows;\n\t\t\t}\n\t\t}\n\t\t// If still the field was not found (might be disabled or deleted?)\n\t\tif (!isset($this->_fieldby_tblcol_cache[$tableName])) {\n\t\t\treturn false;\n\t\t}\n\t\treturn in_array($columnName, $this->_fieldby_tblcol_cache[$tableName]);\n\t}",
"public function columnExists($table, $column)\n {\n return $this->query($table);\n }",
"public function isColumn($key)\n {\n return in_array(strtolower($key), $this->columns());\n }",
"public function getIsVirtual();",
"public function hasField(){\n return $this->_has(2);\n }",
"public function isVirtual(): bool;",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function hasField() {\n return $this->_has(1);\n }",
"public function hasField() {\n return $this->_has(1);\n }",
"public function hasField() {\n return $this->_has(1);\n }",
"private function columnExists($column_name, $table_columns) {\r\n foreach ($table_columns as $column) {\r\n if($column_name == $column[\"Field\"]) return true;\r\n }\r\n return false;\r\n }",
"abstract protected function propertyExists($name);",
"public static function isValidColumn($model, $column)\n {\n // check if the model exists\n try\n {\n $table = Doctrine::getTable($model);\n }\n catch (Exception $e)\n {\n return false;\n }\n \n // Do we have relations in the column name?\n if (ullGeneratorTools::hasRelations($column))\n {\n $relations = UllGeneratorTools::relationStringToArray($column);\n $nativeColumn = array_pop($relations);\n $finalModel = UllGeneratorTools::getFinalModelFromRelations($model, $relations);\n \n return self::isValidColumn($finalModel, $nativeColumn);\n }\n \n // For native columns (without relations)\n else\n {\n if ($table->hasColumn($column))\n {\n return true;\n }\n \n if ($table->hasRelation('Translation'))\n {\n $finalModel = UllGeneratorTools::getFinalModelFromRelations($model, 'Translation');\n return self::isValidColumn($finalModel, $column);\n }\n }\n \n return false;\n }",
"public function isToIgnoreColumn(): bool\n {\n if ($this->entity->code['name'] === 'deleted_at') {\n return true;\n }\n\n\n if (ArraySearcher::arraySearchByAttribute(\n $this->entity->code['name'],\n $this->parentEntity->system->relations,\n 'morph_type'\n )\n ) {\n return true;\n }\n return false;\n }",
"public function hasField($fieldName) {\n\t\t// @todo naive implementation, improve me according to the needs. Check if info is not yet in cache.\n\t\treturn isset($this->tca['columns'][$fieldName]) || in_array($fieldName, array('uid'));\n\t}",
"public function __isset($property) {\r\n return (array_key_exists($property, $this->relationships) || $this->orm->__isset($property) || method_exists($this, $method = 'get_'.$property) || method_exists($this, $method = 'missing_'.$property));\r\n }",
"private function columnExistsInTable($columnName, $columnsFromDatabase) {\n foreach ($columnsFromDatabase as $colFromDb) {\n if ($columnName === $colFromDb->Field) {\n return true;\n }\n }\n //if we got to here, the column is NOT in the db\n return false;\n }",
"protected function hasColumn($name)\n\t{\n\t\t$columns = $this->getAllColumnsNames();\n\n\t\treturn in_array($name, $columns);\n\t}",
"public function hasAttribute($key);",
"protected function hasHook($column)\n {\n // If developer provided column prefixed with table name we will\n // not even try to map the column, since obviously the value\n // refers to the actual column name on the queried table.\n return is_string($column) && strpos($column, '.') === false;\n }",
"public function has(array $data, $column)\n {\n if (strpos($column, '.')) {\n list($model, $column) = explode('.', $column);\n return isset($data[$model][$column]) || isset($data[\"{$model}.{$column}\"]);\n }\n return isset($data[$this->model->alias][$column]) || isset($data[\"{$this->model->alias}.{$column}\"]) || isset($data[$column]);\n }",
"public function __isset($property) {}",
"protected function checkInModal($column){\n\n if($this->model->where($column, '=',$this->token)->exists()){\n return true;\n }\n return false;\n }",
"public function columnExists($name, $in_database = true)\n\t{\n\t\t$name = (string)$name;\n\n\t\tif ( $in_database ) {\n\t\t\treturn $this->createColumnReflection($name, array())->exists();\n\t\t}\n\n\t\treturn isset($this->columns[$name]);\n\t}",
"public function hasSql(){\n return $this->_has(1);\n }",
"public function has($property);",
"public function hasColumn($column)\n {\n $parameters = [];\n $parameters['handler'] = 'aql';\n $parameters['explanation'] = \"Checking if any document within the table has the '\"\n .implode(', ', (array) $column)\n .\"' column(s).\";\n $parameters['column'] = $column;\n\n return $this->addCommand('hasAttribute', $parameters);\n }",
"public function has_prop($key)\n {\n }"
] | [
"0.72912693",
"0.7069401",
"0.6898071",
"0.68416446",
"0.6824293",
"0.676904",
"0.6740452",
"0.6668266",
"0.6536544",
"0.65023524",
"0.64584386",
"0.6379843",
"0.63561594",
"0.6336987",
"0.6330798",
"0.63250196",
"0.63250196",
"0.6201744",
"0.61848426",
"0.61798006",
"0.61741006",
"0.61291754",
"0.61086684",
"0.60637397",
"0.6058779",
"0.602887",
"0.60153776",
"0.60081005",
"0.6003648",
"0.5972402",
"0.596963",
"0.594531",
"0.594531",
"0.594531",
"0.5919044",
"0.59051317",
"0.5899969",
"0.5898114",
"0.5894407",
"0.5884784",
"0.5883972",
"0.5881712",
"0.5852293",
"0.58389515",
"0.58369434",
"0.58340544",
"0.578755",
"0.5785726",
"0.5783269",
"0.5779697",
"0.57686275",
"0.5745558",
"0.5744543",
"0.57407725",
"0.5740318",
"0.5735876",
"0.57063085",
"0.57063085",
"0.57063085",
"0.57063085",
"0.57063085",
"0.57063085",
"0.57063085",
"0.57063085",
"0.57063085",
"0.57063085",
"0.57063085",
"0.57063085",
"0.5702689",
"0.5702689",
"0.5702689",
"0.5700877",
"0.5694787",
"0.5688931",
"0.5676155",
"0.56673384",
"0.5666378",
"0.56435",
"0.5628446",
"0.5602254",
"0.5589741",
"0.5580236",
"0.55762875",
"0.55584776",
"0.5554718",
"0.55525947",
"0.55521816",
"0.5551156",
"0.554585"
] | 0.75793344 | 10 |
Get the value of a virtual column in this object | public function getVirtualColumn($name)
{
if (!$this->hasVirtualColumn($name)) {
throw new PropelException(sprintf('Cannot get value of inexistent virtual column %s.', $name));
}
return $this->virtualColumns[$name];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getModelValue()\n {\n if (! is_callable($callback = $this->getCallback())) {\n throw new Exception('Invalid custom column callback');\n }\n\n return call_user_func($callback, $this->getModel());\n }",
"protected function get_column() {\n\n\t\t$column = $this->foreign_column ?: $this->foreign_table->get_primary_key();\n\t\t$columns = $this->foreign_table->get_columns();\n\n\t\treturn $columns[ $column ];\n\t}",
"public function toValue() {\r\n\t\treturn $this->PDOStatement->fetchColumn();\r\n\t}",
"public function getColumn() { return $this->column; }",
"function getValueFromField()\r\n\t{\r\n\t\treturn $this->row[ key( $this->mapping ) ];\r\n\t}",
"public function value($column)\r\n {\r\n $rs = (array) $this->first();\r\n return $rs[$column];\r\n }",
"function GetColVal($col_name) {\n\t\treturn $this->$col_name;\n\t}",
"public function getColumn()\n {\n return $this->get('Column');\n }",
"function getValueFromField()\n {\n return $this->current_row[ key( $this->mapping ) ];\n }",
"public function modelColumn();",
"public function getData()\n\t{\n\t\t$column = self::COL_DATA;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (string)$v;\n\t\t}\n\n\t\treturn $v;\n\t}",
"public function getData()\n\t{\n\t\t$column = self::COL_DATA;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (string)$v;\n\t\t}\n\n\t\treturn $v;\n\t}",
"public function getDataColumn()\n {\n return $this->dataColumn;\n }",
"public function getColumn()\n {\n return $this->column;\n }",
"public function getColumn()\n {\n return $this->column;\n }",
"public function getColumn(): string\n {\n return $this->_column;\n }",
"protected function value()\n {\n return $this->row($this->row);\n }",
"public function getColumn(): string\n {\n return $this->column;\n }",
"public function getViaTableAttributesValue();",
"public function toValue(): string\n {\n return (string) $this->pdoStatement->fetchColumn();\n }",
"public function getValue( $key ) {\n\t\treturn $this->columnSchema[ $key ];\n\t}",
"public function get_value() {\n\t\t$row = $this->get_row();\n\t\tif ($row) {\n\t\t\treturn current($row);\n\t\t}\n\t}",
"public function getValue ()\n {\n if ($this->isNullValue())\n {\n return null;\n }\n\n if (!isset($this->column_value))\n {\n $this->column_value = new PulseUser($this->jsonResponse[\"value\"][\"id\"]);\n }\n\n return $this->column_value;\n }",
"public function getColumnValueRaw($record, $column)\n {\n $columnName = $column->columnName;\n\n /*\n * Handle taking value from model relation.\n */\n if ($column->valueFrom && $column->relation) {\n $columnName = $column->relation;\n\n if (!array_key_exists($columnName, $record->getRelations())) {\n $value = null;\n }\n elseif ($this->isColumnRelated($column, true)) {\n $value = $record->{$columnName}->lists($column->valueFrom);\n }\n elseif ($this->isColumnRelated($column) || $this->isColumnPivot($column)) {\n $value = $record->{$columnName}\n ? $column->getValueFromData($record->{$columnName})\n : null;\n }\n else {\n $value = null;\n }\n }\n /*\n * Handle taking value from model attribute.\n */\n elseif ($column->valueFrom) {\n $value = $column->getValueFromData($record);\n }\n /*\n * Otherwise, if the column is a relation, it will be a custom select,\n * so prevent the Model from attempting to load the relation\n * if the value is NULL.\n */\n else {\n if ($record->hasRelation($columnName) && array_key_exists($columnName, $record->attributes)) {\n $value = $record->attributes[$columnName];\n // Load the value from the relationship counter if useRelationCount is specified\n } elseif ($column->relation && @$column->config['useRelationCount']) {\n $value = $record->{\"{$column->relation}_count\"};\n } else {\n $value = $record->{$columnName};\n }\n }\n\n /**\n * @event backend.list.overrideColumnValueRaw\n * Overrides the raw column value in a list widget.\n *\n * If a value is returned from this event, it will be used as the raw value for the provided column.\n * `$value` is passed by reference so modifying the variable in place is also supported. Example usage:\n *\n * Event::listen('backend.list.overrideColumnValueRaw', function($listWidget, $record, $column, &$value) {\n * $value .= '-modified';\n * });\n *\n * Or\n *\n * $listWidget->bindEvent('list.overrideColumnValueRaw', function ($record, $column, $value) {\n * return 'No values for you!';\n * });\n *\n */\n if ($response = $this->fireSystemEvent('backend.list.overrideColumnValueRaw', [$record, $column, &$value])) {\n $value = $response;\n }\n\n return $value;\n }",
"public function getValue()\n {\n return $this->_db->prepareStringToOut($this->_value);\n }",
"public function getCol()\n {\n return $this->col;\n }",
"public function getColumna() {\n return $this->columna;\n }",
"protected function getValue( $column ) {\n\t\tif( $this->isDirty() ) { $this->executeQuery(); }\n\n\t\tif( count( $this->_recordset ) == 0 )\n\t\t\tthrow new Exception( \"Attempting to access property \\\"{$column}\\\" in empty recordset.\" );\n\n\t\tif( ! array_key_exists( $this->_currentRow, $this->_recordset ) )\n\t\t\tthrow new Exception( \"Attempting to access property \\\"{$column}\\\" at unkown recordset offset \\\"{$this->_currentRow}\\\".\" );\n\n\t\t//If it's an actual boolean field, return the cooresponding php boolean value\n\t\tif( $this->getTable()->getColumn( $column )->getDataType() == DATA_TYPE_BOOL ) {\n\t\t\tif( $this->_recordset[ $this->_currentRow ][ $column ] == Kwerry::true() ) {\n\t\t\t\treturn true;\n\t\t\t} else if( $this->_recordset[ $this->_currentRow ][ $column ] == Kwerry::false() ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn( $this->_recordset[ $this->_currentRow ][ $column ] );\n\t}",
"protected static function column_name(): mixed\n\t{\n\t\treturn self::$query->column_name;\n\t}",
"public function getValue() {\n \n return $this->toScalar();\n }",
"public function getKeyValue() {\n $primaryKey = $this->getKeyName();\n return $this->$primaryKey;\n }",
"public function column() : int\n {\n return $this->column;\n }",
"function get_value_db()\n\t{\n\t\treturn $this->value;\n\t}",
"public function getCellValue()\n {\n return $this->get('CellValue');\n }",
"public function getCellValue()\n {\n return $this->get('CellValue');\n }",
"protected function LiveTableValue()\n {\n return $this->LiveRawTableValue();\n }",
"abstract public static function get_column_name(): string;",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"final public function col():Col\n {\n return $this->table()->col($this->col);\n }",
"protected function getOurValue()\n {\n $ourModel = $this->getOurModel();\n\n if ($ourModel->loaded()) {\n return $this->our_field\n ? $ourModel->get($this->our_field)\n : $ourModel->getId();\n }\n\n // create expression based on existing conditions\n return $ourModel->action('field', [\n $this->getOurFieldName(),\n ]);\n }",
"protected function _getPrimaryKeyValue(){\n $primaryKey = $this->_getPrimaryKey();\n return $this->{$primaryKey};\n }",
"public function get() {\n\t\treturn $this->rows[$this->rowIndex];\n\t}",
"public function __get($column)\n {\n $return = parent::__get($column);\n\n if ($column == 'value' && preg_match('!^(a|o):\\d+:!i', $return))\n {\n $return = unserialize($return);\n }\n\n return $return;\n }",
"public function __get($name)\n {\n return $this->columns_values[$name];\n }",
"public function getValue(){\n return $this->getData();\n }",
"public function getValue(): mixed\n {\n return $this->field?->getValue();\n }",
"public function getValue() {\n\t\treturn $this -> value;\n\t}",
"function Get($col)\n {\n return $this->row ? $this->row[$col] : NULL;\n }",
"public function getSqlCol()\n {\n return $this->sqlCol;\n }",
"public function value()\n {\n return $this->getValue();\n }",
"public function __get($column) {\n\t\tif ($column == 'search') {\n\t\t\tif (isset($this->_related[$column])) {\n\t\t\t\treturn $this->_related[$column];\n\t\t\t}\n\n\t\t\t$model = $this->_related($column);\n\n\t\t\t// Use this model's primary key value and foreign model's column\n\t\t\t$col = $model->_object_name.'.'.$this->_belongs_to[$column]['foreign_key'];\n\t\t\t$val = $this->guid;\n\n\t\t\t$model->where($col, '=', $val)->find();\n\t\t}\n\n\t\treturn parent::__get($column);\n\t}",
"public function value($column)\n {\n $result = (array) $this->first([$column => 1]);\n\n return count($result) > 0 ? $result[$column] : null;\n }",
"public function getColumn(): string;",
"public function toColumn() {\r\n\t\treturn $this->PDOStatement->fetchAll(PDO::FETCH_COLUMN,0);\r\n\t}",
"public function getAccess()\n\t{\n\t\t$column = self::COL_ACCESS;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (string)$v;\n\t\t}\n\n\t\treturn $v;\n\t}",
"public function fetchField();",
"public function getValueAttribute()\n\t{\n\t\treturn $this->attributes['valor_total'];\n\t}",
"public function __get($property_name)\n\t\t{\n\t\t\tif (in_array($property_name, $this->getModel()->getColumns()))\n\t\t\t{\n\t\t\t\treturn $this->getModel()->$property_name;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn parent::__get($property_name);\n\t\t\t}\n\t\t}",
"public function getDataFromColumn($col)\n {\n return $this->attributes[app()->getLocale() == 'ar' ? 'ar_'.$col : $col] ?? $this->attributes[$col];\n }",
"function Get($col)\n {\n return isset($this->row) ? $this->row[$col] : null;\n }",
"public function getValue(){\n return $this->_value;\n }",
"protected function getPropertyValue() {}",
"public function sqlValue()\n {\n return ($this->arrConfig['operator'] == 'like' ? ('%' . $this->arrConfig['value'] . '%') : $this->arrConfig['value']);\n }",
"public function value() {\n if ($this->_m_value !== null)\n return $this->_m_value;\n $this->_m_value = $this->lookupTable()[($this->tag() - 213)];\n return $this->_m_value;\n }",
"public function &__get($name)\n\t{\n\n\t\ttry {\n\t\t\t$value = ObjectMixin::get($this, $name);\n\t\t\treturn $value;\n\n\t\t}\n\t\t// takova property neexistuje, mozna ze pristupujeme k dbrecord magic properties (column nebo asociace)\t\t\n\t\tcatch(\\Nette\\MemberAccessException $e) {\n\t\t\t$repository = self::em()->getRepository(static::class);\n\t\t\t$metadata = $repository->getMetadata();\n\n\t\t\t// je to Column\n\t\t\tif ($metadata->hasColumn($name)) {\n\t\t\t\t// data zadana, je tento column inicializovan\n\t\t\t\tif (array_key_exists($name, $this->_data)) {\n\t\t\t\t\t$value = $this->_data[$name];\n\t\t\t\t\treturn $value; // PHP work-around (Only variable references should be returned by reference)\n\t\t\t\t}\n\t\t\t\t// column nebyl inicializovan \n\t\t\t\telse {\t\t\t\t\t\n\t\t\t\t\t$defaults = $metadata->getDefaults();\n\t\t\t\t\t// zkusme vratit default (column stale neinicializujeme)\n\t\t\t\t\tif (array_key_exists($name, $defaults)) {\n\t\t\t\t\t\t$value = $defaults[$name];\n\t\t\t\t\t\treturn $value; // PHP work-around (Only variable references should be returned by reference)\n\t\t\t\t\t} \n\t\t\t\t\t// default neni znamy vracime NULL (neměl by se tady vratit exception? neni inicializovane tak jak na nej mohu sahat? no protoze je to definovany column tedy ta property je magic a existuje proto se vraci NULL)\n\t\t\t\t\telse {\n\t\t\t\t\t\t$value = NULL;\n\t\t\t\t\t\treturn $value; // PHP work-around (Only variable references should be returned by reference)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// je to asociace\n\t\t\telseif ($metadata->hasAssociation($name)) {\n\t\t\t\t// associace uz byla drive vytvorena, tak ji vratime\n\t\t\t\tif (array_key_exists($name, $this->_associations)) {\n\t\t\t\t\t$reference = $this->_associations[$name];\n\t\t\t\t\treturn $reference;\n\t\t\t\t}\n\n\t\t\t\t// associace k tomuto objektu neexistuje, vytvorime ji\n\t\t\t\t$reference = $this->_associations[$name] = $repository->createAssociatedObject($name, $this);\n\t\t\t\treturn $reference;\n\t\t\t}\n\n\t\t\t// jde o chybu\n\t\t\tthrow $e;\n\t\t}\n\t}",
"function getValue()\n\t{\n\t\treturn $this->value;\n\t}",
"function getValue()\n\t{\n\t\treturn $this->value;\n\t}",
"public function getValue()\n {\n return $this->_value;\n }",
"public function getValue()\n {\n return $this->_value;\n }",
"public function getValue()\n {\n return $this->_value;\n }",
"function getRecordCol($index) {\n return $this->records[$index]->getCol();\n }",
"public function fetchColumn() {\n if ($this->result === true) {\n return false;\n }\n\n // Are we running PHP >=8.1?\n if (PHP_VERSION_ID >= 80100) {\n $value = $this->result->fetch_column();\n return ($value === null || $value === false) ? $value : (string) $value;\n }\n\n // Fallback to traditional approach\n $row = $this->result->fetch_row();\n return $row ? $row[0] : false;\n }",
"public function __get($columnName)\n {\n if (array_key_exists($columnName, $this->relations)) {\n $this->getEventManager()->trigger('loadRelation', $this, [\n 'relation' => $columnName\n ]);\n }\n\n if (array_key_exists($columnName, $this->data)) {\n return $this->data[$columnName];\n }\n\n throw new RuntimeException(sprintf(\n \"Specified column \\\"%s\\\" is not in the row\",\n $columnName\n ));\n }",
"public function getValue() {\n return $this->_value;\n }",
"protected function getValue() {\r\n return $this->_value;\r\n }",
"public function getValue(){\n \treturn $this->value;\n }",
"public function getValue()\r\n\t{\r\n\t\treturn $this->value;\r\n\t}",
"public function getValue()\n\t{\n\t\treturn $this->_value;\n\t}"
] | [
"0.70321596",
"0.6991185",
"0.69045335",
"0.6838851",
"0.6789454",
"0.67638856",
"0.67497355",
"0.6722602",
"0.6671526",
"0.6625604",
"0.6570242",
"0.6570242",
"0.6563344",
"0.651202",
"0.651202",
"0.6470058",
"0.6417256",
"0.63867766",
"0.63725686",
"0.6354128",
"0.6346862",
"0.63281494",
"0.63040406",
"0.6290765",
"0.6271747",
"0.6257055",
"0.6216122",
"0.62130356",
"0.62094253",
"0.62001157",
"0.6167895",
"0.61647046",
"0.61490834",
"0.6138079",
"0.6138079",
"0.61256725",
"0.6121377",
"0.60931104",
"0.60931104",
"0.60931104",
"0.60931104",
"0.60931104",
"0.60931104",
"0.60931104",
"0.60931104",
"0.60931104",
"0.60931104",
"0.60931104",
"0.60931104",
"0.6086265",
"0.60772765",
"0.6074948",
"0.6046212",
"0.60396504",
"0.60311973",
"0.6027494",
"0.6016532",
"0.60118294",
"0.6008494",
"0.59826374",
"0.5955551",
"0.59504956",
"0.5940059",
"0.5920596",
"0.591978",
"0.59179354",
"0.5912824",
"0.5896452",
"0.5885417",
"0.58807254",
"0.5876891",
"0.5858905",
"0.58499926",
"0.5837883",
"0.58375186",
"0.58371127",
"0.58289105",
"0.58289105",
"0.58208305",
"0.58208305",
"0.58208305",
"0.5819512",
"0.581849",
"0.58076304",
"0.580154",
"0.579669",
"0.57939273",
"0.5790665",
"0.57875746"
] | 0.65017635 | 25 |
Set the value of a virtual column in this object | public function setVirtualColumn($name, $value)
{
$this->virtualColumns[$name] = $value;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function set($column,$value);",
"public function setViaTableAttributesValue($value);",
"public function __set( $name, $value ) {\n\t\tif( $this->getTable()->hasColumn( $name ) ) {\n\t\t\t$this->_updateBuffer[ $name ] = $value;\n\t\t}\n\t}",
"public function __set($name, $value)\n\t{\n \t\tif ($this->column_data[$name] !== $value)\n\t\t{\n\t\t\t$this->column_data[$name] = $value;\n\t\t\t$this->altered_columns[$name] = $name;\n\t\t}\n\t}",
"public function __set($name, $value)\n\t{\n\t\t$this->updating();\n\n\t\ttry {\n\n\t\t\tObjectMixin::set($this, $name, $value);\n\n\t\t}\n\t\t// takova property neexistuje, mozna ze pristupujeme k dbrecord magic properties (column nebo asociace)\n\t\tcatch(\\Nette\\MemberAccessException $e) {\n\t\t\t$repository = self::em()->getRepository(static::class);\n\t\t\t$metadata = $repository->getMetadata();\n\n\t\t\t// je to Column\n\t\t\tif ($metadata->hasColumn($name)) {\n\t\t\t\t// hodnoty ktere mohou byt NULL a nemaji v dtb zadnou vychozi hodnotu nebudeme ukladat jako prazdne ale jako NULL\n\t\t\t\t// jinak by se do dtb zapsal prazdny string coz napr. u company, ico atd. nema vyznam, dokonce to i u ICO vyrazne skodi\n\t\t\t\t//TODO: docela potencionalni bug / asi by se to melo resit jinde - napr. parametrem v konstruktoru\n\t\t\t\tif (isset($this->_construction['nullableToNULL']) && $this->_construction['nullableToNULL'] === true) {\n\t\t\t\t\tif ($value === \"\" && $metadata->isNullable($name) && !$metadata->isMandatory($name)) {\n\t\t\t\t\t\t$value = NULL;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!is_null($value)) {\n\t\t\t\t\t$type = $metadata->getType($name);\n\t\t\t\t\tswitch ($type) {\n\t\t\t\t\t\tcase \"s\":\n\t\t\t\t\t\t\t$value = (string) $value;\n\t\t\t\t\t\t\t// trimstrings oreze vsechny stringy funkci trim\n\t\t\t\t\t\t\tif (isset($this->_construction['trimStrings']) && $this->_construction['trimStrings'] === true) {\n\t\t\t\t\t\t\t\t$value = trim($value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase \"i\":\n\t\t\t\t\t\t\t$value = (int)$value;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase \"f\":\n\t\t\t\t\t\t\tif (isset($this->_construction['floatReplaceDecimals']) && $this->_construction['floatReplaceDecimals'] === true) {\n\t\t\t\t\t\t\t\t$value = preg_replace(\"/,/\", \".\", $value);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$value = (float)$value;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase \"d\":\n\t\t\t\t\t\tcase \"t\": // z dtb vzdy dostaneme tento tvar 2010-01-01 / z formu muzeme dostat ledasco / my budeme pracovat s DateTime / pri ukladani do dtb nebo do array bychom meli ulozit string, tedy Y-m-d H:i:s\n\t\t\t\t\t\t\t// povazujeme za NULL\n\t\t\t\t\t\t\tif (!$value || $value == '0000-00-00 00:00:00') {\n\t\t\t\t\t\t\t\t$value = NULL;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t$_value = is_numeric($value) ? (int) $value : strtotime($value); // strtotime si poradí se stringy jako 2010-01-10 12:00, 10.1.2010 12:00, now atd., tedy při vkládání formulářů máme celkem volné ruce\n\t\t\t\t\t\t\t\t$value = new DateTime;\n\t\t\t\t\t\t\t\t$value->setTimestamp($_value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tthrow new \\Nette\\InvalidArgumentException(\"Undefined data type!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!array_key_exists($name, $this->_data) || $this->_data[$name] !== $value) {\n\t\t\t\t\t$this->_data[$name] = $value;\n\t\t\t\t\t$this->_modified[$name] = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t// je to asociace\n\t\t\telseif ($metadata->hasAssociation($name)) {\n\n\t\t\t\t// mame mergovat?\n\t\t\t\tif (is_array($value) && isset($this->_construction['mergeAssociations']) && $this->_construction['mergeAssociations'] === true && isset($this->_associations[$name])) {\n\t\t\t\t\t$association = $this->_associations[$name];\n\t\t\t\t\t$association->setValues($value, $this->_construction);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\n\t\t\t\t$reference = $repository->saveAssociatedObject($name, $this, $value, $this->_construction);\n\t\t\t\t$this->_associations[$name] = $reference;\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// jde o chybu\n\t\t\tthrow $e;\n\t\t}\n\t}",
"public function __set($property_name, $value)\n\t\t{\n\t\t\tif (in_array($property_name, $this->getModel()->getColumns()))\n\t\t\t{\n\t\t\t\treturn $this->getModel()->$property_name = $value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn parent::__set($property_name, $value);\n\t\t\t}\n\t\t}",
"public function dset($property,$value){\n $this->$property = $value;\n $table = $this->table;\n $id = $this->id; \n LAIKA_Database::update($table, $property, $value, \"id = $id\");\n }",
"public function set(ColumnInterface $column);",
"public function __SET($attr, $value){ //Establece valor y atributo\n\n\t\t\t$this->$attr=$value;\n\t\t}",
"public function __set($name,$value){\r\n\t\tif (!$this->values->key_exists($name)){\r\n\t\t\tthrow new DBObjectException(get_class($this),get_class($this).' does not have '.TextUtils::aOrAn($name).' value.');\r\n\t\t}\r\n\t\tif ( (!$this->isNew() && $this->getTable()->inPrimaryKey($name))) return;\r\n\t\tif ($this->values[$name]->setValue($value)){\r\n\t\t\t$this->hasChanged = true;\r\n\t\t}\r\n\t}",
"function __set($prop, $val)\n {\n if (isset($this->$prop)) $this->$prop = $val;\n elseif (isset($this->_fk[$prop])) $this->_data[$prop] = $val->id;\n elseif (isset($this->_cols[$prop])) $this->_data[$prop] = $val;\n else throw new Exception(sprintf('Property \"%s\" not available', $prop));\n }",
"public function __SET($att, $valor){\r\n $this->$att = $valor;\r\n}",
"public function setProperty(string $property): ModelDataTableColumnInterface;",
"public function set_column( $column ) {\n $this->column = $column;\n }",
"public function __set($name, $value)\n {\n $this->columns_values[$name] = $value;\n }",
"public function setValue($v){\n $this->value = $v;\n }",
"public function setValue($newValue) {\n\t\t$this->getModel()->{$this->_attribute} = $newValue;\n\t}",
"public function __set($name, $value)\n {\n // does table have such row?\n if (!array_key_exists($name, $this->_fields)) {\n throw new Cms_Model_Exception(\n get_class($this) . \" doesn't have the '{$name}' field\"\n );\n }\n\n // we should parse the name of arg to get function\n $func = 'set' . @preg_replace('~_([a-z])~e', 'ucfirst(\"$1\")', ucfirst($name));\n if (!is_callable(array($this, $func))) {\n throw new Cms_Model_Exception(\"The '{$func}' method not found\");\n }\n\n // updating marker of changed fields\n if ($this->_isVirgin) {\n $this->_fields[$name] = $value;\n } else {\n $this->_changedFields[$name] = $value;\n }\n }",
"public function set(string $column, $value): self {\n $this->record[$column] = $value;\n return $this;\n }",
"protected function setColumn($id, $value, $column, $scenario) {\n // Check if the id is a wrong one\n $invoiceHistory = InvoiceHistoryB::model()->findByPk($id);\n if(!$invoiceHistory instanceof InvoiceHistoryB) {\n echo CJSON::encode(array('status' => 'failure', 'message' => 'Id is invalid.', 'value' => $value,));\n Yii::app()->end();\n }\n \n // Set attributes to validate\n $invoiceHistory->setScenario($scenario);\n $invoiceHistory->$column = $value;\n if(!$invoiceHistory->validate()) {\n echo CJSON::encode(array('status' => 'failure', 'message' => $invoiceHistory->getError($column), 'value' => $value,));\n Yii::app()->end();\n }\n \n // Save the updated attributes\n if($invoiceHistory->save(false)) {\n echo CJSON::encode(array('status' => 'success', 'message' => 'Invoice id is saved successfully', 'value' => $invoiceHistory->invoice_id,));\n }\n }",
"public function setColumn($object, $alias, $value)\r\n {\r\n throw new Exception('This method is not yet implemented');\r\n }",
"public function __set($name, $value) {\n\t\tif (!isset(self::$tables[$this->table][$name])) {\n\t\t\t\tthrow new Exception(\"$name column doesn't exist in $this->table table \");\n\t\t}\n\t\t$this->modifiedData[$name] = $value;\n\t}",
"final protected function setColumnData($key, $value, $allowNull = false)\n\t\t{\n\t\t\t$col = $this->findColumn($key);\n\t\t\t// only allow on binary data types\n\t\t\tif($col === null || $col->getDataType() !== CDFSqlDataType::Data)\n\t\t\t\treturn;\n\n\t\t\t$col->setValue($allowNull && is_null($value) ? null : $value);\n\t\t}",
"public function __set($sProperty, $mValue)\n {\n $this->oDb->{$sProperty} = $mValue;\n }",
"public function setColumn($value)\n {\n return $this->set('Column', $value);\n }",
"public function __set($name, $value)\n {\n $this->m_ddl->$name = $value;\n }",
"protected function addVirtualColumns()\n {\n \n }",
"public function offsetSet($columnName, $value)\n {\n $this->_rows[key($this->_rows)][$columnName] = \"$value\";\n }",
"function __set($key, $value) {\n\t\t\tif($key == \"table_name\") {\n\t\t\t\t$this->set_content_columns($value);\n\t\t\t} elseif(is_object($value) && $value instanceof self && $this->auto_save_associations) {\n\t\t\t\tif($association_type = $this->get_association_type($key)) {\n\t\t\t\t\t$this->save_associations[$association_type][] = $value;\n\t\t\t\t\tif($association_type == \"belongs_to\") {\n\t\t\t\t\t\t$foreign_key = Inflector::singularize($value->table_name).\"_id\";\n\t\t\t\t\t\t$this->$foreign_key = $value->id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif(in_array($key, $this->i18n_column_names)) {\n\t\t\t\tif(is_array($value)) {\n\t\t\t\t\tforeach($value as $locale => $the_value) {\n\t\t\t\t\t\t$this->i18n_column_values[$key][$locale] = $the_value;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->i18n_column_values[$key][$this->get_locale()] = $value;\n\t\t\t\t}\n\t\t\t\treturn $value;\n\t\t\t}\n\t\t\telseif(is_array($value) && $this->auto_save_associations) {\n\t\t\t\tif($association_type = $this->get_association_type($key)) {\n\t\t\t\t\t$this->save_associations[$association_type][] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->$key = $value;\n\t\t}",
"public function __set($property, $value){\n\t\t$this->_connect();\n\t\tif($this->_dumpLock==false){\n\t\t\tif(isset($this->$property)==false){\n\t\t\t\tthrow new ActiveRecordException(\"La propiedad '$property' no existe en la entidad '\".get_class($this).\"'\");\n\t\t\t}\n\t\t}\n\t\t$this->$property = $value;\n\t}",
"public function __set($columnName, $value)\n {\n if (array_key_exists($columnName, $this->data)) {\n $this->modifiedDataFields[$columnName] = ($this->data[$columnName] !== $value);\n $this->data[$columnName] = $value;\n return $this;\n }\n\n return $this;\n }",
"public function offsetSet($columnName, $value)\n\t{\n\t\tif ($this->_cleanData !== null)\n\t\t\t$this->_cleanData[$columnName] = $value;\n\t\tparent::offsetSet($columnName,$value);\n\t}",
"public function setColumn($set, $val)\n\t{\n\t\t//ignore bogus data\n\t\tif (!array_key_exists($set, $this->row))\n\t\t\tthrow new InternalException(\"row $set doesn't exist\");\n\t\t$this->isChanged[$set] = true;\n\t\t$this->row[$set] = $val;\n\t}",
"public function __set($var, $value)\n\t{\n\t\t$entity = $this->execute();\n\t\tif($entity) {\n\t\t\t$entity->$var = $value;\n\t\t}\n\t}",
"public function __set($property, $value) {\n\t\tif (array_key_exists($property, $this->_allowedColumns)) {\n\t\t\t$this->_valueArray[$property] = $value;\n\t\t} else {\n\t\t\tthrow new L8M_Exception('Property does not exist: ' . $property);\n\t\t}\n\t}",
"public function setCol($col)\n {\n $this->col = $col;\n }",
"protected function setUpNewColumn()\n {\n $this->newColumn = clone $this->oldColumn;\n }",
"public function __set($nombre,$valor){\n $class = get_class($this);\n $nombre = strtolower($nombre); // se ponen los nombres en mayusculas ya que en la base de datos estan asi y estan en minusculas no funcionan las consultas\n if(property_exists($class,$nombre)){\n $this->$nombre = $valor; // le asignas al campo de igual nombre en la BD el valor pasado por parametro.\n }\n }",
"public function __set($var, $value) {\n\t\tif(!($value instanceof column)) {\n\t\t\treturn false;\n\t\t}\n\t\tforeach($this->_columns as $k=>$col) {\n\t\t\tif($col->name == $var) {\n\t\t\t\t$this->_columns[$k] = $value;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public function set($column, $value) {\n $this->impl->set($this->context, $column, $value);\n return $this;\n }",
"public function set($key, $val) {\n\t\t// Check whether the field is writable\n\t\tif (!isset($this->fieldPermissions[$key]) || $this->fieldPermissions[$key] == self::READ_WRITE) {\n\t\t\t$this->data[$this->caret]['curr'][$key] = $val;\n\t\t\t$this->data[$this->caret]['valid'] = true;\n\t\t} else {\n\t\t\ttrigger_error(\"Column $key is not publicly accessible\", E_USER_ERROR);\n\t\t}\n\t}",
"public function __set ($field, $val) {\n if (isset($this->__fields[$field]['set'])) {\n $this->__fields[$field]['data'] = $this->__fields[$field]['set']($val);\n } else {\n $this->__fields[$field]['data'] = $val;\n }\n }",
"public function __set($atrib, $value){\n\t\t$this->$atrib = $value;\n\t}",
"public function modify()\r\n\t{\r\n\t\tif( ! $this->loaded())\r\n\t\t{\r\n\t\t\tthrow new Kohana_Exception('Unable to modify an unloaded column :col', array(\r\n\t\t\t\t'col'\t=> $this->name\r\n\t\t\t));\r\n\t\t}\r\n\t\t\r\n\t\t// Updates the existing column\r\n\t\tDB::alter($this->table->name)\r\n\t\t\t->modify($this->compile())\r\n\t\t\t->execute($this->table->database);\r\n\t}",
"function setParam($name, $value)\n\t{\n\t\t$this->table->$name = $value;\n\t}",
"protected function getColumnSetter($name = 'version_column')\n {\n return 'set' . $this->getColumnPhpName($name);\n }",
"public function __set($atributo, $valor) {\n\t\t\t// $this->modelo = $valor;\n\t\t\t$this->$atributo = $valor;\n\t\t}",
"public function set()\n {\n\t\tif ($this->model->state())\n $this->model->set();\n }",
"function getColumnSetter($column, $value, $singleQuotes = false, $prefix = 'this->')\n {\n if ($singleQuotes)\n {\n $value = sprintf(\"'%s'\", $value);\n }\n\n return sprintf('$%s%s->set(\\'%s\\', %s)', $prefix, $this->getSingularName(), $column->getName(), $value);\n }",
"public function __set($_name,$_value) {\n\t\tif (array_key_exists($_name,$this->fields)) {\n\t\t\t$this->fields[$_name]=is_string($_value)?\n\t\t\t\tF3::resolve($_value):$_value;\n\t\t\tif (!is_null($_value))\n\t\t\t\t// Axon is now hydrated\n\t\t\t\t$this->empty=FALSE;\n\t\t\treturn;\n\t\t}\n\t\tif (array_key_exists($_name,$this->virtual)) {\n\t\t\ttrigger_error(self::TEXT_AxonReadOnly);\n\t\t\treturn;\n\t\t}\n\t\tF3::$global['CONTEXT']=$_name;\n\t\ttrigger_error(self::TEXT_AxonNotMapped);\n\t}",
"public function setFieldValue(Field $field, $model, $value);",
"public function setValue($value)\n {\n if ($value === 'on') {\n $this->_value = 1;\n }\n $this->_value = trim($this->_db->prepareString($value));\n }",
"public function setIsVirtual($isVirtual);",
"final public function __set($field, $value)\n\t\t{\n\t\t\tswitch($field)\n\t\t\t{\n\t\t\t\tcase \"IsPersistent\":\n\t\t\t\t\t\n\t\t\t\t\tif($value == true)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->stored = true;\n\t\t\t\t\t\t$this->changedfields = array();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->stored = false;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\t$method = \"Set\".$field;\n\t\t\t\t\t$class = get_called_class();\n\t\t\t\t\t\n\t\t\t\t\t// Check if the current value (if any) equals the new value\n\t\t\t\t\t// If it doesn't, the field is to be declared as changed\n\t\t\t\t\t$currentValue = null;\n\t\t\t\t\t\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t$currentValue = $this->__get($field);\n\t\t\t\t\t}\n\t\t\t\t\tcatch(ValueCannotBeNullException $e)\n\t\t\t\t\t{\n\t\t\t\t\t\t// ignore\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif($currentValue <> $value)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->changedfields[] = $field;\n\t\t\t\t\t\t$this->stored = false;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!method_exists($this, $method))\n\t\t\t\t\t{\n\t\t\t\t\t\t$logcode = LogManager::_(\"No Setter defined in '\".$class.\"->\".$method.\"'\");\n\t\t\t\t\t\tthrow new SetterNotDeclaredException($logcode);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Check the parameters\n\t\t\t\t\tFunctionCheck::CheckMethodParameters($class.\"::\".$method, array($value));\n\t\t\t\t\t\n\t\t\t\t\t// Find the method\n\t\t\t\t\t$method = new \\ReflectionMethod($class, $method);\n\t\t\t\t\t\n\t\t\t\t\t$method->setAccessible(true);\n\t\t\t\t\t\n\t\t\t\t\t// And execute it\n\t\t\t\t\t$method->invokeArgs($this, array($value));\n\t\t\t\t\t$method->setAccessible(false);\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"public function __set($name, $value)\n\t{\n\t\tif ($field = $this->_meta->field($name))\n\t\t{\n\t\t\t$this->set(array($name => $value));\n\t\t}\n\t}",
"public function setAsPrimaryColumn(): self;",
"public function set($column, $value)\n {\n $this->initialize();\n if (array_key_exists($column, $this->columns)) {\n $mutator = '__set' . str_replace(' ', '', ucwords(str_replace(array('-', '_'), ' ', $column)));\n if (method_exists($this, $mutator)) {\n $this->{$mutator}($value);\n } else {\n $this->data[$column] = $value;\n }\n return;\n }\n throw new Exception\\InvalidArgumentException('Not a valid column in this row: ' . $column);\n }",
"public function setProperty(string $property = '', $value = null): void\n {\n if ( !isset( $value ) || $value === null ) {\n return;\n }\n\n if ( !array_key_exists( $property, $this->columns ) ) {\n return;\n }\n\n $propertyType = $this->columns[$property]['type'] ?? 'id';\n $propertyName = $this->getColumnPropertyName( $property );\n\n if ( method_exists( $this, $propertyName ) ) {\n $value = $this->cleanInput( $value, $propertyType );\n\n if ( $value !== null ) {\n $this->$propertyName = $value;\n }\n }\n }",
"private function setAttributeFieldValue()\n {\n // Get all our attribute objects\n $proxiedAttrs = $this->getAttributes();\n \n $data = [];\n foreach ($proxiedAttrs as $attrObjArr) {\n foreach ($attrObjArr as $attrObj) {\n $dataKey = $attrObj->getFieldName();\n $dataVal = $this->getRequest()->postVar($dataKey);\n $data[$dataKey] = $dataVal;\n }\n }\n \n $json = $this->dbObject('AttributeData')->toJson($data);\n $this->setField('AttributeData', $json);\n }",
"public function setValue($fieldname, $value);",
"public function __set($variable, $value)\n {\n $this->rowData[$variable] = $value;\n if ($this->persisted) {\n $this->persisted = false;\n }\n }",
"public function set($fk, $ref_model){\n $this->fk = $fk;\n \n //model que está chamando\n $this->ref = $ref_model;\n }",
"public function __set($field, $value) {\r\n $this->$field = $value;\r\n }",
"public function __set($field, $value) {\r\n $this->$field = $value;\r\n }",
"public function __set($prop, $valor){\n\t\tif( !property_exists($this, $prop))\t{\n\t\t\tthrow new exception(\"la propiedad $prop no existe\"); \t\t\t\n\t\t}\t\t\n\t\t$this->$prop = $valor;\n\t\t//$this->(\"set\".ucfirst($prop))($valor);\n\t\t\n\t}",
"public function setViaTableCondition($value);",
"function __set($a_sProperty, $a_sValue) \n {\n // convert property name\n $sMethod = 'set'.$this->_propertyNameConverter($a_sProperty);\n if (method_exists($this, $sMethod)) {\n $this->{\"$sMethod\"}(mysql_real_escape_string($a_sValue));\n }\n }",
"public function setVirtualPure() {\n\t\t$methodIndex = $this->getLastMethodIndex();\n\t\t$this->methodArray[$methodIndex][\"virtualPure\"] = true;\n\t}",
"public function __set($prop, $val){\n\t\tif(isset($this->_atributosMetadata[$prop])){\n\t\t\t$propMetadata = $this->_atributosMetadata[$prop];\n\t\t\t$propMetadata->Validate($val);\n\t\t\tif($propMetadata->isValid){\n\t\t\t\tthrow new Exception($propMetadata->errMsg, $propMetadata->errCode);\t\n\t\t\t}\n\t\t}else{\n\t\t\terror_log(\"Deprecated Models, need to create Model Metadata\");\n\t\t\t$this->$prop = $val;\n\t\t}\n\t}",
"public function set($rowData)\n {\n $this->rawRowData = $rowData;\n }",
"public function change()\n {\n // a:6:{i:0;s:9:\"wechat_id\";i:1;s:8:\"nickname\";i:2;s:6:\"isbind\";i:3;s:9:\"firstbind\";i:4;s:7:\"liushui\";i:5;s:11:\"og_username\";}\n $table = $this->table('k_user');\n $table->addColumn('wechat_id', 'string', ['null' => true, 'limit' => 64,])\n ->addColumn('nickname', 'string', ['null' => true, 'limit' => 64,])\n ->addColumn('isbind', 'integer', ['null' => true, 'default'=>0,'limit' => \\Phinx\\Db\\Adapter\\MysqlAdapter::INT_TINY,])\n ->addColumn('firstbind', 'integer', ['null' => true, 'default'=>0,'limit' => \\Phinx\\Db\\Adapter\\MysqlAdapter::INT_TINY,])\n ->addColumn('liushui', 'decimal', ['null' => true, 'precision'=>18,'scale'=>2,'default'=>0.00,])\n ->addColumn('og_username', 'string', ['null' => true, 'limit' => 32,])\n ->update(); \n }",
"public function __set($property, $value) {}",
"function editValue($table_name, $key_column_name, $key_value, $column_name, $new_value)\n {\n $sql = sprintf(\n \"UPDATE %s SET %s = \\\"%s\\\" WHERE %s = \\\"%s\\\";\",\n $table_name,\n $column_name,\n SQLite3::escapeString($new_value),\n $key_column_name,\n SQLite3::escapeString($key_value));\n $this->exec($sql);\n }",
"public function set($field, $value);",
"public function set($field, $value);",
"public function setEditable($value);",
"protected function getColumnSetter($column) {\n return 'set' . $this->getColumnForParameter($column)->getPhpName();\n }",
"public function modelColumn();",
"public function __set($k, $v){\n\t\t\t$this->$k = $v;\n\t\t}",
"abstract protected function alter_set($name,$value);",
"public function setVal($val){\n\t\t\t$this->_val = $val;\n\t\t}",
"function set($attr, $value)\r\n\t{\r\n\t\t$this->$attr = $value;\r\n\t}",
"public function set($col, $value)\n {\n return $this->setCol($col, $value);\n }",
"public function __set($attr, $value)\n\t{\n\t\t$this->$attr = $value;\n\t}",
"public function setField($name, $value);",
"public function __set($name, $value)\n {\n $table = $this->getTable();\n $scheme = $table->getScheme();\n\n //It's a field\n if (isset($scheme['fields'][$name])) {\n foreach ($this->rows as $row) {\n $row->$name = $value;\n }\n\n return;\n }\n\n //It's a relation\n if (!isset($scheme['relations'][$name])) {\n throw new SimpleCrudException(sprintf('Undefined property \"%s\"'), $name);\n }\n\n $relation = $scheme['relations'][$name];\n\n //Check types\n if ($value === null) {\n $value = $table->createCollection();\n } elseif (!($value instanceof self)) {\n throw new SimpleCrudException(sprintf('Invalid value: %s must be a RowCollection instance or null', $name));\n }\n\n //Join the relations and rows\n self::join($table, $this->rows, $value->getTable(), $value, $relation);\n $this->loadedRelations[] = $name;\n }",
"public function set($property, $value);",
"function yy_r34(){ $this->_retvalue = new SQL\\AlterTable\\ChangeColumn($this->yystack[$this->yyidx + -2]->minor, $this->yystack[$this->yyidx + -1]->minor, $this->yystack[$this->yyidx + 0]->minor); }",
"abstract public function setValue($value);"
] | [
"0.66085964",
"0.6299626",
"0.6004378",
"0.5985626",
"0.5895093",
"0.58565485",
"0.58516127",
"0.5834983",
"0.57772404",
"0.5694158",
"0.56827945",
"0.5680758",
"0.5672021",
"0.56634164",
"0.5648054",
"0.5630224",
"0.5629798",
"0.5603019",
"0.55679774",
"0.5558206",
"0.5544404",
"0.5514607",
"0.549745",
"0.54831994",
"0.54629177",
"0.54510427",
"0.54455656",
"0.5438404",
"0.5418346",
"0.5382357",
"0.5380099",
"0.53786385",
"0.5377685",
"0.53699976",
"0.534798",
"0.5333409",
"0.5325584",
"0.5317333",
"0.53061897",
"0.5303054",
"0.5294549",
"0.5285835",
"0.52841944",
"0.52827144",
"0.5276721",
"0.5266012",
"0.52604127",
"0.5259558",
"0.52488834",
"0.52415204",
"0.5241466",
"0.52401525",
"0.5229328",
"0.5228407",
"0.5224986",
"0.5224242",
"0.5209417",
"0.5191288",
"0.5181674",
"0.51722693",
"0.51707494",
"0.5153582",
"0.5142299",
"0.5142299",
"0.5140971",
"0.5133314",
"0.5131558",
"0.51297927",
"0.51128674",
"0.51117504",
"0.51049113",
"0.5098551",
"0.50940984",
"0.50922364",
"0.50922364",
"0.5076775",
"0.5072809",
"0.5065095",
"0.5064005",
"0.504935",
"0.5047308",
"0.50460154",
"0.50458634",
"0.5041572",
"0.50413775",
"0.5037186",
"0.50364804",
"0.503374",
"0.50213045"
] | 0.6603297 | 11 |
Logs a message using Propel::log(). | protected function log($msg, $priority = Propel::LOG_INFO)
{
return Propel::log(get_class($this) . ': ' . $msg, $priority);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function log( $message );",
"abstract protected function log(LogMessage $message);",
"public function log($message) {\n }",
"public function log($message) {\n }",
"public function log($message) {\n }",
"protected function _log($message)\n {\n $this->_log->save(get_class($this), 'test', $message);\n }",
"public function log()\r\n {\r\n echo $this->message.PHP_EOL;\r\n }",
"public function log($msg)\n {\n }",
"private static function log($message)\n\t{\n\t}",
"function log($message) {\n\t\tif (isset($this->logger)) {\n\t\t\tcall_user_func(array($this->logger, 'log'), $message);\n\t\t}\n\t}",
"public function log($msg)\n {\n ToolsAbstract::log($msg, 'product-sync-biz.log');\n }",
"public static function log($message = '') {\n self::_log($message);\n }",
"public function log( $message = '' ) {\r\n\t\t$message = date( 'Y-n-d H:i:s' ) . ' - ' . $message . \"\\r\\n\";\r\n\t\t$this->write_to_log( $message );\r\n\r\n\t}",
"public function log($message)\r\n {\r\n echo \"Executing \" . __METHOD__. \"($message) with prefix '\" . $this->prefix . \"'\\n\";\r\n }",
"public static function log($message){\n Craft::getLogger()->log($message, \\yii\\log\\Logger::LEVEL_INFO, 'craft-trade-account-notifications');\n }",
"public function log($message)\n {\n if ($this->config->get($this->code.'_logging') != true) {\n return;\n }\n $log = new Log('bookey.log');\n $log->write($message);\n }",
"private function log($message) {\n //echo $message . \"\\n\";\n }",
"public function log($level, $message, array $context = array())\n {\n if (null === $this->logger) {\n return;\n }\n\n $add = true;\n $trace = debug_backtrace();\n\n if (null !== $this->stopwatch) {\n $method = $trace[3]['function'];\n\n $watch = 'Propel Query '.(count($this->queries)+1);\n if ('prepare' === $method) {\n $this->isPrepared = true;\n $this->stopwatch->start($watch, 'propel');\n\n $add = false;\n } elseif ($this->isPrepared) {\n $this->isPrepared = false;\n $event = $this->stopwatch->stop($watch);\n }\n }\n\n // $trace[2] has no 'object' key if an exception is thrown while executing a query\n if ($add && isset($event) && isset($trace[2]['object'])) {\n $connection = $trace[2]['object'];\n\n $this->queries[] = array(\n 'sql' => $message,\n 'connection' => $connection->getName(),\n 'time' => $event->getDuration() / 1000,\n 'memory' => $event->getMemory(),\n 'trace' => new TraceStub($trace),\n );\n }\n\n $this->logger->log($level, $message, $context);\n }",
"public function logMessage(LogMessage $message) {\n if (!$this->isLoggable($message)) {\n return;\n }\n\n if ($this->useBuffer($message)) {\n $this->actionBuffer[] = $message;\n } else {\n $this->log($message);\n }\n }",
"protected function log($msg, $type){\n\t\tif($this->logger){\n\t\t\tif(!$this->dbLogger){\n\t\t\t\t$this->dbLogger = new Logger($this->logger);\n\t\t\t}\n\t\t\t$this->dbLogger->log($msg, $type);\n\t\t}\t\n\t}",
"protected function log() {\n }",
"public function log_query()\n\t{\n\t\t$query = $this->get_query();\n\n\t\tif ( ! $query ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! is_array( $query ) && ! is_object( $query ) ) {\n\t\t\t$query = [ $query ];\n\t\t}\n\n\t\t$log = new Charcoal_Log;\n\t\t$log->event_type = $this->event_type;\n\t\t$log->data = $query;\n\t\t$log->save();\n\t}",
"private function log($message) {\n\t\techo $message.\"\\n\";\n\t}",
"public function log() {\n // data we are going to log\n $variables = func_get_args();\n $trace = debug_backtrace(null, 1);\n Yii::info(VarDumper::dump($this));\n $this->debugInternal($variables, $trace);\n }",
"public function log($msg) {\n $msg = sprintf(\"{%s} - %s\", get_class($this), $msg);\n $this->logger->log($msg);\n }",
"public function log( $message )\r\n {\r\n printf( \"%s\\n\", $message );\r\n }",
"public function log($msg)\n {\n file_put_contents($this->logFile, $this->shopName.\" \".date('c').\" \".print_r($msg, true).\"\\n\", FILE_APPEND | LOCK_EX);\n }",
"public function log() {\r\n\t\t$this->resource->log();\r\n\t}",
"public function log($msg){\n\t\tif($this->debugLevel >= self::LOG_INFO){\n\t\t\t$this->_log($msg, self::LOG_INFO);\n\t\t}\n\t}",
"public function log($message)\n {\n $log = new Log('retargeting.log');\n $log->write($message);\n }",
"public function appendLog($message);",
"public function log($msg)\n\t{\n\t\tMage::log($msg, null, 'mobweb_smsnotifications.log', true);\n\t}",
"public function log($text)\n {\n }",
"public function log($message) {\n global $CFG;\n\n // End of line character (in case it's wrong)\n $eol = \"\\r\\n\";\n\n // Forget if if debugging not enabled.\n if (empty($CFG->debugging)) {\n return;\n }\n\n $filename = $CFG->dirroot . '/log/debug';\n $preamble = date('Y-m-d H:i | ') . $_SERVER['REMOTE_ADDR'];\n if (isset($_SESSION['purchaseid'])) {\n $purchaseid = $_SESSION['purchaseid'];\n $preamble .= '| ID:' . $purchaseid . $eol;\n }\n file_put_contents($filename, $preamble . $message . $eol, LOCK_EX | FILE_APPEND);\n }",
"private function log($message)\n {\n Log::info($message);\n $this->info($message);\n }",
"public function log($msg)\n {\n $this->file->filePutContents($this->logFile, $this->config->x_shop_name.\" \".date('c').\" \".var_export($msg, true).\"\\n\", FILE_APPEND | LOCK_EX);\n }",
"public function log($_msg,$_opt=array()){\r\n return (new Object())->log($_msg,$_opt);\r\n }",
"public function log($message) {\n\n // End of line character (in case it's wrong)\n $eol = \"\\r\\n\";\n\n // Forget if if debugging not enabled.\n if (empty($_ENV['debugging'])) {\n return;\n }\n\n $filename = $_ENV['dirroot'] . '/log/debug';\n $preamble = date('Y-m-d H:i | ') . $_SERVER['REMOTE_ADDR'];\n if (Session::exists('purchaseid')) {\n $purchaseid = Session::read('purchaseid');\n $preamble .= '| ID:' . $purchaseid . $eol;\n }\n file_put_contents($filename, $preamble . $message . $eol, LOCK_EX | FILE_APPEND);\n }",
"function log($msg, $label) {\n\t\t$this->Audit(0, \"Minify\", \"$label: $msg\");\n\t}",
"public function log($log);",
"public function log()\n {\n $this->fetchFields();\n Log::console($this);\n }",
"public function logMessage($address, $title, $success = true)\n {\n \n $this->db->orm->insert(\n 'BuizMessageLog',\n array(\n 'title' => $title,\n 'email' => $address,\n 'success' => ($success?'t':'f')\n )\n );\n\n }",
"private function log($severity, $message) {\n echo \"DB:\" . $severity, \": \", $message . \"<br>\\n\";\n }",
"private function send_log() {\n MessageLogger::add_log($this->log);\n $this->log = \"\";\n }",
"public function write()\n {\n echo 'database log write...';\n }",
"public function log($obj);",
"public function log($log) {\n //$this->log = $log;\n }",
"function _log($message)\n{\n\tfwrite($GLOBALS['logfile'], date(\"Y-m-d H:i:s :: \", time()) . $message . \"\\n\");\n}",
"public function __logEvent($msg)\n {\n if ($this->logger) {\n $this->logger->log($msg, 'info', 'queries');\n }\n }",
"public static function SaveLog( $message='' ) {\n\t\tself::$_log = '#' . date('Y-m-d H:i:s') . '#' . $message . \"\\n\";\n\t}",
"private function log($message, $invoice_id = null)\n {\n $enabled = Mage::getStoreConfig(Yellow_Bitcoin_Model_Log::DATABASE_ENABLED_CONFIG_PATH);\n if ($enabled) {\n Mage::getModel(\"bitcoin/log\")->logMessage($message, $invoice_id);\n }\n Mage::log($message, Zend_Log::ERR, \"yellow.log\");\n return true;\n }",
"private function log($message, $invoice_id = null)\n {\n $enabled = Mage::getStoreConfig(Yellow_Bitcoin_Model_Log::DATABASE_ENABLED_CONFIG_PATH);\n if ($enabled) {\n Mage::getModel(\"bitcoin/log\")->logMessage($message, $invoice_id);\n }\n Mage::log($message, Zend_Log::ERR, \"yellow.log\");\n return true;\n }",
"public function log($message): void\n\t{\n\t\t$defaults = [\n\t\t\t'SEVERITY' => 'INFO',\n\t\t\t'AUDIT_TYPE_ID' => $this->auditTypeId,\n\t\t\t'ITEM_ID' => $this->itemId ?: '',\n\t\t];\n\n\t\t$message = $this->logMessToArray($message);\n\n\t\tCEventLog::Add(array_merge($defaults, $message, ['MODULE_ID' => $this->moduleId]));\n\t}",
"public function Log($message) {\n\t\t$callers = debug_backtrace();\n\t\t$this->Write($callers[1]['function'], $message);\n\t}",
"public function log($message, $command='') {\n $this->_log($message, $command, true, true);\n }",
"public function log($data=array()) {\n\t\t$this->getMapper()->log($data);\n\t}",
"public function log($message)\n {\n $view_log = new Logger('SMS Logs');\n\n $view_log->pushHandler(new StreamHandler(storage_path() . '/logs/smslog.log', Logger::INFO));\n\n $view_log->addInfo($message);\n }",
"public function log($message)\n {\n if ($this->logger instanceof LoggerInterface) {\n $this->logger->debug($message);\n } elseif ($logger = $this->logger) {\n $logger($message);\n }\n }",
"private function _log()\n {\n try {\n // Connect\n $dbh = $this->_connectToDb();\n \n // Insert\n $stmt = $dbh->prepare(\"INSERT INTO log_table(`nick`, `said`, `when`, `channel`) VALUES (:nick, :message, NOW(), :channel)\");\n\n $stmt->bindParam(':nick', $this->_data->nick, PDO::PARAM_STR);\n $stmt->bindParam(':message', $this->_data->message, PDO::PARAM_STR);\n $stmt->bindParam(':channel', $this->_data->channel, PDO::PARAM_STR);\n \n if (!$stmt->execute())\n {\n $arr = $stmt->errorInfo();\n print_r($arr);\n }\n\n $dbh = null;\n \t\n }\n catch(PDOException $e)\n {\n echo $e->getMessage();\n }\n }",
"private function log($message, $type = 'info'){\r\n if($this->flow_woocommerce_version_check())\r\n {\r\n $logger = wc_get_logger();\r\n $logger->{$type}($message, array('source' => 'flow_flow'));\r\n }\r\n else{\r\n $logger = new WC_Logger('flow_flow');\r\n $logger->add('flow_flow', $message);\r\n }\r\n \r\n }",
"function mlog($message) {\n\tprint $message;\n}",
"public static function log($type, $message)\n {\n if (self::$log_levels[$type] <= self::$configuration['core']['log_threshold']) {\n $message = array(date('Y-m-d H:i:s P'), $type, $message);\n\n // Run the system.log event\n Event::run('system.log', $message);\n\n self::$log[] = $message;\n }\n }",
"public function log( $message ) {\n\t\tif ( edd_get_option( 'eddeet_debug_mode' ) ) {\n\t\t\t$logger = $GLOBALS['edd_logs'];\n\t\t\t$message = ( is_array( $message ) ? print_r( $message, 1 ) : $message ) . PHP_EOL;\n\t\t\t$logger->log_to_file( $message );\n\t\t}\n\t}",
"public function log($message, $level);",
"protected function _log($message, $locale) {\n\t}",
"function logMe($comment, $status_id = 0, $data = array(), $update_process = 0) {\n\n if (!class_exists('systemToolkit')) {\n return; // not loaded (cache fix)\n }\n $toolkit = systemToolkit::getInstance();\n $centerLogMapper = $toolkit->getMapper('log', 'log');\n\n if(count($data)) {\n ob_start();\n $i = 1;\n foreach($data as $d) {\n var_dump($d);\n if($i < count($data)) {\n echo \"<br />===<br />\";\n }\n $i++;\n }\n $err_content = ob_get_contents();\n ob_end_clean();\n $comment .= \"<br />{$err_content}\";\n }\n\n $log = $centerLogMapper->create();\n $log->setTime(new SQLFunction('UNIX_TIMESTAMP'));\n $log->setModule($toolkit->getRequest()->getModule());\n $log->setAction($toolkit->getRequest()->getAction());\n $log->setComment($comment);\n $log->setStatus($status_id);\n if ($user = systemToolkit::getInstance()->getUser()) {\n $log->setUser($user);\n }\n if ($update_process) {\n $log->setProcessId($update_process);\n }\n $centerLogMapper->save($log);\n}",
"public function log( $message ) {\n\t\t$this->output( date( 'H:i:s' ) . ' ' . $message . \"\\n\", 'pruneChanges::log' );\n\t\t$this->cleanupChanneled();\n\t}",
"public static function log($userId, $actionType, $message) {\n\t}",
"public function log ($txt)\n\t{\n\t\t$this->addQueryLog (\"/* \" . $txt . \" */\");\n\t}",
"public function log (string $msg) : void {\n\t\t$this->logs [] = $msg;\n\t}",
"function log()\n\t{\n\t\tcall_user_func_array(array($this->server, 'log'), func_get_args());\n\t}",
"public static function log($msg){\n\t\tself::createLogExist();\n\n\t\t$fichier = fopen('log/log.txt', 'r+');\n\t\tfputs($fichier, $msg);\n\t}",
"public function logManagerAction() {\r\n $key = $this->object ? $this->object->get($this->primaryKeyField) :\r\n $this->getProperty('elementType') . ' ' . $this->getProperty('elementId') . ' Default';\r\n $this->modx->logManagerAction($this->objectType.'_update_from_element', $this->classKey, $key);\r\n }",
"public function log($message, $level = null, $file = '', $forceLog = false) {\r\n Mage::log(\"Evolucard - \" . $message, $level, $file, $forceLog);\r\n }",
"protected function log($message, $type=Logger::DEBUG){\n\t\tif(is_array($message)||is_object($message)){\n\t\t\t$message = print_r($message, true);\n\t\t}\n\t\t$className = get_class($this);\n\t\tif(!isset(self::$_logger[$className])){\n\t\t\t$controllerName = self::$_controllerName[$className];\n\t\t\tself::$_logger[$className] = new Logger('File', $controllerName.'.txt');\n\t\t}\n\t\tself::$_logger[$className]->log($message, $type);\n\t}",
"private function zlog($msg = null) {\r\n\t\t\r\n\t\t// Evito di loggare se l'ho già fatto\r\n\t\tif (self::$logged !== TRUE) {\r\n\t\t\t// Verifica necessaria ad evitare loop infiniti\r\n\t\t\t// e coerenza semantica\r\n\t\t\t$class = get_class($this->owner);\r\n\t\t\tif ($class !== 'Log'\r\n\t\t\t\t\t\t\t&& $class !== 'DataObject'\r\n\t\t\t\t\t\t\t&& $this->owner instanceof DataObject) {\r\n\r\n\t\t\t\t// Creo il Log\r\n\t\t\t\t$log = new Log();\r\n\t\t\t\t$log->doLog($msg, $this->owner);\r\n\t\t\t\tself::$logged = TRUE;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function log()\n {\n $this->appendLog('log', \\func_get_args());\n }",
"public function addLog($data);",
"public function log( $message ) {\n\n \\WP_CLI::log( $message );\n }",
"public function send($log);",
"protected function _write($message)\n {\n $data = array();\n foreach ($this->_columnMap as $messageField => $modelField) {\n $data[$modelField] = $message[$messageField];\n }\n $model = new $this->_modelName();\n $model->fromArray($data);\n $model->save();\n }",
"public function log($message)\n {\n echo '[' . gmdate('Y-m-d H:i:s') . ' GMT] ' . $message . PHP_EOL;\n }",
"public function actionLog()\n {\n $searchModel = new LogGeoSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('log', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'users' => (new User())->getUsers('name'),\n 'severities' => ArrayHelper::map(Severity::find()->all(), 'name', 'name'),\n 'actions' => LogGeo::find()->select('action')->indexBy('action')->asArray()->column()\n ]);\n }",
"public function afterSave() \n {\n LogProduct::log($this);\n }",
"private function log( $message ) {\n\n\t\tif( defined( 'WP_DEBUG' ) and defined( 'WP_DEBUG_LOG' ) and $this->enable_debug_log == 'yes' ) {\n\t\t\terror_log( '[' . $this->id . '] ' . $message . ' - ' . esc_url( $_SERVER['REQUEST_URI'] ) );\n\t\t}\n\n\t}",
"function log()\n {\n }",
"public static function Log($type,$message,$level)\n \t{\n Log::Write($type,$message,$level);\n \t}",
"function _logMessage($msg) {\n\t\tif ($msg[strlen($msg) - 1] != \"\\n\") {\n\t\t\t$msg .= \"\\n\";\n\t\t}\n\n\t\tif ($this->debug) debug($msg);\n\n\t\t$this->resultsSummary .= $msg;\n\n\t\tif ($this->useLog) {\n\t\t\t$logfile = $this->writeDir . \"cron.log\";\n\t\t\t$file = fopen($logfile, \"a\");\n\t\t\tfputs($file, date(\"r\", time()) . \" \" . $msg);\n\t\t\tfclose($file);\n\t\t}\n\t}",
"public function log($message, $name = \"mercadopago\", $array = null)\n {\n //load admin configuration value, default is true\n $actionLog = $this->scopeConfig->getValue('payment/mercadopago/logs', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n if (!$actionLog) {\n return;\n }\n //if extra data is provided, it's encoded for better visualization\n if (!is_null($array)) {\n $message .= \" - \" . json_encode($array);\n }\n\n //set log\n $this->_mpLogger->setName($name);\n $this->_mpLogger->debug($message);\n }"
] | [
"0.667082",
"0.654459",
"0.65067875",
"0.65067875",
"0.65067875",
"0.6447468",
"0.62092775",
"0.615258",
"0.612445",
"0.6118253",
"0.6080866",
"0.60773015",
"0.60421455",
"0.6007046",
"0.6004927",
"0.5998537",
"0.59630483",
"0.59242696",
"0.5907607",
"0.5906802",
"0.589693",
"0.58644253",
"0.584186",
"0.5840703",
"0.58396",
"0.58267057",
"0.5807475",
"0.580669",
"0.5790599",
"0.57877296",
"0.5785588",
"0.5778912",
"0.57724065",
"0.5766353",
"0.5752196",
"0.5738325",
"0.5733082",
"0.5714901",
"0.5702025",
"0.5681035",
"0.56747764",
"0.56729233",
"0.56704575",
"0.5670256",
"0.56583565",
"0.56565654",
"0.564353",
"0.5643016",
"0.5622913",
"0.56227493",
"0.56182003",
"0.56182003",
"0.5608252",
"0.5602601",
"0.55929965",
"0.5585208",
"0.5583248",
"0.55748636",
"0.55716586",
"0.556723",
"0.5554151",
"0.55482316",
"0.55340594",
"0.5510077",
"0.5501612",
"0.55015004",
"0.54929996",
"0.54864156",
"0.54570675",
"0.54525304",
"0.54503787",
"0.5435196",
"0.5432861",
"0.543073",
"0.5429145",
"0.54235244",
"0.5423428",
"0.54175806",
"0.54143834",
"0.54022485",
"0.5398167",
"0.53979784",
"0.5388819",
"0.53851014",
"0.53794277",
"0.53727067",
"0.53703135",
"0.5368033",
"0.5363443"
] | 0.5452701 | 78 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.