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
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(DamageScreen $damageScreen) { // }
{ "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(DamageScreen $damageScreen) { // }
{ "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) { $screenOne = DamageScreen::where('order', 0)->first(); $screenTwo = DamageScreen::where('order', 1)->first(); $screenOne->update([ 'value' => $request->first, ]); $screenTwo->update([ 'value' => $request->sec...
{ "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(DamageScreen $damageScreen) { // }
{ "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
A basic unit test example.
public function test_images_all() { $response = $this->getJson('/api/images'); $response ->assertStatus(200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testExample()\n {\n }", "public function testBasicExample()\n {\n $this->assertTrue(true);\n }", "public function testBasicExample()\n {\n $this->assertEquals(1, 1);\n }", "function test_sample() {\n\n\t\t$this->assertTrue( true );\n\n\t}", "public function t...
[ "0.80752075", "0.7854537", "0.780656", "0.7760198", "0.7665438", "0.7644897", "0.76254654", "0.7589822", "0.75457186", "0.75257766", "0.75108504", "0.7423434", "0.7423434", "0.7423434", "0.7423434", "0.7423434", "0.7423434", "0.7423434", "0.7423434", "0.7423434", "0.7423434",...
0.0
-1
Get a Entity given the identifier
public function get($id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getEntity($id) {\n // when the request uses the internal id the given id starts with an underscore\n if(substr($id, 0, 1) == '_') {\n // get entity via _internal_id\n return Entity::findOrFail(substr($id, 1));\n } else {\n // get entity via GIS...
[ "0.77842015", "0.7246429", "0.71917194", "0.71544373", "0.7030029", "0.7008729", "0.69652265", "0.69463146", "0.69289994", "0.692121", "0.6914636", "0.6909877", "0.68956965", "0.68956965", "0.68956965", "0.68602735", "0.68478686", "0.679397", "0.67581517", "0.67581517", "0.67...
0.0
-1
Get a list of Entities.
public function all($params = array());
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEntities();", "public function getEntities();", "public function getEntities()\n {\n return $this->entities;\n }", "public function getEntities() {\n return $this->entities;\n }", "public function getEntities()\n\t{\n\t\treturn $this->entities;\n\t}", "public fun...
[ "0.8120041", "0.8120041", "0.81065", "0.8038587", "0.8029185", "0.79032516", "0.7782251", "0.77684736", "0.7731485", "0.76709116", "0.76522756", "0.76416516", "0.7424205", "0.7399604", "0.7313129", "0.7263043", "0.7247275", "0.7215487", "0.7180889", "0.7165277", "0.71331626",...
0.0
-1
Post Entity, creates a new Entity.
public function post(array $parameters);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create(Entity $entity);", "public function create($entity);", "public function createEntity();", "function create($entity);", "public function createEntity($entityName = null);", "public function store(EntityRequest $request)\n {\n\n\n $dataForm = $request->all();\n $data...
[ "0.7823777", "0.7601991", "0.7360485", "0.7301812", "0.7042828", "0.6962506", "0.6929807", "0.6582816", "0.65365076", "0.6467683", "0.6427617", "0.64066327", "0.6400303", "0.6363624", "0.63626736", "0.63493526", "0.6334957", "0.63164395", "0.62961936", "0.62506676", "0.625066...
0.0
-1
Replace data of a Entity.
public function put(DimeEntityInterface $entity, array $parameters);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateEntityData(EntityData $entityData);", "public function update(DataObject $entity){\n }", "public function update($entity){ \n //TODO: Implement update record.\n }", "public function update($entity);", "public function update($entity);", "protected function updateEntity(...
[ "0.69730914", "0.68642867", "0.63457555", "0.6317987", "0.6317987", "0.6287433", "0.62672025", "0.6241641", "0.6233802", "0.61864036", "0.61188173", "0.6106389", "0.6067501", "0.6036027", "0.60297585", "0.6024511", "0.6001812", "0.5959233", "0.5920982", "0.59168416", "0.58840...
0.0
-1
/ Partially update a Entity.
public function delete(DimeEntityInterface $entity);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(Entity $entity);", "public function update($entity);", "public function update($entity);", "public function update($entity)\n {\n \n }", "public function update(IEntity $entity);", "public function update($entity){ \n //TODO: Implement update record.\n }", ...
[ "0.8135727", "0.8048075", "0.8048075", "0.7826656", "0.7807091", "0.7712312", "0.7685664", "0.75997406", "0.7505146", "0.7489988", "0.74558705", "0.7434485", "0.7431148", "0.7256221", "0.71870035", "0.7090647", "0.7046536", "0.6905903", "0.68543077", "0.6821778", "0.6789144",...
0.0
-1
Class constructor, destructor etc ... Constructor.
public function __construct($file, array $options = []) { if(file_exists($file) === false || is_readable($file) === false) { throw new RuntimeException(vsprintf("%s(): File [ %s ] is not readable.", [__METHOD__, $file])); } $this->filePath = $file; $this->fileSize = filesize($file); $this->options = $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __constructor(){}", "final private function __construct()\n\t{\n\t}", "function __construct()\n\t{\n\t\t// within the class.\n\t\t(object)$this->db = new dbHelper();\n\t\t(object)$this->user = new User();\n\t\t(object)$this->patient = new Patient();\n\t\t(object)$this->enc = new Encounter();\n\t\tretu...
[ "0.8026452", "0.7735951", "0.77308506", "0.76857394", "0.76559484", "0.7567421", "0.7567421", "0.7559963", "0.7559963", "0.7559963", "0.7556137", "0.7556137", "0.7556137", "0.7556137", "0.7556137", "0.7556137", "0.7556137", "0.7556137", "0.7556137", "0.7556137", "0.7556137", ...
0.0
-1
Class methods Determine the content range that should be served.
protected function getRange(Request $request) { if(($range = $request->header('range')) !== null) { // Remove the "range=" part of the header value $range = substr($range, 6); // Split the range starting and ending points $range = explode('-', $range, 2); // Check that the range contains two val...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRange() {\n\n }", "public function getRange() \n {\n \n return $this->_range;\n \n }", "public function getRange()\n {\n return $this->range;\n }", "public function getRange()\n {\n return $this->range;\n }", "protected function _pa...
[ "0.6172473", "0.6141469", "0.609944", "0.609944", "0.6057817", "0.5998303", "0.5927946", "0.5859319", "0.5838959", "0.5726205", "0.5650754", "0.55953455", "0.5547604", "0.5526229", "0.5523938", "0.5416799", "0.5414195", "0.53739774", "0.5373379", "0.5355413", "0.5341976", "...
0.6323498
0
add a new Customer
public function addNewCustomer(Customer $customer) { $isValid = $customer->isValid(); if (!$isValid['status']) { return $isValid['message']; } $this->save($customer); Email::sendEmailNewRegister($customer->name, $customer->email); retur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function c_add()\n {\n\t\t$this->getC();\n $customer = $this->Customers->newEntity();\n if ($this->request->is('post')) {\n $customer = $this->Customers->patchEntity($customer, $this->request->data);\n if ($this->Customers->save($customer)) {\n $this->Fl...
[ "0.8495643", "0.78329015", "0.78270483", "0.7823274", "0.7738308", "0.7694947", "0.75143135", "0.7432505", "0.7340529", "0.72576714", "0.72192883", "0.7216302", "0.7202188", "0.71831506", "0.71548295", "0.7112727", "0.7106816", "0.7097257", "0.7094046", "0.7082328", "0.705676...
0.7253407
10
Save a new customer
private function save(Customer $customer) { return CustomerModel::insert($customer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveCustomer($customer) {\n $customer->save();\n\n $customerAccount = $this->newCustomerAccount($customer->id);\n $customerAccount->save();\n\n $customer->sl_customer_account_id = $customerAccount->id;\n $customer->save();\n }", "public function store(Custome...
[ "0.77491003", "0.7566623", "0.75215983", "0.7344049", "0.73122615", "0.73071384", "0.7282459", "0.7278039", "0.726569", "0.72406906", "0.7236983", "0.7215221", "0.71460557", "0.713406", "0.7119799", "0.7098851", "0.7093956", "0.7070088", "0.7062681", "0.70524627", "0.70455503...
0.70361114
22
Ensure the movie table exists. If it does not, create it.
public function ensureExists() { $sql = <<<SQL CREATE TABLE IF NOT EXISTS $this->tableName ( id int(10) NOT NULL AUTO_INCREMENT, title varchar(300) NOT NULL UNIQUE, year int(4) NOT NULL, rating int(2), PRIMARY KEY (id)); insert into $this->tableName(title, year, rating) values("The Maltese Falco...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ensureTableExists()\n {\n $_tableName = DB_PREFIX . \"wr360product\";\n $sqlCreateTable = <<<SQL\nCREATE TABLE IF NOT EXISTS `$_tableName` (\n `product_id` INT NOT NULL ,\n `root_path` VARCHAR(255) NULL DEFAULT NULL ,\n `config_file_url` VARCHAR(255) NULL DEFAULT NULL ,\n `wr36...
[ "0.67867184", "0.6705228", "0.6357208", "0.6263677", "0.621583", "0.6166506", "0.6083301", "0.60817504", "0.6049923", "0.6045195", "0.5964334", "0.5938765", "0.59277874", "0.58608913", "0.57945174", "0.5781102", "0.5758494", "0.56792015", "0.5658708", "0.565581", "0.56420946"...
0.7525794
0
Get all movies in the system.
public function getAll() { $sql = <<<SQL select * from $this->tableName order by rating desc, title asc SQL; $stmt = $this->pdo()->prepare($sql); $stmt->execute(); $movies = array(); foreach($stmt as $row) { $movies[] = new Movie($row); } return $movies; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMovies()\n {\n $movie = Movie::with('genres', 'cast', 'crew', 'licensors', 'producers', 'studios', 'reviews');\n $getters = Input::get();\n \n // Add offset/limit\n $movie->offset( (@$getters['index'] * @$getters['pageSize']) ?: 0);\n $movie->limit(@$getters['pageSiz...
[ "0.82997584", "0.8186986", "0.8019164", "0.79998004", "0.78302807", "0.782693", "0.7800771", "0.7778185", "0.76724106", "0.7669334", "0.75932145", "0.7549312", "0.75105065", "0.74853164", "0.74693763", "0.734807", "0.730069", "0.72923136", "0.7111507", "0.71058357", "0.708625...
0.7375301
15
Add a movie to the table. The main reason for failure is a duplicate movie title, which causes a constraint violation.
public function add(Movie $movie) { $sql = <<<SQL insert into $this->tableName(title, year, rating) values(?, ?, ?) SQL; $stmt = $this->pdo()->prepare($sql); $ret = $stmt->execute(array($movie->getTitle(), $movie->getYear(), $movie->getRating())); if($ret === FALSE) { return false; } return $this->pdo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addNewMovie($title, $imageFileName, $director, $mpaa, $year, $runtime, $boxOffice){\n \t$stmt = $this->conn->prepare (\n\t\t\t\t\"INSERT INTO titles(title, imageFileName, director, mpaaRating, year, runtime, boxOffice)\n\t\t\t\tVALUES(:title, :imageFileName, :director, :mpaa, :year, :runtime, :box...
[ "0.74084884", "0.7066489", "0.6906506", "0.6765084", "0.66994274", "0.6697314", "0.6675615", "0.6499429", "0.64993227", "0.63281405", "0.63268495", "0.6251637", "0.6239141", "0.6230783", "0.6177773", "0.6162812", "0.613369", "0.61322343", "0.61025417", "0.6052775", "0.6046667...
0.7578155
0
Get a single movie by ID
public function get($id) { $sql = <<<SQL select * from $this->tableName where id=? SQL; $stmt = $this->pdo()->prepare($sql); $stmt->execute(array($id)); $movies = array(); $row = $stmt->fetch(\PDO::FETCH_ASSOC); if($row === null) { return null; } return new Movie($row); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show($id)\n {\n $movie = Movie::findOrFail($id);\n return $movie;\n }", "public function show($id)\n {\n return response()->json(\n Movie::where('user_id', Auth::guard('token')->id())->where('id', $id)->first()\n );\n }", "public function GetMo...
[ "0.81051046", "0.7773853", "0.7748095", "0.7676995", "0.7576699", "0.7568647", "0.75544643", "0.7528106", "0.75246686", "0.75142825", "0.7464243", "0.7418949", "0.7393182", "0.73608357", "0.7346471", "0.7328934", "0.726897", "0.726211", "0.7245274", "0.71025366", "0.70616573"...
0.781977
1
Update a movie record
public function update(Movie $movie) { $sql = <<<SQL update $this->tableName set title=?, year=?, rating=? where id=? SQL; $stmt = $this->pdo()->prepare($sql); $ret = $stmt->execute(array($movie->getTitle(), $movie->getYear(), $movie->getRating(), $movie->getId())); return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateMovie($data) {\n\n\t\t$this->dbAdapter->dbOpen();\n\t\t// var_dump($data);\n\t\t$this->dbAdapter->updateMovie($data);\n\t\t$this->dbAdapter->dbClose();\n\t\t$this->error = $this->dbAdapter->lastError();\n\t\t\n\t}", "public function update($record);", "public function update(Request $requ...
[ "0.7414072", "0.7061404", "0.6960279", "0.6960279", "0.6837867", "0.67869264", "0.67644334", "0.67644334", "0.67644334", "0.6678881", "0.6660356", "0.6489203", "0.6486845", "0.6441863", "0.6415483", "0.63932127", "0.633506", "0.6313554", "0.6312305", "0.6302606", "0.62890816"...
0.68366015
5
Display a listing of the Brand.
public function index() { $brands = $this->brandService->paginate(10); return view('backend.showcase.brands.index')->with(compact('brands')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n $brand = Brand::all();\n\n return view('brand.list', [\"brand\" => $brand]);\n }", "public function index()\n {\n $paginator = $this->brandRepository->getAllWithPaginate(5);\n\n return view('shop.admin.brands.index', compact('paginator'));\n }...
[ "0.7722816", "0.76563555", "0.76531017", "0.76441306", "0.7637441", "0.7637441", "0.7637441", "0.7637441", "0.7593077", "0.758291", "0.75472975", "0.75454324", "0.7545202", "0.7543748", "0.7532632", "0.7532597", "0.75092", "0.75088024", "0.75005066", "0.74972886", "0.7488919"...
0.77039176
1
Show the form for creating a new Brand.
public function create() { return view('backend.showcase.brands.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n $this->data['brand'] = null;\n\n\t\treturn view('admin.brands.form', $this->data);\n }", "public function create()\n {\n return view('back.Brand.create');\n }", "public function create()\n {\n return view('admin.brand.add_brand');\n }", "p...
[ "0.80053276", "0.7895442", "0.78842145", "0.78584975", "0.7788319", "0.77509594", "0.7671779", "0.76215386", "0.7594471", "0.7590603", "0.7590603", "0.7590603", "0.7590603", "0.75534356", "0.75142586", "0.7487689", "0.7451045", "0.7382338", "0.7351249", "0.73472804", "0.73247...
0.7472304
16
Store a newly created Brand in storage.
public function store(CreateBrandRequest $request) { $input = $request->all(); $brand = $this->brandService->create($input); Flash::success('Brand saved successfully.'); return redirect(route('admin.showcase.brand.index')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(Request $request) {\n $this->validate($request, [\n 'name' => 'required|string'\n ]);\n\n $existing = Brand::where('name', $request->name)->first();\n\n if($existing) {\n return redirect(route('admin.products.brands'))->with([\n '...
[ "0.74272305", "0.7352947", "0.7323887", "0.7317275", "0.73018587", "0.7299931", "0.7277163", "0.7243454", "0.7231907", "0.7180211", "0.71749717", "0.71539754", "0.71326077", "0.7120333", "0.69553137", "0.69228977", "0.69166696", "0.68921924", "0.68904835", "0.6872284", "0.686...
0.71312565
13
Display the specified Brand.
public function show($id) { $brand = $this->exist($id); return view('backend.showcase.brands.show')->with(compact('brand')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Brand $brand)\n {\n //\n }", "public function show(Brand $brand)\n {\n //\n }", "public function show(Brand $brand)\n {\n //\n }", "public function show(Brand $brand)\n {\n //\n }", "public function show(brand $brand)\n {\n ...
[ "0.7959496", "0.7959496", "0.7959496", "0.7959496", "0.78104305", "0.71830875", "0.69005144", "0.69005144", "0.67628056", "0.6758372", "0.67404383", "0.6482435", "0.6426714", "0.6426714", "0.63633204", "0.6362714", "0.63462764", "0.63377327", "0.63283324", "0.6319929", "0.628...
0.65320057
11
Update the specified Brand in storage.
public function update($id, UpdateBrandRequest $request) { $this->exist($id); $this->brandService->update($id, $request->all()); Flash::success('Brand updated successfully.'); return redirect(route('admin.showcase.brand.index')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(Request $request, Brand $brand)\n {\n $this->validateWith([\n 'name' => 'required',\n 'status' => 'required',\n 'image' => 'image|required'\n ]);\n\n // $brand = Brand::where('brandId', $id)\n // ->update(['brand...
[ "0.7351891", "0.72191274", "0.72191274", "0.7109623", "0.70952517", "0.7052274", "0.6947354", "0.69214803", "0.68758494", "0.6873975", "0.68667483", "0.6850455", "0.67298913", "0.66815054", "0.6659223", "0.6641514", "0.6637958", "0.66342056", "0.66285646", "0.65806353", "0.65...
0.62480986
39
Remove the specified Brand from storage.
public function destroy($id) { $this->exist($id); $this->brandService->delete($id); Flash::success('Brand deleted successfully.'); return redirect(route('admin.showcase.brand.index')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function destroy(Brand $brand)\n {\n //\n }", "public function destroy(Brand $brand)\n {\n //\n }", "public function destroy(Brand $brand) \n {\n if($brand)\n {\n if($brand->image){\n ## Delete brand image/logo if exist\n ...
[ "0.7152891", "0.7152891", "0.6649636", "0.64228636", "0.6378165", "0.6364818", "0.63319933", "0.631194", "0.63118005", "0.62049866", "0.6190387", "0.6159088", "0.61385643", "0.6121559", "0.6083353", "0.6079837", "0.60751694", "0.6045773", "0.59878886", "0.59760714", "0.597544...
0.5325084
61
check if a record exist
private function exist($id) { try { $brand = $this->brandService->findOrFail($id); } catch(ModelNotFoundException $e) { Flash::error('Brand not found'); return redirect(route('admin.showcase.brand.index')); } return $brand; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasRecord();", "function recordExists()\n {\n global $objDatabase;\n\n $query = \"\n SELECT 1\n FROM \".DBPREFIX.\"module_shop\".MODULE_INDEX.\"_products\n WHERE id=$this->id\";\n $objResult = $objDatabase->Execute($query);\n if (...
[ "0.79904974", "0.79153657", "0.78015625", "0.7711345", "0.7579622", "0.7470996", "0.7338849", "0.715522", "0.713582", "0.70641613", "0.7053358", "0.7048271", "0.7023883", "0.7021838", "0.7019374", "0.7011248", "0.700499", "0.6990723", "0.6967637", "0.6899481", "0.6882249", ...
0.0
-1
Display a listing of the resource.
public function index() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $request->validate([ 'product_number' => 'string|required', 'authorized_vendor' => 'string|required', 'vendor_pn' => 'string|required', ]); $c = new Component; $c->product_number = $request->input('product...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245...
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ...
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.6833...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { $request->validate([ 'product_number' => 'string|required', 'authorized_vendor' => 'string|required', 'vendor_pn' => 'string|required', ]); $c = Component::find($id); if($request->input('pro...
{ "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) { if (Component::where('id',$id)->delete()) { return redirect()->back()->with('success','Component Deleted Successfully.'); } else { return redirect()->back()->with('error','Update Failed.'); } }
{ "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
Instantiates a new win32LobAppPowerShellScriptRule and sets the default values.
public function __construct() { parent::__construct(); $this->setOdataType('#microsoft.graph.win32LobAppPowerShellScriptRule'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function createFromDiscriminatorValue(ParseNode $parseNode): Win32LobAppPowerShellScriptRule {\n return new Win32LobAppPowerShellScriptRule();\n }", "protected function setupDefaultsRules()\n { }", "public function initialize_rule()\n\t{\n\t\t$this->rule = array\n\t\t(\n\t\t\t'roles'...
[ "0.64217025", "0.570483", "0.5633995", "0.5343221", "0.52466035", "0.5179193", "0.5164339", "0.5163729", "0.5136143", "0.50780874", "0.5022757", "0.5007065", "0.4978894", "0.4926629", "0.49011415", "0.48927966", "0.48588642", "0.48584357", "0.4856854", "0.47819102", "0.478043...
0.6791247
0
Creates a new instance of the appropriate class based on discriminator value
public static function createFromDiscriminatorValue(ParseNode $parseNode): Win32LobAppPowerShellScriptRule { return new Win32LobAppPowerShellScriptRule(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function createFromDiscriminatorValue(ParseNode $parseNode): DeviceManagementConfigurationSettingInstance {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n ...
[ "0.56634754", "0.56512946", "0.5592395", "0.5581516", "0.5573077", "0.5502576", "0.54187375", "0.53674453", "0.53455126", "0.5338799", "0.5319516", "0.53122056", "0.52746797", "0.52538157", "0.5244882", "0.5236323", "0.5223084", "0.5214721", "0.5210753", "0.51931816", "0.5175...
0.48096904
61
Gets the comparisonValue property value. The script output comparison value. Do not specify a value if the rule is used for detection.
public function getComparisonValue(): ?string { $val = $this->getBackingStore()->get('comparisonValue'); if (is_null($val) || is_string($val)) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'comparisonValue'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValueCompare();", "public function getComparison();", "public function getOperatorValue()\n {\n return $this->comparator->getCurrentOperator()->getValue();\n }", "public function getCheckValue()\n {\n return $this->check !== null ? (string) $this->check : null;\n ...
[ "0.61840284", "0.58772165", "0.57780296", "0.55266684", "0.54838693", "0.5304489", "0.5172887", "0.51417136", "0.5133765", "0.5125112", "0.5114983", "0.51069784", "0.5104655", "0.5061496", "0.50586414", "0.5040469", "0.50042075", "0.4994287", "0.49909627", "0.4974871", "0.496...
0.57591534
3
Gets the displayName property value. The display name for the rule. Do not specify this value if the rule is used for detection.
public function getDisplayName(): ?string { $val = $this->getBackingStore()->get('displayName'); if (is_null($val) || is_string($val)) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'displayName'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDisplayName()\n {\n if (array_key_exists(\"displayName\", $this->_propDict)) {\n return $this->_propDict[\"displayName\"];\n } else {\n return null;\n }\n }", "public function getDisplayName()\n {\n if (array_key_exists(\"displayName\"...
[ "0.7885417", "0.7885417", "0.7885417", "0.7885417", "0.7885417", "0.7885417", "0.7885417", "0.7885417", "0.7885417", "0.7885417", "0.7885417", "0.7885417", "0.7885417", "0.7885417", "0.7885417", "0.7885417", "0.7885417", "0.75730854", "0.75558174", "0.7509002", "0.73684883", ...
0.0
-1
Gets the enforceSignatureCheck property value. A value indicating whether a signature check is enforced.
public function getEnforceSignatureCheck(): ?bool { $val = $this->getBackingStore()->get('enforceSignatureCheck'); if (is_null($val) || is_bool($val)) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'enforceSignatureCheck'"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEnforceSignatureCheck()\n {\n if (array_key_exists(\"enforceSignatureCheck\", $this->_propDict)) {\n return $this->_propDict[\"enforceSignatureCheck\"];\n } else {\n return null;\n }\n }", "public function getEnforceSignatureCheck()\n {\n ...
[ "0.80331004", "0.80331004", "0.67590857", "0.6700251", "0.62774366", "0.62774366", "0.5332631", "0.5307181", "0.52464396", "0.52464396", "0.51844084", "0.51693356", "0.50858766", "0.50181675", "0.5006429", "0.5000203", "0.49978295", "0.49978295", "0.49978295", "0.49978295", "...
0.67368716
4
The deserialization information for the current model
public function getFieldDeserializers(): array { $o = $this; return array_merge(parent::getFieldDeserializers(), [ 'comparisonValue' => fn(ParseNode $n) => $o->setComparisonValue($n->getStringValue()), 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOriginalModelInfo()\n {\n return $this->original_model_info;\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n ]);\n }", "public function getFieldDeserializers(): array {\n ...
[ "0.6067922", "0.57719976", "0.57719976", "0.5759543", "0.5708227", "0.5663973", "0.5626403", "0.5607489", "0.5597127", "0.5582992", "0.55805206", "0.55749476", "0.55737877", "0.5545505", "0.5529162", "0.5523548", "0.5518858", "0.55104053", "0.5507383", "0.5482898", "0.5475896...
0.0
-1
Gets the operationType property value. Contains all supported Powershell Script output detection type.
public function getOperationType(): ?Win32LobAppPowerShellScriptRuleOperationType { $val = $this->getBackingStore()->get('operationType'); if (is_null($val) || $val instanceof Win32LobAppPowerShellScriptRuleOperationType) { return $val; } throw new \UnexpectedValueException("...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOperationType()\n {\n return $this->operation_type;\n }", "final public static function getOutputType() {\n return self::$outputType;\n }", "public function getOperationType(): ?string;", "public function getType()\n {\n $rtn = $this->data['type'];\n\n ...
[ "0.7632211", "0.65535885", "0.6550182", "0.6272287", "0.62712306", "0.61920863", "0.6061665", "0.5988518", "0.5937861", "0.59262633", "0.5890729", "0.5859998", "0.5845542", "0.5832242", "0.5790517", "0.5783185", "0.57793933", "0.5774344", "0.5773347", "0.5773347", "0.5773347"...
0.6410651
3
Gets the operator property value. Contains properties for detection operator.
public function getOperator(): ?Win32LobAppRuleOperator { $val = $this->getBackingStore()->get('operator'); if (is_null($val) || $val instanceof Win32LobAppRuleOperator) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'operator'")...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOperatorValue();", "public function getOperatorValue()\n {\n return $this->comparator->getCurrentOperator()->getValue();\n }", "public function getOperator()\n {\n return $this->operator;\n }", "public function getOperator()\n {\n return $this->operator;...
[ "0.8169974", "0.7974979", "0.7846952", "0.7846952", "0.7846952", "0.7846952", "0.7846952", "0.7846952", "0.7828104", "0.7768725", "0.7736417", "0.77257735", "0.759594", "0.759594", "0.7550925", "0.7479238", "0.7301746", "0.7301746", "0.7203879", "0.7160991", "0.7037307", "0...
0.6784501
27
Gets the runAs32Bit property value. A value indicating whether the script should run as 32bit.
public function getRunAs32Bit(): ?bool { $val = $this->getBackingStore()->get('runAs32Bit'); if (is_null($val) || is_bool($val)) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'runAs32Bit'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRunAs32Bit()\n {\n if (array_key_exists(\"runAs32Bit\", $this->_propDict)) {\n return $this->_propDict[\"runAs32Bit\"];\n } else {\n return null;\n }\n }", "public function getRunAs32Bit()\n {\n if (array_key_exists(\"runAs32Bit\", $th...
[ "0.85248405", "0.85248405", "0.6860778", "0.6799766", "0.59091663", "0.59091663", "0.5882208", "0.58688766", "0.5841219", "0.5776094", "0.5767869", "0.56900084", "0.565388", "0.55034226", "0.5457949", "0.53974503", "0.53235775", "0.53037643", "0.5270364", "0.5258759", "0.5248...
0.7102028
3
Gets the runAsAccount property value. The execution context of the script. Do not specify this value if the rule is used for detection. Script detection rules will run in the same context as the associated app install context. Possible values are: system, user.
public function getRunAsAccount(): ?RunAsAccountType { $val = $this->getBackingStore()->get('runAsAccount'); if (is_null($val) || $val instanceof RunAsAccountType) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'runAsAccount'"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRunAsAccount()\n {\n if (array_key_exists(\"runAsAccount\", $this->_propDict)) {\n if (is_a($this->_propDict[\"runAsAccount\"], \"\\Beta\\Microsoft\\Graph\\Model\\RunAsAccountType\") || is_null($this->_propDict[\"runAsAccount\"])) {\n return $this->_propDict[\...
[ "0.717265", "0.5940347", "0.57114846", "0.5552076", "0.5414904", "0.53261405", "0.53261405", "0.53261405", "0.53261405", "0.53261405", "0.53261405", "0.5270996", "0.5229372", "0.5229372", "0.51633364", "0.509915", "0.5087359", "0.5011132", "0.5011132", "0.5011132", "0.5000941...
0.53156996
13
Gets the scriptContent property value. The base64encoded script content.
public function getScriptContent(): ?string { $val = $this->getBackingStore()->get('scriptContent'); if (is_null($val) || is_string($val)) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'scriptContent'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getScriptContent()\n {\n if (array_key_exists(\"scriptContent\", $this->_propDict)) {\n return $this->_propDict[\"scriptContent\"];\n } else {\n return null;\n }\n }", "public function content()\n {\n return base64_decode(chunk_split($thi...
[ "0.77487123", "0.68011147", "0.6547509", "0.6466205", "0.6363796", "0.6339806", "0.6298808", "0.6295808", "0.62844837", "0.62844837", "0.62844837", "0.62599033", "0.62599033", "0.62282085", "0.61290604", "0.60928786", "0.60900915", "0.60543495", "0.60529166", "0.60389507", "0...
0.6622331
2
Serializes information the current object
public function serialize(SerializationWriter $writer): void { parent::serialize($writer); $writer->writeStringValue('comparisonValue', $this->getComparisonValue()); $writer->writeStringValue('displayName', $this->getDisplayName()); $writer->writeBooleanValue('enforceSignatureCheck', $th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function SerializeObject () {\n return serialize ($this);\n }", "public function serialize()\n {\n // TODO: Implement serialize() method.\n }", "public function serialize()\n {\n return serialize(get_object_vars($this));\n }", "public function serialize()\n {\n ...
[ "0.7756909", "0.7567479", "0.7460804", "0.7460804", "0.7460804", "0.74483377", "0.74483377", "0.7395633", "0.7395633", "0.7395633", "0.7395633", "0.7395633", "0.7395633", "0.739549", "0.739549", "0.7389668", "0.73007923", "0.7277297", "0.7277297", "0.7209685", "0.719259", "...
0.0
-1
Sets the comparisonValue property value. The script output comparison value. Do not specify a value if the rule is used for detection.
public function setComparisonValue(?string $value): void { $this->getBackingStore()->set('comparisonValue', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setValueToCompare($value)\n\t{\n\t\t$this->setViewState('ValueToCompare',$value,'');\n\t}", "public function setOperator($value)\n\t{\n\t\t$this->setViewState('Operator',TPropertyValue::ensureEnum($value,'TValidationCompareOperator'),TValidationCompareOperator::Equal);\n\t}", "public function b...
[ "0.6549158", "0.58391595", "0.5690849", "0.5550868", "0.5446048", "0.54049605", "0.5269143", "0.52223974", "0.5115248", "0.5001262", "0.49872476", "0.4953484", "0.494904", "0.49425092", "0.49424967", "0.49275652", "0.4922007", "0.49138203", "0.48404822", "0.48211485", "0.4803...
0.7064123
0
Sets the displayName property value. The display name for the rule. Do not specify this value if the rule is used for detection.
public function setDisplayName(?string $value): void { $this->getBackingStore()->set('displayName', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDisplayName($displayName = null)\n {\n // validation for constraint: string\n if (!is_null($displayName) && !is_string($displayName)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value, please provide a string, \"%s\" given', gettype($displayName)), __LIN...
[ "0.7420497", "0.7211281", "0.7211281", "0.7211281", "0.7211281", "0.7211281", "0.7211281", "0.7211281", "0.7211281", "0.7211281", "0.7211281", "0.7211281", "0.7211281", "0.7211281", "0.7211281", "0.7211281", "0.7211281", "0.719506", "0.71357673", "0.7117848", "0.699421", "0...
0.66271514
62
Sets the enforceSignatureCheck property value. A value indicating whether a signature check is enforced.
public function setEnforceSignatureCheck(?bool $value): void { $this->getBackingStore()->set('enforceSignatureCheck', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setEnforceSignatureCheck($val)\n {\n $this->_propDict[\"enforceSignatureCheck\"] = $val;\n return $this;\n }", "public function setEnforceSignatureCheck($val)\n {\n $this->_propDict[\"enforceSignatureCheck\"] = boolval($val);\n return $this;\n }", "public...
[ "0.78206956", "0.7667476", "0.5907289", "0.5907289", "0.57204264", "0.54739267", "0.51139075", "0.5094577", "0.508082", "0.48749542", "0.48469302", "0.48158738", "0.48158738", "0.4777327", "0.47581035", "0.47571823", "0.47234067", "0.47007728", "0.46677232", "0.46618575", "0....
0.79696083
1
Sets the operationType property value. Contains all supported Powershell Script output detection type.
public function setOperationType(?Win32LobAppPowerShellScriptRuleOperationType $value): void { $this->getBackingStore()->set('operationType', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOperationType()\n {\n return $this->operation_type;\n }", "public function setOperationType($var)\n {\n GPBUtil::checkEnum($var, \\Google\\Cloud\\Orchestration\\Airflow\\Service\\V1\\OperationMetadata\\Type::class);\n $this->operation_type = $var;\n\n retur...
[ "0.6496866", "0.6492856", "0.64433604", "0.62910616", "0.6094238", "0.5826531", "0.57806563", "0.56574494", "0.5274855", "0.51369095", "0.5109887", "0.5109543", "0.5058971", "0.50584507", "0.49802727", "0.4969516", "0.49020022", "0.48777217", "0.48516595", "0.48397154", "0.48...
0.6798557
0
Sets the operator property value. Contains properties for detection operator.
public function setOperator(?Win32LobAppRuleOperator $value): void { $this->getBackingStore()->set('operator', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setOperator($operator);", "public function setOperator($operator)\n\t{\n\t\t$this->operator = $operator;\n\t}", "public function setOperator($value)\n\t{\n\t\t$this->setViewState('Operator',TPropertyValue::ensureEnum($value,'TValidationCompareOperator'),TValidationCompareOperator::Equal);\n\t}"...
[ "0.7689436", "0.76828825", "0.75971717", "0.7435833", "0.74138266", "0.7330138", "0.7313441", "0.72473615", "0.71973383", "0.71887535", "0.7149012", "0.707906", "0.6871747", "0.6669947", "0.6558932", "0.65571046", "0.6469621", "0.6307768", "0.6307768", "0.6307768", "0.6307768...
0.75251186
3
Sets the runAs32Bit property value. A value indicating whether the script should run as 32bit.
public function setRunAs32Bit(?bool $value): void { $this->getBackingStore()->set('runAs32Bit', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setRunAs32Bit($val)\n {\n $this->_propDict[\"runAs32Bit\"] = boolval($val);\n return $this;\n }", "public function setRunAs32Bit($val)\n {\n $this->_propDict[\"runAs32Bit\"] = $val;\n return $this;\n }", "public function getRunAs32Bit()\n {\n if...
[ "0.76989526", "0.7621078", "0.69838184", "0.69838184", "0.58135504", "0.5787064", "0.5787064", "0.5477278", "0.5394047", "0.5330602", "0.52603996", "0.5067927", "0.49890643", "0.4984778", "0.48977807", "0.48630002", "0.48073602", "0.4795862", "0.47947168", "0.46869278", "0.46...
0.73787874
3
Sets the runAsAccount property value. The execution context of the script. Do not specify this value if the rule is used for detection. Script detection rules will run in the same context as the associated app install context. Possible values are: system, user.
public function setRunAsAccount(?RunAsAccountType $value): void { $this->getBackingStore()->set('runAsAccount', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setRunAsAccount($val)\n {\n $this->_propDict[\"runAsAccount\"] = $val;\n return $this;\n }", "public function getRunAsAccount()\n {\n if (array_key_exists(\"runAsAccount\", $this->_propDict)) {\n if (is_a($this->_propDict[\"runAsAccount\"], \"\\Beta\\Micro...
[ "0.69454736", "0.56295747", "0.52146673", "0.51460636", "0.5051888", "0.49440166", "0.47960168", "0.47960168", "0.46864223", "0.46483707", "0.4488605", "0.44714898", "0.4460922", "0.44455191", "0.44136086", "0.44136086", "0.43720838", "0.4338303", "0.42687926", "0.42280996", ...
0.69097114
3
Sets the scriptContent property value. The base64encoded script content.
public function setScriptContent(?string $value): void { $this->getBackingStore()->set('scriptContent', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setScriptContent($val)\n {\n $this->_propDict[\"scriptContent\"] = $val;\n return $this;\n }", "public function setDetectionScriptContent($val)\n {\n $this->_propDict[\"detectionScriptContent\"] = $val;\n return $this;\n }", "public function setRemediatio...
[ "0.6832287", "0.6162492", "0.60976785", "0.60534835", "0.58512115", "0.58070046", "0.5753587", "0.56271666", "0.5604409", "0.5596457", "0.55410516", "0.55121374", "0.54276115", "0.5399017", "0.5399017", "0.5399017", "0.5399017", "0.5399017", "0.5399017", "0.5399017", "0.53990...
0.65476704
1
Build a list of all posts
function posts_index() { $posts = array(); foreach( scandir('content/words/') as $file ) { if( preg_match('/\.md$/', $file) ) { $post = array( 'title' => $file, 'text' => load_markdown_file('content/words/'.$file) ); array_push($posts, $post); } } global $page; $page['posts']...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPosts();", "public function getPosts();", "public function allPosts()\n {\n return Post::all();\n }", "public function getPosts() {}", "public function showAllPosts()\n {\n $posts = \\Blog\\Models\\Posts::find();\n $dataPosts = [];\n foreach ($posts a...
[ "0.73561966", "0.73561966", "0.72765183", "0.7239497", "0.7221193", "0.7162968", "0.7156828", "0.71364367", "0.71187085", "0.7095719", "0.70729166", "0.7068797", "0.7041419", "0.7039855", "0.70216215", "0.70134807", "0.6988321", "0.6986146", "0.6985182", "0.69625354", "0.6943...
0.0
-1
Build a list of all experiments
function experiments_index() { $text = '<ul>'; foreach( scandir('content/experiments/') as $file ) { if( $file !== '.' && $file !== '..' ) if( is_dir('content/experiments/'.$file) ) { $text .= '<li>'; $text .= '<a href="/experiments/'.$file.'">'.$file.'</a>'; $text .= '</li>'; } } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getExperimentsList(){\n return $this->_get(1);\n }", "public function getExperimentInfosList(){\n return $this->_get(2);\n }", "public function getFullExperimentsAction()\n {\n $experimentsArray = [];\n /** @var SettingsManager $manager */\n $manager = $thi...
[ "0.72048265", "0.6321561", "0.5686205", "0.56025314", "0.55511826", "0.55009997", "0.5426943", "0.53910714", "0.5293363", "0.5164371", "0.5149215", "0.512417", "0.5121282", "0.50092155", "0.49955708", "0.49840686", "0.49773255", "0.49681348", "0.49681348", "0.4967631", "0.496...
0.4976838
17
Creates a new Validation instance. Example // Using the factory enables method chaining $post = Validation::factory($_POST);
public static function factory(array $array) { return new Validation($array); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createValidator()\n {\n // add custom validation rules\n \\Validator::extend('contains_caps',\n function($field, $value, $params)\n {\n return preg_match('#[A-Z]#', $value);\n }\n );\n\n \\Validator::extend('contains_di...
[ "0.68153286", "0.68038183", "0.66629046", "0.66250724", "0.62214303", "0.6161435", "0.61597204", "0.60784245", "0.607379", "0.601081", "0.5986288", "0.5891524", "0.5877161", "0.58189917", "0.5769597", "0.57247823", "0.57235885", "0.5706728", "0.5698334", "0.5691795", "0.56754...
0.65852255
4
Sets the unique "any field" key and creates an ArrayObject from the passed array.
public function __construct(array $array) { parent::__construct($array, ArrayObject::ARRAY_AS_PROPS | ArrayObject::STD_PROP_LIST); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createObjKeyArray(array $keyArray){\n\tif (isset($keyArray[\"id\"])) $this->id = $keyArray[\"id\"];\n\tif (isset($keyArray[\"codice_categoria\"])) $this->codice_categoria = $keyArray[\"codice_categoria\"];\n\tif (isset($keyArray[\"codice\"])) $this->codice = $keyArray[\"codice\"];\n\tif (isset($key...
[ "0.6215607", "0.6177", "0.6177", "0.61609495", "0.58009547", "0.57769364", "0.57292026", "0.5722283", "0.5537955", "0.5535378", "0.5522287", "0.5522287", "0.5508656", "0.5447173", "0.54471505", "0.54456866", "0.5443268", "0.5440125", "0.53978074", "0.5377763", "0.53681564", ...
0.49236277
89
Magic clone method, clears errors and messages.
public function __clone() { $this->errors = array(); $this->messages = array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __clone()\n {\n trigger_error('La clonación no permitida', E_USER_ERROR);\n }", "public function __clone()\n {\n trigger_error('Clonación no permitida.', E_USER_ERROR);\n }", "public function __clone()\n\t {\n\t trigger_error('La clonación de este objeto no está ...
[ "0.7895588", "0.7863337", "0.7822829", "0.77976024", "0.7783531", "0.77796894", "0.7755139", "0.7744414", "0.7724672", "0.7724672", "0.7722266", "0.7722266", "0.7722266", "0.7722266", "0.7722266", "0.7722266", "0.7722266", "0.7722266", "0.7722266", "0.7722266", "0.7717072", ...
0.84274346
0
Create a copy of the current validation rules and change the array. Example // Initialize the validation library on the $_POST array with the rule 'required' applied to 'field_name' $post = Validation::factory($_POST)>add_rules('field_name', 'required'); // Here we copy the rule 'required' for 'field_name' and apply it...
public function copy(array $array) { $copy = clone $this; $copy->exchangeArray($array); return $copy; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function setValidationRules(): array;", "public function addRules($new_rules)\r\n\t{\r\n\t\tif(!is_array($new_rules)) {\r\n\t\t\tthrow new InvalidArgumentException('Parameter must be an array of Rules');\r\n\t\t}\r\n\r\n\t\tforeach ($new_rules as $new_rule) {\r\n\t\t\t$this->addRule($new_rule)...
[ "0.6242882", "0.59970355", "0.57810175", "0.57742953", "0.57242817", "0.5680594", "0.5640332", "0.5556733", "0.5553602", "0.55466056", "0.5533319", "0.55322456", "0.55144054", "0.54983115", "0.5495413", "0.5487957", "0.54661006", "0.54652137", "0.5441061", "0.5440921", "0.543...
0.0
-1
Returns an array of all the field names that have filters, rules, or callbacks. Example $fields= $post>field_names(); // Outputs an array with the names of all fields that have filters, rules, callbacks.
public function field_names() { // All the fields that are being validated $fields = array_keys(array_merge ( $this->pre_filters, $this->rules, $this->callbacks, $this->post_filters )); // Remove wildcard fields $fields = array_diff($fields, array('*')); return $fields; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _get_field_names()\n {\n return array();\n }", "public function getFieldNames() {\n $fields = array();\n foreach ($this->getFields() as $field) {\n $fields[] = $this->getFieldName($field);\n }\n return $fields;\n }", "public function getFieldsName...
[ "0.74836814", "0.746982", "0.7434274", "0.74138206", "0.73337084", "0.72026366", "0.72026366", "0.72026366", "0.71485597", "0.7109108", "0.7085366", "0.70695037", "0.7059468", "0.70505124", "0.70345104", "0.7001737", "0.6994687", "0.69910336", "0.6957312", "0.6879777", "0.686...
0.8068854
0
Returns the array values of the current object. Example // Assume $form mirrors the html form $form = array('form_field_name1' => '', 'form_field_name2' => ''); // Overwrite the empty values of $form with the values returned from as_array() to get a qualified array $form= arr::overwrite($form, $this>validation>as_array...
public function as_array() { return $this->getArrayCopy(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toFormArray() : array {\n $return = [];\n\n foreach ($this->toArray() as $component) {\n $return = array_merge($return, $component->toFormArray());\n }\n\n return $return;\n }", "public function values_as_array() {\n $Data = array();\n foreach ($this->__fields() as $field)...
[ "0.68400896", "0.66683054", "0.6637313", "0.655322", "0.6541705", "0.6535756", "0.6469942", "0.6441591", "0.64317435", "0.64227194", "0.63825333", "0.6379555", "0.63743114", "0.637004", "0.63258064", "0.62998784", "0.6297114", "0.62715656", "0.6267676", "0.62642807", "0.62544...
0.6138695
71
Returns the ArrayObject values, removing all inputs without rules. To choose specific inputs, list the field name as arguments. Example // Similar to as_array() but only returns array values that have had rules, filters, and/or callbacks assigned. $input = array('form_field1' => '5', 'form_field2' => '10', 'form_field3...
public function safe_array() { // Load choices $choices = func_get_args(); $choices = empty($choices) ? NULL : array_combine($choices, $choices); // Get field names $fields = $this->field_names(); $safe = array(); foreach ($fields as $field) { if ($choices === NULL OR isset($choices[$field])) {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function values(): ?array\n {\n $parameters = [];\n foreach ($this->data['fields'] as $index => $input) {\n $parameters[$index] = FILTER_SANITIZE_SPECIAL_CHARS;\n }\n return filter_input_array(INPUT_POST, $parameters);\n }", "public function getArray() : array ...
[ "0.6235733", "0.6233985", "0.61962533", "0.6116455", "0.6099812", "0.59914726", "0.59822476", "0.5970657", "0.5952266", "0.5926517", "0.5925044", "0.5912195", "0.58247656", "0.5810979", "0.57808506", "0.5770223", "0.57613647", "0.5757009", "0.5754214", "0.57499593", "0.574792...
0.68589103
0
Add additional rules that will forced, even for empty fields. All arguments passed will be appended to the list. Note: required and matches are an example of rules that can run on empty fields. Example // Note: required and matches are already set by default, this is used only as an example. $post>allow_empty_rules('re...
public function allow_empty_rules($rules) { // Any number of args are supported $rules = func_get_args(); // Merge the allowed rules $this->empty_rules = array_merge($this->empty_rules, $rules); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $rules = parent::rules();\n $rules [] = array('list_holder_id', 'default', 'setOnEmpty' => true, 'value' => null);\n return $rules;\n }", "public function rules($items = array()){\n //Merge the entered rules with the existing rules\n $this->r...
[ "0.63041645", "0.6185549", "0.61481667", "0.5781584", "0.57475924", "0.5730418", "0.571831", "0.56815356", "0.5620583", "0.56060433", "0.55863947", "0.5563624", "0.5563624", "0.5563624", "0.5553667", "0.5545089", "0.55404615", "0.5533088", "0.55302054", "0.55258316", "0.55196...
0.68605506
0
Sets or overwrites the label name for a field. Label names are used in the default validation error messages. You can use a label name in custom error messages with the `:field` place holder. Example // Set a default label $post>label('form_field1'); // Label will be set to 'Form Field' // Set an alternative label $pos...
public function label($field, $label = NULL) { if ($label === NULL AND ($field !== TRUE OR $field !== '*') AND ! isset($this->labels[$field])) { // Set the field label to the field name $this->labels[$field] = ucfirst(preg_replace('/[^\pL]+/u', ' ', $field)); } elseif ($label !== NULL) { // Set the ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setLabel($field,$label)\r\n {\r\n $this->labels[$field]=$label;\r\n }", "public function setLabel($name, $label);", "function setLabel( $label ) \n {\n return $this->setValueByFieldName( 'label_label', $label );\n }", "function labelField($fieldName,$fieldLabel){\...
[ "0.76285493", "0.7378087", "0.7169626", "0.71288025", "0.7048709", "0.6935929", "0.6901911", "0.6901911", "0.6901911", "0.6901911", "0.6901911", "0.68832475", "0.68832475", "0.6877213", "0.68560874", "0.6842465", "0.683716", "0.683716", "0.683716", "0.683716", "0.681806", "...
0.7203963
2
Sets labels using an array. Works the same as [Validation::labels] except allows you to pass in array of labels. Example $post>labels(array('first_name' => 'First Name', 'field2' => 'Label 2'));
public function labels(array $labels) { $this->labels = $labels + $this->labels; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setLabels(array $labels);", "public function labels(array $labels);", "public function setLabels($labels){\n\t\tif(!is_array($labels)) return;\n\t\t\n\t\tforeach($labels as $field_name => $label){\n\t\t\tif(isset($this->Fields[$field_name])){\n\t\t\t\t$this->Fields[$field_name]->label = $label;...
[ "0.8181013", "0.8119203", "0.7759459", "0.7637575", "0.7334983", "0.71704465", "0.6921557", "0.6879562", "0.68783146", "0.6864549", "0.67763096", "0.673969", "0.66850924", "0.65619254", "0.65427583", "0.6512856", "0.6481723", "0.6430514", "0.63828665", "0.6354797", "0.6346601...
0.6625267
13
Converts a filter, rule, or callback into a fullyqualified callback array.
protected function callback($callback) { if (is_string($callback)) { if (strpos($callback, '::') !== FALSE) { $callback = explode('::', $callback); } elseif (function_exists($callback)) { // No need to check if the callback is a method $callback = $callback; } elseif (method_exists...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function parseCallback($callback)\n {\n if (is_string($callback)) {\n $callbackParts = explode('@', $callback);\n $class = self::$namespace . '\\\\' . $callbackParts[0];\n $method = $callbackParts[1];\n $callback = [$class, $me...
[ "0.6623103", "0.6030627", "0.59623367", "0.58219796", "0.57980305", "0.5685994", "0.5616616", "0.55804193", "0.55102056", "0.5451728", "0.5417586", "0.5399575", "0.53971714", "0.5273294", "0.52434033", "0.5132288", "0.50912106", "0.50728685", "0.50609976", "0.501306", "0.5000...
0.4798371
31
Add a prefilter to one or more inputs. Prefilters are applied before rules or callbacks are executed. Example // Prefilters can be used to format/filter field values before they are validated // in this example the trim function will be applied to the field to trim any // extraneous whitespace. $post>pre_filter('trim',...
public function pre_filter($filter, $field = TRUE) { if ($field === TRUE OR $field === '*') { // Use wildcard $fields = array('*'); } else { // Add the filter to specific inputs $fields = func_get_args(); $fields = array_slice($fields, 1); } // Convert to a proper callback $filter = $th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function addInputFilters()\n {\n $inputFilter = new InputFilter();\n\n $author = (new Input())->setName('author')->setRequired(true);\n $author->getFilterChain()->attach(new StringTrim());\n $author->getValidatorChain()->attach((new StringLength())->setMin(1)->setMax(128));\n...
[ "0.63904905", "0.6315403", "0.61818427", "0.6133884", "0.60122657", "0.5975915", "0.5973849", "0.5933539", "0.5928436", "0.5883234", "0.5841304", "0.58303565", "0.57948244", "0.5759832", "0.57412845", "0.5711067", "0.5694103", "0.56901383", "0.5669959", "0.565495", "0.5648228...
0.6746555
0
Add a postfilter to one or more inputs. Postfilters are applied after rules and callbacks have been executed. Example // Postfilters do what prefilters do but after validation, in this // example we apply ucfirst. $post>post_filter('ucfirst', 'form_field1'); // Multiple fields can be passed in... $post>post_filter('ucf...
public function post_filter($filter, $field = TRUE) { if ($field === TRUE) { // Use wildcard $fields = array('*'); } else { // Add the filter to specific inputs $fields = func_get_args(); $fields = array_slice($fields, 1); } // Convert to a proper callback $filter = $this->callback($fil...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _applyPostfilters ($text) {\r\n foreach ($this->_postfilters as $filter) {\r\n if (is_callable ($filter)) {\r\n $ntext = call_user_func ($filter, $text);\r\n if (is_string ($ntext)) {\r\n $text = $ntext;\r\n }\r\n ...
[ "0.6502737", "0.6476188", "0.62036234", "0.6172008", "0.6137566", "0.6090047", "0.594938", "0.5903504", "0.5852433", "0.5836001", "0.58072454", "0.5804959", "0.57099825", "0.56779146", "0.56690246", "0.565517", "0.5618694", "0.5612788", "0.5596007", "0.5592193", "0.55894697",...
0.6320275
2
Add rules to a field. Validation rules may only return TRUE or FALSE and can not manipulate the value of a field. Example $input = array('form_field1' => '5', 'form_field2' => '10', 'form_field3' => '15'); $post = new Validation($input); // Add rules to the fields of our form (these can be chained) $post>add_rules('for...
public function add_rules($field, $rules) { // Get the rules $rules = func_get_args(); $rules = array_slice($rules, 1); // Set a default field label $this->label($field); if ($field === TRUE) { // Use wildcard $field = '*'; } foreach ($rules as $rule) { // Arguments for rule $args = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validationRules( array $input );", "public function addRules(array $rules) : ValidatorInterface;", "abstract public function addRule(ValidationRule$rule);", "public function addRule(string $field, IValidationRule $rule): void;", "public function set_rules($field, $label = '', $rules = array...
[ "0.718325", "0.699838", "0.6972204", "0.681279", "0.6766184", "0.66831034", "0.65664506", "0.65544736", "0.6515317", "0.65138036", "0.6473363", "0.64378023", "0.63927597", "0.63917065", "0.6287339", "0.62451977", "0.623972", "0.62232584", "0.62152183", "0.62144125", "0.621309...
0.78327084
0
Add an error to an input. Example $post>add_array('form_field1', 'email_exists'); print_r($post>errors()); // Output: Array ( [form_field1] => email_exists )
public function add_error($field, $name, $args = NULL) { $this->errors[$field] = array($name, $args); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_error($input, $message)\n {\n }", "function add_to_error_array($field = '', $message = '')\n {\n if ( ! isset($this->_error_array[$field]))\n {\n $this->_error_array[$field] = $message;\n }\n\n return;\n }", "function add_error($msg) {\n\t\t$this-...
[ "0.714144", "0.70153534", "0.6793956", "0.6719195", "0.670676", "0.6697831", "0.66832286", "0.6672179", "0.6666421", "0.66568875", "0.6652032", "0.66484857", "0.6646163", "0.6574426", "0.6549397", "0.6511795", "0.6500613", "0.64817184", "0.6467703", "0.6461662", "0.646156", ...
0.0
-1
Return the errors array. Example $post>add_array('form_field1', 'email_exists'); print_r($post>errors()); // Output: Array ( [form_field1] => email_exists )
public function errors($file = NULL) { if ($file === NULL) { $errors = array(); foreach($this->errors as $field => $error) { $errors[$field] = $error[0]; } return $errors; } else { $errors = array(); foreach ($this->errors as $input => $error) { // Locations to check for error...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getErrors()\n\t{\n\t\treturn [];\n\t}", "public function get_errors() {\n $res = array();\n foreach($this->errors as $error) {\n $res[] = $error->errormsg;\n }\n return $res;\n }", "public function getErrors()\n {\n $errors = $this->getValue('klarna_...
[ "0.8080445", "0.79665184", "0.79517317", "0.79450065", "0.78982985", "0.78969806", "0.7887358", "0.7876072", "0.78693885", "0.7858709", "0.78486645", "0.7837846", "0.77962625", "0.7791912", "0.7791912", "0.7791912", "0.7791912", "0.7791912", "0.7791912", "0.7791912", "0.77856...
0.0
-1
Rule: required. Generates an error if the field has an empty value. Example $post>add_rules('form_field1', 'required');
public function required($str) { if (is_object($str) AND $str instanceof ArrayObject) { // Get the array from the ArrayObject $str = $str->getArrayCopy(); } if (is_array($str)) { return ! empty($str); } else { return ! ($str === '' OR $str === NULL OR $str === FALSE); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function _required() {\n if (self::$_ruleValue) {\n if (trim(self::$_elementValue) == NULL &&\n strlen(self::$_elementValue) == 0) {\n self::setErrorMessage(\"Field Required\");\n self::setInvalidFlag(true);\n } else {\n ...
[ "0.75929755", "0.6911054", "0.6855434", "0.6841717", "0.6741762", "0.67339706", "0.65835744", "0.65640754", "0.65299374", "0.6419436", "0.6345248", "0.6319381", "0.63159007", "0.6309802", "0.62988967", "0.6280128", "0.62782943", "0.62782943", "0.62782943", "0.62782943", "0.62...
0.0
-1
Rule: matches. Generates an error if the field does not match one or more other fields. Example $post>add_rules('form_field1', 'matches');
public function matches($str, array $inputs) { foreach ($inputs as $key) { if ($str !== (isset($this[$key]) ? $this[$key] : NULL)) return FALSE; } return TRUE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function matches($field, $matches) {\n\t\tif ( ! isset($_POST[$matches]) || $_POST[$field['name']] !== $_POST[$matches]) {\n\t\t\t$this->_errors[$field['name']]['param'] = $matches;\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}", "public function validate($value, $rules, $match = null)\n {\n...
[ "0.6577196", "0.6039797", "0.59383917", "0.5861982", "0.57871836", "0.5692408", "0.55950284", "0.5593181", "0.5581504", "0.5487347", "0.5485769", "0.548564", "0.548564", "0.548564", "0.548564", "0.548564", "0.548564", "0.548564", "0.548564", "0.548564", "0.548564", "0.54856...
0.0
-1
Rule: length. Generates an error if the field is too long or too short. Example // For a minimum of 1 to a maximum of 5 characters $post>add_rules('form_field1', 'length[1,5]'); // For an exact length of 5 $post>add_rules('form_field1', 'length[5]');
public function length($str, array $length) { if ( ! is_string($str)) return FALSE; $size = mb_strlen($str); $status = FALSE; if (count($length) > 1) { list ($min, $max) = $length; if ($size >= $min AND $size <= $max) { $status = TRUE; } } else { $status = ($size === (int) $len...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function validateFieldLength($fieldLength);", "public function maxLength($field, $length) {\n\t\t$length = intval($length);\n\t\t$postData = $_POST[$field['name']];\n\t\t\n\t\tif ( ! is_string($postData))\n\t\t\tstrval($postData);\n\t\t\t\n\t\tif (strlen($postData) > intval($length)) {\n\t\t\t...
[ "0.7497676", "0.7034979", "0.6995446", "0.6878494", "0.68638116", "0.6744758", "0.66907334", "0.6651338", "0.66455704", "0.6645362", "0.6626663", "0.6612456", "0.6609591", "0.6582753", "0.6580906", "0.6565252", "0.65503967", "0.6531155", "0.6531155", "0.6523616", "0.6518725",...
0.0
-1
Rule: depends_on. Generates an error if the field does not depend on one or more other fields. Example // (separated by commas for more than one) $post>add_rules('form_field2', 'depends_on[form_field1]');
public function depends_on($field, array $fields) { foreach ($fields as $depends_on) { if ( ! isset($this[$depends_on]) OR $this[$depends_on] == NULL) return FALSE; } return TRUE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n return [\n 'partner_code' => 'required',\n 'date_import'=>'required',\n 'date_delivery'=>'required|after_or_equal:date-import',\n 'total_price'=>'required',\n 'total_quantity'=>'required',\n \n ];\n ...
[ "0.55050707", "0.5366031", "0.53198487", "0.53009874", "0.52715325", "0.5266634", "0.52143157", "0.5214091", "0.51857644", "0.51514703", "0.5145362", "0.5135256", "0.5125097", "0.5114141", "0.5107641", "0.510761", "0.5093807", "0.509252", "0.50861084", "0.507738", "0.5075811"...
0.64066535
0
Rule: chars. Generates an error if the field contains characters outside of the list. Example $post>add_rules('form_field1', 'chars[a,b,c,d]');
public function chars($value, array $chars) { return ! preg_match('![^'.implode('', $chars).']!u', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCharacterFieldValidation()\n {\n // Field should only allow 50 characters\n $field = $this->table->getField('stringone');\n\n $testStr = str_repeat('x', 56);\n $this->assertEquals(56, strlen($testStr));\n $cleanStr = $field->getPHPValue($testStr);\n ...
[ "0.63605326", "0.59771985", "0.59474766", "0.588711", "0.58858454", "0.5818553", "0.57251877", "0.5715104", "0.56897926", "0.56699795", "0.5668319", "0.5619932", "0.5616505", "0.5611068", "0.5579003", "0.55141926", "0.5512893", "0.55045813", "0.5496185", "0.5479996", "0.54563...
0.6481232
0
Register and add settings
public function page_init() { register_setting( 'program_manager_option_group', // Option group 'program_manager_option', // Option name array( $this, 'sanitize' ) // Sanitize ); add_settings_section( 'program_manager_section_id', // I...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_settings()\n {\n }", "public function register_settings()\n {\n }", "function register_settings() {\n\tregister_setting(\n\t\t'StandardsReader_settings_group', // Option group\n\t\t'endpoint'); // Sanitize\n\t\n\tregister_setting(\n\t\t'StandardsReader_setti...
[ "0.8434883", "0.8434127", "0.7823006", "0.77566963", "0.7676519", "0.76414496", "0.7601713", "0.75783163", "0.7563666", "0.7508365", "0.74951875", "0.74676687", "0.7427431", "0.7415036", "0.74048483", "0.73567194", "0.7328357", "0.73214245", "0.7308981", "0.7278752", "0.72731...
0.0
-1
Sanitize each setting field as needed
public function sanitize( $input ) { $new_input = array(); if( isset( $input['pre_days'] ) ) $new_input['pre_days'] = sanitize_text_field( $input['pre_days'] ); if( isset( $input['pre_days_file'] ) ) $new_input['pre_days_file'] = sanitize_text_field( $input['pre_days...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validate_cpjr3_settings( $input ) {\n \n $output = array(); \n \n foreach( $input as $key => $value ) { \n \n if( isset( $input[$key] ) ) { \n \n $output[$key] = strip_tags( stripslashes( $input[ $key ] ) ); \n \n } \n \n...
[ "0.71320045", "0.69963264", "0.6988185", "0.69679", "0.6961926", "0.6947541", "0.687181", "0.6775032", "0.67263705", "0.6707201", "0.6640116", "0.6625225", "0.64982826", "0.64917964", "0.64565825", "0.6442299", "0.64419377", "0.6437081", "0.6436765", "0.64077985", "0.63838613...
0.0
-1
Print the Section text
public function print_section_info() { print 'Enter your settings below:'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function print_section_info() {\n // print 'Enter your settings below:';\n }", "public static function print_section_info()\n {\n print 'Enter your settings below:';\n }", "public function print_section_info()\n {\n print \"Don't use long sentences below!\";\n }", "...
[ "0.7569277", "0.74426144", "0.73395956", "0.7320328", "0.7144404", "0.7112716", "0.69916064", "0.6867665", "0.68493974", "0.67556393", "0.66533613", "0.66291517", "0.65949726", "0.65654373", "0.6496098", "0.63539654", "0.63539654", "0.63539654", "0.63529944", "0.63529944", "0...
0.74607974
2
Get the settings option array and print one of its values
public function pre_days_callback() { printf( '<input type="text" id="pre_days" name="program_manager_option[pre_days]" value="%s" />', isset( $this->options['pre_days'] ) ? esc_attr( $this->options['pre_days']) : '' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_settings($option)\n {\n }", "function bdpp_get_settings() {\n\t\n\t$options = get_option('bdpp_opts');\n\t\n\t$settings = (is_array($options)) ? $options : array();\n\t\n\treturn $settings;\n}", "public function viewSettings(array $settings = array());", "function print_options(){\n\t\tfor...
[ "0.6824561", "0.671921", "0.6705289", "0.67030084", "0.66402143", "0.6639999", "0.6455486", "0.6395388", "0.63846093", "0.63763034", "0.62828046", "0.62750417", "0.623459", "0.6221672", "0.61626196", "0.61619353", "0.6152463", "0.61518425", "0.61435235", "0.61194867", "0.6114...
0.0
-1
Get the settings option array and print one of its values
public function main_days_callback() { printf( '<input type="text" id="main_days" name="program_manager_option[main_days]" value="%s" />', isset( $this->options['main_days'] ) ? esc_attr( $this->options['main_days']) : '' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_settings($option)\n {\n }", "function bdpp_get_settings() {\n\t\n\t$options = get_option('bdpp_opts');\n\t\n\t$settings = (is_array($options)) ? $options : array();\n\t\n\treturn $settings;\n}", "public function viewSettings(array $settings = array());", "function print_options(){\n\t\tfor...
[ "0.6824561", "0.671921", "0.6705289", "0.67030084", "0.66402143", "0.6639999", "0.6455486", "0.6395388", "0.63846093", "0.63763034", "0.62828046", "0.62750417", "0.623459", "0.6221672", "0.61626196", "0.61619353", "0.6152463", "0.61518425", "0.61435235", "0.61194867", "0.6114...
0.0
-1
Get the settings option array and print one of its values
public function pre_days_file_callback() { printf( '<input id="pre_days_file" type="text" size="36" name="program_manager_option[pre_days_file]" value="%s" /> <input id="pre_upload_file_button" class="button" type="button" value="Upload/Select PRE File" />', isset( $this->options['pre_days_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_settings($option)\n {\n }", "function bdpp_get_settings() {\n\t\n\t$options = get_option('bdpp_opts');\n\t\n\t$settings = (is_array($options)) ? $options : array();\n\t\n\treturn $settings;\n}", "public function viewSettings(array $settings = array());", "function print_options(){\n\t\tfor...
[ "0.6824561", "0.671921", "0.6705289", "0.67030084", "0.66402143", "0.6639999", "0.6455486", "0.6395388", "0.63846093", "0.63763034", "0.62828046", "0.62750417", "0.623459", "0.6221672", "0.61626196", "0.61619353", "0.6152463", "0.61518425", "0.61435235", "0.61194867", "0.6114...
0.0
-1
Get the settings option array and print one of its values
public function main_days_file_callback() { printf( '<input id="main_days_file" type="text" size="36" name="program_manager_option[main_days_file]" value="%s" /> <input id="main_upload_file_button" class="button" type="button" value="Upload/Select MAIN File" />', is...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_settings($option)\n {\n }", "function bdpp_get_settings() {\n\t\n\t$options = get_option('bdpp_opts');\n\t\n\t$settings = (is_array($options)) ? $options : array();\n\t\n\treturn $settings;\n}", "public function viewSettings(array $settings = array());", "function print_options(){\n\t\tfor...
[ "0.6824561", "0.671921", "0.6705289", "0.67030084", "0.66402143", "0.6639999", "0.6455486", "0.6395388", "0.63846093", "0.63763034", "0.62828046", "0.62750417", "0.623459", "0.6221672", "0.61626196", "0.61619353", "0.6152463", "0.61518425", "0.61435235", "0.61194867", "0.6114...
0.0
-1
Buys an item from the store
function buyItem($store_id, $journey_id, $character_id, $player_id, $item_id) { addToDebugLog("buyItem(), Function Entry - Store ID: " . $store_id . ", Journey ID: " . $journey_id . "; Character ID: " . $character_id . "; Player ID: " . $player_id . "; Item ID: " . $item_id . ", INFO"); // Get item details from...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buy($itemid)\n {\n //check for valid id for eg. it should be numeric\n //do buying\n\n }", "private function makeItemPurchase() : void\n {\n $this->item->available = $this->item->available - 1;\n $this->coinService->setCoinCount(\n $this->coinServic...
[ "0.69104177", "0.6644097", "0.6562624", "0.62741125", "0.60793245", "0.6065159", "0.6051648", "0.60084134", "0.59530973", "0.5926155", "0.59139705", "0.5873262", "0.5870242", "0.58664453", "0.58555084", "0.584564", "0.5808956", "0.58003455", "0.5790414", "0.57894444", "0.5776...
0.5947942
9
This function lists the equipment held by each player
function characterEquipment($character_id, $player_id, $journey_id, $store_id) { addToDebugLog("characterEquipment(), Function Entry - supplied parameters: Player ID: " . $player_id . "; Journey ID: " . $journey_id . "; Character ID: " . $charcter_id . "; Store ID: " . $store_id . ", INFO"); // Get Character N...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getItems()\n {\n $Items = $this->mysql->QUERY(\n 'SELECT player_equipment.*,\n server_items.NAME,\n server_items.CATEGORY,\n server_items.LOOT_ID,\n server_items.SLOTS,\n server_items.DAMAGE,\n...
[ "0.634718", "0.6177603", "0.6177603", "0.612996", "0.6030202", "0.6012881", "0.5988474", "0.59585917", "0.5905305", "0.5809198", "0.57728696", "0.576176", "0.5699136", "0.5699058", "0.55710304", "0.55585766", "0.5550112", "0.55387914", "0.55259055", "0.55178547", "0.55001485"...
0.63865745
0
This function returns the weight of the equipment held by each player
function characterEquipmentWeight($character_id) { addToDebugLog("characterEquipmentWeight(), Function Entry - supplied parameters: Character ID: " . $character_id . ", INFO"); $sql = "SELECT weight FROM hackcess.character_equipment WHERE character_id = " . $character_id . ";"; $result = search($sql); $rows...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getWeight();", "public function getWeight();", "public function getWeight();", "public function getWeight();", "public function getWeight();", "public function getWeight();", "public function getWeight();", "public function getWeight() {\n return $this->item->getWeight();\n ...
[ "0.775664", "0.775664", "0.775664", "0.775664", "0.775664", "0.775664", "0.775664", "0.7486345", "0.7477483", "0.7322876", "0.72774655", "0.72774655", "0.72774655", "0.72774655", "0.72774655", "0.72774655", "0.72603875", "0.7243038", "0.72323054", "0.7229838", "0.7207178", ...
0.7148353
24
This function creates a store item
function createStoreItem($slot, $store_id, $min_level) { addToDebugLog("createRandomItem(), Function Entry - supplied parameters: Store ID: " . $store_id . "; Slot: " . $slot . "; Min Level: " . $min_level . ", INFO"); srand(make_seed()); $item_choice = rand(0, 4); switch ($item_choice) { case 0: // He...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createNewItem();", "public function createItem($data);", "public function create()\n {\n // Not needed cause this is coming from the item listing\n }", "public function create()\n {\n $form = [\n \"name\" => [\n \"label\" => \"Name\",\n ...
[ "0.74960214", "0.7254384", "0.7178375", "0.683041", "0.68282855", "0.676873", "0.67443264", "0.6722187", "0.668588", "0.66382664", "0.6623112", "0.6608097", "0.655423", "0.6553534", "0.65221274", "0.6517862", "0.64926237", "0.64817184", "0.6476473", "0.64662635", "0.6434104",...
0.64965904
16
This function returns a random adjective for store items.
function getAdjective() { addToDebugLog("getAdjective(), Function Entry - No parameters, INFO"); // Determine the consonant to use for the name $consonants = array("b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "q", "r", "s", "t", "v", "w", "y", "z"); $consonant = $consonants[rand(0, 20)]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function randomItem();", "public function random()\r\n\t{\r\n\t\treturn $this->_items[array_rand($this->_items)];\r\n\t}", "public function random()\n {\n return $this->items[array_rand($this->items)];\n }", "function adjective() {\n\t\tglobal $adjectives;\n\n\t\t$total = count($adjective...
[ "0.7630049", "0.6912438", "0.69042236", "0.6836596", "0.6598373", "0.64539754", "0.62522715", "0.62187636", "0.6167609", "0.61522186", "0.61307395", "0.6124063", "0.60588247", "0.6001362", "0.5983973", "0.59762883", "0.59362906", "0.5904049", "0.5903894", "0.5900733", "0.5887...
0.6442751
6
Lists items in the store for the provided slot
function getStoreContentsBySlot($store_id, $journey_id, $character_id, $player_id, $slot) { addToDebugLog("manageEquipment(), Function Entry - supplied parameters: Player ID: " . $player_id . "; Journey ID: " . $journey_id . "; Character ID: " . $charcter_id . "; Store ID: " . $store_id . ", INFO"); $row_limit ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSlotsList(){\n return $this->_get(5);\n }", "public function show(Slot $slot)\n {\n //\n }", "function getItems();", "function getItems();", "public function index()\n {\n // dd('slots');\n $slots = Slot::all();\n return view('Admin.Slot.index'...
[ "0.62953746", "0.61826473", "0.577623", "0.577623", "0.5750153", "0.5745147", "0.5745147", "0.5745147", "0.5745147", "0.5745147", "0.5745147", "0.5745147", "0.5745147", "0.5745147", "0.5745147", "0.5745147", "0.5745147", "0.5745147", "0.56750464", "0.55988884", "0.5562684", ...
0.6276735
1
Lists potions in the store
function getStoreContentPotions($store_id, $journey_id, $character_id, $player_id) { addToDebugLog("getStoreContentPotions(), Function Entry - supplied parameters: Player ID: " . $player_id . "; Journey ID: " . $journey_id . "; Character ID: " . $charcter_id . ", INFO"); $row_limit = 5; $sql = "SELECT * ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function listSpots() {\n $db = DB::getInstance();\n $tpl = new Template('poker');\n\n $spots = PokerSpot::getAll();\n\n foreach ($spots as $spot) {\n \tforeach ($spot->ranges as $key => $value) {\n\t \tif (is_array($value))\n\t \t\t$spot->ranges[$key] = impl...
[ "0.6774445", "0.6306048", "0.62844294", "0.59214854", "0.57791203", "0.573031", "0.57049", "0.56844676", "0.5620657", "0.560468", "0.5538445", "0.5515124", "0.5503691", "0.5503691", "0.5503691", "0.5498975", "0.54956406", "0.5490801", "0.5485587", "0.5473627", "0.54728", "0...
0.57696146
5
Lists potions in the store
function getStoreContentPets($store_id, $journey_id, $character_id, $player_id) { addToDebugLog("getStoreContentPets(), Function Entry - supplied parameters: Player ID: " . $player_id . "; Journey ID: " . $journey_id . "; Character ID: " . $charcter_id . ", INFO"); $row_limit = 5; $sql = "SELECT * FROM hack...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function listSpots() {\n $db = DB::getInstance();\n $tpl = new Template('poker');\n\n $spots = PokerSpot::getAll();\n\n foreach ($spots as $spot) {\n \tforeach ($spot->ranges as $key => $value) {\n\t \tif (is_array($value))\n\t \t\t$spot->ranges[$key] = impl...
[ "0.6774445", "0.6306048", "0.62844294", "0.59214854", "0.57791203", "0.57696146", "0.573031", "0.57049", "0.56844676", "0.5620657", "0.560468", "0.5538445", "0.5515124", "0.5503691", "0.5503691", "0.5503691", "0.5498975", "0.54956406", "0.5490801", "0.5485587", "0.5473627", ...
0.53563756
37
This function returns the store name for the provided store id
function getStoreName($store_id) { addToDebugLog("getStoreName(), Function Entry - supplied parameters: Store ID: " . $store_id . ", INFO"); $sql = "SELECT store_name FROM hackcess.store where store_id = " . $store_id . ";"; $result = search($sql); return $result[0][0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function storeIdToName($storeid) {\n if (array_key_exists($storeid, $this->stores)) {\n return $this->stores[$storeid];\n } else {\n return '';\n }\n }", "public function getStoreName();", "public function getStoreName()\n {\n return $this->_fields...
[ "0.8516377", "0.830883", "0.77555144", "0.7665862", "0.7665862", "0.76077574", "0.76013076", "0.75168335", "0.73002064", "0.73002064", "0.73002064", "0.7284241", "0.72716963", "0.726627", "0.7210777", "0.71941215", "0.7193058", "0.7168201", "0.71647537", "0.71410924", "0.7140...
0.8657338
0
Creates and returns a store name
function generateStore($grid_id, $journey_id, $character_id) { global $debug_enabled; addToDebugLog("generateStore(), Function Entry - Parameters: Grid ID: " . $grid_id . "; Journey ID: " . $journey_id . "; Character ID: " . $character_id . ", INFO"); // Store will have 0-2 of each item // Items will b...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStoreName();", "public function getStoreName(): string\n {\n return $this->storeName;\n }", "public function getStoreName()\n {\n return $this->store_name;\n }", "public function getStoreName()\n {\n return $this->store_name;\n }", "protected function getSt...
[ "0.761499", "0.7057691", "0.69624853", "0.69624853", "0.6862313", "0.67974436", "0.6760682", "0.6654344", "0.6421047", "0.6410273", "0.6341048", "0.6323327", "0.6323327", "0.6323327", "0.63166374", "0.6307057", "0.6263247", "0.6251435", "0.62054694", "0.62001276", "0.60556906...
0.0
-1
Creates and returns a store name
function generateStoreName() { addToDebugLog("generateEnemyName(), Function Entry - no parameters"); // Generate the name $syllables = rand(2, 4); $name = ""; for ($a = 0; $a < $syllables; $a++) { $consonants = array("b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "q", "r", "s", "t", "v",...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStoreName();", "public function getStoreName(): string\n {\n return $this->storeName;\n }", "public function getStoreName()\n {\n return $this->store_name;\n }", "public function getStoreName()\n {\n return $this->store_name;\n }", "protected function getSt...
[ "0.761499", "0.7057691", "0.69624853", "0.69624853", "0.6862313", "0.67974436", "0.6760682", "0.6654344", "0.6421047", "0.6410273", "0.6341048", "0.6323327", "0.6323327", "0.6323327", "0.6307057", "0.6263247", "0.6251435", "0.62054694", "0.62001276", "0.60556906", "0.6038098"...
0.63166374
14
This function returns the store id (if present) for the provided grid id
function isThereAStoreHere($grid_id) { addToDebugLog("isThereAStoreHere(), Function Entry - supplied parameters: Grid ID: " . $grid_id . ", INFO"); $sql = "SELECT store_id FROM hackcess.store where grid_id = " . $grid_id . ";"; addToDebugLog("isThereAStoreHere(), Constructed query: " . $sql . ", INFO"); $re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _getStoreId() {\n $store_id = 1;\n return $store_id;\n }", "public function getStoreId();", "public function getStoreId();", "public function getStoreId();", "protected function getStoreId($id = '')\n\t{\n\t\t// Compile the store id.\n\t\t$id\t.= ':'.$this->getState('filte...
[ "0.74421245", "0.73501956", "0.73501956", "0.73501956", "0.7149737", "0.71315867", "0.71090144", "0.7107497", "0.71057373", "0.71013707", "0.7100002", "0.70828503", "0.70828503", "0.70705384", "0.70656115", "0.70655185", "0.7063508", "0.7056053", "0.7050564", "0.70423067", "0...
0.69715285
24
Sells an item from the characters equipment
function sellItem($store_id, $journey_id, $character_id, $player_id, $item_id) { addToDebugLog("sellItem(), Function Entry - Store ID: " . $store_id . ", Journey ID: " . $journey_id . "; Character ID: " . $character_id . "; Player ID: " . $player_id . "; Item ID: " . $item_id . ", INFO"); // Get item details ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buy($itemid)\n {\n //check for valid id for eg. it should be numeric\n //do buying\n\n }", "public function sellItem($seller){\r\n\t}", "function buyItem($store_id, $journey_id, $character_id, $player_id, $item_id) {\n\t\n\t\taddToDebugLog(\"buyItem(), Function Entry - Store...
[ "0.6830131", "0.6569104", "0.65110666", "0.64519006", "0.64284486", "0.6361982", "0.62914526", "0.61430675", "0.6060559", "0.60355693", "0.596685", "0.5946827", "0.5917661", "0.5873811", "0.5856974", "0.58141863", "0.5788556", "0.5774723", "0.57320124", "0.5719306", "0.558278...
0.71501464
0
Lists the items for sale in the store
function storeEquipment($store_id, $journey_id, $character_id, $player_id) { addToDebugLog("manageEquipment(), Function Entry - supplied parameters: Player ID: " . $player_id . "; Journey ID: " . $journey_id . "; Character ID: " . $charcter_id . "; Store ID: " . $store_id . ", INFO"); // Get store name $store...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showItemsToSell(){\n $data = $this->getListing();\n\n return view('sales.show-items')->with(['listing' => $data]);\n }", "public function getSaleList()\n {\n return $this->with('images','manufacturer', 'category')->sale()->get();\n }", "public function stores_list(...
[ "0.79447126", "0.71612495", "0.7098198", "0.70771027", "0.6925464", "0.68832326", "0.68478596", "0.68194413", "0.6714623", "0.668455", "0.66783535", "0.6665719", "0.6627683", "0.66085136", "0.658977", "0.6580329", "0.6580329", "0.6580329", "0.6580329", "0.6580329", "0.6565807...
0.0
-1
Creates and returns a store name
function getStoreDetails($store_id, $attribute) { addToDebugLog("getStoreDetails(), Function Entry - Store ID: " . $store_id . ", INFO"); $sql = "SELECT " . $attribute . " FROM hackcess.store WHERE store_id = " . $store_id . ";"; $result = search($sql); return $result[0][0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStoreName();", "public function getStoreName(): string\n {\n return $this->storeName;\n }", "public function getStoreName()\n {\n return $this->store_name;\n }", "public function getStoreName()\n {\n return $this->store_name;\n }", "protected function getSt...
[ "0.761499", "0.7057691", "0.69624853", "0.69624853", "0.6862313", "0.67974436", "0.6760682", "0.6654344", "0.6421047", "0.6410273", "0.6341048", "0.6323327", "0.6323327", "0.6323327", "0.63166374", "0.6307057", "0.6263247", "0.6251435", "0.62054694", "0.62001276", "0.60556906...
0.0
-1
Returns whether an attribute exists.
public function hasAttribute($name) { return isset($this->attributes[$name]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function has_attribute($attribute) {\n // Will return true or false\n return array_key_exists($attribute, $this->attributes());\n }", "public function hasAttribute($attr_name)\n {\n return isset($this->attributes[$attr_name]);\n }", "private function has_attribute($attribute) {\n\t ...
[ "0.83465385", "0.82430875", "0.82383907", "0.81689733", "0.8132274", "0.8131094", "0.80932426", "0.8047445", "0.80175805", "0.8012688", "0.7998871", "0.79873407", "0.79382324", "0.7918264", "0.7910487", "0.79028255", "0.7887469", "0.7836938", "0.78323346", "0.77900106", "0.77...
0.775801
22