query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Set a given configuration value.
public function set($key, $value) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setConfig($key, $value);", "public static function set(string $config, mixed $value) : void{\n self::$configurations[$config] = $value;\n }", "public function setConfig($key, $value)\n {\n Config::set($key, $value);\n }", "public function setValue($value) {\r\n $cf...
[ "0.78356564", "0.77030957", "0.73743796", "0.73653173", "0.7353226", "0.7330176", "0.72916454", "0.727927", "0.727927", "0.727927", "0.727927", "0.727927", "0.727927", "0.727927", "0.727927", "0.727927", "0.727927", "0.727927", "0.7278576", "0.7278576", "0.7277096", "0.7276...
0.0
-1
Get the default value from the settings configuration file, for the given setting name.
private function getDefaultFromConfigFor($name) { list($module, $settingName) = explode('::', $name); return mconfig("$module.settings.$settingName.default", ''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setting($name, $default = null) {\n $settings = get_option(sprintf('%s_settings', __CLASS__), array());\n return isset($settings[$name]) ? $settings[$name] : $default;\n }", "public function getSetting( $name, $default = null );", "protected function getSettingValue($name, $default = null)\n ...
[ "0.78602695", "0.77412957", "0.7638977", "0.76162905", "0.7604542", "0.7297566", "0.7277362", "0.72270334", "0.7216146", "0.72081995", "0.7201563", "0.7175335", "0.7175335", "0.7175335", "0.71704745", "0.7091213", "0.7063575", "0.70430815", "0.70184755", "0.6948736", "0.69242...
0.7748094
1
seed tabel admin dan table role Run the database seeds.
public function run() { Admin::create([ 'nomor_pegawai' => 197201242000031004, 'nama_admin' => "Ruwanda Destory", 'password' => bcrypt("123admin"), 'email' => "ruwanda@gmail.com", 'jenis_kelamin' => 'laki-laki' ]); Admin::create([ 'nomor_pegawai' => 197201242000031003, 'nama_admin' => "Kharisma Muzaki", 'password' => bcrypt("123arip"), 'email' => "kharisma.muzaki@gmail.com", 'jenis_kelamin' => 'laki-laki' ]); Informasi::create([ 'batas_akhir_kembali' => 7, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n $this->call(RoleTableSeeder::class);\n\n \t$user = User::firstOrCreate(['email'=>'admin@admin.com']);\n\t\t$user->password = bcrypt('admin@123');\n\t\t$user->name = 'Admin';\n \tif($user->save()){\n \t\t$role = App\\Model\\Role::where('name','admin')->first();\n \t...
[ "0.80497634", "0.7845445", "0.7841373", "0.7706214", "0.76951647", "0.76903737", "0.76739484", "0.76446104", "0.76097566", "0.7592597", "0.7558178", "0.75455827", "0.7544093", "0.7540631", "0.754021", "0.75360745", "0.7531237", "0.751981", "0.7519691", "0.7492703", "0.7490173...
0.0
-1
Get the instance as an array.
public function toArray() { return $this->attributes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function instanceToArray() : array{\n\n if(!method_exists(self::class,'instance')):\n return [];\n endif;\n\n return self::instance()->toArray();\n }", "public function toArray($instance): array;", "public function getAsArray();", "public function toArray() {\...
[ "0.85852945", "0.8148092", "0.8078163", "0.79248744", "0.7906661", "0.7836803", "0.7836803", "0.7836803", "0.7799238", "0.7780902", "0.7745101", "0.7713653", "0.77060854", "0.7674092", "0.7661095", "0.7654164", "0.7645176", "0.764169", "0.76324755", "0.76228744", "0.7599066",...
0.0
-1
Create a new console command instance.
public function __construct(LoggerInterface $log, TestWorkerService $testWorkerService) { parent::__construct(); $this->log = $log; $this->testWorkerService = $testWorkerService; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }", "st...
[ "0.76418847", "0.6804185", "0.6675569", "0.6648418", "0.65942025", "0.6534516", "0.6495967", "0.6460215", "0.64386505", "0.64364696", "0.6403194", "0.63685274", "0.6367072", "0.6337935", "0.6208018", "0.6188278", "0.6163467", "0.6125702", "0.6079598", "0.60699373", "0.6041215...
0.0
-1
Execute the console command.
public function handle() : void { $startMessage = 'The test:worker has started!'; $this->info($startMessage); $this->log->info($startMessage); try { $this->testWorkerService->handle(); } catch (Exception $exception) { // TODO: Log exception message. } $finishMessage = 'The test:worker has ended!'; $this->info($finishMessage); $this->log->info($finishMessage); return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }", "public function handle()\n {\n //get us the Converter class instance and call the convert() meth...
[ "0.6469962", "0.6463639", "0.64271367", "0.635053", "0.63190264", "0.62747604", "0.6261977", "0.6261908", "0.6235821", "0.62248456", "0.62217945", "0.6214421", "0.6193356", "0.61916095", "0.6183878", "0.6177804", "0.61763877", "0.6172579", "0.61497146", "0.6148907", "0.614841...
0.0
-1
Array of Transaction objects Methods
public function __construct($json) { if (array_key_exists('hash', $json)) { $this->hash = $json['hash']; } if (array_key_exists('ver', $json)) { $this->version = $json['ver']; } if (array_key_exists('prev_block', $json)) { $this->previous_block = $json['prev_block']; } if (array_key_exists('mrkl_root', $json)) { $this->merkle_root = $json['mrkl_root']; } if (array_key_exists('time', $json)) { $this->time = $json['time']; } if (array_key_exists('bits', $json)) { $this->bits = $json['bits']; } if (array_key_exists('fee', $json)) { $this->fee = Conversion::btcInt2Str($json['fee']); } if (array_key_exists('nonce', $json)) { $this->nonce = $json['nonce']; } if (array_key_exists('n_tx', $json)) { $this->n_tx = $json['n_tx']; } if (array_key_exists('size', $json)) { $this->size = $json['size']; } if (array_key_exists('block_index', $json)) { $this->block_index = $json['block_index']; } if (array_key_exists('main_chain', $json)) { $this->main_chain = $json['main_chain']; } if (array_key_exists('height', $json)) { $this->height = $json['height']; } if (array_key_exists('received_time', $json)) { $this->received_time = $json['received_time']; } if (array_key_exists('relayed_by', $json)) { $this->relayed_by = $json['relayed_by']; } if (array_key_exists('tx', $json)) { foreach ($json['tx'] as $tx) { $this->transactions[] = new Transaction($tx); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function getTransactions();", "public function getTransactions();", "public function getTransaction();", "public function transactions()\n {\n return [\n 'default' => self::OP_ALL,\n ];\n }", "public function methods()\n\t{\n\t\techo \"->ProcessTransaction(...
[ "0.71394145", "0.6901334", "0.660995", "0.61500645", "0.6119569", "0.6090956", "0.591045", "0.591045", "0.591045", "0.58893543", "0.5879524", "0.58669424", "0.58462703", "0.5828982", "0.5824653", "0.5824653", "0.57996994", "0.5796878", "0.5757035", "0.57563466", "0.5754586", ...
0.0
-1
Check if Hardware assignment
public function get($id='', $field='', $join=array(), $where="", $groupby="") { //Select Fields if($field!=""){ $this->db->select($field); } //Join if(count($join)>0){ foreach ($join as $key=>$value){ $this->db->join($key, $value, 'left'); } } //Group By if($groupby!=""){ $this->db->group_by($groupby); } //Where if($where!=""){ $this->db->where($where); } if (is_numeric($id)) { $this->db->where($this->table.".".$this->aid, $id); return $this->db->get($this->table)->row(); } return $this->db->get($this->table)->result_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function system_is_uname_registerd($uname)\n{\n\treturn(0);\n}", "function is_wg_assigned($disabled = true) {\n\tglobal $wgg;\n\n\t// Assume that no tunnels are assigned\n\t$is_assigned = false;\n\n\t$if_list = get_configured_interface_list_by_realif($disabled);\n\n\tforeach ($if_list as $realif => $name) {\n\n\...
[ "0.5928868", "0.5841225", "0.5837796", "0.5773438", "0.57469475", "0.5746749", "0.55537736", "0.5542626", "0.5529968", "0.5524299", "0.55162746", "0.5504124", "0.5504124", "0.55014825", "0.5477993", "0.54750514", "0.54750514", "0.54750514", "0.54739535", "0.54559004", "0.5453...
0.0
-1
Add new Hardware assignment shipingslip
public function add($data) { //Database data $data['created'] = date('Y-m-d H:i:s'); $this->db->insert($this->table, $data); $id = $this->db->insert_id(); if($id>0){ //Add ID Prefix $dataId = array(); $dataId['shippingslipnr_prefix'] = idprefix('shippingslip',$id); $this->db->where($this->aid, $id); $this->db->update($this->table, $dataId); //Get Shippingslipnr $rowfield = $this->get($id,'shippingslipnr_prefix'); //Log Activity logActivity('New Hardware Assignment Shipping Slip Added [ID: ' . $id . ', ' . $rowfield->shippingslipnr_prefix . ']'); } return $id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addNewShippingRow(){\n\t\t$map_id = $this->Generic_model->general_fetch_array_return_row('map_attributes_values', array('attribute_id'=>$this->input->post('newRowAttr'), 'value'=>$this->input->post('newRowValue')))->map_id;\n\t\t$details = array(\n\t\t\t'pid' => $this->uri->segment(4),\n\t\t\t'map_...
[ "0.5666218", "0.5459219", "0.53095704", "0.52754194", "0.524658", "0.5170628", "0.50719154", "0.50671273", "0.50511265", "0.5034679", "0.49982426", "0.49715078", "0.49572736", "0.49504286", "0.49025357", "0.48994672", "0.48887312", "0.4881151", "0.4875555", "0.486794", "0.483...
0.5339361
2
Update Hardware assignment shipingslip
public function update($data, $id) { //Database data $this->db->where($this->aid, $id); $this->db->update($this->table, $data); $updateRow = $this->db->affected_rows(); if ($updateRow > 0) { $this->db->query("UPDATE ".$this->table." SET `updated`='".date('Y-m-d H:i:s')."' WHERE ".$this->aid."='".$id."' "); //Get Shippingslipnr $rowfield = $this->get($id,'shippingslipnr_prefix'); //Log Activity logActivity('Hardware Assignment Shipping Slip Updated [ID: ' . $id . ', ' . $rowfield->shippingslipnr_prefix . ']'); } return $id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdatePayslip()\n {\n }", "public function testUpdatePayslipByID()\n {\n }", "function setShipping($ship_key)\n {\n return 4.50;\n }", "public function testUpdateExternalShipment()\n {\n }", "public function updateShippingAddress() {\n Log::debug(\"En...
[ "0.64138865", "0.60086864", "0.5800571", "0.5451079", "0.5349424", "0.52982837", "0.5261741", "0.5158637", "0.5147335", "0.5106114", "0.50660086", "0.50461817", "0.5025727", "0.5020004", "0.5019432", "0.5005952", "0.5004906", "0.50042564", "0.49842533", "0.49742237", "0.49470...
0.0
-1
Sets an attribute enabled/disabled. If the key did not exist before it will be created.
public function setAttribute($scope, $key, $enabled);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function setAttribute($key, $value);", "public function set_attribute($key, $value) {\n\t\t$this->attributes[$key] = $value;\n\t}", "public function setAttribute($key, $value);", "public function setAttribute($key, $value);", "public function setAttribute($key, $value = null);", "public f...
[ "0.6924575", "0.6823728", "0.68034005", "0.68034005", "0.65354806", "0.6435138", "0.641523", "0.63617706", "0.6349097", "0.6324979", "0.63225937", "0.63211936", "0.6284109", "0.6248734", "0.6141958", "0.61410046", "0.6135718", "0.6128029", "0.61217177", "0.60954297", "0.60870...
0.74649954
0
Returns if attribute is enabled/disabled for given scope id and key. If attribute does not exist, returns null
public function getAttribute($scope, $key);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasAttr($key) {\n\t\treturn isset($this->attributes[$key]);\n\t}", "public function getAttribute($key)\n {\n if (array_key_exists($key,$this->_attributes)) {\n return $this->_attributes[$key];\n }\n return false;\n }", "public function hasAttribute($key)\n ...
[ "0.6721473", "0.67041355", "0.6652705", "0.65713227", "0.6560838", "0.63676643", "0.6328466", "0.62692505", "0.6206914", "0.61461496", "0.61198634", "0.61198634", "0.60911244", "0.6074999", "0.6049", "0.60430473", "0.6038135", "0.6025127", "0.6020858", "0.59966713", "0.599099...
0.65894973
3
Formats the IAttributes object to array with the following format: [ 0 => [ "scope" => , "key" => , "enabled" => ], ... ]
public function toArray();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toArray()\n {\n $attributes = $this->getConfiguredAttributes();\n\n $values = [];\n\n foreach (explode(',', $attributes) as $attribute) {\n $values[$attribute] = str_replace(' ','', $attribute);\n }\n\n return $values;\n }", "public function att...
[ "0.71793425", "0.6912989", "0.6877247", "0.6820036", "0.6786243", "0.67437685", "0.67079633", "0.6626189", "0.6626189", "0.6626189", "0.6626189", "0.65812033", "0.6549209", "0.65452754", "0.65264124", "0.65264124", "0.65264124", "0.65264124", "0.6513148", "0.6498137", "0.6498...
0.0
-1
Service add Dynamic Customer Creation select2
public function dynamic_customer_creation(){ $data['results']=$this->Common_model->dynamic_customer_creation(); echo json_encode($data['results']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function select_customer()\n {\n $data = array();\n $customer_id = $this->input->post(\"term\");\n \n if ($this->Customer->account_number_exists($customer_id))\n {\n $customer_id = $this->Customer->customer_id_from_account_number($customer_id);\n }\n \...
[ "0.6893654", "0.6873638", "0.6770677", "0.67223686", "0.6539649", "0.6517119", "0.60488796", "0.601939", "0.5996012", "0.5983533", "0.5965514", "0.59523946", "0.58543545", "0.5828192", "0.5811454", "0.57903695", "0.57416177", "0.5687325", "0.5681393", "0.56808716", "0.5661711...
0.6599904
4
Service add select2 remort data
public function get_service_head(){ $data['results']=$this->Common_model->get_service_head(); echo json_encode($data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSelect2()\n {\n return SelectResource::collection(ProductType::select('id', 'name')->get());\n }", "public function select2(Request $request)\n {\n $params = $request->get('params');\n \n // Quantidade de registros por pagina\n $registros_por_pagina ...
[ "0.64581966", "0.63912207", "0.61190045", "0.6037529", "0.5833598", "0.5830788", "0.5827468", "0.569603", "0.5677159", "0.56547195", "0.5597583", "0.5565237", "0.5561413", "0.5528792", "0.5513869", "0.5510703", "0.5467646", "0.54480964", "0.54339427", "0.540795", "0.5402824",...
0.0
-1
Service add select2:selected event
public function get_service_head_details(){ $data = array(); $data['service_head_id'] = $this->uri->segment(3); $data['service_head_details'] = $this->Service_model->get_service_head_details($data['service_head_id']); echo json_encode($data['service_head_details']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getSelectedValue() {}", "public function Do_select_Example1(){\n\n\t}", "public function getSelected() {}", "public function getSelected() {}", "public function setup_selected() {\n\t}", "function setSelected($selected) {\r\n if ($this->list) {\n if ($selected) {\n ...
[ "0.59931874", "0.5979571", "0.5931057", "0.5931057", "0.58628243", "0.5816154", "0.5783921", "0.57350075", "0.5628611", "0.55875653", "0.5523564", "0.5519339", "0.54643446", "0.5462841", "0.54559994", "0.5414112", "0.5378524", "0.5378524", "0.5377313", "0.53100246", "0.527325...
0.0
-1
Service Add Tax Select Select2 Ajax
public function get_tax_details(){ $data = array(); $data['tax_id'] = $this->uri->segment(3); $data['tax_details'] = $this->Common_model->get_tax_details($data['tax_id']); echo json_encode($data['tax_details']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wp_ajax_inline_save_tax()\n {\n }", "public function partysizeajax()\n\t{\n\t\t$vendor_details = $this->request->input('vendor_id');\n\t\t$array = explode(',', $vendor_details);\n\t\t$type = $array[0];\n\t\t$vendor_id =$array[1];\n\t\t$product_id =$array[2];\n\t\tif($type=='alacarte')\n\t\t{\n ...
[ "0.6103927", "0.6062426", "0.6033842", "0.5823544", "0.5716542", "0.563269", "0.56222457", "0.5621498", "0.5598116", "0.55833", "0.55542725", "0.5493902", "0.54809403", "0.5451682", "0.5415237", "0.54054374", "0.5351639", "0.5349068", "0.5310286", "0.5299545", "0.5295171", ...
0.0
-1
Returns an OpenSearch compatible description file. See also the OpenSearch specifications:
public function opensearchdescription() { // Set the correct content type $this->response->type('application/opensearchdescription+xml'); // and return the default view return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function desc()\n {\n $desc = '\n <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n <OpenSearchDescription xmlns=\"http://a9.com/-/spec/opensearch/1.1/\">\n <ShortName>' . $this->feedTitle . '</ShortName>\n <Description>' . $this->feedDescription . '</Description>\n ...
[ "0.7009367", "0.6651149", "0.5990987", "0.5934186", "0.59188795", "0.5903968", "0.58273673", "0.5809541", "0.5796618", "0.5734626", "0.5734626", "0.57057464", "0.56952995", "0.56952995", "0.5693529", "0.5676883", "0.5652383", "0.56421095", "0.562058", "0.5601571", "0.55593073...
0.6184912
2
Set the content type to json
public function index() { $this->response->type('application/json'); // Search the places $result = $this->searchPlace(); // Set the result to the view $this->set("result", $result); // Finally return the default view return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setJsonContentType()\n {\n Http::setContentType(self::JSON_CONTENT_TYPE);\n }", "public function is_json_content_type()\n {\n }", "function setJSONHTTPContentType(){\n header('Content-Type: application/json');\n header(\"Access-Control-Allow-Origin: *\");\n}", "p...
[ "0.8830249", "0.74590087", "0.70956177", "0.6980614", "0.697152", "0.6926051", "0.6838293", "0.6729743", "0.67156106", "0.66460925", "0.66283035", "0.6532461", "0.6502833", "0.6502833", "0.6502833", "0.6456354", "0.64350575", "0.64209473", "0.6382634", "0.6369292", "0.6349667...
0.0
-1
Set the correct content type
public function rss() { $this->response->type('application/rss+xml'); $result = $this->searchPlace(); $this->set('result', $result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setContentType($val){ return $this->setHeader('Content-Type',$val); }", "function set_content_type($type) {\n $this->response->add_header('Content-Type', $type);\n }", "public function setContentType($content_type) {}", "function http_set_content_type($content_type)\n\t{\n\t\t$this->http_...
[ "0.8475354", "0.8440421", "0.82933956", "0.82826793", "0.8258899", "0.81602883", "0.7976897", "0.7922494", "0.7907722", "0.78864044", "0.7881823", "0.7881823", "0.7856806", "0.78092235", "0.77462906", "0.7737236", "0.7737236", "0.7732657", "0.77121216", "0.7538791", "0.748057...
0.0
-1
Returns search suggestions that can be used in browsers.
public function suggest() { // Set the content type to json $this->response->type('application/json'); $result = $this->searchPlace(); $this->set('result', $result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function suggestions(): array\n {\n return $this->suggestions;\n }", "public function getSuggestions()\n {\n return $this->suggestions;\n }", "public function getSuggestions()\n {\n return $this->suggestions;\n }", "public function getSuggestions()\n {\n ...
[ "0.69796485", "0.69737154", "0.69737154", "0.69737154", "0.6923808", "0.69082624", "0.68799675", "0.6865081", "0.6812632", "0.6794082", "0.6788917", "0.6755853", "0.66657186", "0.6650144", "0.6640172", "0.6437004", "0.6425372", "0.6287", "0.6279701", "0.62373704", "0.6204267"...
0.60466695
27
Dummy member for preventing object be treated as empty.
public static function getInstance( &$instance ) { if ( empty( $instance ) ) { $instance = new self(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function it_can_allow_empty_values_through_constructor()\n {\n $object = new Testee('', Value::CAN_BE_EMPTY);\n $this->assertTrue($object->isEmpty());\n }", "public function it_is_always_empty()\n {\n $object = new Testee(self::TEST_NULL_VALUE, Value::CAN_BE_EMPTY);\n ...
[ "0.7017928", "0.7005978", "0.69416416", "0.6877919", "0.6748357", "0.6716965", "0.6674346", "0.6633825", "0.661044", "0.6563157", "0.6539098", "0.6500786", "0.6477535", "0.64225554", "0.64119065", "0.6338489", "0.63280255", "0.6262077", "0.6258853", "0.62546986", "0.6235695",...
0.0
-1
cascading does not seem to work
public static function onPageDelete($event) { $instance = $event->sender; if(!($instance instanceof Page)) return; $entry = MailingListEntry::find()->where([ 'page_id' => $instance->id, ])->one(); if($entry) $entry->delete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function allowsCascading()\n {\n return false;\n }", "public function allowsCascading()\n {\n return false;\n }", "public function cascadingDeletes() {\n\t\treturn false;\n\t}", "public function deleteCascade() {\n\t\tif (((int)$this->id)==0) {\n\t\t\trequire_once(\"CORE/Luct...
[ "0.6895857", "0.6895857", "0.59640163", "0.55092317", "0.5355706", "0.53550696", "0.5217498", "0.5149214", "0.5145854", "0.5125838", "0.5108894", "0.507462", "0.50211066", "0.50150955", "0.49736354", "0.4971906", "0.4966127", "0.49445024", "0.48966956", "0.48909524", "0.48842...
0.0
-1
testing new complicated relationship
public function courseStudents() { $courseClasses=CourseClasses::where('courses_id',$this->id)->get(); $students = new Collection(); foreach ($courseClasses as $class){ $classStudents=Students::where(['classes_id'=>$class->classes_id,'sections_id'=>$class->sections_id])->get(); $students = $students->merge($classStudents); } return $students; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCreateUnitRelationships()\n {\n }", "public function testGetUnitRelationships()\n {\n }", "public function canPopulateRelationTest()\n {\n $relationTest = new Relation(['test' => 'super']);\n\n $this->assertArrayHasKey('test', $relationTest->getData());\n }",...
[ "0.7177389", "0.6835596", "0.6810091", "0.66729605", "0.6603033", "0.65820336", "0.65249604", "0.6515687", "0.6512036", "0.641951", "0.6416868", "0.63671726", "0.63649905", "0.6357436", "0.6349174", "0.6341093", "0.63381743", "0.63311386", "0.6324106", "0.62961197", "0.629595...
0.0
-1
Methode s'occupant de l'ajout du caisse.
public function ajouterCaisseAction(Request $request) { /* * Nom de l'action en cours */ $nomAction = __FUNCTION__; /* * Description de l'action de l'action en cours */ $descAction = "Ajouter un caisse"; /* * Préparation du message de log */ $this->logMessage .= ' [ ' . $nomAction . ' ] '; /* * Service de gestion des droits */ $loginManager = $this->get('login_manager'); /* * Informations de session */ $sessionData = $this->infosConnecte(); /* * Locale en cours */ $locale = $loginManager->getLocale(); $this->data['locale'] = $locale; /* * On vérifie si l'utilisateur est connecté */ $status = $loginManager->isConnecte($nomAction); if ($status['isConnecte']) { /* * Au cas ou l'utilisateur est connecté on vérifie s'il nest pas innactif. S'il est innactif * on garde en mémoire flash la route actuelle pour effectuer une redirection lors de la prochaine connexion */ if ($status['isInnactif']) { $routeName = $request->get('_route'); $routeParams = $request->get('_route_params'); $this->get('session')->getFlashBag()->add('restoreUrl', $this->generateUrl($routeName, $routeParams)); $this->get('session')->getFlashBag()->add('ina', "Vous avez accusé un long moment d'inactivité"); return $this->redirect($this->generateUrl('app_admin_user_logout')); } /* * Seuls les utilisateurs admins ont le droit d'acceder à cette action */ if (!$status['isUser']) { return $this->redirect($this->generateUrl('app_admin_user_logout')); } } else { return $this->redirect($this->generateUrl('app_admin_user_logout')); } /* * Gestion des droits */ if (!$loginManager->getOrSetActions(Module::MOD_GEST_CAIS, Module::MOD_GEST_CAIS_DESC, $this->getNomClassRun(__CLASS__), $this->description, $nomAction, $descAction, $sessionData['idProfil'])) { $this->logMessage .= ' [ TENTATIVE DE VIOLATION DE DROITS ] '; $this->get('session')->getFlashBag()->add('access', "Vous n'avez pas le droit d'accéder à la liste des abonnés"); return $this->redirect($this->generateUrl('app_admin_user_access_refuse')); } /* * Création du formulaire par rapport a l'entité Caisse */ $unCaisse = new Caisse(); $form = $this->createForm(new CaisseType(), $unCaisse); $this->em = $this->getDoctrine()->getManager(); /* * Declaration des principales methodes Symfony2 pour traiter les informations */ $this->em = $this->getDoctrine()->getManager(); $this->request = $request; $this->session = $this->get('session'); $this->flashMessage = $this->get('session')->getFlashBag(); //Recuperation de la liste des Caisses que Symfony 2 accepte $tableauCaisseSymfony = array(); /* * Donnée à afficher sur le twig * */ $this->data['formuView'] = $form->createView(); $this->data['Caisse'] = $unCaisse; $this->data['locale'] = $locale; if ($this->request->isMethod('POST')) { $form->handleRequest($this->request); /* * Vérifier si les élément du formulaire sont valides * */ //var_dump($form);exit; if ($form->isSubmitted() ) { /* * On cherche si une Caisse existe deja avec le mm nom et a un code */ try { $criteria = array('nomCaisse' => $unCaisse->getNomCaisse()); $ancienCaisse = $this->em->getRepository($this->stockBundle . 'Caisse')->findOneBy($criteria); //$criteriaCode = array('codeCaisse' => $unCaisse->getCodeCaisse()); $ancienCaisseCode = $this->em->getRepository($this->stockBundle . 'Caisse')->findOneBy($criteria); if ($ancienCaisseCode != null) { /* * Un Caisse existe mais est supprimé, on le reactive alors */ if ($ancienCaisseCode->getEtatCaisse() == Types\TypeEtat::SUPPRIME) { $unCaisse->setEtatCaisse(Types\TypeEtat::ACTIF); $unCaisse->setNomCaisse($form->getData()->getNomCaisse()); $this->em->persist($unCaisse); $this->em->flush(); $this->get('session')->getFlashBag()->add('caisse.ajout.success', 'Ajout effectue avec succès'); return $this->redirect($this->generateUrl('admin_caisses')); } else { $this->get('session')->getFlashBag()->add('caisse.ajout.already.exist', 'Le code Caisse ' . $ancienCaisseCode->getCodeCaisse() . ' existe déjà'); } } else { /* * Vérification du libellé du critère */ if ($ancienCaisse != null) { /* * Un Caisse existe mais est supprimé, on le reactive alors */ $this->get('session')->getFlashBag()->add('caisse.ajout.already.exist', 'Le Caisse ' . $ancienCaisse->getNomCaisse() . ' existe déjà'); } else { // $unCaisse->setDateModification(new \DateTime()); $unCaisse->setDatePublication(new \DateTime()); $unCaisse->setEtatCaisse(1); $this->em->persist($unCaisse); $this->em->flush(); $this->flashMessage->add('caisse.ajout.success', 'Ajout effectué avec succès'); return $this->redirect($this->generateUrl('admin_caisses')); } } } catch (\Exception $e) { var_dump($e); exit; } } else { $this->flashMessage->add('caisse.ajout.error', 'Formulaire invalide'); } } return $this->render($this->stockBundle . 'Caisse:ajouterCaisse.html.twig', $this->data, $this->response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function contarInventario(){\n\t}", "function faireCours ()\n {\n // ECHAUFFEMENT\n echo \"(echauffez-vous d'abord)\";\n\n parent::faireCours();\n\n // RANGER LES SKIS\n echo \"(e)tirez-vous...\";\n }", "public function cloture()\n {\n // On prépare la ...
[ "0.611764", "0.607818", "0.6017477", "0.60125786", "0.6002338", "0.5959737", "0.5951714", "0.5950106", "0.5937669", "0.58829105", "0.58829105", "0.5858244", "0.58560175", "0.5793116", "0.5785248", "0.5778397", "0.57691383", "0.5763199", "0.5763199", "0.5745229", "0.5728309", ...
0.0
-1
Methode s'occupant de la modification du caisse.
public function modifierCaisseAction(Request $request, $id) { /* * Nom de l'action en cours */ $nomAction = __FUNCTION__; /* * Description de l'action de l'action en cours */ $descAction = "Modifier un caisse "; /* * Préparation du message de log */ $this->logMessage .= ' [ ' . $nomAction . ' ] '; /* * Service de gestion des droits */ $loginManager = $this->get('login_manager'); /* * Informations de session */ $sessionData = $this->infosConnecte(); /* * Locale en cours */ $locale = $loginManager->getLocale(); $this->data['locale'] = $locale; /* * On vérifie si l'utilisateur est connecté */ $this->flashMessage = $this->get('session')->getFlashBag(); $status = $loginManager->isConnecte($nomAction); if ($status['isConnecte']) { /* * Au cas ou l'utilisateur est connecté on vérifie s'il nest pas innactif. S'il est innactif * on garde en mémoire flash la route actuelle pour effectuer une redirection lors de la prochaine connexion */ if ($status['isInnactif']) { $routeName = $request->get('_route'); $routeParams = $request->get('_route_params'); $this->get('session')->getFlashBag()->add('restoreUrl', $this->generateUrl($routeName, $routeParams)); $this->get('session')->getFlashBag()->add('ina', "Vous avez accusé un long moment d'inactivité"); return $this->redirect($this->generateUrl('app_admin_user_logout')); } /* * Seuls les utilisateurs admins ont le droit d'acceder à cette action */ if (!$status['isUser']) { return $this->redirect($this->generateUrl('app_admin_user_logout')); } } else { return $this->redirect($this->generateUrl('app_admin_user_logout')); } /* * Gestion des droits */ if (!$loginManager->getOrSetActions(Module::MOD_GEST_CAIS, Module::MOD_GEST_CAIS_DESC, $this->getNomClassRun(__CLASS__), $this->description, $nomAction, $descAction, $sessionData['idProfil'])) { $this->logMessage .= ' [ TENTATIVE DE VIOLATION DE DROITS ] '; $this->get('session')->getFlashBag()->add('access', "Vous n'avez pas le droit d'accéder à la liste des abonnés"); return $this->redirect($this->generateUrl('app_admin_user_access_refuse')); } $this->em = $this->getDoctrine()->getManager(); /* * On vérifie si l'utilisateur est connecté */ /* * Création du formulaire par rapport a l'entité Caisse */ $unCaisse = $this->em->getRepository($this->stockBundle . 'Caisse')->find($id); //$ancienCaisseAModif = $unCaisse->getNomCaisse(); $form = $this->createForm(new CaisseType(), $unCaisse); // Vérification de véracité des informations envoyées //var_dump($unCaisse,$id);exit; if ($unCaisse == null) { return $this->redirect($this->generateUrl('admin_caisses')); } // Vérifier si la méthode d'envoie if ($request->isMethod('POST')) { $form->handleRequest($request); /* * Vérifier si les éléments du formulaire sont valides et que le formulaire a ete soumis */ if ($form->isSubmitted()) { try { /* * On cherche si une Caisse existe deja avec le même nom */ $criteria = array('nomCaisse' => $unCaisse->getNomCaisse()); $ancienCaisse = $this->em->getRepository($this->stockBundle . 'Caisse')->findOneBy($criteria); /* * On cherche si une Caisse existe deja avec le même code */ //$unCaisse->setIdAuteur(1); // $criteriaCode = array('codeCaisse' => $unCaisse->getCodeCaisse()); $ancienCaisseCode = $this->em->getRepository($this->stockBundle . 'Caisse')->findBy($criteria); if (count($ancienCaisseCode) > 1) { $this->flashMessage->add('caisse.modifier.already.exist', 'Le code Caisse ' . $ancienCaisseCode[0]->getCodeCaisse() . ' existe déjà'); } else { if ($ancienCaisse != null) { /* * Traitement du cas d'un Caisse qui existe mais est * supprimé, on le reactive alors pour eviter * les doublons dans la base de données */ if ($ancienCaisse->getEtatCaisse() == Types\TypeEtat::SUPPRIME) { /* * Activation du critère supprimé */ $ancienCaisse->getEtatCaisse(Types\TypeEtat::ACTIF); } else { /* * Persistence de l'objet */ $this->em->persist($unCaisse); } } else { $this->em->persist($unCaisse); } /* * Mise a jour des informations dans la base de donnée */ $this->em->flush(); $this->flashMessage->add('caisse.modifier.success', 'Modification effectuées avec succès'); return $this->redirect($this->generateUrl('admin_caisses')); } } catch (\Exception $e) { var_dump($e); exit; } } else { $this->flashMessage->add('caisse.ajout.error', 'Formulaire invalide'); } } /* * Preparation des informations à traiter sur les twig */ $this->data['formuView'] = $form->createView(); $this->data['Caisse'] = $unCaisse; $this->data['locale'] = $locale; $this->data['id'] = $id; return $this->render($this->stockBundle . 'Caisse:modifierCaisse.html.twig', $this->data, $this->response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cloture()\n {\n // On prépare la modification pour enregistrer la fermeture de la mission\n $sql = 'UPDATE `mission`\n SET `mission_statut` = 0\n WHERE `mission_id` = :mission';\n $query = $this->_link->prepare($sql);\n $query->bindParam(...
[ "0.6932414", "0.6850203", "0.6626908", "0.6455587", "0.64120597", "0.62832934", "0.62832934", "0.6280457", "0.6280457", "0.6255667", "0.6186467", "0.61618173", "0.61550385", "0.61440104", "0.61440104", "0.6133841", "0.6126232", "0.61206603", "0.6116494", "0.6108393", "0.61045...
0.0
-1
Methode s'occupant de lister les Caisses.
public function listerCaisseAction(Request $request) { /* * Nom de l'action en cours */ $nomAction = __FUNCTION__; /* * Description de l'action de l'action en cours */ $descAction = "Affichage de la liste des caisses"; /* * Préparation du message de log */ $this->logMessage .= ' [ ' . $nomAction . ' ] '; /* * Service de gestion des droits */ $loginManager = $this->get('login_manager'); /* * Informations de session */ $sessionData = $this->infosConnecte(); /* * Locale en cours */ $locale = $loginManager->getLocale(); $this->data['locale'] = $locale; /* * On vérifie si l'utilisateur est connecté */ $status = $loginManager->isConnecte($nomAction); if ($status['isConnecte']) { /* * Au cas ou l'utilisateur est connecté on vérifie s'il nest pas innactif. S'il est innactif * on garde en mémoire flash la route actuelle pour effectuer une redirection lors de la prochaine connexion */ if ($status['isInnactif']) { $routeName = $request->get('_route'); $routeParams = $request->get('_route_params'); $this->get('session')->getFlashBag()->add('restoreUrl', $this->generateUrl($routeName, $routeParams)); $this->get('session')->getFlashBag()->add('ina', "Vous avez accusé un long moment d'inactivité"); return $this->redirect($this->generateUrl('app_admin_user_logout')); } /* * Seuls les utilisateurs admins ont le droit d'acceder à cette action */ if (!$status['isUser']) { return $this->redirect($this->generateUrl('app_admin_user_logout')); } } else { return $this->redirect($this->generateUrl('app_admin_user_logout')); } /* * Gestion des droits */ if (!$loginManager->getOrSetActions(Module::MOD_GEST_CAIS, Module::MOD_GEST_CAIS_DESC, $this->getNomClassRun(__CLASS__), $this->description, $nomAction, $descAction, $sessionData['idProfil'])) { $this->logMessage .= ' [ TENTATIVE DE VIOLATION DE DROITS ] '; $this->get('session')->getFlashBag()->add('access', "Vous n'avez pas le droit d'accéder à la liste des abonnés"); return $this->redirect($this->generateUrl('app_admin_user_access_refuse')); } try { /* * Récupération des la liste des critères */ $this->em = $this->getDoctrine()->getManager(); $listeCaisse = $this->em->getRepository($this->stockBundle . 'Caisse')->getAllCaisse(); } catch (\Exception $e) { var_dump($e); exit; } /* * Préparation des informations que nous allons traiter sur le twig */ $this->data['listeCaisse'] = $listeCaisse; $this->data['locale'] = $locale; return $this->render($this->stockBundle . 'Caisse:listeCaisse.html.twig', $this->data, $this->response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ListClases(){\n\t\t$nodepal=$this->getMainNode();\n\t\techo(\"Lista de Clases: <br>\");\n\t\tforeach ($this->clases[$nodepal] as $key=>$value) {\n\t\t echo(\"$value<br/>\\n\");\n\t\t}\n\t}", "public function catalogos() \n\t{\n\t}", "public function ListarCajasAbiertas()\n{\n\tself::SetNames();\n\t...
[ "0.6578077", "0.60513246", "0.6038356", "0.60056007", "0.5899916", "0.5834372", "0.5753733", "0.5747204", "0.5742119", "0.5729121", "0.5705741", "0.5699903", "0.56683946", "0.5657339", "0.5657107", "0.560714", "0.5546498", "0.5526693", "0.5502745", "0.5501512", "0.54946846", ...
0.0
-1
Methode pour traiter le libelle du Caisse envoye il permet de remplace les espaces par "_".
public function remplacerEspece($donnee) { $donneNouvelle = str_replace(' ', '_', $donnee); return $donneNouvelle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function limpiar($cadena){\n\t\t$cadena=str_replace(\"_\",\" \",$cadena);//alt + 15\n\t\t$cadena=str_replace(\"|\",\"=\",$cadena);//alt + 10\n\t\treturn $cadena=str_replace(\"*\",\"'\",$cadena);//alt + 16\n\t}", "function espacio_guion($dato) {\n $dato = str_replace(' ', '_', $dato);\n return $dato;\n}", ...
[ "0.67720115", "0.6433756", "0.62887055", "0.6268053", "0.59893703", "0.59275824", "0.5907859", "0.58833253", "0.58596575", "0.58423096", "0.583585", "0.5821197", "0.5816977", "0.5802678", "0.5800643", "0.5783712", "0.57789904", "0.57706285", "0.5770607", "0.5770139", "0.57682...
0.0
-1
Constructs a new document with the given id and optional the given slide
public function __construct($id, $type = '', $title = '', $user = NULL, $creationDate = '', $modificationDate = '', $file = '') { $this->id = $id; $this->type = $type; $this->title = $title; $this->creationDate = $creationDate; $this->modificationDate = $modificationDate; $this->user = $user; $this->file = $file; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create($id)\n\t{\n \t\tif ( ! \\Util::getAccess('Documentos', 'Insert')) return $this->accessFail();\n\t\t\n\t\tif (preg_match('/^[0-9]+-[0-9]+$/', $id)) {\n\t \t$ids = explode('-', $id);\n\t \t\t$documento = new Documento();\n\t\t\t$documento->Obj_Id = $ids[0];\n\t\t\t$documento->Doc_Oper_Id = ...
[ "0.6132929", "0.599929", "0.5950673", "0.5871363", "0.58148056", "0.57492954", "0.5740284", "0.57133937", "0.5700279", "0.5677108", "0.5650213", "0.5641023", "0.5640691", "0.56165814", "0.55759025", "0.55656964", "0.55408275", "0.5539062", "0.55290496", "0.5513129", "0.550660...
0.0
-1
Fetches the meta data from the database
public function getInfoFromDatabase() { $db = \Helper::getDB(); $db->join('users u', 'd.ownerId = u.id', 'LEFT'); $db->where('d.id', $db->escape((int) $this->getId())); // Prevent getting a document with a presentation ID or some other wrong combination if($this->getType() != '') { $db->where('d.type', $db->escape($this->getType())); } $result = $db->getOne('documents d', '*, d.id AS documentId, u.id AS userId'); if($result) { $this->title = $result['title']; $this->type = $result['type']; $this->creationDate = $result['creationDate']; $this->modificationDate = $result['modificationDate']; $this->user = new \Models\User($result['userId'], $result['username'], $result['email'], $result['firstName'], $result['lastName'], $result['lastLogin']); $this->file = $result['file']; } else { throw new \Exception('Document not found', 5); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function metaLoad()\n {\n $this->meta ??= $this?->relations['meta'] ?? $this->meta()->get();\n }", "public function _meta(){\n if(!$this->db->table_exists($this->table_name())):\n throw new OrmExceptions(sprintf(\"The table %s does not exist\", $this->table_name()));\n ...
[ "0.67046165", "0.6544916", "0.6520887", "0.645517", "0.64193815", "0.6365369", "0.6303083", "0.62957865", "0.6290623", "0.6279738", "0.62797046", "0.62797046", "0.6264924", "0.62572736", "0.62217563", "0.62063766", "0.61920446", "0.6151678", "0.6150389", "0.6118548", "0.60836...
0.55659777
78
Adds this document to all groups it is part of
public function getGroupsFromDatabase() { $db = \Helper::getDB(); $db->join('groups g', 'gd.groupId = g.id', 'LEFT'); $db->where('gd.documentId', $db->escape($this->getId())); $groups = $db->get('group_documents gd', NULL, 'g.*'); $this->groups = array(); // Process all groups foreach($groups as $group) { $newGroup = new \Models\Group($group['id'], $group['name']); $this->addGroup($newGroup); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add() {\n $this->set('groups', $this->Group->find('all'));\n if (!empty($this->data)) {\n if ($this->Group->save($this->data)) {\n $this->Session->setFlash('The group has been saved.');\n } else {\n $this->Session->setFlash('Failed saving t...
[ "0.6497236", "0.6166251", "0.5883949", "0.5832255", "0.58283955", "0.5824065", "0.5806883", "0.5737032", "0.5733835", "0.5698694", "0.56066036", "0.56066036", "0.5590885", "0.556829", "0.555961", "0.5550021", "0.5544704", "0.5543992", "0.55393434", "0.5533677", "0.5523322", ...
0.5572155
13
Returns the title from this document
public function getTitle() { return $this->title; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTitle() {\n return $this->document->getTitle();\n }", "public function getDocumentTitle() {\n return $this->document['title'];\n }", "public function getDocTitle()\n {\n return $this->doc_title;\n }", "public function getTitle()\n {\n return $this->getField('T...
[ "0.87342066", "0.8696067", "0.85565233", "0.8123665", "0.80971074", "0.8066467", "0.8033836", "0.8033836", "0.80154985", "0.8003547", "0.80027765", "0.80027765", "0.7996933", "0.79873425", "0.7982609", "0.7979274", "0.7979274", "0.7979274", "0.7979274", "0.7978279", "0.795505...
0.7889446
56
Returns the ID of this document
public function getId() { return $this->id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function id()\n\t{\n\t\t// @todo: _id should not be hard-coded (mongo-specific)\n\t\treturn $this->get('_id');\n\t}", "public function getDocumentId()\n {\n return $this->_documentId;\n }", "public function getDocumentId(): int\r\n {\r\n return $this->document_id;\r\n }", "pu...
[ "0.83645165", "0.82037175", "0.81166905", "0.808072", "0.80532867", "0.80070245", "0.80070245", "0.8005275", "0.78493905", "0.7605856", "0.75508577", "0.74654967", "0.74654967", "0.74407756", "0.74260956", "0.7413185", "0.7401709", "0.73955667", "0.73955667", "0.73955667", "0...
0.0
-1
Get the owner of this document
public function getUser() { return $this->user; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOwner()\n\t{\n\t\treturn $this->getObject('owner', null, 'user');\n\t}", "public function getOwner()\n {\n return isset($this->owner) ? $this->owner : null;\n }", "public function getOwner()\n {\n return $this->get(self::_OWNER);\n }", "public function getOwnerDoc...
[ "0.8642091", "0.8502014", "0.84682155", "0.84531546", "0.8411969", "0.8411969", "0.8411969", "0.8409927", "0.83843637", "0.83445376", "0.82881004", "0.82820237", "0.8183718", "0.81169033", "0.8055079", "0.794215", "0.7872187", "0.78640944", "0.78640944", "0.78638", "0.7855206...
0.0
-1
Returns the local path to the document's folder
public function getPath() { return FILES_LOCATION . DS . $this->getType() . DS . $this->getId(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFilepath() {\n\t\treturn RuntimeDirectoryManager::getDocumentRoot().$this->filename;\n\t}", "public static function get_directory(): string {\n return Simply_Static\\Options::instance()->get('local_dir') ?: '';\n }", "public function getLocalPath();", "public function getFileRoot...
[ "0.7281225", "0.7224821", "0.7185813", "0.718557", "0.717731", "0.71566737", "0.7108799", "0.7102262", "0.7101106", "0.7090941", "0.70850927", "0.7076845", "0.70619905", "0.7036148", "0.70298624", "0.70253605", "0.7025137", "0.7019957", "0.7016359", "0.7016359", "0.7016359", ...
0.0
-1
Returns the type of document
public function getType() { return $this->type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDocumentType() {\n return $this->document['type'];\n }", "public function document_type() {\r\n\t\t$class = __CLASS__;\r\n\t\treturn (isset($class::_object()->document_type)) ? $class::_object()->document_type:null;\r\n }", "public function getDocType();", "public function ge...
[ "0.9034776", "0.90081865", "0.90015435", "0.8803622", "0.8728616", "0.84584904", "0.8291421", "0.7985497", "0.7893718", "0.77068615", "0.7471349", "0.7373175", "0.73296934", "0.72029424", "0.7121555", "0.71124196", "0.7095419", "0.7063729", "0.69791996", "0.6944811", "0.69416...
0.0
-1
Returns the source file for this document
public function getFile() { return $this->file; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSourceFilePath()\n {\n return $this->sourceFilePath;\n }", "public function getSource()\n\t{\n\t\treturn file_get_contents($this->file);\n\t}", "public function getSource()\n {\n return 'document';\n }", "public function getSource()\n\t{\n\t\treturn $this->broker->getFil...
[ "0.7679623", "0.75447774", "0.7537719", "0.75113875", "0.7420436", "0.7390551", "0.73770875", "0.72756594", "0.72756594", "0.72643054", "0.72374904", "0.72212565", "0.71915877", "0.7116385", "0.7114925", "0.71126133", "0.70874727", "0.70874727", "0.70874727", "0.70874727", "0...
0.6261977
94
Returns the API url of this document This can be extended by adding: 'slide/x/' to retrieve slide number x for a presentation or with 'image/' to retrieve the resized image of an image document
public function getApiUrl() { if(in_array($this->getType(), array('presentation', 'document'))) { return SERVER_PROTOCOL .'://'. SERVER_ADDRESS .':'.SERVER_PORT . SERVER_ROOT .'/api/'. $this->getType() .'/'. $this->getId() .'/'; } else { return SERVER_PROTOCOL .'://'. SERVER_ADDRESS .':'.SERVER_PORT . SERVER_ROOT .'/api/file/'. $this->getId() .'/'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUrl()\n {\n return $this->api\n . '?method='\n . $this->getMethod()\n . '&api_key='\n . $this->getApiKey()\n . '&tags='\n . $this->getTag()\n . '&per_page='\n . $this->getPerPage()\n . '&page='\n . $this->getPage()\n...
[ "0.6633188", "0.65852696", "0.6496659", "0.6393424", "0.6325681", "0.62989026", "0.6289788", "0.60982656", "0.6094479", "0.6067897", "0.6042629", "0.60171366", "0.6014391", "0.59536827", "0.5936316", "0.593505", "0.5934434", "0.5914987", "0.5914863", "0.5908345", "0.5908135",...
0.737505
0
Returns the creation date of this document
public function getCreationDate() { return $this->creationDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_creation_date()\n {\n return $this->get_default_property(self::PROPERTY_CREATION_DATE);\n }", "public function getCreationDate()\n {\n return $this->created;\n }", "public function getCreationDate()\n {\n return $this->creation_date;\n }", "public fu...
[ "0.8276352", "0.82324535", "0.821782", "0.821782", "0.82160443", "0.8198958", "0.8198958", "0.8198958", "0.8198958", "0.8198958", "0.819116", "0.81867707", "0.8054274", "0.80508965", "0.80310494", "0.79805124", "0.79805124", "0.79805124", "0.7908365", "0.7908365", "0.78917027...
0.8203228
5
Returns the modification date of this document
public function getModificationDate() { return $this->modificationDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getModificationDate()\n {\n return $this->modificationDate;\n }", "public function get_modification_date()\n {\n return $this->get_default_property(self::PROPERTY_MODIFICATION_DATE);\n }", "public function getDateModification()\n {\n return $this->dateModific...
[ "0.82694364", "0.8055439", "0.7949888", "0.76934636", "0.76723236", "0.7653574", "0.7485886", "0.74192697", "0.7371976", "0.7322645", "0.7253996", "0.723889", "0.72357774", "0.7222352", "0.71894413", "0.71544605", "0.71401733", "0.7112384", "0.7069783", "0.70296407", "0.69287...
0.82847404
0
Returns the file with headers to the browser WARNING: Because of the headers and everything, this can only be used when not outputting any content
public function getOriginalFile() { $file = $this->getPath() . DS . $this->getFile(); $finfo = finfo_open(FILEINFO_MIME_TYPE); $mimetype = finfo_file($finfo, $file); finfo_close($finfo); header("Content-Type: ". $mimetype); readfile($file); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _header( $filename )\r\n {\r\n if ( function_exists( 'mb_http_output' ) ) {\r\n mb_http_output( 'pass' );\r\n }\r\n header( 'Content-Type: ' . $this -> mimetype );\r\n if ( preg_match( \"/MSIE ([0-9]\\.[0-9]{1,2})/\", $_SERVER['HTTP_USER_AGENT'] ) ) {\r\n ...
[ "0.6946886", "0.6932323", "0.67974246", "0.6752182", "0.67302185", "0.668533", "0.665132", "0.6645026", "0.6631166", "0.6569403", "0.655686", "0.6547476", "0.65223813", "0.6498669", "0.64442414", "0.64313996", "0.63352233", "0.6330032", "0.6320958", "0.63039887", "0.630212", ...
0.5753116
72
Gets the cached textures from the database (if any available) for this file
public function getCache() { $db = \Helper::getDB(); $db->join('cached_assets c', 'dc.cacheId = c.id', 'LEFT'); $db->where('dc.fileId', $db->escape($this->getId())); $results = $db->get('document_files_cache dc'); return $results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCache();", "public function getSpriteCache()\n {\n return $this->spriteImageRegistry->getSpriteCache();\n }", "function GetFromCache()\n {\n return File::GetContents($this->file);\n }", "public static function getCache() {}", "function load_theme_image_cache($db, $site,...
[ "0.6125842", "0.61087954", "0.61007166", "0.5958722", "0.5922228", "0.58967113", "0.5849919", "0.5835553", "0.57411736", "0.5739414", "0.569133", "0.56640124", "0.5648573", "0.56356376", "0.5628536", "0.55980456", "0.5596413", "0.5562611", "0.5554231", "0.55529267", "0.553160...
0.6883098
0
Adds the given group to the document groups
public function addGroup(\Models\Group $group) { $this->groups[] = $group; $group->addFile($this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addGroup($group) {}", "public function addGroup(Group $group);", "public function addGroup(string $group): void;", "public function add(string $group)\n {\n $this->groups[] = $group;\n }", "function addToGroup($group)\n {\n $this->_api->doRequest(\"PUT\", \"{$group->g...
[ "0.86053133", "0.82633805", "0.8086599", "0.75954974", "0.7588914", "0.75427085", "0.74398106", "0.7180035", "0.70744336", "0.6942359", "0.6942359", "0.6933417", "0.6920433", "0.6919385", "0.68418515", "0.6813392", "0.6772961", "0.6745323", "0.6740327", "0.67349535", "0.67214...
0.75945365
4
Returns a list with all groups this document is part of
public function getGroups() { return $this->groups; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGroups();", "public function getGroups();", "public function getGroups() {}", "public function getAllGroups();", "public function getGroupsFromDatabase() {\n $db = \\Helper::getDB();\n $db->join('groups g', 'gd.groupId = g.id', 'LEFT');\n $db->where('gd.d...
[ "0.7876884", "0.7876884", "0.7668962", "0.7459645", "0.7458551", "0.7446431", "0.7374504", "0.73557544", "0.73557544", "0.7335925", "0.7314114", "0.7314114", "0.7256351", "0.723542", "0.717017", "0.7155837", "0.71476305", "0.710649", "0.70757216", "0.7063948", "0.7024074", ...
0.7021691
21
Get user aliases path
public function getUserAliasesPath() { if(!$this->hasUserAliasesPath() && $this->hasDefaultUserAliasesPath()) $this->setUserAliasesPath($this->getDefaultUserAliasesPath()); return $this->userAliasesPath; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDefaultUserAliasesPath()\n {\n return $this->getUserHomePath().'/'.self::USER_ALIASES_DIR_NAME;\n }", "public function aliasPath(): string\n {\n return $this->_aliasPath;\n }", "public function hasUserAliasesPath()\n {\n return !empty($this->userAliasesPat...
[ "0.77855396", "0.7177975", "0.6424047", "0.6238146", "0.62202626", "0.62202626", "0.62202626", "0.62202626", "0.6215509", "0.61698157", "0.613496", "0.60694", "0.6052336", "0.6040332", "0.6029832", "0.60096556", "0.6001542", "0.5995896", "0.5990391", "0.5986431", "0.5968525",...
0.82206804
0
Set user aliases path
public function setUserAliasesPath($path) { if(!$this->isUserAliasesPathValid($path)) throw new InvalidArgumentException(sprintf('User aliases path: "%s" is invalid.',$path)); $this->userAliasesPath=$path; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDefaultUserAliasesPath()\n {\n return $this->getUserHomePath().'/'.self::USER_ALIASES_DIR_NAME;\n }", "public function setAlias()\n\t{\n\t\tif(empty($this->alias)){\n $this->alias = Amputate::rus2route(Amputate::getLimb($this->title, 20, ''));\n ...
[ "0.69299287", "0.69093776", "0.6679251", "0.6667034", "0.6662918", "0.6602546", "0.6510136", "0.6406135", "0.63856363", "0.6157809", "0.6151912", "0.60453755", "0.60237575", "0.5967117", "0.58768344", "0.5858961", "0.5780394", "0.5760291", "0.573286", "0.5656013", "0.5655426"...
0.6668371
3
Validates if user aliases path is valid
public function isUserAliasesPathValid($path) { return (is_string($path) && !empty($path))?:false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasUserAliasesPath()\n {\n return !empty($this->userAliasesPath)?:false;\n }", "function path_admin_form_validate($form, &$form_state) {\n $src = $form_state['values']['src'];\n $dst = $form_state['values']['dst'];\n $pid = isset($form_state['values']['pid']) ? $form_state['values...
[ "0.6757073", "0.6390587", "0.6207587", "0.61845607", "0.5993335", "0.5918532", "0.5694377", "0.5662228", "0.56369156", "0.5626693", "0.56194794", "0.5601067", "0.55725414", "0.55138916", "0.54741764", "0.54674846", "0.54623014", "0.5444483", "0.54402214", "0.5398273", "0.5395...
0.7691198
0
Checks if user aliases path is set
public function hasUserAliasesPath() { return !empty($this->userAliasesPath)?:false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasDefaultUserAliasesPath()\n {\n return !empty($this->getDefaultUserAliasesPath())?:false;\n }", "public function userAliasesDirectoryExist()\n {\n return file_exists($this->getUserAliasesPath())?:false;\n }", "public function isUserAliasesPathValid($path)\n {\n ...
[ "0.7748395", "0.76350576", "0.7192105", "0.6353558", "0.6316176", "0.6173999", "0.60652107", "0.6031963", "0.59272915", "0.5753584", "0.5749079", "0.5713182", "0.56995", "0.56790847", "0.5655186", "0.56488967", "0.5647139", "0.5629692", "0.56181437", "0.5617994", "0.5513474",...
0.82215333
0
Checks if default user aliases path is set
public function hasDefaultUserAliasesPath() { return !empty($this->getDefaultUserAliasesPath())?:false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasUserAliasesPath()\n {\n return !empty($this->userAliasesPath)?:false;\n }", "public function userAliasesDirectoryExist()\n {\n return file_exists($this->getUserAliasesPath())?:false;\n }", "public function getDefaultUserAliasesPath()\n {\n return $this->ge...
[ "0.7872407", "0.74766606", "0.7344577", "0.6463527", "0.64553535", "0.62074995", "0.6113392", "0.5826104", "0.5824663", "0.5708007", "0.5652674", "0.56374097", "0.55467284", "0.5519671", "0.5514894", "0.5464759", "0.54275227", "0.5419248", "0.5414231", "0.5403456", "0.5384767...
0.8370778
0
Get default user aliases path
public function getDefaultUserAliasesPath() { return $this->getUserHomePath().'/'.self::USER_ALIASES_DIR_NAME; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserAliasesPath()\n {\n if(!$this->hasUserAliasesPath() && $this->hasDefaultUserAliasesPath())\n $this->setUserAliasesPath($this->getDefaultUserAliasesPath());\n return $this->userAliasesPath;\n }", "public function hasDefaultUserAliasesPath()\n {\n ret...
[ "0.79473716", "0.6796304", "0.6683898", "0.66278344", "0.6167079", "0.61451906", "0.6133794", "0.6115452", "0.6067055", "0.6021898", "0.6021716", "0.59830713", "0.5976017", "0.5976017", "0.5976017", "0.5976017", "0.5889116", "0.58445925", "0.58261657", "0.58198225", "0.581670...
0.8807762
0
Create user aliases directory
public function createUserAliasesDirectory() { if(!$this->userAliasesDirectoryExist()) return $this->createDirectory($this->getUserAliasesPath()); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function siteAlias($args, $assoc_args) {\n $location = $this->input()->optional(\n [\n 'key' => 'location',\n 'choices' => $assoc_args,\n 'default' => getenv('HOME') . '/.drush/onealias.aliases.drushrc.php',\n ]\n );\n if (is_dir($location)) {\n $message = '...
[ "0.6056239", "0.5831992", "0.57926136", "0.574109", "0.5634124", "0.5542194", "0.5538783", "0.5360504", "0.52312535", "0.5217733", "0.52176756", "0.52167946", "0.51643777", "0.5133658", "0.51175094", "0.5107444", "0.5105338", "0.50772554", "0.5069512", "0.506409", "0.50485843...
0.7431925
0
Get user aliases path
public function userAliasesDirectoryExist() { return file_exists($this->getUserAliasesPath())?:false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserAliasesPath()\n {\n if(!$this->hasUserAliasesPath() && $this->hasDefaultUserAliasesPath())\n $this->setUserAliasesPath($this->getDefaultUserAliasesPath());\n return $this->userAliasesPath;\n }", "public function getDefaultUserAliasesPath()\n {\n ret...
[ "0.82206804", "0.77855396", "0.7177975", "0.6424047", "0.6238146", "0.62202626", "0.62202626", "0.62202626", "0.62202626", "0.6215509", "0.61698157", "0.613496", "0.60694", "0.6052336", "0.6040332", "0.6029832", "0.60096556", "0.6001542", "0.5995896", "0.5990391", "0.5986431"...
0.58748883
24
recherche si l'etudiant existant dans la bdd
public function searchEtuByIdCompte($idcompte){ $req = $this->prepare(" SELECT EDNTID, EDNTNOMETU, EDNTPRENOMETU,EDNTINEBEA,EDNTSEXE,EDNTDATENAISS,EDNTLIEUNAISS,EDNTCPNAISS,PSNSID,EDNTTEL,EDNTMAIL,EDNTBOURSIER,EDNTCYCLE,EDNTADRESSETU,EDNTCPADRESSETU,EDNTVILLEADRESSETU,FRMTID,EDNTANCETAB, EDNTANCCLASSE, EDNTANCTYPEETAB, EDNTANCACDM, EDNTANCCP, EDNTANCVILLE, EDNTLV1, EDNTLV2, EDNTDOUBLEMENT FROM etudiant WHERE CMPTNUM = :idcompte "); $req->bindParam(':idcompte', $idcompte,PDO::PARAM_INT); $req->execute(); return $this->cursorToObject($req); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function existe($id_desig){\r\n $sql=\"select * from suplente where id_desig_suplente=$id_desig\";\r\n $res=toba::db('designa')->consultar($sql);\r\n \r\n if(count($res)>0){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "function busc...
[ "0.6817937", "0.6661549", "0.6303551", "0.6196456", "0.61567837", "0.6135225", "0.6113449", "0.6112894", "0.6084888", "0.6000634", "0.59826434", "0.5951355", "0.5946523", "0.5918692", "0.5888162", "0.586345", "0.5861059", "0.5859444", "0.5857225", "0.5837004", "0.58340186", ...
0.56430703
45
Set up the test
public function setUp() { $this->request = Phake::mock('Symfony\Component\HttpFoundation\Request'); $requestStack = Phake::mock('Symfony\Component\HttpFoundation\RequestStack'); Phake::when($requestStack)->getMasterRequest()->thenReturn($this->request); $this->strategy = new CurrentRouteSubQueryStrategy($requestStack); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "...
[ "0.810157", "0.810157", "0.810157", "0.810157", "0.810157", "0.810157", "0.810157", "0.810157", "0.810157", "0.810157", "0.810157", "0.810157", "0.810157", "0.810157", "0.81014794", "0.81014794", "0.81014794", "0.81014794", "0.81014794", "0.81014794", "0.81014794", "0.81014...
0.0
-1
Determine if the user is authorized to make this request.
public function authorize() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }"...
[ "0.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 [ 'nv_ma' => 'required', 'kt_ngayKy' => 'required', 'kt_nguoiKy' => 'required', 'kt_lyDo' => 'required|min:3', ]; }
{ "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
$supplierFind = $this>getFirst("SELECT supplier_id FROM suppliers WHERE supplier_id = $supplier_id");
function addBrand($name, $supplier_id) { // if ($supplierFind) // $supplier = $supplierFind['supplier_id']; // else { // $newSupplier = $this->insert("INSERT INTO `suppliers`(`name`) // VALUES ('$supplier')"); // $supplier = $newSupplier; // } return $this->insert(" INSERT INTO `brands`(`name`, `supplier_id`) VALUES ('$name', $supplier_id)"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSupplierById($id){\n\t$suppierarr = getRowAsArray(\"SELECT suppliername FROM suppliers WHERE id='\".$id.\"' \");\n\t\n\treturn $suppierarr['suppliername'];\n}", "public function get_supplier() {\n $query = $this->db->get('supplier');\n if ($query->num_rows() > 0) {\n return $...
[ "0.7325375", "0.6987335", "0.66291165", "0.6573349", "0.6504938", "0.6460409", "0.6373267", "0.63167876", "0.6272411", "0.6252913", "0.6241078", "0.6232384", "0.62214965", "0.621084", "0.6118745", "0.61008674", "0.60729325", "0.6070837", "0.6062662", "0.6039829", "0.60370606"...
0.0
-1
written by Duncan Murray 10/8/2012 to get the proper text of a URL
function fixURL($url, $includeHREF ) { $properURL = ""; switch( substr($url, 0, 4) ) { case "http": $properURL= $url; break; case "www.": $properURL="http://".$url; break; default: $properURL="http://www.".$url; break; } if ( $includeHREF == true ) { $properURL = "<a href=".$properURL.">".$properURL."</a>"; } return $properURL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStrByUrl($url){\n //Get the page\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($curl, CURLOPT_HEADER, false);\n curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_REFERER, $url);\n c...
[ "0.7010458", "0.69986373", "0.6789535", "0.65517217", "0.6502255", "0.6420552", "0.63652825", "0.63622403", "0.63492346", "0.63405037", "0.633279", "0.6320103", "0.6320103", "0.6319742", "0.63086015", "0.6304981", "0.6255651", "0.6242758", "0.6236174", "0.62235075", "0.622073...
0.0
-1
Render EE pagination object links in the template.
public function wrapper() { ee()->load->library('pagination'); $total_items = ee()->TMPL->fetch_param('total_items'); $per_page = ee()->TMPL->fetch_param('per_page'); $current_page = ee()->TMPL->fetch_param('current_page',0); $prefix = ee()->TMPL->fetch_param('prefix','P'); $base_path =ee()->TMPL->fetch_param('base_path'); $pagination = ee()->pagination->create(); $pagination->prefix = $prefix; $pagination->basepath = '/' . trim($base_path,'/'); ee()->TMPL->tagdata = $pagination->prepare(ee()->TMPL->tagdata); $pagination->build($total_items, $per_page); $this->return_data = $pagination->render($this->return_data); return $this->return_data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function links()\n\t{\n\t\tif ($this->last <= 1) return '';\n\n\t\t// Each pagination element is created by an element method. This allows\n\t\t// us to keep this class clean and simple, because pagination code can\n\t\t// become a mess. We would rather keep it simple and beautiful.\n\t\tforeach ($this->ele...
[ "0.70128363", "0.6998418", "0.6897305", "0.68074566", "0.67664856", "0.6554876", "0.65268743", "0.64971066", "0.64883876", "0.6406175", "0.6299456", "0.629032", "0.62294525", "0.6207537", "0.620257", "0.61644876", "0.6162596", "0.6162596", "0.61523324", "0.6151965", "0.609565...
0.55149794
83
Bootstrap the application events.
public function boot() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function boot()\n {\n\n Event::listen('pages.menuitem.listTypes', function () {\n return [\n 'portfolio-item' => 'depcore.portfolio::lang.portfolioitem.label' ,\n 'all-portfolio-items' => 'depcore.portfolio::lang.portfolioitems.menu_label',\n ];\...
[ "0.7476131", "0.7449455", "0.74397516", "0.7425866", "0.73787534", "0.73327506", "0.7290027", "0.72789234", "0.7272027", "0.72545135", "0.7238835", "0.72026354", "0.7201436", "0.7192646", "0.7188356", "0.7178903", "0.71773785", "0.7174105", "0.7166155", "0.7162653", "0.716265...
0.0
-1
Register the service provider.
public function register() { $this->app->resolving('validator', function ($factory, $app) { $colorValidator = new ColorValidator(); $factory->extend('color', function ($attribute, $value, $parameters, $validator) use ($colorValidator) { return $colorValidator->isColor($value); }); $factory->extend('color_hex', function ($attribute, $value, $parameters, $validator) use ($colorValidator) { return $colorValidator->isColorAsHex($value); }); $factory->extend('color_rgb', function ($attribute, $value, $parameters, $validator) use ($colorValidator) { return $colorValidator->isColorAsRGB($value); }); $factory->extend('color_rgba', function ($attribute, $value, $parameters, $validator) use ($colorValidator) { return $colorValidator->isColorAsRGBA($value); }); $factory->extend('color_keyword', function ($attribute, $value, $parameters, $validator) use ($colorValidator) { return $colorValidator->isColorAsKeyword($value); }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n $this->registerServices();\n }", "public function register()\n {\n // service 由各个应用在 AppServiceProvider 单独绑定对应实现\n }", "public function register()\n {\n //\n if (env('APP_DEBUG', false) && $this->app->isLocal()) {\n $this->a...
[ "0.71774215", "0.7054453", "0.6968271", "0.69677705", "0.6952019", "0.6931252", "0.6926226", "0.6918423", "0.6899592", "0.6895726", "0.6894278", "0.68906504", "0.68906504", "0.6883112", "0.6872877", "0.6865099", "0.68640506", "0.68627584", "0.68624485", "0.68491566", "0.68236...
0.0
-1
Display a listing of the resource.
public function index() { $airlines = Airline::latest()->paginate(5); return view('admin.airline', compact('airlines')) ->with('i', (request()->input('page', 1) - 1) * 5); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Display a listing of the resource.
public function airlineList() { $airlines = Airline::all(); return $airlines; }
{ "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('admin.airline_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) { // $request->validate([ 'code' => 'required', 'name' => 'required' ]); Airline::create($request->all()); return redirect()->route('airlines_list') ->with('success', 'Airline created successfully.'); }
{ "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(Airline $airline) { // }
{ "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($airline) { // $airline = Airline::findorFail($airline); return view('admin.airline_edit', compact('airline')); }
{ "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) { // $request->validate([ 'code' => 'required', 'name' => 'required' ]); $airline = Airline::findorFail($id); $airline->update($request->all()); return redirect()->route('airlines_list') ->with('success', 'Airline updated successfully'); }
{ "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) { // $airline = Airline::findorFail($id); $airline->delete(); return redirect()->route('airlines_list') ->with('success', 'Airline deleted successfully'); }
{ "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
Show user creation form and list of users.
public function index(UserDataTable $dataTable) { return $dataTable->render('users.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function userList() {\n /** @var User[] $users */\n $users = $this->entityManager->getRepository(\"Entity\\\\User\")->findAll(); // Retrieve all User objects registered in database\n echo $this->twig->render('admin/lists/users.html.twig', ['users' => $users]);\n }", "public functio...
[ "0.7823788", "0.77313584", "0.7700823", "0.76496804", "0.76392347", "0.76100063", "0.75453794", "0.74765915", "0.7457676", "0.74449486", "0.74183285", "0.73946315", "0.73816377", "0.7351708", "0.73480237", "0.73256814", "0.73233616", "0.7321562", "0.73058057", "0.7283083", "0...
0.0
-1
Store new user in the system.
public function store(Request $request) { $this->validate($request, [ 'name' => 'required|string', 'username' => 'required|string|min:6|unique:users', 'email' => 'required|string|email|unique:users', 'password' => 'required|string|min:6|confirmed', 'address' => 'required', 'contact' => 'required', 'role_id' => 'required|exists:roles,id', 'department_id' => 'nullable|exists:departments,id' ]); User::create([ 'name' => request('name'), 'username' => request('username'), 'email' => request('email'), 'password' => bcrypt(request('password')), 'address' => request('address'), 'contact' => request('contact'), 'role_id' => request('role_id'), 'department_id' => request('department_id') ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store()\n\t{\n\t\t$user = $this->user->store( Input::all() );\n\t}", "public function store()\n {\n // Save post data in $user var\n $user = $_POST;\n \n // Create a password, set created_by ID and set the date of creation\n $user['password'] = password_hash(...
[ "0.7846312", "0.76784253", "0.7629763", "0.735751", "0.7301915", "0.72707593", "0.7244699", "0.72289", "0.71872646", "0.7185199", "0.7158681", "0.712045", "0.71085304", "0.7063868", "0.7030915", "0.69976246", "0.69742954", "0.69706756", "0.6960431", "0.69538707", "0.69506013"...
0.0
-1
Show the form for editing the specified resource.
public function edit(Request $request, User $user) { return view('users.edit', compact('user')); }
{ "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, User $user) { $this->validate($request, [ 'name_edit' => 'required|string', 'address_edit' => 'required', 'contact_edit' => 'required', 'role_id_edit' => 'required|exists:roles,id', 'department_id_edit' => 'nullable|exists:departments,id' ]); $user->update([ 'name' => request('name_edit'), 'address' => request('address_edit'), 'contact' => request('contact_edit'), 'role_id' => request('role_id_edit'), 'department_id' => request('department_id_edit') ]); }
{ "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
Display a listing of the resource.
public function index() { $users=DB::table('users')->select('users.name as name','users.id as id','users.email as email','state_users.state_id as state_id','states.state_name as state_name')->join('state_users','state_users.user_id','=','users.id') ->join('states','states.id','=','state_users.state_id')->get(); return view('user.index')->with('users',$users); }
{ "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() { $states=State::all(); $categories = Category::all(); return view('user.create')->with('states',$states)->with('categories',$categories); }
{ "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) { $user = new User(); $user->name = $request->name; $user->email = $request->email; $user->password = Hash::make($request->password); $user->isadmin = 0; $user->save(); $user_id=$user->id; DB::table('state_users')->insert(["user_id"=>$user_id,"state_id"=>$request->state_id]); $cat_ids = $request->cat_id; foreach($cat_ids as $cat_id) { DB::table('user_categories')->insert(["user_id"=>$user_id,"cat_id"=>$cat_id]); } return redirect()->to('users'); }
{ "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) { echo "Thank you "; }
{ "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) { $user = DB::table('users')->join('state_users','state_users.user_id','=','users.id')->where('users.id',$id)->first(); $state = State::all(); return view('user.edit')->with('user',$user)->with('states',$state); }
{ "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) { DB::table('state_users')->where('user_id',$id)->update(["state_id"=>$request->state_id]); $user = User::find($id); $user->name = $request->name; $user->email = $request->email; $user->password = Hash::make($request->password); $user->save(); }
{ "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) { User::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
Retrieves a list of models based on the current search/filter conditions. Typical usecase: Initialize the model fields with values from filter form. Execute this method to get CActiveDataProvider instance which will filter models according to data in model fields. Pass data provider to CGridView, CListView or any similar widget.
public function search() { // @todo Please modify the following code to remove attributes that should not be searched. $criteria=new CDbCriteria; $criteria->compare('id',$this->id); $criteria->compare('baseScore',$this->baseScore); $criteria->compare('baseScoreCount',$this->baseScoreCount); $criteria->compare('score',$this->score); $criteria->compare('scoreCount',$this->scoreCount); $criteria->compare('commentCount',$this->commentCount); $criteria->compare('baseWantCount',$this->wantCount); $criteria->compare('wantCount',$this->wantCount); $criteria->compare('seenCount',$this->seenCount); $criteria->compare('created',$this->created); $criteria->compare('updated',$this->updated); return new CActiveDataProvider($this, array( 'criteria'=>$criteria, 'sort'=>array( 'defaultOrder'=>'id DESC', ), )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t//$criteria->compare('object_id',$this->object_id);\n\t\t$criteria->compare('object_type_id',$this->object...
[ "0.7212103", "0.7135047", "0.7092495", "0.7092376", "0.6984519", "0.6959199", "0.6946605", "0.6940696", "0.69329053", "0.692273", "0.6910265", "0.6901778", "0.68976796", "0.68969935", "0.6891102", "0.68813384", "0.68786913", "0.68728524", "0.684816", "0.6847676", "0.6834544",...
0.0
-1
Returns the static model of the specified AR class. Please note that you should have this exact method in all your CActiveRecord descendants!
public static function model($className=__CLASS__) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function model() {\n return parent::model(get_called_class());\n }", "public function model()\r\n {\r\n return static::class;\r\n }", "public static function model($className=__CLASS__) { return parent::model($className); }", "public static function model($className=__CLA...
[ "0.75750446", "0.7528519", "0.7271581", "0.72703993", "0.72617143", "0.7213263", "0.72127366", "0.7131883", "0.71287453", "0.71287453", "0.7102495", "0.7102467", "0.7102467", "0.7074701", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163...
0.0
-1
Relationship: metadata belong to an entry.
public function entry() { return $this->belongsTo(Entry::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function metadata()\n {\n return $this->hasOne(EntryMeta::class);\n }", "public function entry()\n {\n return $this->morphTo('entry');\n }", "public function entry() {\n\t\treturn $this->has_many('Entry');\n\t}", "public function isRelationshipData();", "public function get...
[ "0.75698745", "0.61454874", "0.5891845", "0.56825894", "0.56296116", "0.5545591", "0.55350846", "0.5465925", "0.5436469", "0.5397503", "0.53384507", "0.5333981", "0.530018", "0.5282983", "0.5282983", "0.5282983", "0.5264749", "0.5212278", "0.5191612", "0.5191612", "0.5191612"...
0.63002586
1
retorna todas as ocurrencias segundo a busca
public function showbylike($string){ $artistalike = DB::table('artistas')->where('nomeartista','LIKE', '%' . $string . '%')->first(); if(!$artistalike){ return response()->json([ 'message' => 'Nenhum resultado para: ' . $string ],404); } return response()->json($artistalike); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buscarEspaciosVistos(){\r\n $i=0;\r\n $espacios_vistos=isset($espacios_vistos)?$espacios_vistos:'';\r\n $espacios=isset($reprobados)?$reprobados:'';\r\n \r\n if(is_array($this->espaciosCursados)){\r\n foreach ($this->espaciosCursados as $espacio) {\r\n ...
[ "0.68884885", "0.655945", "0.65008485", "0.64943075", "0.6483035", "0.64732397", "0.6441287", "0.629829", "0.62888145", "0.6277469", "0.6232271", "0.62206984", "0.62181604", "0.6215002", "0.6207177", "0.619873", "0.619296", "0.61541814", "0.61537915", "0.61395454", "0.6135052...
0.0
-1
retornar todos os dados
public function showmetadata($string){ $artistalike = DB::table('artistas')->where('nomeartista','LIKE', '%' . $string . '%')->first(); if(!$artistalike){ return response()->json([ 'message' => 'Nenhum resultado para: ' . $string ], 404); } $data = $artistalike->id; $metadata = DB::table('artistas') ->select( 'nomeartista', 'desc_artista', 'filepath' )->where('nomeartista', 'LIKE', '%' . $string . '%') ->get(); $metaalbum = DB::table('artistas') ->join('album', 'album.artistaID', '=', 'artistas.id')->where('artistas.id', '=', $data) ->select( 'album.titulo_album', 'album.desc_album', 'album.filepath_avatar' ) ->get(); $metamusica = DB::table('artistas') ->join('musica', 'musica.artistaID', '=', 'artistas.id')->where('artistas.id', '=', $data) ->select( 'musica.id', 'musica.nomemusica', 'musica.filepath', 'musica.created_at' ) ->get(); if(!$metadata){ return response()->json([ 'message' => 'Nenhum resultado para: ' . $string ], 404); } return [ 'find' => [ 'artist' => [ 'artista' => $metadata, 'data' => [ 'album'=>$metaalbum, 'musicas'=>$metamusica ] ] ] ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function tratarDados(){\r\n\t\r\n\t\r\n }", "function dadosCadastros(){//função geral que será chamada na index\n pegaCadastrosJson();//pega os valores dos cadastros do arquivo JSON e salva em um array\n contaNumeroCadastros();//conta Quantos cadastros existem\n }", "public function pegaTod...
[ "0.73768216", "0.7273128", "0.71925", "0.7121388", "0.71121347", "0.6884693", "0.68423164", "0.68222624", "0.6811878", "0.6778752", "0.67488986", "0.6711632", "0.6690389", "0.66717386", "0.6620263", "0.65986896", "0.65870607", "0.65737367", "0.65722275", "0.6540781", "0.65392...
0.0
-1
metodo retorna apenas 1
public function show($id){ $artista = Artistas::find($id); if(!$artista){ return response()->json([ 'message' => 'Artista não encontrado' ], 404); }; return response()->json($artista); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFirst()\n {\n return 1;\n }", "public function count()\n {\n return 1;\n }", "public function getValue()\n {\n return 1;\n }", "public function firstKey(): ?int;", "function seuraavaID(){\n $kysely = haeYhteys()->prepare(\"SELECT MAX(sanaid) as suu...
[ "0.6585166", "0.6474955", "0.6166795", "0.61592895", "0.6140512", "0.6014163", "0.59773064", "0.59513885", "0.5943995", "0.5921401", "0.58745766", "0.5845434", "0.5839924", "0.5835093", "0.5807203", "0.58035094", "0.57996446", "0.578933", "0.57881105", "0.575718", "0.5750748"...
0.0
-1
region setFileToSign Sets the local path to the file to be signed.
public function setFileToSignFromPath($path) { if (!file_exists($path)) { throw new \Exception("The provided file to be signed was not found"); } $this->fileToSignPath = $path; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setFileToSign($path)\n {\n $this->setFileToSignFromPath($path);\n }", "public function setFileToSign($path)\n {\n $this->setFileToSignFromPath($path);\n }", "public function setSignatureFile($path)\n {\n $this->setSignatureFileFromPath($path);\n }", "pub...
[ "0.74663097", "0.74663097", "0.6397573", "0.6180751", "0.6044755", "0.59320074", "0.578016", "0.578016", "0.57741594", "0.57630354", "0.57630354", "0.57029843", "0.5635303", "0.55379415", "0.55098015", "0.54979146", "0.5455465", "0.5376203", "0.53579587", "0.53251183", "0.530...
0.64799017
3
Sets the content of the file to be signed.
public function setFileToSignFromContentRaw($contentRaw) { $tempFilePath = parent::createTempFile(); file_put_contents($tempFilePath, $contentRaw); $this->fileToSignPath = $tempFilePath; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setFileToSignContent($contentRaw)\n {\n $this->setFileToSignFromContentRaw($contentRaw);\n }", "public function setFileToSignContent($contentRaw)\n {\n $this->setFileToSignFromContentRaw($contentRaw);\n }", "public function setSignatureFileContent($contentRaw)\n {\n...
[ "0.69319314", "0.69319314", "0.6613036", "0.6532223", "0.6532223", "0.649229", "0.6306799", "0.6113641", "0.59694695", "0.5938412", "0.5849547", "0.5849547", "0.5729464", "0.5726722", "0.5686339", "0.5685966", "0.5551359", "0.54940015", "0.5487663", "0.5440828", "0.54199916",...
0.65855634
4
Sets the Base64encoded content of the file to be signed.
public function setFileToSignFromContentBase64($contentBase64) { if (!($raw = base64_decode($contentBase64))) { throw new \Exception("The provided file to be signed is not Base64-encoded"); } $this->setFileToSignFromContentRaw($raw); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setSignatureFileFromContentBase64($contentBase64)\n {\n if (!($raw = base64_decode($contentBase64))) {\n throw new \\Exception(\"The provided signature file is not Base64-encoded\");\n }\n\n $this->setSignatureFileFromContentRaw($raw);\n }", "public function ...
[ "0.6615554", "0.65750265", "0.6469682", "0.6469682", "0.6279377", "0.6279377", "0.618112", "0.61475396", "0.6009692", "0.5874673", "0.5630782", "0.56292325", "0.5608423", "0.5608423", "0.5353731", "0.53307754", "0.5303669", "0.5283228", "0.52825594", "0.5185203", "0.5167711",...
0.6843483
1
Sets the local path to the file to be signed. This method is only an alias fo the setFileToSignFromPath() method.
public function setFileToSign($path) { $this->setFileToSignFromPath($path); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setLocalFile($localFilePath) {\n\t\t$this->localFilePath = $localFilePath;\n\t}", "public function setFileToSignFromPath($path)\n {\n if (!file_exists($path)) {\n throw new \\Exception(\"The provided file to be signed was not found\");\n }\n\n $this->fileToSignP...
[ "0.6857141", "0.6621907", "0.6621907", "0.64501864", "0.6100515", "0.5922541", "0.5865195", "0.5858504", "0.5858504", "0.58584785", "0.57971287", "0.5708299", "0.56873876", "0.56873876", "0.5647066", "0.556268", "0.55089843", "0.54598343", "0.5438985", "0.5376086", "0.536818"...
0.73169076
1
Sets the content of the file to be signed.
public function setFileToSignContent($contentRaw) { $this->setFileToSignFromContentRaw($contentRaw); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setSignatureFileContent($contentRaw)\n {\n $this->setSignatureFileFromContentRaw($contentRaw);\n }", "public function setFileToSignFromContentRaw($contentRaw)\n {\n $tempFilePath = parent::createTempFile();\n file_put_contents($tempFilePath, $contentRaw);\n $t...
[ "0.6613036", "0.65855634", "0.65855634", "0.6532223", "0.6532223", "0.649229", "0.6306799", "0.6113641", "0.59694695", "0.5938412", "0.5849547", "0.5849547", "0.5729464", "0.5726722", "0.5686339", "0.5685966", "0.5551359", "0.54940015", "0.5487663", "0.5440828", "0.54199916",...
0.69319314
1
endregion region setDataFile Sets the detached data file's local path.
public function setDataFileFromPath($path) { if (!file_exists($path)) { throw new \Exception("The provided data file was not found"); } $this->dataFilePath = $path; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function setDataFile($file)\n {\n static::$dataFile = $file;\n }", "public function set($filepath, $data);", "public function setDataFile($path)\n {\n $this->setDataFileFromPath($path);\n }", "public function setDataFile($path)\n {\n $this->setDataFileFromPat...
[ "0.740536", "0.6813044", "0.67315096", "0.67315096", "0.6542407", "0.65207976", "0.6439166", "0.63828963", "0.62768435", "0.61941546", "0.6054909", "0.6032835", "0.60242647", "0.6002468", "0.5981387", "0.5977623", "0.59581655", "0.5842796", "0.58182925", "0.5796037", "0.57694...
0.55876076
29
Sets the deatched data file's content.
public function setDataFileFromContentRaw($contentRaw) { $tempFilePath = parent::createTempFile(); file_put_contents($tempFilePath, $contentRaw); $this->dataFilePath = $tempFilePath; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function XMLsetContent($data) {\n $this->contentBuffer = $data;\n $this->currentFile = '';\n }", "abstract public function setContentFromFile($file);", "public function setContent($content) {\n\t\t$this->buffer['content'] = $content;\n\t}", "protected function setContent() {}", "public fun...
[ "0.69203544", "0.69157827", "0.68896955", "0.6781513", "0.6543659", "0.65117127", "0.64319843", "0.64205426", "0.63674253", "0.63640934", "0.6300597", "0.6203777", "0.6187355", "0.6159418", "0.6128344", "0.61047846", "0.61047846", "0.61047846", "0.61047846", "0.61047846", "0....
0.63992906
8
Sets the detached data file's content Base64encoded.
public function setDataFileFromContentBase64($contentBase64) { if (!($raw = base64_decode($contentBase64))) { throw new \Exception("The provided data file is not Base64-encoded"); } $this->setDataFileFromContentRaw($raw); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDataFileFromContentBase64($contentBase64)\n {\n $this->dataFile = FileReference::fromContentBase64($contentBase64);\n }", "public function setDataFileFromContentRaw($contentRaw)\n {\n $this->dataFile = FileReference::fromContentRaw($contentRaw);\n }", "public functi...
[ "0.6988757", "0.5572513", "0.5509142", "0.5496426", "0.5443236", "0.5411261", "0.5362828", "0.53069186", "0.52654576", "0.5248247", "0.5247421", "0.5185709", "0.51813775", "0.51813775", "0.5119883", "0.51079804", "0.5094394", "0.50776947", "0.5077045", "0.50653523", "0.503661...
0.62269294
1
Sets the detached data file's local path. This method is only an alias for the setDataFileFromPath() method.
public function setDataFile($path) { $this->setDataFileFromPath($path); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDataFileFromPath($path)\n {\n $this->dataFile = FileReference::fromFile($path);\n }", "public function set($filepath, $data);", "public function setLocalFile($localFilePath) {\n\t\t$this->localFilePath = $localFilePath;\n\t}", "public function setPathAttribute($path){ //modifi...
[ "0.64011186", "0.59794915", "0.57895213", "0.56225866", "0.55814505", "0.55791366", "0.5544266", "0.5536234", "0.54905677", "0.5473561", "0.5347485", "0.5250606", "0.5250124", "0.5250124", "0.5250124", "0.5250124", "0.5210798", "0.5208543", "0.51918113", "0.51726395", "0.5141...
0.62754273
2
Sets the detached data file's content. This method is only an alias for the setDataFileFromContentRaw() method.
public function setDataFileContent($contentRaw) { $this->setDataFileFromContentRaw($contentRaw); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDataFileFromContentRaw($contentRaw)\n {\n $this->dataFile = FileReference::fromContentRaw($contentRaw);\n }", "public function setDataFileFromContentRaw($contentRaw)\n {\n $tempFilePath = parent::createTempFile();\n file_put_contents($tempFilePath, $contentRaw);\n...
[ "0.6526176", "0.6413472", "0.6149949", "0.5842913", "0.5702619", "0.56684", "0.5611615", "0.55977833", "0.55364704", "0.5522914", "0.5517356", "0.5510311", "0.5486984", "0.548043", "0.5469325", "0.53887546", "0.53887546", "0.5366686", "0.5332668", "0.53241163", "0.5291704", ...
0.6580731
0
endregion Sets the data hashes file's path. This file is a JSON representing a model that has the information to build a list of data hashes for the signature. If preferred, the pure PHP object can be provided using the method setDataHashes().
public function setDataHashesFromFile($path) { if (!file_exists($path)) { throw new \Exception("The provided data hashes file was not found"); } $this->dataHashesPath = $path; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDataHashes($dataHashes)\n {\n $models = array();\n foreach($dataHashes as $dh) {\n array_push($models, $dh->toModel());\n }\n if (!($json = json_encode($models))) {\n throw new \\Exception(\"The provided data hashes was not valid\");\n ...
[ "0.684248", "0.5697543", "0.5596953", "0.5523152", "0.54564", "0.5454494", "0.5450406", "0.5380294", "0.52894616", "0.5260972", "0.5243746", "0.5226627", "0.51743424", "0.5149089", "0.51424307", "0.51250154", "0.51162344", "0.50642544", "0.50262463", "0.5014592", "0.49869493"...
0.6671924
1
Sets the list of data hashes by passing a pure PHP model. If preferred, the JSON file can be provided using the method setDataHashes().
public function setDataHashes($dataHashes) { $models = array(); foreach($dataHashes as $dh) { array_push($models, $dh->toModel()); } if (!($json = json_encode($models))) { throw new \Exception("The provided data hashes was not valid"); } $tempFilePath = parent::createTempFile(); file_put_contents($tempFilePath, $json); $this->dataHashesPath = $tempFilePath; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setHashAdapters($hashList);", "public static function bindData(array $hashData)\n {\n static::$hashData = $hashData;\n }", "public function testSetHash()\n {\n $validator = new File\\Md5('12345');\n $validator->setHash('12333');\n $this->assertEquals(['12333...
[ "0.60793173", "0.5932761", "0.5780503", "0.5667581", "0.55507135", "0.53787905", "0.52799207", "0.52761495", "0.52423286", "0.51911", "0.5186566", "0.51639855", "0.51566255", "0.5107348", "0.5036377", "0.5009124", "0.49543658", "0.4924125", "0.49021482", "0.4868126", "0.48569...
0.7506159
0
Starts a CAdES signature. (2nd version)
public function start2() { if ($this->_encapsulateContent) { if (empty($this->fileToSignPath)) { throw new \Exception("The file to be signed was not set"); } } else { if (empty($this->fileToSignPath) && empty($this->dataHashesPath)) { throw new \Exception("No file or hashes to be signed were set"); } } if (empty($this->certificatePath)) { throw new \Exception("The certificate was not set"); } // Generate transfer file $transferFile = parent::getTransferFileName(); $args = array( $this->certificatePath, $this->config->getTransferDataFolder() . $transferFile ); // Verify and add common options between signers parent::verifyAndAddCommonOptions($args); if (!$this->_encapsulateContent) { array_push($args, "--detached"); if (!empty($this->dataHashesPath)) { array_push($args, "--data-hashes"); array_push($args, $this->dataHashesPath); } } if (!empty($this->fileToSignPath)) { array_push($args, "--file"); array_push($args, $this->fileToSignPath); } if (!empty($this->dataFilePath)) { array_push($args, "--data-file"); array_push($args, $this->dataFilePath); } // This operation can only be used on versions greater than 1.18 of the PKI Express. $this->versionManager->requireVersion('1.18.0'); // Invoke command $response = parent::invoke(parent::COMMAND_START_CADES2, $args); // Parse output and return model. $parsedOutput = $this->parseOutput($response->output[0]); return new SignatureStartResult($parsedOutput, $transferFile); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sign()\n {\n }", "protected function sign()\n {\n trigger_error(\"Not implemented\", E_ERROR);\n }", "private function _sign_signature_v4($bodyParams)\n\t{\n $ldt = gmdate(self::ISO8601_BASIC);\n $sdt = substr($ldt, 0, 8);\n $parsed = [\n 'meth...
[ "0.5657699", "0.5349088", "0.5281614", "0.5186343", "0.51350266", "0.51245993", "0.5119568", "0.5100616", "0.50423574", "0.5025604", "0.5025604", "0.49998355", "0.49478933", "0.49297628", "0.4904138", "0.49007887", "0.48770648", "0.48685247", "0.47999284", "0.478634", "0.4774...
0.65928036
0
Gets the option to encapsulate the original file's content.
public function getEncapsulateContent() { return $this->_encapsulateContent; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOriginalFileContent()\n {\n return $this->originalFileContent;\n }", "public function getContent(){\n\t\treturn $this->content? $this->content:$this->content = file_get_contents($this->getFullName());\n\t}", "public function getOriginalFile() {}", "public function getOriginalF...
[ "0.6952888", "0.6504648", "0.6496467", "0.6496467", "0.64962655", "0.6467123", "0.6333514", "0.63046044", "0.63038415", "0.62745625", "0.6209609", "0.6209609", "0.61475563", "0.6065332", "0.6037901", "0.6023095", "0.5946472", "0.5935672", "0.591962", "0.5908694", "0.5906003",...
0.53849137
90