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
Sets the option to encapsulated the original file's content.
public function setEncapsulateContent($value) { $this->_encapsulateContent = $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function setContentFromFile($file);", "private function setContentsFromFile()\n {\n $this->file->typeChecker()->assertMarkdown();\n $this->contents = $this->file->contents();\n }", "public function setFileContents($value)\n {\n return $this->set('FileContents', $va...
[ "0.6163118", "0.55871147", "0.55731523", "0.55731523", "0.55731523", "0.55703807", "0.54570353", "0.54431283", "0.5424947", "0.54159117", "0.53822994", "0.52876747", "0.5266123", "0.5227722", "0.5216328", "0.5210762", "0.51641124", "0.5132846", "0.51287633", "0.5107732", "0.5...
0.4943334
32
returns an array of all lines in the address. key should represent line's number. If address line is not specified should return empty value for corresponding key i.e. must follow the contract count(IAddress::getAllLines()) == IAddress::getLinesCount() $array = Array( '1' => 'Line 1', '2' => 'Line 2', '3' => '', '4' => 'Line 4', '5' => '' )
public function getAllLines();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLines(): array {\n\t\treturn $this->_lines;\n\t}", "public function getLines(): array\n {\n return $this->lines;\n }", "public function getLines();", "public function getLines();", "public function getInvoiceLines($invoice_id)\n {\n return $this->remote->select()->...
[ "0.66587734", "0.661189", "0.652894", "0.652894", "0.60874516", "0.60809726", "0.5923534", "0.5856142", "0.5791759", "0.5733196", "0.5693125", "0.5640785", "0.5640178", "0.56311625", "0.5613263", "0.55872005", "0.55721164", "0.55626523", "0.5556269", "0.5520456", "0.5472211",...
0.67015874
1
returns single line of address which number is $line
public function getLine($line);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function get_line() { \n\t\t$line = $this->lines[$this->cursor]; \n\t\t$this->cursor++; return $line; \n\t}", "function getLine()\r\n {\r\n\t\t\tdo\r\n\t\t\t{\r\n\t\t\t\t$sLine = trim($this->referString[$this->currentLine]);\r\n\t\t\t\t$this->currentLine++;\r\n\t\t\t} while ($this->currentLine < count...
[ "0.7337679", "0.7311519", "0.72788274", "0.7116505", "0.7087814", "0.69932336", "0.6954411", "0.6954411", "0.6944314", "0.6925979", "0.6864805", "0.6864805", "0.6864805", "0.6864805", "0.6864805", "0.6864805", "0.68622935", "0.68578994", "0.68578994", "0.6829066", "0.6823132"...
0.7488274
0
returns total number of lines that this IAddress may represent.
public function getLinesCount();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function numLines() {\r\n\t\treturn $this->lines;\r\n\t}", "protected function get_line_len()\n {\n return count($this->buffer);\n }", "public function getLineCount() {}", "public function numLines()\n {\n if($this->state['numlines']) {\n return $this->sta...
[ "0.7453195", "0.7152699", "0.7110588", "0.69877267", "0.68574244", "0.6773752", "0.67736185", "0.6763348", "0.6701279", "0.6659539", "0.6548277", "0.6416865", "0.6284988", "0.62838316", "0.6273335", "0.6235725", "0.6219744", "0.6163236", "0.615204", "0.61324376", "0.60941696"...
0.7358888
1
returns postcode of the address.
public function getPostcode();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getPostcode()\n {\n return $this->checkoutSession->getLastRealOrder()->getBillingAddress()->getPostcode();\n }", "public function getPostcode(): string\n {\n return $this->postcode;\n }", "public function getPostcode()\n {\n return $this->postcode;\n }"...
[ "0.80491596", "0.76735604", "0.7664224", "0.7664224", "0.7664224", "0.7544685", "0.75357187", "0.75156426", "0.74146473", "0.74019563", "0.74019563", "0.7268599", "0.7217776", "0.71228445", "0.7110134", "0.70700324", "0.70671916", "0.70545393", "0.69945693", "0.69760925", "0....
0.7741459
1
returns one part of the postcode. Most commonly first part of postcode may be used independently. Also may be used to retrieve a second part.
public function getPostcodePart($part = IAddress::POSTCODE_PART_ONE);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPostcode();", "function ExtractMatchString( $Postcode )\n{\n\t$SpacePos = strpos( $Postcode, \" \" );\n\tif( $SpacePos )\n\t{\n\t\tif( substr( $Postcode, $SpacePos + 1, 1) == \" \" )\n\t\t{\n\t\t\treturn substr( $Postcode, 0, $SpacePos + 1 ) . substr( $Postcode, $SpacePos + 2\t, 1 );\n\t\t}\n\...
[ "0.65724015", "0.6407077", "0.62163806", "0.62163806", "0.62163806", "0.6196637", "0.61037743", "0.5887798", "0.56655985", "0.5664813", "0.5638105", "0.55547446", "0.5548867", "0.5503229", "0.5503229", "0.5502349", "0.54727036", "0.547207", "0.5423586", "0.5410096", "0.538005...
0.7370118
0
returns Latitude of the address if it has one; null otherwise.
public function getLat();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_latitude($address){\n\t\t$output = get_geocode($address);\n\t\tif($output->status==\"OK\" && (count($output->results) == 1)){\n\t\t\t$latitude = $output->results[0]->geometry->location->lat;\t\t\t\n\t\t\treturn $latitude;\t\t\t\n\t\t}\n\t\telse\n\t\t\treturn null;\n\t\t\n\t}", "public function getLa...
[ "0.7916927", "0.68906116", "0.6687865", "0.6686586", "0.66169363", "0.64196527", "0.64170456", "0.63140154", "0.6170558", "0.6101385", "0.6070726", "0.6060713", "0.6058234", "0.6041061", "0.6037897", "0.6027328", "0.5967252", "0.5967252", "0.5967252", "0.5967252", "0.5967252"...
0.5978075
16
returns longitude of the address if it has one; null otherwise.
public function getLng();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_longitude($address){\n\t\t$output = get_geocode($address);\n\t\tif($output->status==\"OK\" && (count($output->results) == 1)){\n\t\t\t$longitude = $output->results[0]->geometry->location->lng;\t\t\t\n\t\t\treturn $longitude;\t\t\t\n\t\t}\n\t\telse\n\t\t\treturn null;\n\t\t\n\t}", "public function ge...
[ "0.8352108", "0.71962357", "0.68272185", "0.6817669", "0.6799275", "0.6778918", "0.6695228", "0.6691877", "0.66741234", "0.6636814", "0.6625733", "0.65891075", "0.65891075", "0.65891075", "0.65891075", "0.65891075", "0.65891075", "0.65891075", "0.65891075", "0.65759045", "0.6...
0.58445233
39
returns ID of the address in the postcodeAnywhere database if it has one; null otherwise.
public function getPostcodeAnywhereId();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAddressId() \n {\n return $this->address_id;\n }", "public function getZohoAddressId();", "public function getBillingAddressId();", "public function getAddress()\n {\n $address = null;\n if ($data = $this->getLocationData()) {\n $address = Address::create()...
[ "0.68717664", "0.6842663", "0.65116405", "0.6349251", "0.63195395", "0.620886", "0.598515", "0.59767985", "0.59355646", "0.59162474", "0.59108186", "0.59092313", "0.5902166", "0.5878164", "0.58322966", "0.5831127", "0.5808772", "0.5781222", "0.57656157", "0.5747084", "0.57326...
0.7239681
0
remember to return out a value since this is a function.
static public function find_by_username($userName, $password) { $sql = "SELECT * FROM " . static::$table_name; $sql .= " WHERE userName='" . self::$database->escape_string($userName) . "' AND password='" . self::$database->escape_string($password) . "'"; $obj_array = static::find_by_sql($sql); if(!empty($obj_array)){ return array_shift($obj_array); } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function func() { return $this->f; }", "public function getReturnedValue();", "abstract protected function getValue();", "function get_value() {return $this->get();}", "public function &getValue();", "public function __invoke()\n {\n return $this->value;\n }", "public function ...
[ "0.7263861", "0.70597607", "0.69167316", "0.69030744", "0.6826962", "0.68092126", "0.68022245", "0.68022245", "0.6698765", "0.66905856", "0.66905856", "0.66905856", "0.6681377", "0.66428936", "0.6534598", "0.6534598", "0.6531931", "0.6482676", "0.64512414", "0.6426806", "0.64...
0.0
-1
Handle an incoming request.
public function handle($request, Closure $next) { if(!$request->session()->has('user')){ return redirect("/")->with('loginMessage', 'Please login'); Log::error($request->ip().' tried to access a page without logging'); } return $next($request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function handle_request();", "public function handleRequest();", "public function handleRequest();", "public function handleRequest();", "protected abstract function handleRequest();", "abstract public function handleRequest($request);", "abstract public function handleRequest(Request $...
[ "0.8299201", "0.8147294", "0.8147294", "0.8147294", "0.8127764", "0.7993589", "0.7927201", "0.7912899", "0.7899075", "0.76317674", "0.75089735", "0.7485808", "0.74074036", "0.7377414", "0.736802", "0.7294553", "0.72389543", "0.7230166", "0.72108", "0.71808434", "0.7170364", ...
0.0
-1
Before Login , these are the function we can access
public function beforeFilter(Event $event) { $this->Auth->allow([ //'index' ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function before()\n {\n $this->requireLogin();\n }", "protected function before()\n {\n $this->requireLogin();\n }", "protected function loginIfRequested() {}", "public function _check_login()\n {\n\n }", "public function before()\n\t{\n\t\tif ($this->request->acti...
[ "0.7590724", "0.7590724", "0.75284797", "0.7473655", "0.74292964", "0.74252546", "0.7422647", "0.7417862", "0.7398254", "0.738983", "0.7262421", "0.7177277", "0.714481", "0.7131071", "0.71189475", "0.7052014", "0.7052014", "0.7045976", "0.7042144", "0.7009662", "0.70039076", ...
0.0
-1
Run the database seeds.
public function run() { $classes = [ ['class' => 'JSS1'], ['class' => 'JSS2'], ['class' => 'JSS3'], ['class' => 'SS1'], ['class' => 'SS2'], ['class' => 'SS3'], ]; DB::table('school_classes')->insert($classes); }
{ "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
If you pass an array, every value will be added as message. This way you can pass multiple messages at once.
public function addError($message) { $this->errors = array_merge($this->errors, (array) $message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function messages( $array ) {\n\t\t$this->messages_list = $array;\n\t\t}", "function setMessage($message, $type, &$array)\n{\n array_push($array, array(\n 'Message' => $message,\n 'Type' => $type\n ));\n}", "function add_message($messages){\n global $messages;\n $messages[] = $message...
[ "0.76500267", "0.72358096", "0.7125383", "0.6966936", "0.6908486", "0.68029857", "0.67757237", "0.6729964", "0.6592916", "0.6571905", "0.6569278", "0.6507707", "0.6498772", "0.6448636", "0.640394", "0.6388353", "0.6374067", "0.6368543", "0.632836", "0.63282835", "0.6321254", ...
0.0
-1
If you pass an array, every value will be added as message. This way you can pass multiple messages at once.
public function addSuccess($message) { $this->successes = array_merge($this->successes, (array) $message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function messages( $array ) {\n\t\t$this->messages_list = $array;\n\t\t}", "function setMessage($message, $type, &$array)\n{\n array_push($array, array(\n 'Message' => $message,\n 'Type' => $type\n ));\n}", "function add_message($messages){\n global $messages;\n $messages[] = $message...
[ "0.76500267", "0.72358096", "0.7125383", "0.6966936", "0.6908486", "0.68029857", "0.67757237", "0.6729964", "0.6592916", "0.6571905", "0.6569278", "0.6507707", "0.6498772", "0.6448636", "0.640394", "0.6388353", "0.6374067", "0.6368543", "0.632836", "0.63282835", "0.6321254", ...
0.0
-1
removing links with orders
public function delete() { Mage::getModel('amflags/order_flag')->removeLinks($this); return parent::delete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function orderdown() {\n\t\t\n\t\t$this->_order(1);\n\t\t\n\t\t$this->adminLink->makeURL();\n\t\t$this->app->redirect( $this->adminLink->url );\n\t\n\t}", "function _striplinks($document)\n\t{\t\n\t\tpreg_match_all(\"'<\\s*a\\s.*?href\\s*=\\s*\t\t\t# find <a href=\n\t\t\t\t\t\t([\\\"\\'])?\t\t\t\t\t# find single...
[ "0.6103649", "0.58335775", "0.5817567", "0.5765514", "0.57641673", "0.5734988", "0.572543", "0.56726724", "0.5637828", "0.55425423", "0.5506784", "0.54617566", "0.5458103", "0.53781605", "0.5370096", "0.53645056", "0.5326128", "0.5322039", "0.5293432", "0.528514", "0.5279967"...
0.5930627
1
Returns the name of this type.
public function getName() { return "menu"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getName(): string {\n\t\t\treturn $this->type;\n\t\t}", "public function getTypeName()\n {\n return $this->type_name;\n }", "public function name() {\n\t\t\treturn $this->_name . ' ('.self::$type_name[$this->_type].')';\n\t\t}", "public function getTypeName()\n {\n retu...
[ "0.8866213", "0.88208175", "0.8817157", "0.87542146", "0.855894", "0.8204096", "0.8155769", "0.8155769", "0.8136834", "0.8110998", "0.80263054", "0.8010495", "0.79981846", "0.79853827", "0.79727006", "0.79586303", "0.79586303", "0.79586303", "0.79586303", "0.79586303", "0.795...
0.0
-1
Display a listing of the resource.
public function index() { // //* id, question_code, question_specific, question_detail //* is_private, is_answered, patient_id, created_at, updated_at // $questions = Question::all(); $questions = Question::orderBy('question_code', 'asc')->get(); $answered_questions = array(); $unanswered_questions = array(); $answersList = array(); foreach ($questions as $question ){ // Code Here if( $question->is_answered == 'unanswered' ){ array_push($unanswered_questions, $question); }else{ array_push($answered_questions, $question); } //echo $question->is_answered; } foreach ($questions as $question) { $answers = Question::find($question->id)->answers; //asso array need foreach //get all answers of this question foreach ($answers as $answer) { array_push($answersList, $answer); //$answer is all answers of question & $answer is json } } return view('Q&A.index', compact('unanswered_questions', 'answered_questions','answersList'));//,'specialties')); // return compact('unanswered_questions', 'answered_questions','answersList');//,'specialties'); }
{ "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('Q&A.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(StoreQuestionRequest $request) { // //get data from view //* id, question_code, question_specific, question_detail //* is_private, is_answered, patient_id, created_at, updated_at $question_code = 'QI-'.time();//$request->input('patient-name');$x=time(); $question_specific = $request->input('question-specific'); $question_detail = $request->input('question-detail'); $patient_id = Auth::user()->id;//$request->input('patient-id'); ///* ////$attach = $request->file('question-attach'); // //check data //// if($attach){ //// $attach_filename= $attach->getClientOriginalFileName(); //// //write @bootstrap\app.php //// $attach->move(public_path('attachments'),$attach_filename); //// }else { //// $attach_filename = null; //is send to command //// } // * // */ //create command $command = new StoreQuestionCommand($question_code, $question_specific, $question_detail, $patient_id); //run command $this->dispatch($command); return redirect('/questions') ->with('message','New Question is added'); // }
{ "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) { // $question = Question::find($id); // $answers = $question->answers; // return compact('question'); return view('Q&A.show', compact('question')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245...
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // $question = Question::find($id); return view('Q&A.edit', compact('question')); }
{ "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(UpdateQuestionRequest $request, $id) { // $question_specific = $request->input('question-specific'); $question_detail = $request->input('question-detail'); $patient_id = Auth::user()->id;//$request->input('patient-id'); //create command $command = new UpdateQuestionCommand($id, $question_specific, $question_detail, $patient_id); //run command $this->dispatch($command); return redirect('/questions') ->with('message','Question is updated'); }
{ "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) { // $command = new DestoryQuestionCommand($id); //run command $this->dispatch($command); return redirect('/questions') ->with('message','Question is deleted'); }
{ "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
Attempt to find the user id of the currently logged in user Supports Cartalyst Sentry/Sentinel based authentication, as well as stock Auth
public function getSystemUserId() { $systemUser = $this->getSystemUser(); if (is_null($systemUser)) { return $systemUser; } try { if (is_array($systemUser)) { if (isset($systemUser['id'])) { return $systemUser['id']; } } throw new \Exception('No `id` found for the authenticated system user.'); } catch (\Exception $e) { $this->reportException($e); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_user_id();", "public static function getCurrentUserId(){\n $user_data = parent::getSession('curent_user');\n $_get_id_user = isset($_GET['id_user']) ? $_GET['id_user'] : null;\n $_post_id_user = isset($_POST['id_user']) ? $_POST['id_user'] : null;\n return\n ...
[ "0.77447987", "0.76460433", "0.7610773", "0.75964737", "0.7579676", "0.75359553", "0.7444018", "0.7426613", "0.74092907", "0.73609084", "0.7347981", "0.7335198", "0.7322457", "0.7310461", "0.7309113", "0.72842306", "0.7267181", "0.7253733", "0.724437", "0.724437", "0.7205777"...
0.68194586
98
The subiterator for the current element.
public function getChildren() { return $this->current()->getIterator(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getInnerIterator()\n\t{\n\t\treturn $this->iterator;\n\t}", "function current() {\n return $this->iterators->valid() ?\n $this->getInnerIterator()->current() : NULL;\n }", "public function current()\n {\n return current($this->_elements);\n }", "public function current()\r\n\t{...
[ "0.7319314", "0.69021535", "0.6729331", "0.6703734", "0.66872245", "0.6658976", "0.661221", "0.6598169", "0.6536025", "0.65071386", "0.6471212", "0.64498174", "0.6432847", "0.6425203", "0.64233696", "0.6416126", "0.63889354", "0.638609", "0.6369682", "0.6358866", "0.6353915",...
0.6393728
16
Returns the count of elements.
public function count() { return iterator_count($this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function count() : int {\n return count($this->elements);\n }", "public function count()\n {\n return count($this->elements);\n }", "public function count()\n {\n return count($this->elements);\n }", "public function count(): int\n {\n return \\count($this...
[ "0.90584177", "0.9020235", "0.9020235", "0.89895296", "0.89852047", "0.8975783", "0.8887698", "0.8722225", "0.87135655", "0.8409825", "0.839644", "0.83467364", "0.83004737", "0.8054714", "0.80531335", "0.8045846", "0.8032677", "0.7999395", "0.79883647", "0.79858315", "0.79492...
0.77335435
60
Generates the configuration tree builder.
public function getConfigTreeBuilder() { $tree = new TreeBuilder(); $tree->root('three_scale') ->children() ->scalarNode('provider_key')->defaultValue(false)->isRequired()->end() ->arrayNode('client') ->children() ->scalarNode('class')->end() ->end() ->end() ->end(); return $tree; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getConfigTreeBuilder()\n {\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder('chameleon_system_core');\n $root = $treeBuilder->getRootNode();\n $root->isRequired();\n\n $root\n ->children()\n ->scalarN...
[ "0.7528792", "0.73049206", "0.72124696", "0.70483494", "0.7025038", "0.7012615", "0.6973417", "0.6945826", "0.68797654", "0.68684536", "0.6863819", "0.6863366", "0.6855712", "0.68030804", "0.6794495", "0.67527676", "0.6741344", "0.67340124", "0.6716738", "0.6703568", "0.66952...
0.6653944
25
funcao construtor da classe
function cl_sau_triagemavulsa() { //classes dos rotulos dos campos $this->rotulo = new rotulo("sau_triagemavulsa"); $this->pagina_retorno = basename($GLOBALS["HTTP_SERVER_VARS"]["PHP_SELF"]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __construct() ;", "function _construct() {\n \t\n\t\t\n\t}", "function __construct (){\n\t\t}", "function _construct(){ }", "public function _construct()\n\t{\n\n\t}", "function __construct(){\n\n\t\t}", "function __construct()\r\n\t\t{\r\n\t\t\t\r\n\t\t}", "function __construct() {}", ...
[ "0.82710814", "0.8201428", "0.8043516", "0.80062735", "0.796183", "0.7928873", "0.7894286", "0.78932434", "0.78932434", "0.78932434", "0.78932434", "0.78932434", "0.78932434", "0.7892753", "0.7887893", "0.788242", "0.78764445", "0.7872269", "0.78641057", "0.78625774", "0.7862...
0.0
-1
funcao para atualizar campos
function atualizacampos($exclusao=false) { if($exclusao==false){ $this->s152_i_codigo = ($this->s152_i_codigo == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_i_codigo"]:$this->s152_i_codigo); $this->s152_i_cbosprofissional = ($this->s152_i_cbosprofissional == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_i_cbosprofissional"]:$this->s152_i_cbosprofissional); $this->s152_i_cgsund = ($this->s152_i_cgsund == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_i_cgsund"]:$this->s152_i_cgsund); $this->s152_i_login = ($this->s152_i_login == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_i_login"]:$this->s152_i_login); $this->s152_i_pressaosistolica = ($this->s152_i_pressaosistolica == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_i_pressaosistolica"]:$this->s152_i_pressaosistolica); $this->s152_i_pressaodiastolica = ($this->s152_i_pressaodiastolica == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_i_pressaodiastolica"]:$this->s152_i_pressaodiastolica); $this->s152_i_cintura = ($this->s152_i_cintura == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_i_cintura"]:$this->s152_i_cintura); $this->s152_n_peso = ($this->s152_n_peso == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_n_peso"]:$this->s152_n_peso); $this->s152_i_altura = ($this->s152_i_altura == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_i_altura"]:$this->s152_i_altura); $this->s152_i_glicemia = ($this->s152_i_glicemia == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_i_glicemia"]:$this->s152_i_glicemia); $this->s152_i_alimentacaoexameglicemia = ($this->s152_i_alimentacaoexameglicemia == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_i_alimentacaoexameglicemia"]:$this->s152_i_alimentacaoexameglicemia); if($this->s152_d_dataconsulta == ""){ $this->s152_d_dataconsulta_dia = ($this->s152_d_dataconsulta_dia == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_d_dataconsulta_dia"]:$this->s152_d_dataconsulta_dia); $this->s152_d_dataconsulta_mes = ($this->s152_d_dataconsulta_mes == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_d_dataconsulta_mes"]:$this->s152_d_dataconsulta_mes); $this->s152_d_dataconsulta_ano = ($this->s152_d_dataconsulta_ano == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_d_dataconsulta_ano"]:$this->s152_d_dataconsulta_ano); if($this->s152_d_dataconsulta_dia != ""){ $this->s152_d_dataconsulta = $this->s152_d_dataconsulta_ano."-".$this->s152_d_dataconsulta_mes."-".$this->s152_d_dataconsulta_dia; } } if($this->s152_d_datasistema == ""){ $this->s152_d_datasistema_dia = ($this->s152_d_datasistema_dia == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_d_datasistema_dia"]:$this->s152_d_datasistema_dia); $this->s152_d_datasistema_mes = ($this->s152_d_datasistema_mes == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_d_datasistema_mes"]:$this->s152_d_datasistema_mes); $this->s152_d_datasistema_ano = ($this->s152_d_datasistema_ano == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_d_datasistema_ano"]:$this->s152_d_datasistema_ano); if($this->s152_d_datasistema_dia != ""){ $this->s152_d_datasistema = $this->s152_d_datasistema_ano."-".$this->s152_d_datasistema_mes."-".$this->s152_d_datasistema_dia; } } $this->s152_c_horasistema = ($this->s152_c_horasistema == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_c_horasistema"]:$this->s152_c_horasistema); $this->s152_n_temperatura = ($this->s152_n_temperatura == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_n_temperatura"]:$this->s152_n_temperatura); $this->s152_evolucao = ($this->s152_evolucao == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_evolucao"]:$this->s152_evolucao); $this->s152_perimetrocefalico = ($this->s152_perimetrocefalico == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_perimetrocefalico"]:$this->s152_perimetrocefalico); $this->s152_frequenciarespiratoria = ($this->s152_frequenciarespiratoria == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_frequenciarespiratoria"]:$this->s152_frequenciarespiratoria); $this->s152_frequenciacardiaca = ($this->s152_frequenciacardiaca == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_frequenciacardiaca"]:$this->s152_frequenciacardiaca); if($this->s152_dum == ""){ $this->s152_dum_dia = ($this->s152_dum_dia == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_dum_dia"]:$this->s152_dum_dia); $this->s152_dum_mes = ($this->s152_dum_mes == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_dum_mes"]:$this->s152_dum_mes); $this->s152_dum_ano = ($this->s152_dum_ano == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_dum_ano"]:$this->s152_dum_ano); if($this->s152_dum_dia != ""){ $this->s152_dum = $this->s152_dum_ano."-".$this->s152_dum_mes."-".$this->s152_dum_dia; } } $this->s152_saturacao = ($this->s152_saturacao == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_saturacao"]:$this->s152_saturacao); $this->s152_subjetivo = ($this->s152_subjetivo == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_subjetivo"]:$this->s152_subjetivo); }else{ $this->s152_i_codigo = ($this->s152_i_codigo == ""?@$GLOBALS["HTTP_POST_VARS"]["s152_i_codigo"]:$this->s152_i_codigo); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _updatefields() {}", "function _set_editable_fields()\n\t{\n\t\tif (empty($this->fields))\n\t\t{\n\t\t\t// pull the fields dynamically from the database\n\t\t\t$this->db->cache_on();\n\t\t\t$this->fields = $this->db->list_fields($this->primary_table);\n\t\t\t$this->db->cache_off();\n\t\t}\n\t}...
[ "0.6695341", "0.6605308", "0.64370596", "0.6316871", "0.6283973", "0.6258171", "0.61481196", "0.6110965", "0.60848427", "0.60702395", "0.60149026", "0.599725", "0.59970146", "0.5989812", "0.59833664", "0.59787756", "0.5958578", "0.5952102", "0.5949218", "0.58850634", "0.58798...
0.0
-1
Get the failed pipe name.
public function getPipeName() { return $this->pipeName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getErrorName(){\n return $this->error_name;\n }", "protected function failureShort()\n\t{\n\t\treturn $this->getEventName();\n\t}", "public function getInvalidName()\n {\n return $this->_invalidName;\n }", "public function getFailedSubtask()\n {\n return $this...
[ "0.570066", "0.56586754", "0.5643886", "0.56232846", "0.5567122", "0.54656506", "0.54360574", "0.542045", "0.5377586", "0.5373938", "0.53502643", "0.53370655", "0.5312367", "0.53057307", "0.5300275", "0.5294478", "0.52780265", "0.52780265", "0.52302533", "0.5196543", "0.51713...
0.66784656
0
Create new exception instance with EXCEPTION_THROWN status.
public static function exceptionThrown(string $name, \Exception $e) { return new static( $name, 'Pipe "'.$name.'" failed due to exception (message: "'.$e->getMessage().'", code: '.$e->getCode().').', static::EXCEPTION_THROWN, $e ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function makeException()\n {\n $this->thrownException = ResponseException::create($this);\n }", "public static function httpStatusException($message)\n {\n return new self($message, self::HTTP_STATUS_EXCEPTION);\n }", "public static function createHttpStatus($messageBody = 'Int...
[ "0.6047018", "0.5504797", "0.50828433", "0.50808585", "0.50643855", "0.5048091", "0.5035881", "0.5035881", "0.50031996", "0.49794927", "0.49740174", "0.4940508", "0.48400757", "0.48311758", "0.48148528", "0.47601962", "0.47592512", "0.47174627", "0.4714104", "0.47020203", "0....
0.5032825
8
Create new exception instance with REJECTED status.
public static function rejected(string $name) { return new static( $name, 'Pipe "'.$name.'" has been rejected.', static::REJECTED ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createRejected($reason);", "public function setStatusDenied()\n {\n $this->status = 'DENIED';\n\n return $this;\n }", "public function reject()\n {\n $url = URIResource::Make($this->path, array($this->id));\n $data = new DataPacket(array(\"state\" => CALL_STATES...
[ "0.6180533", "0.5850701", "0.57170737", "0.57142437", "0.5597774", "0.55886364", "0.556708", "0.5554983", "0.5474281", "0.53034467", "0.5274926", "0.52101874", "0.5162231", "0.5159003", "0.51343906", "0.51205933", "0.5119561", "0.51128805", "0.51067215", "0.50914586", "0.5090...
0.5292176
10
Lists all creditInfo entities.
public function indexAction() { $em = $this->getDoctrine()->getManager(); $creditInfos = $em->getRepository('AppBundle:CreditInfo')->findAll(); return $this->render('creditinfo/index.html.twig', array( 'creditInfos' => $creditInfos, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionIndex() {\n $searchModel = new CreditSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]...
[ "0.6347158", "0.59950393", "0.59759474", "0.5968247", "0.5921126", "0.58915967", "0.5890987", "0.58732206", "0.5864416", "0.5832881", "0.5810455", "0.5807005", "0.58052987", "0.5767612", "0.5762164", "0.5745808", "0.5737595", "0.57221955", "0.5716083", "0.57069993", "0.570097...
0.7377111
0
Display a listing of the resource.
public function index() { $usuarios=Usuario::orderBy('id','DESC')->paginate(6); $rols=Rol::all(); return view('usuario.index', compact('usuarios','rols')); }
{ "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() { // }
{ "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(UsuarioRequest $request) { $persona=new Persona(); $persona->nombre= $request->nombre; $persona->apellido1= $request->apellido1; $persona->apellido2= $request->apellido2; $persona->cedula= $request->cedula; $persona->genero= $request->genero; $persona->telefono= $request->telefono; $persona->domicilio= $request->domicilio; $persona->save(); $usuario=new Usuario(); $usuario->rol_id=$request->rol_id; $usuario->email=$request->email; $usuario->password=bcrypt($request->password); $usuario->persona_id=persona::get()->max('id'); $usuario->save(); return back()->with('info','El usuario se registro exitosamente'); }
{ "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) { $usuario=Usuario::find($id); return view('usuario.mostrar', compact('usuario')); }
{ "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
Update the specified resource in storage.
public function edit($id) { $usuario=Usuario::find($id); $roles=rol::all(); return view('usuario.editar', compact('usuario','roles')); }
{ "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
Update the specified resource in storage.
public function update(request $request, $id) { $dato=request()->validate([ 'nombre'=>'required|max:30', 'apellido1'=>'required|max:25', 'apellido2'=>'max:25', 'cedula' => 'required|String|max:10', 'genero'=>'required|max:2', 'telefono'=>'required|max:10', 'domicilio'=>'required|max:50', 'rol_id'=>'required', 'email'=>'required|email|unique:usuario,email,'.$id, 'password'=>'nullable|string|min:6', ],[ 'nombre.required'=>'El campo nombre es obligatorio', 'apellido1.required'=>'El campo apellido paterno es obligatorio', 'apellido2.max'=>'El campo apellido materno es de maximo 25 caraceteres ', 'cedula.required' => 'El campo cedula es obligatorio', 'genero.required'=>'El campo genero es obligatorio', 'telefono.required'=>'El campo telefono es obligatorio', 'domicilio.required'=>'El campo domicilio es obligatorio', 'rol_id.required'=>'El campo rol es obligatorio', 'email.required'=>'El campo password es obligatorio' , 'email.unique'=>'El email ya fue registrado escoge otra' , 'password.min'=>' El campo password debe contener almenos 6 caracteres obligatorio', ]); $usuario=Usuario::find($id); $usuario->rol_id=$request->rol_id; $usuario->email=$request->email; if ($request->password !=null) { $usuario->password=bcrypt($request->password ); }else{ unset($request->password ); } $usuario->save(); $persona= Persona::find($usuario->persona_id); $persona->nombre= $request->nombre; $persona->apellido1= $request->apellido1; $persona->apellido2= $request->apellido2; $persona->cedula= $request->cedula; $persona->genero= $request->genero; $persona->telefono= $request->telefono; $persona->domicilio= $request->domicilio; $persona->save(); return back()->with('info','El usuario se registro exitosamente'); }
{ "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) { $usuario=Usuario::find($id); $persona=Persona::find($usuario->persona_id); $persona->delete(); $usuario->delete(); return back()->with('info', 'El registro del usuario fue eliminado de manera exitosa'); }
{ "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
helper for other modules to check for existing message
public function relativeExists($type, $objectId, $userId, $conditions = null) { return $this->messagesModel->relativeExists($type, $objectId, $userId, $conditions); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkMessage(){\r\n \t\t// checking message\r\n \t\t$message_id = $this->_request->getParam(\"message_id\");\r\n \t\t// check id param for project\r\n \t\tif(!is_numeric($message_id)){\r\n \t\t\t$this->_helper->FlashMessenger(array('error' => 'This FloBox message is not found, are yo...
[ "0.7245242", "0.7107755", "0.7054096", "0.7028923", "0.6967726", "0.6849033", "0.67937195", "0.67572194", "0.67572194", "0.67572194", "0.67572194", "0.67572194", "0.67572194", "0.67572194", "0.67572194", "0.67572194", "0.67572194", "0.67572194", "0.67572194", "0.67572194", "0...
0.0
-1
Generates the configuration tree builder.
public function getConfigTreeBuilder(): TreeBuilder { $tb = new TreeBuilder('security'); $rootNode = $tb->getRootNode(); $rootNode ->children() ->scalarNode('access_denied_url')->defaultNull()->example('/foo/error403')->end() ->enumNode('session_fixation_strategy') ->values([SessionAuthenticationStrategy::NONE, SessionAuthenticationStrategy::MIGRATE, SessionAuthenticationStrategy::INVALIDATE]) ->defaultValue(SessionAuthenticationStrategy::MIGRATE) ->end() ->booleanNode('hide_user_not_found')->defaultTrue()->end() ->booleanNode('erase_credentials')->defaultTrue()->end() ->booleanNode('enable_authenticator_manager')->setDeprecated('symfony/security-bundle', '6.2', 'The "%node%" option at "%path%" is deprecated.')->defaultTrue()->end() ->arrayNode('access_decision_manager') ->addDefaultsIfNotSet() ->children() ->enumNode('strategy') ->values($this->getAccessDecisionStrategies()) ->end() ->scalarNode('service')->end() ->scalarNode('strategy_service')->end() ->booleanNode('allow_if_all_abstain')->defaultFalse()->end() ->booleanNode('allow_if_equal_granted_denied')->defaultTrue()->end() ->end() ->validate() ->ifTrue(fn ($v) => isset($v['strategy'], $v['service'])) ->thenInvalid('"strategy" and "service" cannot be used together.') ->end() ->validate() ->ifTrue(fn ($v) => isset($v['strategy'], $v['strategy_service'])) ->thenInvalid('"strategy" and "strategy_service" cannot be used together.') ->end() ->validate() ->ifTrue(fn ($v) => isset($v['service'], $v['strategy_service'])) ->thenInvalid('"service" and "strategy_service" cannot be used together.') ->end() ->end() ->end() ; $this->addPasswordHashersSection($rootNode); $this->addProvidersSection($rootNode); $this->addFirewallsSection($rootNode, $this->factories); $this->addAccessControlSection($rootNode); $this->addRoleHierarchySection($rootNode); return $tb; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getConfigTreeBuilder()\n {\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder('chameleon_system_core');\n $root = $treeBuilder->getRootNode();\n $root->isRequired();\n\n $root\n ->children()\n ->scalarN...
[ "0.7528792", "0.73049206", "0.72124696", "0.70483494", "0.7025038", "0.7012615", "0.6973417", "0.6945826", "0.68797654", "0.68684536", "0.6863819", "0.6863366", "0.6855712", "0.68030804", "0.6794495", "0.67527676", "0.6741344", "0.67340124", "0.6716738", "0.6703568", "0.66952...
0.6162701
58
Constructor Class is not intended to be implemented
private function __construct() { throw new RuntimeException("Can't get there from here"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final private function __construct() {}", "final private function __construct() {}", "protected abstract function __construct();", "final private function __construct() { }", "final private function __construct() { }", "final private function __construct() { }", "private final function __construct() {}...
[ "0.84958524", "0.84958524", "0.845607", "0.8426613", "0.8426613", "0.8426613", "0.839833", "0.8333885", "0.83254385", "0.83208936", "0.8294996", "0.8294996", "0.8294996", "0.8294996", "0.8294996", "0.8294996", "0.8294996", "0.8294996", "0.8294996", "0.8294996", "0.8294996", ...
0.0
-1
Check for valid field type
public static function isValidField($fieldType) { return array_key_exists($fieldType, self::$fields); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_field_type($name)\n {\n }", "function acf_is_field_type($name = '')\n{\n}", "function testFieldTypeIsNotSetExpectsError() {\n\t\t// arrange\n\t\tglobal $post;\n\t\t$TestValidTextField = new TestValidTextField();\n\t\t$TestValidTextField->fields['field']['type'] = null;\n\t\t\\WP_Mock::wpFunct...
[ "0.75615853", "0.69236153", "0.66642106", "0.6571284", "0.6525033", "0.6510676", "0.6494292", "0.6459748", "0.64550215", "0.6442062", "0.64420354", "0.6441303", "0.6424762", "0.6422379", "0.63895327", "0.6347795", "0.6340625", "0.6333328", "0.6326221", "0.63169986", "0.631472...
0.5907314
68
Return list of fields and their descriptions/options
public static function getFields() { return self::$fields; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getListFields();", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "public function getFieldsList(){\n return $this->_get(1);\n }", "public function getFields();", "public functio...
[ "0.80122834", "0.79005677", "0.79005677", "0.79005677", "0.79005677", "0.79005677", "0.7887434", "0.7864652", "0.7864652", "0.7864652", "0.7864652", "0.7864652", "0.7864652", "0.7829832", "0.7774427", "0.77306986", "0.77306986", "0.77306986", "0.7676392", "0.76489675", "0.756...
0.0
-1
$area = ['area' => Area::lists('nombre','id')];
public function create() { return \View::make('cdp/new_cdp'/*,$area*/); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function area()\n {\n return $this->belongsTo('App\\Models\\Area', 'area_id', 'id');\n }", "public function area() {\n $area = Area::pluck('description', 'id');\n\n // Return area\n echo json_encode($area);\n }", "public function Tarea()\n {\n return $this->hasMa...
[ "0.6637162", "0.65577596", "0.64578867", "0.64275897", "0.63709915", "0.6361617", "0.6304897", "0.62886757", "0.62538403", "0.62538403", "0.60980946", "0.60748583", "0.60354066", "0.6017104", "0.59778106", "0.5966224", "0.59030604", "0.5901392", "0.5900677", "0.58889014", "0....
0.0
-1
Create a new exception instance.
public function __construct($validation, $response = null) { parent::__construct('The given data was invalid.'); $this->validation = $validation; $this->response = $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function makeException()\n {\n $this->thrownException = ResponseException::create($this);\n }", "public function create()\n {\n throw new Exception('Not yet implemented');\n }", "public static function makeException($message = \"\", $code = 0, $previous = NULL) {\n $trac...
[ "0.70328814", "0.6948437", "0.6474613", "0.63535994", "0.6143062", "0.6053798", "0.6031357", "0.5999044", "0.59871596", "0.59513366", "0.5930377", "0.59061944", "0.5893656", "0.58490723", "0.58267224", "0.5820033", "0.58135116", "0.57601756", "0.57563764", "0.573397", "0.5708...
0.0
-1
Get all of the validation error messages.
public function errors() { return $this->validation->messages()->messages(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValidationMessages();", "protected function validationErrorMessages()\n {\n return [];\n }", "protected function validationErrorMessages()\n {\n return [];\n }", "public function getErrorMessages() {}", "public function getValidationErrorMessages() {}", "publi...
[ "0.8462841", "0.8401337", "0.8401337", "0.8325618", "0.8279654", "0.82191825", "0.8131191", "0.80997646", "0.80711967", "0.8062478", "0.80487376", "0.80277896", "0.8006037", "0.7972693", "0.7965387", "0.7954231", "0.7930176", "0.7926157", "0.792453", "0.7908467", "0.7879117",...
0.80184394
12
Set the HTTP status code to be used for the response.
public function status($status) { $this->status = $status; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setStatusCode($code)\r\n {\r\n http_response_code($code);\r\n }", "function setStatusCode($code);", "protected function setHTTPstatus($code)\n {\n $realCode = Response::$statusTexts;\n\n if (isset($realCode[$code])) {\n $this->HTTPstatus = $code;\n ...
[ "0.85335654", "0.836792", "0.82445693", "0.82313687", "0.8196753", "0.8183882", "0.81658024", "0.8160293", "0.80143756", "0.79786605", "0.79654694", "0.795734", "0.7955241", "0.7945231", "0.7920958", "0.7907239", "0.78440416", "0.78156865", "0.78138447", "0.7798765", "0.77906...
0.0
-1
Set the URL to redirect to on a validation error.
public function redirectTo($url) { $this->redirectTo = $url; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setErrorUrl($val)\n {\n $this->_propDict[\"errorUrl\"] = $val;\n return $this;\n }", "public function redirectBackWithErrors($validator);", "public function getRedirectToFormOnValidationError()\n {\n return $this->redirectToFormOnValidationError;\n }", "public...
[ "0.6954889", "0.68955415", "0.6732466", "0.66135854", "0.6600891", "0.646445", "0.62752587", "0.6222175", "0.61953205", "0.61849195", "0.6177951", "0.6142614", "0.6136702", "0.6130507", "0.6129488", "0.6095145", "0.60922813", "0.60456705", "0.6026349", "0.60113174", "0.600141...
0.0
-1
Get the underlying response instance.
public function getResponse() { return $this->response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getResponse()\n {\n if (is_null($this->_response)) {\n $this->_response = new Response();\n }\n return $this->_response;\n }", "protected function _getResponse() {\n\t\treturn new Response;\n\t}", "public function &getResponse() : ResponseInterface\n {\n...
[ "0.7851141", "0.7808749", "0.7805127", "0.78039885", "0.7633257", "0.7628721", "0.7601387", "0.7593149", "0.7553586", "0.75289524", "0.75289524", "0.75289524", "0.7505279", "0.7505279", "0.7505279", "0.7505279", "0.7505279", "0.7505279", "0.7505279", "0.7505279", "0.7505279",...
0.0
-1
Assert that a value is a integer
public static function isInteger($value, $min = null, $max = null) { if (!is_int($value)) { throw new \InvalidArgumentException("Not an integer:" . json_encode($value)); } if ($min !== null) { if (!is_int($min)) { throw new \InvalidArgumentException("Parameter 'min' is not an int: " . json_encode($min)); } if ($value < $min) { throw new \InvalidArgumentException("Integer smaller than '$min' : $value"); } } if ($max !== null) { if (!is_int($max)) { throw new \InvalidArgumentException("Parameter 'max' is not an int: " . json_encode($max)); } if ($value > $max) { throw new \InvalidArgumentException("Integer greater than '$max' : $value"); } } return $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function o_isInt($value) {\n\t\t\treturn Obj::singleton()->isInt($value);\n\t\t}", "public function testInteger()\n {\n // Generate integer data.\n $data = $this->getData('integer', $this::INT_BYTES);\n\n // Integer data should all be native PHP integer type.\n $this->assertContainsOnly('integer', $...
[ "0.76404744", "0.73373735", "0.72822654", "0.72496456", "0.72393894", "0.7191699", "0.717144", "0.7157355", "0.7152943", "0.7133855", "0.71289515", "0.697651", "0.6931286", "0.6880131", "0.68589467", "0.685552", "0.6839575", "0.6831767", "0.679716", "0.6782992", "0.67142475",...
0.58624303
85
Assert that a value is a float
public static function isFloat($value, $min = null, $max = null) { if (!is_float($value)) { throw new \InvalidArgumentException("Not an float:" . json_encode($value)); } if ($min !== null) { if (!(is_int($min) || is_float($min))) { throw new \InvalidArgumentException("Parameter 'min' is not an int or float: " . json_encode($min)); } if ($value < $min) { throw new \InvalidArgumentException("Float smaller than '$min' : $value"); } } if ($max !== null) { if (!(is_int($max) || is_float($max))) { throw new \InvalidArgumentException("Parameter 'max' is not an int or float : " . json_encode($max)); } if ($value > $max) { throw new \InvalidArgumentException("Float greater than '$max' : $value"); } } return $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function aFloat($value)\n {\n return (is_float($value))?:false;\n }", "function o_isFloat($value) {\n\t\t\treturn Obj::singleton()->isFloat($value);\n\t\t}", "public static function assertIsFloat( $actual, $message = '' ) {\n\t\tstatic::assertInternalType( 'float', $actual, $message ...
[ "0.80622", "0.79303616", "0.7676855", "0.76667655", "0.76324576", "0.76309997", "0.760839", "0.7608327", "0.7578361", "0.75453335", "0.74983776", "0.7390214", "0.7355064", "0.7349988", "0.733766", "0.7324791", "0.7294238", "0.72372735", "0.72193015", "0.7198567", "0.710279", ...
0.6743706
31
Determine if the user is authorized to make this request.
public function authorize() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }"...
[ "0.8401071", "0.8377486", "0.8377486", "0.8344406", "0.8253731", "0.824795", "0.8213121", "0.8146598", "0.81115526", "0.8083369", "0.7991986", "0.79907674", "0.79836637", "0.79604936", "0.79516214", "0.79494005", "0.79265946", "0.7915068", "0.79001635", "0.7894822", "0.789145...
0.0
-1
Get the validation rules that apply to the request.
public function rules() { return [ 'nama' => 'required|string', 'email' => 'required|unique:companies,email', 'website' => 'required', 'alamat' => 'required', 'logo' => 'required|mimes:png|dimensions:min_width=100,min_height=200|max:2000', ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the sche...
[ "0.8342703", "0.80143493", "0.7937251", "0.79264987", "0.79233825", "0.79048395", "0.78603816", "0.7790699", "0.77842164", "0.77628785", "0.7737272", "0.7733618", "0.7710535", "0.7691693", "0.76849866", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.76830...
0.0
-1
Returns a flatten collection of existing Registry traps' data items from top to bottom. Bubbling used (if any key has null value then if it is an existing key with the same name in one of the lower levels, lower leveled value WILL overwrites the higher leveled null value if a key has not null value in the higher level then use that value in the result for that key instead).
public function &__invoke() { $result = new stdClass(); Adhoc::eachTrap('Registry', function ($trap) use (&$result) { $data =& $trap->GetList(); foreach ($data as $k=>$v) { if (!isset($result->$k) and isset($v)) { $result->$k = $v; } } } ); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFlattenItems()\n {\n return $this->items()->active()->where('is_active', 1)->defaultOrder()->get()->toFlatTree();\n }", "public function flatten()\n {\n $output = [];\n foreach (I($this->hash) as $value) {\n $array = __PRIVATE__::getArrayFrom($value);\n $output[] ...
[ "0.57027346", "0.5575795", "0.53862685", "0.5378057", "0.53104943", "0.5206815", "0.51706266", "0.51706266", "0.51179093", "0.51052564", "0.51052564", "0.51052564", "0.50791794", "0.49956474", "0.49617583", "0.49398476", "0.49003732", "0.4877262", "0.48716614", "0.48472396", ...
0.0
-1
TODO: sql: refactor: move logic to controller
public function save(array $data): mixed { $fields = $this->db->list_fields($this->tableName); foreach ($fields as $field) { if (isset($data[$field])) { $this->db->set($field, $data[$field]); } } if (! isset($data['id'])) { $return = $this->db->insert($this->tableName); } else { if (is_array($this->primaryKey)) { $ids = explode(".", $data['id']); foreach ($this->primaryKey as $idx => $key) { $this->db->where("{$this->tableName}.{$key}", $ids[$idx]); } } else { $this->db->where("{$this->tableName}.{$this->primaryKey}", $data['id']); } $return = $this->db->update($this->tableName); } return $return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function query();", "function get_sql_crud() {\n try {\n $app = Slim\\Slim::getInstance();\n $table = $app->request->params('table_name');\n $model = $app->request->params('model');\n $ck_sql_alias = $app->request->params('ck_sql_alias');\n\n $gii = new easyu...
[ "0.6210525", "0.61157763", "0.6026694", "0.5985294", "0.58402675", "0.58402675", "0.58164304", "0.58164304", "0.58164304", "0.579439", "0.5791223", "0.5755574", "0.5755574", "0.5755574", "0.5746844", "0.56777984", "0.55644524", "0.5562151", "0.5552568", "0.5544328", "0.554432...
0.0
-1
Perform the configured migrations
public function execute(string $setName, TablesList $tableCollection, ViewsList $viewCollection): void { foreach ($tableCollection->getTables() as $table => $sampler) { try { $this->ensureEmptyTargetTable($table, $this->sourceConnection, $this->destConnection); $sampler->setTableName($table); $sampler->setSourceConnection($this->sourceConnection); $sampler->setDestConnection($this->destConnection); $rows = $sampler->execute(); $this->logger->info("$setName: migrated '$table' with '" . $sampler->getName() . "': $rows rows"); } catch (\Exception $e) { $this->logger->error( "$setName: failed to migrate '$table' with '" . $sampler->getName() . "': " . $e->getMessage() ); throw $e; } } foreach ($viewCollection->getViews() as $view) { $this->migrateView($view, $setName); } $this->migrateTableTriggers($setName, $tableCollection); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function migrate() {}", "public function migrate()\n {\n /**\n * @var $migrator Migrator\n */\n $migrator = $this->app->make('migrator');\n\n /**\n * @var $migratonRepository DatabaseMigrationRepository\n */\n $migratonRepository = $this->ap...
[ "0.7994496", "0.77984357", "0.77131706", "0.7632165", "0.75700283", "0.7548098", "0.7534535", "0.7510703", "0.747718", "0.7393093", "0.73656654", "0.73245156", "0.73185927", "0.72776496", "0.7274961", "0.72470915", "0.72424245", "0.72185016", "0.71977055", "0.71973526", "0.71...
0.0
-1
Ensure that the specified table is present in the destination DB as an empty copy of the source
private function ensureEmptyTargetTable($table, Connection $sourceConnection, Connection $destConnection) { // SchemaManager doesn't do enums! $destConnection->exec('DROP TABLE IF EXISTS ' . $sourceConnection->quoteIdentifier($table)); $driverName = $sourceConnection->getDriver()->getName(); if ($driverName === 'pdo_mysql') { $createSqlRow = $sourceConnection->query('SHOW CREATE TABLE ' . $sourceConnection->quoteIdentifier($table)) ->fetch(\PDO::FETCH_ASSOC); $createSql = $createSqlRow['Create Table']; } elseif ($driverName === 'pdo_sqlite') { $schemaSql = 'SELECT sql FROM sqlite_master WHERE type="table" AND tbl_name=' . $sourceConnection->quoteIdentifier($table); $createSql = $sourceConnection->query($schemaSql)->fetchColumn(); } else { throw new \RuntimeException(__METHOD__ . " not implemented for $driverName yet"); } $destConnection->exec($createSql); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function empty_table($table = '')\n\t{\n\t\tif ($table === '')\n\t\t{\n\t\t\tif ( ! isset($this->qb_from[0]))\n\t\t\t{\n\t\t\t\treturn ($this->db_debug) ? $this->display_error('db_must_set_table') : FALSE;\n\t\t\t}\n\n\t\t\t$table = $this->qb_from[0];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$table = $this->protect_i...
[ "0.5905646", "0.5847931", "0.58424616", "0.57968694", "0.56508213", "0.56473243", "0.5598984", "0.55865467", "0.5556654", "0.5514695", "0.5490318", "0.5481813", "0.540932", "0.54080635", "0.54080635", "0.5397256", "0.5388375", "0.5372643", "0.53482544", "0.5347975", "0.534673...
0.7553517
0
Ensure that all table triggers from source are recreated in the destination
private function migrateTableTriggers(string $setName, TablesList $tableCollection): void { foreach ($tableCollection->getTables() as $table => $sampler) { try { $triggerSql = $this->generateTableTriggerSql($table, $this->sourceConnection); foreach ($triggerSql as $sql) { $this->destConnection->exec($sql); } if (count($triggerSql)) { $this->logger->info("$setName: Migrated " . count($triggerSql) . " trigger(s) on $table"); } } catch (\Exception $e) { $this->logger->error( "$setName: failed to migrate '$table' triggers with '" . $sampler->getName() . "': " . $e->getMessage() ); throw $e; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function ensureTables() {\n if (!$this->ensured) {\n if (!$this->connection->schema()->tableExists($this->mapTable)) {\n // Generate appropriate schema info for the map and message tables,\n // and map from the source field names to the map/msg field names\n $count = 1;\n ...
[ "0.6208775", "0.5964488", "0.5728385", "0.5688589", "0.5612853", "0.56117207", "0.54628456", "0.53506875", "0.5331613", "0.53299767", "0.5300898", "0.52745456", "0.5258984", "0.52038085", "0.51554346", "0.5146938", "0.5128618", "0.51167244", "0.50767577", "0.50280434", "0.501...
0.588249
2
Regenerate the SQL to create any triggers from the table
private function generateTableTriggerSql($table, Connection $dbConnection) { $driverName = $dbConnection->getDriver()->getName(); $triggerSql = []; if ($driverName === 'pdo_mysql') { $triggers = $dbConnection->fetchAll('SHOW TRIGGERS WHERE `Table`=' . $dbConnection->quote($table)); if ($triggers && count($triggers) > 0) { foreach ($triggers as $trigger) { $triggerSql[] = 'CREATE TRIGGER ' . $trigger['Trigger'] . ' ' . $trigger['Timing'] . ' ' . $trigger['Event'] . ' ON ' . $dbConnection->quoteIdentifier($trigger['Table']) . ' FOR EACH ROW ' . PHP_EOL . $trigger['Statement'] . '; '; } } } elseif ($driverName === 'pdo_sqlite') { $schemaSql = "select sql from sqlite_master where type = 'trigger' AND tbl_name=" . $dbConnection->quote($table); $triggers = $dbConnection->fetchAll($schemaSql); if ($triggers && count($triggers) > 0) { foreach ($triggers as $trigger) { $triggerSql[] = $trigger['sql']; } } } else { throw new \RuntimeException(__METHOD__ . " not implemented for $driverName yet"); } return $triggerSql; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateCreateTriggerSQL()\n{\n\t$updateSQL = '';\n\t$passValueSQL = '';\n\tforeach($this->ModuleFields as $vName => $value){\n if(!is_object($value)){\n print_r($this->ModuleFields);\n die(\"m. _generateCreateTrigger: Field $vName is not a valid ModuleField.\");\n } el...
[ "0.6392817", "0.6369824", "0.61431664", "0.59306437", "0.5834529", "0.5744326", "0.5735135", "0.56830174", "0.5567802", "0.5501619", "0.5479135", "0.54452044", "0.5441543", "0.5427446", "0.5386488", "0.53601205", "0.5355811", "0.5352981", "0.5338086", "0.5325748", "0.52895874...
0.5957945
3
Migrate a view from source to dest DB
protected function migrateView(string $view, string $setName): void { $sourceConnection = $this->sourceConnection; $destConnection = $this->destConnection; $destConnection->exec('DROP VIEW IF EXISTS ' . $sourceConnection->quoteIdentifier($view)); $driverName = $sourceConnection->getDriver()->getName(); if ($driverName === 'pdo_mysql') { $createSqlRow = $sourceConnection->query('SHOW CREATE VIEW ' . $sourceConnection->quoteIdentifier($view)) ->fetch(\PDO::FETCH_ASSOC); $createSql = $createSqlRow['Create View']; $currentDestUser = $destConnection->fetchColumn('SELECT CURRENT_USER()'); if ($currentDestUser) { //Because MySQL. SELECT CURRENT_USER() returns an unescaped user $currentDestUser = implode('@', array_map(function ($p) use ($destConnection) { return $destConnection->getDatabasePlatform()->quoteSingleIdentifier($p); }, explode('@', $currentDestUser))); $createSql = preg_replace('/\bDEFINER=`[^`]+`@`[^`]+`(?=\s)/', "DEFINER=$currentDestUser", $createSql); } } elseif ($driverName === 'pdo_sqlite') { $schemaSql = 'SELECT SQL FROM sqlite_master WHERE NAME=' . $sourceConnection->quoteIdentifier($view); $createSql = $sourceConnection->query($schemaSql)->fetchColumn(); } else { throw new \RuntimeException(__METHOD__ . " not implemented for $driverName yet"); } $destConnection->exec($createSql); $this->logger->info("$setName: migrated view '$view'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function renameView($from, $to)\n {\n $view = $this->connection->selectOne(\n \"select * from sqlite_master where type = 'view' and name = ?\",\n [$this->connection->getTablePrefix().$from]\n );\n\n $this->dropView($from);\n\n $query = Str::replaceFirst(\...
[ "0.60368055", "0.6000249", "0.57004255", "0.5679126", "0.563226", "0.5538272", "0.55204725", "0.5427179", "0.5393425", "0.5355451", "0.5352642", "0.53463316", "0.5085552", "0.5066102", "0.5056065", "0.50042933", "0.49675956", "0.4952908", "0.49258593", "0.48722503", "0.486668...
0.6358101
0
Le asigna la tarea enviada al userId en bonita
public function tomarTarea(){ $id = $this->input->post('id'); $rsp = $this->bpm->setUsuario($id, userId()); $rsp['status'] ? $rsp['user_id'] = userId() : ''; echo json_encode($rsp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setUserId($userId);", "public function setUserId($userId) {\n $this->userId = $userId;\n }", "protected function getUserId() {}", "protected function getUserId() {}", "function setUserId($userId) {\n\t\treturn $this->setData('userId', $userId);\n\t}", "function setUserId($userId)\n ...
[ "0.685299", "0.66359013", "0.6614994", "0.6614994", "0.65699494", "0.6549939", "0.6530877", "0.652304", "0.6479834", "0.6451907", "0.6401829", "0.6401829", "0.63743633", "0.6358955", "0.6298803", "0.62905884", "0.6288275", "0.6238404", "0.61651033", "0.61651033", "0.61651033"...
0.6806322
1
Obtener Infomracion de Tarea
public function cerrarTarea($taskId) { $tarea = $this->Procesos->mapeoTarea($this->bpm->getTarea($taskId)['data']); //Formulario desde la Vista $form = $this->input->post(); //Mapeo de Contrato $contrato = $this->getContrato($tarea, $form); //Cerrar Tarea $rsp = $this->bpm->cerrarTarea($taskId, $contrato); echo json_encode($rsp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getArea(){}", "abstract protected function getArea();", "function get_duo_areas() {\n \t\n }", "public function getArea()\n {\n return $this->area;\n }", "public function getArea()\n {\n return $this->area;\n }", "public function getArea()\n {\n return $...
[ "0.74729306", "0.7189956", "0.66263884", "0.6589897", "0.6589897", "0.6589897", "0.6308647", "0.6303405", "0.6299158", "0.6218957", "0.6216465", "0.6211775", "0.61400783", "0.6103693", "0.6096393", "0.6058221", "0.60245895", "0.60046476", "0.5987118", "0.5968363", "0.58904415...
0.0
-1
Validate and update the given user's profile information.
public function update($user, array $input) { Validator::make($input, [ 'phone' => ['required', 'numeric', 'digits_between:1,15'], 'address' => ['required', 'string'], 'city' => ['required', 'string'], 'country' => ['required', 'string'], ])->validate(); $user->forceFill([ 'phone' => $input['phone'], 'address' => $input['address'], 'city' => $input['city'], 'country' => $input['country'], ])->save(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function api_entry_setprofile() {\n parent::validateParams(array('user'));\n\n $user = $this->Mdl_Users->get($_POST[\"user\"]);\n\n if ($user == null)\n parent::returnWithErr(\"User id is not valid.\");\n\n $arg = $this->safeArray(array('fullname', 'avatar', 'church', 'city', 'province', 'b...
[ "0.7989228", "0.77397007", "0.7591132", "0.7435734", "0.7418118", "0.7357499", "0.72397995", "0.7197651", "0.7185962", "0.7153487", "0.709571", "0.70422924", "0.7036621", "0.6997763", "0.6959068", "0.69059414", "0.6905044", "0.6888269", "0.6879857", "0.6842498", "0.68406165",...
0.0
-1
Possible file types: txt, pdf Possible document_query status: review, agreed, tiebreak, solved
public function judgments() { return $this->hasMany(Judgment::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_file_type($source)\n{\n $file_info = check_mime_type($source);\n\n switch ($file_info) {\n case 'application/pdf':\n return true;\n break;\n\n case 'application/msword':\n return true;\n break;\n\n case 'application/rtf':\n ...
[ "0.6634816", "0.6476062", "0.6333395", "0.63221014", "0.6274313", "0.6269018", "0.6197613", "0.61707574", "0.60676694", "0.6043531", "0.6015121", "0.6004839", "0.60003906", "0.5984214", "0.59627056", "0.59413475", "0.592991", "0.5919376", "0.5905667", "0.59018683", "0.5899051...
0.0
-1
Status of the documentquery pair
public function statusByQueryPair($queryId) { foreach ($this->queries as $query) if($query->id == $queryId) return ucfirst($query->pivot->status); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function status(): mixed\n\t{\n\t\treturn self::$query->status;\n\t}", "public function status();", "public function status();", "protected function getReferenceIndexStatus() {}", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public ...
[ "0.6192141", "0.57779527", "0.57779527", "0.5744369", "0.56586426", "0.56586426", "0.56586426", "0.56586426", "0.56586426", "0.56586426", "0.56586426", "0.56586426", "0.56586426", "0.56586426", "0.5647641", "0.5600128", "0.5550364", "0.54632735", "0.54632735", "0.5452703", "0...
0.0
-1
Calculate Total of OrderItem
public function getTotal() { return $this->getAmount() * $this->getPrice(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function calculateOrderTotal($items)\n {\n $total = 0;\n foreach ($items as $key => $item) {\n $total += $item['quoted_price'];\n }\n return $total;\n }", "public function itemTotal(): float;", "public function getTotal()\n {\n return $this->service...
[ "0.7544279", "0.744409", "0.73381084", "0.7333466", "0.7150177", "0.7108031", "0.7074462", "0.70557106", "0.6990477", "0.69810516", "0.69407475", "0.685851", "0.6846683", "0.68316746", "0.68219024", "0.67971474", "0.6762665", "0.6759001", "0.6746418", "0.67287326", "0.6724299...
0.6584413
33
Get Order for OrderItem
public function getOrder() { $parent = $this->getParent(); do { if ($parent instanceof CoreShopOrder) { return $parent; } $parent = $parent->getParent(); } while ($parent != null); return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function orderItem(): OrderItem\n {\n return $this->order_item;\n }", "protected function getOrderItem()\n\t{\n\t\t$search = $this->object->createSearch();\n\n\t\t$expr = [];\n\t\t$expr[] = $search->compare( '==', 'order.base.rebate', 14.50 );\n\t\t$expr[] = $search->compare( '==', 'order.bas...
[ "0.81829226", "0.7612418", "0.7026369", "0.6917325", "0.6857079", "0.68304247", "0.67461914", "0.67441154", "0.6713446", "0.66755724", "0.66699594", "0.6651202", "0.66321176", "0.66321176", "0.6598792", "0.6555995", "0.6555995", "0.6555995", "0.6555995", "0.6555995", "0.65559...
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() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245...
0.0
-1
Show the form for editing the specified resource.
public function edit(Request $request) { $request->validate([ 'background' => 'mimes:jpeg,bmp,png' // Only allow .jpg, .bmp and .png file types. ]); $user = User::find($request->id); if($request->name != ""){ $user->name = $request->name; } if($request->email != ""){ $user->email = $request->email; } if($request->password != ""){ $user->password = Hash::make($request->password); } if($request->background != ""){ $imgName = time().'.'.$request->background->extension(); $request->background->move(public_path('images/background'), $imgName); $image_path = public_path('images/background/' . $user->background); if(file_exists($image_path)){ File::delete($image_path); } $user->background = $imgName; } $user->save(); return redirect('update'); }
{ "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
Get height If no "height" value has been set, this method will set and return a default "height" value, if any such value is available
public function getHeight() : ?float ;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final public function get_height()\n {\n return $this->height;\n }", "public function getHeight()\n {\n if (array_key_exists(\"height\", $this->_propDict)) {\n return $this->_propDict[\"height\"];\n } else {\n return null;\n }\n }", "public function...
[ "0.8027314", "0.79231095", "0.7860998", "0.7807732", "0.7713141", "0.7666182", "0.7649829", "0.7649184", "0.7624303", "0.7624303", "0.7624303", "0.7624303", "0.7624303", "0.7624303", "0.7624303", "0.7624303", "0.7624303", "0.7624303", "0.76231384", "0.7594182", "0.7515678", ...
0.703083
58
Check if "height" has been set
public function hasHeight() : bool;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasHeight()\n {\n return $this->height !== null;\n }", "public function hasImageHeight()\n {\n return $this->image_height !== null;\n }", "public function isAutoHeight() {\n\t\tif ($this->_height==0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}"...
[ "0.79277056", "0.7188172", "0.7042197", "0.69540477", "0.69267553", "0.6717599", "0.67155147", "0.67155147", "0.6697209", "0.6588197", "0.6493271", "0.6438556", "0.6433856", "0.6419823", "0.6398155", "0.6343338", "0.63297224", "0.62741965", "0.62739795", "0.62729853", "0.6272...
0.7917462
1
Get a default "height" value, if any is available
public function getDefaultHeight() : ?float;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHeight()\n {\n if (array_key_exists(\"height\", $this->_propDict)) {\n return $this->_propDict[\"height\"];\n } else {\n return null;\n }\n }", "public function testDefaultHeight()\n {\n $form = $this->factory->create('ckeditor');\n ...
[ "0.7458024", "0.71031207", "0.7059774", "0.69578683", "0.6941431", "0.69215465", "0.69151694", "0.68585867", "0.6852155", "0.6851212", "0.68489146", "0.68489146", "0.6848284", "0.68094987", "0.6799212", "0.6799121", "0.6799121", "0.6799121", "0.6799121", "0.6799121", "0.67986...
0.83512485
0
Base constructor for ACL, make acl_user table if exists
public function __construct(array $params = []) { $this->getConnect(); if (!empty($params['groupTable'])) { $this->groupTable = $params['groupTable']; } if (!$this->conn->tableExists('acl_user')) { $this->conn->createTable('acl_user', [ '`id` int(10) unsigned NOT NULL AUTO_INCREMENT', '`user` int(11) unsigned NOT NULL', '`role` int(11) unsigned DEFAULT NULL', '`perm` int(11) unsigned DEFAULT NULL', 'PRIMARY KEY (`id`)' ], 'ENGINE=MyISAM DEFAULT CHARSET=utf8'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n {\n parent::__construct();\n\n $this->setTable(Auth::table('role-user', 'role_user', false));\n }", "public function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t$this->set_table('users');\n\t}", "public function __construct() {\n parent::__co...
[ "0.72143686", "0.69024247", "0.67649955", "0.6761334", "0.6641306", "0.66311324", "0.6613149", "0.6567813", "0.6566103", "0.6546025", "0.6545018", "0.65067434", "0.6463405", "0.6455936", "0.6453794", "0.6449627", "0.64205694", "0.6415868", "0.6403942", "0.6382757", "0.6358371...
0.6976669
1
Get current connection from registry
public function getConnect() { $this->conn = Registry::get('db'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_current_connection()\n {\n }", "static private function connection($name) { return self::$connections[$name]['connection']; }", "public function getConnection()\n\t{\n\t\treturn static::$instances[$this->_instance];\n\t}", "function getConnection() {\n\t\tself::createConnect...
[ "0.734824", "0.70336175", "0.69898206", "0.69358647", "0.67996067", "0.67443836", "0.6742806", "0.67117923", "0.6683121", "0.6678", "0.6678", "0.66763365", "0.6647009", "0.66380507", "0.66358525", "0.66316575", "0.6629875", "0.6619804", "0.6615401", "0.6615401", "0.66022086",...
0.63951313
63
Get permissions in role
abstract protected function rolePerms($role);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRolePermissions()\n {\n $headers = ['Ability', 'Role'];\n\n $role_name = $this->argument('needle');\n\n $role = $this->permission->findBy('role_name', $role_name);\n if ($role) {\n $permissions = json_to_array($role->permission);\n\n if (!is_a...
[ "0.82326144", "0.79449064", "0.79074115", "0.78545773", "0.7652475", "0.75733083", "0.74411196", "0.741256", "0.7406412", "0.73088205", "0.72942674", "0.7286569", "0.72841746", "0.72765243", "0.72530854", "0.72427547", "0.72427547", "0.7199471", "0.7181015", "0.71702945", "0....
0.6688388
69
Check user access to permission
abstract public function check($userId, $permission, array $data = []);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkPermissions();", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public f...
[ "0.80375946", "0.8016786", "0.8016786", "0.8016786", "0.8016666", "0.8016666", "0.80160636", "0.80160636", "0.80160636", "0.7974683", "0.7921034", "0.7806652", "0.7800539", "0.77713984", "0.7764612", "0.76828146", "0.76681334", "0.7637066", "0.76100653", "0.7590121", "0.75607...
0.0
-1
Display a listing of the resource.
public function index() { $course = Course::all(); if (!empty($course)) { return view('home', [ "course" => $course, ]); //Esto se puede hacer con compact } return response()->json([ "msg"=> "No existen cursos." ]); }
{ "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() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $course = new Course(); $request->validate([ 'name' => 'required|max:100', 'id_subject' => 'required', ]); $course->name = $request->name; $course->id_subject = $request->id_subject; $course->save(); return redirect('/'); }
{ "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) { $course = Course::find($id); if ($course != NULL) { return response()->json($course); } return "No existe un curso con esa ID."; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245...
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "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) { $course = Course::find($id); if ($course != NULL) { if ($request->name != NULL) { $course->name = $request->name; } if ($request->id_asignatura != NULL) { $course->id_asignatura = $request->id_asignatura; } $course->save(); return response()->json($course); } return "No existe un curso con esa 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) { $course = Course::find($id); if ($course != NULL) { $course->delete(); return response()->json([ "message" => "Se ha borrado el curso", "id" => $id ]); } return "No existe un curso con esa 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
Public Methods ========================================================================= Get a Digital Product by it's ID.
public function getProductById($id, $localeId = null) { return craft()->elements->getElementById($id, 'DigitalProducts_Product', $localeId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProductById(int $id);", "public function getById($id)\n {\n return $this->product->find($id);\n \n }", "public function getProduct( $id ) {\n\t\treturn $this->requester->request('GET', $this->url . '/' . $id);\n\t}", "public function get($id){\n $product=Product:...
[ "0.7940686", "0.7890754", "0.77608174", "0.76664346", "0.7580344", "0.7575147", "0.7509049", "0.7508534", "0.74847496", "0.7434686", "0.7415022", "0.73910695", "0.733186", "0.7330298", "0.73048264", "0.73048264", "0.7252955", "0.72439426", "0.72405875", "0.7236139", "0.722177...
0.6923159
38
Get Products by criteria.
public function getProducts($criteria = []) { if (!$criteria instanceof ElementCriteriaModel) { $criteria = craft()->elements->getCriteria('DigitalProducts_Product', $criteria); } return $criteria->find(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllProducts() {\n $searchCondition .= \"searchCriteria[filter_groups][0][filters][0][field]=category_id&\";\n $searchCondition .= \"searchCriteria[filter_groups][0][filters][0][value]=25&\";\n $searchCondition .= \"searchCriteria[filter_groups][0][filters][0][condition_type]...
[ "0.69840455", "0.6899192", "0.68462396", "0.6755407", "0.64861655", "0.64771706", "0.64566725", "0.64454293", "0.6435958", "0.64082193", "0.6389446", "0.63621557", "0.635936", "0.635936", "0.634835", "0.6339017", "0.6320012", "0.628246", "0.6265285", "0.626525", "0.6254374", ...
0.70282626
0
Specify Model class name
protected function model() { return 'App\Activity\Models\ActivityList'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getModelName()\n {\n if (isset($this->options[\"type\"])) {\n $type = ucfirst($this->options[\"type\"]);\n $class = \"\\\\app\\\\models\\\\feeds\\\\\" . $type;\n if (class_exists($class)) {\n return $class;\n }\n }\n ...
[ "0.768929", "0.76618075", "0.7585344", "0.7583571", "0.7583571", "0.7542252", "0.75075734", "0.74778146", "0.74702877", "0.74578375", "0.74578375", "0.7453601", "0.7453601", "0.7447208", "0.7444998", "0.7435527", "0.74304074", "0.7416409", "0.74128395", "0.74125767", "0.74125...
0.0
-1
1 categoria tiene muchas habilidades.
public function habilidades() { return $this->hasMany('App\Models\Habilidad'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function HM_CategoCuentas()\n {\n }", "public function categoriaInactivos(){\n if($this->nolaboral->V21_M >= 1)\n {\n return 1;\n }\n if($this->nolaboral->V8_M == 1 && $this->nolaboral->V9_M == 1 && $this->nolaboral->V10_M == 1)\n {\n return 2;\n }\n if($this->cara...
[ "0.7115779", "0.64479035", "0.6118651", "0.59649694", "0.58322686", "0.5790375", "0.5771036", "0.56999403", "0.56837493", "0.5669971", "0.564989", "0.5647507", "0.5632058", "0.56242603", "0.55907595", "0.55834526", "0.5582327", "0.5564064", "0.5559757", "0.5559757", "0.555037...
0.5247205
60
Lists all svCfgCalzadaCarril entities.
public function indexAction() { $helpers = $this->get("app.helpers"); $em = $this->getDoctrine()->getManager(); $calzadas = $em->getRepository('JHWEBSeguridadVialBundle:SvCfgCalzadaCarril')->findBy( array('activo' => true) ); $response['data'] = array(); if ($calzadas) { $response = array( 'status' => 'success', 'code' => 200, 'message' => count($calzadas) . " registros encontrados", 'data' => $calzadas, ); } return $helpers->json($response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_all_cajeros()\n { \n $this->parametros = array();\n $this->sp = \"str_consultacajeros\";\n $this->executeSPConsulta();\n\n if (count($this->rows)<=0){\n $this->mensaje=\"No existen niveles economicos en la BD.\";\n array_pop($rol);\n ...
[ "0.63419724", "0.6276612", "0.59976876", "0.59876746", "0.588597", "0.5843726", "0.58398104", "0.57474965", "0.5711451", "0.5697405", "0.55883914", "0.5585797", "0.556537", "0.5531148", "0.551706", "0.5507387", "0.55042535", "0.54948694", "0.54488635", "0.54328007", "0.538134...
0.56851524
10
Creates a form to delete a SvCfgCalzadaCarril entity.
private function createDeleteForm(SvCfgCalzadaCarril $svCfgCalzadaCarril) { return $this->createFormBuilder() ->setAction($this->generateUrl('svcfgcalzadacarril_delete', array('id' => $svCfgCalzadaCarril->getId()))) ->setMethod('DELETE') ->getForm() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createDeleteForm($id,$idcupo)\n {\n\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('liquidaciones_delete', array('id' => $id,'idcupo'=>$idcupo)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete','attr' ...
[ "0.7063467", "0.69667834", "0.67409843", "0.6692823", "0.66592586", "0.6619199", "0.6614296", "0.6583932", "0.6559359", "0.6527039", "0.65194976", "0.6517043", "0.65096676", "0.64998555", "0.6472747", "0.64585733", "0.64558613", "0.64399177", "0.6433952", "0.64223593", "0.641...
0.79635614
0
Initializes the object. This method is called at the end of the constructor. The default implementation will trigger an [[EVENT_INIT]] event. If you override this method, make sure you call the parent implementation at the end to ensure triggering of the event.
public function init() { parent::init(); $this->trigger(self::EVENT_INIT); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function init()\n {\n }", "public function init()\n {\n }", "public function init()\n {\n }", "public function init()\n {\n }", "public function init()\n {\n }", "public function init()\n {\n }", "public function...
[ "0.788238", "0.788238", "0.7879848", "0.7879428", "0.7879428", "0.7879428", "0.7879428", "0.7879428", "0.7879428", "0.7879428", "0.7879428", "0.7879428", "0.7879128", "0.7822284", "0.7822284", "0.7822284", "0.7818641", "0.7797968", "0.7733905", "0.7726127", "0.7726127", "0....
0.87640554
3
Description: Setting query conditions
public function setQuery($db) { /** Create Select */ $query = $db->createSelect(); /** Get where condition */ $where = $db->getQueryBuilder()->build($this); /** Setting query and fquery */ $queryWhere = "*:*"; if(!empty($where) && is_string($where)){ $queryWhere = $where; }elseif(!empty($where) && is_array($where)){ $k = key($where[0]); $v = $where[0][key($where[0])] === '' ? '""' : $where[0][key($where[0])]; $queryWhere = $k.':'.$v; if(count($where)>1){ unset($where[0]); foreach ($where as $key=>$value){ $k = key($value); $v = $value[key($value)] === '' ? '""' : $value[key($value)]; $query->createFilterQuery($k.$key)->setQuery($k.":".$v); } } } $query->setQuery($queryWhere); /** set fields to fetch (this overrides the default setting 'all fields') */ if($this->select !== null){ $query->setFields($this->select); } /** set start and rows param (comparable to SQL limit) using fluent interface */ if(!empty($this->offset)){ if((int)$this->offset < 0){ $this->offset = 0; } $query->setStart($this->offset); } if(!empty($this->limit)){ if((int)$this->limit < 0){ $this->limit = 10; } $query->setRows($this->limit); } /** sort the results by price ascending */ if($this->orderBy !== null){ foreach ($this->orderBy as $key=>$value) { $query->addSort($key, $value == SORT_ASC ? 'ASC' :'DESC'); } } /** Document highlight */ if($this->highlight !== null && !empty($this->highlight['fields'])){ $Highlighting = $query->getHighlighting(); $pre_tags = empty($this->highlight['pre_tags']) ? '<b>' : $this->highlight['pre_tags']; $post_tags = empty($this->highlight['post_tags']) ? '</b>' : $this->highlight['post_tags']; $fields = is_string($this->highlight['fields']) ? explode(',',$this->highlight['fields']) : $this->highlight['fields']; foreach ($fields as $value){ $Highlighting->getField($value)->setSimplePrefix($pre_tags)->setSimplePostfix($post_tags); } } return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setConditions() {\r\n if( count($this->sqlConditions) ) {\r\n $this->sql .= ' WHERE ' . $this->sqlStrConditions;\r\n }\r\n }", "protected function user_where_clause() {}", "public function buildConditionQuery()\n\t\t\t{\n\t\t\t\t$this->sql_condition = ' user_id='....
[ "0.7486974", "0.7363606", "0.71012133", "0.6759942", "0.6757744", "0.66835254", "0.66547596", "0.66043395", "0.65664244", "0.65245503", "0.652172", "0.6514471", "0.65136594", "0.6506201", "0.64573115", "0.63972896", "0.63740057", "0.6361312", "0.63097626", "0.6307017", "0.630...
0.0
-1
Display a listing of the resource.
public function index() { $samples = $this->sampleService->getAll(); return view('samples.index',compact('samples')) ->with('i', (request()->input('page', 1) - 1) * Config::get('constants.paginate')); }
{ "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