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
I have accepted the cost that this pact will have on me. My search for power lead me down a path I did not think possible before, and even if I did, never would I have deemed it necessary
public function applyAlwaysOnAbilityOverrides (): self { $class = new ReflectionClass($this->getItem()->getBaseItem()); if (is_iterable($this->getItem()->getItemAbilities())) { foreach ($this->getItem()->getItemAbilities() as $itemAbility) { if ($itemAbility->isAlwaysOn() && $this->attunedLevel >= $itemAbility->getAttunementLevelRequired()) { foreach ($itemAbility->getAbility()->getAbilityPartial() as $abilityPartial) { if ($abilityPartial instanceof AbilityOverride) { try { $key = Tools::snakeCaseToCamelCase($abilityPartial->getOverrideKey(), false); $property = $class->getProperty($key); $property->setAccessible(true); if ($abilityPartial->isAppend()) { $property->setValue($this->getItem()->getBaseItem(), Tools::append($property->getValue($this->getItem()->getBaseItem()), $abilityPartial->getValue())); } else { $property->setValue($this->getItem()->getBaseItem(), $abilityPartial->getValue()); } /** TODO Unset the ability partial */ } catch (\Exception $exception) { continue; } } } } } } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasPrecost(){\n return $this->_has(25);\n }", "function reduce_woocommerce_min_strength_requirement( $strength ) {\n return 2;\n}", "public function cost(){\n\t\t\n\t\treturn 200;\n\t}", "function isPowerOverloaded($extra_consumption = 0)\n{\n global $game;\n\n // Calculate b...
[ "0.57405835", "0.57033587", "0.5655516", "0.5583838", "0.5497094", "0.5445773", "0.5403922", "0.5327728", "0.5311983", "0.53050745", "0.5264904", "0.52633363", "0.5204975", "0.5202033", "0.52019393", "0.5188607", "0.5187021", "0.5185876", "0.51723284", "0.5151267", "0.5142136...
0.0
-1
Once again, I'm complaining about the black magiks I applied in this method. But hey, pretty serialization is pretty serialization, and if it costs my soul, so be it
public function applyAbilityOverrides () { $class = new ReflectionClass($this->getItem()->getBaseItem()); $baseItem = $class->newInstance(); if (is_iterable($this->getItem()->getItemAbilities())) { foreach ($this->getItem()->getItemAbilities() as $itemAbility) { if ($this->attunedLevel >= $itemAbility->getAttunementLevelRequired()) { foreach ($itemAbility->getAbility()->getAbilityPartial() as $abilityPartial) { if ($abilityPartial instanceof AbilityOverride) { try { $key = Tools::snakeCaseToCamelCase($abilityPartial->getOverrideKey(), false); $property = $baseItem->getProperty($key); $property->setAccessible(true); if ($abilityPartial->isAppend()) { $property->setValue($this->getItem()->getBaseItem(), Tools::append($property->getValue(), $abilityPartial->getValue())); } else { $property->setValue($this->getItem()->getBaseItem(), $abilityPartial->getValue()); } unset ($abilityPartial); } catch (\Exception $exception) { continue; } } } } } } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function serialize();", "abstract public function serialize();", "public abstract function serialize();", "abstract protected function serializeData();", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() ...
[ "0.7651464", "0.7651464", "0.7561082", "0.7483263", "0.7284427", "0.7284427", "0.7284427", "0.7284427", "0.7284427", "0.7284427", "0.7283874", "0.7283874", "0.71980834", "0.71980834", "0.71980834", "0.6978929", "0.6925858", "0.6925858", "0.69000506", "0.68088394", "0.67988974...
0.0
-1
Display a listing of the resource.
public function index(Request $request) { //$request->user()->authorizeRoles('admin'); $About = About::paginate(5); return view('about.indexabout',compact('About')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Show the form for creating a new resource.
public function create() { return view('about.createabout'); }
{ "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) { $this->validate($request, [ 'titulo' => 'required', 'descripcion' => 'required', 'imagen' => 'sometimes|required' ]); if($request->file('imagen')){ $file = $request->file('imagen'); $extension = $file->getClientOriginalExtension(); $imagen = Image::make($file); $nom = str_replace(':','-',str_replace(' ','-',Carbon::now()->toDateTimeString().'.'.$extension)); $path = 'imagenes/about'; if (!file_exists($path)) { mkdir($path, 0777, true); } $img = $path.'/'.$nom; if($imagen->save($img)) { $requestData = $request->all(); $requestData['imagen'] = $img; $about = new About; $about->titulo=$request->titulo; $about->descripcion=$request->descripcion; $about->imagen=$img; $about->save(); // About::create($requestData); $mensaje = "Registrado correctamente"; }else{ $mensaje = "Error al guardar la imagen"; } } return redirect()->route('about.index')->with('success','Item creado Exitosamente!'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Display the specified resource.
public function show($id) { $About = About::findOrFail($id); return view('about.showabout',compact('About')); }
{ "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) { $About = About::findOrFail($id); return view('about.editabout',compact('About')); }
{ "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, $id) { // $About = About::findOrFail($id); // $About->titulo = $request->titulo; // $About->descripcion = $request->descripcion; // // $Abouts->imagen = $request->imagen; // if($request->file('imagen')){ // $path = Storage::disk('public_uploads')->put('about', $request->file('imagen')); // $request->imagen ='uploads/'.$path; // } // $About->imagen = $request->imagen; // $About->save(); // return redirect()->route('about.index')->with('success','Item Actualizado Exitosamente!'); $this->validate($request, [ 'titulo' => 'required', 'descripcion' => 'required', 'imagen' => 'sometimes|required' ]); if($request->file('imagen')){ $file = $request->file('imagen'); $extension = $file->getClientOriginalExtension(); $imagen = Image::make($file); $nom = str_replace(':','-',str_replace(' ','-',Carbon::now()->toDateTimeString().'.'.$extension)); $path = 'imagenes/about'; if (!file_exists($path)) { mkdir($path, 0777, true); } $img = $path.'/'.$nom; if($imagen->save($img)) { $requestData = $request->all(); $requestData['imagen'] = $img; $about = new About; $about->titulo=$request->titulo; $about->descripcion=$request->descripcion; $about->imagen=$img; $about = About::findOrFail($id); $archivo_antiguo = $about->imagen; $about->update($requestData); if (File::delete($archivo_antiguo)) { $mensaje = "Actualizado correctamente :3"; }else{ $mensaje = "Actualizado.. Error al eliminar la imagen"; } }else{ $mensaje = "Error al guardar la imagen"; } }else{ $requestData = $request->all(); $about = About::findOrFail($id); $about->update($requestData); } return redirect()->route('about.index')->with('success','Item Actualizado Exitosamente!'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890...
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { $About = About::findOrFail($id); $About->delete(); return redirect()->route('about.index')->with('success','Item Eliminado Exitosamente!'); }
{ "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
Bootstrap any application services.
public function boot() { $this->bootingDomain(); $this->registerCommands(); $this->registerListeners(); $this->registerPolicies(); $this->registerRoutes(); $this->registerBladeComponents(); $this->registerLivewireComponents(); $this->registerSpotlightCommands(); $this->bootedDomain(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function bootstrap(): void\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot()\n {\n // Boot here application\n }", "public func...
[ "0.7344842", "0.7212776", "0.7207748", "0.7123287", "0.7109729", "0.70822036", "0.7076881", "0.70718396", "0.7051853", "0.7025475", "0.7011949", "0.70043486", "0.6955807", "0.69322443", "0.69319373", "0.69272774", "0.6911386", "0.69069713", "0.6898877", "0.6898432", "0.689659...
0.67912513
51
Register any application services.
public function register() { $this->registeringDomain(); $this->registerMorphMaps(); $this->registerResponsables(); $this->registeredDomain(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n $this->registerServices();\n }", "public function register()\n {\n $this->registerAssets();\n $this->registerServices();\n }", "public function register()\n\t{\n\n $this->registerUserService();\n $this->registerCountryService();\n ...
[ "0.7879658", "0.7600202", "0.74930716", "0.73852855", "0.736794", "0.7306089", "0.7291359", "0.72896826", "0.72802424", "0.7268026", "0.7267702", "0.72658145", "0.7249053", "0.72171587", "0.7208486", "0.7198799", "0.7196415", "0.719478", "0.7176513", "0.7176227", "0.7164647",...
0.0
-1
Allow a domain service provider to specify additional actions to run before the boot process starts.
protected function bootingDomain() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function bootedDomain()\n {\n }", "protected function _before(){\n $this->startApplication();\n }", "protected function _before() {\n\t\tparent::_before ();\n\t\t$this->_startServices ( true );\n\t\t$this->startup = new Startup ();\n\t\tEventsManager::start ();\n\t\tTranslatorManager:...
[ "0.6492616", "0.6054468", "0.6052125", "0.6007984", "0.5992672", "0.593295", "0.5928086", "0.58971274", "0.5858215", "0.5838992", "0.58240974", "0.5816585", "0.58067745", "0.5784869", "0.5784869", "0.5784869", "0.5784869", "0.5751236", "0.5741555", "0.5739451", "0.57261634", ...
0.6484385
1
Allow a domain service provider to specify additional actions to run after the boot process runs.
protected function bootedDomain() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function bootingDomain()\n {\n }", "public function boot()\n {\n $this->bootingDomain();\n\n $this->registerCommands();\n $this->registerListeners();\n $this->registerPolicies();\n $this->registerRoutes();\n $this->registerBladeComponents();\n $...
[ "0.65681833", "0.599234", "0.59274167", "0.5851133", "0.5809211", "0.58059484", "0.5792705", "0.57758963", "0.5738833", "0.5731251", "0.5719974", "0.5714943", "0.5713465", "0.5706746", "0.56962454", "0.5690795", "0.5689715", "0.5677159", "0.5677159", "0.56764716", "0.5660376"...
0.6610115
0
Allow a domain service provider to specify additional actions to run before the register process starts.
protected function registeringDomain() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register(): void {\n\t\tif ( false !== static::REGISTRATION_ACTION ) {\n\t\t\tadd_action(\n\t\t\t\tstatic::REGISTRATION_ACTION,\n\t\t\t\t[ $this, 'register_services' ]\n\t\t\t);\n\t\t} else {\n\t\t\t$this->register_services();\n\t\t}\n\t}", "public function register() {\n\t\tadd_action( 'bp_loade...
[ "0.6277676", "0.59795636", "0.59727204", "0.5918401", "0.57780457", "0.57421964", "0.56657875", "0.562709", "0.55771416", "0.55427754", "0.5493059", "0.5488814", "0.5484971", "0.54732245", "0.54472697", "0.5435085", "0.5428474", "0.54283655", "0.5421114", "0.5411487", "0.5402...
0.604839
1
Allow a domain service provider to specify additional actions to run after the register process runs.
protected function registeredDomain() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register(): void {\n\t\tif ( false !== static::REGISTRATION_ACTION ) {\n\t\t\tadd_action(\n\t\t\t\tstatic::REGISTRATION_ACTION,\n\t\t\t\t[ $this, 'register_services' ]\n\t\t\t);\n\t\t} else {\n\t\t\t$this->register_services();\n\t\t}\n\t}", "protected function registeringDomain()\n {\n }", ...
[ "0.6350838", "0.616889", "0.60427505", "0.5913878", "0.5889714", "0.5709446", "0.56871736", "0.56684434", "0.56188136", "0.5608972", "0.5607045", "0.5576264", "0.5550387", "0.5543195", "0.5503731", "0.5488566", "0.54839534", "0.5482635", "0.5475993", "0.54666394", "0.54574865...
0.61827433
1
Add or update a repo
public function addBundle($fullName, $updateRepo = true) { list($username, $bundleName) = explode('/', $fullName); $user = $this->users->getOrCreate($username); if (!isset($this->bundles[strtolower($fullName)])) { $bundle = new Bundle($fullName); $this->em->persist($bundle); $user->addBundle($bundle); $this->bundles[strtolower($fullName)] = $bundle; } else { $bundle = $this->bundles[strtolower($fullName)]; } $this->em->flush(); if ($updateRepo) { $this->updateRepo($bundle); } return $bundle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gitUpdate()\n{\n \n $config = json_decode(file_get_contents(\"/app/config.json\"), true);\n\n $git = $config['git'];\n $remote = \"https://\" . $git['user'] . \":\" . $git['token'] . \"@github.com/\" . $git['git_dir'];\n exec(\"cd \" . $config['project_dir'] . \" && git init && git pull $re...
[ "0.6129277", "0.5973852", "0.5973852", "0.597261", "0.59263825", "0.5919797", "0.5918633", "0.5891231", "0.5827638", "0.5812186", "0.56793404", "0.5644102", "0.56429356", "0.5636921", "0.5635098", "0.56200767", "0.5596069", "0.5589346", "0.54708105", "0.54492444", "0.544648",...
0.0
-1
Create a Message object
public function updateRepo(Bundle $bundle) { $message = array('bundle_id' => $bundle->getId()); if ($this->bundleUpdateProducer) { // RabbitMQ, publish my message! $this->bundleUpdateProducer->publish(json_encode($message)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createMessage()\n {\n $message = new Message(new Swift_Message);\n\n\n // If a global from address has been specified we will set it on every message\n // instances so the developer does not have to repeat themselves every time\n // they create a new message. We wi...
[ "0.8263152", "0.80850446", "0.79337305", "0.7672611", "0.763888", "0.73682535", "0.7334351", "0.7306845", "0.7219514", "0.7120448", "0.7018389", "0.7007606", "0.69043875", "0.68629056", "0.6835611", "0.6792952", "0.6777523", "0.67773926", "0.6759404", "0.6746609", "0.6714611"...
0.0
-1
Transforms first column of query result to PHP array (with keys 0, 1, 2, ...)
static function result2Array(&$result) { $return_array = array(); if (@mysql_num_rows($result) != 0) { while ($row = mysql_fetch_assoc($result)) { $keys = array_keys($row); $return_array[] = $row[$keys[0]]; } mysql_free_result($result); } return $return_array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function db_result_to_array($result) {\n $res_array = array();\n \n for ($count=0; $row = $result->fetch_assoc(); $count++) {\n $res_array[$count] = $row;\n }\n \n return $res_array;\n }", "function db_result_to_array($result) {\r\n $res_array = arra...
[ "0.7349777", "0.72998106", "0.729965", "0.72984976", "0.714555", "0.7089626", "0.70484126", "0.7000926", "0.6980251", "0.6865612", "0.67850703", "0.6772592", "0.6770953", "0.6719784", "0.6691024", "0.6683834", "0.6668936", "0.66626936", "0.66280866", "0.6620318", "0.6583763",...
0.729231
4
Transforms MySQL result to 2D PHP array
static function result2Array2D(&$result) { $resultArray = array(); // beginnen met lege array if (@mysql_num_rows($result) != 0) { mysql_data_seek($result, 0); $mysqlResultRow = mysql_fetch_assoc($result); $keys = array_keys($mysqlResultRow); // eenmalig kolomnamen uitlezen mysql_data_seek($result, 0); // weer terug naar eerste resultaat, om hieronder in while ALLE resultaatrijen mee te nemen // rij voor rij alle waarden toevoegen aan $resultArray while ($mysqlResultRow = mysql_fetch_assoc($result)) { $row_arr = array(); for ($k = 0; $k < count($keys); $k++) { $row_arr[$keys[$k]] = $mysqlResultRow[$keys[$k]]; } array_push($resultArray, $row_arr); } //mysql_free_result($result); } return $resultArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function db_result_to_array($result) {\n $res_array = array();\n \n for ($count=0; $row = $result->fetch_assoc(); $count++) {\n $res_array[$count] = $row;\n }\n \n return $res_array;\n }", "function db_result_to_array($result) {\r\n $res_array = arra...
[ "0.76110697", "0.75810367", "0.7573899", "0.7525402", "0.7455517", "0.74301004", "0.7417074", "0.7378244", "0.7306235", "0.7207647", "0.719117", "0.71891814", "0.71394897", "0.71036476", "0.70699984", "0.7064557", "0.7017603", "0.69999224", "0.6992793", "0.6989289", "0.697373...
0.7592935
1
Transforms MySQL result to indexed 2D PHP array waarde van betreffende resultaatrij in kolom $colName wordt gebruikt als index van resultaat array
static function result2IndexedArray2D(&$result, $colName) { $resultArray = array(); // beginnen met lege array if (@mysql_num_rows($result) != 0) { $mysqlResultRow = mysql_fetch_assoc($result); $keys = array_keys($mysqlResultRow); // eenmalig kolomnamen uitlezen mysql_data_seek($result, 0); // weer terug naar eerste resultaat, om hieronder in while ALLE resultaatrijen mee te nemen // rij voor rij alle waarden toevoegen aan $resultArray while ($mysqlResultRow = mysql_fetch_assoc($result)) { $row_arr = array(); for ($k = 0; $k < count($keys); $k++) { $row_arr[$keys[$k]] = $mysqlResultRow[$keys[$k]]; } $resultArray[$row_arr[$colName]] = $row_arr; } //mysql_free_result($result); } return $resultArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resultSet2array($myrst) {\n $resultset = null;\n $row = 0;\n while ($myrow = mysql_fetch_array($myrst)) {\n $col = 0;\n foreach ($myrow as $column) {\n $resultset[$row][$col]=$myrow[$col++];\n }\n $row++;\n }\n return $resultset;\n}", "static functio...
[ "0.6702796", "0.6625242", "0.64290893", "0.63385665", "0.63283736", "0.6311988", "0.6290015", "0.6265841", "0.6242912", "0.6227342", "0.6206899", "0.6200778", "0.6192673", "0.61892676", "0.61691314", "0.61562866", "0.6126762", "0.6117339", "0.6112531", "0.61124295", "0.610999...
0.8162258
0
run the query (expects initiated dbconnection)
static function runMysqlQuery($sql) { return BaseQueries::performQuery($sql); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function execute_single_query(){\n\t\t$this -> open_connection();\n\t\t$this -> conn -> query($this -> query);\n\t\t$this -> close_connection();\n\t}", "private function executeQuery() {\n\t\t$recordset = $this->getConnection()->execute( $this );\n\t\t\n\t\tif( $recordset === false ) {\n\t\t\t$this->_...
[ "0.72317255", "0.70712966", "0.7024052", "0.6991761", "0.6991309", "0.69155735", "0.69066733", "0.6876861", "0.68557477", "0.68087125", "0.6721281", "0.67079777", "0.6687356", "0.66456914", "0.66456914", "0.66221046", "0.65970576", "0.6596652", "0.6571933", "0.65457284", "0.6...
0.0
-1
Action index Access to the action is possible in the following paths: /admin/blog/index /admin/blog
public function indexAction() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fullIndexAction() {}", "public function singleIndexAction() {}", "public function actionIndex() {}", "public function actionIndex() {}", "public function indexAction() {\n\t\t// TODO Auto-generated AdminController::indexAction() default action\n\t}", "abstract public function actionIndex(...
[ "0.7819512", "0.7778239", "0.7673298", "0.7673298", "0.7630946", "0.7581945", "0.7576016", "0.7482569", "0.74470323", "0.7444691", "0.744463", "0.744463", "0.744463", "0.744463", "0.744463", "0.744463", "0.744463", "0.744463", "0.744463", "0.7417557", "0.7409074", "0.731672...
0.72522384
24
Action posts Get a list of all user posts Access to the action is possible in the following paths: /admin/blog/posts
public function postsAction() { $params = $this->_request->getParams(); $this->view->ajax_post = isset($params['ajax_post']) ? TRUE : FALSE; //Добавим путь к действию $this->_breadcrumbs->addStep($this->Translate('Список сообщений в блогах')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listPostsAction() {\n $this->session->start();\n if ($this->session->get('user_id') != NULL) {\n $vars = $this->getUserLoggedInformation();\n $user = Users::findFirstByUser_id($this->session->get('user_id'));\n if ($user->user_type_id < 3) {\n ...
[ "0.82235134", "0.786157", "0.77137405", "0.76117605", "0.7587183", "0.7587183", "0.74776477", "0.7375221", "0.723881", "0.72291696", "0.7208755", "0.7201365", "0.71835613", "0.7156826", "0.7139057", "0.712851", "0.7108499", "0.7092893", "0.7066298", "0.7057565", "0.70547754",...
0.0
-1
Action rows get all data according to the request parameters Access to the action is possible in the following paths: /admin/blog/rows
public function rowsAction() { parent::rowsAction(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFilteredRows($rows) {\n $filterRows = array();\n $filterRow = array();\n //-------------------\n // Получим параметры запроса\n $request = $this->getRequest();\n $params = $request->getParams();\n $table = $params['table'];\n\n if ($table =...
[ "0.67892647", "0.63651437", "0.6339406", "0.62565047", "0.6231803", "0.6097168", "0.60956466", "0.59888613", "0.59446675", "0.5929927", "0.5929927", "0.59069574", "0.58724004", "0.58528715", "0.58291197", "0.58230424", "0.58177394", "0.58005977", "0.5784119", "0.5784118", "0....
0.648794
1
Action data get data on certain fields of the table. This data placed in the ComboBox, to edit these table fields Access to the action is possible in the following paths: /admin/blog/data
public function dataAction() { parent::dataAction(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function load_field(){\r\n $this->layout=\"ajax\";\r\n $module=$_POST['module'];\r\n $this->loadModel($module);\r\n $field_names= Set::extract('/COLUMNS/Field',$this->$module->query(\"DESCRIBE {$this->$module->useTable}\"));\r\n $field= array_combine($field_names, $field_...
[ "0.64453024", "0.6242384", "0.618687", "0.6115932", "0.609966", "0.60133094", "0.60054153", "0.60045445", "0.59711087", "0.59506744", "0.5932247", "0.5879626", "0.5877993", "0.58467317", "0.5846098", "0.58434904", "0.58358896", "0.5785823", "0.57565147", "0.5755466", "0.57418...
0.65139514
0
Action validate validate the appropriate value. Parameters values are passed in the query Access to the action is possible in the following paths: /admin/blog/validate
public function validateAction() { parent::validateAction(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validate_blog_form()\n {\n }", "public function validateMakeBlog(){\n\n }", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function va...
[ "0.6453827", "0.60346836", "0.58949053", "0.58949053", "0.58949053", "0.58949053", "0.58949053", "0.58949053", "0.58949053", "0.58949053", "0.58949053", "0.58949053", "0.58949053", "0.58949053", "0.57893074", "0.57779145", "0.57361805", "0.5680614", "0.5619464", "0.55940646", ...
0.59037596
2
Action save save the modified data or add new data Access to the action is possible in the following paths: /admin/blog/save
public function saveAction() { parent::saveAction(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function postSave() {}", "public function save() {\n $db = Db::instance();\n $db_properties = array(\n 'action' => $this->action,\n 'url_mod' => $this->url_mod,\n 'description' => $this->description,\n 'target_id' => $this->target_id,\n 'target_name' => $this->target_name,\n...
[ "0.7115507", "0.7094427", "0.70813453", "0.70813453", "0.70813453", "0.70813453", "0.70813453", "0.70813453", "0.70813453", "0.70813453", "0.70813453", "0.70813453", "0.70813453", "0.70813453", "0.70813453", "0.70813453", "0.70813453", "0.70813453", "0.70813453", "0.70813453", ...
0.70068663
22
Action delete delete data from the database Access to the action is possible in the following paths: /admin/blog/delete
public function deleteAction() { parent::deleteAction(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteAction()\n {\n $id = (int) $this->params()->fromRoute('id', 0);\n if (!$id) {\n return $this->redirect()->toRoute('blog');\n }\n\n $request = $this->getRequest();\n if ($request->isPost()) {\n $del = $request->getPost('del', ...
[ "0.79647154", "0.7955823", "0.78939915", "0.7767942", "0.7767942", "0.77510136", "0.76893973", "0.76484615", "0.75295067", "0.75174606", "0.744879", "0.74480104", "0.743859", "0.74230987", "0.7387145", "0.7378031", "0.73777443", "0.7374603", "0.7363383", "0.73403054", "0.7307...
0.7044645
38
Action search search the row in the table and return the number of row Access to the action is possible in the following paths: /admin/blog/search
public function searchAction() { parent::searchAction(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function search_result_count($get_search){\n$get_search = htmlspecialchars($get_search);\nglobal $prefix_content;\n\t$newquery=\" and ($prefix_content.post_status='publish' and $prefix_content.title LIKE '%\".mysqli_escape($get_search).\"%' or $prefix_content.content LIKE '%\".mysqli_escape($get_search).\"%')\";\n...
[ "0.6726707", "0.6525201", "0.63989586", "0.6297661", "0.62954736", "0.62824494", "0.6255008", "0.6212479", "0.6207256", "0.61830723", "0.61449784", "0.6137208", "0.6074548", "0.60454625", "0.60261595", "0.60249025", "0.5994329", "0.596605", "0.59654284", "0.59421694", "0.5942...
0.600728
16
=============== REPORT =================// Action report create report Access to the action is possible in the following paths: /admin/blog/report
public function reportAction() { parent::reportAction(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n\t{\n\t\t//\n\t\treturn View::make('dashboard.b.reports.create');\n\t}", "public function reportsAction()\n {\n $flashMessenger = $this->_helper->FlashMessenger;\n\n include_once(dirname(dirname(__FILE__)).\"/forms/CreateReport.php\");\n try{\n $form = new HistoryLog_Form...
[ "0.6467288", "0.641362", "0.6370828", "0.6370657", "0.6277838", "0.62200916", "0.6209229", "0.6180525", "0.60439444", "0.60050166", "0.5978354", "0.59729266", "0.5954844", "0.5946367", "0.5914815", "0.59090835", "0.59010774", "0.5891789", "0.5878827", "0.58530945", "0.5848282...
0.61931825
7
=============== Working with Tables =================// Get the number of rows in the table
public function getCountRowsTable($options = NULL) { $request = $this->getRequest(); $params = $request->getParams(); $table = $params['table']; //--------------------------- if ($table == 'admin.blog_posts') { return Default_Model_DbTable_BlogPost::GetPostsCount($this->db, $options); } if ($table == 'admin.blog_posts_tags') { $post_ids = Default_Model_DbTable_BlogPost::GetPostsIds_Array($this->db, $options); return Default_Model_DbTable_BlogPostTag::GetPostsTags_Count($this->db, array('post_id' => $post_ids)); } if ($table == 'admin.blog_posts_images') { $post_ids = Default_Model_DbTable_BlogPost::GetPostsIds_Array($this->db, $options); return Default_Model_DbTable_BlogPostImage::GetPostsImages_Count($this->db, array('post_id' => $post_ids)); } if ($table == 'admin.blog_posts_audio') { $post_ids = Default_Model_DbTable_BlogPost::GetPostsIds_Array($this->db, $options); return Default_Model_DbTable_BlogPostAudio::GetPostsAudio_Count($this->db, array('post_id' => $post_ids)); } if ($table == 'admin.blog_posts_video') { $post_ids = Default_Model_DbTable_BlogPost::GetPostsIds_Array($this->db, $options); return Default_Model_DbTable_BlogPostVideo::GetPostsVideo_Count($this->db, array('post_id' => $post_ids)); } if ($table == 'admin.blog_posts_locations') { $post_ids = Default_Model_DbTable_BlogPost::GetPostsIds_Array($this->db, $options); return Default_Model_DbTable_BlogPostLocation::GetPostsLocations_Count($this->db, array('post_id' => $post_ids)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNumberOfRows();", "public function getNumRows();", "public function getTableRowsCount()\n {\n return $this->tableRowsCount;\n }", "function RowCount() {}", "public function numOfRows();", "public abstract function row_count();", "public function getNumberOfRows()\r\n ...
[ "0.81914073", "0.81560457", "0.8128445", "0.81144124", "0.8032105", "0.7970469", "0.7867709", "0.78305453", "0.78305453", "0.78171575", "0.7781033", "0.7769886", "0.7750394", "0.7736338", "0.77266306", "0.76864004", "0.76817936", "0.76749086", "0.7669943", "0.7641071", "0.763...
0.0
-1
Create a table record object
public function createRowTable($options = NULL) { $request = $this->getRequest(); $params = $request->getParams(); $table = $params['table']; //--------------------------- if ($table == 'admin.blog_posts') { return new Default_Model_DbTable_BlogPost($this->db); } if ($table == 'admin.blog_posts_tags') { return new Default_Model_DbTable_BlogPostTag($this->db); } if ($table == 'admin.blog_posts_images') { return new Default_Model_DbTable_BlogPostImage($this->db); } if ($table == 'admin.blog_posts_audio') { return new Default_Model_DbTable_BlogPostAudio($this->db); } if ($table == 'admin.blog_posts_video') { return new Default_Model_DbTable_BlogPostVideo($this->db); } if ($table == 'admin.blog_posts_locations') { return new Default_Model_DbTable_BlogPostLocation($this->db); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createRecord();", "private static function object_from_table_row($record) {\n\t // Could check that $record exists and is an array\n\t // Simple, long-form approach:\n\t $class_name = get_called_class();\n\t\t$object = new $class_name;\n\t\t\n\t\tforeach($record as $attribute=>$value){\n ...
[ "0.7799738", "0.69427574", "0.6865926", "0.6822653", "0.672537", "0.66169614", "0.65882516", "0.6585383", "0.6583678", "0.6571775", "0.64920217", "0.6465001", "0.6451912", "0.6439331", "0.6430276", "0.635564", "0.63192564", "0.62920046", "0.62826157", "0.6231155", "0.6229715"...
0.5892662
40
Get a table records
public function getRowsArraysTable($options = NULL) { $newRows = array(); $sortRows = array(); $newRow = array(); //------------------- // Получим параметры запроса $request = $this->getRequest(); $params = $request->getParams(); $table = $params['table']; $fromPage = $options['fromPage']; $toPage = $options['toPage']; if ($options['sortColumn']) { $sortColumn = $options['sortColumn']; } else { $sortColumn = 'id'; } $ascDescFlg = $options['ascDescFlg']; $count = 1; if ($table == 'admin.blog_posts') { // Получим все строки сообщений с учетом параметров $rows = Default_Model_DbTable_BlogPost::GetPosts_Array($this->db, $options); foreach ($rows as $row) { foreach ($row as $key => $value) { if (is_array($value)) { } else { $newRow[$key] = $value; } } $newRows[] = $newRow; $newRow = array(); } return $newRows; } if ($table == 'admin.blog_posts_tags') { // Получим все строки сообщений с учетом параметров $options['offset'] = NULL; $options['limit'] = NULL; $options['sort'] = FALSE; $rows = Default_Model_DbTable_BlogPost::GetPosts_Array($this->db, $options); foreach ($rows as $row) { foreach ($row as $key => $value) { if (is_array($value)) { if ($key == '_tags_') { $arrValues = $value; $arrPost = $newRow; foreach ($arrValues as $arrValue) { $newRow = $arrValue + $arrPost + array( 'sortColumn' => $sortColumn, 'ascDescFlg' => $ascDescFlg ); $newRows[] = $newRow; } } } else { if (($sortColumn !== 'id' && $key == $sortColumn) || $key == 'title') { $newRow[$key] = $value; } } } } usort($newRows, array("Default_Model_DatabaseObject", "_SortProfiles_Arrays")); foreach ($newRows as $newRow) { if ($count >= $fromPage && $count <= $toPage) { $sortRows[] = $newRow; } $count++; } return $sortRows; } if ($table == 'admin.blog_posts_images') { // Получим все строки сообщений с учетом параметров $options['offset'] = NULL; $options['limit'] = NULL; $options['sort'] = FALSE; $rows = Default_Model_DbTable_BlogPost::GetPosts_Array($this->db, $options); foreach ($rows as $row) { foreach ($row as $key => $value) { if (is_array($value)) { if ($key == '_images_') { $arrValues = $value; $arrPost = $newRow; foreach ($arrValues as $arrValue) { $newRow = $arrValue + $arrPost + array( 'sortColumn' => $sortColumn, 'ascDescFlg' => $ascDescFlg ); $newRows[] = $newRow; } } } else { if (($sortColumn !== 'id' && $key == $sortColumn) || $key == 'title') { $newRow[$key] = $value; } } } } usort($newRows, array("Default_Model_DatabaseObject", "_SortProfiles_Arrays")); foreach ($newRows as $newRow) { if ($count >= $fromPage && $count <= $toPage) { $sortRows[] = $newRow; } $count++; } return $sortRows; } if ($table == 'admin.blog_posts_audio') { // Получим все строки сообщений с учетом параметров $options['offset'] = NULL; $options['limit'] = NULL; $options['sort'] = FALSE; $rows = Default_Model_DbTable_BlogPost::GetPosts_Array($this->db, $options); foreach ($rows as $row) { foreach ($row as $key => $value) { if (is_array($value)) { if ($key == '_audio_') { $arrValues = $value; $arrPost = $newRow; foreach ($arrValues as $arrValue) { $newRow = $arrValue + $arrPost + array( 'sortColumn' => $sortColumn, 'ascDescFlg' => $ascDescFlg ); $newRows[] = $newRow; } } } else { if (($sortColumn !== 'id' && $key == $sortColumn) || $key == 'title') { $newRow[$key] = $value; } } } } usort($newRows, array("Default_Model_DatabaseObject", "_SortProfiles_Arrays")); foreach ($newRows as $newRow) { if ($count >= $fromPage && $count <= $toPage) { $sortRows[] = $newRow; } $count++; } return $sortRows; } if ($table == 'admin.blog_posts_video') { // Получим все строки сообщений с учетом параметров $options['offset'] = NULL; $options['limit'] = NULL; $options['sort'] = FALSE; $rows = Default_Model_DbTable_BlogPost::GetPosts_Array($this->db, $options); foreach ($rows as $row) { foreach ($row as $key => $value) { if (is_array($value)) { if ($key == '_video_') { $arrValues = $value; $arrPost = $newRow; foreach ($arrValues as $arrValue) { $newRow = $arrValue + $arrPost + array( 'sortColumn' => $sortColumn, 'ascDescFlg' => $ascDescFlg ); $newRows[] = $newRow; } } } else { if (($sortColumn !== 'id' && $key == $sortColumn) || $key == 'title') { $newRow[$key] = $value; } } } } usort($newRows, array("Default_Model_DatabaseObject", "_SortProfiles_Arrays")); foreach ($newRows as $newRow) { if ($count >= $fromPage && $count <= $toPage) { $sortRows[] = $newRow; } $count++; } return $sortRows; } if ($table == 'admin.blog_posts_locations') { // Получим все строки сообщений с учетом параметров $options['offset'] = NULL; $options['limit'] = NULL; $options['sort'] = FALSE; $rows = Default_Model_DbTable_BlogPost::GetPosts_Array($this->db, $options); foreach ($rows as $row) { foreach ($row as $key => $value) { if (is_array($value)) { if ($key == '_locations_') { $arrValues = $value; $arrPost = $newRow; foreach ($arrValues as $arrValue) { $newRow = $arrValue + $arrPost + array( 'sortColumn' => $sortColumn, 'ascDescFlg' => $ascDescFlg ); $newRows[] = $newRow; } } } else { if (($sortColumn !== 'id' && $key == $sortColumn) || $key == 'title') { $newRow[$key] = $value; } } } } usort($newRows, array("Default_Model_DatabaseObject", "_SortProfiles_Arrays")); foreach ($newRows as $newRow) { if ($count >= $fromPage && $count <= $toPage) { $sortRows[] = $newRow; } $count++; } return $sortRows; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllRecords();", "public function getRecords($table, $where=false){// method getRecords body start\n\t\t\n\t\tif($where){\n\t\t\t$where = $this->makeWhere($where);\n\t\t}\n\t\t$query = \"SELECT * FROM $table \".$where;\n\t\treturn $this->exeQuery($query);\n\t\t\n\t}", "function getData($tabl...
[ "0.76982784", "0.754573", "0.7206273", "0.7156476", "0.71145016", "0.7085658", "0.7037923", "0.70350975", "0.7029576", "0.7011103", "0.7011103", "0.69669336", "0.6895782", "0.6886045", "0.6882344", "0.6856441", "0.6819337", "0.6802144", "0.6714102", "0.6708727", "0.6684441", ...
0.0
-1
Get the values of a field in a table
public function getValuesForCol($options = NULL) { // Обращение идет к таблице "users" if ($options['joinTableForSort'] == 'admin.users') { $options['joinTableForSort'] = ''; $rows = Default_Model_DbTable_User::GetValuesForCol($this->db, $options); return $rows; } // Обращение идет к таблице "users_profile" if ($options['joinTableForSort'] == 'admin.users_profile') { $options['joinTableForSort'] = 'users_profile'; $rows = Default_Model_DbTable_User::GetValuesForCol($this->db, $options); return $rows; } // Обращение идет к таблице "blog_post" или присоединенным таблицам: // blog_post_profile; blog_post_tags; blog_post_images; blog_post_locations $rows = Default_Model_DbTable_BlogPost::GetValuesForCol($this->db, $options); return $rows; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getValueFromField()\r\n\t{\r\n\t\treturn $this->row[ key( $this->mapping ) ];\r\n\t}", "public function getFields($table);", "function getValueFromField()\n {\n return $this->current_row[ key( $this->mapping ) ];\n }", "public function fetchField();", "public function get_field_struct...
[ "0.72546417", "0.71838105", "0.7182165", "0.71717983", "0.69473153", "0.6944949", "0.6906652", "0.6866785", "0.68116117", "0.67833066", "0.6768291", "0.6738672", "0.67305446", "0.6688033", "0.6676277", "0.6671597", "0.6669802", "0.6652373", "0.6651995", "0.66340274", "0.65880...
0.0
-1
Create a form to validation the values
public function createFormForValidation($options = NULL) { return new Admin_Form_Blogs(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createForm();", "public function createForm();", "abstract public function createForm();", "abstract public function createForm();", "public function valiteForm();", "public function form()\n {\n\n $this->hidden('key', '字段名')->rules('required');\n $this->editor('val', '平台...
[ "0.7360534", "0.7360534", "0.7128525", "0.7128525", "0.7059673", "0.70533156", "0.6911732", "0.6846659", "0.66728", "0.6578245", "0.65587085", "0.6554194", "0.6552962", "0.6527648", "0.65254146", "0.6489886", "0.6439921", "0.6431028", "0.6413214", "0.64054006", "0.64006907", ...
0.0
-1
Get the formatted value
public function getFormattedValue($key, $value) { if ($key == 'ts_created') { if ($value) { $value = $this->dtFormat($value, 'U', 'yyyy-MM-dd'); } else { $value = time(); } } if ($key == 'actual') { if (!$value) { $value = 0; } } return $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFormattedValue()\r\n\t{\r\n\t\treturn $this->value;\r\n\t}", "public function getFormattedValue()\n {\n return $this->dbObject('Value');\n }", "public function format()\n {\n $separator = $this->object->config('separator');\n $decimals = $this->object->config('...
[ "0.83123934", "0.8035234", "0.76245993", "0.7609305", "0.7483259", "0.7384057", "0.73573667", "0.719351", "0.71194214", "0.7107636", "0.70575047", "0.7052939", "0.70378065", "0.6943173", "0.6914553", "0.6891656", "0.6891656", "0.6891656", "0.6775048", "0.6761286", "0.6723418"...
0.65909207
29
Get formatted row values
public function getFormattedRows($rows) { $formatRows = array(); $formatRow = array(); foreach ($rows as $row) { foreach ($row as $key => $value) { if ($key == 'ts_created') { if ($value) { if (is_int($value)) { $value = $this->dtFormat($value, 'yyyy-MM-dd', 'U'); } } else { $value = $this->dtFormat(time(), 'yyyy-MM-dd', 'U'); } } if ($key == 'ts_published') { if ($value) { if (is_int($value)) { $value = $this->dtFormat($value, 'yyyy-MM-dd HH:mm:ss', 'U'); } } else { $value = $this->dtFormat(time(), 'yyyy-MM-dd HH:mm:ss', 'U'); } } $formatRow[$key] = $value; } $formatRows[] = $formatRow; $formatRow = array(); } return $formatRows; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formatRow(){\n $this->hook('formatRow');\n }", "public function getFormattedData();", "public function getValuesForOutput() {\n $formattedValues = $this->getFormattedValues();\n $rawValues = $this->getRawValues();\n\n $valuesForOutput = $rawValues;\n\n foreach ($f...
[ "0.70155305", "0.69406927", "0.6521682", "0.6479101", "0.6448609", "0.6415753", "0.6384841", "0.6347829", "0.6245053", "0.62427217", "0.6240617", "0.61983836", "0.6127799", "0.6094565", "0.6050382", "0.602072", "0.59226245", "0.5862174", "0.58225733", "0.58225733", "0.5727662...
0.6170964
12
Get the filtered values
public function getFilteredRows($rows) { $filterRows = array(); $filterRow = array(); //------------------- // Получим параметры запроса $request = $this->getRequest(); $params = $request->getParams(); $table = $params['table']; if ($table == 'admin.blog_posts') { foreach ($rows as $row) { // Отфильтруем ненужные поля в записи (масиве) foreach ($row as $key => $value) { // Исключим поля switch ($key) { case "content": break; default : $filterRow[$key] = $value; break; } } if (count($filterRow) > 0) { $filterRows[] = $filterRow; } $filterRow = array(); } } if ($table == 'admin.blog_posts_tags') { foreach ($rows as $row) { // Отфильтруем ненужные поля в записи (масиве) foreach ($row as $key => $value) { // Исключим поля switch ($key) { case "sortColumn": case "ascDescFlg": break; default : $filterRow[$key] = $value; break; } } if (count($filterRow) > 0) { $filterRows[] = $filterRow; } $filterRow = array(); } } if ($table == 'admin.blog_posts_images') { foreach ($rows as $row) { // Отфильтруем ненужные поля в записи (масиве) foreach ($row as $key => $value) { // Исключим поля switch ($key) { case "sortColumn": case "ascDescFlg": break; default : $filterRow[$key] = $value; break; } } if (count($filterRow) > 0) { $filterRows[] = $filterRow; } $filterRow = array(); } } if ($table == 'admin.blog_posts_audio') { foreach ($rows as $row) { // Отфильтруем ненужные поля в записи (масиве) foreach ($row as $key => $value) { // Исключим поля switch ($key) { case "sortColumn": case "ascDescFlg": break; default : $filterRow[$key] = $value; break; } } if (count($filterRow) > 0) { $filterRows[] = $filterRow; } $filterRow = array(); } } if ($table == 'admin.blog_posts_video') { foreach ($rows as $row) { // Отфильтруем ненужные поля в записи (масиве) foreach ($row as $key => $value) { // Исключим поля switch ($key) { case "sortColumn": case "ascDescFlg": break; default : $filterRow[$key] = $value; break; } } if (count($filterRow) > 0) { $filterRows[] = $filterRow; } $filterRow = array(); } } if ($table == 'admin.blog_posts_locations') { foreach ($rows as $row) { // Отфильтруем ненужные поля в записи (масиве) foreach ($row as $key => $value) { // Исключим поля switch ($key) { case "content": case "correction": case "details": case "sortColumn": case "ascDescFlg": break; default : $filterRow[$key] = $value; break; } } if (count($filterRow) > 0) { $filterRows[] = $filterRow; } $filterRow = array(); } } return $filterRows; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFilterValues()\n {\n return $this->filter_values;\n }", "public function getValues($clean = true) {\n if ($clean) {\n return array_diff_key($this->data, $this->filter);\n } else {\n return $this->data;\n }\n }", "public function filt...
[ "0.81921625", "0.7246898", "0.71400106", "0.70694065", "0.7029267", "0.7017463", "0.6964265", "0.68759525", "0.67988944", "0.6796289", "0.67618036", "0.67512417", "0.6748305", "0.6697213", "0.66776544", "0.6651267", "0.6651267", "0.66359484", "0.6593406", "0.6587459", "0.6552...
0.0
-1
Valid the values of the row when save
public function validRowForSave($row) { $params = $this->_request->getParams(); $table = $params['table']; //----------------------- // Проверим строку на валидность $jsons = $this->_isValidRow($row); if (isset($jsons['class_message'])) { // Ошибка валидации return $jsons; } // Проверка валидации особых случаев if ($table == 'admin.blog_posts_tags') { $params = array(); $params['table'] = 'blog_posts_tags'; $params['fieldKey1'] = 'post_id'; $params['fieldKey2'] = 'tag'; $params['adapter'] = $this->db; $params['id'] = $row['id']; $validator = new Default_Form_Validate_DbMultipleKey($params); $value = $row['post_id'] . ';' . $row['tag']; if (!$validator->isValid($value)) { $messages = $validator->getMessages(); $newMess = array(); $newMess[] = '<em>' . Zend_Registry::get('Zend_Translate')->_('Ошибка формы! Неверно введены данные в форму.') . '</em>'; $messages = array_values($messages); $newMess[] = $messages[0]; $jsons = array( 'class_message' => 'warning', 'messages' => $newMess ); } } return $jsons; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _processValidForm()\n {\n $table = $this->_getTable();\n\n $formValues = $this->_getForm()->getValues();\n\n if (!empty($formValues[$this->_getPrimaryIdKey()])) {\n $row = $this->_getRow($this->_getPrimaryId());\n } else {\n $row = $table->cre...
[ "0.66925913", "0.66674876", "0.6642058", "0.6595251", "0.6526923", "0.6463464", "0.6407072", "0.6321227", "0.62717885", "0.6266767", "0.6248346", "0.62174565", "0.6156634", "0.6124942", "0.61172116", "0.6092139", "0.60753393", "0.60645187", "0.605301", "0.60499895", "0.604056...
0.65783334
4
dinValidatorNumberRange::configure() Clean input value
protected function doClean( $value ) { $minField = $this->getOption( 'min_field' ); $maxField = $this->getOption( 'max_field' ); $value[$minField] = $this->getOption( 'min')->clean( isset( $value[$minField] ) ? $value[$minField] : null ); $value[$maxField] = $this->getOption( 'max')->clean( isset( $value[$maxField] ) ? $value[$maxField] : null ); if ( $value[$minField] && $value[$maxField] ) { $v = new sfValidatorSchemaCompare( $minField, sfValidatorSchemaCompare::LESS_THAN_EQUAL, $maxField, array( 'throw_global_error' => true ), array( 'invalid' => $this->getMessage( 'invalid' ) ) ); $v->clean( $value ); } return $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function sanitizeRange( $range ) {\n list( /*...*/, $bits ) = self::parseCIDR( $range );\n list( $start, /*...*/ ) = self::parseRange( $range );\n $start = self::formatHex( $start );\n if ( $bits === false ) {\n return $start; // wasn't actually a range\n ...
[ "0.5773597", "0.55941844", "0.55088323", "0.54564637", "0.54523873", "0.54519165", "0.5392221", "0.53614455", "0.5358085", "0.5339111", "0.52929157", "0.526351", "0.5247512", "0.52205044", "0.5209895", "0.51884323", "0.51872766", "0.51597834", "0.5156324", "0.5140664", "0.511...
0.5818396
0
Display a listing of the resource.
public function adminOrderIndex() { $orders = Order::with(['products', 'user'])->whereNotNull('paid_datetime')->latest()->get()->all(); return view('admin.orders.index', compact('orders')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Display the specified resource.
public function show(Order $order) { return view('user.orders.show', compact('order')); }
{ "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(Order $order) { // }
{ "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 updateQuantity(Request $request, Order $order, Product $product) { $validatedData = $request->validate([ 'quantity' => 'required|min:1|integer', 'product_id' => 'required|min:1|integer', ]); $order->products()->find($product->id)->pivot->update(['quantity' => intval($validatedData['quantity'])]); return redirect(route('cart.index')); }
{ "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(Order $order) { $order->delete(); return redirect()->back()->with(['success' => 'سفارش ' . $order->pay_code . ' با موفقیت حذف شد!']); }
{ "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
Skupljamo vrednosti iz url ono sto ukucamo
public function parseUrl(){ $url =isset( $_GET ['url']) ? $_GET['url']: null; $url =explode('/',$url); //print_r($url); //Ako ne ukucamo nista tada pozovi automatski Index controller i metodu index if(empty($url[0])){ require 'controllers/index.php'; $controller = new Index(); $controller ->index(); //da bi se kod prekinuo return false; } //Controller moramo fizički da pozovemo $file = 'controllers/'.$url[0].'.php'; //Da li ovaj fajl postoji, ako postoji uključi ga fizički if(file_exists($file)) { require $file; } else { // echo 'Ovaj fajl ne postoji'; $this->error(); return false; } $controller = new $url[0](); //Proveravamo da li postoji metoda i parametar //Ako je postavljen parametar proveri da li ima metode i postavi metodu sa parametrom if(isset($url[2])){ if(method_exists($controller,$url[1])){ $controller -> {$url[1]}($url[2]); }else { //echo 'Ova stranica ne postoji'; $this->error(); } } else{ //Ako nije postavljen parametar proveravamo da li je postavljena metoda if(isset($url[1])){ //Proveravamo da li metoda postoji u okviru naseg controllera if(method_exists($controller,$url[1])){ $controller->{$url[1]}(); }else { // echo 'Ova stranica ne postoji'; $this->error(); } }else { //Ukoliko ne postoji ni metoda pozivati defaul metodu a to je index $controller->index(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function url();", "public function url();", "public function url();", "abstract public function getUrl();", "public function get_url();", "public function getURL ();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "pub...
[ "0.72046965", "0.72046965", "0.72046965", "0.69323164", "0.6907604", "0.6830484", "0.67822206", "0.67822206", "0.67822206", "0.67822206", "0.67822206", "0.67822206", "0.67822206", "0.67822206", "0.6776884", "0.6776884", "0.67462593", "0.67397875", "0.67217314", "0.66465443", ...
0.0
-1
Creates data provider instance with search query applied
public function search($params) { $query = CitasMedicas::find(); $query->joinWith(['medicos', 'pacientes', 'tipoServicio']); $dataProvider = new ActiveDataProvider([ 'query' => $query, ]); $dataProvider->sort->attributes['medico'] = [ 'asc'=>['medicos.nombre'=>SORT_ASC], 'desc'=>['medicos.nombre'=>SORT_DESC], ]; $dataProvider->sort->attributes['id_pac'] = [ 'asc'=>['pacientes.identificacion'=>SORT_ASC], 'desc'=>['pacientes.identificacion'=>SORT_DESC], ]; $dataProvider->sort->attributes['nombre1'] = [ 'asc'=>['pacientes.nombre1'=>SORT_ASC], 'desc'=>['pacientes.nombre1'=>SORT_DESC], ]; $dataProvider->sort->attributes['nombre2'] = [ 'asc'=>['pacientes.nombre2'=>SORT_ASC], 'desc'=>['pacientes.nombre2'=>SORT_DESC], ]; $dataProvider->sort->attributes['apellido1'] = [ 'asc'=>['pacientes.apellido1'=>SORT_ASC], 'desc'=>['pacientes.apellido1'=>SORT_DESC], ]; $dataProvider->sort->attributes['apellido2'] = [ 'asc'=>['pacientes.apellido2'=>SORT_ASC], 'desc'=>['pacientes.apellido2'=>SORT_DESC], ]; $dataProvider->sort->attributes['motivo'] = [ 'asc'=>['tipos_servicio.nombre'=>SORT_ASC], 'desc'=>['tipos_servicio.nombre'=>SORT_DESC], ]; $this->load($params); if (!$this->validate()) { // uncomment the following line if you do not want to return any records when validation fails // $query->where('0=1'); return $dataProvider; } $query->andFilterWhere([ 'id_citas' => $this->id_citas, 'pacientes_id' => $this->pacientes_id, 'medicos_id' => $this->medicos_id, 'fecha' => $this->fecha, 'tipo_servicio'=>$this->tipo_servicio, // 'hora' => $this->hora, 'hora_llegada' => $this->hora_llegada, ]); $query->andFilterWhere(['like', 'observaciones', $this->observaciones]) ->andFilterWhere(['like', 'medicos.nombre', $this->medico]) ->andFilterWhere(['like', 'pacientes.identificacion', $this->id_pac]) ->andFilterWhere(['like', 'hora', $this->hora]) ->andFilterWhere(['like', 'tipos_servicio.nombre', $this->motivo]) ->andFilterWhere(['like', 'pacientes.nombre1', $this->nombre1]) ->andFilterWhere(['like', 'pacientes.nombre2', $this->nombre2]) ->andFilterWhere(['like', 'pacientes.apellido1', $this->apellido1]) ->andFilterWhere(['like', 'pacientes.apellido2', $this->apellido2]) ->andFilterWhere(['like', 'estado', $this->estado]); $query->limit(20); return $dataProvider; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function searchQueryDataProvider() {}", "public function search()\n {\n $q = $this->getQuery();\n $dataProvider = new ActiveDataProvider([\n 'query' => $q,\n ]);\n\n return $dataProvider;\n }", "public function getQueryDataProvider() {}", "public function s...
[ "0.7773856", "0.674291", "0.65721744", "0.6503215", "0.6472826", "0.6389071", "0.63745373", "0.6287255", "0.62671757", "0.62457365", "0.62425256", "0.62123144", "0.61969537", "0.6172912", "0.61250603", "0.6123412", "0.6116283", "0.61031115", "0.6101092", "0.608637", "0.608177...
0.0
-1
Create a new controller instance.
public function __construct() { // $this->middleware('auth'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this-...
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.687...
0.0
-1
Show the application dashboard.
public function index(Request $request) { $data['gigs'] = Gigs::limit(3)->where('status',0)->where('deadline','>=',date('Y-m-d'))->orderBy('created_at','DESC')->get(); $data['services'] = Service::limit(4)->orderBy('created_at','DESC')->get(); $lang = ($request['is_api'])?$request->lang:app()->getLocale(); $categories = Category::where([['parent_id', 0],['featured',1]])->orderBy('name')->limit(6)->get(); $data['categories'] = $categories; // $data['current'] = ; $data['howitwork'] = config('staticpages_'.$lang.'.howitwork'); if ($request['is_api']) { } else { if(Auth::check()){ if (!$request->session()->has('member_type')) { $request->session()->put('member_type',Auth::user()->member_type); } } return view('home',$data); // return HTML response } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dashboard()\n {\n\n $pageData = (new DashboardService())->handleDashboardLandingPage();\n\n return view('application', $pageData);\n }", "function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}", "public function showDashboard() { \n\t\n ...
[ "0.77850926", "0.7760142", "0.7561336", "0.75147176", "0.74653697", "0.7464913", "0.73652893", "0.7351646", "0.7346477", "0.73420244", "0.7326711", "0.7316215", "0.73072463", "0.7287626", "0.72826403", "0.727347", "0.727347", "0.727347", "0.727347", "0.7251768", "0.7251768", ...
0.0
-1
Display the specified resource.
public function show($id) { $other_material = OtherMaterial::findOrFail($id); return new OtherMaterialResource($other_material); }
{ "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
Get the registered name of the component.
protected static function getFacadeAccessor() { return 'filesystemPublicUrl'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getComponentName()\n {\n return $this->_componentName;\n }", "public function getComponentName()\n {\n $component = $this->argument('component') ?: app('components')->getUsedNow();\n\n $component = app('components')->findOrFail($component);\n\n return $compone...
[ "0.8145252", "0.81059104", "0.79843503", "0.7875069", "0.7621859", "0.71461004", "0.7101458", "0.705496", "0.705496", "0.705496", "0.705496", "0.705496", "0.705496", "0.705496", "0.70394325", "0.70209575", "0.69877225", "0.69877225", "0.69877225", "0.6984164", "0.6965933", ...
0.0
-1
Display a listing of the resource.
public function index() { $students = Student::all(); return view('student.index', compact('students')); }
{ "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() { $countires = Country::pluck('name', 'id')->toArray(); return view('student.create', compact('countires')); }
{ "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) { $this->validate($request, [ 'name' => 'required', 'roll' => 'required' ]); Student::create($request->all()); return redirect()->route('student.index') ->with('success','Student created successfully'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Display the specified resource.
public function show($id) { $student = Student::find($id) ->with('country') ->with('district') ->with('thana') ->with('courses') ->first(); return view('student.show', compact('student')); }
{ "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) { $student = Student::find($id); return view('student.edit',compact('student')); }
{ "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) { $this->validate($request, [ 'name' => 'required', 'roll' => 'required' ]); Student::find($id)->update($request->all()); return redirect()->route('student.index') ->with('success','Student updated successfully'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890...
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { Student::find($id)->delete(); return redirect()->route('student.index') ->with('success','Student deleted successfully'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
Calculates the greatcircle distance between two points, with the Haversine formula.
function haversine($latitudeFrom, $longitudeFrom, $latitudeTo, $longitudeTo, $earthRadius = 3963){ // convert from degrees to radians $latFrom = deg2rad($latitudeFrom); $lonFrom = deg2rad($longitudeFrom); $latTo = deg2rad($latitudeTo); $lonTo = deg2rad($longitudeTo); $latDelta = $latTo - $latFrom; $lonDelta = $lonTo - $lonFrom; $angle = 2 * asin(sqrt(pow(sin($latDelta / 2), 2) + cos($latFrom) * cos($latTo) * pow(sin($lonDelta / 2), 2))); return $angle * $earthRadius; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function haversineGreatCircleDistance(\n $latitudeFrom, $longitudeFrom, $latitudeTo, $longitudeTo, $earthRadius = 6371000)\n{\n $latFrom = deg2rad($latitudeFrom);\n $lonFrom = deg2rad($longitudeFrom);\n $latTo = deg2rad($latitudeTo);\n $lonTo = deg2rad($longitudeTo);\n\n $latDelta = $latTo - $latFrom;\n $lo...
[ "0.72125775", "0.71618986", "0.7093784", "0.7034759", "0.7011908", "0.6999548", "0.6992199", "0.69722396", "0.68901825", "0.6825098", "0.6820741", "0.6808978", "0.6808856", "0.67704844", "0.6748302", "0.67439526", "0.67240345", "0.6709782", "0.6649138", "0.66481364", "0.66094...
0.6033144
46
getGeoJson Description: Creates a GeoJson from an array of points
function buildGeoJson($airports){ $json = []; // empty json array $json['type']='FeatureCollection'; // add top level key to be a 'FeatureCollection' $json['feautures'] = []; // now push on an array with the key 'feautures' // loop through result set and build a php associative array to be encoded as a json (geojson) object foreach($airports as $airport){ // push a new "object" (feature) onto our features array $json['feautures'][] = ['type'=>'Feature', 'geometry'=>[ 'type'=>'Point', 'coordinates'=>[$airport['Longitude']*1.0,$airport['Latitude']*1.0]], "properties"=> [ "title" =>"{$airport['Name']}", "description"=>"{$airport['TZ']}", "marker-size"=>"medium", "marker-symbol"=>"airport", "marker-color"=>"#f00", "stroke"=>"#555555", "stroke-opacity" =>1, "stroke-width"=>2, "fill" => "#555555", "fill-opacity" => 0.5 ] ]; } for($i=1;$i<sizeof($airports);$i++){ $json['features'][] = ['type'=>'Feature', 'geometry'=>[ 'type'=>"LineString", 'coordinates'=>[ [$airports[$i-1]['Longitude']*1.0,$airports[$i-1]['Latitude']*1.0], [$airports[$i]['Longitude']*1.0,$airports[$i]['Latitude']*1.0] ] ], "properties"=> [ "title" =>"Flight Path", "description"=>"Leg {$i}", "stroke"=>"#555555", "stroke-opacity" =>1, "stroke-width"=>2, "fill" => "#555555", "fill-opacity" => 0.5 ] ]; } // dump to output (json pretty adds newlines and indentation) file_put_contents("round_the_world.geojson",json_encode($json,JSON_PRETTY_PRINT)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGeoJson()\n {\n return $this->geoJson;\n }", "public function jsonSerialize(): mixed\n {\n $position = [$this->getLng(), $this->getLat()];\n if ($this->is3d()) $position[] = $this->getAlt();\n return new \\GeoJson\\Geometry\\Point($position);\n }", "#[...
[ "0.7057445", "0.6830986", "0.6685095", "0.63941664", "0.6332935", "0.63086164", "0.62386596", "0.6221871", "0.6051053", "0.6034332", "0.5992011", "0.5938496", "0.5934587", "0.5894506", "0.5868764", "0.57872504", "0.5758966", "0.5728446", "0.57201415", "0.56566375", "0.5639347...
0.636582
4
WP Framework core functions
function wpf_initial_constants() { // Sets the File path to the current parent theme's directory. define( 'PARENT_THEME_DIR', TEMPLATEPATH ); // Sets the URI path to the current parent theme's directory. define( 'PARENT_THEME_URI', get_template_directory_uri() ); // Sets the File path to the current parent theme's directory. define( 'CHILD_THEME_DIR', STYLESHEETPATH ); // Sets the URI path to the current child theme's directory. define( 'CHILD_THEME_URI', get_stylesheet_directory_uri() ); // Sets the file path to WP Framework define( 'WPF_DIR', PARENT_THEME_DIR . '/framework' ); // Sets the URI path to WP Framework define( 'WPF_URI', PARENT_THEME_URI . '/framework' ); // Sets the file path to extensions define( 'WPF_EXT_DIR', WPF_DIR . '/extensions' ); // Sets the URI path to extensions define( 'WPF_EXT_URI', WPF_URI . '/extensions' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function wpInit() {}", "function start_wp()\n {\n }", "public function wp_loaded()\n {\n }", "function WordpressConnect(){\n\n\t\t$this->add_init_hook();\n\n\t}", "function ap_core_setup() {\r\n require_once ( get_template_directory() . '/inc/theme-options.php' );\r...
[ "0.70761746", "0.69151217", "0.66175145", "0.65658575", "0.65631884", "0.65502244", "0.6449238", "0.6425618", "0.63853234", "0.63566065", "0.634292", "0.6331627", "0.62645024", "0.6256334", "0.62543124", "0.62272346", "0.6209483", "0.6196697", "0.61907", "0.6190501", "0.61454...
0.0
-1
Templating constants that you can override before WP Framework is loaded.
function wpf_templating_constants() { // Sets a unique ID for the theme. if ( !defined( 'THEME_ID' ) ) define( 'THEME_ID', 'wpf_' . get_template() ); // Sets the default theme options db name if ( !defined( 'THEME_OPTIONS' ) ) define( 'THEME_OPTIONS', 'theme_options' ); // Sets relative paths for the default directories/paths if ( !defined( 'THEME_LIBRARY' ) ) define( 'THEME_LIBRARY', '/library' ); if ( !defined( 'THEME_I18N' ) ) define( 'THEME_I18N', THEME_LIBRARY . '/languages' ); if ( !defined( 'THEME_FUNC' ) ) define( 'THEME_FUNC', THEME_LIBRARY . '/functions' ); if ( !defined( 'THEME_IMG' ) ) define( 'THEME_IMG', THEME_LIBRARY . '/images' ); if ( !defined( 'THEME_CSS' ) ) define( 'THEME_CSS', THEME_LIBRARY . '/css' ); if ( !defined( 'THEME_JS' ) ) define( 'THEME_JS', THEME_LIBRARY . '/js' ); // Sets the default custom header image if ( !defined( 'DEFAULT_HEADER_IMAGE' ) ) define( 'DEFAULT_HEADER_IMAGE', get_theme_part( THEME_IMG . '/custom-header.gif' ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wp_templating_constants()\n {\n }", "function wp_initial_constants()\n {\n }", "function wpf_initial_constants() {\t\n\t// Sets the File path to the current parent theme's directory.\n\tdefine( 'PARENT_THEME_DIR', TEMPLATEPATH );\n\n\t// Sets the URI path to the current parent theme's dire...
[ "0.85753495", "0.7227877", "0.7188217", "0.69760865", "0.69572526", "0.6908326", "0.66635805", "0.6513728", "0.63636035", "0.63473785", "0.6332199", "0.62888145", "0.62441224", "0.62306416", "0.6228174", "0.62086886", "0.6141833", "0.6123586", "0.6114036", "0.6113174", "0.608...
0.795855
1
Retrieves the theme framework class and initalises it.
function WPF() { global $wpf_classes; $theme_class = wpf_get_class( 'theme' ); return $wpf_classes['theme'] = new $theme_class; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_theme_framework() {\n\treturn \\Classy\\Classy::get_instance();\n}", "function MicroBuilder_Theme_Factory () {}", "public static function getTheme()\n {\n $className = static::getCalledClass();\n while (!StringHandler::endsWith($className, \"App\")) {\n $className = get...
[ "0.81507015", "0.7469958", "0.72667664", "0.7122472", "0.6817036", "0.67762583", "0.675122", "0.67499244", "0.6720505", "0.6668172", "0.6668109", "0.6668034", "0.6641717", "0.6619503", "0.66140324", "0.6592944", "0.65808904", "0.65739137", "0.6546103", "0.65253836", "0.651787...
0.77236
1
Loads BuddyPress functionality if the plugin is active. Extend or override the WPF_BP class by registering your own 'bp' class.
function wpf_maybe_bp_init() { if ( !is_bp_active() ) return false; global $wpf_classes, $wpf_theme; require_once( WPF_DIR . '/classes/wpf-bp.php' ); $bp_class = wpf_get_class( 'bp' ); return $wpf_classes['bp'] = new $bp_class(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cp_load_bp_functions() {\n\t// least BuddyPress 1.5.\n\tif ( function_exists( 'bp_get_current_group_id' ) ) {\n\t\trequire_once( CP_PLUGIN_DIR . 'includes/cp-bp.php' );\n\t}else{\n\t\t//BuddyPress is older than 1.5, display a notice\n\t\tadd_action( 'admin_notices', create_function( '', 'echo \\'<div clas...
[ "0.72114223", "0.7006273", "0.63638926", "0.62610966", "0.6205068", "0.61940837", "0.615495", "0.6072002", "0.5979279", "0.5963867", "0.5955536", "0.58913064", "0.5888569", "0.583691", "0.5825228", "0.5803712", "0.57871234", "0.5783144", "0.57779217", "0.5773288", "0.5745474"...
0.7385117
0
Registers a WP Framework class.
function wpf_register_class( $handle, $class, $autoload = false ) { global $wpf_classes; $type = $autoload ? 'autoload' : 'static'; $wpf_classes[$type][$handle] = $class; return $wpf_classes[$type][$handle]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register($class);", "function register_class()\n\t{\n\t\t\n\t\t// NO LONGER NEEDED\n\t}", "protected abstract function registerClasses(): void;", "private function registerClass(string $class = null)\n {\n if(class_exists($class)){\n $this->app->register($class);\n ...
[ "0.6936034", "0.6533095", "0.63863593", "0.63039184", "0.61995655", "0.60920054", "0.595233", "0.5909843", "0.5888458", "0.58864194", "0.58539045", "0.5801427", "0.5801427", "0.5798436", "0.57482165", "0.57342285", "0.57314354", "0.56831926", "0.568296", "0.56808436", "0.5678...
0.69073486
1
Registers a contextual WP Framework class. Contextual classes will get loaded after the 'wp' action is fired.
function wpf_register_contextual_class( $handle, $class ) { global $wpf_classes; $wpf_classes['contextual'][$handle] = $class; return $wpf_classes['contextual'][$handle]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wpf_load_contextual_classes() {\n\tglobal $wpf_classes, $wpf_theme;\n\n\tif ( isset($wpf_classes['contextual']) && !empty( $wpf_classes['contextual'] ) ) {\n\t\t$methods = array();\n\n\t\t// Get the context, but not in the admin.\n\t\tif ( !is_admin() ) {\n\t\t\t$context = array_reverse( (array) wpf_get_r...
[ "0.69766647", "0.6301805", "0.6150954", "0.60740936", "0.60070145", "0.5975842", "0.576748", "0.575994", "0.5708206", "0.570109", "0.5674487", "0.5663401", "0.56627935", "0.5647846", "0.5638921", "0.5634577", "0.5602806", "0.55562526", "0.54975724", "0.54952604", "0.5492512",...
0.69067645
1
Registers an admin class in WP Framework. An admin class allows you to create administrative pages in WordPress.
function wpf_register_admin_class( $menu_slug, $class ) { global $wpf_classes; $wpf_classes['admin'][$menu_slug] = $class; return $wpf_classes['admin'][$menu_slug]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wpf_load_admin_pages() {\n\tif ( !is_admin() )\n\t\treturn;\n\n\tglobal $wpf_classes;\n\n\tif ( isset($wpf_classes['admin']) && !empty($wpf_classes['admin']) ) {\n\t\tforeach ( $wpf_classes['admin'] as $handle => $class ) {\n\t\t\tif ( !isset($wpf_classes[$handle]) ) {\n\t\t\t\t$wpf_classes[$handle] = new...
[ "0.7339452", "0.72882724", "0.712093", "0.6799967", "0.6779054", "0.6738659", "0.6655753", "0.6629349", "0.66095227", "0.6414337", "0.64028126", "0.63994914", "0.6372456", "0.6367179", "0.633664", "0.6325589", "0.6311613", "0.6310715", "0.6301967", "0.62916535", "0.62611717",...
0.71028244
3
Retrieves a registered WP Framework class.
function wpf_get_class( $class ) { global $wpf_classes; if ( isset($wpf_classes[$class]) ) return $wpf_classes[$class]; if ( isset($wpf_classes['admin'][$class]) ) return $wpf_classes['admin'][$class]; if ( isset($wpf_classes['static'][$class]) ) return $wpf_classes['static'][$class]; if ( isset($wpf_classes['autoload'][$class]) ) return $wpf_classes['autoload'][$class]; if ( isset($wpf_classes['contextual'][$class]) ) return $wpf_classes['contextual'][$class]; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_theme_framework() {\n\treturn \\Classy\\Classy::get_instance();\n}", "function WPF() {\n\tglobal $wpf_classes;\n\n\t$theme_class = wpf_get_class( 'theme' );\n\n\treturn $wpf_classes['theme'] = new $theme_class;\n}", "public function fetch_class()\n\t{\n\t\treturn $this->route_stack[self::SEG_CLASS...
[ "0.7011855", "0.640041", "0.6098989", "0.60446626", "0.60026187", "0.59867233", "0.59741884", "0.59540665", "0.5922518", "0.5904633", "0.5895844", "0.5883491", "0.5873019", "0.58629584", "0.5801695", "0.5786168", "0.5783887", "0.578086", "0.5745775", "0.57083106", "0.5707408"...
0.65581596
1
Loops through all the registered autoloaded classes and instantiates them.
function wpf_autoload_classes() { global $wpf_classes; if ( isset( $wpf_classes['autoload'] ) ) { foreach ( (array) $wpf_classes['autoload'] as $handle => $class ) { if ( !isset($wpf_classes[$handle]) ) { $wpf_classes[$handle] = new $class; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadAllClassesIncrementally()\n {\n }", "public function loadClasses(){\n spl_autoload_register(function($className){\n require_once preg_replace(\"/\\\\\\\\/\", \"/\", $className).\".php\";\n });\n }", "public static function init() {\r\n\t\r\n...
[ "0.74964607", "0.7352997", "0.73162746", "0.7309988", "0.7286737", "0.7285625", "0.70561725", "0.7001084", "0.6968005", "0.69340587", "0.68373317", "0.6798649", "0.67362565", "0.6714632", "0.67132294", "0.67006814", "0.65996164", "0.65904033", "0.65809554", "0.65732133", "0.6...
0.7234444
6
Loops through all the registered contextual classes and attempts to call classs methods based on wpf_get_request().
function wpf_load_contextual_classes() { global $wpf_classes, $wpf_theme; if ( isset($wpf_classes['contextual']) && !empty( $wpf_classes['contextual'] ) ) { $methods = array(); // Get the context, but not in the admin. if ( !is_admin() ) { $context = array_reverse( (array) wpf_get_request() ); if ( !empty($context) ) { foreach ( $context as $method ) { $methods[] = str_replace( '-', '_', $method ); } } } foreach ( (array) $wpf_classes['contextual'] as $handle => $class ) { if ( isset($wpf_classes[$handle]) ) continue; // Call the admin method if we're in the admin area. if ( is_admin() ) { $wpf_theme->callback( $wpf_classes['contextual'][$handle], 'admin' ); } else { // Call the constructor method if we're not in the admin, // pass all the methods that are valid for this page request. $wpf_classes[$handle] = new $class( $methods ); } // Call all the contextual methods. if ( !empty( $methods ) ) { foreach( $methods as $method ) { $wpf_theme->callback( $wpf_classes[$handle], $method ); } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getContextClasses();", "public function handledClass();", "public function injectViewClasses() {\n\t\t$controller = $this->_controller();\n\t\tforeach ($this->config('viewClasses') as $type => $class) {\n\t\t\t$controller->RequestHandler->viewClassMap($type, $class);\n\t\t}\n\t}", "function w...
[ "0.5964458", "0.5905702", "0.5806874", "0.553885", "0.5505963", "0.54662776", "0.5438572", "0.53977716", "0.5393653", "0.53520226", "0.53430855", "0.5314377", "0.5312421", "0.53078485", "0.5297082", "0.5234723", "0.5225102", "0.5224057", "0.51966256", "0.5140371", "0.51292986...
0.77806777
0
Loops through all the registered admin pages and attempts to call classs methods based on wpf_get_request().
function wpf_load_admin_pages() { if ( !is_admin() ) return; global $wpf_classes; if ( isset($wpf_classes['admin']) && !empty($wpf_classes['admin']) ) { foreach ( $wpf_classes['admin'] as $handle => $class ) { if ( !isset($wpf_classes[$handle]) ) { $wpf_classes[$handle] = new $class; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setupAdminRoutes() {\n if ( class_exists('GetStartedController') ) {\n add_action('wp_ajax_getstarted', 'GetStartedController::pageAjax');\n add_action('wp_ajax_nopriv_getstarted', 'GetStartedController::pageAjax');\n }\n if ( class_exists('Prici...
[ "0.67111236", "0.66846746", "0.66776764", "0.65621316", "0.6506575", "0.6469161", "0.6377735", "0.6377735", "0.63446647", "0.63446504", "0.6237714", "0.6211898", "0.61917865", "0.6156982", "0.6115275", "0.6050643", "0.6041598", "0.5972208", "0.59684485", "0.5964318", "0.59367...
0.78827757
0
Checks to see if any metaboxes are registered to a post type.
function wpf_load_post_type_metaboxes() { global $wpf_classes; $metabox_class = wpf_get_class( 'metaboxes' ); return $wpf_classes['metaboxes'] = new $metabox_class(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function admin_metaboxes() {\r\n\r\n// \t\t\t/** Check if wpeo_log_select_post_type exist */\r\n// \t\t\tif( !empty(\t$this->wpeologs_settings['post_type'] ) ) {\r\n// \t\t\t\tforeach ( $this->wpeologs_settings['post_type'] as $post_type ) {\r\n\r\n// \t\t\t\t\t//add_meta_box( 'wpeologs_metabox_' . $post_type, __(...
[ "0.65834457", "0.6506478", "0.64784276", "0.63321954", "0.63312566", "0.6326825", "0.6285749", "0.6255533", "0.62434715", "0.62212604", "0.6179277", "0.61769634", "0.6154691", "0.60869616", "0.6083316", "0.6076926", "0.6040087", "0.60141736", "0.6004935", "0.5982903", "0.5967...
0.59122217
28
Function for profiling your theme.
function wpf_timer_start( $id = 0 ) { global $wpf_profiler; $mtime = explode( ' ', microtime() ); $wpf_profiler[$id]['start'] = $mtime[1] + $mtime[0]; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function profile()\n\t{\n\t\t// Return the view\n\t\treturn View::factory('benchmark/profile')\n\t\t\t->set('memory', (memory_get_usage() - START_MEMORY) / 1024)\n\t\t\t->set('time', round(microtime(TRUE) - START_TIME, 5))\n\t\t\t->set('memory_limit', 131072) // 128M\n\t\t\t->set('time_limit', 30)\n\...
[ "0.63129854", "0.5836551", "0.57720166", "0.5771761", "0.56465095", "0.56314003", "0.559709", "0.5548445", "0.55414134", "0.5492557", "0.5482903", "0.54655904", "0.545102", "0.542166", "0.5398588", "0.53959435", "0.5391367", "0.53855264", "0.53514105", "0.5347607", "0.5337121...
0.0
-1
Get the results of your profile.
function wpf_timer_stop( $id = 0, $echo = 0, $precision = 3 ) { // if called like timer_stop(1), will echo $timetotal global $wpf_profiler; if ( !isset($wpf_profiler[$id]) ) return false; $mtime = microtime(); $mtime = explode( ' ', $mtime ); $wpf_profiler[$id]['stop'] = $mtime[1] + $mtime[0]; $total = $wpf_profiler[$id]['stop'] - $wpf_profiler[$id]['start']; $wpf_profiler[$id]['total'] = ( function_exists( 'number_format_i18n' ) ) ? number_format_i18n( $total, $precision ) : number_format( $total, $precision ); return ( $echo ) ? print $wpf_profiler[$id]['total'] : $wpf_profiler[$id]['total']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getResults();", "function printResults(&$results) {\n // the profile name and total sessions.\n if (count($results->getRows()) > 0) {\n\n // Get the profile name.\n $profileName = $results->getProfileInfo()->getProfileName();\n\n // Get the entry for the first entry in the first row.\n...
[ "0.7098757", "0.70228946", "0.6810991", "0.67479026", "0.6729603", "0.653728", "0.6534414", "0.65166706", "0.65046155", "0.6494315", "0.6455292", "0.64502", "0.6423929", "0.63932794", "0.63813674", "0.6358365", "0.63516736", "0.63495755", "0.6348161", "0.6302663", "0.62943554...
0.0
-1
/ This was used for testing from class notes
public function practice1() { return ("practice 1"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function __() {\n }", "private function __construct()\t{}", "protected function __init__() { }", "final private function __construct() {}", "final private function __construct() {}", "private function __construct () {}", "final private function __construct() { }", "final private fu...
[ "0.6285775", "0.6282427", "0.6236656", "0.6231755", "0.6231755", "0.6227087", "0.6198354", "0.6198354", "0.6198354", "0.619217", "0.61603737", "0.6159724", "0.6159724", "0.6159724", "0.6159724", "0.6159724", "0.6159724", "0.6159724", "0.6159724", "0.6159724", "0.6159724", "...
0.0
-1
This method is called on any attempt to compile a function call
public function compileFunction() { $params = func_get_args(); $name = array_shift($params); array_pop($params); if (function_exists($name)) { return $name . '('. join(", ", $params) . ')'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function compile ();", "function compilerError()\r\n{\r\n\t$this->model->compilerView=1;\r\n\techo '<br />COMPILER ERROR....'.$this->compiler();\r\n \r\n\r\n}", "function compile ($src);", "public function compile($value);", "public function convert()\n {\n $cFunctionCallIndexes = array();\n\...
[ "0.69419795", "0.61325204", "0.5955069", "0.59365463", "0.59245855", "0.5775194", "0.5775194", "0.5712132", "0.5697203", "0.56928015", "0.55633956", "0.55367476", "0.5532094", "0.5497999", "0.54901546", "0.5483242", "0.5465166", "0.54448915", "0.5415019", "0.54076415", "0.539...
0.60480255
2
Validates the password. This method serves as the inline validation for password.
public function validatePassword() { if (!$this->hasErrors()) { $user = $this->getUser(); if (!$user || !$user->validatePassword($this->password)) { $this->addError('password', Yii::t('app','Falscher Benutzername oder falsches Passwort.')); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validatePassword()\n {\n /* @var $user User */\n $user = Yii::$app->user->identity;\n if (!$user || !$user->validatePassword($this->password)) {\n $this->addError('password', 'Incorrect password.');\n }\n }", "public function validatePassword()\n {\...
[ "0.7863859", "0.769698", "0.7534779", "0.7386753", "0.73385555", "0.729721", "0.72783655", "0.7157424", "0.71568894", "0.71119124", "0.70852286", "0.7073094", "0.706855", "0.70403856", "0.7031329", "0.7007179", "0.70014006", "0.6987082", "0.69784933", "0.6942016", "0.6909618"...
0.73903596
3
Validates the password. This method serves as the inline validation for password.
public function validateStatus() { if (!$this->hasErrors()) { $user = $this->getUser(); if ($user->status==User::STATUS_BLOCKED || $user->status==User::STATUS_DELETED) { $this->addError('password', Yii::t('app','Your account is blocked, please contact support.')); } if ($user->status==User::STATUS_EMAIL_VALIDATION) { $this->addError('password', Yii::t('app','Du hast Deine Registrierung noch nicht abgeschlossen. Prüfe Deine E-Mails, dort findest Du eine E-Mail mit dem Bestätigungslink. Bitte klicke auf diesen Link um Deine Registrierung abzuschliessen.')); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validatePassword()\n {\n /* @var $user User */\n $user = Yii::$app->user->identity;\n if (!$user || !$user->validatePassword($this->password)) {\n $this->addError('password', 'Incorrect password.');\n }\n }", "public function validatePassword()\n {\...
[ "0.7863859", "0.769698", "0.7534779", "0.73903596", "0.7386753", "0.73385555", "0.729721", "0.72783655", "0.7157424", "0.71568894", "0.71119124", "0.70852286", "0.7073094", "0.706855", "0.70403856", "0.7031329", "0.7007179", "0.70014006", "0.6987082", "0.69784933", "0.6942016...
0.0
-1
Logs in a user using the provided username and password.
public function login() { $user=$this->getUser(); $this->setScenario('normal'); if ($user && $user->failed_logins>=3) $this->setScenario('withCaptcha'); if ($this->validate()) { $user->failed_logins=0; $user->save(); return Yii::$app->user->login($user, $this->rememberMe ? 3600*24*30 : 0); } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function LogIn ($userName = '', $password = '');", "public function login($username, $password);", "public function login($userName, $password);", "function login($username, $password = null)\n {\n $f3->get('user')->copyfrom('POST');\n k($f3);\n $user = self::load(\"name...
[ "0.8009955", "0.76665884", "0.7506839", "0.72778517", "0.7117188", "0.7117188", "0.7021765", "0.7019218", "0.7009057", "0.70061266", "0.69893014", "0.6988763", "0.6982939", "0.69742745", "0.69383377", "0.69098395", "0.6898184", "0.6867491", "0.6866067", "0.6857612", "0.685626...
0.0
-1
Finds user by [[username]]
public function getUser() { if ($this->_user === false) { $this->_user = \app\models\User::findByUsername($this->username); } return $this->_user; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findUserByUsername($username);", "public function findUserByUsername($username);", "public function findUserByUsername($username);", "public function getUserWithUsername($username);", "public function findByUsername(string $username);", "public function fetchUserByUserName($username);", ...
[ "0.7941892", "0.7941892", "0.7941892", "0.7617345", "0.75134575", "0.7474061", "0.74112356", "0.7314069", "0.72018313", "0.71878403", "0.7180881", "0.71486443", "0.7132451", "0.7121639", "0.7098833", "0.70721287", "0.7070608", "0.7060042", "0.7044413", "0.70383894", "0.702371...
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(CommentsRequest $request, Guard $auth) { $data = $request->only('username','email','content','post_id'); if($auth->user()){ $data['user_id'] = $auth->user()->id; } Comment::create($data); return redirect()->back()->with('success', 'Merci pour votre commentaire'); }
{ "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) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890...
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
make $file_name relative and $full_file_path full
public function paths($file_dir, $file_name) { if (stripos($file_name, $file_dir) === 0) { $full_file_path = $file_name; $file_name = implode('/', array_diff(explode('/', $file_name), explode('/', $file_dir))); } else { $full_file_path = $file_dir . '/' . $file_name; } $this->logger->debug(__METHOD__ . ' ' . $file_name . ' or ' . $full_file_path); return [$file_name, $full_file_path]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function makeFull($uri, $file_name) {\n\t\t$key = sprintf('full/%s', $file_name);\n\t\t$this->makeImageFit($key, $uri, $file_name, 726);\n\t}", "function make_filename($filename, $xs_include = false)\n\t{\n\t\t// Check replacements list\n\t\tif(isset($this->replace[$filename]))\n\t\t{\n\t\t\tif(!$xs_incl...
[ "0.64439505", "0.6418991", "0.63201076", "0.62451184", "0.6200759", "0.6131148", "0.611718", "0.6064574", "0.60638446", "0.60485125", "0.60387415", "0.5945617", "0.589638", "0.5878426", "0.5852989", "0.58377206", "0.58322936", "0.58228767", "0.5811291", "0.5788694", "0.578736...
0.0
-1
relationship with "blog category" model
public function blog_category(){ return $this->hasOne(Blog_category::class, 'id', 'category_id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function blogOfBlogCategories()\n {\n return $this->hasMany(Blog::class, 'blog_category_id');\n }", "public function categories()\n {\n return $this->belongsToMany(BlogCategory::class, 'blog_map_categories', 'blog_id', 'category_id');\n }", "public function category()\n {\n ...
[ "0.7414309", "0.69312376", "0.6893894", "0.6814409", "0.6693148", "0.65869457", "0.65548813", "0.6418212", "0.6417245", "0.640472", "0.6403494", "0.63852495", "0.6372016", "0.6371271", "0.6365774", "0.6365243", "0.6364318", "0.63403493", "0.63403493", "0.6333624", "0.63282716...
0.76548684
0
/ $data = array('senderid'=>$sender, 'contacts'=>sizeof($numbers), 'message'=>$msg, 'totalcharge'=>$totalcharge, 'email'=>$email);
public function bulk_sms_email($data = null) { $url = 'http://spectrumug.com/bulk_sms_notifications.php'; $options = array ( CURLOPT_URL => $url, CURLOPT_POST => 1, CURLOPT_POSTFIELDS => $data, ); $curl = curl_init(); curl_setopt_array($curl, $options); $response = curl_exec($curl); if (!$response) { $response = curl_error($curl); } curl_close($curl); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function arr() {\n $customer_msgs = array();\n /* for ($i = 1; $i <= 10; $i++) {\n /* $msgs = array(); */\n /* $msgs[$i] = \"Message \" . $i;\n /* array_push($arrs, $msgs); */\n /* } */\n $customer_msgs['1'] = \"This Email is not Registered\";\n $c...
[ "0.62533647", "0.5743465", "0.56329346", "0.5573669", "0.55223763", "0.5502547", "0.54882234", "0.54698354", "0.54574937", "0.54380506", "0.54141843", "0.53982735", "0.53954774", "0.5393847", "0.53888494", "0.5384328", "0.53806674", "0.53795004", "0.537855", "0.5363607", "0.5...
0.0
-1
/ $data = array('senderid'=>$sender, 'contacts'=>sizeof($numbers), 'message'=>$msg, 'totalcharge'=>$totalcharge, 'email'=>$email);
public function send_notification($data = null) { $url = base_url() . 'notifications.php'; $options = array ( CURLOPT_URL => $url, CURLOPT_POST => 1, CURLOPT_POSTFIELDS => $data, ); $curl = curl_init(); curl_setopt_array($curl, $options); $response = curl_exec($curl); if (!$response) { $response = curl_error($curl); } curl_close($curl); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function arr() {\n $customer_msgs = array();\n /* for ($i = 1; $i <= 10; $i++) {\n /* $msgs = array(); */\n /* $msgs[$i] = \"Message \" . $i;\n /* array_push($arrs, $msgs); */\n /* } */\n $customer_msgs['1'] = \"This Email is not Registered\";\n $c...
[ "0.6253744", "0.5744378", "0.5634905", "0.5574809", "0.55232424", "0.55026037", "0.54877603", "0.5469375", "0.5458612", "0.54386073", "0.54148287", "0.53987205", "0.53955066", "0.53931653", "0.5389932", "0.5384851", "0.5381555", "0.5379972", "0.53794414", "0.53633803", "0.535...
0.0
-1
Includes the widget through its Index.html template and renders it.
public function indexAction() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $this->view->widget = $this->_getWidget();\n }", "public static function widget() {\n require_once( 'includes/widget.php' );\n }", "public function frontend_render()\n {\n $user_selected_language = get_user_lang();\n $widget_saved_valu...
[ "0.72744167", "0.7114352", "0.70486623", "0.6887091", "0.68819404", "0.6737131", "0.66932714", "0.665074", "0.6540014", "0.6521818", "0.6512254", "0.6439191", "0.64290595", "0.6423115", "0.6412786", "0.6412786", "0.63969195", "0.6373364", "0.63591665", "0.6326835", "0.6314734...
0.0
-1
Renders and returns the URI pointing to the widget for an AJAX call.
public function widgetUriAction() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getAjaxUri(): string\n {\n $arguments = $this->arguments['arguments'] ?? $this->argumentDefinitions['arguments']->getDefaultValue();\n\n if (!$this->hasArgument('action')) {\n $arguments['@action'] = $this->controllerContext->getRequest()->getControllerActionName();\n...
[ "0.7148367", "0.70140237", "0.70140237", "0.6557887", "0.6557887", "0.6496702", "0.60356027", "0.60070986", "0.59861904", "0.59738755", "0.5886633", "0.57751715", "0.5761966", "0.5743771", "0.57369703", "0.56871164", "0.56313616", "0.56305206", "0.56267154", "0.5621817", "0.5...
0.6116061
6
List of services to preload.
public function toPreload() { return array('web.Broker'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function load_services() {\n\t\tforeach ( $this->get_services() as $service_classname ) {\n\t\t\t$this->load_service( $service_classname );\n\t\t}\n\t}", "private function loadServices()\n {\n # Receive list of available service binary's\n exec(\"php composer.phar exec --list\", $service...
[ "0.71235085", "0.7020378", "0.66509587", "0.66035086", "0.64743674", "0.6286837", "0.6281417", "0.62558067", "0.62538403", "0.6242862", "0.6237549", "0.6166328", "0.61567765", "0.6133615", "0.6069074", "0.6017892", "0.60159457", "0.6012997", "0.59784174", "0.59538513", "0.588...
0.62257004
11
end toPreload(); Builds the JSON object.
public function getObject() { $application = \Trinity\Basement\Application::getApplication(); $broker = $this->_serviceLocator->get('web.Broker'); $json = new Json($application); return $json; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buildJson();", "protected function CreateJson() {\n\t\t$obj = new \\stdClass;\n\t\t$obj->recordsList = parent::CreateJson();\n\n\t\t// add links from server\n\t\t$obj->link = new \\stdClass;\n\t\t$obj->link->href = $this->link_href;\n\t\t$obj->link->rel = $this->link_rel;\n\t\treturn $obj;\n\t}"...
[ "0.7012178", "0.6142556", "0.61084175", "0.59710544", "0.5968544", "0.5912146", "0.5898108", "0.58685416", "0.57585377", "0.5703617", "0.56981456", "0.56902194", "0.56786764", "0.5671145", "0.56562674", "0.5609571", "0.5565421", "0.5561511", "0.5489264", "0.54680264", "0.5468...
0.0
-1
For internal only. DO NOT USE IT.
public function deserialize($param) { if ($param === null) { return; } if (array_key_exists("CertificationAuthority",$param) and $param["CertificationAuthority"] !== null) { $this->CertificationAuthority = $param["CertificationAuthority"]; } if (array_key_exists("ClusterExternalEndpoint",$param) and $param["ClusterExternalEndpoint"] !== null) { $this->ClusterExternalEndpoint = $param["ClusterExternalEndpoint"]; } if (array_key_exists("ClusterIntranetEndpoint",$param) and $param["ClusterIntranetEndpoint"] !== null) { $this->ClusterIntranetEndpoint = $param["ClusterIntranetEndpoint"]; } if (array_key_exists("ClusterDomain",$param) and $param["ClusterDomain"] !== null) { $this->ClusterDomain = $param["ClusterDomain"]; } if (array_key_exists("ClusterExternalACL",$param) and $param["ClusterExternalACL"] !== null) { $this->ClusterExternalACL = $param["ClusterExternalACL"]; } if (array_key_exists("ClusterExternalDomain",$param) and $param["ClusterExternalDomain"] !== null) { $this->ClusterExternalDomain = $param["ClusterExternalDomain"]; } if (array_key_exists("ClusterIntranetDomain",$param) and $param["ClusterIntranetDomain"] !== null) { $this->ClusterIntranetDomain = $param["ClusterIntranetDomain"]; } if (array_key_exists("SecurityGroup",$param) and $param["SecurityGroup"] !== null) { $this->SecurityGroup = $param["SecurityGroup"]; } if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) { $this->RequestId = $param["RequestId"]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function __init__() { }", "private function __() {\n }", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}...
[ "0.62662613", "0.6151871", "0.5989886", "0.5989886", "0.5989886", "0.5989886", "0.5989418", "0.5989418", "0.5989418", "0.5989418", "0.5989418", "0.5989418", "0.5988404", "0.5988404", "0.5949015", "0.5939596", "0.59168774", "0.59168774", "0.58703923", "0.58665824", "0.5855589"...
0.0
-1
Get the unique identifier for the user.
public function getAuthIdentifier() { return $this->getKey(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserIdentifier()\n {\n // that's why I am sending the id here\n return $this->id;\n }", "public function uniqueId(): string\n {\n return strval($this->user->id);\n }", "public function getUserid()\n {\n return $this->get(self::_USERID);\n }", "...
[ "0.83579457", "0.830269", "0.8108248", "0.8108248", "0.8108248", "0.80963516", "0.80897546", "0.80067533", "0.80067533", "0.80067533", "0.8006005", "0.79547375", "0.79351974", "0.7910551", "0.78961694", "0.7876723", "0.787507", "0.78725845", "0.7869423", "0.7864789", "0.78482...
0.0
-1
Get the password for the user.
public function getAuthPassword() { return $this->password; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPassword() {\n return $this->get('password', 'user');\n }", "private function getPassword()\n {\n return $this->user->getPassword();\n }", "public function getPassword()\n {\n return $this->getUserPassword();\n }", "public function getUserPassword()\n ...
[ "0.8771421", "0.87712306", "0.8556568", "0.84604484", "0.84563506", "0.8316581", "0.8284297", "0.8276022", "0.81920654", "0.81288224", "0.81208736", "0.8095148", "0.8090608", "0.80871874", "0.80773664", "0.80773664", "0.80773664", "0.80773664", "0.80773664", "0.80773664", "0....
0.0
-1
echo '' . $rawXML . '';
function processXML($rawXML) { $rawXML = utf8_decode($rawXML); $rawXML = iconv("UTF-8","UTF-8//IGNORE",$rawXML); //echo '<pre>' . $rawXML . '</pre>'; if (!$this->parse($rawXML)) return false; // parse the submitted string, check for errors //echo 'parsed string = '; print_r($this->arrOutput); echo '<br />'; $this->username = $this->getNodeData(array('ACCESSREQUEST','ACCESSUSERID'), $this->arrOutput); $this->password = $this->getNodeData(array('ACCESSREQUEST','ACCESSPASSWORD'), $this->arrOutput); if (!$this->validateUser($this->username, $this->password)) return false; // verify username and password //echo 'user was validated<br />'; if (!$this->formatArray()) return false; // format submitted string into order array, check for errors //echo 'array was formatted<br />'; if (!$this->buildJournalEntry()) return false; //echo 'journal entry was built and posted<br />'; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _print_xml()\n\t{\n\t\n\t}", "public function outputXML($raw = false)\r\n\t{\r\n\t\tif ($raw) {\r\n\t\t\treturn $this->fusionChart->getXML();\r\n\t\t}\r\n\r\n\t\t// Output a BOM and xml header\r\n\t\t// http://docs.fusioncharts.com/charts/contents/advanced/special-chars/SpChar.html\r\n\t\treturn...
[ "0.70359063", "0.6895931", "0.68286407", "0.653317", "0.65062594", "0.64091265", "0.63383347", "0.6334541", "0.630353", "0.618979", "0.6170061", "0.61685085", "0.61604", "0.61567616", "0.61260575", "0.60735506", "0.6069619", "0.60694754", "0.6035634", "0.6024583", "0.5964282"...
0.0
-1
The remaining functions are specific to PhreeBooks. They need to be modified for the specific application. It also needs to check for errors, i.e. missing information, bad data, etc.
function buildJournalEntry() { global $messageStack, $currencies; // set some preliminary information switch (strtoupper($this->order['function'])) { case 'SALESINVOICEENTRY': define('JOURNAL_ID',12); define('GL_TYPE','sos'); break; case 'SALESORDERENTRY': default: define('JOURNAL_ID',10); define('GL_TYPE','soo'); } if ($this->order['receivables_gl_acct'] <> '') { // see if requestor specifies a AR account else use default define('DEF_GL_ACCT',$this->order['receivables_gl_acct']); } else { define('DEF_GL_ACCT',AR_DEFAULT_GL_ACCT); } $account_type = 'c'; $psOrd = new orders(); // make the received string look like a form submission then post as usual $psOrd->account_type = $account_type; $psOrd->id = ''; // should be null unless opening an existing purchase/receive $psOrd->journal_id = JOURNAL_ID; $psOrd->post_date = $this->order['post_date']; // date format should already be YYYY-MM-DD $psOrd->terminal_date = $this->order['post_date']; // make same as order date for now $psOrd->period = gen_calculate_period($psOrd->post_date); $psOrd->store_id = $this->get_account_id($this->order['store_id'], 'b'); $psOrd->admin_id = $this->get_user_id($this->username); $psOrd->description = SOAP_XML_SUBMITTED_SO; $psOrd->gl_acct_id = DEF_GL_ACCT; $psOrd->freight = $currencies->clean_value(db_prepare_input($this->order['freight_total']), DEFAULT_CURRENCY); $psOrd->discount = $currencies->clean_value(db_prepare_input($this->order['discount_total']), DEFAULT_CURRENCY); $psOrd->sales_tax = db_prepare_input($this->order['tax_total']); $psOrd->total_amount = db_prepare_input($this->order['order_total']); // The order ID should be set by the submitter $psOrd->purchase_invoice_id = db_prepare_input($this->order['order_id']); $psOrd->purch_order_id = db_prepare_input($this->order['purch_order_id']); $psOrd->shipper_code = db_prepare_input($this->order['freight_carrier']); // BOF - Added by PhreeSoft for Portable Power Systems to map the shipping codes to PhreeBooks Codes $psOrd->shipper_code = substr($psOrd->shipper_code, 0, 16); switch ($psOrd->shipper_code) { default: case 'FedEx (Ground):': $psOrd->shipper_code = 'fedex_v7:GND'; break; case 'FedEx (Ground LT': $psOrd->shipper_code = 'fedex_v7:GndFrt'; break; case 'FedEx (Home Deli': $psOrd->shipper_code = 'fedex_v7:GDR'; break; case 'FedEx (Express S': $psOrd->shipper_code = 'fedex_v7:3Dpm'; break; case 'FedEx (Express 2': $psOrd->shipper_code = 'fedex_v7:2Dpm'; break; case 'FedEx (Standard ': $psOrd->shipper_code = 'fedex_v7:1Dpm'; break; case 'FedEx (Priority ': $psOrd->shipper_code = 'fedex_v7:1Dam'; break; case 'UPS (Ground):': case 'UPS (Ground Resi': $psOrd->shipper_code = 'ups:GND'; break; case 'UPS (3 Day Selec': $psOrd->shipper_code = 'ups:3Dpm'; break; case 'UPS (2 Day Air):': $psOrd->shipper_code = 'ups:2Dpm'; break; case 'UPS (Next Day PM': $psOrd->shipper_code = 'ups:1Dpm'; break; case 'UPS (Next Day):': $psOrd->shipper_code = 'ups:1Dam'; break; case 'FREE SHIPPING! (': $psOrd->shipper_code = 'usps:3Dpm'; break; case 'Flat (Best Way):': $psOrd->shipper_code = 'usps:2Dpm'; break; } // EOF - Added by PhreeSoft for PPS /* Values below are not used at this time $psOrd->sales_tax_auths $psOrd->terms $psOrd->drop_ship = 0; $psOrd->waiting = 0; $psOrd->closed = 0; $psOrd->subtotal */ $psOrd->bill_add_update = 1; // force an address book update // see if the customer record exists $psOrd->short_name = db_prepare_input($this->order['customer']['customer_id']); $psOrd->ship_short_name = $psOrd->short_name; $result = $this->checkForCustomerExists($psOrd); if (!$result) return false; $psOrd->ship_add_update = $result['ship_add_update']; $psOrd->bill_acct_id = $result['bill_acct_id']; $psOrd->bill_address_id = $result['bill_address_id']; $psOrd->ship_acct_id = $result['ship_acct_id']; $psOrd->ship_address_id = $result['ship_address_id']; // Phreebooks requires a primary name or the order is not valid, use company name if exists, else contact name if ($this->order['billing']['primary_name'] == '') { $psOrd->bill_primary_name = $this->order['billing']['contact']; $psOrd->bill_contact = ''; } else { $psOrd->bill_primary_name = $this->order['billing']['primary_name']; $psOrd->bill_contact = $this->order['billing']['contact']; } $psOrd->bill_address1 = $this->order['billing']['address1']; $psOrd->bill_address2 = $this->order['billing']['address2']; $psOrd->bill_city_town = $this->order['billing']['city_town']; $psOrd->bill_state_province = $this->order['billing']['state_province']; $psOrd->bill_postal_code = $this->order['billing']['postal_code']; $psOrd->bill_country_code = gen_get_country_iso_3_from_2($this->order['billing']['country_code']); $psOrd->bill_telephone1 = $this->order['customer']['telephone']; $psOrd->bill_email = $this->order['customer']['email']; if ($this->order['shipping']['primary_name'] == '') { $psOrd->ship_primary_name = $this->order['shipping']['contact']; $psOrd->ship_contact = ''; } else { $psOrd->ship_primary_name = $this->order['shipping']['primary_name']; $psOrd->ship_contact = $this->order['shipping']['contact']; } $psOrd->ship_address1 = $this->order['shipping']['address1']; $psOrd->ship_address2 = $this->order['shipping']['address2']; $psOrd->ship_city_town = $this->order['shipping']['city_town']; $psOrd->ship_state_province = $this->order['shipping']['state_province']; $psOrd->ship_postal_code = $this->order['shipping']['postal_code']; $psOrd->ship_country_code = gen_get_country_iso_3_from_2($this->order['shipping']['country_code']); $psOrd->ship_telephone1 = $this->order['customer']['telephone']; $psOrd->ship_email = $this->order['customer']['email']; // check for truncation of addresses if (strlen($psOrd->bill_primary_name) > 32 || strlen($psOrd->bill_address1) > 32 || strlen($psOrd->ship_primary_name) > 32 || strlen($psOrd->ship_address1) > 32) { $messageStack->add('Either the Primary Name or Address has been truncated to fit in the PhreeBooks database field sizes. Please check source information.', 'caution'); } // load the item rows switch (JOURNAL_ID) { case 12: $index = 'pstd'; break; case 10: default: $index = 'qty'; break; } for ($i = 0; $i < count($this->order['items']); $i++) { $psOrd->item_rows[] = array( 'gl_type' => GL_TYPE, $index => db_prepare_input($this->order['items'][$i]['quantity']), 'sku' => db_prepare_input($this->order['items'][$i]['sku']), 'desc' => db_prepare_input($this->order['items'][$i]['description']), 'price' => db_prepare_input($this->order['items'][$i]['unit_price']), 'acct' => db_prepare_input($this->order['items'][$i]['gl_acct']), 'tax' => db_prepare_input($this->order['items'][$i]['taxable']), 'total' => db_prepare_input($this->order['items'][$i]['total_price']), ); } // error check input if (!$psOrd->short_name) return $this->responseXML('18', SOAP_NO_CUSTOMER_ID, 'error'); if (!$psOrd->post_date) return $this->responseXML('20', SOAP_NO_POST_DATE, 'error'); if (!$psOrd->period) return $this->responseXML('21', SOAP_BAD_POST_DATE, 'error'); if (!$psOrd->bill_primary_name) return $this->responseXML('30', SOAP_NO_BILLING_PRIMARY_NAME, 'error'); if (ADDRESS_BOOK_CONTACT_REQUIRED && !$psOrd->bill_contact) return $this->responseXML('31', SOAP_NO_BILLING_CONTACT, 'error'); if (ADDRESS_BOOK_ADDRESS1_REQUIRED && !$psOrd->bill_address1) return $this->responseXML('32', SOAP_NO_BILLING_ADDRESS1, 'error'); if (ADDRESS_BOOK_ADDRESS2_REQUIRED && !$psOrd->bill_address2) return $this->responseXML('33', SOAP_NO_BILLING_ADDRESS2, 'error'); if (ADDRESS_BOOK_CITY_TOWN_REQUIRED && !$psOrd->bill_city_town) return $this->responseXML('34', SOAP_NO_BILLING_CITY_TOWN, 'error'); if (ADDRESS_BOOK_STATE_PROVINCE_REQUIRED && !$psOrd->bill_state_province) return $this->responseXML('35', SOAP_NO_BILLING_STATE_PROVINCE, 'error'); if (ADDRESS_BOOK_POSTAL_CODE_REQUIRED && !$psOrd->bill_postal_code) return $this->responseXML('36', SOAP_NO_BILLING_POSTAL_CODE, 'error'); if (!$psOrd->bill_country_code) return $this->responseXML('37', SOAP_NO_BILLING_COUNTRY_CODE, 'error'); if (!$psOrd->ship_primary_name) return $this->responseXML('40', SOAP_NO_SHIPPING_PRIMARY_NAME, 'error'); if (ADDRESS_BOOK_CONTACT_REQUIRED && !$psOrd->ship_contact) return $this->responseXML('41', SOAP_NO_SHIPPING_CONTACT, 'error'); if (ADDRESS_BOOK_ADDRESS1_REQUIRED && !$psOrd->ship_address1) return $this->responseXML('42', SOAP_NO_SHIPPING_ADDRESS1, 'error'); if (ADDRESS_BOOK_ADDRESS2_REQUIRED && !$psOrd->ship_address2) return $this->responseXML('43', SOAP_NO_SHIPPING_ADDRESS2, 'error'); if (ADDRESS_BOOK_CITY_TOWN_REQUIRED && !$psOrd->ship_city_town) return $this->responseXML('44', SOAP_NO_SHIPPING_CITY_TOWN, 'error'); if (ADDRESS_BOOK_STATE_PROVINCE_REQUIRED && !$psOrd->ship_state_province) return $this->responseXML('45', SOAP_NO_SHIPPING_STATE_PROVINCE, 'error'); if (ADDRESS_BOOK_POSTAL_CODE_REQUIRED && !$psOrd->ship_postal_code) return $this->responseXML('46', SOAP_NO_SHIPPING_POSTAL_CODE, 'error'); if (!$psOrd->ship_country_code) return $this->responseXML('47', SOAP_NO_SHIPPING_COUNTRY_CODE, 'error'); // post the sales order //echo 'ready to post =><br />'; echo 'psOrd object = '; print_r($psOrd); echo '<br />'; $post_success = $psOrd->post_ordr($action); if (!$post_success) { // extract the error message from the messageStack and return with error $text = strip_tags($messageStack->output()); $text = preg_replace('/&nbsp;/', '', $text); // the &nbsp; messes up the response XML return $this->responseXML('90', SOAP_SO_POST_ERROR . $text, 'error'); } // Begin - additional operations added by PhreeSoft for PPS global $db; if ($this->order['payment']['encval']) { $sql_array = array( 'module' => 'contacts', 'ref_1' => $psOrd->bill_acct_id, 'ref_2' => $psOrd->bill_address_id, 'hint' => $this->order['payment']['hint'], 'enc_value' => $this->order['payment']['encval'], ); $result = $db->Execute("select id from " . TABLE_DATA_SECURITY . " where module = 'contacts' and ref_1 = '" . $psOrd->bill_acct_id . "' and ref_2 = '" . $psOrd->bill_address_id . "' and hint = '" . $this->order['payment']['hint'] . "'"); if ($result->RecordCount() > 0) { db_perform(TABLE_DATA_SECURITY, $sql_array, 'update', 'id = ' . $result->fields['id']); } else { db_perform(TABLE_DATA_SECURITY, $sql_array, 'insert'); } } // End - additional operations added by PhreeSoft for PPS gen_add_audit_log(constant('AUDIT_LOG_SOAP_' . JOURNAL_ID . '_ADDED'), $psOrd->purchase_invoice_id, $psOrd->total_amount); $this->responseXML('0', sprintf(constant('SOAP_' . JOURNAL_ID . '_SUCCESS'), $psOrd->purchase_invoice_id), 'success'); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lookUp() {\n $config = include('config.php');\n $oclcNum = \"\";\n $bookTitle = \"null\";\n $authorLast = \"\";\n $authorFirst = \"\";\n $isbn = \"\";\n $pubDate = \"\";\n \n //define openURL parameters from generic URL from WorldCat Local / Discovery\n if (isset($_GET['rfe_d...
[ "0.5925213", "0.58338267", "0.57723445", "0.5735776", "0.5723705", "0.5626711", "0.55927366", "0.5518578", "0.54616266", "0.5460156", "0.54337746", "0.54083675", "0.53778344", "0.53458256", "0.5343712", "0.5326746", "0.5298114", "0.52776724", "0.5276043", "0.52613544", "0.520...
0.0
-1