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
avslutar konstruktor Implementing interface IController. All controllers must have an index action. Show a standard frontpage for the guestbook.
public function Index() { $this->views->SetTitle('Maveric Guestbook Example'); $this->views->AddInclude(__DIR__ . '/index.tpl.php', array( 'entries'=>$this->guestbookModel->ReadAll(), 'form_action'=>$this->request->CreateUrl('', 'handler') )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction() {\r\n\r\n// NSP::$app->registry->view->welcome = 'Welcome to NSP MVC';\r\n//\r\n// /*** load the index template ***/\r\n NSP::$app->view->viewVar = 'Rest controller';\r\n NSP::$app->registry->get('view')->show('index');\r\n }", "public function index()...
[ "0.7155983", "0.71052855", "0.70617056", "0.7038327", "0.702092", "0.68903476", "0.68786305", "0.68636024", "0.68629026", "0.68466973", "0.6833652", "0.68304604", "0.6802367", "0.6781108", "0.6779859", "0.6779859", "0.6779859", "0.6779859", "0.6779859", "0.6779859", "0.677985...
0.65684193
89
avslutar metod Handle posts from the form and take appropriate action.
public function Handler() { if(isset($_POST['doAdd']) && empty($_POST['email'])) { $this->guestbookModel->Add(strip_tags($_POST['newEntry'])); } elseif(isset($_POST['doClear'])) { $this->guestbookModel->DeleteAll(); } elseif(isset($_POST['doCreate'])) { $this->guestbookModel->Init(); } $this->RedirectTo($this->request->CreateUrl($this->request->controller)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _handleFormPost()\n {\n // see submit.php\n // 'FILE_OBJECTS' => 'handle_file_post',\n // 'BASE64_ENCODED_FILE_OBJECTS' => 'handle_base64_encoded_file_post',\n // 'TRANSFER_IDS' => 'handle_transfer_ids_post'\n }", "public function postAction() {}", "function h...
[ "0.7251956", "0.71086085", "0.70482355", "0.69709885", "0.6942938", "0.6786837", "0.67621803", "0.67614764", "0.6731898", "0.6695902", "0.6630035", "0.6577493", "0.65268564", "0.6525512", "0.6523192", "0.6523192", "0.6523192", "0.65116197", "0.6500993", "0.64890397", "0.64352...
0.67174196
9
Push current batch to kinesis
public function push(array $batch) { $records = array(); foreach ($batch as $record) { $records[] = array('Data' => json_encode($record), 'PartitionKey' => uniqid(),); } $result = $this->_kinesis->putRecords(array('Records' => $records, 'StreamName' => $this->_kinesisStreamName)); \cli::log('Pushing to kinesis a batch of ' . sizeof($records) . ' records to ' . $this->_kinesisStreamName); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function push(array $batch) { \n $data = json_encode($batch);\n\n\t\t$result = $this->_lambda->invoke(array(\n\t\t\t// FunctionName is required\n\t\t\t'FunctionName' => $this->_functionName,\n\t\t\t'InvocationType' => $this->_invocationType,\n\t\t\t'LogType' => $this->_logType,\n\t\t\t'ClientContext'...
[ "0.64421576", "0.58860666", "0.5797348", "0.5692955", "0.5488409", "0.5457554", "0.5418788", "0.5239175", "0.5239175", "0.5235229", "0.5234277", "0.5188104", "0.51825935", "0.511432", "0.5087661", "0.5049727", "0.5038944", "0.50328493", "0.50093377", "0.5002154", "0.4977482",...
0.7708478
0
Display a listing of the resource.
public function index() { // Get Categorys $categories = CategoryWiseSpecification::orderBy('created_at', 'desc')->Where('active', 1)->paginate(100); // Return collection of Categorys as a resource return CategoryWiseSpecificationResouerce::collection($categories); }
{ "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
Store a newly created resource in storage.
public function store(Request $request) { $data = $request->input('data'); if(count($data)) { CategoryWiseSpecification::where('category_id',$data[0]['category_id'])->delete(); } CategoryWiseSpecification::insert($request->input('data')); }
{ "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) { // Get Categorys $categoryWiseResource = CategoryWiseSpecification::findOrFail($id); // Return single Categorys as a resource return new CategoryWiseSpecificationResouerce($categoryWiseResource); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n //\n }", "public function show(Resource $resource)\n {\n // not available for now\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.80919385", "0.8057063", "0.69767725", "0.66477203", "0.6582711", "0.6576947", "0.6554773", "0.65033346", "0.6436811", "0.6331079", "0.6295984", "0.6266727", "0.62626827", "0.6230831", "0.62300277", "0.62278295", "0.62278295", "0.62278295", "0.6201471", "0.6199611", "0.6180...
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // Get Categorys $categoryWiseResource = CategoryWiseSpecification::findOrFail($id); if($categoryWiseResource->delete()) { return new CategoryWiseSpecificationResouerce($categoryWiseResource); } }
{ "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
Display a listing of the resource with requested parameters.
public function getCategoryData(Request $request) { // Get Kawarabis $search = $request->input('search'); $kawarabis = CategoryWiseSpecification::Where('subject', 'like', '%' . $search . '%')->orderBy('created_at', 'desc')->paginate(10); // Return collection of Kawarabis as a resource return CategoryWiseSpecificationResouerce::collection($kawarabis); }
{ "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.77315074", "0.7435692", "0.72278994", "0.72195476", "0.7219459", "0.71886903", "0.7045783", "0.7033005", "0.69769424", "0.69389826", "0.69034684", "0.69004434", "0.68559855", "0.683062", "0.6827898", "0.68177706", "0.68029237", "0.68022925", "0.679395", "0.6767834", "0.676...
0.0
-1
Display a listing of the resource.
public function getCategoryDataFront() { // Get Categorys $categories = CategoryWiseSpecification::orderBy('updated_at', 'desc')->Where('deactivate', 0)->take(4)->get(); foreach($categories as $categoryWiseResource) { $files = explode(",", $categoryWiseResource['file']); $categoryWiseResource['attachments'] = Attachment::WhereIn('id', $files)->get(); } // Return collection of Categorys as a resource return CategoryWiseSpecificationResouerce::collection($categories); }
{ "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
Display the specified resource. $
public function getCategoryWiseSpecificationJoint($categoryId) { // Get Categorys // $categoryWiseResource = //Specification::leftJoin('category_wise_specifications', 'specifications.id', '=', 'category_wise_specifications.specification_id') // //->where('category_wise_specifications.category_id', $categoryId) // //->get(); // Specification::select('*', DB::raw('specifications.id AS id, specifications.name, category_wise_specifications.category_id')) // ->leftJoin('category_wise_specifications', function($join) { // $join->on('specifications.id', '=', 'category_wise_specifications.specification_id'); // }) // ->whereNull('category_wise_specifications.specification_id') // ->where('category_wise_specifications.category_id', $categoryId) // ->get(); // //->whereNull('category_wise_specifications.specification_id'); $specifications = Specification::where('active', 1)->get()->toArray(); $categoryWiseSpecifications = CategoryWiseSpecification::where('category_id', $categoryId)->get()->toArray(); foreach ($specifications as $key => $value) { $specifications[$key]['checked'] = (string)array_search($value['id'], array_column($categoryWiseSpecifications, 'specification_id')); } //dd($specifications); // Return single Categorys as a resource return response()->json(['data' => $specifications]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n //\n }", "public function show(Resource $resource)\n {\n // not available for now\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.80919385", "0.8057063", "0.69767725", "0.66477203", "0.6582711", "0.6576947", "0.6554773", "0.65033346", "0.6436811", "0.6331079", "0.6295984", "0.6266727", "0.62626827", "0.6230831", "0.62300277", "0.62278295", "0.62278295", "0.62278295", "0.6201471", "0.6199611", "0.6180...
0.0
-1
Display the specified resource.
public function getCategoryWiseSpecification($categoryId) { $categoryWiseSpecifications = CategoryWiseSpecification::where('category_id', $categoryId)->get(); // Return single Categorys as a resource return CategoryWiseSpecificationResouerce::collection($categoryWiseSpecifications); }
{ "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
Retrieves a list of models based on the current search/filter conditions.
public function search() { $criteria=new CDbCriteria; $criteria->compare('t.id',$this->id,true); $criteria->compare('t.user_id',$this->user_id,true); $criteria->compare('t.type',$this->type); $criteria->compare('t.obj_id',$this->obj_id,true); $criteria->compare('t.time_send',$this->time_send,true); $criteria->compare('t.created_date',$this->created_date,true); $criteria->compare('t.username',$this->username,true); $criteria->compare('t.title',$this->title,true); $criteria->compare('t.json_var',$this->json_var,true); $criteria->compare('t.count_run',$this->count_run,true); return new CActiveDataProvider($this, array( 'criteria'=>$criteria, 'pagination'=>array( 'pageSize'=> Yii::app()->user->getState('pageSize',Yii::app()->params['defaultPageSize']), ), )); }
{ "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
Display a listing of the resource.
public function index() { // }
{ "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() { return view('gallery.create'); }
{ "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(GalleryRequest $request) { $gallery = new Gallery(); $gallery->title = $request->title; $gallery->description = $request->description; if ($request->image) { $gallery->image = $request->image; $path = $request->file('image')->store( 'public/GalleryImage' ); $gallery->path = ltrim($path, 'public/'); } $gallery->save(); return redirect()->route('root_path'); }
{ "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
Show the form for editing the specified resource.
public function edit($id) { // }
{ "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.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.6833...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "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) { // }
{ "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
Student Is In Limited Rollout District For Resource
public function studentIsInLimitedRolloutDistrictForResource($studentId,$resource,$districtId = false) { if (empty($districtId)) { $districtId = $this->getIepStudentTable()->getDistrictForStudentId($studentId); } if (in_array($districtId, $this->limitedRollout[$resource]['districts'])) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIsCustomerAccessLimited(): bool;", "public function canBeManagedForCareerSubjectAllowed()\n {\n return $this->countCareerStudents() > 0;\n\n }", "public function is_student() {\n return $this->session->get(\"niveau_acces\") >= 0;\n }", "function check_in_area($moo = 0, $dist...
[ "0.549815", "0.54628545", "0.54512733", "0.54237336", "0.5420256", "0.5392128", "0.53758407", "0.5322004", "0.5313787", "0.52969724", "0.5254968", "0.5203218", "0.52002764", "0.5179445", "0.51171774", "0.5114437", "0.50993866", "0.50908023", "0.5089603", "0.5064196", "0.50555...
0.6980848
0
Set iep Student Table
public function setIepStudentTable($iepStudentTable) { $this->iepStudentTable = $iepStudentTable; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIepStudentTable() {\n\t\treturn $this->iepStudentTable;\n\t}", "protected function setTable()\n {\n $class = explode('\\\\', get_called_class());\n $this->table = lcfirst(end($class)).'s';\n }", "private function setTable()\n {\n if (is_null($this->table)) {\n ...
[ "0.7341184", "0.6803989", "0.6576464", "0.64148176", "0.6394424", "0.639085", "0.6376296", "0.6376162", "0.63231975", "0.6306898", "0.6108046", "0.6101952", "0.60996073", "0.6082877", "0.6072632", "0.604061", "0.59972286", "0.5961035", "0.59591496", "0.59242123", "0.5910228",...
0.7504839
0
get Iep Student Table
public function getIepStudentTable() { return $this->iepStudentTable; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStudent(int $id, string $table);", "public function getSoinHospitalisationTable() {\n\t\tif (! $this->soinhospitalisationTable) {\n\t\t\t$sm = $this->getServiceLocator ();\n\t\t\t$this->soinhospitalisationTable = $sm->get ( 'Consultation\\Model\\SoinhospitalisationTable' );\n\t\t}\n\t\treturn ...
[ "0.6768622", "0.64971596", "0.6475363", "0.64135695", "0.6371414", "0.6371414", "0.6371414", "0.6371414", "0.6371414", "0.6371414", "0.6371414", "0.63609564", "0.63031656", "0.62813216", "0.62593216", "0.62446684", "0.62350774", "0.62350774", "0.6219241", "0.61945415", "0.615...
0.8448977
0
Replaced the resource of the thumbnail with a new resource object containing the optimized image delivered by Kraken.
public function replaceThumbnailResource(Thumbnail $thumbnail, array $krakenIoResult);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function updateImgThumbnail()\n {\n //====================================================================//\n // Load Object Images List\n foreach (Image::getImages(SLM::getDefaultLangId(), $this->ProductId) as $image) {\n $imageObj = new Image($image['id_image']);\n ...
[ "0.65871066", "0.64330494", "0.64221925", "0.64045274", "0.6317264", "0.62773347", "0.6200119", "0.6029603", "0.6016328", "0.5985591", "0.5980453", "0.5964642", "0.5884409", "0.57325476", "0.5724037", "0.5697381", "0.56903577", "0.5686293", "0.56613356", "0.56558", "0.5639654...
0.7600771
0
/ This will update the spouse record
public function update_spouce() { $this->is_access('Employer'); foreach ($_POST as $key=>$value) { $p[$key] = $this->linkID->real_escape_string($value); } if ($p['FirstName'] == "") { $err = "1"; } if ($p['LastName'] == "") { $err = "1"; } if ($p['EmailAddress'] == "") { $err = "1"; } if ($err == "1") { print "<br><font color=red>One of the required fields was empty. You must enter in at least the first name, last name and email address. The email address must not be the same as the employee.</font><br><br>"; } $sql = "SELECT `employeeID` FROM `spouse` WHERE `employeeID` = '$p[employeeID]'"; $result = $this->new_mysql($sql); while ($row = $result->fetch_assoc()) { $found = "1"; } if ($found == "1") { // update if ($p['SSN'] != "") { $ssn = ",`SSN` = '$p[SSN]'"; } $sql = "UPDATE `spouse` SET `FirstName` = '$p[FirstName]', `MiddleName` = '$p[MiddleName]', `LastName` = '$p[LastName]', `Gender` = '$p[Gender]', `DOB` = '$p[DOB]', `EmailAddress` = '$p[EmailAddress]', `PhoneNumber` = '$p[PhoneNumber]', `Street` = '$p[Street]', `City` = '$p[City]', `State` = '$p[State]', `PostalCode` = '$p[PostalCode]', `WorkLocationCode` = '$p[WorkLocationCode]', `WorkLocationDescription` = '$p[WorkLocationDescription]' $ssn WHERE `employeeID` = '$p[employeeID]' "; } else { // insert $sql = "INSERT INTO `spouse` (`employeeID`,`FirstName`,`MiddleName`,`LastName`,`SSN`,`Gender`,`DOB`,`EmailAddress`,`PhoneNumber`, `Street`,`City`,`State`,`PostalCode`,`WorkLocationCode`,`WorkLocationDescription`) VALUES ('$p[employeeID]','$p[FirstName]','$p[MiddleName]','$p[LastName]','$p[SSN]','$p[Gender]', '$p[DOB]','$p[EmailAddress]','$p[PhoneNumber]','$p[Street]','$p[City]','$p[State]','$p[PostalCode]',$p[WorkLocationCode],'$p[WorkLocationDescription]')"; } $result = $this->new_mysql($sql); if ($result == "TRUE") { print "<br><font color=green>The record was saved. Loading...</font><br>"; } else { print "<br><font color=red>The record failed to update. Loading...</font><br>"; } ?> <script> setTimeout(function() { document.location.href='employer.php?section=employees'; } ,2000); </script> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateRecord() \n {\n $str = \"Id = :Id\";\n array_walk($this->arrayKeysValues(), function ($value, $key) use (&$str) {\n $str .= \", $key = :$key\";\n });\n $sql = sprintf(\"UPDATE Cubans SET %s WHERE Id = :Id\", $str);\n $statement = $this->connec...
[ "0.63101494", "0.6292979", "0.6247507", "0.618097", "0.6126672", "0.61176276", "0.60786355", "0.607109", "0.6051283", "0.60393834", "0.60336477", "0.59947497", "0.59947497", "0.5969813", "0.59694123", "0.59678423", "0.5932604", "0.59278655", "0.59210503", "0.5894399", "0.5892...
0.6616405
0
/ This function will return the smarty object for mmm module.
public static function createSmartyObject() { $appModuleArr["app"] = MmmUtility::mmmAppName; $appModuleArr["module"] = MmmUtility::mmmModuleName; $appModuleArr["useUploads"] = 1; $smarty = JsCommon::getSmartySettings('appModule',$appModuleArr); return $smarty; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSmarty()\n {\n $this->registerFilters();\n $this->registerPlugins();\n $this->smarty->assign($this->getGlobals());\n\n return $this->smarty;\n }", "static public function getSmarty()\n\t{\n\t\t$smarty = new Smarty();\n\n\t\t$smarty->template_dir = LOCAL_DOCUME...
[ "0.6912973", "0.6737093", "0.66618145", "0.6654182", "0.6416009", "0.641455", "0.63110936", "0.6237884", "0.6149676", "0.60187584", "0.5938074", "0.59025514", "0.5660648", "0.5660531", "0.5660531", "0.5645874", "0.5628115", "0.5552656", "0.55128837", "0.5506361", "0.5496173",...
0.8027337
0
This function is used to write mail into disk based on maileid and header/footer will be added based on site .....
public static function writeMmmMail($urlMail,$mailerId,$site) { if(!$urlMail || !$mailerId || !$site) throw new jsException("","compulsory field missing in writeMmmMail() of MmmUtility.class.php"); $smarty = MmmUtility::createSmartyObject(); $path = $smarty->template_dir."individual_mailer_templates"; $pathOfHtmlFile = $path."/".$mailerId.".html"; $handle = fopen($pathOfHtmlFile, "w+"); $MmmMailerBasicInfo = new MmmMailerBasicInfo; $mailerBasicInfoArr = $MmmMailerBasicInfo->retreiveMailerInfo($mailerId); if($handle) { $content = CommonUtility::sendCurlGetRequest($urlMail); if($site=='J') $mailerBasicInfoArr['RESPONSE_TYPE']=''; $response_type=$mailerBasicInfoArr['RESPONSE_TYPE']; $content = str_replace("<body>",'<body>'."\n".'~if $showHeaderFooter neq "N"`~include_partial("global/header'.$site.'Mailer",[mailerId=>$mailerId,checksum=>$checksum,echecksum=>$echecksum,browserUrl=>$browserUrl,email=>$email,profileid=>$profileid,name=>$name,phone=>$phone,response_type=>$response_type,isTestMailer=>$isTestMailer,serviceMail=>$serviceMail,isMrc=>$isMrc])`~/if`',$content); $content = str_replace("</body>",'~if $showHeaderFooter neq "N"`~include_partial("global/footer'.$site.'Mailer",[promoMail=>$promoMail,browserUrl=>$browserUrl,mailerId=>$mailerId,checksum=>$checksum,profileid=>$profileid,isMrc=>$isMrc,email=>$email])`~/if`'."\n".'</body>',$content); fwrite($handle, $content); fclose($handle); } else throw new jsException("","unable to write to a file in writeMmmMail() of MmmUtility.class.php"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendmail()\n\t{\n\t\tglobal $ilUser;\n\t\tinclude_once 'classes/class.ilFileDataMail.php';\n\t\trequire_once \"Services/Mail/classes/class.ilFormatMail.php\";\n\t\t$mfile = new ilFileDataMail($ilUser->getId());\n\t\t$umail = new ilFormatMail($ilUser->getId());\n\n\t\t$html_content=$this->export(false);\n\...
[ "0.6478399", "0.6380844", "0.60329175", "0.59977263", "0.5902862", "0.57994205", "0.5770783", "0.577052", "0.5753432", "0.5680101", "0.562946", "0.56015104", "0.5586008", "0.55711806", "0.55433637", "0.55271614", "0.5521383", "0.5514301", "0.5512112", "0.55002654", "0.5498630...
0.6641652
0
/ This function will return the menu to be displayed on left side of the mmm interface.
public static function getLeftPanelMenu() { $arr["Create new mailer"] = "createMailer"; $arr["Form Query(Jeevansathi)"] = "formQueryJs"; $arr["Form Query(99acres)"] = "formQuery_99"; $arr["Upload a CSV"] = "csvUpload"; $arr["Write Mail"] = "writeMail"; $arr["Set Test Email Id "] = "setTestId"; $arr["Mail Fire Menu"] = "fireMenu"; $arr["MIS"] = "mis"; $arr["MIS-99"] = "mis99"; $arr["MIS-Generate Csv"] = "createCsv"; $arr["Get Link For Client MIS"] = "clientMISLink"; $arr["Logout"] = "logout"; return $arr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function viewLeftMenu()\n\t{\n\t\t$viewLevelResult\t= $this->manageLeftMenu('V', '0', '', '', '0', '0');\n\t\treturn $viewLevelResult;\n\t}", "public function getMenu();", "public function get_menu()\r\n {\r\n return '';\r\n }", "public function menu_main_menu()\n {\n return men...
[ "0.77768785", "0.74115473", "0.731653", "0.72810954", "0.71516556", "0.7091659", "0.7091659", "0.7051819", "0.70020604", "0.6966524", "0.6926043", "0.6925746", "0.692449", "0.69087946", "0.6896429", "0.68953013", "0.6885175", "0.6875016", "0.68550754", "0.6849391", "0.6827749...
0.7381873
2
/ This function will return the horizontal menu to be displayed on right side of the mmm interface in the fire mail success tpl.
public static function getFireMailMenu() { $arr["test"] = "test"; $arr["retest"] = "retest"; $arr["start"] = "start"; $arr["stop"] = "stop"; return $arr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function left_menu()\n\t\t{\n\t\t\t $page_name = functions::get_page_name();\n\t\t\techo '\n\t\t\t\t<ul>\n\t\t\t\t\t';\n\t\t\t\t\t\n\t\t\t\t\t$content_module = array('manage_content.php', 'register_content.php', 'manage_page_content.php', 'register_page_content.php','manage_content_option.php', 'register_c...
[ "0.7177308", "0.71032995", "0.7033713", "0.68014264", "0.676798", "0.6741472", "0.6712746", "0.6703535", "0.6697968", "0.65929896", "0.6584162", "0.6564301", "0.65542686", "0.6532783", "0.6532783", "0.6498875", "0.64954376", "0.64899427", "0.6449488", "0.64327943", "0.6427783...
0.0
-1
This function will get the mailer name based on mailerid. mailerId unique id of mailer
public static function getTemplateName($mailerId) { $templateName = $mailerId.".html"; return $templateName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSenderName($storeId = 0);", "protected function getSenderEmailName() {}", "protected function getSenderEmailName() {}", "public function getMailFromName() {\n return $this->mailFromName;\n }", "public function getName(): string\n {\n return 'mailingName';\n }", "functi...
[ "0.66487324", "0.6634007", "0.6634007", "0.6305995", "0.6304103", "0.6287833", "0.609953", "0.6046342", "0.6024403", "0.6016509", "0.6013705", "0.60008806", "0.5987896", "0.59833413", "0.5976375", "0.5952234", "0.5952234", "0.59447634", "0.5888256", "0.5885766", "0.58768034",...
0.6510419
3
/ This function will return the array of years to be used in displaying MIS.
public static function getYears() { $year=array(); for($i=date("Y");$i>2004;$i--) $year[]=$i; return $year; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getYears() {\r\n\t\t$year = array();\r\n\t\t$current_year = strftime(\"%Y\");\r\n\t\tfor($i = 2000; $i <= $current_year+1 && $y = strftime(\"%Y\", mktime(0,0,0,0,0,$i)); ++$i) {\r\n\t\t\t$year[$i] = array('id' => $i, 'name' => $y+1);\r\n\t\t}\r\n\t\treturn $year; //array\r\n\t}", "public function...
[ "0.8103319", "0.80832255", "0.8013607", "0.7778887", "0.76004446", "0.7360705", "0.7329652", "0.73059285", "0.7190405", "0.7169601", "0.7168234", "0.71594906", "0.7107368", "0.709191", "0.7080359", "0.7069041", "0.7031295", "0.69915473", "0.68300533", "0.67744756", "0.6742444...
0.7862183
3
This function will return the months in a year i.e. 12 return month array
public static function getMonths() { $month=array(1,2,3,4,5,6,7,8,9,10,11,12); return $month; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMonthArray()\n{\n\t$arrMonths = array();\n\n\tfor ($i=1; $i<13; $i++)\n\t{\n\t\t$arrMonths[$i] = date('M', mktime(0, 0, 1, $i, 1));\n\t}\n\t\n\treturn $arrMonths;\n}", "protected function getMonthsArray()\n\t{\n\t\t$ma = array_pad([], 13, null);\n\t\tunset($ma[0]);\n\t\tforeach ($this->_attr[self::MO...
[ "0.835848", "0.82891667", "0.80504906", "0.793369", "0.7881668", "0.78092444", "0.7775617", "0.7682879", "0.7478617", "0.74438745", "0.7434012", "0.7423093", "0.736445", "0.7338781", "0.732974", "0.7328457", "0.72994274", "0.7298369", "0.715492", "0.7147159", "0.7095324", "...
0.7993821
3
This function will return the days in a month i.e. 31 return month array
public static function getDays() { $days=array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31); return $days; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_month_days ($month) {\n $labels = array();\n $month = month_converter($month);\n $monthdays = cal_days_in_month(CAL_GREGORIAN, $month, $date->format('Y'));\n $day = $date->format('d');\n $i = 0;\n while ($i < 30) {\n if ($day <= $monthdays) {\n if (strlen($day) == 1...
[ "0.800454", "0.8000759", "0.78457767", "0.7763012", "0.7679744", "0.76066476", "0.7531211", "0.7424939", "0.7422823", "0.7337807", "0.7301716", "0.72468656", "0.72239876", "0.72016174", "0.7189543", "0.71480614", "0.71293855", "0.7077033", "0.7029741", "0.69875556", "0.697916...
0.6714374
35
This function will return email domain.
public static function checkEmailDomain($email){ $googleArray = array('googlemail','gmail'); $yahooArray = array('yahoo','ymail','rocketmail'); $hotmailArray = array('hotmail','live'); $rediffArray = array('rediff'); foreach($googleArray as $v){ if(strstr($email,'@'.$v)){ return 'G'; } } foreach($yahooArray as $v) { if(strstr($email,'@'.$v)){ return 'Y'; } } foreach($hotmailArray as $v){ if(strstr($email,'@'.$v)){ return 'H'; } } foreach($rediffArray as $v){ if(strstr($email,'@'.$v)){ return 'R'; } } return 'O'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDomain()\n\t{\n\t\treturn substr(strrchr($this->email, \"@\"), 1);\n\t}", "public function getDomain()\n {\n return substr($this->email, strpos($this->email, '@'));\n }", "public function getDomain(): string\n {\n $domain = php_uname('n');\n if ($this->from) {\n...
[ "0.8919531", "0.8831561", "0.82659787", "0.8255858", "0.7714098", "0.76167864", "0.74253833", "0.74253833", "0.7398573", "0.73925847", "0.7328791", "0.7326213", "0.7322937", "0.7304398", "0.730002", "0.71894735", "0.7178395", "0.71500736", "0.7109835", "0.7068153", "0.7063993...
0.67496616
62
Take arguments for running
function prepare($args) { if (! parent::prepare($args)) {return false;} $this->user = $this->auth_user; $this->notice = Notice::staticGet($this->arg('id')); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function run($args);", "abstract public function run(array $args=null);", "abstract public function run(array $args = array(), array $opts = array());", "public function run(...$params);", "abstract protected function main(array $arguments);", "public function run(array $args = []) : void...
[ "0.7907581", "0.75986713", "0.7585241", "0.7400227", "0.72699934", "0.70115906", "0.70091575", "0.6971584", "0.68008304", "0.67531663", "0.6731278", "0.6655392", "0.6654889", "0.6654889", "0.6654889", "0.6654889", "0.6654889", "0.6654889", "0.6654889", "0.6654889", "0.6628185...
0.0
-1
Handle the request Check the format and show the user info
function handle($args) { parent::handle($args); if ($_SERVER['REQUEST_METHOD'] != 'POST') { $this->clientError( '本方法需要POST.', 400, $this->format ); return; } if (!in_array($this->format, array('xml', 'json'))) { $this->clientError( 'API方法未找到!', 404, $this->format ); return; } if (empty($this->notice)) { $this->clientError( '未找到此ID的状态.', 404, $this->format ); return; } // Note: Twitter lets you fave things repeatedly via API. $this->fave_group_id = $this->trimmed('fave_group_id'); if ($this->user->hasFave($this->notice)) { $this->clientError( '此状态已经被收藏!', 403, $this->format ); return; } //添加收藏夹 $fave = Fave::addNew($this->user, $this->notice, $this->fave_group_id); if (empty($fave)) { $this->clientError( '不能收藏此状态.', 403, $this->format ); return; } $this->notify($fave, $this->notice, $this->user); $this->user->blowFavesCache(); if ($this->format == 'xml') { $this->showSingleXmlStatus($this->notice); } elseif ($this->format == 'json') { $this->show_single_json_status($this->notice); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionInfo()\n {\n $uid = getParam('id', null);\n if (!$uid) {\n $uid = getMyId();\n }\n if (!empty($uid)) {\n\n $useModel = User::find()->active()->where(['id' => $uid])->one();\n if ($useModel) {\n $this->msg = 'User I...
[ "0.6381613", "0.6273211", "0.6259585", "0.6199108", "0.61968595", "0.6115856", "0.60372525", "0.6023052", "0.59711343", "0.59683937", "0.5966454", "0.5958669", "0.59365374", "0.5935942", "0.5911764", "0.5906135", "0.5882494", "0.5863582", "0.5851603", "0.58364904", "0.5787285...
0.0
-1
Notify the author of the favorite that the user likes their notice
function notify($fave, $notice, $user) { $other = User::staticGet('id', $notice->user_id); if ($other && $other->id != $user->id) { $otherProfile = $other->getProfile(); if ($otherProfile->email && $otherProfile->emailnotifyfav) { mail_notify_fave($otherProfile, $user->getProfile(), $notice); } // XXX: notify by IM // XXX: notify by SMS } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bp_activity_action_mark_favorite() {\n\n\tif ( !is_user_logged_in() || !bp_is_activity_component() || !bp_is_current_action( 'favorite' ) )\n\t\treturn false;\n\n\t// Check the nonce\n\tcheck_admin_referer( 'mark_favorite' );\n\n\tif ( bp_activity_add_user_favorite( bp_action_variable( 0 ) ) )\n\t\tbp_cor...
[ "0.718546", "0.6816001", "0.6704977", "0.6636005", "0.6521407", "0.64391017", "0.64359003", "0.6421454", "0.63357586", "0.63095206", "0.6287639", "0.6283438", "0.6270361", "0.62349534", "0.61921734", "0.6169329", "0.6166443", "0.61642474", "0.6153861", "0.6149941", "0.6146118...
0.6606917
4
Run the database seeds.
public function run() { $roles = ['Administrador','Vendedor','Comprador']; foreach ($roles as $role){ Role::create([ 'description_role'=> $role ]); } //// $faker=Faker::create(); //// //// for ($i=0;$i<10;$i ++){ //// Role::create([ //// 'descrpcionrol'=>$faker->descrpcionrol, //// ]); // // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n fact...
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.78414...
0.0
-1
FUNCION QUE VALIDA INICIALMENTE EL EXCEL
function valida_excel($archi){ ini_set("display_errors",1); error_reporting(E_ALL); require_once 'excel_reader2.php'; $excel = new Spreadsheet_Excel_Reader($archi); // $cont = 0; $conta = 0; $no_conta = 0; $arre = ""; $item_bueno=""; $item_malo=""; $cadena_buenos = ""; $columnas =0; $formato = array("Hora de salida","Numero de Grupo","Fecha de incicio","SAP ( Cliente)","Pedido","Kilos","Economico","Unidad Medida","Fecha estimada","Hora de Entrada","Hora de Salida","Comentarios","Hora de Llegada"); $formato_actual = array(); $bandera = true; $m = -1; for ($row=1;$row<2;$row++){ for ($col=1;$col<=$excel->colcount();$col++) { $m = $m +1; if($excel->val($row,$col)!=""){ $formato_actual[$m] = strtoupper($excel->val($row,$col)); $columnas = $columnas +1; }else{ break; } } } if($columnas == count($formato)){ // Echo "formato completo"; for ($col=0;$col<count($formato_actual);$col++) { if(in_array($formato_actual[$col],$formato)){ if( $formato_actual[$col] == $formato[$col]){ // echo ' no estan en la misma posicion <b style="color:#00ff00;">'.$formato_actual[$col] .'=='. $formato[$col].'</b><br />'; $bandera = true; }else{ // echo ' La posicion de las columnas no es correcta <b style="color:#993300;">'.$formato_actual[$col] .'=='. $formato[$col].'</b><br />'; $bandera = false; break; } }else{ //echo "segun este ".$formato_actual[$col].'<br />'; $bandera = false; break; } } }else{ $bandera = false; } return $bandera; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tableValidator( &$errors, &$warnings, &$excel, &$lang ){\n $valid = 0;\n for( $col = 1; $col <= $excel->numCols(); $col++ ) {\n if( empty($excel->valueAt( 1, $col )) ){\n for( $row = 2; $row <= $excel->numRows(); $row++ ){\n if( $excel->valueAt( $row, $col) !== '' ){...
[ "0.6359894", "0.61580193", "0.59650594", "0.5895539", "0.5880751", "0.5791086", "0.5740606", "0.57366824", "0.5734721", "0.5715595", "0.56569123", "0.56505704", "0.56178", "0.5602266", "0.557479", "0.5562503", "0.553872", "0.5516638", "0.55123055", "0.5502009", "0.5501114", ...
0.68792725
0
FUNCION QUE INGRESA INFO DEL EXCEL A LA BASE
function ejecutar_excel($case,$archi,$usr,$cli){ global $total_aceptados,$total_rechazados, $rechazados_localizados ,$cont_registros,$h,$mensaje,$nueva_ruta,$unidad_x,$ruta_x,$insertar_ruta_unidad; ini_set("display_errors",1); error_reporting(E_ALL); require_once 'excel_reader2.php'; $excel = new Spreadsheet_Excel_Reader($archi); echo $cont = 0; $conta = 0; $no_conta = 0; $arre = ""; $item_bueno=""; $item_malo=""; $cadena_buenos = ""; $columnas =0; //$formato = array("NIP","CLIENTE","CALLE","COLONIA","DEL-MUN","ESTADO","CP","LATITUD","LONGITUD","ITINERARIOS"); //$formato_actual = array(); $bandera = true; $m = -1; for ($row=1;$row<2;$row++){ for ($col=1;$col<=$excel->colcount();$col++) { $m = $m +1; if($excel->val($row,$col)!=""){ $columnas = $columnas +1; } } } //if($bandera == true){ //-------------------------------------------------- for ($row=2;$row<=$excel->rowcount();$row++) { $cont_registros=$cont_registros+1; for ($col=1;$col<=$columnas;$col++) { if($excel->val($row,$col)!=""){ $cont = $cont +1; $item_bueno = $excel->val($row,1); if($cadena_buenos ==""){ $cadena_buenos = $excel->val($row,$col); }else{ if($col==8){ $rLatLon = validaLatLon($excel->val($row,8),$excel->val($row,9)); // echo "para".$excel->val($row,8).','.$excel->val($row,9)." la var latlon es = ".$rLatLon.'<br>'; if($rLatLon==1){ $cadena_buenos = $cadena_buenos.'['.$excel->val($row,$col); }else{ $cadena_buenos=""; break; } }else if($col==$columnas){ $semana = array("D","L","M","R","J","V","S"); $dias = explode(",",strtoupper($excel->val($row,$col))); $day = ""; //echo " semana".count($semana)."-- dias ".count($dias).'<br />'; for($d=0;$d<count($dias);$d++){ for($s=0;$s<count($semana);$s++){ //echo "sem=".$semana[$s].'<br />'; if($semana[$s]==$dias[$d]){ if($day == ""){ if($semana[$s] == "D"){ $day = '0'; }else{ $day = $s; } }else{ // echo $dias[$d].'=='.$semana[$s].$s.'<br />'; $day = $day.'@'.$s; } } } } $cadena_buenos = $cadena_buenos.'['.$day; }else{ $cadena_buenos = $cadena_buenos.'['.$excel->val($row,$col); } } }else{ if($col == 7){ //echo "columna ".$col.'-'.$excel->val($row,$col); $cadena_buenos = $cadena_buenos.'[99999'; $cont = $cont +1; }else{ if( $item_malo == ""){ $item_malo = $excel->val(1,$col); }else{ $item_malo = $item_malo.','. $excel->val(1,$col); } $cadena_buenos=""; break; } } } if($cont == $columnas){ $conta = $conta+1; echo $cadena_buenos.'<br />'; /*------------------------------- OPERACIONES -----------------------*/ insert_update($item_bueno,$cadena_buenos,$case,$usr,$cli); if($insertar_ruta_unidad==0){ crear_ruta_unidad($unidad_x,$ruta_x,$usr,$cli); } crea_ruta_punto($item_bueno,$nueva_ruta); crea_itn($nueva_ruta,$cadena_buenos,$usr); crea_pto_vis($nueva_ruta,$cadena_buenos); /*---------------------------------------------------------*/ $item_bueno=""; $cadena_buenos=""; }else{ $no_conta = $no_conta+1; if($arre ==""){ $arre=$row; }else{ $arre= $arre.','.$row; } } $cont =0; } $total_aceptados = $conta; echo "<br><br><br> rechazados = ".$total_rechazados = $no_conta; if($no_conta>0){ echo $rechazados_localizados = $arre; } // } //if bandera de formato correcto. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function consulta_intereses($tipo_personal)\r\n{\r\n\t$cedula=$_SESSION[\"cedula\"];\r\n\t//$cedula=3379195;\t\r\n\t$db=\"sidial_excel\";\r\n\t$sql=\"SELECT name FROM sysobjects ORDER BY name ASC\";\r\n\t$ds\t= new DataStore($db, $sql);\r\n\t//COMPROBACION PARA VERIFICAR QUE DEBE ESTAR EN UNO DE LOS LISTADOS 1998-...
[ "0.61434567", "0.6125422", "0.6024432", "0.60075057", "0.59801286", "0.5979597", "0.59303385", "0.5922777", "0.5885762", "0.5877549", "0.58712184", "0.58447623", "0.58423895", "0.57960165", "0.57775486", "0.5752686", "0.57500744", "0.56962335", "0.56674993", "0.56663674", "0....
0.6275652
0
funcion que crea la ruta_unidad_asignada
function crear_ruta_unidad($un_x,$r_x,$usu,$cli){ global $db,$dbf,$fecha_con_formato,$nueva_ruta,$insertar_ruta_unidad; $data = Array( 'DESCRIPTION' => utf8_decode(strtoupper($r_x)), 'COD_USER' => $usu, 'COD_CLIENT' => $cli, 'CREATE_DATE' => $fecha_con_formato ); if($dbf-> insertDB($data,'SAVL_ROUTES',true) == true){ echo "se genero la ruta, ahora se asigna unidad a ruta siempre y cuando sea diferente de -1 en el cod_entity"; $ruta = "SELECT ID_ROUTE FROM SAVL_ROUTES WHERE DESCRIPTION LIKE '%".strtoupper($r_x)."%'"; $query = $db->sqlQuery($ruta); $row = $db->sqlFetchArray($query); $count_x = $db->sqlEnumRows($query); if($un_x!=-1) { $data_3 = Array( 'ID_ROUTE' => $row['ID_ROUTE'], 'COD_ENTITY' => $un_x, 'COD_USER' => $usu, 'CREATE_DATE' => $fecha_con_formato ); if($dbf-> insertDB($data_3,'SAVL_ROUTES_UNITS',true) == true){ echo "info de la ruta".$row['ID_ROUTE'].'-'.$un_x.'-'.$usu.'-'.$fecha_con_formato.'<br />'; }else{ echo "fallo en ruta-unidad"; } } } $nueva_ruta = $row['ID_ROUTE']; $insertar_ruta_unidad = $insertar_ruta_unidad + 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generarAtencion()\r\n{ \r\n\tglobal $use;\r\n\tglobal $priv;\r\n\r\n\t\t//DISTINGUE ENTRE ATENCION A DOMICILIO O ATENCION EN CONSULTORIO\r\n\t\tif(isset($_POST['atencion_domicilio'])){\r\n\t\t\t$dom=$_POST['dom'];\r\n\t\t\t$nrocasa=$_POST['nrocasa'];\r\n\t\t\t$barrio=$_POST['barrio'];\r\n\t\t\t$localida...
[ "0.63479996", "0.6222491", "0.59448594", "0.5871154", "0.58694696", "0.5861741", "0.58404166", "0.58074963", "0.57517076", "0.57491374", "0.5747312", "0.5734514", "0.5726603", "0.57103276", "0.5695436", "0.5692024", "0.5682", "0.56688267", "0.566635", "0.5661396", "0.56532234...
0.7156163
0
funcion que asigna un geopunto a la ruta creada con info contenida en excel.
function crea_ruta_punto($itm,$r){ global $db,$dbf,$fecha_con_formato,$cp,$cpno, $existe_punto_detalle; $cuenta_puntos=0; $cuenta_puntos_no = 0; $otra_ban = 0; $bandera =0; $usuario = "SELECT COD_OBJECT_MAP FROM SAVL_G_PRIN WHERE ITEM_NUMBER = '".$itm."'"; $query_user = $db->sqlQuery($usuario); $row_user = $db->sqlFetchArray($query_user); $count_user = $db->sqlEnumRows($query_user); if($count_user > 0) { $punto = "SELECT COD_OBJECT_MAP FROM SAVL_ROUTES_DETAIL WHERE COD_OBJECT_MAP =".$row_user['COD_OBJECT_MAP']; $query_punto = $db->sqlQuery($punto); $count_punto = $db->sqlEnumRows($query_punto); if($count_punto>0){ // $existe_punto = $existe_punto +1; echo "ya existe el geopunto en routes_detail, se guardara este mismo geopunto con otra ruta..."; $otra_ban = 1; } //if($count_punto==0){ $data_2 = Array( 'ID_ROUTE' => $r, 'COD_OBJECT_MAP' => $row_user['COD_OBJECT_MAP'], 'CREATE_DATE' => $fecha_con_formato ); if($dbf-> insertDB($data_2,'SAVL_ROUTES_DETAIL',false) == true){ $bandera = 1; echo 1; } else{ echo 0; } // }else{ // $bandera = 0; //} } if($bandera ==1){ $cp = $cp +1; }else{ $cpno = $cpno +1; } if($otra_ban ==1){ $existe_punto_detalle = $existe_punto_detalle +1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function geraPauta()\n {\n $turmaId = $this->args[0];\n $pautaXls = $this->Turma->geraPautaExcel($turmaId);\n\n $objWriter = PHPExcel_IOFactory::createWriter($pautaXls, 'Excel2007');\n $objWriter->save(Configure::read('OpenSGA.save_path') . DS . $turmaId . '.xlsx');\n $...
[ "0.5955372", "0.5752802", "0.57108444", "0.5563425", "0.54933167", "0.5460124", "0.540135", "0.53771704", "0.5295756", "0.52934384", "0.52718526", "0.5252045", "0.5188542", "0.5188542", "0.5174694", "0.5148169", "0.51303715", "0.5109487", "0.5083616", "0.5075504", "0.5064973"...
0.49666741
28
fin funcion que crea ruta,asigna unidad, y geopunto. /
function crea_itn($r,$string,$u){ global $db,$dbf,$fecha_con_formato; $cadena = explode("[",$string); $cadena2 = explode("@",$cadena[10]); for($c=0;$c<count($cadena2);$c++){ $sql_z = "SELECT ID_ITINERARIO,ID_DIA FROM ITN_DEFINICION WHERE ID_ROUTE = ".$r." AND ID_DIA = ".$cadena2[$c]; $kuery = $db->sqlQuery($sql_z); $con = $db->sqlEnumRows($kuery); $row = $db->sqlFetchArray($kuery); if($con > 0){ echo "no se hace algo <br>"; }else{ echo "insertar ".$r.','.$cadena2[$c].','.$u.'<br />'; $datos = Array( 'ID_ROUTE' => $r, 'ID_DIA' => $cadena2[$c], 'COD_USER' => $u, 'CREADO' => $fecha_con_formato, 'ACTIVO' => 1 ); if($dbf-> insertDB($datos,'ITN_DEFINICION',false) == true){ $bandera = 1; echo 1; } else{ echo 0; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function crea_ruta_punto($itm,$r){\n\t \n\n global $db,$dbf,$fecha_con_formato,$cp,$cpno, $existe_punto_detalle;\n $cuenta_puntos=0;\n\t$cuenta_puntos_no = 0;\n\t$otra_ban = 0;\n\t$bandera =0;\n \n\t\t\t\t$usuario = \"SELECT COD_OBJECT_MAP FROM SAVL_G_PRIN WHERE ITEM_NUMBER = '\".$itm.\"'\";\n\t\t\t $que...
[ "0.69697857", "0.608409", "0.5770648", "0.577007", "0.5770051", "0.5752846", "0.57469964", "0.57453495", "0.57452357", "0.57427156", "0.57052577", "0.567961", "0.5678114", "0.56316525", "0.5576929", "0.55389285", "0.55005914", "0.5491328", "0.5479521", "0.54631186", "0.543780...
0.0
-1
/ Listing of pengetahuan
function index() { $data['pengetahuan'] = $this->Pengetahuan_model->get_all_pengetahuan(); $data['_view'] = 'pengetahuan/index'; $this->load->view('layouts/main',$data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPengajuan() {\n $dataPengajuan = Pengajuan::model()->findAll('NIM=:NIM', array(':NIM' => Yii::app()->user->getUsername()));\n return CHtml::listData($dataPengajuan, 'IDPengajuan', 'Judul');\n }", "function listQueryKPB() {\n\t\t\t$sql = \"select p.nik,\".static::schema.\".f_na...
[ "0.6396949", "0.6204486", "0.6165345", "0.6063524", "0.6050605", "0.60323197", "0.602854", "0.600866", "0.59766656", "0.5960257", "0.59445894", "0.59291875", "0.59285694", "0.59019333", "0.58978444", "0.5897578", "0.58824253", "0.58783066", "0.58754206", "0.5870261", "0.58649...
0.6192468
2
/ Adding a new pengetahuan
function add() { if(isset($_POST) && count($_POST) > 0) { $params = array( 'kode_penyakit' => $this->input->post('kode_penyakit'), 'id_gejala' => $this->input->post('id_gejala'), 'mb' => $this->input->post('mb'), 'md' => $this->input->post('md'), ); $pengetahuan_id = $this->Pengetahuan_model->add_pengetahuan($params); redirect('pengetahuan/index'); } else { $data['_view'] = 'pengetahuan/add'; $this->load->view('layouts/main',$data); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_plazo()\n\t{\n\t\tif(!empty($this->data))\n\t\t{\n\t\t\techo var_dump($this->data);\n\t\t\t$etapa = mb_strtoupper($this->data['Plazo']['etapa']);\t\t\n\t\t\t$etapa = $etapa;\n\t\t\t$datos = array('etapa'=> $etapa,\n\t\t\t\t\t\t 'etapa_id'\t=> $this->data['Plazo']['etapa_id'],\n\t\t\t\t\t\t 'plazo...
[ "0.68769336", "0.67311484", "0.6614731", "0.6588668", "0.6549776", "0.65324175", "0.65178704", "0.64994824", "0.6492128", "0.64155567", "0.6411806", "0.6389164", "0.63716537", "0.6325359", "0.62724966", "0.62557507", "0.62435836", "0.6242445", "0.6241005", "0.6207467", "0.620...
0.6846086
1
/ Editing a pengetahuan
function edit($id_pengetahuan) { // check if the pengetahuan exists before trying to edit it $data['pengetahuan'] = $this->Pengetahuan_model->get_pengetahuan($id_pengetahuan); if(isset($data['pengetahuan']['id_pengetahuan'])) { if(isset($_POST) && count($_POST) > 0) { $params = array( 'kode_penyakit' => $this->input->post('kode_penyakit'), 'id_gejala' => $this->input->post('id_gejala'), 'mb' => $this->input->post('mb'), 'md' => $this->input->post('md'), ); $this->Pengetahuan_model->update_pengetahuan($id_pengetahuan,$params); redirect('pengetahuan/index'); } else { $data['_view'] = 'pengetahuan/edit'; $this->load->view('layouts/main',$data); } } else show_error('The pengetahuan you are trying to edit does not exist.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit_kuota_matkul_pilihan(){\n\t\t$sql = $this->m_aka->edit_kuota_matkul_pilihan();\n\n\t}", "public function edit(Pengeluaran $pengeluaran)\n {\n //\n }", "public function edit(pelanggan $pelanggan)\n {\n // \n }", "public function edit(Pengumuman $pengumuman)\n ...
[ "0.6703054", "0.65939426", "0.65561324", "0.6494662", "0.64744234", "0.64677256", "0.63609564", "0.63315505", "0.63026404", "0.62938005", "0.627312", "0.6271995", "0.62704545", "0.6263372", "0.6260048", "0.6241211", "0.62206364", "0.6207124", "0.618325", "0.6173645", "0.61706...
0.6360707
7
Creates data provider instance with search query applied
public function search() { $query = Board::find()->where(['user_id' => $this->user_id]); $dataProvider = new ActiveDataProvider([ 'query' => $query, 'pagination' => [ 'pageSize' => 10, ], 'sort' => [ 'defaultOrder' => [ 'created_at' => SORT_DESC, ] ], ]); return $dataProvider; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function searchQueryDataProvider() {}", "public function search()\n {\n $q = $this->getQuery();\n $dataProvider = new ActiveDataProvider([\n 'query' => $q,\n ]);\n\n return $dataProvider;\n }", "public function getQueryDataProvider() {}", "public function s...
[ "0.7773856", "0.674291", "0.65721744", "0.6503215", "0.6472826", "0.6389071", "0.63745373", "0.6287255", "0.62671757", "0.62457365", "0.62425256", "0.62123144", "0.61969537", "0.6172912", "0.61250603", "0.6123412", "0.6116283", "0.61031115", "0.6101092", "0.608637", "0.608177...
0.59620416
34
const SCENARIO_CREATE = 'create'; const SCENARIO_UPDATE = 'update';
public static function tableName() { return 'hit_counter'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return \"create\";\n }", "public function testIfCreationIsCorrect(){ \n \n $this->assertEquals(-1, $this->status->getStatusId()); \n $this->assertEquals('default_status', $this->status->getStatusName());\n \n }", "public function testC...
[ "0.53217167", "0.5306386", "0.5233641", "0.5233641", "0.51754403", "0.51417476", "0.511026", "0.5094873", "0.50790423", "0.5037855", "0.5004727", "0.50042605", "0.499789", "0.49826005", "0.4957711", "0.4957229", "0.4955588", "0.4898676", "0.4894828", "0.48918322", "0.4884558"...
0.0
-1
Run the database seeds.
public function run() { //Creo 10 usuarios factory(App\User::class, 10)->create(); //Creo un usuario con mis datos App\User::create([ 'name' => 'Willian Zamalloa', 'email' => 'wzamalloa@hotmail.com', 'password' => bcrypt('123') ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n fact...
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.78414...
0.0
-1
Permet de rendre la vue
public function render($view, $variables = []){ ob_start(); extract($variables); require($this->viewPath . str_replace('.', '/', $view) . '.php'); $content = ob_get_clean(); require($this->viewPath . 'template/' . $this->template . '.php'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index() {\r\n $this->genererVue();\r\n }", "public function render()\n {\n return view('livewire.detail-satwa')\n ->extends('layouts.guest.master')\n ->section('content');\n }", "public function render() {\n\t\techo '<div id=\"neve-dashboard\"></div>';\n\t}"...
[ "0.6885516", "0.6724208", "0.66114616", "0.64888763", "0.6455527", "0.6427262", "0.6378208", "0.6372937", "0.636241", "0.63479036", "0.63452905", "0.6311434", "0.62655646", "0.62593865", "0.6219314", "0.6208566", "0.61912906", "0.61672276", "0.613543", "0.61341035", "0.612736...
0.0
-1
Constructs a trait use node.
public function __construct(array $traits, array $adaptations = array(), array $attributes = array()) { parent::__construct( array( 'traits' => $traits, 'adaptations' => $adaptations, ), $attributes ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getTraitNode(): Node\\Stmt\\TraitUse\n {\n return new Node\\Stmt\\TraitUse([\n new Node\\Name('\\\\' . $this->aopClassName)\n ]);\n }", "private function getFirstTraitUseStatementInTrait()\n {\n return $this->getFirstNodeOfTypeInTrait(\n 'PDepe...
[ "0.77279305", "0.552925", "0.5454156", "0.5393078", "0.525727", "0.51459754", "0.50589913", "0.50075024", "0.49570608", "0.49354798", "0.48836666", "0.48836666", "0.4701154", "0.46466094", "0.45757923", "0.45539042", "0.45375037", "0.4518581", "0.44598734", "0.44233826", "0.4...
0.3714977
87
Create a new password controller instance.
public function __construct() { $this->middleware('guest'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create($password);", "function create_new_password(){\n $user_id = $this->encrypt_decrypt('decrypt', $_GET['puk']);\n \n $view = array(\n 'user_id' => $user_id,\n 'content' => 'new_password_view'\n ); \n\n $this->load->view('includes/content', $view);\n ...
[ "0.6701984", "0.6561288", "0.6560893", "0.6434429", "0.63951623", "0.61247605", "0.60970163", "0.60715383", "0.60647863", "0.59886193", "0.59331155", "0.5885282", "0.58845496", "0.58673495", "0.5856109", "0.58544976", "0.5819434", "0.57901895", "0.57815206", "0.57418096", "0....
0.0
-1
Display the form to request a password reset link.
public function showLinkRequestForm() { if (property_exists($this, 'linkRequestView')) { return view($this->linkRequestView); } if (view()->exists('non-auth.password_reset.askemailform')) { return view('non-auth.password_reset.askemailform'); } return view('non-auth.password_reset.askemailform'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showResetForm()\n {\n // if user is logged in, do not let him access this page\n if( Session::isLoggedIn() )\n {\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n $userID = SCMUtility::c...
[ "0.82746035", "0.8026065", "0.7937366", "0.790148", "0.77341527", "0.7705268", "0.7705268", "0.7630974", "0.76198614", "0.7568418", "0.7560725", "0.7485317", "0.7485177", "0.7482375", "0.7467139", "0.7437944", "0.74254894", "0.74085516", "0.73910666", "0.7389647", "0.73745", ...
0.7127266
33
Method returning the class name
public function __toString() { return __CLASS__; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getClassName();", "public function getClassName();", "public function getClassName() ;", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName()\n {\n ...
[ "0.87522393", "0.87522393", "0.8751158", "0.87397957", "0.87397957", "0.87397957", "0.87397957", "0.8731564", "0.8696754", "0.8673495", "0.8638432", "0.8615335", "0.8603119", "0.8566906", "0.8562364", "0.8555002", "0.85503733", "0.85503733", "0.85425884", "0.8533183", "0.8529...
0.0
-1
/ For billingitem overwrites: numberpart, totalparts, reftype & freqtype
public function __set($attri, $value) { if (in_array($attri, self::DYN_ATTRIBUTES)) { $this->{$attri} = $value; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function refactorBasedonItems()\n {\n foreach ($this->quote->cabinets AS $cabinet)\n {\n if ($cabinet->wood_xml)\n {\n $woods = self::returnWoodArray($cabinet);\n foreach ($woods AS $wood)\n {\n $this->cab...
[ "0.5744344", "0.54155195", "0.5370198", "0.53587365", "0.53376955", "0.5335801", "0.5301051", "0.5299128", "0.5265297", "0.5211642", "0.5205609", "0.5198455", "0.51833236", "0.5176103", "0.51488626", "0.51270884", "0.512655", "0.51112545", "0.51011163", "0.50884956", "0.50746...
0.0
-1
/=========[TS Special Edition v.5.6]========== /=============[Special Thanks To]============= / DrNet wWw.SpecialCoders.CoM / Vinson wWw.Decode4u.CoM / MrDecoder wWw.FearlessReleases.CoM / Fynnon wWw.BvList.CoM
function pm_limit ($showlimit = true, $disablepm = false, $userid = '', $usergroup = '') { global $lang; global $CURUSER; global $usergroups; if ((!$CURUSER OR !$usergroups)) { return false; } if ((!$userid AND !$disablepm)) { $userid = intval ($CURUSER['id']); } if ($disablepm) { $gid = intval ($usergroup); $getamount = sql_query ('SELECT pmquote FROM usergroups WHERE gid = ' . sqlesc ($gid) . ' LIMIT 1'); $maxpmstorage = intval (mysql_result ($getamount, 0, 'pmquote')); } else { $maxpmstorage = intval ($usergroups['pmquote']); } if ($maxpmstorage == 0) { return null; } $count1 = mysql_num_rows (sql_query ('' . 'SELECT m.* FROM messages m WHERE m.receiver=' . $userid . ' and m.location != 0')); $count2 = mysql_num_rows (sql_query ('' . 'SELECT m.* FROM messages m WHERE m.sender=' . $userid . ' AND m.saved=\'yes\'')); $pmscounttotal = intval ($count1 + $count2); $overhalf = ''; if (($maxpmstorage <= $pmscounttotal AND $disablepm)) { return false; } if ($showlimit) { if ($maxpmstorage <= $pmscounttotal) { $spaceused = 100; $spaceused2 = 0; $belowhalf = ''; $overhalf = '100%'; $warnmsg = '<table border="0" cellspacing="0" cellpadding="0" class="tborder"> <tr> <td class="trow1" align="center"><span class="smalltext"><strong><font color="#760306">' . $lang->global['reached_warning'] . '</font></strong><br />' . $lang->global['reached_warning2'] . '</span></td> </tr></table><br />'; } else { $spaceused = $pmscounttotal / $maxpmstorage * 100; $spaceused2 = 100 - $spaceused; $warnmsg = ''; if ($spaceused <= '50') { $belowhalf = round ($spaceused, 0) . '%'; } else { $overhalf = round ($spaceused, 0) . '%'; } } $msg = ' <table border="0" cellspacing="0" cellpadding="5" class="tborder" width="100%"> <tr> <td class="trow1" align="center"><p>' . sprintf ($lang->global['pmlimitmsg'], $pmscounttotal, $maxpmstorage) . '</p> <table align="center" cellspacing="0" cellpadding="0" width="230" style="border: solid 1px #000000;"> <tr> <td width="' . $spaceused . '" bgcolor="#760306" align="center"> <font color="#000000" size="1"><strong>' . $overhalf . '</font></span></td> <td width="' . $spaceused2 . '" bgcolor="#035219" align="center"> <font color="#000000" size="1"><strong>' . $belowhalf . '</font></span></td> <td width="130" align="center"><font color="#000000" size="1"><strong>' . $lang->global['pmspace'] . '</strong></font></td> </tr> </table></tr></td></table><br />'; $msg = ($warnmsg ? $warnmsg . $msg : $msg); return $msg; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cbt()\n\t{\n\t\tif (preg_match('/^\\(([a-zA-Z0-9-\\.\\&_ ]+)\\) \\[\\d+\\/(\\d+\\]) - \".+?' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//[ ABCAsiaPacific.com - Study English IELTS Preparation (2006) ] AVI.PDF (17/34) - \"abcap-sen...
[ "0.61292416", "0.60272104", "0.6007393", "0.5923153", "0.5922407", "0.59117436", "0.58408976", "0.58028245", "0.5744969", "0.5694943", "0.56228685", "0.56225014", "0.5612725", "0.55924857", "0.55437523", "0.5534156", "0.5519259", "0.5514928", "0.5512873", "0.54564583", "0.541...
0.0
-1
Get query source of dataTable.
public function query(Movie $movies) { return $movies->query()->orderBy('release_date', 'desc')->select('id', 'title', 'main_actors', 'director', 'producer', 'release_date', 'genre'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fetchDataTableSource()\n { \n $dataTableConfig = [\n 'searchable' => [\n 'title' \n ]\n ];\n\n return SpecificationPreset::with([\n 'presetItem' => function($query) {\n ...
[ "0.6895125", "0.6753405", "0.6509491", "0.64851296", "0.6465343", "0.64154166", "0.63834846", "0.6268942", "0.6261598", "0.6261598", "0.6227419", "0.6218134", "0.62151456", "0.61885744", "0.6168129", "0.6070435", "0.60309273", "0.60120887", "0.59311485", "0.5923787", "0.59018...
0.0
-1
Optional method if you want to use html builder.
public function html() { return $this->builder() ->columns($this->getColumns()) ->minifiedAjax() ->addAction(['width' => '80px']) ->parameters([$this->getBuilderParameters(), 'buttons' => [ 'reload', ] ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function html() {}", "public function html();", "protected function generateHtml()\n\t{\n\t}", "abstract public function generateHtml();", "public function renderHTML()\n {\n }", "public abstract function asHTML();", "public static function html() {\n\n\t\treturn new BF_HTML_Generator;\n\t...
[ "0.8223474", "0.7832399", "0.77049524", "0.7642871", "0.75216883", "0.74815524", "0.7403877", "0.73037547", "0.72794753", "0.7205899", "0.7202348", "0.7202348", "0.7194561", "0.71864444", "0.7173879", "0.71675974", "0.716523", "0.716523", "0.716523", "0.71432114", "0.71009815...
0.6938769
26
Get filename for export.
protected function filename() { return 'Movies_' . date('YmdHis'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function filename()\n {\n return 'Export_' . date('YmdHis');\n }", "protected function filename () : string {\n return sprintf('%s/%s.csv', $this->instanceDirectory(), $this->guessName());\n }", "public function getFileName()\n {\n $fileName = $this->getInfo('fileName...
[ "0.8196528", "0.80591613", "0.7949222", "0.7926228", "0.76592237", "0.7587201", "0.7587201", "0.7554733", "0.75451165", "0.750201", "0.750201", "0.7494168", "0.74720484", "0.7440598", "0.7438713", "0.74358875", "0.7431382", "0.7413326", "0.7389984", "0.735199", "0.7335797", ...
0.0
-1
Remove field from TCA definition
public static function removeFromAllTCAtypes($table = '', $field = '', $typeList = '') { if(!empty($table) && !empty($field) && isset($GLOBALS['TCA'][$table])) { foreach($GLOBALS['TCA'][$table]['types'] as $type => $definition) { if(empty($typeList) || in_array($type, explode(',', $typeList))) { if(strpos($GLOBALS['TCA'][$table]['types'][$type]['showitem'], $field.',') === 0) { $GLOBALS['TCA'][$table]['types'][$type]['showitem'] = trim(substr($GLOBALS['TCA'][$table]['types'][$type]['showitem'], strlen($field.','))); } else { $GLOBALS['TCA'][$table]['types'][$type]['showitem'] = preg_replace( '/[, ]+'.preg_quote($field, '/').'/', '', $GLOBALS['TCA'][$table]['types'][$type]['showitem'] ); } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function acf_remove_local_field($key = '')\n{\n}", "private function removeFieldFromTca($table, $field) {\n unset($GLOBALS['TCA'][$table]['columns'][$field]);\n $showItem = t3lib_div::trimExplode(',', $GLOBALS['TCA'][$table]['types'][1]['showitem'], 1);\n\n foreach ($showItem as $k => $v) {\...
[ "0.6782258", "0.6607631", "0.6294924", "0.61073166", "0.60484236", "0.5974633", "0.5971963", "0.5953963", "0.5951819", "0.59399366", "0.5911255", "0.590178", "0.58655596", "0.58655596", "0.5849346", "0.579862", "0.5768064", "0.5765139", "0.573729", "0.57255703", "0.5724304", ...
0.0
-1
Remove field from palette definition
public static function removeFromPalette($table = '', $palette = '', $field = '') { if(!empty($table) && !empty($palette) && !empty($field) && isset($GLOBALS['TCA'][$table]['palettes'][$palette]['showitem'])) { $GLOBALS['TCA'][$table]['palettes'][$palette]['showitem'] = preg_replace( '/[, ]+'.preg_quote($field, '/').'/', '', $GLOBALS['TCA'][$table]['palettes'][$palette]['showitem'] ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function acf_remove_local_field($key = '')\n{\n}", "public function unset_legend() {\n $this->legend = null;\n }", "public function removeField( $field ) {\r\n if ( isset($this->fields[$field]) ) {\r\n unset($this->fields[$field]);\r\n }\r\n\r\n }", "protected function u...
[ "0.60165906", "0.60121745", "0.59430176", "0.5838733", "0.58139676", "0.5799772", "0.5764606", "0.57289225", "0.5708306", "0.5705625", "0.56833756", "0.564094", "0.5622882", "0.5605879", "0.56040865", "0.55895424", "0.55871224", "0.55558527", "0.5545748", "0.5503513", "0.5502...
0.6717171
0
Fix broken wizard icons for plugins generated by extension builder
public static function fixWizardPluginIcons($icons, $extKey) { $iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class); /** * Register Icons */ $pageTsConfigString = ''; foreach($icons as $iconKey => $icon) { $iconRegistry->registerIcon( $extKey.'-plugin-' . $iconKey, $icon['class'], ['source' => $icon['source']] ); $pageTsConfigString .= $iconKey.".iconIdentifier = ".$extKey."-plugin-".$iconKey."\n"; } /** * Fix broken wizard icons */ \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(' mod { wizards.newContentElement.wizardItems.plugins { elements { '.$pageTsConfigString.' } } } '); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function registerPluginTriggersAddPluginWhichSetsPluginIconPathIfIconPathIsGiven() {}", "public function registerPluginTriggersAddPluginWhichSetsPluginIconPathIfUsingUpperCameCasedExtensionNameAndIconPathNotGiven() {}", "public function registerPluginTriggersAddPluginWhichSetsPluginIconPathIfUsingUnders...
[ "0.60629165", "0.6047844", "0.6012591", "0.59231424", "0.5919418", "0.5880163", "0.58073235", "0.5781766", "0.56969285", "0.56843084", "0.5548291", "0.5511798", "0.54904664", "0.5446991", "0.5434388", "0.54055536", "0.5397255", "0.5273456", "0.52485824", "0.5236595", "0.52168...
0.6696858
0
Execute the console command.
public function handle() { try { $this->roomService->loadRoomOccupations(); Log::notice('untis:occupations executed successfully.'); $this->line('Loaded room occupations from WebUntis.'); } catch (Exception $e) { Log::error('Error loading room occupations.', ['exception' => $e]); $this->error('Error loading room occupations: ' . $e->getMessage()); } }
{ "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.6469962", "0.6463639", "0.64271367", "0.635053", "0.63190264", "0.62747604", "0.6261977", "0.6261908", "0.6235821", "0.62248456", "0.62217945", "0.6214421", "0.6193356", "0.61916095", "0.6183878", "0.6177804", "0.61763877", "0.6172579", "0.61497146", "0.6148907", "0.614841...
0.6000803
72
Runs upload image process
public function uploadImage() { if (is_null($this->image)) { return; } // move image from temp directory to destination one $this->image->move( $this->getUploadRootDir(), $this->image->getClientOriginalName() ); $this->path = $this->image->getClientOriginalName(); $this->image = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function doUpload();", "public function execute(){\n\n if(!(in_array($_FILES['file']['type'], \\Vegans\\Controllers\\Images\\Consts::FILETYPES))){\n throw new Error('ERROR during passing parameters');\n }\n\n $time = strtotime(\"now\");\n $fileName = $thi...
[ "0.7179776", "0.7051312", "0.70171374", "0.70058835", "0.6985683", "0.6974317", "0.6967899", "0.69673294", "0.6915824", "0.69134325", "0.68612206", "0.6847253", "0.6804593", "0.6794967", "0.67870325", "0.67463374", "0.6743065", "0.67373854", "0.67335486", "0.6732378", "0.6732...
0.6365274
64
Absolute path of upload directory
protected function getUploadRootDir() { return __DIR__ . '/../../../../web/' . self::UPLOAD_ROOT; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function basePathUpload() {\n\t\t\t\t\t\t$this->redirectToIndex();\n\t\t\t\t\t\t$pathupload = realpath ( APPLICATION_PATH . '/../public/data/uploads' );\n\t\t\t\t\t\treturn $pathupload;\n\t\t\t\t\t}", "public function getRelativeUploadPath(): string;", "protected function getUploadRootDir()\n {\n ...
[ "0.8080447", "0.7996804", "0.7942805", "0.7939253", "0.79161555", "0.7876262", "0.7869895", "0.78663415", "0.78626746", "0.78576344", "0.7856045", "0.7856045", "0.7856045", "0.7856045", "0.7856045", "0.7854744", "0.7854744", "0.7847188", "0.78429127", "0.78391355", "0.7824901...
0.78233427
21
/ Register Global Variables.
function LiangLeeThemeDesigner_lib(){ /* * Register Global Variables for Topbar Background image. * * @access public */ global $liangtopbar_bg; /* * Register Global Variables for Topbar Background color. * * @access public */ global $liangtopbar_color; /* * Register Global Variables for Topbar height. * * @access public */ global $liangtopbar_height; /* * Register Global Variables for Header Background Color. * * @access public */ global $liangheader_color; /* * Register Global Variables for Head Logo. * * @access public */ global $lianglogo; /* * Register Global Variables for Header Background image. * * @access public */ global $liangheader_bgimg; /* * Register Global Variables for Search Bar Border Color. * * @access public */ global $liangsearch_br; /* * Register Global Variables for Header Height. * * @access public */ global $liangheader_height; /* * Register Global Variables for WalledGarden Image. * * @access public */ global $liangwalledg_bgimg; /* * Fetch Settings for Header Height. * * @access public */ $liang_walledg = elgg_get_plugin_setting("Leethemed_walledg_background", "LiangLeeThemeDesigner"); if (!elgg_get_plugin_setting("Leethemed_walledg_background", "LiangLeeThemeDesigner")) { $liangwalledg_bgimg = '90px'; } else { $liangwalledg_bgimg = $liang_walledg; } /* * Fetch Settings for Header Height. * * @access public */ $liang_header_height = elgg_get_plugin_setting("Leethemed_header_height", "LiangLeeThemeDesigner"); if (!elgg_get_plugin_setting("Leethemed_header_height", "LiangLeeThemeDesigner")) { $liangheader_height = '90px'; } else { $liangheader_height = $liang_header_height; } /* * Fetch Settings for Topbar Background. * * @access public */ $liang_topbar_bg = elgg_get_plugin_setting("Leethemed_background", "LiangLeeThemeDesigner"); if (!elgg_get_plugin_setting("Leethemed_background", "LiangLeeThemeDesigner")) { $liangtopbar_bg = elgg_get_site_url().'_graphics/toptoolbar_background.gif'; } else { $liangtopbar_bg = $liang_topbar_bg; } /* * Fetch Settings for Topbar Background Color. * * @access public */ $liang_topbar_color = elgg_get_plugin_setting("Leethemed_tbar_bgcolor", "LiangLeeThemeDesigner"); if (!elgg_get_plugin_setting("Leethemed_tbar_bgcolor", "LiangLeeThemeDesigner")) { $liangtopbar_color = '#333333'; } else { $liangtopbar_color = $liang_topbar_color; } /* * Fetch Settings for Topbar Height. * * @access public */ $liang_topbar_height = elgg_get_plugin_setting("Leethemed_tbar_height", "LiangLeeThemeDesigner"); if (!elgg_get_plugin_setting("Leethemed_tbar_height", "LiangLeeThemeDesigner")) { $liangtopbar_height = '24'; } else { $liangtopbar_height = $liang_topbar_height; } /* * Fetch Settings for Header Background image. * * @access public */ $liang_header_bgimg = elgg_get_plugin_setting("Leethemed_header_bgimg", "LiangLeeThemeDesigner"); if (!elgg_get_plugin_setting("Leethemed_header_bgimg", "LiangLeeThemeDesigner")) { $liangheader_bgimg = '#4690D6 url('.elgg_get_site_url().'_graphics/header_shadow.png) repeat-x bottom left'; } else { $liangheader_bgimg = $liang_header_bgimg; } /* * Fetch Settings for Header Background Image. * * @access public */ $liang_header_color = elgg_get_plugin_setting("Leethemed_header_bgcolor", "LiangLeeThemeDesigner"); if (!elgg_get_plugin_setting("Leethemed_header_bgcolor", "LiangLeeThemeDesigner")) { $liangheader_color = '#4690D6'; } else { $liangheader_color = $liang_header_color; } /* * Fetch Settings for Topbar Logo. * Display ($site->name) site name if logo not setup. * @access public */ $liang_logo = elgg_get_plugin_setting("Leethemed_logo", "LiangLeeThemeDesigner"); if (!elgg_get_plugin_setting("Leethemed_logo", "LiangLeeThemeDesigner")) { $site = elgg_get_site_entity(); $site_name = $site->name; $lianglogo = $site_name; } else { $lianglogo = $liang_logo; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function initializeGlobalVariables() {}", "function register_globals() {\n\t\t$GLOBALS['weekday'] = $this->weekday;\n\t\t$GLOBALS['weekday_initial'] = $this->weekday_initial;\n\t\t$GLOBALS['weekday_abbrev'] = $this->weekday_abbrev;\n\t\t$GLOBALS['month'] = $this->month;\n\t\t$...
[ "0.8068224", "0.77826226", "0.7712508", "0.75491136", "0.75491136", "0.7431468", "0.7193156", "0.69370896", "0.6928898", "0.6928898", "0.6865854", "0.68346226", "0.68119425", "0.67748773", "0.6761227", "0.66429013", "0.66202116", "0.6606804", "0.6578169", "0.654052", "0.65307...
0.0
-1
/ Atributos increments('id') unsignedInteger('Estado_id') integer('Activo_id') string('Activo_type')
function estado() { return $this->belongsTo( EstadoActivo::class, 'Estado_id', 'id' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actualizaEstado(){\n $this->estado = 'Completo';\n // $this->cotiza = $this->generarCustomID();\n $this->save();\n }", "public function getEstadoId() {\r\n return $this->estadoId;\r\n }", "function contratos_por_estado($id_estado){\n $sql =\n \"SE...
[ "0.62779737", "0.5969324", "0.59401876", "0.5783107", "0.5695844", "0.56819177", "0.5670147", "0.5665536", "0.5657428", "0.5642819", "0.5622605", "0.5620276", "0.56175643", "0.5612324", "0.5611702", "0.56001997", "0.55922496", "0.5590539", "0.5569303", "0.5552694", "0.5531204...
0.6620097
0
Finds index of station in the array
function findStationIndex($checkStationName, $dataArray) { foreach($dataArray as $key => $station) if ($checkStationName == $station["stationName"]) return $key; return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findArray($array,$item){\n for ($i=0;$i<count($array);$i++){\n if($array[$i]==$item)\n return $i;\n }\n return -1;\n }", "function getIndexOfRegistry($registryNumber, $array) {\n $i = 0;\n\t$index = -1;\n\tfor ($i = 0; $i < sizeof($array); $i++...
[ "0.63796544", "0.62801325", "0.5961767", "0.5904147", "0.5861937", "0.5849601", "0.582228", "0.5756937", "0.5708686", "0.5703343", "0.5696692", "0.5637787", "0.55793285", "0.5578864", "0.55673933", "0.5535584", "0.5534612", "0.55225575", "0.54975885", "0.54793376", "0.5464482...
0.80100924
0
Formats and displays station
function displayStation ($station, $value) { global $THRESHOLD, $IN_SERVICE; $str = $station->$value." @ ".$station->name; if ($station->status != $IN_SERVICE) return "<b><font color='red'>".$station->status."</font></b>"; if (intval($station->$value) < $THRESHOLD) return "<b><font color='red'>".$str."</font></b>"; return $str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function get_station( ) {\n// This function is never called. It is here for completeness of documentation.\n\n if (strlen($this->current_group_text) == 4) {\n $this->wxInfo['STATION'] = $this->current_group_text;\n $this->current_ptr++;\n }\n $this->current_grou...
[ "0.6746428", "0.6442647", "0.6134735", "0.6123516", "0.5837576", "0.5769407", "0.57094157", "0.56023014", "0.54710567", "0.54638994", "0.5393682", "0.53930306", "0.53766215", "0.53680634", "0.5357999", "0.531698", "0.52654546", "0.5244699", "0.5224452", "0.52166784", "0.52143...
0.6431243
2
Formats and displays dashboard of stations
function displayDashboard($myLocations, $myStations, $lastUpdated) { ?> <?=$lastUpdated?> | <a href="<?=$GLOBALS['MAP_URL']?>" target="_blank">citibike live station map</a> <table cellpadding="2"> <tr><th colspan="2">Going to work</th></tr> <tr><td>Available Bikes</td><td>Available Docks</td></tr> <tr valign="top"> <?php $count = 0; foreach ($myLocations as $type => $location) { ?> <td> <?php foreach ($myStations as $station) if ($station->type == $type) echo displayStation($station, $count == 0 ? "bikes" : "docks")."<br />"; ?> </td> <?php $count++; } ?> </tr> <tr><th colspan="2">Heading home</th></tr> <tr><td>Available Bikes</td><td>Available Docks</td></tr> <tr valign="top"> <tr valign="top"> <?php $count = 0; foreach (array_reverse($myLocations) as $type => $location) { ?> <td> <?php foreach ($myStations as $station) if ($station->type == $type) echo displayStation($station, $count == 0 ? "bikes" : "docks")."<br />"; ?> </td> <?php $count++; } ?> </tr> </table> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStation() {\n\t\t$stations = @file(Flight::get(\"pathStation\"),FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);\n\t\tif (count($stations) >=1 && $stations ) {\n\t\t\tforeach ($stations as $station) {\n\t\t\t\t$station = explode(\"#\",$station);\n\t\t\t\t$x = explode(' ',$station[0]);\n\t\t\t\t$e...
[ "0.6272476", "0.62643003", "0.61255234", "0.6099523", "0.6097676", "0.59891903", "0.5905546", "0.58994234", "0.5876704", "0.5871399", "0.58583367", "0.5828901", "0.5817738", "0.581594", "0.57782346", "0.5762041", "0.5718652", "0.56769264", "0.56759626", "0.5670443", "0.565792...
0.695451
0
Lists all Product models.
public function actionIndex() { $this->layout='inner'; $searchModel = new ProductSearch(); $dataProvider = $searchModel->frontendsearch(Yii::$app->request->queryParams); $model=$dataProvider->getModels(); return $this->render('index', [ 'searchModel'=>$model, 'model' => $searchModel, ]); /*$searchModel = new ProductCatSearch(); $cat =Yii::$app->request->queryParams; if(!empty($cat['ProductCatSearch']['category_id'])){ $sub_cat_list=$cat['ProductCatSearch']['category_id']; $searchModel->category_id=end($cat['ProductCatSearch']['category_id']); } else{ $sub_cat_list=array(); } $dataProvider = $searchModel->frontendsearch(Yii::$app->request->queryParams); $model=$dataProvider->getModels(); $cat_list = ArrayHelper::map(ProductCategory::find()->where(['parent_id'=>'0'])->all(), 'id', 'cat_name'); return $this->render('index', [ 'model' => $searchModel, 'searchModel'=>$model, ]);*/ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAll()\n {\n return DB::table('product_models')->get()->all();\n }", "public function index()\n {\n return Product::all();\n }", "public function index()\n {\n return Product::all();\n }", "public function index()\n {\n return Product::all();...
[ "0.7885379", "0.76026636", "0.76026636", "0.76026636", "0.76026636", "0.7598222", "0.7516363", "0.75066775", "0.74741864", "0.7467093", "0.7449273", "0.743686", "0.7395705", "0.7316345", "0.7304704", "0.7285531", "0.7263369", "0.7238982", "0.72332644", "0.72319394", "0.723183...
0.0
-1
Displays a single Product model.
public function actionView($id) { $this->layout='inner'; /*$data= ProductCatSearch::find()->joinwith('product')->joinwith('category')->joinwith('user')->where(['product.id'=>$id])->one();*/ $data= Product::find()->where(['product.id'=>$id])->one(); //echo "<pre>"; print_r($data); die; return $this->render('view', [ 'model' => $data, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function show()\n\t{\n\t\t$this->layout->set(null);\n\t\t$id = getParameter('id');\n\t\t$data = [\n\t\t\t'product' => $this->model->product->find_by_id($id)\n\t\t];\n\t\t$this->view->load('product/show', $data);\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_ge...
[ "0.84007233", "0.82365257", "0.80575275", "0.8004095", "0.8004095", "0.8004095", "0.797456", "0.79701304", "0.79701304", "0.79701304", "0.79701304", "0.79701304", "0.79701304", "0.79701304", "0.79701304", "0.79701304", "0.79701304", "0.79701304", "0.79701304", "0.79701304", "...
0.0
-1
Creates a new Product model. If creation is successful, the browser will be redirected to the 'view' page.
public function actionCreate() { $this->layout='inner'; $model = new Product(); $cat_list = ArrayHelper::map(ProductCategory::find()->where(['parent_id'=>'0'])->all(), 'id', 'cat_name'); $vendor = ArrayHelper::map(User::find()->where(['usertype'=>'Vendor'])->all(), 'id', 'username'); if ($model->load(Yii::$app->request->post())) { //$last_cat=end($_POST['Product']['category_id']); if($model->save()){ /*$product_cat= new ProductCat(); $product_cat->product_id=$model->id; $product_cat->category_id=$last_cat; $product_cat->save();*/ //Yii::$app->getSession()->setFlash('success','successful added your product'); return $this->redirect(['add-search-terms','id'=>$model->id]); } } else { return $this->render('create', [ 'model' => $model, 'cat_list'=>$cat_list, 'vendor'=>$vendor, ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n {\n $model = new Product();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\...
[ "0.8639409", "0.85879195", "0.85451835", "0.8530748", "0.8457998", "0.8359206", "0.8235587", "0.81828195", "0.8121348", "0.79258865", "0.7871166", "0.7807815", "0.7685996", "0.76532024", "0.76225764", "0.75987333", "0.75884813", "0.7525489", "0.7513798", "0.75107676", "0.7498...
0.73343915
34
Updates an existing Product model. If update is successful, the browser will be redirected to the 'view' page.
public function actionUpdate($id) { $this->layout='inner'; $model = $this->findModel($id); $vendor = ArrayHelper::map(User::find()->where(['usertype'=>'Vendor'])->all(), 'id', 'username'); $cat_list = ArrayHelper::map(ProductCategory::find()->where(['parent_id'=>'0'])->all(), 'id', 'cat_name'); $cat= ProductCat::find()->Where(['product_id'=>$id])->one(); $query=$this->fetchChildCategories($cat['category_id']); $str=rtrim($this->sam, "|"); $str_data=explode("|",$str); if($str_data>0){ // $str_data[]=$cat['category_id']; } // print_r($str_data); die; if ($model->load(Yii::$app->request->post())) { //$last_cat=end($_POST['Product']['category_id']); if($model->save()){ //$sql="update product_cat set category_id = '".$last_cat ."' WHERE product_id='".$model->id."'"; //Yii::$app->db->createCommand($sql)->execute(); /*$product_cat= new ProductCat(); $product_cat->product_id=$model->id; $product_cat->category_id=$last_cat; $product_cat->save();*/ //Yii::$app->getSession()->setFlash('success','successful updated'); return $this->redirect(['add-search-terms','id'=>$id]); } } else { return $this->render('update', [ 'model' => $model, 'cat'=>$str_data, 'vendor'=>$vendor, 'cat_list'=>$cat_list, ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Product']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Product'];\n\t\t\tif($model->save())\n\t\t\t\t$thi...
[ "0.78021604", "0.7658776", "0.7584333", "0.7443477", "0.74123", "0.73707354", "0.732938", "0.7285314", "0.7200871", "0.71553856", "0.71511275", "0.7147872", "0.7120523", "0.7073495", "0.70530677", "0.7043816", "0.7038366", "0.70279366", "0.7007795", "0.70060337", "0.69990504"...
0.0
-1
Deletes an existing Product model. If deletion is successful, the browser will be redirected to the 'index' page.
public function actionDelete($id) { $this->findModel($id)->delete(); Yii::$app->getSession()->setFlash('success','successful deleted'); return $this->redirect(Yii::$app->request->referrer); //return $this->redirect(['index']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteProductAction()\n {\n $id = $_GET['id'];\n $productManager = new ProductManager();\n $productManager->deleteProduct($id);\n header('Location: index.php?section=admin&page=adminproducts');\n }", "public function actionDeleteProduct()\n\t{\n\t\t$model = Order...
[ "0.77747124", "0.77698797", "0.7581173", "0.7542327", "0.7474458", "0.7461884", "0.7455692", "0.74055004", "0.739336", "0.7387724", "0.7377779", "0.7318249", "0.72258574", "0.72160876", "0.71947765", "0.71826833", "0.7124043", "0.7119898", "0.7103307", "0.7057033", "0.705142"...
0.0
-1
Finds the Product model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown.
public function actionStatus($id){ $model = $this->findModel($id); $model->category_id="hello"; if(empty($model)){ Yii::$app->getSession()->setFlash('danger', 'No such category exists!'); return $this->redirect('index'); } if(empty($model->status)){ $model->status = 1; }else{ $model->status = 0; } if($model->save()){ $message = "$model->item_code been sucessfully ".(($model->status==0)?'blocked':'unblocked'); Yii::$app->getSession()->setFlash('success',$message); if($model->status=='1'){ return $this->redirect(Yii::$app->urlManager->createAbsoluteUrl(['product/index']));} else{ return $this->redirect(Yii::$app->urlManager->createAbsoluteUrl(['product/manager'])); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract function find($primary_key, $model);", "protected function findProduct($id)\n {\n if (($model = Products::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "pu...
[ "0.7091889", "0.7014377", "0.6962301", "0.69029546", "0.6848016", "0.6840045", "0.68362", "0.67796147", "0.6769268", "0.6762692", "0.67417616", "0.66876525", "0.66847706", "0.66654587", "0.6664714", "0.6663498", "0.6643639", "0.6643556", "0.66395307", "0.66395307", "0.6639530...
0.0
-1
/////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// Gets the path to the current directory Returns something along the lines of: /docs/path/to/ If path cannot be determined, returns an empty string
function current_dir() { if ( !empty($_SERVER['PHP_SELF']) || !empty($_SERVER['SCRIPT_NAME']) ) { $server_root = ""; if ( !empty($_SERVER['PHP_SELF']) ) { $script = $_SERVER['PHP_SELF']; } else { $script = $_SERVER['SCRIPT_NAME']; } $subDirList = explode("/", $script); array_pop($subDirList); $server_root = implode("/", $subDirList) . "/"; } else { $server_root = ""; } return $server_root; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCurrentDirectory() {\n\t$path = dirname($_SERVER['PHP_SELF']);\n\t$position = strrpos($path,'/') + 1;\n\treturn substr($path,$position);\n}", "public function getCurrentPath()\n {\n return str_replace($this->getRootPath(), '', $this->basePath) ?: DIRECTORY_SEPARATOR;\n }", "function di...
[ "0.75632566", "0.7370972", "0.72592103", "0.7164294", "0.71466655", "0.7146432", "0.7078587", "0.7078587", "0.7068135", "0.705521", "0.70281553", "0.7003945", "0.69863063", "0.6917466", "0.6886731", "0.68326193", "0.6824841", "0.6788674", "0.6775619", "0.6763439", "0.67575085...
0.66746557
26
Parse the shop's items into inventory
public function inventory() { $list = array(); if (count($this->items) > 0) { foreach ($this->items as $item) { $list[] = array( 'id' => $item->id, 'name' => $item->name(), 'price' => $item->parameter, 'img' => $item->img(), ); } } return $list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function populateItems()\n\t{\n\t\tif ( empty( $this->ingredients ) )\n\t\t\treturn;\n\t\t\n\t\tforeach( $this->ingredients as $ingredient )\n\t\t{\n\t\t\tif ( !( $item = Fridge::getInstance()->getItem( $ingredient[Item::FIELD_NAME] ) ) || $ingredient[Item::FIELD_AMOUNT] > $item->getAmount() )\n\t\t\t{\n\t...
[ "0.5970491", "0.5859345", "0.5770674", "0.57299966", "0.5664743", "0.56629896", "0.56629896", "0.56629896", "0.56625295", "0.56437635", "0.5574545", "0.5550445", "0.554269", "0.5430928", "0.5421432", "0.5395878", "0.5371188", "0.5346838", "0.53333586", "0.5319892", "0.5296801...
0.6121278
0
simplifies the shop owner's data
public function owner() { return array('url' => Route::url('user.profile', array('id' => $this->owner['id'])), 'username' => $this->owner['username']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function updateShopInfo($shop = null) {\n // in case something weird happen, wrap in try catch\n try {\n\n $shopify = App::make('ShopifyAPI', [\n 'API_KEY' => env('API_KEY'),\n 'API_SECRET' => env('API_SECRET'),\n 'SHOP_DOMAIN' =...
[ "0.616478", "0.61287767", "0.56443775", "0.5619218", "0.5545131", "0.55315524", "0.5518456", "0.55118996", "0.54526216", "0.5360183", "0.53374684", "0.5271754", "0.52563375", "0.52062273", "0.51917964", "0.5160362", "0.51453024", "0.5120189", "0.5112466", "0.506864", "0.50657...
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
weakness: what if there are no invoices, no charges?
public function go(User $employee = NULL, User $buyer = NULL) { $refund = $this->psi->createRefund($employee->managed_account_id, $buyer->id); return $refund; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function no_items() {\r\n\t\t_e( 'No customers avaliable.', 'ac' );\r\n\t}", "public function getOtherCharges() { \n \n $result = 0;\n $purchaseIds = !empty($_GET['purchaseIds']) ? $_GET['purchaseIds'] : '';\n $purchaseData = DB::select('SELECT * FROM purchase_master WHERE...
[ "0.62248325", "0.6108709", "0.60098946", "0.59548753", "0.5947382", "0.5915369", "0.58614284", "0.58546287", "0.5814992", "0.58140737", "0.5801039", "0.5779258", "0.5765397", "0.5725253", "0.5713195", "0.57122046", "0.56826687", "0.56633675", "0.56504333", "0.5638768", "0.563...
0.0
-1
Get Nice Recipe URL
public function niceUrl() { return '/' . $this->recipe_id . '/' . $this->url; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function url()\n {\n return '/recipe/' . $this->recipe->getKey();\n }", "public function get_url();", "public function getURL();", "public function getURL();", "public function getURL ();", "function get_url()\n {\n }", "public function get_url()\n {\n }", "pub...
[ "0.8005495", "0.6684302", "0.66728646", "0.66728646", "0.66376525", "0.6599835", "0.65327835", "0.6515474", "0.6506297", "0.649406", "0.646237", "0.64425784", "0.6424262", "0.6366747", "0.6355705", "0.6354239", "0.63503903", "0.6322692", "0.6319833", "0.6304408", "0.6288087",...
0.7425859
1
Merge Data Merge an array of values into the class properties by array key = property
public function mergeRecipe(array $modifiedRecipe) { // Make sure we have an array if (!is_array($modifiedRecipe)) { throw new \Exception(__CLASS__ . '->' . __METHOD__ . ' expects array'); } foreach ($this as $key => $value) { if (isset($modifiedRecipe[$key])) { $this->$key = $modifiedRecipe[$key]; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function merge($array=array())\n {\n $class = $this->instance();\n return new $class(array_merge($this->_data, self::convert($array)->toArray()));\n }", "public function mergeFrom(array $data);", "public function values($data){\n\t\tforeach($data as $key => $value){\n\t\t\tif(propert...
[ "0.5965747", "0.5953099", "0.58527875", "0.5801883", "0.57939446", "0.57903546", "0.5767365", "0.57408684", "0.56695694", "0.5644805", "0.5600565", "0.55907315", "0.558294", "0.55434966", "0.55378735", "0.5518452", "0.5502884", "0.5494945", "0.54803425", "0.54773223", "0.5464...
0.0
-1
ttl = 0, means month store (cache keys versions in most cases), in any other case I use user provided expire key
public function set($key, $value, $compress, $ttl = 0) { if ($ttl == 0) { $this->redis->setex($key,2678400,$value); // One month } else { $this->redis->setex($key,$ttl,$value); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function expire($key,$ttl){\n\n //get expire\n $this->client->expire($key,$ttl);\n }", "public function expire($key, $ttl=0) {\n return 0;\n }", "public function getCacheTTL();", "public function store($key,$var,$ttl);", "function acquire($key, $ttl);", "public f...
[ "0.7284101", "0.7215825", "0.7189902", "0.6999857", "0.6846252", "0.6812919", "0.6761201", "0.67457503", "0.6711632", "0.66961515", "0.66901773", "0.6679194", "0.6643621", "0.6643621", "0.6559084", "0.65063065", "0.6488953", "0.645337", "0.64463586", "0.6385956", "0.6352251",...
0.0
-1
Incr does not work then we need to fetch, perhaps just verions issues so i just replace with simple set.
public function increment($var,$version) { $this->redis->set($var,$version); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function init(): Set;", "public function testBasics() {\n\t\t$redis = $this->getConnection();\n\t\t$set = new ARedisSortedSet(\"TestSet:\".uniqid(),$redis);\n\t\t$this->assertTrue($set->add(\"oranges\", 2.40));\n\t\t$this->assertTrue($set->add(\"apples\", 1.40));\n\t\t$this->assertTrue($set->add(\"strawbe...
[ "0.56075525", "0.5344697", "0.52464586", "0.51361793", "0.51007867", "0.5060096", "0.4849163", "0.48221055", "0.48123753", "0.48104572", "0.4780442", "0.4778112", "0.4769197", "0.47589627", "0.46832055", "0.46826243", "0.4660549", "0.46392068", "0.46282265", "0.46197614", "0....
0.0
-1
Gets a service instance
public function getService($name) { if (!isset($this->_instances[$name])) { if (!$this->_services) { $this->_services = $this->config->getConfig('services'); } if (!isset($this->_services[$name])) { throw new \Exception( 'Undefined service : ' . $name ); } $this->_instances[$name] = new $this->_services[$name]($this); } return $this->_instances[$name]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function getServiceInstance()\n {\n $s = self::getServiceType();\n switch ($s) {\n case 0:\n http_response_code(404);\n exit();\n case 1:\n return new RCFaxClient();\n break;\n case 2:\n ...
[ "0.7471871", "0.7321831", "0.7246111", "0.71809363", "0.71809363", "0.7146149", "0.71012014", "0.70668995", "0.7054969", "0.70494986", "0.7047633", "0.704367", "0.7017104", "0.7000491", "0.7000491", "0.7000491", "0.7000491", "0.7000491", "0.7000491", "0.7000491", "0.69760007"...
0.65276504
47
Gets the specified storage driver
public function getStorage($name) { return $this ->getService('storage') ->getDriver($name) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getCloudDriver()\r\n\t{\r\n\t\treturn $this->royalcms['config']['filesystems.cloud'];\r\n\t}", "Public Function getDriver() { Return $this->driver; }", "public function getDriver()\n {\n return $this->driver;\n }", "public function getLocalDriverHandle()\n {\n return...
[ "0.7020853", "0.6790821", "0.6755972", "0.67345965", "0.67104954", "0.67041767", "0.66478884", "0.66478884", "0.6643326", "0.66361886", "0.6602094", "0.65788203", "0.6567232", "0.6538213", "0.6488688", "0.6466755", "0.64623123", "0.6451095", "0.6446355", "0.6446043", "0.64460...
0.6747254
3
Gets a meta model storage structure
public function getModel($name) { return $this ->getService('storage') ->getModel($name) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStorage();", "public function getStorage();", "public function getStorage()\n {\n return $this->get(self::_STORAGE);\n }", "public static function getStorage() {}", "protected function _getMetadataModel()\n\t{\n\t\treturn $this->getModelFromCache('Brivium_MetadataEssential_M...
[ "0.67621154", "0.67621154", "0.66737056", "0.66641504", "0.66548634", "0.66266966", "0.6626445", "0.6624801", "0.64237034", "0.63749105", "0.6345029", "0.630335", "0.62424767", "0.6166812", "0.6150634", "0.6150634", "0.6150634", "0.6150634", "0.6150634", "0.6150634", "0.61506...
0.5444416
92
Gets the informations layer
public function getInfos() { return $this->getService('infos'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getInformation();", "public function getInfo();", "public function getInfo() {}", "public function getInfo() {}", "public function getInfo()\n\t{\n\t\treturn $this->resource->get($this->name)->getContent();\n\t}", "public function getInfo ()\n {\n return $this->info;\n }", ...
[ "0.73128617", "0.72200763", "0.7117518", "0.7117518", "0.695264", "0.68107855", "0.6795171", "0.675849", "0.675849", "0.67142195", "0.6705893", "0.66947085", "0.66947085", "0.66947085", "0.66947085", "0.66947085", "0.66947085", "0.66947085", "0.6653471", "0.66063416", "0.6606...
0.68388194
5
Gets the plugins layer
public function getPlugins() { return $this->getService('plugins'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPlugin();", "public function getPlugin();", "public function getPlugins()\n {\n $this->getPlugin('base');\n }", "function getPlugins();", "function getPlugins() {\n return $this->plugins;\n }", "public function get_plugins() {\n\t\treturn get_plugins();\n\t}", "publi...
[ "0.7240549", "0.7240549", "0.715986", "0.70793486", "0.7010067", "0.6948934", "0.6936896", "0.6825771", "0.6666132", "0.6666132", "0.6659377", "0.6601763", "0.6511795", "0.64987653", "0.64835393", "0.64244604", "0.64130133", "0.63409764", "0.6284485", "0.6236797", "0.6225006"...
0.6941273
6
Gets the asset manager
public function getAssets() { return $this->getService('assets'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAssetManager()\n {\n if (!is_object($this->_assetManager)) {\n $options = $this->_assetManager;\n if (!isset($options['class'])) {\n $options['class'] = 'yii\\\\web\\\\AssetManager';\n }\n if (!isset($options['basePath'])) {\n ...
[ "0.79519796", "0.7441054", "0.70926934", "0.6995133", "0.6964597", "0.6964597", "0.6964597", "0.69555306", "0.67907387", "0.67510116", "0.66612446", "0.6615011", "0.6604568", "0.6599946", "0.6586011", "0.65641415", "0.65641415", "0.65641415", "0.65641415", "0.65469575", "0.65...
0.6471855
24
Gets the response handler
public function getResponse() { return $this->getService('response'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHandler()\n {\n return $this->handler;\n }", "public function getHandler()\n {\n return $this->handler;\n }", "public function getHandler() {}", "protected function get_handler() {\n\n\t\treturn $this->handler;\n\t}", "public function getHandler();", "public f...
[ "0.7962327", "0.7962327", "0.7865807", "0.7864189", "0.7831444", "0.7831444", "0.77855545", "0.768745", "0.76560545", "0.7610717", "0.7446234", "0.74168336", "0.73521113", "0.7320974", "0.73160267", "0.7246447", "0.71676886", "0.7144354", "0.7136968", "0.70351094", "0.6893198...
0.0
-1
Gets the view manager
public function getView() { return $this->getService('view'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getViewManager()\n {\n return $this->viewManager;\n }", "public function getManager() {\n return $this->manager;\n }", "protected function getManager()\n {\n return $this->manager;\n }", "public function getManager()\n {\n return $this->manager;\n ...
[ "0.8783244", "0.7067067", "0.706599", "0.70657104", "0.70657104", "0.70657104", "0.68439674", "0.682366", "0.66490364", "0.65647", "0.64939797", "0.64801615", "0.6461177", "0.64446783", "0.64446783", "0.64446783", "0.64445466", "0.6410938", "0.6403208", "0.63964593", "0.63431...
0.64187235
17
Gets the logging service
public function getLogger() { return $this->getService('logger'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getLogService() {\n return $this->_logService ?\n $this->_logService :\n $this->_logService = $this->getServiceLocator()->get('LogService');\n }", "protected function getLoggerService()\n {\n return $this->services['logger'] = new \\Symfony\\Co...
[ "0.82772833", "0.80404913", "0.79366267", "0.77428055", "0.7548401", "0.73680556", "0.7177469", "0.71629095", "0.714661", "0.7118457", "0.70892483", "0.7086743", "0.7086743", "0.7086743", "0.7058224", "0.7058224", "0.7058224", "0.7045741", "0.7045741", "0.7030893", "0.7013644...
0.7883815
3
Gets the current request
public function getRequest() { return $this->getService('request'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRequest()\n {\n return $this->current_request;\n }", "public function getCurrentRequest()\n\t\t{\n\t\t\treturn $this->currentRequest;\n\t\t}", "public function getCurrentRequest()\n {\n return $this->container['request'];\n }", "public function request() {\n return $t...
[ "0.92806315", "0.89473426", "0.8830191", "0.8757358", "0.87196976", "0.87111527", "0.86888975", "0.86888975", "0.86888975", "0.86637765", "0.86528534", "0.8652449", "0.8652449", "0.8648066", "0.86359715", "0.8635416", "0.8635416", "0.8635416", "0.8611303", "0.8611303", "0.861...
0.80823326
83
Gets a url from the specified route
public function getUrl($route, array $args = null) { return $this->getRequest()->getBaseDir() . $this->getService('router')->getUrl($route, $args) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRoute($url);", "public function getUrl($route = '', $params = []);", "public function getUrl($route, array $args = null);", "public function getUrl($route = '') {\r\n\t\treturn $this->protocol.'://'.$this->host.$this->getUri($route);\r\n\t}", "public function getUri($route = '') {\r\n\t\...
[ "0.7969044", "0.77095366", "0.7695049", "0.75016326", "0.7209435", "0.718855", "0.71775043", "0.71334857", "0.7097974", "0.7069494", "0.7004759", "0.69976777", "0.69789064", "0.69508755", "0.6905447", "0.6817693", "0.6817693", "0.6810103", "0.66973996", "0.66973996", "0.66973...
0.63948745
43
Execute the specified action controller
public function execute($controller, $action, $params) { $instance = new $controller($this); return $instance->execute($action, $params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function execute() {\n\t\t$controller = $this->manager->get($this->getController());\n\t\t$reflection = new \\ReflectionClass($controller);\n\t\t$controller->run( $this->getAction($reflection) );\n\t}", "private function executeAction($controller, $action) {\t\tif(!method_exists($controller, $action))\n\t...
[ "0.82769316", "0.79875916", "0.7787949", "0.77741987", "0.7634201", "0.7634201", "0.7634201", "0.763356", "0.74360543", "0.7414527", "0.7309607", "0.7264929", "0.7250813", "0.7244339", "0.7199454", "0.7185438", "0.7173012", "0.7165657", "0.71518123", "0.714651", "0.7135353", ...
0.0
-1
Retrieve a list of current request parameters
protected function _loadParameters(array $params = null) { return $params ? merge_array( $this->getRequest()->getParameters(), $params ) : $this->getRequest()->getParameters() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRequestParameters()\n\t{\n\t\treturn $this->aParameters;\n\t}", "public function getRequestParams();", "public function getRequestParams()\n {\n return $_REQUEST;\n }", "public function getRequestParameters() {\n return array();\n }", "private function _getRequestP...
[ "0.7942788", "0.7876516", "0.7729333", "0.7722339", "0.7493092", "0.747967", "0.73608726", "0.7340326", "0.73030037", "0.72488934", "0.72376823", "0.7234904", "0.7206365", "0.7206365", "0.7206365", "0.7206365", "0.7206365", "0.7206365", "0.7206365", "0.7206365", "0.7206365", ...
0.0
-1
Dispatching the specified request
public function dispatch($method = null, $url = null, array $params = null) { $this->_raise( self::E_DISPATCH, array( 'request' => $url, 'params' => $params ) ); if (!is_callable($url)) { // initialize parameters if (!is_null($url)) { $this->getRequest()->setLocation($url); } else { $url = $this->getRequest()->getLocation(); } $route = $this->getService('router')->getRoute($url); } else { $route = $url; } if ($route === false) { throw new Exception('No route found', 404); } else { if (is_string($route)) { // execute a controller $parts = explode('::', $route, 2); if (empty($parts[1])) $parts[1] = 'index'; return $this->execute($parts[0], $parts[1], $params); } else { // use the route as a callback return $route($this, $params); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function DispatchRequest ();", "public function dispatch($request)\n {\n }", "public function dispatch(Request $request) {\n\n $uri = $request->uri();\n $method = $request->method();\n\n if (in_array($uri, self::$routes)) {\n if (self::$methods[$uri] == $met...
[ "0.8269075", "0.81345737", "0.74644786", "0.72771883", "0.72771883", "0.7218052", "0.71209145", "0.71033096", "0.7101696", "0.7070795", "0.7069167", "0.70598406", "0.70494574", "0.7008689", "0.69985324", "0.6995811", "0.69831634", "0.69674486", "0.69475704", "0.6936175", "0.6...
0.0
-1
Gets the current application
function getApplication();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getApp() {\n return $this->call->getApp();\n }", "public static function getActiveApp()\n {\n return self::$_activeApp;\n }", "public static function getApp()\n\t{\n\t\treturn static::$app;\n\t}", "public function getApp()\n {\n return $this->app;\n }", "...
[ "0.85277414", "0.83977383", "0.83349156", "0.8165997", "0.8165997", "0.8165997", "0.8165997", "0.8165997", "0.8165997", "0.8077293", "0.8075828", "0.8071614", "0.8052908", "0.80133325", "0.80133325", "0.80133325", "0.80133325", "0.7992866", "0.797287", "0.797287", "0.797287",...
0.7546936
39
Gets a storage provider from its configuration key
function getDriver($name = null);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_provider() {\n\t\treturn $this->session->get($this->config['session_key'] . '_provider', null);\n\t}", "public function getStorageService()\n {\n $class = $this->app['config']->get('shoppingcart.storage','session');\n\n switch ($class)\n {\n case 'session':\...
[ "0.6466302", "0.6348614", "0.6332645", "0.6261983", "0.6241674", "0.6223641", "0.62144905", "0.6150792", "0.61017066", "0.61017066", "0.61017066", "0.60108554", "0.60046214", "0.60001683", "0.5999905", "0.59636986", "0.59174734", "0.59174734", "0.5916909", "0.5880084", "0.587...
0.0
-1
Creates a storage instance for the specified driver
function createDriver($driver, array $conf = null);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createStorage();", "public function create($driver, array $conf = null);", "protected function createStorageInstance(array $storageConfig)\n {\n return Yii::createObject($storageConfig);\n }", "private static function driver($driver)\n\t{\n\t\tswitch($driver)\n\t\t{\n\t\t\tcase '...
[ "0.65216744", "0.6512651", "0.61988866", "0.6092631", "0.6028591", "0.60097754", "0.6004605", "0.59156525", "0.5804574", "0.571667", "0.5672056", "0.56684047", "0.5652405", "0.5646042", "0.5620654", "0.55727375", "0.5569895", "0.5568055", "0.5560162", "0.5556846", "0.5540338"...
0.6388817
2