query stringlengths 7 5.25k | document stringlengths 15 1.06M | metadata dict | negatives listlengths 3 101 | negative_scores listlengths 3 101 | document_score stringlengths 3 10 | document_rank stringclasses 102
values |
|---|---|---|---|---|---|---|
set up the menu for the page | protected function _config(){
parent::_config();
Raxan::loadLangFile("info-module");
$this->mnuItem = "RQHIST";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function init_menu()\n {\n // it's a sample code you can init some other part of your page\n }",
"public function create_menu()\n\t{\n\t\t$obj = $this; // PHP 5.3 doesn't allow $this usage in closures\n\n\t\t// Add main menu page\n\t\tadd_menu_page(\n\t\t\t'Testimonials plugin', // page title\... | [
"0.8047479",
"0.7755406",
"0.7702488",
"0.7687351",
"0.75837207",
"0.7532114",
"0.7489759",
"0.74358225",
"0.74358225",
"0.74358225",
"0.74358225",
"0.74358225",
"0.74358225",
"0.7397702",
"0.7367606",
"0.73673207",
"0.7361609",
"0.7360109",
"0.73563904",
"0.73563904",
"0.735... | 0.0 | -1 |
execute the downloading of the search results | function executeDownload($e){
$url = "app/info/exportRequestHistory.php?account=" . $this->account->intVal();
$html = '<iframe src="'.$url.'" width="1" height="1" style="position:absolute;visibility:hidden;"></iframe>';
$this->downloadFrame->html($html);
$this->downloadFrame->updateClient();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function perform()\n {\n $services = $this->getServiceLocator();\n $api = $services->get('Omeka\\ApiManager');\n $em = $services->get('Omeka\\EntityManager');\n $fulltext = $services->get('Omeka\\FulltextSearch');\n $adapters = $services->get('Omeka\\ApiAdapterManager')... | [
"0.6361257",
"0.6280426",
"0.627831",
"0.6207635",
"0.6186784",
"0.602742",
"0.60233086",
"0.601891",
"0.599039",
"0.59218997",
"0.5919306",
"0.58619577",
"0.5861706",
"0.5852299",
"0.58316004",
"0.58262587",
"0.57889855",
"0.5755651",
"0.574532",
"0.57204276",
"0.5719128",
... | 0.55160344 | 45 |
validates the user input. If any errors are detected a message is thrown back to the user. | function validate(){
$errors = array();
// throw message indicating that this field is numeric
if( $this->post->isNumeric('noOfTransactions')==false){
$errors[] = $this->Raxan->locale("request.missing.transcount");
}
// throw message indicating that this field is date
if( $this->post->isDate("startDate","Y-m-d" )==false){
$errors[] = $this->Raxan->locale("request.missing.startdate");
}
// throw message indicating that this field is date
if( $this->post->isDate( "endDate","Y-m-d" )==false ){
$errors[] = $this->Raxan->locale("request.missing.enddate");
}
if(!empty ($errors)) {
$this->postMessage($errors, "Request History");
}
return (count($errors) == 0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function validateInput()\r\n\t{\r\n\t\tif(preg_match('/^[a-zA-Z ]*$/', $this->name) != 1)\r\n\t\t{\r\n\t\t\t$this->err = true;\r\n\t\t\t$this->errMsgBeg .= \"-> Error in name $this->name. Only alphabets allowed.<br>\";\r\n\t\t}\r\n\r\n\t\tif(preg_match('/^[a-zA-Z ]*$/', $this->desg) != 1)\r\n\t\t{\r\n\t\t\t$this->... | [
"0.7772143",
"0.712842",
"0.69577837",
"0.68959486",
"0.6710856",
"0.6654891",
"0.6647198",
"0.65654784",
"0.6496221",
"0.648628",
"0.64478433",
"0.63250214",
"0.63133407",
"0.6303439",
"0.6272516",
"0.62717396",
"0.6262827",
"0.6244222",
"0.62049675",
"0.61535215",
"0.612521... | 0.0 | -1 |
Disables the post meta output for page override pages. | function et_divi_post_meta() {
$pages = array(
intval( \SermonManager::getOption( 'smp_archive_page', 0 ) ),
intval( \SermonManager::getOption( 'smp_tax_page', 0 ) ),
);
if ( in_array( get_the_ID(), $pages ) ) {
return;
}
$postinfo = is_single() ? et_get_option( 'divi_postinfo2' ) : et_get_option( 'divi_postinfo1' );
if ( $postinfo ) :
echo '<p class="post-meta">';
echo et_pb_postinfo_meta( $postinfo, et_get_option( 'divi_date_format', 'M j, Y' ), esc_html__( '0 comments', 'Divi' ), esc_html__( '1 comment', 'Divi' ), '% ' . esc_html__( 'comments', 'Divi' ) );
echo '</p>';
endif;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function GTPress_hide_pagemeta() {\r\n\tif ($options['hide_pagemeta'] == \"true\") {\r\n\t\tremove_meta_box( 'commentstatusdiv' , 'page' , 'normal' ); // allow comments for pages\r\n\t\tremove_meta_box( 'commentsdiv' , 'page' , 'normal' ); // recent comments for pages\r\n\t\tremove_meta_box( 'postcustom' , 'page' ... | [
"0.66883796",
"0.6576502",
"0.65356094",
"0.63084507",
"0.6219939",
"0.62009853",
"0.61779034",
"0.6133651",
"0.610209",
"0.6045825",
"0.6035358",
"0.60270786",
"0.60161924",
"0.60146725",
"0.60054636",
"0.6002945",
"0.59766525",
"0.5958209",
"0.59444606",
"0.5912538",
"0.590... | 0.5416802 | 66 |
/ This action is for AJAX request. It is update role to user | public function actionUserRole ()
{
$userClass = $this->module->modelUser;
$post = Yii::$app->request->post();
$user = $userClass::findOne($post[ 'id' ]);
if (!is_null($user))
{
LogManager::info(Yii::tr('Пользователю {user} забрали права {roles}', [ 'user' => Html::a($user->name, Url::toRoute([ 'user/view', 'id' => $user->id ])), 'roles' => implode(',', $user->getRolesNames()) ]));
$user->revokeAllRoles();
if (is_array($post[ 'roles' ]))
{
foreach ($post[ 'roles' ] as $item)
{
$user->assignRole($item);
}
LogManager::info(Yii::tr('Пользователю {user} добавили права {roles}', [ 'user' => Html::a($user->name, Url::toRoute([ 'user/view', 'id' => $user->id ])), 'roles' => implode(',', $post[ 'roles' ]) ]));
}
}
Yii::$app->end();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function updateRole()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $roleId = $this->input->post('id');\n $permission = $this->input->post('permission');\n\n $result = $this->user_model->getRoleById($roleId);\n $roleI... | [
"0.75765955",
"0.7356477",
"0.7356477",
"0.72884315",
"0.7019333",
"0.700097",
"0.6976736",
"0.69685894",
"0.6904019",
"0.6892237",
"0.68651235",
"0.68599737",
"0.68152994",
"0.6809636",
"0.67967093",
"0.67960227",
"0.6789575",
"0.6750718",
"0.66134864",
"0.6611033",
"0.65999... | 0.6472073 | 33 |
/ This action is for AJAX request. It is updated user state | public function actionUserState ()
{
$userClass = $this->module->modelUser;
$post = Yii::$app->request->post();
$user = $userClass::findOne($post[ 'id' ]);
if (!is_null($user))
{
$user->active = $post[ 'state' ];
$user->save();
}
echo $post[ 'state' ];
Yii::$app->end();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function ajax()\n {\n /*if($name!=\"\"){\n switch($name){\n case 'change_active':\n $post['active'] = $status;\n $this->User_model->update($post, $id); \n break;\n } \n exit;\... | [
"0.71458447",
"0.6762442",
"0.67342544",
"0.6637328",
"0.65887475",
"0.6523613",
"0.6452264",
"0.6402767",
"0.63874763",
"0.63832074",
"0.6275622",
"0.62668157",
"0.62442404",
"0.61525166",
"0.61373824",
"0.61338836",
"0.60916984",
"0.6059978",
"0.60338604",
"0.60128397",
"0.... | 0.6703804 | 3 |
/ This action is for AJAX request. It is updated user state | public function actionDeleteRole ()
{
$auth = Yii::$app->getAuthManager();
$role = $auth->getRole(Yii::$app->request->get('id'));
$auth->remove($role);
$url = Yii::$app->request->referrer . '#roles';
Yii::$app->response->redirect($url);
Yii::$app->end();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function ajax()\n {\n /*if($name!=\"\"){\n switch($name){\n case 'change_active':\n $post['active'] = $status;\n $this->User_model->update($post, $id); \n break;\n } \n exit;\... | [
"0.7146494",
"0.67626685",
"0.67346317",
"0.67025316",
"0.66367507",
"0.65867823",
"0.65237945",
"0.6450205",
"0.6402459",
"0.6388498",
"0.6383541",
"0.62761426",
"0.6265329",
"0.6244161",
"0.6151987",
"0.61368227",
"0.6134925",
"0.6089534",
"0.6059676",
"0.603263",
"0.601421... | 0.0 | -1 |
define: get all users | public function index(EmailContract $emailContract,UserRequest $userRequest,CakesInterface $cakes)
{
return [
'cakes' => $cakes->get(),
'request' => $userRequest->all(),
'users' => $this->userBuilder()->get(),
'email' => $emailContract->getRepository(),
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getUsers();",
"public function getUsers();",
"public function getUsers();",
"function getUsers(){\n }",
"function getUsers(){\n }",
"public static function retrieveAllUsers() {\n return R::getAll('SELECT * FROM user');\n }",
"public function allUsers()\n {\n // $sql ... | [
"0.8517538",
"0.8517538",
"0.8517538",
"0.8317765",
"0.8317765",
"0.8223965",
"0.8196913",
"0.8192783",
"0.81922215",
"0.81817895",
"0.81480294",
"0.81066304",
"0.8080534",
"0.80724823",
"0.8071948",
"0.8061015",
"0.80377525",
"0.80038714",
"0.7962495",
"0.79341245",
"0.79251... | 0.0 | -1 |
Returns the static model of the specified AR class. | public static function model($className=__CLASS__)
{
return parent::model($className);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function model()\r\n {\r\n return static::class;\r\n }",
"public static function model() {\n return parent::model(get_called_class());\n }",
"public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }",
"public static function model($cl... | [
"0.74850124",
"0.73803526",
"0.7154113",
"0.71401674",
"0.70629025",
"0.703232",
"0.69285315",
"0.69285315",
"0.6925706",
"0.6902751",
"0.6894916",
"0.6894916",
"0.68900806",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.... | 0.0 | -1 |
Retrieves a list of models based on the current search/filter conditions. | public function search()
{
// Warning: Please modify the following code to remove attributes that
// should not be searched.
$criteria=new CDbCriteria;
$criteria->compare('id',$this->id,true);
$criteria->compare('role_id',$this->role_id);
$criteria->compare('function_id',$this->function_id);
$criteria->compare('baserole_id',$this->baserole_id);
$criteria->compare('created_date',$this->created_date,true);
$criteria->compare('last_updated_date',$this->last_updated_date,true);
$criteria->compare('last_updated_person',$this->last_updated_person,true);
return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getModels();",
"public function getModels();",
"public function findAll($model);",
"public function getListSearch()\n {\n //set warehouse and client id\n $warehouse_id = ( !is_numeric(request()->get('warehouse_id')) ) ? auth()->user()->current_warehouse_id : request()->get('w... | [
"0.674474",
"0.674474",
"0.6608898",
"0.6481127",
"0.6379887",
"0.63463205",
"0.6310358",
"0.63012093",
"0.6253843",
"0.62498426",
"0.62498426",
"0.6113065",
"0.60784054",
"0.6073788",
"0.6047258",
"0.60358477",
"0.60340405",
"0.6014864",
"0.5982939",
"0.598029",
"0.59800965"... | 0.0 | -1 |
Display a listing of the resource. | public function __construct()
{
$this->kitchenRecipeRepository = app(KitchenRecipeRepository::class);
$this->kitchenIngredientRepository = app(KitchenIngredientRepository::class);
$this->kitchenIngredientKitchenRecipeRepository = app(KitchenIngredientKitchenRecipeRepository::class);
} | {
"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->re... | [
"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.683052... | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
$recipe = new KitchenRecipe();
$ingredientList = $this->kitchenIngredientRepository->getForComboBox();
return view('kitchen.admin.recipes.edit',
compact('recipe', 'ingredientList'));
} | {
"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(... | [
"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.717428... | 0.0 | -1 |
Store a newly created resource in storage. | public function store(KitchenRecipeCreateRequest $request)
{
$data = $request->input();
$data['user_id'] = Auth::user()->id;
$recipe = (new KitchenRecipe())->create($data);
if($recipe){
return redirect()->route('kitchen.admin.recipes.edit', [$recipe->id])
->with(['success' => 'Saved successfully']);
}else{
return back()->withErrors(['msg' => 'Save error'])
->withInput();
}
} | {
"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... | [
"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.63424... | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
$recipe = $this->kitchenRecipeRepository->getRecipe($id);
$quantity = $this->kitchenIngredientKitchenRecipeRepository->getQuantitiesForIngredients($id);
return view('kitchen.admin.recipes.show', compact('recipe', 'quantity'));
} | {
"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... | [
"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.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
$recipe = $this->kitchenRecipeRepository->getRecipe($id);
$quantity = $this->kitchenIngredientKitchenRecipeRepository->getQuantitiesForIngredients($id);
$ingredientList = $this->kitchenIngredientRepository->getForComboBox();
if (empty($recipe)) {
abort(404);//если не нашли модель то 404
}
return view('kitchen.admin.recipes.edit',
compact('recipe', 'quantity', 'ingredientList'));
} | {
"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 ... | [
"0.78557473",
"0.76946205",
"0.72731614",
"0.7241571",
"0.71700776",
"0.70650244",
"0.7052897",
"0.698311",
"0.69465625",
"0.6944826",
"0.69399333",
"0.69286525",
"0.69031185",
"0.68969506",
"0.68969506",
"0.6878258",
"0.6862812",
"0.6859171",
"0.68560475",
"0.68436426",
"0.6... | 0.0 | -1 |
Update the specified resource in storage. | public function update(KitchenRecipeUpdateRequest $request, $id)
{
$recipe = $this->kitchenRecipeRepository->getEdit($id);
if (empty($recipe)) {
return back()
->withErrors(['msg' => "Record id = [ {$id} ] not found"])
->withInput();
}
$data = $request->all();
$result = $recipe->update($data);
if($result){
return redirect()
->route('kitchen.admin.recipes.edit', $recipe)
->with(['success' => 'Saved successfully']);
} else {
return back()
->withErrors(['msg' => 'Save error'])
->withInput();
}
} | {
"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 ... | [
"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.5890... | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
$result = KitchenRecipe::destroy($id);
if ($result) {
return redirect()
->route('kitchen.admin.recipes.index')
->with(['success' => "ID [ $id ] entry deleted"]);
} else {
return back()->withErrors(['msg' => 'Delete Error']);
}
} | {
"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 ... | [
"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.5897... | 0.0 | -1 |
Renders HTML code for custom tab. | public function getTab()
{
return '<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABh0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzT7MfTgAAAY9JREFUOI2lkj1rVUEQhp93d49XjYiCUUFtgiBpFLyWFhKxEAsbGy0ErQQrG/EHCII/QMTGSrQ3hY1FijS5lQp2guBHCiFRSaLnnN0di3Pu9Rpy0IsDCwsz8+w776zMjP+J0JV48nrufMwrc2AUbt/CleMv5ycClHH1UZWWD4MRva4CByYDpHqjSgKEETcmHiHmItW5STuF/FfAg8HZvghHDDMpkKzYXScPgFcx9XBw4WImApITn26cejEAkJlxf7F/MOYfy8K3OJGtJlscKsCpAJqNGRknd+jO6TefA8B6WU1lMrBZ6fiE1R8Zs7hzVJHSjvJnNMb/hMSmht93IYIP5Qhw99zSx1vP+5eSxZmhzpzttmHTbcOKk+413Sav4v3J6ZsfRh5sFdefnnhr2Gz75rvHl18d3aquc43f1/BjaN9V1wn4tq6eta4LtnUCQuPWHmAv0AOKDNXstZln2/f3zgCUX8oFJx1zDagGSmA1mn2VmREk36pxw5NgzVqDhOTFLhjtOgMxmqVOE/81fgFilqPyaom5BAAAAABJRU5ErkJggg==">callback';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function render_tab($key,$tab){\n global $post;\n echo '<h2>'.apply_filters('GWP_custom_tab_title',$tab['title'],$tab,$key).'</h2>';\n echo apply_filters('GWP_custom_tab_content',$tab['content'],$tab,$key);\n }",
"private function renderTabs()\n {\n ?>\n <h2 class=\"nav-t... | [
"0.7119224",
"0.70590043",
"0.68497926",
"0.68094987",
"0.6714029",
"0.6694266",
"0.66703576",
"0.6587499",
"0.65872157",
"0.63828075",
"0.63728905",
"0.62962013",
"0.62494946",
"0.6232096",
"0.62179786",
"0.61988485",
"0.6189633",
"0.61366624",
"0.6133953",
"0.6120614",
"0.6... | 0.5905769 | 34 |
Renders HTML code for custom panel. | public function getPanel()
{
$items = $this->items;
ob_start();
require_once __DIR__ . "/Callback.phtml";
return ob_get_clean();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function render()\n {\n\n $this->setUp();\n \n $html = '';\n \n // $html .= $this->panelTitle();\n $html .= $this->panelMenu();\n // $html .= $this->panelButtons();\n \n if ($this->subPannel) {\n foreach ($this->subPannel as $subPa... | [
"0.7449529",
"0.7013223",
"0.70042974",
"0.66466624",
"0.6574167",
"0.65655375",
"0.65591407",
"0.64912575",
"0.64757884",
"0.6472299",
"0.64442617",
"0.6423426",
"0.64165133",
"0.64089715",
"0.63769734",
"0.63768154",
"0.6357087",
"0.63555574",
"0.63422155",
"0.631103",
"0.6... | 0.6072721 | 40 |
Handles an incomuing request and saves the data if necessary. | private function processRequest()
{
$request = NEnvironment::getService('httpRequest');
if ($request->isPost() && $request->isAjax() && $request->getHeader('x-callback-client')) {
$data = json_decode(file_get_contents('php://input'), TRUE);
if (count($data) > 0) {
foreach ($data as $key => $value) {
if (isset($this->items[$key]) && isset($this->items[$key]['callback']) && $value === TRUE) {
$this->items[$key]['callback']->invokeArgs($this->items[$key]['args']);
}
}
}
die(json_encode(array('status' => "OK")));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract function handleRequest();",
"private function handlePostRequest() {\n $this->store();\n }",
"public function handleRequest() {}",
"abstract public function handle_request();",
"public function handleDataSubmission() {}",
"public function handleRequest() {\n\t\t\n\t\tif (is_nu... | [
"0.66231966",
"0.6583789",
"0.65708536",
"0.6460047",
"0.64457726",
"0.6346557",
"0.6308204",
"0.6308204",
"0.6308204",
"0.6267159",
"0.6256219",
"0.62231654",
"0.61323",
"0.6128386",
"0.60756946",
"0.60458106",
"0.60281986",
"0.60217947",
"0.6019527",
"0.6010355",
"0.6001802... | 0.5825159 | 28 |
Create a new command instance. | public function __construct()
{
parent::__construct();
} | {
"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 }",
"pu... | [
"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.6315... | 0.0 | -1 |
Execute the console command. | public function handle()
{
$f = new SheetController;
$f->GetAllFunc();
$this->info('Get All Data Successfully');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }",
"public function handle()\n {\n //get us the Converter class instance and call the convert() meth... | [
"0.6469971",
"0.64641356",
"0.6427384",
"0.6349752",
"0.63188183",
"0.62750113",
"0.6261585",
"0.6261214",
"0.6235854",
"0.6225116",
"0.6222161",
"0.6214144",
"0.6193531",
"0.6191337",
"0.6183868",
"0.61772275",
"0.61766857",
"0.6172786",
"0.6149171",
"0.6148903",
"0.61484134... | 0.0 | -1 |
les methodes de constructeur de la class | public function __conctruct($Matricule="",$Nom="",$Prenom="",$Email="",$Tel="",$Naiss=""){
$this->Matricule=$Matricule;
$this->Nom=$Nom;
$this->Prenom=$Prenom;
$this->Email=$Email;
$this->Tel=$Tel;
$this->Naiss=$Naiss;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function __construct() ;",
"function _construct(){ }",
"function _construct() {\n \t\n\t\t\n\t}",
"public function __construct()\n {\n //koji su mu prosledjeni\n $a = func_get_args();\n $i = func_num_args();\n $f = \"__construct\" . $i;\n if (method_exists($this, $f))... | [
"0.7992371",
"0.797857",
"0.7901767",
"0.7890786",
"0.78808475",
"0.78808475",
"0.78808475",
"0.78808475",
"0.78808475",
"0.78808475",
"0.78808475",
"0.78808475",
"0.78808475",
"0.78808475",
"0.78808475",
"0.78808475",
"0.78808475",
"0.78808475",
"0.78808475",
"0.78808475",
"... | 0.0 | -1 |
les getters et setters | public function getMatricule(){
return $this->$Matricule;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function setRequiredGetters();",
"public static function setters();",
"public static function getters();",
"abstract protected function getDirectGetters();",
"public static function setters()\n {\n return parent::setters() + self::$setters;\n }",
"public static function se... | [
"0.7417559",
"0.7414373",
"0.69296813",
"0.68948793",
"0.6875738",
"0.6875738",
"0.6875738",
"0.6875738",
"0.6875738",
"0.6875738",
"0.6875738",
"0.6875738",
"0.6875738",
"0.6875738",
"0.6875738",
"0.6875738",
"0.6875738",
"0.68352044",
"0.66705173",
"0.66705173",
"0.66705173... | 0.0 | -1 |
Operation metadata for suggesting Trials. Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; | public function getGenericMetadata()
{
return $this->generic_metadata;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setGenericMetadata($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\AIPlatform\\V1\\GenericOperationMetadata::class);\n $this->generic_metadata = $var;\n\n return $this;\n }",
"private function getDefaultOperationDescriptor()\n {\n return [\n ... | [
"0.63990295",
"0.4166838",
"0.41522458",
"0.41314238",
"0.41055712",
"0.40080577",
"0.39407963",
"0.39168134",
"0.39081725",
"0.3898466",
"0.3898466",
"0.3848293",
"0.3848293",
"0.3848293",
"0.38397527",
"0.3832415",
"0.38169038",
"0.37977087",
"0.37752447",
"0.3773832",
"0.3... | 0.48028782 | 1 |
Operation metadata for suggesting Trials. Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; | public function setGenericMetadata($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GenericOperationMetadata::class);
$this->generic_metadata = $var;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getGenericMetadata()\n {\n return $this->generic_metadata;\n }",
"private function getDefaultOperationDescriptor()\n {\n return [\n 'additionalArgumentMethods' => [\n 'getProject',\n ],\n 'getOperationMethod' => 'get',\n ... | [
"0.4805241",
"0.41680086",
"0.41534734",
"0.41330716",
"0.41056505",
"0.40094134",
"0.39423403",
"0.39165655",
"0.39105156",
"0.39003325",
"0.39003325",
"0.3850425",
"0.3850425",
"0.3850425",
"0.3840812",
"0.38329694",
"0.38173684",
"0.37985247",
"0.3776517",
"0.37754166",
"0... | 0.6402459 | 0 |
The name of the Study that the Trial belongs to. Generated from protobuf field string study = 2; | public function getStudy()
{
return $this->study;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setStudy($var)\n {\n GPBUtil::checkString($var, True);\n $this->study = $var;\n\n return $this;\n }",
"public function getStudy() {\n return $this->study;\n }",
"public function study($study)\n {\n return $this->setProperty('study', $study);\n }... | [
"0.6861962",
"0.6792853",
"0.623606",
"0.5847146",
"0.5812718",
"0.5683688",
"0.55522424",
"0.5541581",
"0.5491312",
"0.5356669",
"0.5351869",
"0.5297596",
"0.5206098",
"0.5153492",
"0.51351804",
"0.513271",
"0.50789213",
"0.5077319",
"0.50191617",
"0.49935588",
"0.48870632",... | 0.6801605 | 1 |
The name of the Study that the Trial belongs to. Generated from protobuf field string study = 2; | public function setStudy($var)
{
GPBUtil::checkString($var, True);
$this->study = $var;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getStudy()\n {\n return $this->study;\n }",
"public function getStudy() {\n return $this->study;\n }",
"public function study($study)\n {\n return $this->setProperty('study', $study);\n }",
"public function getStudyNameAttribute() : array\n {\n re... | [
"0.6801654",
"0.67929095",
"0.62360054",
"0.5846423",
"0.58127",
"0.56817496",
"0.55520034",
"0.5541691",
"0.54908645",
"0.5356461",
"0.5350699",
"0.52990466",
"0.5205343",
"0.5152842",
"0.5133147",
"0.5130118",
"0.50790954",
"0.50769526",
"0.50185114",
"0.4992704",
"0.488717... | 0.68623024 | 0 |
The Trial name. Generated from protobuf field string trial = 3; | public function getTrial()
{
return $this->trial;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setTrial($var)\n {\n GPBUtil::checkString($var, True);\n $this->trial = $var;\n\n return $this;\n }",
"public function setTrial($var)\n {\n GPBUtil::checkBool($var);\n $this->trial = $var;\n }",
"public function getTestName()\n {\n return... | [
"0.6959069",
"0.60511255",
"0.56788844",
"0.5525171",
"0.54144335",
"0.53606683",
"0.53512686",
"0.53417104",
"0.5328052",
"0.5311915",
"0.517964",
"0.5170651",
"0.51238775",
"0.50966567",
"0.5058289",
"0.50356996",
"0.50350535",
"0.50313056",
"0.5023662",
"0.5021137",
"0.501... | 0.6641656 | 2 |
The Trial name. Generated from protobuf field string trial = 3; | public function setTrial($var)
{
GPBUtil::checkString($var, True);
$this->trial = $var;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getTrial()\n {\n return $this->trial;\n }",
"public function getTrial()\n {\n return $this->trial;\n }",
"public function setTrial($var)\n {\n GPBUtil::checkBool($var);\n $this->trial = $var;\n }",
"public function getTestName()\n {\n re... | [
"0.6639841",
"0.6639841",
"0.6050458",
"0.5678793",
"0.5526156",
"0.54142904",
"0.53614044",
"0.5352728",
"0.5341378",
"0.532781",
"0.5312134",
"0.5179343",
"0.5170307",
"0.51256025",
"0.509686",
"0.50585043",
"0.5036341",
"0.50358063",
"0.50311935",
"0.5025439",
"0.5022599",... | 0.69583505 | 0 |
Display a listing of the resource. | public function index()
{
$empleados = Empleado::all();
$tipos = TipoAusencia::all();
return view('tiposausencia.list', ['tipos' => $tipos,'empleados'=>$empleados]);
} | {
"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->re... | [
"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.683052... | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{ $empleados = Empleado::all();
return view('tiposausencia.add',['empleados'=>$empleados]);
} | {
"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(... | [
"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.717428... | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
$empleados = Empleado::all();
if ($request->has(['remunerada'])) {
$tipoAusencia = TipoAusencia::create($request->all());
$tipos = TipoAusencia::all();
return view('tiposausencia.list', ['tipos' => $tipos,'empleados'=>$empleados]);
} else {
$request['remunerada'] = 0;
$tipoAusencia = TipoAusencia::create($request->all());
$tipos = TipoAusencia::all();
return view('tiposausencia.list', ['tipos' => $tipos,'empleados'=>$empleados]);
}
} | {
"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... | [
"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.63424... | 0.0 | -1 |
Display the specified resource. | public function show(TipoAusencia $tipoAusencia)
{
//
} | {
"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... | [
"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.0 | -1 |
Show the form for editing the specified resource. | public function edit(TipoAusencia $tipoAusencia)
{
//
} | {
"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 ... | [
"0.78557473",
"0.76946205",
"0.72731614",
"0.7241571",
"0.71700776",
"0.70650244",
"0.7052897",
"0.698311",
"0.69465625",
"0.6944826",
"0.69399333",
"0.69286525",
"0.69031185",
"0.68969506",
"0.68969506",
"0.6878258",
"0.6862812",
"0.6859171",
"0.68560475",
"0.68436426",
"0.6... | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, TipoAusencia $tipoAusencia)
{
//
} | {
"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 ... | [
"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.5890... | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy(TipoAusencia $tipoAusencia)
{
//
} | {
"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 ... | [
"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.5897... | 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 }"... | [
"0.8399528",
"0.83755803",
"0.83755803",
"0.8342532",
"0.8252005",
"0.8246491",
"0.82114965",
"0.81451535",
"0.81095713",
"0.80819905",
"0.799094",
"0.79885143",
"0.79823685",
"0.7959513",
"0.7950321",
"0.7947592",
"0.7925319",
"0.7914417",
"0.7899287",
"0.7892423",
"0.788904... | 0.0 | -1 |
Get the validation rules that apply to the request. | public function rules()
{
return [
'bank_code'=>'required|between:16,23',
'account_name'=>'required|max:20',
'bank_name'=>'required|max:20',
'bank_addr'=>'required|max:30',
'start_use_status'=>'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 sche... | [
"0.8343512",
"0.8012754",
"0.79354686",
"0.7924697",
"0.7923019",
"0.79037243",
"0.78584236",
"0.77891105",
"0.7782752",
"0.77622926",
"0.7736263",
"0.7731162",
"0.77092546",
"0.76918215",
"0.76851976",
"0.7681545",
"0.7681545",
"0.7681545",
"0.7681545",
"0.7681545",
"0.76815... | 0.0 | -1 |
Creates the storage for the EventSearch. | public function createStorage(array $context = []): void; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function createStorage();",
"protected function initStorageObjects()\n {\n $this->event = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }",
"public function storeEvent(){\n \t$eventStore = new Event_Store();\n\n\t\t$eventStore->command = $this->command; \t\n\t\t$eventStor... | [
"0.6347352",
"0.5975185",
"0.59709096",
"0.59670013",
"0.58810544",
"0.567084",
"0.56659204",
"0.56463516",
"0.56438327",
"0.5629136",
"0.5459358",
"0.5458202",
"0.54375243",
"0.5434793",
"0.54336023",
"0.5427059",
"0.54206926",
"0.5412159",
"0.5399811",
"0.5398859",
"0.53915... | 0.5265691 | 38 |
Returns debugging information about the storage for the EventSearch. | public function describeStorage(array $context = []): string; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __debugInfo()\n {\n return [\n 'bucketName' => $this->collectionWrapper->getBucketName(),\n 'databaseName' => $this->collectionWrapper->getDatabaseName(),\n 'file' => $this->file,\n ];\n }",
"protected function getStorageInfo() {\n\t\t$dirInfo ... | [
"0.67927533",
"0.6444579",
"0.6097631",
"0.6096465",
"0.6049517",
"0.6048571",
"0.6039329",
"0.60364914",
"0.6006205",
"0.59229577",
"0.5883546",
"0.58581346",
"0.5849392",
"0.57603025",
"0.5732927",
"0.573185",
"0.57182527",
"0.57088715",
"0.56939936",
"0.5657948",
"0.564423... | 0.5552894 | 28 |
Adds an array of events to the search index. | public function indexEvents(array $events, array $context = []): void; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function add_event(array $event) {\n if (empty($event['type']) or\n empty($event['name']) or\n empty($event['data'])) {\n return (false);\n }\n $this->__results[] =\n array('type' => $event['type'],\n 'name' => $event['name'],\n 'data' => $event['data']... | [
"0.6150777",
"0.5819724",
"0.56906074",
"0.5678503",
"0.56622005",
"0.5488365",
"0.5414868",
"0.5350852",
"0.53371793",
"0.52402157",
"0.5176392",
"0.5176392",
"0.51722205",
"0.51677614",
"0.51594925",
"0.51197886",
"0.5102104",
"0.5085425",
"0.5073141",
"0.506427",
"0.504966... | 0.599336 | 1 |
Deletes an array events by their identifiers (the "event_id" field on the event). | public function deleteEvents(array $eventIds, array $context = []): void; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete(array $ids);",
"function deleteItems($itemids) {\r\n $event = new mosEventCal_Event();\r\n\tforeach($itemids AS $itemid) {\r\n\t $event->delete($itemid);\t\r\n\t}\r\n}",
"public function delete(array $ids)\n {\n\n }",
"public function delete($ids){\n \n $filter = ... | [
"0.7017683",
"0.69400126",
"0.677669",
"0.6579054",
"0.6548128",
"0.65366983",
"0.64679104",
"0.6464421",
"0.64289457",
"0.63672334",
"0.6338343",
"0.62950206",
"0.61640596",
"0.61266243",
"0.60348094",
"0.602979",
"0.6000051",
"0.59990793",
"0.59835464",
"0.5943345",
"0.5921... | 0.705966 | 0 |
Executes a search request and populates the provided response object with the events found, total, time_taken, etc. | public function searchEvents(Message $request, ParsedQuery $parsedQuery, Message $response, array $curies = [], array $context = []): void; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function run($request) {\n\n\t\t$ef = new EventApi;\n\n\t\t$query_attributes = array(\n\t\t\t'category' => 6, \n\t\t\t'location' => 363,\n\t\t\t'modified_since' => date('Y-m-d h:i:s', strtotime('-30 days')),\n\t\t\t'created_since' => date('Y-m-d h:i:s', strtotime('-30 days'))\n\t\t\t); \n\n\t\t$results = $ef->get_... | [
"0.6132697",
"0.6092422",
"0.5712649",
"0.566634",
"0.56584215",
"0.5634493",
"0.56007993",
"0.5557639",
"0.5522946",
"0.551089",
"0.5505492",
"0.5501669",
"0.54963607",
"0.5492992",
"0.5457747",
"0.54550695",
"0.54383665",
"0.5420487",
"0.5419508",
"0.5415758",
"0.537435",
... | 0.6725314 | 0 |
Adds "apiKey" GET parameter with provided API key | public function handle($item)
{
if ($item instanceof RequestData && null !== $item->request) {
$params = [];
$uri = $item->request->getUri();
parse_str($uri->getQuery(), $params);
$params['apiKey'] = $this->apiKey;
$item->request = $item->request->withUri($uri->withQuery(http_build_query($params)), true);
}
return parent::handle($item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setApiKey($apiKey);",
"public function setApiKey($apiKey);",
"public function setApiKey($apiKey){\n $this->apiKey=$apiKey;\n }",
"public function setApiKey($apiKey){\n\t\t$this->apiKey = $apiKey;\n\t}",
"public function setApiKey($apiKey) {\n\t\t$this->apiKey = $apiKey;\n\t}",
"public... | [
"0.75884235",
"0.75884235",
"0.751295",
"0.7372051",
"0.72220236",
"0.7218761",
"0.7149062",
"0.7149062",
"0.71054476",
"0.70330113",
"0.69746786",
"0.69625527",
"0.69108564",
"0.69108564",
"0.68919456",
"0.68868256",
"0.68868256",
"0.6875334",
"0.6870129",
"0.6805967",
"0.67... | 0.0 | -1 |
/ This function copy the image from source and paste it to the given path Upload file from one place and copy to the local path given in $sPath | public function upload($sTempFileName,$sPath)
{
copy($sTempFileName,$sPath);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function upload_file($src, $dest){\t\n\t\tif(!empty($src)){\t\t\t\n\t\t\t// copy the file to the image path\t\t\t\n\t\t\tif(!copy($src, $dest)){\n\t\t\t\techo 'failed to copy the file';\n\t\t\t}else{\t\t\t\t\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t}",
"public function copyImages();",
"function copyAndCreateThum... | [
"0.6911289",
"0.665955",
"0.6550622",
"0.6444078",
"0.64309424",
"0.6393903",
"0.6331234",
"0.625029",
"0.6242332",
"0.6148443",
"0.61207306",
"0.60888773",
"0.6075748",
"0.60580474",
"0.60503244",
"0.6035944",
"0.602541",
"0.59552026",
"0.59525466",
"0.59483725",
"0.59213084... | 0.6267914 | 7 |
Display a listing of the resource. | public function index()
{
$ds = AccountService::all();
$gr = DB::table('service_groups')->get();
return view('BE.account.show', compact('ds','gr'));
} | {
"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->re... | [
"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.683052... | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
$data['type_service'] = DB::table("service_types")->select("service_type_id", "service_type_name")->get();
$data['group_service'] = DB::table("service_groups")->select("service_group_id", "service_group_name")->get();
return view('BE.hosting.create',$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(... | [
"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.717428... | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
// store ajax rồi
} | {
"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... | [
"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.63424... | 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... | [
"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.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
$data['type_service'] = DB::table("service_types")->select("service_type_id", "service_type_name")->get();
$data['group_service'] = DB::table("service_groups")->select("service_group_id", "service_group_name")->get();
$row = AccountService::find($id);
$data['price'] =DB::table('service_price')->where('sku',$row->sku)->get();
return view('BE.account.edit',compact('row'),$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 ... | [
"0.78557473",
"0.76946205",
"0.72731614",
"0.7241571",
"0.71700776",
"0.70650244",
"0.7052897",
"0.698311",
"0.69465625",
"0.6944826",
"0.69399333",
"0.69286525",
"0.69031185",
"0.68969506",
"0.68969506",
"0.6878258",
"0.6862812",
"0.6859171",
"0.68560475",
"0.68436426",
"0.6... | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
$sp = AccountService::find($id);
$fileimg = $request->file('image'); // tạo biến lấy dữ liệu từ input
if ($fileimg){
$fileimg = $request->file('image'); // tạo biến lấy dữ liệu từ input
$filename = $fileimg->getClientOriginalName(); // lấy tên theo tên gốc của file
$pathimg = $fileimg->move(public_path().'/image/', $filename); //chỗ chứa file
$sp->account_image = $filename;
$sp->name = $request->get('name');
$sp->slug =\Str::slug($request->get('name'));
$sp->service_group_id = $request->get('getgroup');
$sp->service_type_id = $request->get('gettype');
$sp->sku = AccountService::find($id)->sku;
$sp->display = $request->get('display');
$sp->account_info = $request->get('account_info');
}
else{
$sp->name = $request->get('name');
$sp->slug =\Str::slug($request->get('name'));
$sp->service_group_id = $request->get('getgroup');
$sp->service_type_id = $request->get('gettype');
$sp->sku = AccountService::find($id)->sku;
$sp->display = $request->get('display');
$sp->account_info = $request->get('account_info');
}
$prices = $request->get('price');
$times = $request->get('time');
if(isset($prices) && isset($times)){
$value = array_combine($times,$prices);
foreach($value as $key => $packs){
$combo = new Price;
$combo->service_group_id = $sp->service_group_id;
$combo->service_type_id = $sp->service_type_id;
$combo->sku = $sp->sku;
$combo->service_price = $packs;
$combo->service_time = $key;
$combo->save();
}}
$name = Auth::user()->name;
$namedv = $sp->name;
$log = new LogAdmin([
'id_user' => Auth::user()->id,
'task' => " $name sửa cập nhật lại tài khoản $namedv ",
]);
$log->save();
$sp->save();
toast('Cập Nhật Tài Khoản Thành Công!','success');
return redirect()->route('account.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 ... | [
"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.5890... | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
$sp = AccountService::find($id);
$sp->delete();
$delprice = DB::table('service_price')->where('sku',$sp->sku)->delete();
alert()->success('Thành công','Đã xóa Tài Khoản');
$name = Auth::user()->name;
$namedv = $sp->name;
$log = new LogAdmin([
'id_user' => Auth::user()->id,
'task' => " $name đã xóa tài khoản $namedv ",
]);
$log->save();
return redirect()->route('account.index');
} | {
"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 ... | [
"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.5897... | 0.0 | -1 |
The Simple PHP Blog is released under the GNU Public License. You are free to use and modify the Simple PHP Blog. All changes must be uploaded to SourceForge.net under Simple PHP Blog or emailed to apalmo bigevilbrain com Form Validation Functions | function isInt($value, $empty) {
if (strlen($value) == 0) { return $empty; }
return preg_match('!^\d+$!', $value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function validate_blog_form()\n {\n }",
"public function validateMakeBlog(){\n\n }",
"function validate_blog_signup()\n {\n }",
"function publicDefault() {\n\t\n\t\t// if admin rights, redirect to admin page\n\t\tif ($GLOBALS['objUser']->hasAccess(5)) {\n\t\t\tTznUtils::redirect(CMS_WWW_URI.'a... | [
"0.78776085",
"0.6961087",
"0.68702066",
"0.6117388",
"0.6094298",
"0.5989978",
"0.59651744",
"0.596469",
"0.5934549",
"0.58831805",
"0.5846629",
"0.5826263",
"0.5826263",
"0.5826263",
"0.5826263",
"0.5777231",
"0.57694906",
"0.57415575",
"0.5741122",
"0.5733018",
"0.5719762"... | 0.0 | -1 |
Form Utility Functions Strips slashes if magic quotes is on. | function smartstripslashes($str) {
if ( get_magic_quotes_gpc() == true ) {
$str = stripslashes($str);
}
return $str;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function fix_input_quotes() {\n if(get_magic_quotes_gpc()) {\n array_stripslashes($_GET);\n array_stripslashes($_POST);\n array_stripslashes($_COOKIE);\n } // if\n }",
"public static function removeMagicQuotes() {\r\n if (get_magic_quotes_gpc() ) {\r\n \tif(isset($_GET)){\r\n ... | [
"0.7544382",
"0.7476993",
"0.7377258",
"0.73474795",
"0.7277407",
"0.72352535",
"0.7216698",
"0.7188681",
"0.71810895",
"0.71468097",
"0.7073647",
"0.7064139",
"0.7059298",
"0.6992332",
"0.69876885",
"0.6966208",
"0.6933774",
"0.6911885",
"0.6896458",
"0.6872223",
"0.6864793"... | 0.6848441 | 21 |
Adds slashes if magic quotes is on. | function smartaddslashes($str) {
if ( get_magic_quotes_gpc() == false ) {
$str = addslashes( $str );
}
return $str;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function nice_addslashes($string)\n{\n // if magic quotes is on the string is already quoted, just return it\n if(MAGIC_QUOTES)\n return $string;\n else\n return addslashes($string);\n}",
"private function _wp_magic_quotes() {\n // If already slashed, strip.\n if (function_exists('get_magi... | [
"0.70673954",
"0.705602",
"0.7036844",
"0.6960077",
"0.68517745",
"0.6783968",
"0.67531955",
"0.67396885",
"0.6722849",
"0.6677134",
"0.6653133",
"0.66176873",
"0.6591156",
"0.65648514",
"0.6539369",
"0.6495385",
"0.6380721",
"0.63736707",
"0.63330644",
"0.6304832",
"0.629832... | 0.68149924 | 5 |
This function creates a standard HTML input form. | function HTML_input( $label=false, $id, $value=null, $add_returns=true, $type='text', $size=null, $maxlength=null, $onchange=null, $width=0, $disabled=false, $autocomplete=false, $checked=false ) {
$str = '';
if ( isset( $label ) && $label !== false ) {
$str .= '<label for="'.$id.'">'.$label.'</label>';
if ( $add_returns ) {
$str .= '<br />';
}
$str .= "\n";
}
// <input name="name" id="id" type="text" value="value" size="2" maxlength="2" onchange="" disabled>
$str .= '<input name="'.$id.'" id="'.$id.'" type="'.$type.'"';
if ( isset( $value ) ) {
$str .= ' value="'. addslashes( encode_input_value( $value ) ) .'"';
}
if ( $size > 0 ) {
$str .= ' size="'.$size.'"';
}
if ( $maxlength > 0 ) {
$str .= ' maxlength="'.$maxlength.'"';
}
if ( isset( $onchange ) ) {
$str .= ' onchange="'.$onchange.'"';
}
if ( $width > 0) {
$str .= ' style="width: '.$width.'px;"';
}
if ( !$autocomplete ) {
$str .= ' autocomplete="OFF"';
}
if ( $disabled ) {
$str .= ' disabled';
}
if ( $checked ) {
$str .= ' checked';
}
$str .= '>' . "\n";
if ( $add_returns ) {
$str .= '<p />';
}
$str .= "\n";
return $str;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function makeForm() {\n if($this->table_title != '' ) {\n $db_obj = new db_class();\n $desc_table = $db_obj->tableDescription($this->table_title);\n $db_obj->closeDB();\n \n// showArray($desc_table);\n echo '<form id=\"generic_edit_form\" method... | [
"0.71049947",
"0.6999365",
"0.6998591",
"0.69977427",
"0.69977427",
"0.69870615",
"0.69870615",
"0.6882778",
"0.6750034",
"0.6738137",
"0.67097974",
"0.66954726",
"0.66773045",
"0.6668399",
"0.6637821",
"0.6614725",
"0.6566063",
"0.6559784",
"0.6557526",
"0.6513417",
"0.65027... | 0.0 | -1 |
method of update of sample control which to update the samole info | public function sample_updateOp(){
$data=array();
$data['sample_name']=$_POST['sample_name'];
$data['sample_origin_place']=$_POST['sample_origin_place'];
$data['sample_weight']=$_POST['sample_weight'];
$data['sample_freight']=$_POST['sample_freight'];
$data['sample_limit_number']=$_POST['sample_limit_number'];
$data['sample_start_time']=time();
$data['sample_start_time']=strtotime($_POST['sample_start_time']);
$data['sample_end_time']=strtotime($_POST['sample_end_time']);
$data['sample_state']=1;
if($_FILES['sample_image']['name'][0]!=''){
$image='';
$legitType=array('image/jpeg','image/png','image/gif');
$resizeImage = new ResizeImage();
for($i=0;$i<6;$i++){
if($_FILES['sample_image']['error'][$i]!==0) break;
if(!in_array($_FILES['sample_image']['type'][$i],$legitType)) showmessage('图片类型不正确');
$type=substr($_FILES['sample_image']['type'][$i],-3);
if($type=='peg') $type='jpg';
$name=time().'_'.$i.'.'.$type;
$uploadResult=move_uploaded_file($_FILES['sample_image']['tmp_name'][$i],ImgPath.$name);
if($uploadResult){
$resizeImage->newImg(ImgPath.$name,60,60,0,"_60." , ImgPath);
$resizeImage->newImg(ImgPath.$name,360,360,0,"_360." , ImgPath);
$image.=$name.',';
}
//print_r($_FILES['sample_image']);
}
$image= rtrim($image,',');
$data['sample_image']=$image;
}else{
$data['sample_image']=$_POST['sample_image_hidden'];
}
$insertResult=self::$sampleModel->where("sample_id='".intval($_POST['sample_id'])."'")->update($data);
if($insertResult){
//print_r($_FILES['sample_image']);
showmessage('更新成功');
}else{
showmessage('更新失败');
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function update() {\n\n\t\t\t}",
"function update_sample($edit_sample,$sample_manual_id, $sample_name, $sample_unit, $sample_result, $client_id, $sample_type, $pay_status, $sample_image, $date_taken, $result_taken, $comment, $lab_scientist, $sample_description) {\r\n\t\tglobal $db;\r\n\t\t$query = \"UPDATE sampl... | [
"0.620268",
"0.60568756",
"0.6033488",
"0.6003386",
"0.5857554",
"0.58328784",
"0.58328784",
"0.5826213",
"0.581237",
"0.5802734",
"0.5801004",
"0.5790808",
"0.5790354",
"0.5766793",
"0.5708282",
"0.56946236",
"0.56946236",
"0.56946236",
"0.56946236",
"0.56946236",
"0.5694623... | 0.0 | -1 |
method get goods info by goods_id | public function get_info_by_goods_idOp(){
$goods_id=isset($_POST['goods_id'])?$_POST['goods_id']:'';
$array=array();
if(!$goods_id||!is_numeric($goods_id)){
$array['code']=404;
$array['content']='商品id不合法'.$goods_id;
echo json_encode($array);
die();
}
$goodsModel=Model("goods");
$goodsInfo=$goodsModel->field("goods_id,goods_commonid,goods_name")->where("goods_id='$goods_id'")->find();
if(!$goodsInfo){
$array['code']=404;
$array['content']='查找不到数据,八成产品id不对';
echo json_encode($array);
die();
}
$data=array();
$data['goods_name']=$goodsInfo['goods_name'];
//find the images of goods
$goodsImagesModel=Model("goods_images");
$images=$goodsImagesModel->field("goods_image")->where("goods_commonid='".$goodsInfo['goods_commonid']."'")->select();
//print_r($images);
$imagesString='';
foreach($images as $v){
$imagesString.=$v['goods_image'].',';
}
$imagesString=substr($imagesString,0,-1);
$data['goods_image']=$imagesString;
$array['content']=$data;
$array['code']=200;
echo json_encode($array);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function hook2promotion_get($goods_id) {\n\t\t$tag_id = $goods_id;\n\t\t$tag_cat = '商品';\n\t\t$w['tag_id'] = $tag_id;\n\t\t$w['tag_cat'] = $tag_cat;\n\t\treturn D2(\"PromotionIndex\")->where($w)->find();\n\t}",
"public function getGoods($id)\n {\n// echo $this->getLastSql();\n $row = $thi... | [
"0.75535",
"0.7338689",
"0.71883976",
"0.682482",
"0.682482",
"0.682482",
"0.65165585",
"0.6502376",
"0.640936",
"0.6398063",
"0.6393282",
"0.6372691",
"0.63614476",
"0.6282138",
"0.62558705",
"0.62362117",
"0.6224571",
"0.62129676",
"0.6208471",
"0.61809385",
"0.61688423",
... | 0.7049007 | 3 |
======================================================================== Returns the static model of the specified AR class. | public static function model($className=__CLASS__)
{
return parent::model($className);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function model()\r\n {\r\n return static::class;\r\n }",
"public static function model() {\n return parent::model(get_called_class());\n }",
"public static function model($class = __CLASS__)\n\t{\n\t\treturn parent::model(get_called_class());\n\t}",
"public static function model... | [
"0.76832896",
"0.75955194",
"0.71365553",
"0.7105948",
"0.7103622",
"0.7070556",
"0.69517833",
"0.6946451",
"0.69369507",
"0.69369507",
"0.6927354",
"0.69215786",
"0.69215786",
"0.69173884",
"0.68830866",
"0.6873088",
"0.6873088",
"0.6873088",
"0.6873088",
"0.6873088",
"0.687... | 0.0 | -1 |
Retrieves a list of models based on the current search/filter conditions. | public function search() {
// Warning: Please modify the following code to remove attributes that
// should not be searched.
$criteria = new CDbCriteria;
$criteria->together = true;
$criteria->with = array('article_lang');
$criteria->compare('t.id', $this->id);
$criteria->compare('t.image_id', $this->image_id);
$criteria->compare('t.position', $this->position);
$criteria->compare('article_lang.lang_id', $this->langId);
return new CActiveDataProvider($this, array(
'criteria' => $criteria,
'sort'=>array(
'defaultOrder'=>'position ASC',
),
'pagination' => false,
));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getModels();",
"public function getModels();",
"public function findAll($model);",
"public function getListSearch()\n {\n //set warehouse and client id\n $warehouse_id = ( !is_numeric(request()->get('warehouse_id')) ) ? auth()->user()->current_warehouse_id : request()->get('w... | [
"0.6745192",
"0.6745192",
"0.6607936",
"0.6480248",
"0.6380478",
"0.6346251",
"0.6309924",
"0.6302481",
"0.62549895",
"0.62511677",
"0.62511677",
"0.6111791",
"0.60769993",
"0.60728127",
"0.60465515",
"0.60351735",
"0.6033834",
"0.601554",
"0.5982608",
"0.59806865",
"0.597930... | 0.0 | -1 |
Attempts to create a connection with the database. | public function connect(Array $params, $username = null, $password = null, Array $driverOptions = []) {
$driverKey = array_key_exists('driverClass', $params['master']) ? 'driverClass' : 'driver';
$driverValue = $params['master'][$driverKey];
$master = DriverManager::getConnection($params['master']);
$slaves = new SplObjectStorage;
foreach ($params['slaves'] as $slaveParams) {
$slaveParams[$driverKey] = $driverValue;
$slaves->attach(DriverManager::getConnection($slaveParams), $slaveParams['weight']);
}
return new MasterSlavesConnection($master, $slaves);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function openConnection() {\n if($this->database != null) return;\n\n $config = $this->getDatabaseConfig();\n\n try {\n $this->database = new \\PDO(\n 'mysql:dbname=' . $config['database'] . ';host=' . $config['host'] . ':' . $config['port'],\n $... | [
"0.7243579",
"0.70972335",
"0.7070726",
"0.70526016",
"0.7036345",
"0.7028448",
"0.7019534",
"0.7002239",
"0.6998557",
"0.69977087",
"0.69874656",
"0.6850509",
"0.68504703",
"0.6839003",
"0.6786968",
"0.67780364",
"0.6776965",
"0.6774585",
"0.67694515",
"0.6763749",
"0.675769... | 0.0 | -1 |
Gets the SchemaManager that can be used to inspect and change the underlying database schema of the platform this driver connects to. | public function getSchemaManager(Connection $conn) {
return $this->wrappedDriver($conn)->getSchemaManager($conn);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDoctrineSchemaManager()\n {\n return $this->getDoctrineDriver ()->getSchemaManager ( $this->getDoctrineConnection () );\n }",
"public static function getDoctrineSchemaManager()\n {\n }",
"public function createSchemaManager(): AbstractSchemaManager\n {\n ... | [
"0.7830292",
"0.72777325",
"0.7111871",
"0.70293283",
"0.69350183",
"0.68099654",
"0.6788647",
"0.67662406",
"0.67197084",
"0.6669377",
"0.6640639",
"0.6526776",
"0.6474924",
"0.6411143",
"0.6359347",
"0.63265806",
"0.6326173",
"0.6308001",
"0.62875336",
"0.6284409",
"0.62844... | 0.6270765 | 25 |
Gets the name of the database connected to for this driver. | public function getDatabase(Connection $conn) {
return $this->wrappedDriver($conn)->getDatabase($conn);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDatabaseName()\n {\n return $this->connection->getDatabase();\n }",
"public function getDatabaseName(): string\n {\n if (isset($this->database)) {\n return $this->database;\n }\n\n $connection = $this->getConnection();\n $db = $con... | [
"0.8470095",
"0.8443994",
"0.83257097",
"0.814792",
"0.81198144",
"0.80206156",
"0.80091345",
"0.7990441",
"0.7976131",
"0.7973927",
"0.79300016",
"0.7908563",
"0.78884417",
"0.78883564",
"0.78767145",
"0.78443354",
"0.78153676",
"0.78071433",
"0.77935445",
"0.7774073",
"0.77... | 0.0 | -1 |
returns an empty model if no id is given | function __construct($id = null) {
//nothing is set so we return null
if (is_null($id))
return $this;
parent::__construct($id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function find(int $id): ?Model;",
"public function find(int $id): ?Model;",
"public function getModelo(int $id): ?Model;",
"abstract protected function model($id = NULL);",
"public function get(int $id): IModel\n {\n }",
"public function findById(int $id) : ?Model;",
"public function findB... | [
"0.75473714",
"0.75473714",
"0.75261265",
"0.74345195",
"0.7186421",
"0.7079162",
"0.70778054",
"0.7032242",
"0.7000289",
"0.698227",
"0.69608814",
"0.6934301",
"0.6865109",
"0.6850317",
"0.68411374",
"0.68325025",
"0.68106675",
"0.6766196",
"0.67621756",
"0.6760718",
"0.6725... | 0.0 | -1 |
get all customers from database | public static function all() {
$db = Zend_Registry::get('dbAdapter');
$result = $db->query('select id from companys')->fetchAll();
$companys = new SplObjectStorage();
foreach ($result as $c) {
try {
$company = new Yourdelivery_Model_Company($c['id']);
} catch (Yourdelivery_Exception_Database_Inconsistency $e) {
continue;
}
$companys->attach($company);
}
return $companys;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getCustomers() {\n $sql = \"SELECT * FROM customers\";\n\n //prepare the statement\n $statement = $this->_dbh->prepare($sql);\n\n //execute\n $statement->execute();\n\n //Get the results\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }",
"public fu... | [
"0.8353877",
"0.8298022",
"0.82738394",
"0.81249815",
"0.80647266",
"0.8025345",
"0.80240315",
"0.79444915",
"0.77646416",
"0.7755556",
"0.76117975",
"0.7582551",
"0.7544667",
"0.75086415",
"0.74970555",
"0.749006",
"0.74579686",
"0.7452684",
"0.7398863",
"0.73833007",
"0.737... | 0.0 | -1 |
get all email addresses of one certian company | public static function allEmployeesEmail($companyId = null) {
if (is_null($companyId)) {
return array();
}
$db = Zend_Registry::get('dbAdapter');
return $db->query('select c.email from customers c inner join customer_company cc on c.id=cc.customerId where c.deleted=0 and cc.companyId=' . $companyId . ' order by c.email')->fetchAll();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function suggestCompanyEmailSearch()\n\t{\n\t\t$emails = array();\n\n\t\t$sql = \" select email,name from company where active = 1 and email > '' and email is not null\";\n\t\t$sql .= \" and (email like '%\" . $this->emailCompany->Text . \"%' \";\n\t\t$sql .= \" or name like '%\" . $this->emailCompany->Text... | [
"0.76817536",
"0.73950094",
"0.7093795",
"0.6934842",
"0.6911653",
"0.6858012",
"0.67932844",
"0.6753917",
"0.6744513",
"0.6726846",
"0.6710811",
"0.66739064",
"0.6659107",
"0.6590686",
"0.6579141",
"0.65581965",
"0.6490907",
"0.6490127",
"0.648841",
"0.6458377",
"0.64563",
... | 0.7053258 | 3 |
Returns Customer_Company objects of all employees of this company | public function getEmployees() {
if ( is_null($this->_employees) ){
$customers = $this->getTable()->getEmployees();
$objects = new splObjectStorage();
foreach ($customers AS $customer) {
try {
$ccust = new Yourdelivery_Model_Customer_Company($customer->customerId, $this->getId());
if ($ccust->isDeleted()) {
continue;
}
} catch (Yourdelivery_Exception_Database_Inconsistency $e) {
continue;
}
$objects->attach($ccust);
}
$this->_employees = $objects;
}
return $this->_employees;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getCompanyEmployees();",
"public static function getEnterpriseCompanies(){\n $result = db::get(\"SELECT uid_empresa FROM \". TABLE_EMPRESA .\" WHERE is_enterprise = 1 ORDER BY nombre\", \"*\", 0, \"empresa\");\n return new ArrayObjectList($result);\n }",
"public static function... | [
"0.80659366",
"0.7450481",
"0.72915214",
"0.69716215",
"0.69016933",
"0.6851105",
"0.6811749",
"0.6801597",
"0.67012745",
"0.6626089",
"0.6619283",
"0.65692306",
"0.6564905",
"0.65477973",
"0.6546318",
"0.6536029",
"0.65336025",
"0.6453452",
"0.6442147",
"0.64110345",
"0.6387... | 0.85140556 | 0 |
Returns count of employees | public function getEmployeesCount() {
return $this->getTable()->getEmployeesCount();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function countEmployee(){\n\t\t\t\t\t return count($this->listeEmployee());\n\t\t\t\t\t }",
"public function getAllDataEmployees(){\n\t\t\t$this->db->select('*')->from('tbl_employees');\n\t\t\treturn $this->db->count_all_results();\n\t\t}",
"function get_all_empresas_count()... | [
"0.83989877",
"0.7367075",
"0.72336376",
"0.72261834",
"0.7167031",
"0.7027701",
"0.699077",
"0.69037336",
"0.6776866",
"0.6690841",
"0.6654862",
"0.6573313",
"0.6515685",
"0.64769894",
"0.642788",
"0.63113743",
"0.62977064",
"0.62742156",
"0.6230173",
"0.621434",
"0.6199207"... | 0.8466051 | 0 |
Returns the company name | public function getCompanyName() {
return $this->getName();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getCompanyName() {\n \t$company = $this->getCompany();\n \treturn instance_of($company, 'Company') ? $company->getName() : lang('-- Unknown --');\n }",
"public function company(): string\n {\n return $this->getData('CompanyName');\n }",
"public function getCompanyName()\n {\n ... | [
"0.89471596",
"0.89091057",
"0.88816816",
"0.88703275",
"0.88102436",
"0.87965125",
"0.87851685",
"0.87735665",
"0.87735665",
"0.874932",
"0.87313443",
"0.84817505",
"0.7727293",
"0.77159256",
"0.767065",
"0.76011",
"0.74843526",
"0.74494916",
"0.73294085",
"0.732553",
"0.723... | 0.8818909 | 4 |
Returns the contact Object of this company | public function getContact() {
try {
return new Yourdelivery_Model_Contact($this->getContactId());
} catch (Yourdelivery_Exception_Database_Inconsistency $e) {
return null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getContact()\n {\n return $this->contact;\n }",
"public function getContact()\n {\n return $this->contact;\n }",
"public function getContact()\n {\n return $this->contact;\n }",
"public function getContact()\n {\n return isset($this->contact) ?... | [
"0.7963606",
"0.7963606",
"0.7963606",
"0.7882679",
"0.7853498",
"0.76508796",
"0.7586052",
"0.7529791",
"0.7468985",
"0.7440269",
"0.7366003",
"0.7218517",
"0.72165984",
"0.7204348",
"0.7200452",
"0.7086083",
"0.7038686",
"0.69324344",
"0.68644106",
"0.6861885",
"0.6808596",... | 0.78569067 | 4 |
Returns the billing contact object if this company | public function getBillingContact() {
try {
return new Yourdelivery_Model_Contact($this->getBillingContactId());
} catch (Yourdelivery_Exception_Database_Inconsistency $e) {
return null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getContact() {\n try {\n return new Yourdelivery_Model_Contact($this->getContactId());\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n return null;\n }\n }",
"public function getContact()\n {\n return isset($this->contact) ?... | [
"0.6930654",
"0.6894252",
"0.6823665",
"0.6823665",
"0.6823665",
"0.68114996",
"0.6693355",
"0.66731006",
"0.6621222",
"0.6621222",
"0.6559425",
"0.6542592",
"0.64734906",
"0.64569074",
"0.64569074",
"0.6341582",
"0.632374",
"0.63229895",
"0.62913233",
"0.6269803",
"0.6246155... | 0.8246131 | 0 |
returns all budget objects of this company | public function getBudgets() {
$table = new Yourdelivery_Model_DbTable_Company_Budgets();
$all = $table->fetchAll('companyId = ' . $this->getId());
$obj = new splObjectStorage();
foreach ($all AS $budget) {
try {
$budget = new Yourdelivery_Model_Budget($budget->id);
} catch (Yourdelivery_Exception_Database_Inconsistency $e) {
continue;
}
$obj->attach($budget);
}
return $obj;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function findAll() {\n $sql = \"SELECT * FROM budget\";\n $result = $this->db->fetchAll($sql);\n\n // Convert query result to an array of domain objects\n $budget = array();\n foreach ($result as $row) {\n $budgetID = $row['id'];\n $budget[$budgetID] ... | [
"0.80036753",
"0.69953966",
"0.68506557",
"0.67112535",
"0.65952253",
"0.64342594",
"0.6264919",
"0.6158434",
"0.60893327",
"0.60579413",
"0.60140085",
"0.59997874",
"0.59993225",
"0.5892793",
"0.58861786",
"0.58673936",
"0.58306706",
"0.5820295",
"0.5809164",
"0.58073443",
"... | 0.83090556 | 0 |
create new relation between company address and budget | public function addBudget($budget, $location) {
if (!is_object($budget) || !is_object($location)) {
return false;
}
$rel = new Yourdelivery_Model_DbTable_Company_Locations();
$row = $rel->createRow();
$row->budgetId = $budget->getId();
$row->locationId = $location->getId();
return $row->save();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create(Request $request)\n { \n $success = true;\n \n if (!$this->isJsonCorrect($request, 'companies')) {\n $error['errors']['json'] = Lang::get('messages.InvalidJson');\n return response()->json($error)->setStatusCode($this->status_codes['conflict']);... | [
"0.61961305",
"0.60261124",
"0.60261124",
"0.5287633",
"0.52579874",
"0.52542186",
"0.52376825",
"0.5194721",
"0.5189669",
"0.516622",
"0.5157176",
"0.5145248",
"0.5108045",
"0.5095742",
"0.50937575",
"0.5079618",
"0.50751615",
"0.50725883",
"0.50587296",
"0.5056986",
"0.5056... | 0.0 | -1 |
return all admins of this company | public function getAdmins() {
$a = new SplObjectStorage();
$admins = $this->getTable()->getAdmins();
foreach ($admins as $admin) {
try {
$customer = new Yourdelivery_Model_Customer_Company($admin['id'], $this->getId());
$a->attach($customer);
} catch (Yourdelivery_Exception_Database_Inconsistency $e) {
continue;
}
}
return $a;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function get_admins();",
"public static function admins()\n {\n return User::all()->where('idpapel', 1)->where('stusuario', 'ati')->toArray();\n }",
"public function getAdmins()\n {\n $query = $this->newQuery();\n $query->where('admin', true);\n\n return $this... | [
"0.77995116",
"0.771568",
"0.76979196",
"0.76258594",
"0.7536488",
"0.74002284",
"0.7244273",
"0.72357184",
"0.7123914",
"0.70668447",
"0.70222193",
"0.70147294",
"0.7008521",
"0.6975748",
"0.69615585",
"0.69482386",
"0.69318366",
"0.69177365",
"0.6878754",
"0.68160784",
"0.6... | 0.7827995 | 0 |
returns all addresses of this company as RowSet | public function getAddresses() {
$table = new Yourdelivery_Model_DbTable_Locations();
return $table->fetchAll('companyId = ' . $this->getId());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function findAll()\n {\n return $this->em->getRepository(Address::class)->findAll();\n }",
"public function getCompanyAddresses(Company $company)\n {\n $builder = $company->addresses()->getQuery();\n\n $resource = $this->datatable->setQueryBuilder($builder);\n\n return... | [
"0.6976132",
"0.69164824",
"0.6807836",
"0.67456234",
"0.67456234",
"0.67003393",
"0.6654495",
"0.6609099",
"0.65740657",
"0.6525917",
"0.65118945",
"0.65118945",
"0.65118945",
"0.64756763",
"0.64585054",
"0.6455332",
"0.639679",
"0.6394862",
"0.63578767",
"0.6319674",
"0.628... | 0.7773257 | 0 |
get locations associated to this company | public function getLocations(){
$table = new Yourdelivery_Model_DbTable_Locations();
$locationRows = $table->fetchAll(sprintf('companyId = %d AND deleted = 0' , $this->getId()));
$locations = new SplObjectStorage();
foreach($locationRows as $locationRow){
try{
$loc = new Yourdelivery_Model_Location($locationRow['id']);
$locations->attach($loc);
}catch(Yourdelivery_Exception_Database_Inconsistency $e){
$this->logger->err(sprintf('Could not create location #', $locationRow['id']));
continue;
}
}
return $locations;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAddresses() {\n $table = new Yourdelivery_Model_DbTable_Locations();\n return $table->fetchAll('companyId = ' . $this->getId());\n }",
"function erp_company_get_locations() {\n global $wpdb;\n\n $cache_key = 'erp_company-location';\n $locations = wp_cache_get( $cache_... | [
"0.73204905",
"0.7269763",
"0.715325",
"0.7091369",
"0.69753784",
"0.68884516",
"0.6781724",
"0.6735656",
"0.6646941",
"0.6572236",
"0.64921284",
"0.64795774",
"0.6343667",
"0.63180554",
"0.6298667",
"0.6285085",
"0.6283854",
"0.62782335",
"0.62691855",
"0.62336695",
"0.62287... | 0.7332577 | 0 |
gets all Budgets that are related to a given address | public function getBudgetsByAddressId($addressId) {
$nnTable = new Yourdelivery_Model_DbTable_Company_Location();
$all = $nnTable->fetchAll('locationId = "' . $addressId . '"');
$collector = new SplObjectStorage();
foreach ($all AS $budget) {
try {
$budget = new Yourdelivery_Model_Budget($budget->id);
} catch (Yourdelivery_Exception_Database_Inconsistency $e) {
continue;
}
$collector->attach($budget);
}
return $collector;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAddressBooks();",
"public function getAddressBooks()\n {\n $response = $this->request('GET', 'addressbooks');\n\n return new Types\\AddressBook($response['addressBook']);\n }",
"public function findAll()\n {\n return $this->em->getRepository(Address::class)->fin... | [
"0.6640048",
"0.61151385",
"0.5981912",
"0.59783477",
"0.58681965",
"0.5790016",
"0.5787011",
"0.57290065",
"0.5691443",
"0.56606495",
"0.56505084",
"0.5641255",
"0.56365776",
"0.56365776",
"0.56365776",
"0.56357634",
"0.56304324",
"0.5625829",
"0.5591508",
"0.5568026",
"0.55... | 0.6850676 | 0 |
gets all Billings of the Company filtered by $filter | public function getBillings($filter = null) {
$billingTable = new Yourdelivery_Model_DbTable_Billing();
$all = $billingTable->fetchAll('mode="company" AND refId="' . $this->getId() . '"');
$storage = new splObjectStorage();
foreach ($all AS $bill) {
try {
$bill = new Yourdelivery_Model_Billing($bill->id);
} catch (Yourdelivery_Exception_Database_Inconsistency $e) {
continue;
}
$storage->attach($bill);
}
return $storage;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function companyBillings($request)\n {\n if (Auth::user()->type != 'company') {\n throw new \\Exception('Unauthorized viewing of billing accounts.');\n }\n\n $data = [\n 'company_id' => Auth::user()->company->id,\n ]; \n\n $with = ['billable... | [
"0.71305776",
"0.65136105",
"0.61629456",
"0.61071646",
"0.6101719",
"0.5972914",
"0.5969841",
"0.5923577",
"0.58913356",
"0.5872776",
"0.58487344",
"0.58283657",
"0.57602173",
"0.57503307",
"0.55982226",
"0.55793315",
"0.5564691",
"0.5559925",
"0.5559049",
"0.55503607",
"0.5... | 0.7499952 | 0 |
get all departments assigned to company | public function getDepartments($onlyCostcenters = false) {
$departments = new SplObjectStorage();
foreach ($this->getTable()->getDepartments() as $dep) {
try {
$department = new Yourdelivery_Model_Department($dep['id']);
} catch (Yourdelivery_Exception_Database_Inconsistency $e) {
continue;
}
$departments->attach($department);
}
$this->_departments = $departments;
return $this->_departments;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getAllDepartments() {\r\n $data = new \\Cars\\Data\\Common($this->app);\r\n return $data->getAllDepartments();\r\n }",
"public function getDepartmentList() {\n return $this->_get(2);\n }",
"public function getAllDepartmentInfo(){\n $LOG = Logger::getLogger(__CLASS__ . '... | [
"0.73565865",
"0.6898825",
"0.68211037",
"0.6766175",
"0.6687836",
"0.6546002",
"0.652315",
"0.64614624",
"0.6425933",
"0.63521415",
"0.63421345",
"0.6336638",
"0.6335205",
"0.6334583",
"0.6321534",
"0.63174796",
"0.62856674",
"0.62610394",
"0.6260421",
"0.62184954",
"0.61882... | 0.6123944 | 23 |
get all costcenters assigned to company | public function getCostcenters() {
return $this->getDepartments(true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function allCompanies()\n {\n\n $companies = $this->core_companies;\n\n $items = [];\n foreach ($companies as $company) {\n\n $companyItem = new CompanyCardItem();\n $companyItem->id = $company->id;\n $companyItem->name = $company->name;\n ... | [
"0.6078663",
"0.60649323",
"0.6006163",
"0.5973317",
"0.597003",
"0.5969973",
"0.57983834",
"0.5781345",
"0.57776815",
"0.57615197",
"0.5721366",
"0.56990105",
"0.5654105",
"0.56503934",
"0.56401664",
"0.5624275",
"0.55778736",
"0.55733246",
"0.5542282",
"0.5516759",
"0.55011... | 0.73927546 | 0 |
get all project numbers | public function getProjectNumbers($getDeletedToo = true) {
$numbers = $this->getTable()->getProjectNumbers($getDeletedToo);
$pnums = new SplObjectStorage();
foreach ($numbers as $number) {
try {
$num = new Yourdelivery_Model_Projectnumbers($number['id']);
} catch (Yourdelivery_Exception_Database_Inconsistency $e) {
continue;
}
$pnums->attach($num);
}
return $pnums;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getProjects(){\n\t\t \n\t\t $db = $this->startDB();\n\t\t $result = false;\n\t\t \n\t\t $sql = \"SELECT count(actTab.uuid) AS recCount, project_list.project_id, project_list.project_name\n\t\t FROM \".$this->penelopeTabID.\" AS actTab\n\t\t JOIN space ON actTab.uuid = space.uuid\n\t\t JOIN project... | [
"0.72534406",
"0.7005828",
"0.69887793",
"0.68986034",
"0.6810523",
"0.6789513",
"0.66870666",
"0.6680739",
"0.6672632",
"0.66302735",
"0.6587107",
"0.6546109",
"0.6507422",
"0.64815354",
"0.64642733",
"0.6448964",
"0.64450204",
"0.64448464",
"0.6438722",
"0.6350027",
"0.6349... | 0.684595 | 4 |
Returns count of project numbers | public function getProjectNumbersCount($getDeletedToo = true) {
return $this->getTable()->getProjectNumbersCount($getDeletedToo);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function grabListProjectCount()\n{\n\tglobal $smcFunc;\n\n\t// As we requested that we might also need it...\n\t$request = $smcFunc['db_query']('', '\n\t\tSELECT COUNT(id) AS project_count\n\t\tFROM {db_prefix}bugtracker_projects',\n\t\tarray()\n\t);\n\n\t// Countin' our way up.\n\tlist ($count) = $smcFunc['db_fet... | [
"0.8287974",
"0.7873941",
"0.7744269",
"0.75998634",
"0.7558667",
"0.7147381",
"0.7009453",
"0.69966817",
"0.69641215",
"0.69315237",
"0.692668",
"0.69045645",
"0.68630147",
"0.6757091",
"0.6702161",
"0.66974515",
"0.6622034",
"0.6583274",
"0.65799963",
"0.65557903",
"0.65541... | 0.6072863 | 44 |
check wether this company has a department or not | public function hasDepartments() {
$deps = $this->getDepartments();
if ($deps->count() > 0) {
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function hasDepartment() {\n return $this->_has(2);\n }",
"public static function isDepartment( $did ) {\n\t\t$db = JFactory::getDbo();\n\t\t$query = \"SELECT COUNT(*) FROM `#__obhelpdesk3_departments` WHERE id=\" . $did . \" AND published = 1\";\n\t\t$db->setQuery( $query );\n\t\tif ( $db->loa... | [
"0.8229404",
"0.71779704",
"0.7162054",
"0.68531704",
"0.6614436",
"0.6569807",
"0.6490656",
"0.622401",
"0.619329",
"0.61737955",
"0.6143337",
"0.61390656",
"0.6112664",
"0.6096192",
"0.60876095",
"0.6084",
"0.60730517",
"0.6058022",
"0.5984729",
"0.5965847",
"0.59422064",
... | 0.74014276 | 1 |
get customized billing data | public function getBillingCustomized() {
$customized = new Yourdelivery_Model_Billing_Customized();
$cid = $this->getTable()->getBillingCustomized();
if ($cid === false) {
$customized->setMode('comp');
} else {
$customized->load($cid['id']);
}
$customized->setCompany($this);
$customized->setRefId($this->getId());
return $customized;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getBilling();",
"public function getBillingData(): array\n {\n return [\n 'billing.street1' => 'Wilaya center, Avenue Ali Yaeta, étage 3, n 31, Tétouan',\n 'billing.city' => 'TETOUAN',\n 'billing.state' => 'TETOUAN',\n 'billing.country' => 'MA... | [
"0.80275697",
"0.7286389",
"0.7026287",
"0.69344825",
"0.6810263",
"0.6810263",
"0.6588841",
"0.645642",
"0.645642",
"0.64080983",
"0.63735473",
"0.6356069",
"0.6265209",
"0.62060267",
"0.6179529",
"0.6175078",
"0.6150075",
"0.6115563",
"0.6092513",
"0.6040887",
"0.6018261",
... | 0.7084479 | 2 |
get next bill of this company | public function getNextBill($from = 0, $until=0, $test = 0) {
$mode = $this->getBillMode();
return new Yourdelivery_Model_Billing_Company($this, $from, $until, $mode, $test);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function fetch_next_bill() {\n $next_bill = self\n ::where('contract_id', $this->contract_id)\n ->where('monthrefdate', '=', $this->monthrefdate)\n ->where('monthseqnumber', '>', $this->monthseqnumber)\n ->orderBy('monthseqnumber', 'asc')\n ->first(); // skip(1) does not make it ... | [
"0.80487335",
"0.6455558",
"0.63302267",
"0.63280314",
"0.6246678",
"0.62086344",
"0.6114703",
"0.6114703",
"0.6047466",
"0.6007128",
"0.5977046",
"0.5963493",
"0.5961762",
"0.59172356",
"0.58790684",
"0.5877691",
"0.58353156",
"0.58328134",
"0.5822775",
"0.5819205",
"0.57965... | 0.6455443 | 2 |
get ort object of location | public function getOrt() {
$cid = $this->getCityId();
try {
return new Yourdelivery_Model_City($cid);
} catch (Yourdelivery_Exception_Database_Inconsistency $e) {
return null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function asort() {}",
"public function getSortValue() {}",
"public function asort()\n {\n }",
"public function getSortIndex();",
"function getSort(){\n\treturn 281;\n}",
"function getSort(){ return 301; }",
"abstract protected function _getSortType();",
"public function getSorting();",
... | [
"0.60118204",
"0.5829927",
"0.57946706",
"0.56985146",
"0.56282604",
"0.55493295",
"0.55046314",
"0.5494291",
"0.54572004",
"0.5433485",
"0.5433485",
"0.53832096",
"0.53792804",
"0.5341315",
"0.5341315",
"0.5341315",
"0.5329976",
"0.5317663",
"0.5303853",
"0.52960175",
"0.529... | 0.0 | -1 |
returns all order objects of the company's employees | public function getOrders($filter = array()) {
return $this->getTable()->getOrders();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getCompanyEmployees();",
"public function getEmployees() {\n if ( is_null($this->_employees) ){\n $customers = $this->getTable()->getEmployees();\n $objects = new splObjectStorage();\n\n foreach ($customers AS $customer) {\n try {\n ... | [
"0.75963193",
"0.7502415",
"0.66931903",
"0.66750634",
"0.6669356",
"0.6622108",
"0.6490672",
"0.6463409",
"0.64028865",
"0.63498855",
"0.6339747",
"0.6270077",
"0.62434006",
"0.6220143",
"0.6166198",
"0.61648166",
"0.6152638",
"0.61492527",
"0.6114754",
"0.6103403",
"0.60979... | 0.5731795 | 48 |
get restaurants, having restriction on this company any company assigned to restaurant is only allowed to order | public function getRestaurantRestrictions() {
return $this->getTable()->getRestaurantRestrictions();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getNotApprovedRestaurants() {\n\t\t$query = \"SELECT * FROM restaurant WHERE approved = 1\";\n\t\t$rest_list;\n\t\t$result = $this->mysqli->query($query);\n\t\t$i = 0;\n\t\twhile ($row = $result->fetch_object()) {\n\t\t\t$restaurant = new Restaurant();\n\t\t\t$restaurant->setId($row->id);\n\t\t\t$r... | [
"0.696992",
"0.6287122",
"0.6181779",
"0.6047981",
"0.6011092",
"0.59179544",
"0.58538026",
"0.5671452",
"0.5619524",
"0.5612831",
"0.5478126",
"0.5408447",
"0.5402133",
"0.5388593",
"0.53553134",
"0.5297504",
"0.5294551",
"0.5285207",
"0.52418315",
"0.5188748",
"0.5183477",
... | 0.6609882 | 1 |
get restaurants, having restriction on this company any company assigned to restaurant is only allowed to order same as getRestaurantRestrictions, returning the array | public function getRestaurantsAssociations() {
return $this->getTable()->getRestaurantsAssociations();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getRestaurantRestrictions() {\n return $this->getTable()->getRestaurantRestrictions();\n }",
"public function getNotApprovedRestaurants() {\n\t\t$query = \"SELECT * FROM restaurant WHERE approved = 1\";\n\t\t$rest_list;\n\t\t$result = $this->mysqli->query($query);\n\t\t$i = 0;\n\t\twhil... | [
"0.703669",
"0.6507204",
"0.60332876",
"0.60025",
"0.60025",
"0.58762485",
"0.56468123",
"0.5622",
"0.56075335",
"0.56053334",
"0.55654913",
"0.5565382",
"0.5524607",
"0.5508404",
"0.5421273",
"0.51989514",
"0.51964456",
"0.5178053",
"0.5173234",
"0.5121196",
"0.5096752",
"... | 0.58248115 | 6 |
set restaurant, having restriction on this company any company assigned to restaurant is only allowed to order | public function setRestaurantRestriction($restId, $exclusive=0) {
return $this->getTable()->setRestaurantRestriction($restId, $exclusive);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function approveNewRestaurant(restaurant $res){\n\n\t\t$query = sprintf(\"INSERT INTO restaurant(\n\n\t\t\t\t\t\t\t\t\t\t\tlatitude,\n\t\t\t\t\t\t\t\t\t\t\tlongitude,\n\t\t\t\t\t\t\t\t\t\t\timage,\n\t\t\t\t\t\t\t\t\t\t\tlink,\n\t\t\t\t\t\t\t\t\t\t\tapproved\n\t\t\t\t\t\t\t\t\t\t)VALUES (\n\n\t\t\t\t\t\t\t\t... | [
"0.57021207",
"0.5621411",
"0.53726816",
"0.53401136",
"0.5248676",
"0.51060903",
"0.50361985",
"0.4981023",
"0.49366984",
"0.49023402",
"0.48730832",
"0.48726502",
"0.4861729",
"0.48549318",
"0.4843774",
"0.4808629",
"0.48054048",
"0.47951898",
"0.477107",
"0.47586006",
"0.4... | 0.5305844 | 4 |
remove restriction relationship with this restaurant | public function removeRestaurantRestriction($restId) {
return $this->getTable()->removeRestaurantRestriction($restId);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isRemoveFromRelationship();",
"public function forceDeleted(Remission $remission)\n {\n //\n }",
"public function clearSolicitacaoResgatesRelatedBySolicitanteId()\n\t{\n\t\t$this->collSolicitacaoResgatesRelatedBySolicitanteId = null; // important to set this to NULL since that mean... | [
"0.64327925",
"0.57864064",
"0.56470966",
"0.5631549",
"0.56004405",
"0.55966175",
"0.5472318",
"0.54350007",
"0.5413572",
"0.5368477",
"0.53367895",
"0.5331748",
"0.53108424",
"0.5308024",
"0.5305767",
"0.5303304",
"0.5297125",
"0.52759314",
"0.5268652",
"0.52540505",
"0.525... | 0.60813874 | 1 |
returns count of orders of the company's employees | public function getOrdersCount() {
return $this->getTable()->getOrdersCount();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function countEmployee(){\n\t\t\t\t\t return count($this->listeEmployee());\n\t\t\t\t\t }",
"public function getEmployeesCount() {\n return $this->getTable()->getEmployeesCount();\n }",
"public function countCompanyContacts()\n {\n \n $db = $this->getDb();\n... | [
"0.6851074",
"0.68161017",
"0.65668994",
"0.653747",
"0.63619584",
"0.624123",
"0.6234315",
"0.6188292",
"0.6108969",
"0.60911006",
"0.60602534",
"0.6058136",
"0.60307544",
"0.60292596",
"0.60176474",
"0.600572",
"0.5969853",
"0.5951251",
"0.5941757",
"0.587485",
"0.587299",
... | 0.62171054 | 7 |
create html for tree ( recursive ) | private function _traverse($elems) {
$html = "";
foreach ($elems as $elem) {
$html .= "<li>" . $elem->getName();
if ($elem->getBilling() == 0) {
$html .= $this->_appendDepartmentOptions($elem);
} else {
$html .= "( " . $elem->getIdentNr() . " )";
}
if ($elem->hasChilds()) {
$html .= "<ul>";
$html .= $this->_traverse($elem->getChilds());
$html .= "</ul>";
}
$html . "</li>";
}
return $html;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function build_tree()\n\t\t{\n\t\t\t$this->html_result .= '<ul class=\"'.$this->style.'_ul_first\" onkeydown=\"return input_main_key(event,\\''.$this->internal_id.'\\')\">';\n\n\t\t\t//==================================================================\n\t\t\t// Always first this row in tree ( edit mode onl... | [
"0.7783705",
"0.77089906",
"0.7677822",
"0.75516206",
"0.73858404",
"0.73766494",
"0.7345689",
"0.73427516",
"0.73416764",
"0.73389906",
"0.73219216",
"0.7220168",
"0.7026608",
"0.6957263",
"0.68549323",
"0.67617875",
"0.67403",
"0.6728721",
"0.6712435",
"0.6696185",
"0.66736... | 0.0 | -1 |
get company name as default string | public function __toString() {
$name = $this->getName();
if (!is_string($name)) {
return "";
}
return $name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getCompanyName() {\n \t$company = $this->getCompany();\n \treturn instance_of($company, 'Company') ? $company->getName() : lang('-- Unknown --');\n }",
"public function company(): string\n {\n return $this->getData('CompanyName');\n }",
"public function getCompany_name()\n {\n... | [
"0.82348704",
"0.80004865",
"0.78050417",
"0.777714",
"0.7749992",
"0.77225846",
"0.76560754",
"0.7622188",
"0.76113427",
"0.76113427",
"0.7589384",
"0.7584806",
"0.7573624",
"0.75613606",
"0.755359",
"0.7415744",
"0.70463413",
"0.70248425",
"0.6942448",
"0.6937036",
"0.68797... | 0.0 | -1 |
check, if company has address | public function hasAddress($addrId) {
$table = new Yourdelivery_Model_DbTable_Locations();
return count($table->fetchAll('companyId = "' . $this->getId() . '" AND deleted = 0')) > 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function hasAddress() {\n return $this->_has(3);\n }",
"public function hasAddress()\n {\n return $this->address !== null;\n }",
"public function hasAddress() : bool\n {\n return isset($this->address);\n }",
"public function hasCompanyInfo()\n {\n $result = ... | [
"0.7614875",
"0.7490917",
"0.72619456",
"0.7152064",
"0.7067903",
"0.70461094",
"0.687425",
"0.68439084",
"0.6722846",
"0.67154086",
"0.6649801",
"0.66025484",
"0.66022635",
"0.6530079",
"0.6506405",
"0.6502913",
"0.64472663",
"0.64141995",
"0.6301413",
"0.62307197",
"0.62269... | 0.7047752 | 5 |
TODO Refactor only for backend | public function getEditlink(){
return sprintf("<a href=\"/administration_company_edit/index/companyid/%s\">%s</a>", $this->getId(), $this->getName());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _request() {}",
"protected function _response() {}",
"function getBackend() ;",
"private function setUpBackend() {}",
"protected abstract function _getBackend();",
"public function getBackend() {}",
"public function getBackend() {}",
"public function preRetrieve();",
"protected f... | [
"0.5889037",
"0.5783876",
"0.5768973",
"0.56013995",
"0.5515013",
"0.5495333",
"0.5495333",
"0.54437286",
"0.5378712",
"0.5378712",
"0.5378712",
"0.5378712",
"0.5378712",
"0.5378712",
"0.5378712",
"0.5378712",
"0.5378712",
"0.5378712",
"0.5378712",
"0.5378712",
"0.5378712",
... | 0.0 | -1 |
Check Token Of Expire or Not Then Have it Refreshed. | public function refreshToken()
{
$token = $this->getToken();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function checkTokenExpire()\n {\n if (new DateTime() > $this->tokenExpire) {\n $this->refreshToken();\n $this->getAuthorization();\n }\n }",
"protected function regenerateTokenIfNotNew()\n {\n if ($this->tokenExpiry !== null) {\n $this->regen... | [
"0.81163967",
"0.69142765",
"0.679769",
"0.67382103",
"0.6733025",
"0.6693056",
"0.6671909",
"0.6653229",
"0.66525435",
"0.65717673",
"0.65717673",
"0.65066713",
"0.6505363",
"0.6499299",
"0.64982045",
"0.6496844",
"0.6486168",
"0.6480529",
"0.64587563",
"0.6439427",
"0.64006... | 0.6445681 | 19 |
Get Access Token From A text file | public function getToken()
{
$accessToken = null;
if (file_exists($_SERVER['DOCUMENT_ROOT'].$this->tokenFile)) {
$accessToken = unserialize(file_get_contents($_SERVER['DOCUMENT_ROOT'].$this->tokenFile));
}
return json_decode($accessToken);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ReadTokenFile()\n {\n if ($this->getTokenUsePickupFile()) {\n $fname = $this->getTokenPickupFile();\n $fh = fopen($fname, \"r\");\n $this->_props['RequestToken'] = trim(fread($fh, filesize($fname)));\n fclose($fh);\n }\n }",
"function getToken(): string {\n //return $this-... | [
"0.72512627",
"0.6779216",
"0.6668294",
"0.65947384",
"0.6391276",
"0.63574797",
"0.63574797",
"0.63574797",
"0.63574797",
"0.6272261",
"0.6230864",
"0.6230864",
"0.6230864",
"0.6230864",
"0.6230864",
"0.6214809",
"0.6214547",
"0.6204841",
"0.61824656",
"0.6182268",
"0.617949... | 0.69147575 | 1 |
Set Request Link To Rakuten | public function setLink($endpoint, $name = null)
{
if (!isset($name)) {
$name = self::API_NAME_LINK_LOCATOR;
}
$link = Rakuten::BASE_API_URL.'/'.$name.'/'.self::API_VERSION.'/';
$this->link = $link.$endpoint;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function setUrl() {\r\n\t\t$this->url = htmlspecialchars(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'), ENT_QUOTES);\r\n\t}",
"public function setLink($link);",
"public function makelink()\n {\n /*\n * If link set directly that forces using it rather than build\n */\n if... | [
"0.6703281",
"0.6532161",
"0.63464415",
"0.63004166",
"0.62923783",
"0.62923783",
"0.62511885",
"0.62069297",
"0.61534464",
"0.61513525",
"0.6136585",
"0.61322844",
"0.61322844",
"0.6115157",
"0.6099858",
"0.6079605",
"0.6079605",
"0.60401684",
"0.5976108",
"0.5899346",
"0.58... | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.