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
Remove the specified resource from storage.
public function destroy($id) { $resul=DB::table('especialidad')->where('id', $id)->delete(); if($resul){ \Session::flash('flash_message_correcto', 'registro eliminado exitosamente.'); //return view("mensajes.msj_correcto")->with("msj","Usuario Registrado Correctamente"); ...
{ "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
Test exception for empty file
protected function prepareEnvForEmptyFile() { $file = 'magento_empty.jpg'; /** @var \Magento\Framework\Filesystem $filesystem */ $filesystem = $this->objectManager->get(\Magento\Framework\Filesystem::class); $tmpDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Files...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testReadNonExistingFile()\n {\n $filename = static::$baseFile . '/fs/tmp.txt';\n try {\n file_get_contents($filename);\n\n $this->fail('Expected read of non-existing file to fail');\n } catch (\\PHPUnit_Framework_Error_Warning $e) {\n $this->...
[ "0.7472158", "0.71330583", "0.70316035", "0.6961544", "0.69586366", "0.6825338", "0.6812045", "0.67485785", "0.66976506", "0.6680771", "0.6591244", "0.6583535", "0.6558809", "0.6463081", "0.6462595", "0.63898975", "0.63826966", "0.6344426", "0.63380784", "0.6302774", "0.62880...
0.0
-1
Sets the application locale and translation based on the locale param, if one is not provided it defaults to english
public function routeShutdown(Zend_Controller_Request_Abstract $request) { $config = Zend_Registry::get('config'); $frontController = Zend_Controller_Front::getInstance(); $params = $request->getParams(); $registry = Zend_Registry::getInstance(); // Steps setting the locale. ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setLocale()\n\t{\n\t\tif ($locale = $this->app->session->get('admin_locale'))\n\t\t{\n\t\t\t$this->app->setLocale($locale);\n\t\t} else {\n \\Session::put('admin_locale', \\Config::get('app.locale'));\n }\n\t}", "function setLocale($locale);", "public function settingLocale() ...
[ "0.7523601", "0.7406689", "0.7375916", "0.7262457", "0.7259713", "0.7111117", "0.70815027", "0.70719916", "0.704677", "0.6906252", "0.69012874", "0.6872902", "0.68638027", "0.6849639", "0.6819131", "0.68163747", "0.68025166", "0.68016076", "0.679265", "0.67859286", "0.6774652...
0.0
-1
Create a new job instance.
public function __construct($data) { $this->data = $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createJob( $creationParameters ){ return $this->APICallSub( '/jobs', array( 'create' => $creationParameters ), \"Could not create new job with query \" . $creationParameters['query'] . \" and operation \" . $creationParameters['operation'] ); }", "abstract public function makeJob();", "abstract...
[ "0.6920272", "0.6905722", "0.6905722", "0.6869542", "0.6808916", "0.65271425", "0.65184414", "0.64918077", "0.6489135", "0.6468623", "0.6425879", "0.64058304", "0.63938236", "0.63899404", "0.63753885", "0.6304669", "0.6256802", "0.6241474", "0.620155", "0.61789167", "0.607414...
0.0
-1
Test that the index route returns a rendered response containing the text 'homepage'
public function testGetHomepage() { $response = $this->runApp('GET', '/'); $this->assertEquals(200, $response->getStatusCode()); $this->assertContains('homepage', (string)$response->getBody()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testIndex()\n {\n $client = static::createClient();\n\n $client->request('GET', '/');\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode(), 'la route \"homepage\" ne fonctionne plus.');\n }", "public function test_show_homepage()\n {\n $respons...
[ "0.8230956", "0.81625956", "0.80345523", "0.7953266", "0.7889178", "0.788659", "0.7834922", "0.78030264", "0.77678484", "0.77647597", "0.77269", "0.7697698", "0.766863", "0.76499385", "0.76499385", "0.7640043", "0.76259047", "0.76009697", "0.7586198", "0.75156784", "0.750895"...
0.7996679
3
constructor (registers additional tasks to methods)
public function __construct($config = array()) { parent::__construct($config); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t// Register Extra tasks\n\t\t$this->registerTask( 'add' , \t'edit' );\n\t}", "function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t// Map the save tasks.\n\t\t$this->registerTask('save2new',\t\t'save');\n\t\t$this->registerTask('apply',\t\...
[ "0.79099035", "0.77711284", "0.75042593", "0.71214086", "0.70046544", "0.6978738", "0.69646394", "0.69072217", "0.6823726", "0.68025994", "0.67829496", "0.673652", "0.673652", "0.6652389", "0.6573815", "0.655598", "0.64912903", "0.64791566", "0.6455497", "0.6450141", "0.63818...
0.0
-1
Display a listing of the resource.
public function index() { $settings = Setting::all(); return view('admin.setting.index',compact('settings')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Display the specified resource.
public function show(Setting $setting) { // }
{ "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(Setting $setting) { return view('admin.setting.edit',compact('setting')); }
{ "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.7855196", "0.76957726", "0.7273917", "0.7241426", "0.71717227", "0.7064183", "0.70528984", "0.69836885", "0.694763", "0.69469565", "0.6941572", "0.69301945", "0.6903868", "0.68989486", "0.68989486", "0.68787694", "0.68641657", "0.6860115", "0.6857286", "0.68464494", "0.683...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, Setting $setting) { // The request validated and this code will get run $this->validate($request, [ 'site_title' => 'required', 'contact_title' => 'required', 'contact_subtitle' => 'required', 'icon' => 'requi...
{ "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(Setting $setting) { // }
{ "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
[Aliased] Generates as UUID 4 string Example Usage: uuid() Example Return: 90517cea8a9e46c18c441a3c03611786
function uuid(): string { return \Midnite81\Core\Functions\uuid(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function generateUUID(): string {\n return Str::uuid();\n }", "public static function uuid() {}", "private function uuid() {\n\t\treturn sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n\t\t\tmt_rand(0, 0xffff), mt_rand(0, 0xffff),\n\t\t\tmt_rand(0, 0xffff),\n\t\t\tmt_rand(0, 0x0fff) | 0x4000,\n\...
[ "0.8459579", "0.8408949", "0.83528924", "0.83240914", "0.8323027", "0.8316923", "0.8275305", "0.82140046", "0.8167597", "0.81647694", "0.8162782", "0.81513363", "0.81513363", "0.80990654", "0.8080359", "0.8039191", "0.7994037", "0.7993767", "0.7991543", "0.79565567", "0.79293...
0.8301882
6
[Aliased] Returns the first argument which is not null, or an empty string Example: first_value(null, '', 'Dave'); Result: Dave
function first_value(): mixed { $args = func_get_args(); return \Midnite81\Core\Functions\first_value(...$args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFirstArgument();", "public function getFirst(): ?string;", "public static function coalesce_empty()\n\t{\n\t\tforeach ( func_get_args() as $arg )\n\t\t{\n\t\t\tif ( ! empty($arg) )\n\t\t\t{\n\t\t\t\treturn $arg;\n\t\t\t}\n\t\t}\n\t}", "function getValueOrNull($value) {\n global $db;\n if...
[ "0.6878833", "0.67094123", "0.65026397", "0.6456112", "0.6428809", "0.63297784", "0.62991554", "0.62442124", "0.6211647", "0.6173616", "0.61408085", "0.61316526", "0.61298984", "0.60309505", "0.6011201", "0.5921431", "0.59159076", "0.5913029", "0.59048975", "0.5902153", "0.58...
0.73225117
0
[Aliased] Retrieve the first nonempty value from an array, or a default value if none found. Example: \Midnite81\Core\Functions\first_value_from_array(['', null, 'Dave']); Result: Dave
function first_value_from_array(array $array, mixed $default = null): mixed { return \Midnite81\Core\Functions\first_value_from_array($array); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function first($array) {\n if (count($array) == 0) {\n return null;\n }\n $keys = array_keys($array);\n return $array[$keys[0]];\n }", "function array_first($array)\n{\n if( is_array($array) )\n {\n $keys = array_keys($a...
[ "0.7817297", "0.77948207", "0.76273775", "0.7550804", "0.7521744", "0.749155", "0.7490529", "0.7436106", "0.7424328", "0.7348842", "0.72852427", "0.72143817", "0.71930516", "0.7180979", "0.718037", "0.7063383", "0.7063324", "0.705412", "0.70493627", "0.7038997", "0.70365834",...
0.857743
0
[Aliased] Returns the value of a backed enum case If the $value is not a Backed Enum Case, a runtime error will be thrown Example usage: enum(\Midnite81\Core\Enums\ExpectedType::String) Result: string
function enum(mixed $value): mixed { return \Midnite81\Core\Functions\enum($value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function GetEnumValue(){\n\t\treturn db_enum_value($this->tables[0], $this->fields[0]);\n\t}", "private function filter_enum( $value ) {\n\t\tif ( empty( $this->enum ) ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\tif ( in_array( $value, $this->enum, true ) ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\tthrow new Inval...
[ "0.6631762", "0.6510606", "0.6488591", "0.64180213", "0.6397039", "0.6342705", "0.62285125", "0.6179947", "0.6164119", "0.6095813", "0.602425", "0.6017275", "0.5987912", "0.5928896", "0.5922059", "0.59207314", "0.5850575", "0.5818419", "0.58049077", "0.5781575", "0.5774005", ...
0.7699689
0
Returns a new instance of the TimeConverter
function tempus(): TimeConverter { return new TimeConverter(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function create(...$args): Time\n {\n return new Time(...$args);\n }", "protected function cloneToMutable() : Time\n {\n return clone $this;\n }", "public function time($value): self\n {\n $this->time = $value;\n \n return $this;\n }", "public st...
[ "0.64293045", "0.5849148", "0.5672809", "0.5639726", "0.5592233", "0.5546329", "0.5496895", "0.5496895", "0.5496895", "0.5496895", "0.54168284", "0.5381449", "0.53772324", "0.53674394", "0.5362419", "0.5342623", "0.528984", "0.52472466", "0.5246801", "0.5243133", "0.51930374"...
0.74868363
0
exclui imagem da galeria
public function excluirImagemGaleria(){ //deleta a imagem da pasta include_once("../funcoes/geral.php"); $sql = " SELECT thumb FROM programa_imagem "; if($this->idImagem) $sql .=" WHERE id = '$this->idImagem'"; $this->sql = $sql; $this->qr = self::execSql($this->sql); $qtRegistros = $thi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function galeriasExcluir_action()\n\t{\n\t\t$bd = new GaleriasImagens_Model();\n\t\t$id = abs((int) $this->getParam(2));\n\t\t$resultado = $bd->read(\"id={$id} AND usuario={$this->_usuario}\");\n\t\tunlink('uploads/img_'.$resultado[0]['imagem']);\n\t\tunlink('uploads/tb_'.$resultado[0]['imagem']);\n\t\tunli...
[ "0.77987385", "0.75452226", "0.72969425", "0.7012681", "0.68958", "0.68656147", "0.6802206", "0.6671544", "0.66102487", "0.66050875", "0.6526831", "0.6475862", "0.64475036", "0.64101636", "0.6385188", "0.6383677", "0.6382743", "0.6327972", "0.62656134", "0.6237606", "0.622304...
0.8378347
0
Run the database seeds.
public function run() { ModelsUser::create([ 'name' => 'petra', 'email' => 'petra@gmail.com', 'password' => '1234', 'image' => 'kosong' ]); ModelsUser::create([ 'name' => 'abduh', 'email' => 'abduh@gmail.com', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n fact...
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.78414...
0.0
-1
Create a new command instance.
public function __construct(CategoryService $categoryService) { parent::__construct(); $this->categoryService = $categoryService; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }", "pu...
[ "0.8010746", "0.7333379", "0.72606754", "0.7164165", "0.716004", "0.7137585", "0.6748632", "0.67234164", "0.67178184", "0.6697025", "0.6677973", "0.66454077", "0.65622073", "0.65437883", "0.64838654", "0.64696646", "0.64292693", "0.6382209", "0.6378306", "0.63773245", "0.6315...
0.0
-1
Execute the console command.
public function handle() { $this->categoryService->delete($this->argument('category_id')); $this->info("Category deleted!"); }
{ "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
Create a new job instance.
public function __construct($payload) { $this->payload = $payload; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createJob( $creationParameters ){ return $this->APICallSub( '/jobs', array( 'create' => $creationParameters ), \"Could not create new job with query \" . $creationParameters['query'] . \" and operation \" . $creationParameters['operation'] ); }", "abstract public function makeJob();", "abstract...
[ "0.6920272", "0.6905722", "0.6905722", "0.6869542", "0.6808916", "0.65271425", "0.65184414", "0.64918077", "0.6489135", "0.6468623", "0.6425879", "0.64058304", "0.63938236", "0.63899404", "0.63753885", "0.6304669", "0.6256802", "0.6241474", "0.620155", "0.61789167", "0.607414...
0.0
-1
directory for file caching CONSTRUCTOR
public function __construct($type=NULL) { if (empty($type) AND !empty($GLOBALS['config']['cachetype'])) {$type = $GLOBALS['config']['cachetype'];} if (empty($type) OR !in_array($type,self::$cachetypes)) { $type = 'session'; } $this->type = $type; if ($thi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCacheDirectory() {}", "public function getCacheDir();", "function __construct($cache_file_name, $cache_file_time, $cache_file_extension, $cache_file_path){\n\n\t\tif($cache_file_extension == '')\t\n\t\t\t$cache_file_extension = '.cache';\n\t\t\n\t\tif(!is_dir($cache_file_path)){\n\t\t\t$oldu...
[ "0.7788206", "0.7619012", "0.7429395", "0.7242724", "0.7208065", "0.71026933", "0.7092043", "0.70384395", "0.7028229", "0.70098674", "0.694938", "0.6919277", "0.69001794", "0.6896177", "0.68958527", "0.6852048", "0.68491834", "0.6840578", "0.68060863", "0.67836326", "0.674682...
0.0
-1
Constructor of the class Model Add models that are defined in $config['model']. Set $this>_db to nex PDO instance. Call child::initilize()
public function __construct($param = null) { global $config; // add 'id' $this->addModels(array('id' => null)); // add from $config $this->addModels($config['model']); // open PDO try { $this->_db = new PDO( $config['pdo']['dsn'], $config['pdo']['username'], $config['pdo']['password'],...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct() {\n \n global $db;\n\n //assign PDO object to make available for all model classes\n $this->db = $db;\n }", "public function __construct()\n\t{\n\t\tif (!$this->model_name)\n\t\t{\n\t\t\t$this->model_name = str_replace('Model_', '', get_class($this));\n...
[ "0.7768048", "0.7734346", "0.7633476", "0.7535551", "0.74112004", "0.73367083", "0.7333681", "0.73034", "0.72455907", "0.7193576", "0.7163021", "0.7159667", "0.71505153", "0.70998585", "0.70953995", "0.70813733", "0.7072213", "0.7053972", "0.7043342", "0.7020615", "0.70125055...
0.6881065
43
function __construct / Table name management set Table name
public function setTable($table) { debugInfo(get_class($this)."->setTable($table)"); $this->_table = $table; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function setTableName();", "protected function setTable()\n {\n $class = explode('\\\\', get_called_class());\n $this->table = lcfirst(end($class)).'s';\n }", "private function setTableName()\n {\n // Get table name from name of entity if not defined\n if (!...
[ "0.85356915", "0.85183537", "0.8291887", "0.81927794", "0.8141812", "0.79658234", "0.7954695", "0.78453475", "0.77814645", "0.77814645", "0.77223575", "0.7694683", "0.7694683", "0.7694683", "0.76723367", "0.76707065", "0.7626351", "0.7604023", "0.75811476", "0.75577384", "0.7...
0.0
-1
function setTable / Models management Add models definition to $this>_models
public function addModels($models) { // add from parameters:$models foreach($models as $key => $value) { $this->_models[$key] = $value; } // foreach }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function tableModel()\n {\n }", "protected function setup_models()\n\t{\n\t}", "protected function setTable()\n {\n $class = explode('\\\\', get_called_class());\n $this->table = lcfirst(end($class)).'s';\n }", "public function setTable($tableName)\n {\n // Set i...
[ "0.7075179", "0.7045162", "0.6786308", "0.6765159", "0.6758826", "0.6669273", "0.6600089", "0.65749973", "0.65567106", "0.65528774", "0.6546158", "0.65121806", "0.64977515", "0.64907676", "0.6430233", "0.6427358", "0.6412675", "0.6384087", "0.6334028", "0.63135284", "0.631352...
0.0
-1
function addModels / CRUD : Create Read Update Delete Create a new row in Data Base INSERT INTO table (col1, col2) VALUES ('val1', 'val2');
public function create() { debugInfo(get_class($this)."->create()"); global $config; // Add set from $config['model'] {'_status', '_comment'} $this->set($config['model']); // INSERT $this->_query = $this->_insert(); // execute SQL request without Result (false) if ($this->_execute(false) === false) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insert_model($data)\n\t{\n\t\tglobal $db;\n\n\t\t$sql = \"INSERT INTO \". GARAGE_MODELS_TABLE .\" (make_id, model)\n\t\t\tVALUES ('\".$data['make_id'].\"', '\".$data['model'].\"')\";\n\n\t\tif(!$result = $db->sql_query($sql))\n\t\t{\n\t\t\tmessage_die(GENERAL_ERROR, 'Could Not Insert New Make', '', __LINE...
[ "0.6842515", "0.68207645", "0.6782058", "0.66117334", "0.6604003", "0.6517269", "0.65031475", "0.64627904", "0.6448752", "0.64450777", "0.6436098", "0.6430199", "0.6413193", "0.6352001", "0.6327885", "0.6324515", "0.6318823", "0.6317103", "0.631147", "0.6293889", "0.6293676",...
0.0
-1
create() Read datas in Data Base SELECT columns FROM table WHERE condition
public function read($columns = array('*')) { debugInfo(get_class($this).'->read($colmuns)'); debug('$columns', $columns); if (gettype($columns) == 'array') { // add where _status not DELETED $this->where('_status', '<', 255); // SELECT $this->_query = $this->_select($columns); // execute SQL r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function read(){\n \n //select all data\n $query = \"SELECT\n id, id, num_compte, cle_rib, duree_epargne, frais, solde, created\n FROM\n \" . $this->table_name . \"\n ORDER BY\n created\";\n \n ...
[ "0.68350196", "0.6540928", "0.64811474", "0.64436364", "0.64034134", "0.63169956", "0.62722605", "0.625203", "0.62485695", "0.62191164", "0.6210949", "0.6207055", "0.61821973", "0.61774945", "0.6151999", "0.614735", "0.6140958", "0.61199963", "0.61183214", "0.6094648", "0.609...
0.0
-1
read() Update datas in Data Base UPDATE table SET col1='val1', col2='val2' WHERE condition
public function update($id) { debugInfo(get_class($this)."->read($id)"); // add where _status not DELETED $this->where('id', '=', $id); // SELECT $this->_query = $this->_update(); $return = $this->_execute(false); debug('->update(), $return', $return); return $return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function update()\n {\n $queryString = 'UPDATE ' . $this->table . ' SET ';\n foreach ($this->data as $column => $value) {\n if ($column != self::ID) {\n $queryString .= $column . ' =:' . $column . ',';\n }\n }\n $queryString .= ' updated_a...
[ "0.72804505", "0.6987087", "0.69710433", "0.6954731", "0.6622494", "0.65963155", "0.65783167", "0.6530105", "0.6510925", "0.65071124", "0.65034616", "0.64861476", "0.64648145", "0.6448322", "0.643992", "0.64243627", "0.63846296", "0.63089395", "0.6296487", "0.628962", "0.6279...
0.0
-1
update() Delete data in Data Base Delete set the _status to 255
public function delete($id) { debugInfo(get_class($this)."->delete($id)"); // clear private variables $this->_clear(); $return = $this->set('_status', 255)->update($id); debug('->delete(), $return', $return); return $return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete() {\n $this->isdeleted = 1;\n $this->deleteduser = \\Yii::$app->user->getId();\n $this->deletedtime = date(\"Y-m-d H:i:s\");\n \n return parent::update(FALSE, ['isdeleted', 'deletedtime', 'deleteduser']);\n }", "function deleteT...
[ "0.69490266", "0.6895396", "0.67349416", "0.66336715", "0.6492244", "0.64740676", "0.6442557", "0.64202857", "0.6404068", "0.6362154", "0.63542485", "0.6352109", "0.6309286", "0.62875897", "0.6278759", "0.6266776", "0.62657243", "0.62543064", "0.6251172", "0.62450856", "0.624...
0.0
-1
delete() Clear all datas in Data Base
public function truncate() { debugInfo(get_class($this)."->truncate"); // clear private variables $this->_clear(); $this->_query = "TRUNCATE TABLE $this->_table;"; $return = $this->_execute(false); debug('->truncate(), $return', $return); return $return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteall() {\n\t\t$this->_query( \"DELETE FROM $0\" );\n\t}", "protected function clearAllPersistentData()\r\n {\r\n }", "function erase() {\n //delete * from database\n }", "public function clear()\n {\n $this->conn->flushDb();\n }", "public function clear()\r\n\t{\r...
[ "0.77941537", "0.77784026", "0.7759786", "0.7755928", "0.7698843", "0.76385784", "0.7627604", "0.7610106", "0.7601753", "0.7599697", "0.7589855", "0.75759554", "0.75436896", "0.75381684", "0.7478449", "0.7461462", "0.7461462", "0.7461462", "0.7436603", "0.74345714", "0.734449...
0.0
-1
raw() / Tools (has) has() Read where 'id' or array(columns => values) in Data Base, return true or false.
public function has($idorarray) { if (gettype($idorarray) == 'array') { foreach($idorarray as $key => $value) { $this->where($key, '=', $value); } // foreach } // if $return = $this->limit(1)->read(); // ... !=0) null: no result, false: issue if ($return != 0) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasSql(){\n return $this->_has(1);\n }", "private function getDbData()\n\t{\n\t\t//make sure we have an id....\n\t\tif ($this->id)\n\t\t{\n\t\t\t$result = db()->getRow(\"\n\t\t\t\tSELECT *\n\t\t\t\tFROM $this->tableName\n\t\t\t\tWHERE id = '$this->id'\n\t\t\t\");\n\n\t\t\tif (is_array($re...
[ "0.6726449", "0.61166793", "0.5860723", "0.58520633", "0.58520633", "0.57678014", "0.5678366", "0.5649908", "0.5608025", "0.55675197", "0.55455846", "0.553615", "0.5514127", "0.55093986", "0.5508543", "0.54952973", "0.5490948", "0.5481387", "0.5466435", "0.545866", "0.5457156...
0.5826988
5
getId() __get() Generic getter
public function __get($name) { if (isset($this->_result[0][$name])) { return $this->_result[0][$name]; } else if (($name == 'role') && (isset($this->_result[0]['_status']))) { return $this->_result[0]['_status']; } else { debugWarning('$this->_result[0][\''.$name.'\'] is not defined.'); return fa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getId(): mixed;", "function getId(){\n\t\t\treturn $this->$id;\n\t\t}", "public function getId()\n { // getter ID\n return $this->id;\n }", "abstract public function getId();", "abstract public function getId();", "abstract public function getId();", "abstract public funct...
[ "0.78174216", "0.7815378", "0.76353896", "0.7620736", "0.7620736", "0.7620736", "0.7598302", "0.7587366", "0.7578012", "0.7531423", "0.7522362", "0.7522362", "0.7522362", "0.75108683", "0.7509959", "0.7503954", "0.7460061", "0.7456528", "0.7456528", "0.7456528", "0.7456528", ...
0.0
-1
__get() / set(), where(), limit() Define attributes for Read() SQL : LIMIT Offset, Depth
public function limit($depth, $offset=0) { $this->_limit['depth'] = $depth; $this->_limit['offset'] = $offset; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$arg3=false,$secs2cache=0) \r\n\t {\r\n\t $offsetStr = ($offset >= 0) ? \" OFFSET $offset\" : '';\r\n\t $limitStr = ($nrows >= 0) ? \" LIMIT $nrows\" : '';\r\n\t return $secs2cache ?\r\n\t $this->CacheExecute($secs2cache,$sql.\"$limitStr$offset...
[ "0.64965904", "0.62303704", "0.60361505", "0.60327953", "0.59793574", "0.5876172", "0.586869", "0.58648276", "0.58648276", "0.58648276", "0.58648276", "0.58648276", "0.58347994", "0.58133674", "0.5728893", "0.5676856", "0.5670686", "0.5667905", "0.56673217", "0.5658921", "0.5...
0.0
-1
limit() Define attributes for Create( (columns,) VALUES ('Values',)) and Update (SET) SQL : (col1, col2) VALUES ('val1', 'val2') SQL : SET col1='val1', col2='val2'
public function set($column, $value = null) { if (gettype($column) == 'array') { foreach($column as $key => $value) { $this->_set[$key] = addslashes($value); } // foreach } else { $this->_set[$column] = addslashes($value); } // if return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract function getUpdateSQL($table, $data, $where, $values, $order, $limit);", "protected function setLimit() {\r\n if( $this->sqlLimit ) {\r\n $this->sql .= ' LIMIT ' . $this->sqlLimit;\r\n }\r\n }", "public function set_limit($limit);", "public function limit($limit) {...
[ "0.5810931", "0.5731352", "0.5613755", "0.5600523", "0.5457687", "0.53943217", "0.5384469", "0.53753144", "0.5268876", "0.5212638", "0.51852846", "0.51767033", "0.5161241", "0.515598", "0.5127167", "0.51013994", "0.5091897", "0.5081236", "0.50794166", "0.5078419", "0.5078199"...
0.0
-1
set() Define attributes for all SQL : WHERE col1 = 'val1' AND col2 = 'val2'
public function where($column, $condition, $value) { $this->_where[] = array('row' => $column, 'condition' => $condition, 'value' => $value); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setField()\n {\n $sql = '';\n $sql = rtrim($sql , ', ');\n\n foreach (array_keys($this->data) as $key){\n $sql .= '`' . $key . '` = ?, ';\n }\n\n $sql = rtrim($sql , ', ');\n return $sql;\n }", "protected function setConditions() {\r\n ...
[ "0.61162704", "0.60619783", "0.59788805", "0.596645", "0.5749322", "0.56257844", "0.56180847", "0.5610255", "0.5605645", "0.55929446", "0.558957", "0.5574879", "0.55322397", "0.55059254", "0.5477473", "0.547343", "0.5462049", "0.5461154", "0.5455579", "0.5452806", "0.5420863"...
0.0
-1
where() / Protected functions _clear() Clear private variables
protected function _clear() { $this->_query = null; $this->_set = null; $this->_where = null; $this->_limit = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clearWhere()\n {\n \t$this->_where = null;\n }", "protected function clear() {}", "private function clear() {\n $this->select = null;\n $this->where = null;\n $this->order_by = array();\n $this->group_by = '';\n $this->join = array();\n ...
[ "0.7692992", "0.7459287", "0.73276985", "0.70599455", "0.7014523", "0.6972879", "0.6941274", "0.6941274", "0.6941274", "0.6941274", "0.6941274", "0.6941274", "0.6941274", "0.6941274", "0.6941274", "0.6941274", "0.6941274", "0.6941274", "0.6941274", "0.6941274", "0.6941274", ...
0.77487195
0
clear() _isCleared() Test if all private variables are cleared
protected function _isCleared() { // Initialisation $return = true; // Tests if ($this->_query !== null) $return = false; if ($this->_set !== null) $return = false; if ($this->_where !== null) $return = false; if ($this->_limit !== null) $return = false; return $return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clear()\n\t{\n\t\t$classvars = get_class_vars(__CLASS__);\n\n\t\tforeach ($classvars as $property => $value)\n\t\t{\n\t\t\tif ('_s_' == substr($property, 0, 3)) // Don't touch static variables\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tunset($this->$property);\n\t\t\t$this->$property = $value;\n...
[ "0.72817653", "0.66775674", "0.66775674", "0.66775674", "0.6589037", "0.65865743", "0.6555389", "0.647018", "0.6465195", "0.64601016", "0.6452794", "0.6440897", "0.64340293", "0.64340293", "0.6346077", "0.63245875", "0.63097006", "0.63097006", "0.63097006", "0.63097006", "0.6...
0.6596902
4
_isCleared() _execute Prepare and execute the SQL request, private variables are clear.
protected function _execute($withResult = true) { debugInfo(get_class($this).'->_execute()'); debug('SQL Query', $this->_query); // Initialisation $this->_result = null; if ($this->_db === null) { trigger_error("Not connected to database"); return false; } // query if (($prepare = $this->_db->...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _isCleared()\n\t{\n\t\t// Initialisation\n\t\t$return = true;\n\n\t\t// Tests\n\t\tif ($this->_query !== null) $return = false;\n\t\tif ($this->_set !== null) $return = false;\n\t\tif ($this->_where !== null) $return = false;\n\t\tif ($this->_limit !== null) $return = false;\n\n\t\treturn $retur...
[ "0.6504512", "0.6327302", "0.6219213", "0.6196421", "0.6131964", "0.6121101", "0.6102313", "0.60774815", "0.60575825", "0.6050034", "0.6040376", "0.5987197", "0.59328216", "0.5924499", "0.59111875", "0.589943", "0.58817804", "0.5865836", "0.58650964", "0.5785517", "0.5778861"...
0.0
-1
_execute() Prepare INSERT request
protected function _insert() { // INSERT INTO 'table' $this->_query = 'INSERT INTO '.$this->_table.' ('; // * / row1, row2 $first = true; $vals = ''; foreach($this->_set as $key => $value) { $this->_query .= ($first) ? ('') : (', '); $vals .= ($first) ? ('') : (', '); $first = false; $this...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _prepareTransactionInsertStatement()\n {\n $stmtName = '_insertTransactionStatement';\n\n $prefix = $this->_tablePrefix;\n $queryString = 'INSERT INTO `'.$prefix.'Transactions` ';\n $queryString .= '(`transactionID`, `createDate`, `modifyDate`)';\n $queryStri...
[ "0.7092085", "0.7036482", "0.7028186", "0.7021255", "0.6834408", "0.6658364", "0.66447985", "0.65978837", "0.65733945", "0.6542247", "0.64734507", "0.6438996", "0.6424913", "0.64090914", "0.63708663", "0.6348044", "0.6334525", "0.6332908", "0.63192165", "0.6317543", "0.629960...
0.65067697
10
_insert() Prepare SELECT request
protected function _select($columns) { // SELECT $this->_query = 'SELECT '; // * / row1, row2 $first = true; foreach($columns as $column) { $this->_query .= ($first) ? ('') : (' , '); $first = false; $this->_query .= $column; } // foreach // FROM 'table' $this->_query .= ' FROM '.$this->...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function insertRequestToDb()\n\t\t{\n\t\t\t$this->columnsInfo->data_seek(0);\n\t\t\t$columns = \"\";\n\t\t\t$values = \"\";\n\t\t\twhile($rowColumn = $this->columnsInfo->fetch_assoc())//$info->fetch_row\n\t\t\t{\n\t\t\t\tif($rowColumn[\"EXTRA\"] == \"auto_increment\")\n\t\t\t\t\tcontinue;\n\t\t\t\t$columns ...
[ "0.6872749", "0.67728776", "0.67582923", "0.6688224", "0.6675366", "0.6658894", "0.66362786", "0.6635277", "0.6621784", "0.6609458", "0.6496079", "0.6424179", "0.64119554", "0.64111173", "0.64111173", "0.63930553", "0.63766605", "0.63717014", "0.63514924", "0.63142633", "0.62...
0.0
-1
_select() Prepare UPDATE request
protected function _update() { // UPDATE 'table' SET $this->_query = 'UPDATE '.$this->_table.' SET '; // * / row1, row2 $first = true; $vals = ''; foreach($this->_set as $key => $value) { $this->_query .= ($first) ? ('') : (', '); $this->_query .= "$key = '$value'"; $first = false; } // fore...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function SQL_UPDATE() {\r\n\t}", "private function update()\n {\n $queryString = 'UPDATE ' . $this->table . ' SET ';\n foreach ($this->data as $column => $value) {\n if ($column != self::ID) {\n $queryString .= $column . ' =:' . $column . ',';\n }\n ...
[ "0.68319464", "0.6825938", "0.67059636", "0.66438085", "0.6542503", "0.64952064", "0.6487019", "0.645776", "0.6394323", "0.6340534", "0.6224786", "0.62000436", "0.61739296", "0.61639744", "0.6144187", "0.6143872", "0.61342597", "0.6132152", "0.6125644", "0.61115175", "0.61053...
0.6381834
9
Returns the name of this type.
public function getName() { return 'international_transfer'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getName(): string {\n\t\t\treturn $this->type;\n\t\t}", "public function getTypeName()\n {\n return $this->type_name;\n }", "public function name() {\n\t\t\treturn $this->_name . ' ('.self::$type_name[$this->_type].')';\n\t\t}", "public function getTypeName()\n {\n retu...
[ "0.8866213", "0.88208175", "0.8817157", "0.87542146", "0.855894", "0.8204096", "0.8155769", "0.8155769", "0.8136834", "0.8110998", "0.80263054", "0.8010495", "0.79981846", "0.79853827", "0.79727006", "0.79586303", "0.79586303", "0.79586303", "0.79586303", "0.79586303", "0.795...
0.0
-1
Load Sentry and set the current user (if logged in).
public function __construct($config, DB $db) { // config $this->config = $config; // injected dependencies $this->db = $db; // load Sentry $this->load_sentry(); // get user; Sentry::check() takes the longest time of the Sentry operations $this->user = Sentry::check() ? Sentry::getUser...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _initAuth()\n {\n $dm = Registry::getInstance()->get('dm');\n $user = $dm->getRepository('Domain\\User\\Entity\\User')->find('4de999713eecad69a02e4145');\n \n // Simulate logged in User.\n Registry::getInstance()->set('user', $user);\n }", "private function __setUser() {\n ...
[ "0.61850625", "0.60514975", "0.5884458", "0.58789784", "0.5803547", "0.5790105", "0.5765164", "0.5731039", "0.57177144", "0.57106185", "0.56393164", "0.5635627", "0.5614881", "0.56049716", "0.5587977", "0.5529825", "0.5433928", "0.54193777", "0.54134107", "0.5405607", "0.5405...
0.0
-1
Load the Sentry class. This is a helper method for the constructor.
protected function load_sentry() { // autoload script generated by Composer require_once __DIR__ . '/../vendor/autoload.php'; // alias the Sentry class if (!class_exists('Refiler\Sentry')) { class_alias('\Cartalyst\Sentry\Facades\Native\Sentry', 'Refiler\Sentry'); } // connect the databa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function __classLoaded()\n {\n if (!self::$issuer) {\n self::$issuer = Site::getConfig('primary_hostname');\n }\n }", "public function __construct()\n\t{\n\t\t$this->beforeFilter('sentry');\n\t\tparent::__construct();\n\t}", "public static function boot()\n {\n ...
[ "0.61902905", "0.5855134", "0.572969", "0.5682205", "0.56754714", "0.55780756", "0.5554887", "0.5509152", "0.54873896", "0.54734904", "0.54405946", "0.5427754", "0.54247457", "0.54032004", "0.54017866", "0.53900266", "0.53860384", "0.534856", "0.5335301", "0.5333027", "0.5319...
0.7536318
0
Use this method in cases where the user isn't already logged in.
public function set_user($user) { $this->user = $user; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function LoggedIn() {\n\t\tif (empty($_SESSION['current_user'])) {\n\t\t\tnotfound();\n\t\t}\n\t}", "public static function already_logged_in() {\n\t\tif (self::logged_in()) {\n\t\t\tSession::setFlash(\"alert-danger\", \"You have already logged in.\");\n\t\t\theader(\"Location: index.php\");\n\t\t}...
[ "0.76916116", "0.7543212", "0.7242442", "0.7195002", "0.7195002", "0.71808183", "0.71346706", "0.71233416", "0.711542", "0.70456046", "0.7024871", "0.69646275", "0.692456", "0.6911619", "0.6880006", "0.68608034", "0.68314445", "0.6817769", "0.6799506", "0.679175", "0.6790527"...
0.0
-1
Sentry stores 1 for allow and 1 for deny. We convert these values for JSON output.
public static function encode_permissions($permissions) { return array_map(function ($permission) { return $permission === 1 ? true : false; }, $permissions); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllowSpecific();", "public function getExplicitlyAllowAndDeny() {}", "public function getAllow() {\r\n return $this->allow;\r\n }", "public static function allows ()\r\n {\r\n $acl = Session::get('acl');\r\n return $acl['allows'];\r\n }", "public function ge...
[ "0.5738114", "0.55978864", "0.5468351", "0.54662156", "0.53759736", "0.53389734", "0.5172044", "0.51574486", "0.5147866", "0.512583", "0.5124828", "0.50300676", "0.5029726", "0.50255734", "0.49913794", "0.49835142", "0.49746922", "0.49701563", "0.49554238", "0.4940942", "0.49...
0.0
-1
Should be called only by admins.
public function get_user_arrays() { $users = Sentry::findAllUsers(); $user_arrays = array(); foreach ($users as $user) { $user_array = array( 'id' => $user->getId(), 'email' => $user->email, 'permissions' => self::encode_permissions($user->getMergedPermissions()) ); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function adminOnly();", "public function adminOnly();", "public function relatorio4(){\n $this->isAdmin();\n }", "public function admin_page()\n {\n }", "public function admin_page()\n {\n }", "function admin_member() {\n\n\t\t}", "public function admin_action() {...
[ "0.69889283", "0.69889283", "0.67946607", "0.66623074", "0.66623074", "0.66188973", "0.6580513", "0.6580513", "0.6517171", "0.64882946", "0.6481027", "0.64737976", "0.6446926", "0.6443373", "0.64427257", "0.6364176", "0.6364176", "0.6364176", "0.63623494", "0.6339837", "0.633...
0.0
-1
Transform the resource into an array.
public function toArray($request) { $center = Center::where(['code' => $this->center_code])->first(); $disaster = Disaster::find($this->disaster_id); $household = Household::where(['center_code' => $this->code])->get(); return [ 'code' => $this->code, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toArray(): array\n {\n if (is_null($this->resource)) {\n return [];\n }\n\n return is_array($this->resource)\n ? $this->resource\n : $this->resource->toArray();\n }", "public function toArray(): array\n {\n if (is_null($this->r...
[ "0.7750928", "0.7750928", "0.7715773", "0.75906307", "0.7310379", "0.7138024", "0.7134791", "0.7096877", "0.7096877", "0.70968604", "0.70968604", "0.70968604", "0.70968604", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.7...
0.0
-1
Run the database seeds.
public function run() { DB::table('hotels_images')->insert([ 'image_url' => "/img/Airbnb.jpeg", 'hotel_id' => 1, ]); DB::table('hotels_images')->insert([ 'image_url' => "/img/Airbnb_building.jpeg", 'hotel_id' => 1, ]); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n fact...
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.78414...
0.0
-1
Initialize properties before running the controller methods (actions), so they are available to our action.
public function before() { // Run anything that needs to run before this. parent::before(); if ($this->auto_render) { // Initialize empty values $this->template->title = ''; $this->template->meta_keywords = ''; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function initializeAction() {}", "protected function initializeAction() {}", "protected function initializeAction() {}", "protected function initializeController() {}", "public function __construct() {\n\t\t\t$this->init_globals();\n\t\t\t$this->init_actions();\n\t\t}", "public static function ...
[ "0.751365", "0.751365", "0.7513643", "0.73645747", "0.73176324", "0.7315663", "0.7208361", "0.72070694", "0.72070694", "0.72070694", "0.72070694", "0.72070694", "0.7187216", "0.7187216", "0.71402794", "0.7129818", "0.7116813", "0.71034473", "0.7092001", "0.707154", "0.7015991...
0.0
-1
Fill in default values for our properties before rendering the output.
public function after() { if ($this->auto_render) { // Define defaults $styles = array('assets/css/main.css' => 'screen'); $scripts = array('assets/js/jquery-1.10.1.js'); // Add defaults to template variables. $this->templa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function applyDefaultValues()\n\t{\n\t\t$this->points = '0';\n\t\t$this->type = 0;\n\t\t$this->hidden = 0;\n\t\t$this->relationship_status = 0;\n\t\t$this->show_email = 1;\n\t\t$this->show_gender = 1;\n\t\t$this->show_hometown = 1;\n\t\t$this->show_home_phone = 1;\n\t\t$this->show_mobile_phone = 1;\n\t\t$th...
[ "0.7141274", "0.70977855", "0.69782597", "0.68649", "0.68430555", "0.6833718", "0.6804665", "0.6772497", "0.6706307", "0.66837925", "0.66685295", "0.6579958", "0.65132457", "0.6499797", "0.649743", "0.64423496", "0.642506", "0.6388732", "0.63874006", "0.63778687", "0.6369626"...
0.0
-1
endregion This function converts to a UTF8 string, removes all redundant spaces, tabs, etc. and returns all usable code after the closing head tag.
protected static function cleanCode($html) { $html = str_replace(Parser::REMOVE_HTML, '', $html); $html = preg_replace('!\s+!', ' ', $html); $html = iconv("UTF-8", "UTF-8//IGNORE", utf8_decode($html)); $html = trim(preg_replace('/.*<\/head>/', '', $html)); return $html; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function removeEncodingDeclaration() {\n\t\t$this->processedClassCode = preg_replace(self::PATTERN_ENCODING_DECLARATION, '', $this->processedClassCode);\n\t}", "function html_to_utf8 ($data)\r\n {\r\n return preg_replace(\"/\\\\&\\\\#([0-9]{3,10})\\\\;/e\", '_html_to_utf8(\"\\\\1\")', $data);\r\n ...
[ "0.6023787", "0.59477615", "0.58602923", "0.5858104", "0.5726064", "0.56438816", "0.5616145", "0.5614433", "0.56082714", "0.55887884", "0.55876464", "0.5582783", "0.55038685", "0.54936403", "0.5480618", "0.5478454", "0.5472869", "0.54432523", "0.54317075", "0.5403369", "0.538...
0.5744224
4
This function fixes some last issues such as image URLs, '' blocks are replaced with '' blocks, etc.
protected static function finalizePart($part) { $part = self::cleanCode($part); $file = new DOMDocument(); libxml_use_internal_errors(true); $file->loadHTML($part); $images = $file->getElementsByTagName('img'); foreach ($images as $image) { $imageStart = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _clean_bbcode($str)\n{\n\t$str = preg_replace('/\\[img:[a-z0-9]{10,}\\].*?\\[\\/img:[a-z0-9]{10,}\\]/', ' ', $str);\n\t$str = preg_replace('/\\[\\/?url(=.*?)?\\]/', ' ', $str);\n\t$str = preg_replace('/\\[\\/?[a-z\\*=\\+\\-]+(\\:?[0-9a-z]+)?:[a-z0-9]{10,}(\\:[a-z0-9]+)?=?.*?\\]/', ' ', $str);\n\treturn $s...
[ "0.6392453", "0.6077643", "0.59694445", "0.596433", "0.5857513", "0.5848073", "0.57800984", "0.5645394", "0.5629749", "0.5612482", "0.56060094", "0.5605865", "0.55846745", "0.55782247", "0.5564736", "0.55591226", "0.55472636", "0.55447125", "0.5544226", "0.5532858", "0.552686...
0.0
-1
AUTHORIZATION / /Author: Sivkovych Maksym /Developed: 01.09.2015 /
function gen_rand_id() { return ( time() + rand( rand(10000,50000), rand(50000,99000) ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n return true; // I do not know how to create authorisation for the back-end and the time constraints of the project did not allow me to get to this stage either. It is something I would like to learn to do in the future however.\n }", "public function testGetAuthorizationPro...
[ "0.6040563", "0.600226", "0.5906152", "0.59021276", "0.58676934", "0.5798292", "0.5761906", "0.5750662", "0.5739944", "0.5697317", "0.5660763", "0.56556743", "0.5636695", "0.56342965", "0.56159836", "0.5612847", "0.5605602", "0.5605602", "0.5604172", "0.55916196", "0.55916196...
0.0
-1
das Segment soll nur gezeichnet werden, wenn der Nutzer eingeloggt ist
public static function show($console, $result, $data) { if (!Einstellungen::$accessAllowed) { return; } Installation::log(array('text' => Installation::Get('main', 'functionBegin'))); $text = ''; if (!$console) { $text .= Design::erstelleBeschreibung($con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actividadesPorSegmento()\n {\n //\n }", "static function get_segment($id){\n\t\t$start_marker = \"#zazzle_acc_start \".$id;\n\t\t$end_marker = \"#zazzle_acc_end \".$id.\"\\n\";\n\t\t\n\t\t$start = strpos(self::$FDATA, $start_marker);\n\t\t$end = strpos(self::$FDATA, $end_marker);\n\t...
[ "0.5560489", "0.5525527", "0.548117", "0.53180784", "0.5263738", "0.52418303", "0.5204428", "0.52011377", "0.5194929", "0.5153064", "0.5111386", "0.50660557", "0.50550467", "0.50539845", "0.49889225", "0.49888533", "0.4983876", "0.49612054", "0.4885053", "0.48831785", "0.4846...
0.0
-1
Returns an array of all supported encodings
function mb_list_encodings() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getSupportedEncodings()\n {\n return static::$encodings;\n }", "public function getEncodings(): array\n {\n if (null !== $this->encodings) {\n return $this->encodings;\n }\n\n return $this->encodings = array_keys(AcceptHeader::fromString($this->header('accept-en...
[ "0.8505918", "0.79961467", "0.78899133", "0.72097003", "0.6886738", "0.681051", "0.6729014", "0.6624039", "0.660498", "0.6536415", "0.6493128", "0.63531595", "0.6351361", "0.61397177", "0.6139451", "0.61228967", "0.60637647", "0.60637647", "0.6062227", "0.6058838", "0.6045615...
0.708968
4
Display a listing of the resource.
public function index() { if (Session::has('unit_user_id')) { $perspectives = Perspective::all(); $id = Session::get('unit_user_id', 'default'); $user = UserUnit::where('UserUnitID', $id) ->first(); $unit_objectives = UnitObjective::where('UserUnitID', '=', $user->UnitID)->get(); return view('un...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store() { // }
{ "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.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245...
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "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.7855196", "0.76957726", "0.7273917", "0.7241426", "0.71717227", "0.7064183", "0.70528984", "0.69836885", "0.694763", "0.69469565", "0.6941572", "0.69301945", "0.6903868", "0.68989486", "0.68989486", "0.68787694", "0.68641657", "0.6860115", "0.6857286", "0.68464494", "0.683...
0.0
-1
Update the specified resource in storage.
public function update($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890...
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
Create a new policy instance.
public function __construct() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createPolicy() {\n\t\tthrow new CmisNotImplementedException(\"createPolicy\");\n\t}", "public function testPolicyCanBeCreated()\n {\n $policy = factory(App\\Models\\Policy::class)->create([\n 'title' => 'Administrator',\n ]);\n\n $this->assertEquals($policy->tit...
[ "0.69238234", "0.63803977", "0.63180053", "0.6157489", "0.59963197", "0.5828844", "0.5753017", "0.5750766", "0.57240343", "0.5712267", "0.57120466", "0.5633073", "0.5629794", "0.5476492", "0.5414451", "0.536653", "0.5354097", "0.5354097", "0.5354097", "0.53313726", "0.5293763...
0.0
-1
Get the segment ID for tracking.
function get_segment_id() : string { if ( defined( 'ALTIS_SEGMENT_ID' ) ) { return ALTIS_SEGMENT_ID; } return SEGMENT_ID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSegmentID()\n {\n return isset($this->SegmentID) ? $this->SegmentID : null;\n }", "public function getSegmentId()\n {\n return $this->segment_id;\n }", "protected function getTrackedClientId() {\n /*if (isset($_COOKIE['_ga'])) {\n list($version,$do...
[ "0.8050756", "0.80341816", "0.66298974", "0.6371639", "0.6354863", "0.6314366", "0.6285118", "0.62657547", "0.62021095", "0.6185875", "0.61442864", "0.61403924", "0.61395913", "0.60435605", "0.6026777", "0.59958154", "0.5961211", "0.59377456", "0.58873844", "0.5853302", "0.58...
0.7577411
2
Track an event in Segment.io.
function track( array $message ) { if ( ! initialize() ) { return; } // Add user ID if missing. if ( ! isset( $message['userId'] ) ) { $user = get_segmentio_user_details(); $message['userId'] = $user['id']; } Segment::track( $message ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function track($event, $properties=array()) {\n $params = array(\n 'event' => $event,\n 'properties' => $properties\n );\n\t\t//Check if token is passed in properties array\n if (!isset($params['properties']['token'])){\n $params['properties']['token'] = $this-...
[ "0.63427", "0.6148601", "0.5968593", "0.5944442", "0.5856823", "0.5728856", "0.5685747", "0.5578267", "0.55767316", "0.5522375", "0.55001205", "0.54672366", "0.5443277", "0.54281765", "0.54256284", "0.5420515", "0.53927517", "0.53385603", "0.53385603", "0.5315379", "0.5307801...
0.682682
0
Check user has opted in to tracking.
function is_user_opted_in( ?WP_User $user = null ) : ?bool { if ( ! $user ) { $user = wp_get_current_user(); } if ( ! $user->exists() ) { return null; } $did_opt_in = get_user_meta( $user->ID, META_OPT_IN, true ); if ( $did_opt_in === '' ) { return null; } return intval( $did_opt_in ) === 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function track_clicks_allowed_by_user(){\n if (!$this->get_config('track_visits_of_loggedin_users',true) && serendipity_userLoggedIn()){\n return false;\n }\n return true;\n }", "public function canManageTracking();", "public function isTrackingAllowed() {\n\t $data = Mage...
[ "0.682192", "0.6804307", "0.6787952", "0.66602725", "0.6555752", "0.6413919", "0.6180687", "0.6172894", "0.6157108", "0.6113443", "0.60877657", "0.6081415", "0.5957942", "0.59385", "0.5897497", "0.5891258", "0.58445394", "0.5812008", "0.57971454", "0.5794397", "0.5784385", ...
0.5652171
27
Return an automatic, pseudoanonymous ID for the current user.
function get_anonymous_id() : string { $current_user = wp_get_current_user(); return substr( sha1( $current_user->ID . $current_user->user_registered ), 0, 8 ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAnonymousId();", "public function getAnonymousUserId()\n {\n return $this->auser_id;\n }", "public function getAnonymousId()\n {\n return $this->anonymousId;\n }", "public function getAnonymousId()\n {\n if (is_null($this->anonymousId)) {\n /*...
[ "0.7870917", "0.77441645", "0.7702843", "0.7604044", "0.73181295", "0.7121897", "0.7109679", "0.7007477", "0.6987701", "0.6909104", "0.686712", "0.68649423", "0.68448615", "0.6820117", "0.67553055", "0.67315423", "0.67232025", "0.66960144", "0.6695697", "0.6677776", "0.666340...
0.8327695
0
Return a known ID for the current user.
function get_id() : string { $current_user = wp_get_current_user(); return sha1( $current_user->user_email ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_user_id();", "private function getuserid() {\n\n $user_security = $this->container->get('security.context');\n // authenticated REMEMBERED, FULLY will imply REMEMBERED (NON anonymous)\n if ($user_security->isGranted('IS_AUTHENTICATED_FULLY')) {\n $user = $this-...
[ "0.81837624", "0.7959843", "0.7947306", "0.79226106", "0.79176784", "0.7912601", "0.77929664", "0.7789738", "0.7788548", "0.77667975", "0.77540994", "0.7739611", "0.77378976", "0.77150416", "0.7706728", "0.76758677", "0.7648391", "0.76423866", "0.7637146", "0.7634667", "0.762...
0.78142565
6
Get details for the current user.
function get_segmentio_user_details() : array { $current_user = wp_get_current_user(); $auto_id = get_anonymous_id(); $did_opt_in = is_user_opted_in( $current_user ); if ( ! $did_opt_in ) { return [ 'id' => $auto_id, 'opt_in' => false, ]; } $email = $current_user->user_email; $id = get_id(); if ( Al...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDetails()\n {\n if($user = $this->loadUser())\n \treturn $user;\n }", "public function getAuthUserDetail()\n {\n return $this->user;\n }", "public function getUserDetails()\n {\n try\n {\n $user = \\App\\User::find(getLoggedInUser(...
[ "0.8352392", "0.7788373", "0.7716951", "0.75918716", "0.75756943", "0.7545161", "0.752918", "0.7451287", "0.7428635", "0.74225134", "0.74141705", "0.7406303", "0.740065", "0.73693043", "0.73686904", "0.73157644", "0.73024726", "0.7301523", "0.7286151", "0.72806305", "0.725474...
0.0
-1
Get a unique ID for the current (local) environment. Generates a persistent, unique ID for the current local environment.
function get_local_install_id() : ?string { if ( Altis\get_environment_type() !== 'local' ) { return null; } $id = get_network_option( null, 'altis_tracking_id', null ); if ( ! empty( $id ) ) { return $id; } if ( is_multisite() ) { // Hash the registration date of the first site to get a unique ID. $sit...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getCurrentID() {\n return Session::get(Privilege::SESSION_NAME_ID);\n }", "protected function _createUniqueId()\n {\n $id = '';\n $id .= function_exists('microtime') ? microtime(true) : (time() . ' ' . rand(0, 100000));\n $id .= '.' . (function_exis...
[ "0.69771034", "0.6934184", "0.68988323", "0.68279135", "0.68034136", "0.6796245", "0.6605553", "0.6585326", "0.6580314", "0.657788", "0.65646917", "0.6418477", "0.6407989", "0.64027995", "0.6381688", "0.63759744", "0.63708293", "0.6362983", "0.6362551", "0.63514555", "0.63443...
0.7294877
0
Get current Altis environment details.
function get_environment_details() : array { $id = Altis\get_environment_name(); $type = Altis\get_environment_type(); if ( $type === 'local' ) { // Create distinct_id (important for Mixpanel). $id = get_local_install_id(); } $traits = [ 'site_name' => get_site_option( 'site_name', get_option( 'blogname', '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEnvironment();", "public function getEnvironment();", "public function getEnvironment();", "public function getEnvironment();", "public function getEnvironment();", "public function getEnvironment();", "public static function environment() {\n return self::$environment;\n ...
[ "0.774839", "0.774839", "0.774839", "0.774839", "0.774839", "0.774839", "0.75275433", "0.7482912", "0.74800575", "0.74585325", "0.7410558", "0.7407789", "0.7353706", "0.7314868", "0.7263809", "0.7260313", "0.7259166", "0.7250086", "0.72379804", "0.71902704", "0.71727043", "...
0.6941423
34
Identify user to segment.io.
function render_identity_tag() { $user = get_segmentio_user_details(); ?> <script> (function () { var segment_user = <?php echo wp_json_encode( $user ) ?>; if ( ! segment_user.opt_in ) { analytics.setAnonymousId( segment_user.id ); } else { analytics.identify( segment_user.id, segment_user.traits ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function identifyUser() {\n}", "function get_segmentio_user_details() : array {\n\t$current_user = wp_get_current_user();\n\t$auto_id = get_anonymous_id();\n\t$did_opt_in = is_user_opted_in( $current_user );\n\n\tif ( ! $did_opt_in ) {\n\t\treturn [\n\t\t\t'id' => $auto_id,\n\t\t\t'opt_in' => false,\n\t\t];\n\t}...
[ "0.76261485", "0.6365902", "0.6063815", "0.60418403", "0.6039321", "0.6039321", "0.6039321", "0.6039321", "0.6039321", "0.6039321", "0.6039321", "0.600522", "0.59909755", "0.5906257", "0.5874889", "0.5864831", "0.5862975", "0.5855472", "0.5855472", "0.5831679", "0.58117414", ...
0.61779064
2
Opt in or out of tracking.
function opt_in( bool $did_opt_in, ?WP_User $user = null ) { $user = $user ?? wp_get_current_user(); update_user_meta( $user->ID, META_OPT_IN, $did_opt_in ? 1 : 0 ); // Alias previously unknown user if they opted in. if ( $did_opt_in ) { if ( ! initialize() ) { return; } Segment::alias( [ 'userId' => g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function maybe_track_usage() {\n\n\t\t/** checking optin state */\n\t\tif ( 'yes' == self::get_optIn_state() ) {\n\t\t\t$data = self::collect_data();\n\n\t\t\t//posting data to api\n\t\t\tXL_API::post_tracking_data( $data );\n\t\t}\n\t}", "public function do_not_track()\n\t{\n\t\tstatic $shifted;\n...
[ "0.7023692", "0.6745536", "0.6483121", "0.6312687", "0.6303043", "0.6269456", "0.6262989", "0.60165125", "0.5997165", "0.59912074", "0.588335", "0.57987016", "0.577245", "0.56777954", "0.5634966", "0.5484578", "0.54803425", "0.5477424", "0.54265904", "0.53685606", "0.53452456...
0.4661481
79
Enqueue CSS for opt in UI.
function enqueue_scripts() { if ( ! is_null( is_user_opted_in() ) ) { return; } wp_enqueue_style( 'altis-telemetry', plugins_url( 'assets/opt-in.css', dirname( __FILE__, 2 ) ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_css() \n {\n if( $this->options['use-css-file'] ) {\n wp_register_style( 'bbquotations-style' , $this->plugin_url . 'bbquotations-style.css');\n wp_enqueue_style( 'bbquotations-style' );\n } \n }", "public function styles() {\n\t\t\n\t\twp_register_style( 'tinymassmaile...
[ "0.7699237", "0.7510832", "0.75066817", "0.75066817", "0.75066817", "0.75066817", "0.74975693", "0.74897283", "0.7461102", "0.7436818", "0.7392922", "0.7386229", "0.73840547", "0.73785543", "0.73676395", "0.73404664", "0.7324752", "0.7301917", "0.7291882", "0.7284482", "0.724...
0.0
-1
Display the UI for opting in / out of telemetry.
function render_opt_in_form() { $user = wp_get_current_user(); // Don't render if they've made a decision. if ( ! is_null( is_user_opted_in( $user ) ) ) { return; } ?> <div class="welcome altis-telemetry-opt-in"> <h2><?php echo esc_html( sprintf( __( 'Hi %s!', 'altis' ), $user->display_name ) ); ?></h2> <...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handle_opt_in_form() {\n\tif ( isset( $_POST['altis_telemetry_opt_in'] ) && check_admin_referer( 'altis_telemetry_opt_in' ) ) {\n\t\topt_in( true );\n\t}\n\tif ( isset( $_POST['altis_telemetry_opt_out'] ) && check_admin_referer( 'altis_telemetry_opt_in' ) ) {\n\t\topt_in( false );\n\t}\n}", "public func...
[ "0.6087266", "0.59550387", "0.5897626", "0.56828916", "0.5653901", "0.5604799", "0.558112", "0.5469646", "0.54535294", "0.54532754", "0.5440054", "0.5440054", "0.53906614", "0.5389093", "0.5384395", "0.53698206", "0.5359816", "0.53589535", "0.5353292", "0.5351351", "0.5330402...
0.6071838
1
Fires after the 'About the User' settings table on the 'Edit User' screen.
function user_profile_options( WP_User $user ) : void { ?> <table class="form-table"> <tr> <th> <label for="altis_telemetry_opt_in"><?php esc_html_e( 'Altis Telemetry', 'altis' ); ?></label> </th> <td> <input type="checkbox" name="altis_telemetry_opt_in_toggle" id="altis_telemetry_opt_in" <?php che...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionSettings()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t\n\t\t\n\t\t$this->checkUser();\n\t\t\n\t\t$record = SiteUser::model()->findByAttributes(array('id'=> Yii::app()->user->id));\n\t\t\n\t\tif($record===null)\n\t\t\t\tthrow new CHttpException(404, Yii::t('a...
[ "0.6699961", "0.6699569", "0.64587224", "0.644287", "0.6365173", "0.6298299", "0.62842834", "0.624624", "0.6156812", "0.61467344", "0.6112758", "0.60756165", "0.6050464", "0.6047492", "0.60346025", "0.6023177", "0.60222626", "0.5996846", "0.5976023", "0.59676117", "0.5966703"...
0.0
-1
Handle opt in form submission.
function handle_opt_in_form() { if ( isset( $_POST['altis_telemetry_opt_in'] ) && check_admin_referer( 'altis_telemetry_opt_in' ) ) { opt_in( true ); } if ( isset( $_POST['altis_telemetry_opt_out'] ) && check_admin_referer( 'altis_telemetry_opt_in' ) ) { opt_in( false ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handle_options()\r\n {\r\n $options = $this->get_options();\r\n \r\n if (isset($_POST['submitted'])) {\r\n \t\t\r\n \t\t//check security\r\n \t\tcheck_admin_referer('snazzy-nonce');\r\n \t\t\r\n ...
[ "0.66251546", "0.6449752", "0.6154613", "0.6076456", "0.59473896", "0.59358746", "0.58982074", "0.588039", "0.5877093", "0.58577025", "0.5822784", "0.580767", "0.5758748", "0.5723165", "0.56965995", "0.56743944", "0.56427306", "0.56351435", "0.5632585", "0.5610411", "0.558467...
0.6757193
0
Handle user profile opt in field.
function handle_profile_form( int $user_id ) { if ( ! check_admin_referer( 'update-user_' . $user_id ) ) { return; } if ( isset( $_POST['altis_telemetry_opt_in_toggle'] ) ) { opt_in( true ); } else { opt_in( false ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_profile($field, $user = \\false)\n {\n }", "function user_profile_options( WP_User $user ) : void {\n\t?>\n\t<table class=\"form-table\">\n\t\t<tr>\n\t\t\t<th>\n\t\t\t\t<label for=\"altis_telemetry_opt_in\"><?php esc_html_e( 'Altis Telemetry', 'altis' ); ?></label>\n\t\t\t</th>\n\t\t\t<td>\n\t...
[ "0.66059905", "0.65691125", "0.6521306", "0.6516343", "0.6394412", "0.6309663", "0.6266442", "0.61459637", "0.6057598", "0.6057521", "0.6040821", "0.60265225", "0.5935147", "0.59245217", "0.5901184", "0.5896457", "0.58850336", "0.587851", "0.586746", "0.58338934", "0.58022976...
0.7018234
0
Register the welcome and tracking opt in API route.
function register_api_routes() { register_rest_route( Altis\API_NAMESPACE, '/telemetry', [ 'methods' => WP_REST_Server::EDITABLE, 'permission_callback' => function () { return is_user_logged_in(); }, 'callback' => __NAMESPACE__ . '\\handle_telemetry_endpoint', 'args' => [ 'opt_in' => [ 'type' => 'b...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_api_endpoints() {\n\n\t\tregister_rest_route( 'nock/v1', '/messages', array(\n\t\t\t'methods' => array( 'POST' ),\n\t\t\t'callback' => array( $this, 'send_message' ),\n\t\t) );\n\n\t\tregister_rest_route( 'nock/v1', '/accounts', array(\n\t\t\t'methods' => array( 'GET' ),\n\t\t\t'callback' ...
[ "0.6447058", "0.63742703", "0.63714004", "0.6355609", "0.6292687", "0.6291114", "0.6284822", "0.6265994", "0.62515867", "0.62511176", "0.62511176", "0.62511176", "0.62511176", "0.62511176", "0.62511176", "0.62511176", "0.62511176", "0.62511176", "0.62511176", "0.62511176", "0...
0.67236173
0
Handle telemetry API request.
function handle_telemetry_endpoint( WP_REST_Request $request ) { $current_user = wp_get_current_user(); $did_opt_in = $request['opt_in']; opt_in( $did_opt_in ); $data = [ 'id' => $current_user->ID, 'tracking' => [ 'opt_in' => $did_opt_in, ], ]; if ( $did_opt_in ) { $data['tracking_data'] = get_segmen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function handleDiagnosticsRequest()\n {\n $statusApiConfigurator = new Webinterpret_Connector_StatusApi_StatusApiConfigurator(Mage::app(), Mage::getConfig());\n\n $statusApi = $statusApiConfigurator->getExtendedStatusApi();\n\n $json = $statusApi->getJsonTestResults();\n head...
[ "0.62899756", "0.6232049", "0.59823304", "0.5879962", "0.5879962", "0.5879962", "0.5814393", "0.576273", "0.56408036", "0.56368893", "0.56304526", "0.556917", "0.5565125", "0.5479541", "0.5459264", "0.545608", "0.54184735", "0.5416163", "0.54149014", "0.540092", "0.5338434", ...
0.68948895
0
Push post save event to Segment.io.
function track_new_or_updated_content( $post_id, $post, $update ) { // Bail on auto-save. if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { return; } if ( $update ) { $action = 'update'; } else { $action = 'create'; } track( [ 'event' => 'Content', 'properties' => [ 'content_type' => $post->p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function postSave() {}", "public function save(Post $post): void;", "public function postSaveCallback()\n {\n $this->performPostSaveCallback();\n }", "public function postSaveCallback()\n {\n $this->performPostSaveCallback();\n }", "public function postSave(EntityEvent $eve...
[ "0.6973555", "0.6441275", "0.6439647", "0.6439647", "0.6361393", "0.633063", "0.6325109", "0.62515664", "0.62338334", "0.61972123", "0.61840725", "0.60977197", "0.6078189", "0.6038672", "0.60357434", "0.60225534", "0.60147965", "0.60147965", "0.60143113", "0.6001135", "0.5988...
0.0
-1
private $url =" ;
public function __CONSTRUCT($db) { $this->db = $db; $this->response = new Response(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUrl(){\n return $this->url;\n }", "public function __construct($url){\n $this->url = $url;\n }", "public function url(){\r\n\t\treturn $this->_url;\r\n\t}", "function __construct($url)\n {\n $this->url = $url;\n }", "public function getURL() { return $this->u...
[ "0.7639105", "0.74509156", "0.7385742", "0.7197455", "0.71653765", "0.71431744", "0.7049146", "0.6993383", "0.6992549", "0.69677305", "0.69405067", "0.6939149", "0.69346946", "0.69346946", "0.6918815", "0.68952006", "0.68952006", "0.68952006", "0.6893935", "0.6893935", "0.689...
0.0
-1
Run the database seeds.
public function run() { $site = factory(Site::class)->create([ 'user_id' => User::first()->id, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n fact...
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.78414...
0.0
-1
VIEW FUNCTIONS Robert / 120218 RECIPE FUNCTIONS
public function view_recipe($id){ $query = $this->db->query(" SELECT re.id re_id, re.name re_nm, re.price re_prc, re.instructions re_ins, re.cooking_time re_ct, re.servings re_se, re.image re_im, re.status re_st, re.created_date re_cd, re.updated_date re_ud, rg.name rg_nm, rg.id rid, co.name co_nm, co.id cid, ing....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function view()\n\t{\n\t\t// TODO Implement\t\n\t}", "public function view() {\r\n\r\n\t}", "public function view()\n {\n //\n }", "public function singleView();", "public function view() {\n }", "public function views()\n {\n }", "public function views()\n {\n...
[ "0.7491702", "0.719649", "0.6819833", "0.67991674", "0.679616", "0.67376083", "0.67373234", "0.67373234", "0.67117566", "0.67065614", "0.6664889", "0.6651729", "0.6651729", "0.6651729", "0.6651729", "0.66400385", "0.65891606", "0.6580223", "0.6524397", "0.65041894", "0.649376...
0.0
-1
ACTIVATE FUNCTIONS Robert / 120218
public function activate_recipe($id){ $this->db->query(" UPDATE recipe re SET re.status = 'A' WHERE md5(re.id) = '$id' "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function activate() {\r\r\n }", "private static function single_activate() {\n\t\t// @TODO: Define activation functionality here\n\t}", "private static function single_activate() {\n\t\t// @TODO: Define activation functionality here\n\t}", "function activate() {\n }", "public function activate();...
[ "0.70985067", "0.69146836", "0.69146836", "0.680798", "0.6802948", "0.6802948", "0.67752624", "0.6676155", "0.6646347", "0.6546279", "0.6491912", "0.64696723", "0.64435494", "0.64126635", "0.6324273", "0.6316144", "0.6308403", "0.62336814", "0.61588573", "0.61588573", "0.6158...
0.0
-1
mngr to new mngr
public function edit_branch_newmngr($mngr_id){ $this->db->query(" UPDATE branch_manager bm SET bm.status = 'U' WHERE bm.id = '$mngr_id' "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __clone() {\n\t\tif ($this->dimensions instanceof Collection) {\n\t\t\t$existingDimensions = $this->dimensions->toArray();\n\t\t\t$this->dimensions = new ArrayCollection();\n\t\t\t/** @var NodeDimension $existingDimension */\n\t\t\tforeach ($existingDimensions as $existingDimension) {\n\t\t\t\t$thi...
[ "0.49317312", "0.4572076", "0.4486551", "0.4382335", "0.43354473", "0.43317008", "0.4310794", "0.43000287", "0.42978895", "0.42939845", "0.42914474", "0.4242475", "0.4239564", "0.42335218", "0.42171478", "0.42069352", "0.41924334", "0.41902328", "0.4189087", "0.41852427", "0....
0.4942492
0
echo "halaman auto refresh setiap 5 detik: ".rand(99,2); //Hanya contoh saja..
function ajaxdatarekapbulanan(){ $bulan = $this->uri->segment('3'); $tahun = $this->uri->segment('4'); $nama_wp = $this->uri->segment('5'); $rekap = $this->Mrekap->getdata($bulan, $tahun, $nama_wp); $total; foreach ($rekap as $res) { $total += $res-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function random_angka($panjang) {\n $r = ''; //set string kosong\n //mengulang sebanyak $panjang dengan angka random dari 0-9\n for ($x=0; $x<$panjang; $x++) $r .= random_int(0, 9);\n return $r; //mereturn hasil string yang berisi angka random tadi\n}", "public function random();", "function bunch(...
[ "0.6906557", "0.6680179", "0.66496146", "0.6622255", "0.66033506", "0.65160644", "0.6433166", "0.63757443", "0.6374291", "0.6364827", "0.63255394", "0.6302749", "0.6284797", "0.6235078", "0.6231682", "0.6217912", "0.62039447", "0.61991197", "0.6195205", "0.6174543", "0.611584...
0.0
-1
Handle an incoming request.
public function handle($request, Closure $next) { // Check permission delete current user. if (MemberHelper::checkLogin()->id == $request->id && MemberHelper::getCurrentUserRole() != ADMIN) { $errors[] = sprintf(trans('validation.not_direct_access')); return view('errors.sys...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function handle_request();", "public function handleRequest();", "public function handleRequest();", "public function handleRequest();", "protected abstract function handleRequest();", "abstract public function handleRequest($request);", "abstract public function handleRequest(Request $...
[ "0.8299201", "0.8147294", "0.8147294", "0.8147294", "0.8127764", "0.7993589", "0.7927201", "0.7912899", "0.7899075", "0.76317674", "0.75089735", "0.7485808", "0.74074036", "0.7377414", "0.736802", "0.7294553", "0.72389543", "0.7230166", "0.72108", "0.71808434", "0.7170364", ...
0.0
-1
///warranty_claim_type SECTION START HERE...................
public function get_all_warranty_claim_types(){ $this->db->select('*'); $this->db->from('tbl_warranty_claim_type'); $this->db->order_by('time_stamp','asc'); $result_query=$this->db->get(); $result=$result_query->result(); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function determainclaimType()\r\n {\r\n // 9 digits\r\n if (preg_match($this->keycodeRegex, $this->keycode) == false)\r\n {\r\n $this->claimType = \"invaild-keycode\";\r\n }\r\n \r\n // if keycode is NOT null, then sear...
[ "0.6172688", "0.57638144", "0.5653124", "0.5529598", "0.5261354", "0.5257407", "0.52146375", "0.52100813", "0.5205265", "0.5180824", "0.51531523", "0.5083498", "0.50686806", "0.5045306", "0.5039432", "0.50230646", "0.49977124", "0.49970323", "0.49967203", "0.49882782", "0.497...
0.5524575
4
//warranty_claim_type SECTION ENDS HERE warranty_claim_report SECTION
public function get_warranty_claim_status($claim_status, $warranty_claim_type_id, $from_date, $to_date) { $this->db->select('tbl_warranty_claim.*,tbl_item.item_name, tbl_item.part_no, tbl_item.unit , tbl_sales.customer_type, tbl_sales.customer_id, tbl_sales.customer_name, tbl_sales.dealer_id, tbl_sa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function determainclaimType()\r\n {\r\n // 9 digits\r\n if (preg_match($this->keycodeRegex, $this->keycode) == false)\r\n {\r\n $this->claimType = \"invaild-keycode\";\r\n }\r\n \r\n // if keycode is NOT null, then sear...
[ "0.5915057", "0.5444586", "0.5415379", "0.53633475", "0.53307897", "0.532492", "0.53043574", "0.5257047", "0.52407765", "0.5232417", "0.52116644", "0.52104384", "0.5178121", "0.5177166", "0.51589197", "0.51415074", "0.512649", "0.5113581", "0.5113197", "0.5104567", "0.5101459...
0.5509136
1
Set a new subscriber as being the current one Setting a subscriber as being current will allow the notify() function to automatically exclude him from the notifications recipients and avoid a user to see his own messages
public function addCurrentSubscriber($subscriberId, $subscriberType = null) { $name = $this->getSubscriberName($subscriberId, $subscriberType); if (!in_array($name, $this->currentSubscribers)) { $this->currentSubscribers[] = $name; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function resetCurrentSubscribers()\n {\n $this->currentSubscribers = [];\n }", "public function handleNewsletterSubscriberSave(Varien_Event_Observer $observer)\n {\n\t $helper = Mage::helper('connector');\n\t $subscriber = $observer->getEvent()->getSubscriber();\n\t $storeId ...
[ "0.6496588", "0.6040308", "0.60049266", "0.59243274", "0.5764261", "0.56419426", "0.5605907", "0.5589706", "0.5532604", "0.55096465", "0.5497363", "0.5495481", "0.5483476", "0.54548377", "0.5436061", "0.5420629", "0.539221", "0.53873396", "0.53779703", "0.53280306", "0.532609...
0.52270067
30
Reset current subscriber list
public function resetCurrentSubscribers() { $this->currentSubscribers = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clearSubscribers();", "public static function reset(): void\n {\n self::$subjectNames = null;\n }", "public function reset()\n {\n $this->values[self::_SYS_MAIL_LIST] = array();\n }", "public function reset()\n {\n $this->_contacts = [];\n $this->_li...
[ "0.7727141", "0.6813812", "0.68128675", "0.67984444", "0.6625125", "0.6454503", "0.6441615", "0.6439703", "0.64239144", "0.64027786", "0.6384784", "0.6304869", "0.6292801", "0.61260736", "0.612118", "0.61081964", "0.6086308", "0.6083359", "0.6043418", "0.6026881", "0.6019895"...
0.85216767
0
Get channel identifier from input parameters
public function getChanId($resourceType, $resourceId) { return $resourceType . ':' . $resourceId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getChannelId() {\n $event = $this->getEvent();\n\n if (isset($event['channel'])) {\n return $event['channel'];\n }\n\n return $event['channel_id'];\n }", "public function getChannelId()\n {\n return $this->channel_id;\n }", "public functio...
[ "0.76600546", "0.71492463", "0.66044986", "0.64922357", "0.6439586", "0.64364487", "0.6373208", "0.6373208", "0.6373208", "0.63646436", "0.62232715", "0.6203584", "0.60829717", "0.6047839", "0.6017546", "0.60172933", "0.601697", "0.59800553", "0.5972928", "0.5969164", "0.5953...
0.5743958
33
Get channel identifier from input parameters
public function getChanIdList($resourceType, $resourceIdList) { $ret = []; foreach (Misc::toIterable($resourceIdList) as $index => $resourceId) { $ret[$index] = $this->getChanId($resourceType, $resourceId); } return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getChannelId() {\n $event = $this->getEvent();\n\n if (isset($event['channel'])) {\n return $event['channel'];\n }\n\n return $event['channel_id'];\n }", "public function getChannelId()\n {\n return $this->channel_id;\n }", "public functio...
[ "0.76600546", "0.71492463", "0.66044986", "0.64922357", "0.6439586", "0.64364487", "0.6373208", "0.6373208", "0.6373208", "0.63646436", "0.62232715", "0.6203584", "0.60829717", "0.6047839", "0.6017546", "0.60172933", "0.601697", "0.59800553", "0.5972928", "0.5969164", "0.5953...
0.0
-1
Get subscriber names list
protected function getSubscriberNameList($subscriberIdList, $type) { $ret = []; foreach (Misc::toIterable($subscriberIdList) as $index => $subscriberId) { $ret[$index] = $this->getSubscriberName($subscriberId, $type); } return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function GetSubscriptionsNamesForImport()\n {\n \t$output = array();\n \n \t$rs = mysql_query(\"SELECT subscription_name_en FROM subscriptions ORDER BY subscription_name_en ASC\");\n \n \tif(mysql_num_rows($rs)==0)\n \t{\n \t\t$output = 0;\n \t}\n \telse\n \t{\n \t\twhile...
[ "0.75239253", "0.7135713", "0.70640355", "0.69593704", "0.6917017", "0.69065756", "0.69065756", "0.69062656", "0.6809456", "0.6561546", "0.65610844", "0.6560262", "0.65478444", "0.65375364", "0.6525476", "0.6525476", "0.6525476", "0.6525476", "0.6525476", "0.6525476", "0.6525...
0.6031234
52
Remove all data from the given resource
public function deleteResource($resourceType, $resourceId) { $this->backend->deleteChannels($this->getChanIdList($resourceType, $resourceId)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function destroy(Resource $resource)\n {\n //\n }", "public function deleteAllResources() {\n\t\t$this->resources = array();\n\t}", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo...
[ "0.67114913", "0.6629104", "0.6500741", "0.64957446", "0.6438744", "0.6369617", "0.63552535", "0.62876713", "0.62855494", "0.6283532", "0.6232912", "0.6222492", "0.6208339", "0.61838716", "0.6150772", "0.61491525", "0.6109051", "0.607161", "0.60643256", "0.6051124", "0.604681...
0.0
-1
Subscribe to a chan This method will implicetely create the channel if non existant
public function subscribe( $resourceType, $resourceId, $subscriberId, $subscriberType = null ) { $chanIdList = $this->getChanIdList($resourceType, $resourceId); // Create the channels if they don't exists, no errors $this->backend->createChannels($chanIdList,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function subscribe($channel)\n {\n return parent::subscribe($channel);\n }", "public function Subscribe() {\n\t\t// Process pending messages if any\n\t\t$this->ProcessPendingMessages();\n\t\t// Subscribe\n\t\t$this->GetSubsConn()->subscribe(\n\t\t\t[$this->GetChannel()],\n\t\t\t[$this,...
[ "0.6533913", "0.6376047", "0.63607186", "0.62793094", "0.60998684", "0.60696137", "0.6053881", "0.5993224", "0.59272623", "0.5904284", "0.57162416", "0.57097095", "0.5706684", "0.56542784", "0.56498015", "0.56310725", "0.5612791", "0.5573114", "0.5549742", "0.5542514", "0.553...
0.5181487
43