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
Retrieve relation name from relation class
public function retrieveRelation(RelationEntityInterface $relationEntity): string|false { foreach ($this->getRelations() as $name => $relation) { if ($relation === $relationEntity) { return $name; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function relationName(): string;", "public function getRelationFieldName() {}", "public function getRelationshipName();", "public function getRelation(): string\n {\n return $this->relation;\n }", "public static function getRelationName(): Name\n {\n return new Nam...
[ "0.8022727", "0.77870536", "0.77120626", "0.7447031", "0.7285246", "0.7265965", "0.7161337", "0.71433103", "0.71433103", "0.7131366", "0.70228827", "0.69844544", "0.6982895", "0.69592804", "0.69205254", "0.6908572", "0.69024783", "0.6875385", "0.6821428", "0.6811344", "0.6784...
0.0
-1
Get all relations or a relation if it exists
public function getRelations(?string $relation = null): array|RelationEntityInterface { return $relation ? ($this->relations[$relation] ?? []) : $this->relations; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getWithRelations();", "public function getRelations();", "public function getRelations();", "abstract public static function relations() : ? array;", "public function all($relations = null);", "public function getRelations()\n {\n return $this->discoverRelations();\n }", "p...
[ "0.75283116", "0.72362983", "0.72362983", "0.6938541", "0.6803234", "0.6706036", "0.66925234", "0.6675745", "0.66133076", "0.66133076", "0.6553688", "0.6543287", "0.65279835", "0.6480925", "0.64746624", "0.6459365", "0.6420765", "0.6420765", "0.6392417", "0.63908726", "0.6323...
0.62164515
22
code should be inside a method
public function index() { $events[] = \Calendar::event( 'Event One', //event title false, //full day event? '2016-04-01T0800', //start time (you can also use Carbon instead of DateTime) '2016-04-01T1200', //end time (you can also use Carbon instead of DateTime) 0 //optionally, you can specify an event ID ); //$eloquentEvent = EventModel::first(); //EventModel implements MaddHatter\LaravelFullcalendar\Event $calendar = \Calendar::addEvents($events) //add an array with addEvents ->setOptions([ //set fullcalendar options 'firstDay' => 1 ])->setCallbacks([ //set fullcalendar callback options (will not be JSON encoded) 'viewRender' => 'function() {alert("Callbacks!");}' ]); return view('calendar', compact('calendar')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function helper()\n\t{\n\t\n\t}", "public function method() {\n\t}", "private function method1()\n\t{\n\t}", "private function method2()\n\t{\n\t}", "public function method()\n {\n\n }", "public function method();", "public function method();", "public function method();", "public func...
[ "0.6880597", "0.6729176", "0.6696159", "0.6657372", "0.64753956", "0.64683616", "0.64683616", "0.64683616", "0.64683616", "0.6466616", "0.6382116", "0.63390964", "0.63390964", "0.63390964", "0.63390964", "0.6263623", "0.6263623", "0.61948407", "0.6170373", "0.6158115", "0.610...
0.0
-1
Register the service provider.
public function register() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n $this->registerServices();\n }", "public function register()\n {\n // service 由各个应用在 AppServiceProvider 单独绑定对应实现\n }", "public function register()\n {\n //\n if (env('APP_DEBUG', false) && $this->app->isLocal()) {\n $this->a...
[ "0.71774215", "0.7054453", "0.6968271", "0.69677705", "0.6952019", "0.6931252", "0.6926226", "0.6918423", "0.6899592", "0.6895726", "0.6894278", "0.68906504", "0.68906504", "0.6883112", "0.6872877", "0.6865099", "0.68640506", "0.68627584", "0.68624485", "0.68491566", "0.68236...
0.0
-1
Bootstrap the application events.
public function boot() { // Publish the Configuration File $this->publishConfigurationFile(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function boot()\n {\n\n Event::listen('pages.menuitem.listTypes', function () {\n return [\n 'portfolio-item' => 'depcore.portfolio::lang.portfolioitem.label' ,\n 'all-portfolio-items' => 'depcore.portfolio::lang.portfolioitems.menu_label',\n ];\...
[ "0.7476131", "0.7449455", "0.74397516", "0.7425866", "0.73787534", "0.73327506", "0.7290027", "0.72789234", "0.7272027", "0.72545135", "0.7238835", "0.72026354", "0.7201436", "0.7192646", "0.7188356", "0.7178903", "0.71773785", "0.7174105", "0.7166155", "0.7162653", "0.716265...
0.0
-1
Publishes the Configuration File.
protected function publishConfigurationFile() { // Determine the Local Configuration Path $source = $this->getLocalConfigurationPath(); // Determine the Application Configuration Path $destination = $this->getApplicationConfigPath(); // Publish the Configuration File $this->publishes([$source => $destination], 'config'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function publishConfig()\n {\n $this->publishes([\n $this->basePath('config/flare/config.php') => config_path('flare/config.php'),\n ]);\n }", "private function publishConfig()\n\t{\n\t\t$config = __DIR__ . '/config/workflow.php';\n\n\t\t$this->publishes([$config => confi...
[ "0.82678056", "0.8150707", "0.8066025", "0.80007505", "0.77923054", "0.7743851", "0.75718474", "0.74415666", "0.73615843", "0.72795933", "0.72750515", "0.72675", "0.71052104", "0.7055335", "0.69835", "0.6956444", "0.68562484", "0.681237", "0.6802941", "0.6791647", "0.6775968"...
0.8816268
0
Returns the Path to the Configuration File within this Package.
protected function getLocalConfigurationPath() { return __DIR__ . '/../config/blueprints.php'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getConfigurationPath() {\n return $this->_configuration_path;\n }", "protected function getConfigFile()\n {\n return realpath($this->getBasePath() . \"/config/{$this->package}.php\");\n }", "public function getConfigPath()\n {\n return $this->_configPath;\n }...
[ "0.8400858", "0.81793016", "0.81099343", "0.803688", "0.79678786", "0.7953922", "0.78645843", "0.7838922", "0.7806883", "0.78031385", "0.7788501", "0.7708457", "0.77043235", "0.7653395", "0.7636186", "0.7634657", "0.7554444", "0.7476961", "0.7463891", "0.74172485", "0.7413167...
0.7559755
16
Returns the Path to the Configuration File within the Application.
protected function getApplicationConfigPath() { return config_path('blueprints.php'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getConfigurationPath() {\n return $this->_configuration_path;\n }", "protected function getConfigFilePath()\n {\n return dirname(__DIR__, 2) . '/config.php';\n }", "public function getConfigPath()\n {\n return $this->_configPath;\n }", "protected function g...
[ "0.8230728", "0.81023777", "0.79440224", "0.79373485", "0.79356676", "0.7935045", "0.79186463", "0.79120564", "0.79036665", "0.7811609", "0.7787272", "0.7785714", "0.7761872", "0.77539533", "0.7709969", "0.7706753", "0.7669528", "0.763602", "0.7630849", "0.7622622", "0.759937...
0.79092914
8
Get the services provided by the provider.
public function provides() { return [ // ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final public function getServices()\n {\n if (is_null($this->serviceProviders)) {\n $this->serviceProviders = $this->getServiceProviders();\n }\n\n return $this->serviceProviders;\n }", "protected function getServices()\n {\n return $this->services;\n }", "pro...
[ "0.79039633", "0.7667588", "0.76229626", "0.75573224", "0.7470691", "0.7423859", "0.7423859", "0.7423859", "0.7409516", "0.736475", "0.736475", "0.7363987", "0.7322196", "0.71889", "0.7162814", "0.71509963", "0.7137116", "0.70622355", "0.7047945", "0.70362085", "0.70213807", ...
0.0
-1
Display a listing of the resource.
public function index() { return view('back/showshareitem')->with('shareitems', ShareItem::all()); }
{ "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.7446377", "0.7361922", "0.72984487", "0.7248631", "0.7162871", "0.7148215", "0.7131838", "0.71028054", "0.7102395", "0.70988023", "0.7048243", "0.6993516", "0.6989079", "0.69341344", "0.69001913", "0.6899167", "0.68920904", "0.6887188", "0.68661547", "0.6849159", "0.683002...
0.0
-1
Show the form for creating a new resource.
public function create() { return view('back/createshareitem')->with("categories", ShareCategory::all()); }
{ "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.75936973", "0.75936973", "0.7585464", "0.7576766", "0.7571166", "0.7498768", "0.7434969", "0.7432511", "0.7387868", "0.7351811", "0.7336364", "0.73113805", "0.7293885", "0.72812635", "0.7273037", "0.72410345", "0.7228987", "0.7225174", "0.718589", "0.71786976", "0.7172516"...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $this->validate($request, [ 'title' => 'required', 'user_name' => 'required', 'image' => 'required', 'category_id' => 'required', 'description' => 'required', ]); $image = $request->file('image'); $imagename = time() . $image->getClientOriginalName(); $destinationPath = 'img/share/'; $image->move($destinationPath, $imagename); $images=array(); if($files=$request->file('images')){ foreach($files as $file){ $name=time() . $file->getClientOriginalName(); $file->move($destinationPath, $name); $images[]='img/share/' . $name; } } $shareitem = new ShareItem; $shareitem->title = $request->get('title'); $shareitem->user_name = $request->get('user_name'); $shareitem->img = 'img/share/' . $imagename; $shareitem->show_imgs = implode("|",$images); $shareitem->category_id = $request->get('category_id'); $shareitem->description = $request->get('description'); if ($shareitem->save()) { return redirect('/back/shareitem'); } else { return redirect()->back()->withInput()->withErrors('share item save faild'); } }
{ "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) { return view('back/editshareitem')->with('shareitem', ShareItem::find($id))->with("categories", ShareCategory::all());; }
{ "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.7855416", "0.769519", "0.72748375", "0.724256", "0.7173659", "0.7064689", "0.70549816", "0.6985127", "0.6949479", "0.69474626", "0.694228", "0.6929372", "0.6903047", "0.6899655", "0.6899655", "0.688039", "0.68649715", "0.68618995", "0.68586665", "0.68477386", "0.68366665",...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { $shareitem = ShareItem::find($id); $shareitem->title = $request->get('title'); $shareitem->user_name = $request->get('user_name'); $shareitem->category_id = $request->get('category_id'); $shareitem->description = $request->get('description'); if ($request->hasFile('image')) { $image = $request->file('image'); $imagename =time() . $image->getClientOriginalName(); $destinationPath = 'img/share/'; $image->move($destinationPath, $imagename); $shareitem->img = 'img/share/' . $imagename; } if ($shareitem->save()) { return redirect('/back/shareitem'); } else { return redirect()->back()->withInput()->withErrors('update faild!'); } }
{ "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) { ShareItem::find($id)->delete(); return redirect()->back(); }
{ "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
set up test environment
public function setUp() { $this->mockConnection = $this->getMock('stubDatabaseConnection'); $this->mockConnection->expects($this->any())->method('getDatabase')->will($this->returnValue('mock')); $this->mockQueryBuilder = new TeststubDatabaseQueryBuilder(); $databaseQueryBuilderProvider = $this->getMock('stubDatabaseQueryBuilderProvider', array(), array(), '', false); $databaseQueryBuilderProvider->expects($this->any()) ->method('create') ->will($this->returnValue($this->mockQueryBuilder)); $this->dbFinder = new stubDatabaseFinder($databaseQueryBuilderProvider); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function prepareRealTestEnvironment() {}", "public function setUp()\n {\n $this->initTestEnvironment('htpasswd_crypt');\n }", "protected function setUp(): void\n {\n $this->setUpTheTestEnvironment();\n }", "protected function setUp()\n {\n Kohana::config('databas...
[ "0.79760915", "0.7706559", "0.7585783", "0.74595463", "0.73945946", "0.7376189", "0.7366532", "0.73542905", "0.7276313", "0.7202939", "0.7179787", "0.7161013", "0.71607023", "0.71565884", "0.71412116", "0.71412116", "0.7134437", "0.7116044", "0.7116044", "0.7112601", "0.71085...
0.0
-1
test that trying to find a class that does not have an entity annotation throws an exception
public function byPrimaryKeysNonEntity() { $this->dbFinder->findByPrimaryKeys($this->mockConnection, new stubReflectionClass('MockNoEntityAnnotationEntity'), array()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testEntityClassExist()\n {\n $this->assertInstanceOf(TreeFactory::class, new TreeFactory());\n }", "abstract protected function assertEntityClass();", "public function testValidation()\n {\n $this->driver->loadMetadataForClass(new \\ReflectionClass(InvalidExample::class))...
[ "0.6984434", "0.69189644", "0.64991635", "0.64503825", "0.6426407", "0.62739426", "0.6247852", "0.62355465", "0.61987364", "0.6142745", "0.609511", "0.6081669", "0.60600954", "0.60437053", "0.6042388", "0.5994202", "0.5987078", "0.59817165", "0.5968141", "0.5964627", "0.59369...
0.53594905
95
test that finding data of an object with its primary keys
public function byPrimaryKeys() { $mockResult = $this->getMock('stubDatabaseResult'); $this->mockConnection->expects($this->any())->method('query')->will($this->returnValue($mockResult)); $mockResult->expects($this->exactly(2)) ->method('fetch') ->will($this->onConsecutiveCalls(false, array('id' => 'mock', 'bar' => 'Here is bar.', 'default' => 'And this is default.'))); $this->assertNull($this->dbFinder->findByPrimaryKeys($this->mockConnection, new stubReflectionClass('MockSinglePrimaryKeyEntity'), array('id' => 'mock'))); $singlePrimaryKey = $this->dbFinder->findByPrimaryKeys($this->mockConnection, new stubReflectionClass('MockSinglePrimaryKeyEntity'), array('id' => 'mock')); $this->assertEquals('mock', $singlePrimaryKey->getId()); $this->assertEquals('Here is bar.', $singlePrimaryKey->withAnnotation()); $this->assertEquals('And this is default.', $singlePrimaryKey->withDefaultValue()); $this->assertEquals('foo', $this->mockQueryBuilder->getSelect()->getBaseTableName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testFindByIdIsSuccess()\n {\n $tblGateMock = $this->getMockBuilder(TableGateway::class)\n ->setConstructorArgs(array($this->getDbal()))\n ->setMethodsExcept(['findById', 'setTable'])\n ->getMock();\n $tblGateMock->setTable('Person');\n\n //ex...
[ "0.6809215", "0.67438644", "0.66932243", "0.66594833", "0.663723", "0.64941967", "0.6440742", "0.638353", "0.63748986", "0.6342824", "0.63073933", "0.62981206", "0.62323785", "0.621608", "0.6201697", "0.61924386", "0.61577064", "0.6116611", "0.6113921", "0.6097877", "0.606665...
0.68219626
0
test that finding data of an object with its primary keys
public function byPrimaryKeysWithoutTableAnnotation() { $mockResult = $this->getMock('stubDatabaseResult'); $this->mockConnection->expects($this->any())->method('query')->will($this->returnValue($mockResult)); $mockResult->expects($this->exactly(2)) ->method('fetch') ->will($this->onConsecutiveCalls(false, array('id' => 'mock', 'bar' => 'Here is bar.', 'defaultValue' => 'And this is default.'))); $this->assertNull($this->dbFinder->findByPrimaryKeys($this->mockConnection, new stubReflectionClass('MockNoTableAnnotationEntity'), array('id' => 'mock'))); $entity = $this->dbFinder->findByPrimaryKeys($this->mockConnection, new stubReflectionClass('MockNoTableAnnotationEntity'), array('id' => 'mock')); $this->assertEquals('mock', $entity->getId()); $this->assertEquals('Here is bar.', $entity->withAnnotation()); $this->assertEquals('And this is default.', $entity->getDefaultValue()); $this->assertEquals('MockNoTableAnnotationEntitys', $this->mockQueryBuilder->getSelect()->getBaseTableName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function byPrimaryKeys()\n {\n $mockResult = $this->getMock('stubDatabaseResult');\n $this->mockConnection->expects($this->any())->method('query')->will($this->returnValue($mockResult));\n $mockResult->expects($this->exactly(2))\n ->method('fetch')\n ...
[ "0.6823479", "0.68099314", "0.67452246", "0.66938764", "0.6660132", "0.6637254", "0.64958185", "0.6440537", "0.63842523", "0.6375718", "0.63432455", "0.63085914", "0.6299177", "0.62330407", "0.6217438", "0.6201941", "0.6192961", "0.6159164", "0.61170703", "0.6115617", "0.6098...
0.56617147
67
test that trying to find a class that does not have an entity annotation throws an exception
public function byCriterionNonEntity() { $this->dbFinder->findByCriterion($this->mockConnection, $this->getMock('stubCriterion'), new stubReflectionClass('MockNoEntityAnnotationEntity')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testEntityClassExist()\n {\n $this->assertInstanceOf(TreeFactory::class, new TreeFactory());\n }", "abstract protected function assertEntityClass();", "public function testValidation()\n {\n $this->driver->loadMetadataForClass(new \\ReflectionClass(InvalidExample::class))...
[ "0.69851595", "0.69185287", "0.65015507", "0.64515525", "0.62725055", "0.6247503", "0.6237198", "0.61998886", "0.61451256", "0.6096532", "0.6082327", "0.60641176", "0.6046623", "0.6044867", "0.59945697", "0.59862095", "0.5983751", "0.5967937", "0.596706", "0.5938923", "0.5923...
0.64253527
4
test that finding data of an object with a criterion works as expected
public function byCriterion() { $mockCriterion = $this->getMock('stubCriterion'); $mockCriterion->expects($this->any())->method('toSQL')->will($this->returnValue('example')); $mockResult = $this->getMock('stubDatabaseResult'); $this->mockConnection->expects($this->any())->method('query')->will($this->returnValue($mockResult)); $mockResult->expects($this->exactly(2)) ->method('fetchAll') ->will($this->onConsecutiveCalls(false, array(array('bar' => 'Here is bar.', 'default' => 'And this is default.')))); $finderResult = $this->dbFinder->findByCriterion($this->mockConnection, $mockCriterion, new stubReflectionClass('MockSinglePrimaryKeyEntity')); $this->assertEquals(0, $finderResult->count()); $finderResult = $this->dbFinder->findByCriterion($this->mockConnection, $mockCriterion, new stubReflectionClass('MockSinglePrimaryKeyEntity')); $this->assertEquals(1, $finderResult->count()); $data = $finderResult->current(); $this->assertEquals('Here is bar.', $data->withAnnotation()); $this->assertEquals('And this is default.', $data->withDefaultValue()); $select = $this->mockQueryBuilder->getSelect(); $this->assertEquals('foo', $select->getBaseTableName()); $this->assertEquals('bar ASC', $select->getOrderedBy()); $this->assertTrue($select->hasCriterion()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testFind()\n {\n $this->assertEquals(1, $this->object->find(function ($item) {\n return $item === 2;\n })->count());\n $this->assertEquals(2, $this->object->find(function ($item) {\n return $item % 2;\n })->count());\n }", "public function t...
[ "0.6125974", "0.57594967", "0.5737834", "0.5663683", "0.5638742", "0.5592787", "0.5589237", "0.55706584", "0.5555321", "0.55334795", "0.55194634", "0.5481652", "0.5456586", "0.5441099", "0.5437106", "0.5410632", "0.5400165", "0.539853", "0.5375005", "0.53451425", "0.5343051",...
0.62691027
0
test that finding data of an object with a criterion works as expected
public function byCriterionOverruleOrderBy() { $mockCriterion = $this->getMock('stubCriterion'); $mockCriterion->expects($this->any())->method('toSQL')->will($this->returnValue('example')); $mockResult = $this->getMock('stubDatabaseResult'); $this->mockConnection->expects($this->any())->method('query')->will($this->returnValue($mockResult)); $mockResult->expects($this->once()) ->method('fetchAll') ->will($this->returnValue(array(array('bar' => 'Here is bar.', 'default' => 'And this is default.')))); $finderResult = $this->dbFinder->findByCriterion($this->mockConnection, $mockCriterion, new stubReflectionClass('MockSinglePrimaryKeyEntity'), 'blub DESC'); $this->assertEquals(1, $finderResult->count()); $data = $finderResult->current(); $this->assertEquals('Here is bar.', $data->withAnnotation()); $this->assertEquals('And this is default.', $data->withDefaultValue()); $select = $this->mockQueryBuilder->getSelect(); $this->assertEquals('foo', $select->getBaseTableName()); $this->assertEquals('blub DESC', $select->getOrderedBy()); $this->assertFalse($select->hasLimit()); $this->assertNull($select->getOffset()); $this->assertNull($select->getAmount()); $this->assertTrue($select->hasCriterion()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function byCriterion()\n {\n $mockCriterion = $this->getMock('stubCriterion');\n $mockCriterion->expects($this->any())->method('toSQL')->will($this->returnValue('example'));\n $mockResult = $this->getMock('stubDatabaseResult');\n $this->mockConnection->expects($this->any())->m...
[ "0.6269118", "0.61252964", "0.575876", "0.573781", "0.5663292", "0.5639873", "0.5592383", "0.5588243", "0.55720884", "0.5555656", "0.55322057", "0.5518297", "0.54817885", "0.5456308", "0.5441144", "0.5438106", "0.5408955", "0.5399032", "0.5398775", "0.53735834", "0.5345841", ...
0.0
-1
test that finding data of an object with a criterion works as expected
public function byCriterionOverruleLimitClause() { $mockCriterion = $this->getMock('stubCriterion'); $mockCriterion->expects($this->any())->method('toSQL')->will($this->returnValue('example')); $mockResult = $this->getMock('stubDatabaseResult'); $this->mockConnection->expects($this->any())->method('query')->will($this->returnValue($mockResult)); $mockResult->expects($this->once()) ->method('fetchAll') ->will($this->returnValue(array(array('bar' => 'Here is bar.', 'default' => 'And this is default.')))); $finderResult = $this->dbFinder->findByCriterion($this->mockConnection, $mockCriterion, new stubReflectionClass('MockSinglePrimaryKeyEntity'), null, 50, 10); $this->assertEquals(1, $finderResult->count()); $data = $finderResult->current(); $this->assertEquals('Here is bar.', $data->withAnnotation()); $this->assertEquals('And this is default.', $data->withDefaultValue()); $select = $this->mockQueryBuilder->getSelect(); $this->assertEquals('foo', $select->getBaseTableName()); $this->assertEquals('bar ASC', $select->getOrderedBy()); $this->assertTrue($select->hasLimit()); $this->assertEquals(50, $select->getOffset()); $this->assertEquals(10, $select->getAmount()); $this->assertTrue($select->hasCriterion()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function byCriterion()\n {\n $mockCriterion = $this->getMock('stubCriterion');\n $mockCriterion->expects($this->any())->method('toSQL')->will($this->returnValue('example'));\n $mockResult = $this->getMock('stubDatabaseResult');\n $this->mockConnection->expects($this->any())->m...
[ "0.626939", "0.6125999", "0.5759837", "0.5737003", "0.5663713", "0.56393975", "0.5592357", "0.5587061", "0.55729854", "0.55565304", "0.5532544", "0.5518858", "0.54810244", "0.54578674", "0.5442362", "0.5437673", "0.54090464", "0.5399768", "0.53989625", "0.53737915", "0.534458...
0.5102976
43
test that finding data for all instances of an object works as expected
public function findAll() { $mockResult = $this->getMock('stubDatabaseResult'); $this->mockConnection->expects($this->any())->method('query')->will($this->returnValue($mockResult)); $mockResult->expects($this->exactly(2)) ->method('fetchAll') ->will($this->onConsecutiveCalls(false, array(array('bar' => 'Here is bar.', 'default' => 'And this is default.')))); $finderResult = $this->dbFinder->findAll($this->mockConnection, new stubReflectionClass('MockSinglePrimaryKeyEntity')); $this->assertEquals(0, $finderResult->count()); $finderResult = $this->dbFinder->findAll($this->mockConnection, new stubReflectionClass('MockSinglePrimaryKeyEntity')); $this->assertEquals(1, $finderResult->count()); $data = $finderResult->current(); $this->assertEquals('Here is bar.', $data->withAnnotation()); $this->assertEquals('And this is default.', $data->withDefaultValue()); $select = $this->mockQueryBuilder->getSelect(); $this->assertEquals('foo', $select->getBaseTableName()); $this->assertEquals('bar ASC', $select->getOrderedBy()); $this->assertFalse($select->hasLimit()); $this->assertNull($select->getOffset()); $this->assertNull($select->getAmount()); $this->assertFalse($select->hasCriterion()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testFind()\n {\n $this->assertEquals(1, $this->object->find(function ($item) {\n return $item === 2;\n })->count());\n $this->assertEquals(2, $this->object->find(function ($item) {\n return $item % 2;\n })->count());\n }", "public function t...
[ "0.6500596", "0.6382698", "0.6254118", "0.61995196", "0.6116045", "0.60977817", "0.60735625", "0.60392785", "0.59966874", "0.5939199", "0.59016114", "0.5868411", "0.5861083", "0.5854662", "0.5830841", "0.5803349", "0.57565933", "0.57491475", "0.57268125", "0.5712245", "0.5712...
0.54536504
41
test that finding data for all instances of an object works as expected
public function findAllOverruleOrderBy() { $mockResult = $this->getMock('stubDatabaseResult'); $this->mockConnection->expects($this->any())->method('query')->will($this->returnValue($mockResult)); $mockResult->expects($this->once()) ->method('fetchAll') ->will($this->returnValue(array(array('bar' => 'Here is bar.', 'default' => 'And this is default.')))); $finderResult = $this->dbFinder->findAll($this->mockConnection, new stubReflectionClass('MockSinglePrimaryKeyEntity'), 'blub DESC'); $this->assertEquals(1, $finderResult->count()); $data = $finderResult->current(); $this->assertEquals('Here is bar.', $data->withAnnotation()); $this->assertEquals('And this is default.', $data->withDefaultValue()); $select = $this->mockQueryBuilder->getSelect(); $this->assertEquals('foo', $select->getBaseTableName()); $this->assertEquals('blub DESC', $select->getOrderedBy()); $this->assertFalse($select->hasLimit()); $this->assertNull($select->getOffset()); $this->assertNull($select->getAmount()); $this->assertFalse($select->hasCriterion()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testFind()\n {\n $this->assertEquals(1, $this->object->find(function ($item) {\n return $item === 2;\n })->count());\n $this->assertEquals(2, $this->object->find(function ($item) {\n return $item % 2;\n })->count());\n }", "public function t...
[ "0.65012705", "0.6381913", "0.625526", "0.6200126", "0.6117206", "0.60985893", "0.6073501", "0.603796", "0.5996785", "0.5937547", "0.59029263", "0.58676267", "0.5860701", "0.5854859", "0.5831004", "0.5804406", "0.5757", "0.5749655", "0.5728703", "0.57137245", "0.57110256", ...
0.0
-1
test that finding data for all instances of an object works as expected
public function findAllOverruleLimitClause() { $mockResult = $this->getMock('stubDatabaseResult'); $this->mockConnection->expects($this->any())->method('query')->will($this->returnValue($mockResult)); $mockResult->expects($this->once()) ->method('fetchAll') ->will($this->returnValue(array(array('bar' => 'Here is bar.', 'default' => 'And this is default.')))); $finderResult = $this->dbFinder->findAll($this->mockConnection, new stubReflectionClass('MockSinglePrimaryKeyEntity'), null, 50, 10); $this->assertEquals(1, $finderResult->count()); $data = $finderResult->current(); $this->assertEquals('Here is bar.', $data->withAnnotation()); $this->assertEquals('And this is default.', $data->withDefaultValue()); $select = $this->mockQueryBuilder->getSelect(); $this->assertEquals('foo', $select->getBaseTableName()); $this->assertEquals('bar ASC', $select->getOrderedBy()); $this->assertTrue($select->hasLimit()); $this->assertEquals(50, $select->getOffset()); $this->assertEquals(10, $select->getAmount()); $this->assertFalse($select->hasCriterion()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testFind()\n {\n $this->assertEquals(1, $this->object->find(function ($item) {\n return $item === 2;\n })->count());\n $this->assertEquals(2, $this->object->find(function ($item) {\n return $item % 2;\n })->count());\n }", "public function t...
[ "0.650067", "0.6381611", "0.6254883", "0.61996305", "0.6117527", "0.6097989", "0.6072997", "0.6038859", "0.5997902", "0.59367657", "0.5901609", "0.58685756", "0.58615386", "0.5855224", "0.5829968", "0.5803692", "0.57572615", "0.57503814", "0.57283956", "0.5712582", "0.5711843...
0.0
-1
Get the minimum age for this event.
public function getAgeFrom() { return $this->ageFrom; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMinimumAge()\n {\n return $this->minimumAge;\n }", "public function getMinimumAge()\n {\n return $this->minimumAge;\n }", "public function getMinAge()\n {\n return $this->minAge;\n }", "public function getMinAge()\n {\n return $this->minAge;...
[ "0.8404982", "0.8404982", "0.82016313", "0.82016313", "0.7740125", "0.68456215", "0.68371844", "0.66355467", "0.66262823", "0.660445", "0.6498166", "0.6472624", "0.64619476", "0.64606583", "0.64388615", "0.64190954", "0.6412454", "0.63906807", "0.6382508", "0.6380305", "0.636...
0.65696985
10
Get the calendar from this event.
public function getCalendar() { return $this->calendar; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCalendar()\r\n {\r\n if (!$this->_calendar && $this->getCalendarId()) {\r\n $this->_calendar = Mage::getModel('google/calendar')->load($this->getCalendarId());\r\n }\r\n\r\n return $this->_calendar;\r\n }", "public function getCalendar()\n {\n re...
[ "0.7920089", "0.7573589", "0.73638797", "0.72971344", "0.7145896", "0.7012212", "0.6862772", "0.6771605", "0.6688989", "0.64592737", "0.64512366", "0.64512366", "0.6415997", "0.64020973", "0.6395439", "0.63549966", "0.6231698", "0.6060423", "0.59474295", "0.5864934", "0.58567...
0.80141985
0
Get the location from this event.
public function getLocation() { return $this->location; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEventLocation() {\n\t\treturn ($this->eventLocation);\n\t}", "public function getLocation() {\n return $this->location;\n }", "public function getLocation()\n {\n return $this->location;\n }", "public function getLocation()\n {\n return $this->location;\n ...
[ "0.8567676", "0.8015834", "0.80007327", "0.80007327", "0.80007327", "0.80007327", "0.80007327", "0.80007327", "0.80007327", "0.80007327", "0.80007327", "0.80007327", "0.80007327", "0.80007327", "0.80007327", "0.79756325", "0.79756325", "0.79756325", "0.79756325", "0.79661524", ...
0.78771144
25
Get the organiser from this event.
public function getOrganiser() { return $this->organiser; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOrganisation()\n {\n return $this->organisation;\n }", "public function organizer()\n {\n return $this->belongsTo(User::class, 'organizer_id');\n }", "public function getOrganisation()\n\t{\n\t\treturn $this->_organisation;\n\t}", "public function getOrganization(...
[ "0.6697686", "0.6507971", "0.64969254", "0.648617", "0.648617", "0.648617", "0.6372064", "0.61768335", "0.6144404", "0.6089184", "0.60589164", "0.60294944", "0.5977343", "0.59507185", "0.5903315", "0.5806831", "0.5783075", "0.5752315", "0.57308006", "0.57056224", "0.56900215"...
0.79483306
0
Get the contact info from this event.
public function getContactInfo() { return $this->contactInfo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getContact()\n\t{\n\t\treturn $this->Info['Contact'];\n\t}", "public function getContact()\n {\n return $this->contact;\n }", "public function getContact()\n {\n return $this->contact;\n }", "public function getContact()\n {\n return $this->contact;\n }", "pu...
[ "0.77773935", "0.729121", "0.729121", "0.729121", "0.72665775", "0.7256344", "0.7149975", "0.71452886", "0.6844479", "0.6794244", "0.658297", "0.65391105", "0.6429791", "0.64087987", "0.6387042", "0.630271", "0.62434536", "0.62045443", "0.6178928", "0.6142353", "0.61272514", ...
0.7819706
0
Get the maximum amount of participants.
public function getMaxParticipants() { return $this->maxParticipants; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMaxParticipants()\n {\n return $this->max_participants;\n }", "public function limitPerParticipant()\n {\n if ($this->acceptsGuestEntries()) {\n return;\n }\n\n $limit = $this->settings['limit-per-participant'] ?? 1;\n\n return $limit !== ...
[ "0.83796704", "0.73337865", "0.7174557", "0.71393937", "0.7088084", "0.6965768", "0.6949374", "0.6934905", "0.6926936", "0.6925162", "0.68878186", "0.6872525", "0.67364603", "0.67028195", "0.66730255", "0.665985", "0.66541666", "0.6636262", "0.66084987", "0.6601371", "0.66003...
0.8278022
1
Get the booking period.
public function getBookingPeriod() { return $this->bookingPeriod; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPeriod() {}", "public function getPeriod();", "public function getPeriod()\n {\n return $this->period;\n }", "public function getPeriod()\n {\n return $this->period;\n }", "public function getPeriod()\n {\n return $this->period;\n }", "public func...
[ "0.7230923", "0.71676385", "0.6909265", "0.6909265", "0.6909265", "0.6909265", "0.67613584", "0.65692484", "0.6470812", "0.64168024", "0.63482606", "0.6346187", "0.6337608", "0.6302562", "0.6266849", "0.62030804", "0.6163268", "0.6121682", "0.61178577", "0.6074483", "0.605462...
0.85103947
0
Set the minimum age for this event.
public function setAgeFrom($age) { if (!is_numeric($age)) { throw new UnexpectedValueException('Invalid age: ' . $age); } $this->ageFrom = $age; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setMinAge($age)\n\t {\n\t \t $this->json['params'][$this->account]['minage'] = $age;\n\t \t \n\t \t return $this;\n\t }", "public function setGroupMinAge($value) {\n\t\t$this->_group_min_age = $value;\n\t}", "public function setMinAge($var)\n {\n GPBUtil::checkInt32($var);\n ...
[ "0.7497076", "0.74574995", "0.7310172", "0.6883263", "0.6883263", "0.68508893", "0.66369855", "0.66369855", "0.6004696", "0.5991757", "0.5989631", "0.5979681", "0.5971634", "0.5926428", "0.58863324", "0.58699036", "0.5857535", "0.5851972", "0.5842608", "0.5754469", "0.5746180...
0.62070346
8
Set the calendar data for the event.
public function setCalendar(CultureFeed_Cdb_Data_Calendar $calendar) { $this->calendar = $calendar; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setData($data)\n {\n $this->date=$data;\n }", "function setEvent($year,$month,$day,$id=false,$url=false){\n$eventTime=$this->mkActiveTime(0,0,1,$month,$day,$year);\n\tif (!$id) $id=$this->cssEvent;\n$this->calEvents[$eventTime]=$id;\n$this->calEventsUrl[$eventTime]=$url;\n}", "public func...
[ "0.6326102", "0.62080693", "0.59551716", "0.5905344", "0.58078855", "0.5721358", "0.5721358", "0.57208437", "0.57203865", "0.57196915", "0.5718755", "0.5718755", "0.5718755", "0.5718755", "0.56782216", "0.5675194", "0.5636373", "0.5578467", "0.55449253", "0.55270684", "0.5507...
0.70743966
0
Set the contact info from this event.
public function setContactInfo(CultureFeed_Cdb_Data_ContactInfo $contactInfo) { $this->contactInfo = $contactInfo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setContact($contact)\r\n {\r\n $this->contact= array();\r\n if (is_array($contact)) {\r\n foreach ($contact as $key => $value) \r\n\t\t\t{\r\n $this->contact[$key] = $value;\r\n }\r\n }\r\n }", "public function setContact($contact): ...
[ "0.6492941", "0.6372278", "0.61205775", "0.5877692", "0.58741856", "0.5793341", "0.5775056", "0.57304496", "0.56496054", "0.56458104", "0.56340736", "0.5630197", "0.56172955", "0.55840105", "0.5582631", "0.5556295", "0.5554712", "0.55256623", "0.55256623", "0.55256623", "0.55...
0.6179459
2
Set the location from this event.
public function setLocation(CultureFeed_Cdb_Data_Location $location) { $this->location = $location; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setEventLocation($value)\n {\n return $this->set('EventLocation', $value);\n }", "function setLocation($location);", "protected function setLocation($location) {\r\n // TODO: Don't really know what this is?\r\n $this->location = $this->create($location);\r\n }", "public fu...
[ "0.7046827", "0.68352", "0.66205657", "0.66104794", "0.65986675", "0.65986675", "0.6495043", "0.6319889", "0.61739516", "0.6088395", "0.6070066", "0.59720474", "0.5882476", "0.5882476", "0.5882476", "0.5882476", "0.58578193", "0.5824926", "0.5809232", "0.57715595", "0.5720964...
0.5973129
11
Set the organiser from this event.
public function setOrganiser(CultureFeed_Cdb_Data_Organiser $organiser) { $this->organiser = $organiser; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOrganiser() {\n return $this->organiser;\n }", "protected function setOrganization() {}", "public function set_organizer_key($organizer_key) {\n\t\t$_SESSION['citrix_organizer_key'] = $organizer_key;\n\t\t$this->organizer_key = $organizer_key;\n\t}", "public function organizer()\n {...
[ "0.6622959", "0.61169004", "0.59210384", "0.5665311", "0.5624373", "0.56112605", "0.5436014", "0.5255994", "0.51777697", "0.5140903", "0.5056154", "0.50486976", "0.50321203", "0.5020482", "0.5020482", "0.5020482", "0.5015321", "0.49897176", "0.4970243", "0.49462056", "0.49192...
0.72573936
0
Delete the organiser from this event.
public function deleteOrganiser() { $this->organiser = NULL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function destroy(Organizator $organizator)\n {\n //\n }", "public function remove_organiser($memberid){\n $sql = \"DELETE FROM tournamentOrganisers WHERE tournamentID=$this->id AND organiserID=$memberid\";\n $result = self::$database->query($sql);\n }", "public function delete()\n ...
[ "0.69003993", "0.631365", "0.59371656", "0.5741597", "0.57172453", "0.5633651", "0.55949855", "0.5469599", "0.54365337", "0.5415219", "0.5362119", "0.53501904", "0.53059244", "0.53002864", "0.52841663", "0.5278787", "0.5266372", "0.5265326", "0.5262433", "0.5243839", "0.52348...
0.79746175
0
Set the maximum amount of participants.
public function setMaxParticipants($maxParticipants) { $this->maxParticipants = $maxParticipants; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setMaxParticipants($max_participants)\n {\n $this->max_participants = $max_participants;\n }", "public function setMaxParticipants(int $maxParticipants): self\n {\n $this->options['maxParticipants'] = $maxParticipants;\n return $this;\n }", "public function set_...
[ "0.78886503", "0.77239615", "0.6783981", "0.67523926", "0.6752334", "0.67200416", "0.66341704", "0.66165245", "0.6608612", "0.660743", "0.6554045", "0.65503496", "0.6531691", "0.6506651", "0.648476", "0.6442044", "0.6442044", "0.6341335", "0.6337405", "0.6337405", "0.6337405"...
0.8105075
0
Set the booking period.
public function setBookingPeriod(CultureFeed_Cdb_Data_Calendar_BookingPeriod $bookingPeriod) { $this->bookingPeriod = $bookingPeriod; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setPeriod($_period){\n\t\t$this->period=$_period;\n\t}", "private function _setBookingData()\n {\n // Request the booking data from the tabs api instance\n $booking = \\tabs\\api\\booking\\booking::createBookingFromId(\n $this->getBookingId()\n );\n\n // Loop th...
[ "0.7051499", "0.5833409", "0.5730289", "0.5631127", "0.5631127", "0.5631127", "0.56135935", "0.55542153", "0.5504153", "0.5479121", "0.5470114", "0.5467011", "0.54498273", "0.5427049", "0.54265", "0.5397962", "0.53862077", "0.5379819", "0.5339468", "0.53365767", "0.5327102", ...
0.65940213
1
Appends the current object to the passed DOM tree.
public function appendToDOM(DOMElement $element, $cdbScheme = '3.2') { $dom = $element->ownerDocument; $eventElement = $dom->createElement('event'); if ($this->ageFrom) { $eventElement->appendChild($dom->createElement('agefrom', $this->ageFrom)); } if ($this->availableFrom) { $eventElement->setAttribute('availablefrom', $this->availableFrom); } if ($this->availableTo) { $eventElement->setAttribute('availableto', $this->availableTo); } if ($this->cdbId) { $eventElement->setAttribute('cdbid', $this->cdbId); } if ($this->createdBy) { $eventElement->setAttribute('createdby', $this->createdBy); } if ($this->creationDate) { $eventElement->setAttribute('creationdate', $this->creationDate); } if ($this->externalId) { $eventElement->setAttribute('externalid', $this->externalId); } if (isset($this->isParent)) { $eventElement->setAttribute('isparent', $this->isParent ? 'true' : 'false'); } if (isset($this->lastUpdated)) { $eventElement->setAttribute('lastupdated', $this->lastUpdated); } if (isset($this->lastUpdatedBy)) { $eventElement->setAttribute('lastupdatedby', $this->lastUpdatedBy); } if (isset($this->owner)) { $eventElement->setAttribute('owner', $this->owner); } if (isset($this->pctComplete)) { $eventElement->setAttribute('pctcomplete', $this->pctComplete); } if (isset($this->private)) { $eventElement->setAttribute('private', $this->private ? 'true' : 'false'); } if (isset($this->published)) { $eventElement->setAttribute('published', $this->published ? 'true' : 'false'); } if (isset($this->validator)) { $eventElement->setAttribute('validator', $this->validator); } if (isset($this->wfStatus)) { $eventElement->setAttribute('wfstatus', $this->wfStatus); } if ($this->publisher) { $eventElement->setAttribute('publisher', $this->publisher); } if ($this->calendar) { $this->calendar->appendToDOM($eventElement); } if ($this->categories) { $this->categories->appendToDOM($eventElement); } if ($this->contactInfo) { $this->contactInfo->appendToDOM($eventElement); } if ($this->details) { $this->details->appendToDOM($eventElement); } if (count($this->keywords) > 0) { $keywordsElement = $dom->createElement('keywords'); if (version_compare($cdbScheme, '3.3', '>=')) { foreach ($this->keywords as $keyword) { $keyword->appendToDOM($keywordsElement); } $eventElement->appendChild($keywordsElement); } else { $keywords = array(); foreach ($this->keywords as $keyword) { $keywords[$keyword->getValue()] = $keyword->getValue(); } $keywordsElement->appendChild($dom->createTextNode(implode(';', $keywords))); $eventElement->appendChild($keywordsElement); } } if (isset($this->languages)) { $this->languages->appendToDOM($eventElement); } if ($this->location) { $this->location->appendToDOM($eventElement); } if ($this->organiser) { $this->organiser->appendToDOM($eventElement); } if ($this->maxParticipants) { $eventElement->appendChild($dom->createElement('maxparticipants', $this->maxParticipants)); } if ($this->bookingPeriod) { $this->bookingPeriod->appendToDOM($eventElement); } if (!empty($this->relations)) { $relationsElement = $dom->createElement('eventrelations'); foreach ($this->relations as $relation) { $relationElement = $dom->createElement('relatedproduction'); $relationElement->appendChild($dom->createTextNode($relation->getTitle())); $relationElement->setAttribute('cdbid', $relation->getCdbid()); $externalId = $relation->getExternalId(); if ($externalId) { $relationElement->setAttribute('externalid', $relation->getExternalId()); } $relationsElement->appendChild($relationElement); } $eventElement->appendChild($relationsElement); } $element->appendChild($eventElement); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function append($obj) {\r\n\t\t$obj->pzkParentId = @$this->id;\r\n\t\t$this->children[] = $obj;\r\n\t}", "function append ( $element ) {\n $this->childrenElements[] = $element;\n }", "public function append() {\n $num_of_args = func_num_args();\n if ( $num_of_args == 1 && gettype( fun...
[ "0.66123956", "0.63129944", "0.5977673", "0.5959699", "0.59286904", "0.5761757", "0.5724819", "0.5631971", "0.56247795", "0.5595119", "0.556561", "0.55213046", "0.54681176", "0.5395284", "0.53675395", "0.5355754", "0.5335939", "0.5292196", "0.5278819", "0.5248101", "0.5243194...
0.0
-1
!!!! // TODO Get the information of a user(s) corresponding to the given ID(s)
public function getInfoByIDs($IDs){ if(count($IDs)>20){ throw new MaxIDListException('This request can only support a maximum of 20 entities, '. count($IDs) . ' were given!'); } // foreach($IDs as $id){ // $this->setEndpoint("/lol/summoner/" . self::RESOURCE_SUMMONER_VERSION . "/summoners/{$id}"); // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserById($id) {\n\t\t\n\t}", "public function getUser($id);", "public function getAllUserById($id);", "function paces_get_users_all_details( $user_id ){\n return get_metadata( 'user', $user_id );\n}", "public function getUserInfo($id)\n {\n $qry = \"SELECT users.* FROM `users` WHE...
[ "0.76061076", "0.7561389", "0.74436426", "0.7429781", "0.7367548", "0.73539114", "0.7291457", "0.7131601", "0.71288174", "0.71243906", "0.7091585", "0.7084685", "0.7081399", "0.70579255", "0.70577055", "0.7054409", "0.70436084", "0.703211", "0.7031884", "0.7015767", "0.701238...
0.0
-1
Get the information of a user(s) corresponding to the given Summoner name(s)
public function getInfoByNames($names){ if(count($names)>20){ throw new MaxIDListException('This request can only support a maximum of 20 entities, '. count($names) . ' were given!'); } $summoners = []; foreach($names as $name){ $name = rawurlencode($name); $this->setEndpoint("/lol/summoner/" . self::RESOURCE_SUMMONER_VERSION . "/summoners/by-name/{$name}"); array_push($summoners,(object)$this->makeRequest()); //Turn array to object. Look at DTO for better res! } return $summoners; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUserInfo() {\n\t$page = $this -> get('http://vk.com/al_profile.php') -> body;\n\n\t$pattern = '/\"user_id\":([0-9]*),\"loc\":([\"a-z0-9_-]*),\"back\":\"([\\W ]*|[\\w ]*)\",.*,\"post_hash\":\"([a-z0-9]*)\",.*,\"info_hash\":\"([a-z0-9]*)\"/';\n\tpreg_match($pattern, $page, $matches);\n\tarray_shift($matc...
[ "0.6706619", "0.64005727", "0.6345621", "0.63291687", "0.6287345", "0.62399346", "0.6227805", "0.6218873", "0.6139884", "0.6122469", "0.60727835", "0.60460776", "0.6041386", "0.60404205", "0.6008225", "0.5994547", "0.59903413", "0.5987017", "0.59780294", "0.5966316", "0.59637...
0.0
-1
Get the information of a user(s) corresponding to the given ID(s) which can be an either integer or a name.
public function getInfo($IDs){ $idArray = array(); $namesArray = array(); if(is_array($IDs)){ foreach($IDs as $identity){ if(preg_match('/^\d+$/',$identity)){ //If it's an integer (summoner ID) array_push($idArray, $identity); }else{ array_push($namesArray,$identity); } } }else{ if(preg_match('/^\d+$/',$IDs)){ //Singe summoner ID array_push($idArray, $IDs); }else{ //Singe summoner name array_push($namesArray,$IDs); } } if(count($idArray)>0){ $idArray = $this->getInfoByIDs($idArray); } if(count($namesArray)>0){ $namesArray = $this->getInfoByNames($namesArray); } //var_dump($namesArray); return $namesArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getuserbyID( $id )\n\t{\n\t\t$users = array();\n\n\t\tif( is_array( $id ) )\n\t\t{\n\t\t\t$result = $this->db->query( \" SELECT userid, username, first_name, last_name FROM \" . $this->db_prefix . \"_users WHERE userid IN(\" . implode( \",\", $id ) . \")\" );\n\n\t\t\twhile( $row = $result->fetch()...
[ "0.76047117", "0.75758195", "0.7548854", "0.7490298", "0.7480704", "0.74390286", "0.73446137", "0.733832", "0.73349774", "0.73293066", "0.7328", "0.7324234", "0.73090434", "0.72205716", "0.71900403", "0.7179397", "0.71608984", "0.7152718", "0.71509457", "0.71468246", "0.71319...
0.0
-1
Select Random Question for create random quizz
public function randomQuestion() { return $this->createQueryBuilder('qb') ->orderBy('RAND()') ->setMaxResults($this->maxResult) ->getQuery() ->getResult() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function generateQuestion()\n\t{\n\t\t//get random question type\n\t\t$type = $this->questionTypes[array_rand($this->questionTypes)];\n\n\t\t//get random section\n\t\t$section = $this->getRandomSection();\n\n\t\t//get random function (within the above section)\n\t\t$function = $this->getRandomFunction($sect...
[ "0.71189064", "0.6902919", "0.68481266", "0.6843635", "0.6796101", "0.67782533", "0.6649818", "0.66162694", "0.656714", "0.6566387", "0.65618706", "0.6390598", "0.63462085", "0.62936205", "0.62838244", "0.6251915", "0.62392616", "0.6157968", "0.6123096", "0.6100483", "0.60967...
0.71238166
0
Lazily append the next iterator to the chain
private function lazyAppend() { if (!parent::valid() and $this->iterators->valid()) { $this->append($this->iterators->current()); $this->iterators->next(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function next()\n {\n do {\n $this->iterated->attach($this->current());\n parent::next();\n } while ($this->valid() && (!$this->passes($this->current()) || $this->iterated->contains($this->current())));\n }", "public function addNext($next) {}", "public function...
[ "0.6881747", "0.6595135", "0.6353351", "0.63301194", "0.6285945", "0.6239726", "0.6239441", "0.62301123", "0.61991644", "0.6193487", "0.6192673", "0.61845446", "0.6175125", "0.6175125", "0.6174535", "0.6172818", "0.61664975", "0.61664975", "0.61664975", "0.6149026", "0.613233...
0.66689026
1
Turn this item object into a generic array.
public function transform(Json $json) { return [ // attributes // links 'links' => [ [ 'rel' => 'self', 'href' => url('path/to/resource'), ], ] ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function convertItemArray() {}", "public function toArray(): array\n {\n return (array) $this->items;\n }", "public function toArray(): array {\n return $this->items;\n }", "abstract protected function toArray();", "public function getItemsAsArray()\n {\n $map = function ($item)...
[ "0.8222962", "0.7355696", "0.72963935", "0.7260664", "0.72510386", "0.7125021", "0.7125021", "0.7091092", "0.7072855", "0.70697504", "0.7044394", "0.7040254", "0.7040254", "0.7040254", "0.7040254", "0.7040254", "0.70248485", "0.6975698", "0.6969919", "0.6957207", "0.6947865",...
0.0
-1
Lists all Posts models.
public function actionIndex() { $searchModel = new PostsSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', [ 'posts' => $dataProvider->getModels(), ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function allPosts()\n {\n return Post::all();\n }", "public function index()\n {\n return Posts::all();\n }", "public function index() {\n $this->posts = Post::all();\n }", "public function index()\n {\n $posts = $this->postService->getAll();\n\n return $...
[ "0.7699751", "0.7604968", "0.75467175", "0.7515651", "0.74726605", "0.74726605", "0.7348359", "0.7311991", "0.7240301", "0.72272587", "0.7202374", "0.71859545", "0.7182898", "0.7147028", "0.71326244", "0.7114842", "0.70953864", "0.70888335", "0.70710516", "0.70704514", "0.706...
0.7575858
2
Displays a single Posts model.
public function actionView($id) { $postCommentsModel = new PostComments(); return $this->render('view', [ 'post' => $this->findModel($id), 'postCommentsModel' => $postCommentsModel ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(){\n\t $allPosts = [];\n\t $model = new postsModel;\n\t $allPosts = $model->findAll();\n\n $view = new blogView(compact('allPosts'));\n $view->render();\n\t}", "public function show(Posts $posts)\n {\n //\n }", "public function show(Posts $posts)\n {\n /...
[ "0.8150391", "0.77420413", "0.77420413", "0.7736321", "0.7679842", "0.7665538", "0.7659337", "0.76523393", "0.76206124", "0.76152897", "0.76051635", "0.7599846", "0.7586195", "0.75855076", "0.75855076", "0.75855076", "0.75855076", "0.75855076", "0.75855076", "0.75855076", "0....
0.0
-1
Finds the Posts model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown.
protected function findModel($id) { if (($model = Posts::findOne($id)) !== null) { return $model; } throw new NotFoundHttpException('The requested page does not exist.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function findModel($id)\n {\n if (($model = PostKey::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function find(int $post_id);", "protected function fin...
[ "0.7001217", "0.69570386", "0.6659849", "0.66561747", "0.6654603", "0.66450477", "0.6614273", "0.6589339", "0.6586148", "0.65813583", "0.65043", "0.64518917", "0.64518917", "0.64518917", "0.64518917", "0.64438796", "0.64381087", "0.6405883", "0.6405883", "0.6388475", "0.63728...
0.6583118
9
Determine whether the user can view the article.
public function view(User $user, Article $article = null) { if ($article === null) { return $user->hasPermission('articles.view'); } $standardUser = $article->isPublished(); $elevatedUser = $user->hasPermission('articles.view'); return $standardUser || $elevatedUser; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }", "public function authorize()\n {\n $article = Article::find($this->route('article'));\n return $article && $this->user()->can('update', $article);\n }", "public function authori...
[ "0.78972536", "0.7657808", "0.7646129", "0.75201154", "0.74361575", "0.73623717", "0.7349834", "0.7334045", "0.73335344", "0.7285864", "0.7266527", "0.7171748", "0.71371555", "0.7084933", "0.7047652", "0.70421284", "0.7030047", "0.7006565", "0.7000631", "0.6988967", "0.698896...
0.7354493
6
Determine whether the user can create articles.
public function create(User $user) { return $user->hasPermission('articles.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function canCreatePage() {\n return ($this->isAdmin() || ($this->userType == 'author'));\n }", "public function create(User $user) {\n return $user->hasPermission('articles.create');\n }", "function canCreatePost() {\n return ($this->isAdmin() || ($this->userType == 'author'));\n ...
[ "0.76768714", "0.74520206", "0.7419275", "0.74183756", "0.7293732", "0.7293732", "0.717355", "0.7146582", "0.71388537", "0.7118589", "0.7116951", "0.70942193", "0.70816094", "0.7046658", "0.70405364", "0.7022979", "0.6955304", "0.69058174", "0.68806285", "0.6865679", "0.68114...
0.7395214
4
Determine whether the user can update the article.
public function update(User $user, Article $article) { return $user->hasPermission('articles.update'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n $article = Article::find($this->route('article'));\n return $article && $this->user()->can('update', $article);\n }", "public function authorize()\n {\n if (auth()->user()->can('update')) {\n return true;\n }\n\t\t\n\t\treturn fals...
[ "0.8149051", "0.7787154", "0.76861846", "0.7583511", "0.7497584", "0.7438157", "0.74248713", "0.74098504", "0.7390987", "0.73762274", "0.7354809", "0.73104364", "0.73077697", "0.7235528", "0.71659136", "0.7164687", "0.71121633", "0.70985013", "0.7057136", "0.70555687", "0.705...
0.72113985
14
Determine whether the user can delete the article.
public function delete(User $user, Article $article) { return $user->hasPermission('articles.delete'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function can_delete () {\r\n\r\n return $this->permissions[\"D\"] ? true : false;\r\n\r\n }", "public function delete(): bool\n {\n return $this->isAllowed(self::DELETE);\n }", "function canDelete() {\n return true;\n }", "function CanDelete()\n\t{\treturn ...
[ "0.77066904", "0.7699743", "0.76282305", "0.758512", "0.7546944", "0.7545758", "0.7533051", "0.75133026", "0.7505985", "0.7479245", "0.74758375", "0.74161774", "0.73611665", "0.7315147", "0.72193444", "0.72182953", "0.72098255", "0.71430886", "0.71428394", "0.71412593", "0.71...
0.7110918
21
Determine whether the user can add a comment to the article.
public function createComment(User $user, Article $article) { return $this->view($user, $article); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function canAddComment() {\n return Mage::getStoreConfigFlag(self::XML_PATH_ADD_COMMENT);\n }", "protected function canCreate(){\n return $this->canUserModify() &&\n $this->isQuestionActive() &&\n $this->socialQuestion->SocialPermissions->isUnlockedOrUserCanCha...
[ "0.7270118", "0.7141428", "0.7090252", "0.68701535", "0.6714473", "0.65672123", "0.65202755", "0.65047127", "0.645797", "0.64296985", "0.64261204", "0.63864636", "0.63629925", "0.6330154", "0.62988746", "0.6276669", "0.6266314", "0.62539774", "0.62496924", "0.6237075", "0.623...
0.0
-1
before action is excututed
function __construct(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function before(){}", "protected function beforeAction () {\n\t}", "protected abstract function before();", "protected function beforeAction() {\n\n }", "abstract protected function before();", "protected function _before()\n\t{\n\t\t\n\t}", "public function before_run(){}", "abstract fu...
[ "0.8203585", "0.8156421", "0.7905018", "0.7815645", "0.7810427", "0.7769502", "0.7717171", "0.76538044", "0.7554285", "0.7467489", "0.7463077", "0.7419117", "0.7403275", "0.74016243", "0.7383648", "0.7383648", "0.738146", "0.73084766", "0.72875637", "0.726406", "0.7238115", ...
0.0
-1
Silently check if this is a launch and if so, handle it
function ltiLaunchCheck() { global $CFG, $PDO; if ( ! ltiIsRequest() ) return false; $session_id = ltiSetupSession($PDO); if ( $session_id === false ) return false; // Redirect back to ourselves... $url = curPageURL(); $query = false; if ( isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING']) > 0) { $query = true; $url .= '?' . $_SERVER['QUERY_STRING']; } $location = sessionize($url); session_write_close(); // To avoid any race conditions... if ( headers_sent() ) { echo('<p><a href="'.$url.'">Click to continue</a></p>'); } else { header('Location: '.$location); } exit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isLaunchable() {\n // on the application launch list is confusing.\n return false;\n }", "public function manageNotFoundExecutableAction()\n {\n $responses = $this->triggerEvent(__FUNCTION__ . '.normalAction');\n return !$responses->stopped() && $this->flowEvaluator->attem...
[ "0.62638044", "0.5730684", "0.56841516", "0.5625364", "0.5470447", "0.5267571", "0.52101177", "0.5145513", "0.512913", "0.5071467", "0.50377023", "0.49776882", "0.49682775", "0.49635634", "0.49546757", "0.49508715", "0.49481142", "0.49372575", "0.49289343", "0.49057022", "0.4...
0.45578507
55
Extract info from $_POST applying our business rules and using our naming conventions
function ltiExtractPost() { // Unescape each time we use this stuff - somedy we won't need this... $FIXED = array(); foreach($_POST as $key => $value ) { if (get_magic_quotes_gpc()) $value = stripslashes($value); $FIXED[$key] = $value; } $retval = array(); $retval['key'] = isset($FIXED['oauth_consumer_key']) ? $FIXED['oauth_consumer_key'] : null; $retval['context_id'] = isset($FIXED['context_id']) ? $FIXED['context_id'] : null; $retval['link_id'] = isset($FIXED['resource_link_id']) ? $FIXED['resource_link_id'] : null; $retval['user_id'] = isset($FIXED['user_id']) ? $FIXED['user_id'] : null; if ( $retval['key'] && $retval['context_id'] && $retval['link_id'] && $retval['user_id'] ) { // OK To Continue } else { return false; } $retval['service'] = isset($FIXED['lis_outcome_service_url']) ? $FIXED['lis_outcome_service_url'] : null; $retval['sourcedid'] = isset($FIXED['lis_result_sourcedid']) ? $FIXED['lis_result_sourcedid'] : null; $retval['context_title'] = isset($FIXED['context_title']) ? $FIXED['context_title'] : null; $retval['link_title'] = isset($FIXED['resource_link_title']) ? $FIXED['resource_link_title'] : null; $retval['user_email'] = isset($FIXED['lis_person_contact_email_primary']) ? $FIXED['lis_person_contact_email_primary'] : null; if ( isset($FIXED['lis_person_name_full']) ) { $retval['user_displayname'] = $FIXED['lis_person_name_full']; } else if ( isset($FIXED['lis_person_name_given']) && isset($FIXED['lis_person_name_family']) ) { $retval['user_displayname'] = $FIXED['lis_person_name_given'].' '.$FIXED['lis_person_name_family']; } else if ( isset($FIXED['lis_person_name_given']) ) { $retval['user_displayname'] = $FIXED['lis_person_name_given']; } else if ( isset($FIXED['lis_person_name_family']) ) { $retval['user_displayname'] = $FIXED['lis_person_name_given']; } $retval['role'] = 0; if ( isset($FIXED['roles']) ) { $roles = strtolower($FIXED['roles']); if ( ! ( strpos($roles,'instructor') === false ) ) $retval['role'] = 1; if ( ! ( strpos($roles,'administrator') === false ) ) $retval['role'] = 1; } return $retval; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function readPost(){\n\t\tIF(isset($_POST['eventName'])) { \n\t\t $this->eventName = trim(strip_tags($_POST['eventName']));\n\t\t}\n\t\tIF(isset($_POST['senderName'])) { \n\t\t $this->senderName = trim(strip_tags($_POST['senderName']));\n\t\t}\n\t\tIF(isset($_POST['senderEmail'])) {\n\t\t $this->sende...
[ "0.6516136", "0.6413577", "0.63955134", "0.6355176", "0.63020694", "0.62495565", "0.62340105", "0.61609066", "0.61508507", "0.6115393", "0.602803", "0.5927564", "0.5851881", "0.58501774", "0.5843353", "0.5836976", "0.58360356", "0.58305955", "0.58273757", "0.58180106", "0.579...
0.0
-1
Make sure to include the file in case multiple instances are running on the same server and they have not changed the session secret Also make these change every 30 minutes
function ltiGetCompositeKey($post, $session_secret) { $comp = $session_secret .'::'. $post['key'] .'::'. $post['context_id'] .'::'. $post['link_id'] .'::'. $post['user_id'] .'::'. intval(time() / 1800) . $_SERVER['HTTP_USER_AGENT'] . '::' . __FILE__; return md5($comp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_session_secret_handler () {\n$secret =$this->secure_random(16);\n$session_cookie_params = session_get_cookie_params();\n\nsetcookie('session_secret', $secret, $session_cookie_params['lifetime'], $session_cookie_params['path'], $session_cookie_params['domain'], $session_cookie_params['secure'], ...
[ "0.6764995", "0.6292511", "0.6242697", "0.6198571", "0.6130797", "0.60833585", "0.60627824", "0.6061157", "0.5998924", "0.5990009", "0.59589773", "0.59589773", "0.5910251", "0.58969283", "0.58964455", "0.5888761", "0.58533657", "0.583841", "0.5836149", "0.5802247", "0.5797607...
0.0
-1
Returns as much as we have in all the tables Assume.. $pdo>setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
function ltiLoadAllData($pdo, $p, $profile_table, $post) { $errormode = $pdo->getAttribute(PDO::ATTR_ERRMODE); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = "SELECT k.key_id, k.key_key, k.secret, c.context_id, c.title AS context_title, l.link_id, l.title AS link_title, u.user_id, u.displayname AS user_displayname, u.email AS user_email, u.subscribe AS subscribe, u.user_sha256 AS user_sha256, m.membership_id, m.role, m.role_override"; if ( $profile_table ) { $sql .= ", p.profile_id, p.displayname AS profile_displayname, p.email AS profile_email, p.subscribe AS profile_subscribe"; } if ( $post['service'] ) { $sql .= ", s.service_id, s.service_key AS service"; } if ( $post['sourcedid'] ) { $sql .= ", r.result_id, r.sourcedid, r.grade"; } $sql .="\nFROM {$p}lti_key AS k LEFT JOIN {$p}lti_context AS c ON k.key_id = c.key_id AND c.context_sha256 = :context LEFT JOIN {$p}lti_link AS l ON c.context_id = l.context_id AND l.link_sha256 = :link LEFT JOIN {$p}lti_user AS u ON k.key_id = u.key_id AND u.user_sha256 = :user LEFT JOIN {$p}lti_membership AS m ON u.user_id = m.user_id AND c.context_id = m.context_id"; if ( $profile_table ) { $sql .= " LEFT JOIN {$profile_table} AS p ON u.profile_id = p.profile_id"; } if ( $post['service'] ) { $sql .= " LEFT JOIN {$p}lti_service AS s ON k.key_id = s.key_id AND s.service_sha256 = :service"; } if ( $post['sourcedid'] ) { $sql .= " LEFT JOIN {$p}lti_result AS r ON u.user_id = r.user_id AND l.link_id = r.link_id"; } $sql .= "\nWHERE k.key_sha256 = :key LIMIT 1\n"; // echo($sql); $parms = array( ':key' => lti_sha256($post['key']), ':context' => lti_sha256($post['context_id']), ':link' => lti_sha256($post['link_id']), ':user' => lti_sha256($post['user_id'])); if ( $post['service'] ) { $parms[':service'] = lti_sha256($post['service']); } $row = pdoRowDie($pdo, $sql, $parms); // Restore ERRMODE $pdo->setAttribute(PDO::ATTR_ERRMODE, $errormode); return $row; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_all()\n {\n\n $query = \"SELECT * FROM \".$this->table_name;\n //prepare query\n $stmt = $this->conn->prepare($query);\n\n\n try{\n if( $stmt->execute())\n return $stmt;\n\n } catch(PDOException $exception){\n echo \"Connection...
[ "0.6836648", "0.6475068", "0.64276564", "0.64267415", "0.63989216", "0.63211507", "0.63152176", "0.62161314", "0.61821145", "0.61486685", "0.6146371", "0.6135666", "0.6127071", "0.6110878", "0.60998213", "0.6092394", "0.60887176", "0.6084373", "0.6065775", "0.60466164", "0.60...
0.0
-1
Insert the missing bits and update the new bits... TODO: Contemplate the deep mystery of transactions here
function ltiAdjustAata($pdo, $p, &$row, $post) { $errormode = $pdo->getAttribute(PDO::ATTR_ERRMODE); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $actions = array(); if ( $row['context_id'] === null) { $sql = "INSERT INTO {$p}lti_context ( context_key, context_sha256, title, key_id, created_at, updated_at ) VALUES ( :context_key, :context_sha256, :title, :key_id, NOW(), NOW() )"; pdoQueryDie($pdo, $sql, array( ':context_key' => $post['context_id'], ':context_sha256' => lti_sha256($post['context_id']), ':title' => $post['context_title'], ':key_id' => $row['key_id'])); $row['context_id'] = $pdo->lastInsertId(); $row['context_title'] = $post['context_title']; $actions[] = "=== Inserted context id=".$row['context_id']." ".$row['context_title']; } if ( $row['link_id'] === null && isset($post['link_id']) ) { $sql = "INSERT INTO {$p}lti_link ( link_key, link_sha256, title, context_id, created_at, updated_at ) VALUES ( :link_key, :link_sha256, :title, :context_id, NOW(), NOW() )"; pdoQueryDie($pdo, $sql, array( ':link_key' => $post['link_id'], ':link_sha256' => lti_sha256($post['link_id']), ':title' => $post['link_title'], ':context_id' => $row['context_id'])); $row['link_id'] = $pdo->lastInsertId(); $row['link_title'] = $post['link_title']; $actions[] = "=== Inserted link id=".$row['link_id']." ".$row['link_title']; } $user_displayname = isset($post['user_displayname']) ? $post['user_displayname'] : null; $user_email = isset($post['user_email']) ? $post['user_email'] : null; if ( $row['user_id'] === null && isset($post['user_id']) ) { $sql = "INSERT INTO {$p}lti_user ( user_key, user_sha256, displayname, email, key_id, created_at, updated_at ) VALUES ( :user_key, :user_sha256, :displayname, :email, :key_id, NOW(), NOW() )"; pdoQueryDie($pdo, $sql, array( ':user_key' => $post['user_id'], ':user_sha256' => lti_sha256($post['user_id']), ':displayname' => $user_displayname, ':email' => $user_email, ':key_id' => $row['key_id'])); $row['user_id'] = $pdo->lastInsertId(); $row['user_email'] = $user_email; $row['user_sha256'] = lti_sha256($post['user_id']); $row['user_displayname'] = $user_displayname; $actions[] = "=== Inserted user id=".$row['user_id']." ".$row['user_email']; } if ( $row['membership_id'] === null && $row['context_id'] !== null && $row['user_id'] !== null ) { $sql = "INSERT INTO {$p}lti_membership ( context_id, user_id, role, created_at, updated_at ) VALUES ( :context_id, :user_id, :role, NOW(), NOW() )"; pdoQueryDie($pdo, $sql, array( ':context_id' => $row['context_id'], ':user_id' => $row['user_id'], ':role' => $post['role'])); $row['membership_id'] = $pdo->lastInsertId(); $row['role'] = $post['role']; $actions[] = "=== Inserted membership id=".$row['membership_id']." role=".$row['role']. " user=".$row['user_id']." context=".$row['context_id']; } // We need to handle the case where the service URL changes but we already have a sourcedid $oldserviceid = $row['service_id']; if ( $row['service_id'] === null && $post['service'] && $post['sourcedid'] ) { $sql = "INSERT INTO {$p}lti_service ( service_key, service_sha256, key_id, created_at, updated_at ) VALUES ( :service_key, :service_sha256, :key_id, NOW(), NOW() )"; pdoQueryDie($pdo, $sql, array( ':service_key' => $post['service'], ':service_sha256' => lti_sha256($post['service']), ':key_id' => $row['key_id'])); $row['service_id'] = $pdo->lastInsertId(); $row['service'] = $post['service']; $actions[] = "=== Inserted service id=".$row['service_id']." ".$post['service']; } // If we just created a new service entry but we already had a result entry, update it if ( $oldserviceid === null && $row['result_id'] !== null && $row['service_id'] !== null && $post['service'] && $post['sourcedid'] ) { $sql = "UPDATE {$p}lti_result SET service_id = :service_id WHERE result_id = :result_id"; pdoQueryDie($pdo, $sql, array( ':service_id' => $row['service_id'], ':result_id' => $row['result_id'])); $actions[] = "=== Updated result id=".$row['result_id']." service=".$row['service_id']." ".$post['sourcedid']; } // If we don'have a result but do have a service - link them together if ( $row['result_id'] === null && $row['service_id'] !== null && $post['service'] && $post['sourcedid'] ) { $sql = "INSERT INTO {$p}lti_result ( sourcedid, sourcedid_sha256, service_id, link_id, user_id, created_at, updated_at ) VALUES ( :sourcedid, :sourcedid_sha256, :service_id, :link_id, :user_id, NOW(), NOW() )"; pdoQueryDie($pdo, $sql, array( ':sourcedid' => $post['sourcedid'], ':sourcedid_sha256' => lti_sha256($post['sourcedid']), ':service_id' => $row['service_id'], ':link_id' => $row['link_id'], ':user_id' => $row['user_id'])); $row['result_id'] = $pdo->lastInsertId(); $row['sourcedid'] = $post['sourcedid']; $actions[] = "=== Inserted result id=".$row['result_id']." service=".$row['service_id']." ".$post['sourcedid']; } // If we don'have a result and do not have a service - just store the result (prep for LTI 2.0) if ( $row['result_id'] === null && $row['service_id'] === null && ! $post['service'] && $post['sourcedid'] ) { $sql = "INSERT INTO {$p}lti_result ( sourcedid, sourcedid_sha256, link_id, user_id, created_at, updated_at ) VALUES ( :sourcedid, :sourcedid_sha256, :link_id, :user_id, NOW(), NOW() )"; pdoQueryDie($pdo, $sql, array( ':sourcedid' => $post['sourcedid'], ':sourcedid_sha256' => lti_sha256($post['sourcedid']), ':link_id' => $row['link_id'], ':user_id' => $row['user_id'])); $row['result_id'] = $pdo->lastInsertId(); $actions[] = "=== Inserted LTI 2.0 result id=".$row['result_id']." service=".$row['service_id']." ".$post['sourcedid']; } // Here we handle updates to sourcedid if ( $row['result_id'] != null && $post['sourcedid'] != null && $post['sourcedid'] != $row['sourcedid'] ) { $sql = "UPDATE {$p}lti_result SET sourcedid = :sourcedid, sourcedid_sha256 = :sourcedid_sha256 WHERE result_id = :result_id"; pdoQueryDie($pdo, $sql, array( ':sourcedid' => $post['sourcedid'], ':sourcedid_sha256' => lti_sha256($post['sourcedid']), ':result_id' => $row['result_id'])); $row['sourcedid'] = $post['sourcedid']; $actions[] = "=== Updated sourcedid=".$row['sourcedid']; } // Here we handle updates to context_title, link_title, user_displayname, user_email, or role if ( isset($post['context_title']) && $post['context_title'] != $row['context_title'] ) { $sql = "UPDATE {$p}lti_context SET title = :title WHERE context_id = :context_id"; pdoQueryDie($pdo, $sql, array( ':title' => $post['context_title'], ':context_id' => $row['context_id'])); $row['context_title'] = $post['context_title']; $actions[] = "=== Updated context=".$row['context_id']." title=".$post['context_title']; } if ( isset($post['link_title']) && $post['link_title'] != $row['link_title'] ) { $sql = "UPDATE {$p}lti_link SET title = :title WHERE link_id = :link_id"; pdoQueryDie($pdo, $sql, array( ':title' => $post['link_title'], ':link_id' => $row['link_id'])); $row['link_title'] = $post['link_title']; $actions[] = "=== Updated link=".$row['link_id']." title=".$post['link_title']; } if ( isset($post['user_displayname']) && $post['user_displayname'] != $row['user_displayname'] && strlen($post['user_displayname']) > 0 ) { $sql = "UPDATE {$p}lti_user SET displayname = :displayname WHERE user_id = :user_id"; pdoQueryDie($pdo, $sql, array( ':displayname' => $post['user_displayname'], ':user_id' => $row['user_id'])); $row['user_displayname'] = $post['user_displayname']; $actions[] = "=== Updated user=".$row['user_id']." displayname=".$post['user_displayname']; } if ( isset($post['user_email']) && $post['user_email'] != $row['user_email'] && strlen($post['user_email']) > 0 ) { $sql = "UPDATE {$p}lti_user SET email = :email WHERE user_id = :user_id"; pdoQueryDie($pdo, $sql, array( ':email' => $post['user_email'], ':user_id' => $row['user_id'])); $row['user_email'] = $post['user_email']; $actions[] = "=== Updated user=".$row['user_id']." email=".$post['user_email']; } if ( isset($post['role']) && $post['role'] != $row['role'] ) { $sql = "UPDATE {$p}lti_membership SET role = :role WHERE membership_id = :membership_id"; pdoQueryDie($pdo, $sql, array( ':role' => $post['role'], ':membership_id' => $row['membership_id'])); $row['role'] = $post['role']; $actions[] = "=== Updated membership=".$row['membership_id']." role=".$post['role']; } // Restore ERRMODE $pdo->setAttribute(PDO::ATTR_ERRMODE, $errormode); return $actions; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function forceInsert() {\n\t\t\n\t\t\t$this->_isUpdate = false;\n\t\t\t\n\t\t}", "private function addBits($bitindex, $value){\n\t\t$dcindex = (int)floor($bitindex/31);\n\t\t$dcbit = $bitindex % 31;\n\t\t\n\t\tif($dcindex > count($this->storagedcs)){ Error(\"You're trying to insert bits outside the range covered...
[ "0.53040737", "0.5119726", "0.4988007", "0.49752572", "0.49496818", "0.49425128", "0.493808", "0.4922531", "0.49007097", "0.48925826", "0.4878174", "0.4806692", "0.4795725", "0.4786006", "0.4785005", "0.4784033", "0.47626936", "0.47536066", "0.47078437", "0.47047314", "0.4698...
0.0
-1
Verify the message signature
function lti_verify_key_and_secret($key, $secret) { if ( ! ($key && $secret) ) return array("Missing key or secret", ""); $store = new DbTrivialOAuthDataStore(); $store->add_consumer($key, $secret); $server = new OAuthServer($store); $method = new OAuthSignatureMethod_HMAC_SHA1(); $server->add_signature_method($method); $request = OAuthRequest::from_request(); $basestring = $request->get_signature_base_string(); try { $server->verify_request($request); return true; } catch (Exception $e) { return array($e->getMessage(), $basestring); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validateInboundMessage(){\n\t\t$hashData = $this->timestamp . \"\" . $this->token;\n\t\t$computedSignature = hash_hmac(\"sha256\",$hashData , $this->MGAPIKEY);\n\t\t$providedSignature = $this->signature;\n\t\tif ($computedSignature == $providedSignature){\n\t\t\tif($this->validateSender()){\n\t\t\t...
[ "0.7428773", "0.7361915", "0.73293626", "0.7200297", "0.71124095", "0.7044833", "0.69791484", "0.6973517", "0.697022", "0.69566286", "0.69552964", "0.69521046", "0.6947767", "0.69391763", "0.69255495", "0.69215876", "0.68963456", "0.6896077", "0.6896077", "0.6896077", "0.6891...
0.0
-1
Return NULL if the nonce has not been used Return $nonce if the nonce was previously used
function lookup_nonce($consumer, $token, $nonce, $timestamp) { // Should add some clever logic to keep nonces from // being reused - for no we are really trusting // that the timestamp will save us return NULL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNonce();", "function lookup_nonce($consumer, $token, $nonce, $timestamp) {\n // Should add some clever logic to keep nonces from\n // being reused - for no we are really trusting\n // that the timestamp will save us\n return NULL;\n }", "function get_nonce() {\n ...
[ "0.7324032", "0.7302131", "0.71870667", "0.7122191", "0.7113861", "0.710596", "0.7103019", "0.7027895", "0.7013568", "0.69398165", "0.69090134", "0.6896057", "0.6891277", "0.68064433", "0.66973156", "0.66462255", "0.6476608", "0.64605916", "0.64426684", "0.64368564", "0.64173...
0.7278735
2
protected $repayModel = [ '1' => 'FixRateRepayMode', '2' => 'MonthlyInterestRepayMode' ];
public function __construct(array $project, array $orders) { $this->project = $project; $this->orders = $orders; $this->projectId = $this->project['project_id']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPayModel($model) {\n\t\tswitch ($model) {\n\t\tcase 'WEEKLY':\n\t\t\t$this->payModel = new PayModel('day', 7);\n\t\t\tbreak;\n\t\tcase 'BIWEEKLY':\n\t\t\t$this->payModel = new PayModel('day', 14);\n\t\t\tbreak;\n\t\tcase 'MONTHLY':\n\t\t\t$this->payModel = new PayModel('month', 1);\n\t\t\tbreak;...
[ "0.58674866", "0.5851595", "0.58113724", "0.5746869", "0.57153904", "0.5601847", "0.54841375", "0.54212385", "0.5386307", "0.53749007", "0.5373425", "0.53603274", "0.5318226", "0.5308985", "0.52798337", "0.5214305", "0.5202966", "0.52014875", "0.51986927", "0.517927", "0.5171...
0.0
-1
INSERT INTO TWO TABLES
function insertTwoTables($table1, $data1, $table2, $data2) { $this->db->trans_start(); $this->db->insert($table1, $data1); $this->db->insert($table2, $data2); $this->db->trans_complete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fromOneToTheOther($db1, $table1, $db2, $table2){\n\n\t$firstRecs = dbMassData(\"SELECT * FROM \".$db1.\".\".$table1.\" WHERE Package = 'Local' OR Package IS NULL\");\n\t$secRecs = dbMassData(\"SELECT * FROM \".$db2.\".\".$table2.\" WHERE Package = 'Local' OR Package IS NULL\");\n\t\n\t\n\n\t//print_r($fir...
[ "0.62865627", "0.6264757", "0.6251418", "0.6082616", "0.6032613", "0.6028603", "0.6028603", "0.6028603", "0.6021217", "0.60015815", "0.59932166", "0.5974147", "0.59570485", "0.59310013", "0.5905858", "0.5857635", "0.58183163", "0.58095086", "0.5785111", "0.57785124", "0.57755...
0.7591835
0
Create a new command instance.
public function __construct() { parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }", "pu...
[ "0.8010746", "0.7333379", "0.72606754", "0.7164165", "0.716004", "0.7137585", "0.6748632", "0.67234164", "0.67178184", "0.6697025", "0.6677973", "0.66454077", "0.65622073", "0.65437883", "0.64838654", "0.64696646", "0.64292693", "0.6382209", "0.6378306", "0.63773245", "0.6315...
0.0
-1
Execute the console command.
public function handle() { $class = 'App\\' . studly_case($this->argument('booking-engine')) . '\\' . studly_case($this->argument('booking-engine')); $this->bookingEngine = new $class(); // $this->info($this->argument('booking-engine')); $this->info($this->argument('dlm')); $yesterday = date('Y-m-d', strtotime("-1 days")); $today = date('Y-m-d'); $reservations = $this->bookingEngine->getReservations($yesterday, $today, $hotelId = null, $dlm = true); $this->bookingEngine->saveReservations($reservations); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }", "public function handle()\n {\n //get us the Converter class instance and call the convert() meth...
[ "0.6469962", "0.6463639", "0.64271367", "0.635053", "0.63190264", "0.62747604", "0.6261977", "0.6261908", "0.6235821", "0.62248456", "0.62217945", "0.6214421", "0.6193356", "0.61916095", "0.6183878", "0.6177804", "0.61763877", "0.6172579", "0.61497146", "0.6148907", "0.614841...
0.0
-1
Constructs a new TaxRateForm object.
public function __construct(QueryFactory $query_factory) { $this->queryFactory = $query_factory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createComponentRateForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addText('tarif', 'Tarifní sazba:')\r\n\t\t\t\t->setRequired('Uveďte tarifní hodinovou sazbu.')\r\n\t\t\t\t->setAttribute('class', 'cislo')\r\n\t\t\t\t->addFilter(array('Nette\\Forms\\Controls\\TextBase', 'filterFloat'))\r\n\...
[ "0.675483", "0.60450006", "0.60081", "0.59609365", "0.5952224", "0.5837575", "0.5834054", "0.5782088", "0.5738462", "0.5738112", "0.57292634", "0.57201415", "0.56973237", "0.5658746", "0.5651545", "0.55983025", "0.55938613", "0.5587249", "0.5579244", "0.5572768", "0.5567635",...
0.0
-1
Determines if the tax rate already exists.
public function exists($id, array $element) { return (bool) $this->queryFactory ->get('commerce_tax_rate') ->condition('id', $element['#field_prefix'] . $id) ->execute(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function newTaxTableExists() {\n \n static $alreadyChecked = false;\n static $tableExists = false; // remember result of check if already done (prevents multiple checks per script execution)\n \n if ($alreadyChecked == false) {\n $tableExists = tx_pttools_div...
[ "0.6818214", "0.6493418", "0.63413227", "0.6319636", "0.6013663", "0.5909951", "0.5746791", "0.5736184", "0.5569659", "0.55317444", "0.5499227", "0.54986525", "0.542487", "0.5392176", "0.53241813", "0.53150344", "0.5310918", "0.53097093", "0.5305918", "0.530474", "0.5296228",...
0.5586102
8
Gets the metadata id
public function getId() { return $this->id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIdentifier()\n {\n return $this->getAttribute('metadata.name', null);\n }", "public function id()\n {\n return $this->read($this->metadata['pk']->name);\n }", "function get_id() {\n\t\treturn $this->get_data( 'id' );\n\t}", "function getMetadataId($reviewObjectTyp...
[ "0.7453046", "0.739482", "0.73295367", "0.7139801", "0.7039341", "0.70247954", "0.69432646", "0.69291705", "0.6909349", "0.68890905", "0.68766534", "0.68766534", "0.6870952", "0.68680376", "0.6824485", "0.6821804", "0.681454", "0.6807134", "0.680452", "0.6769718", "0.6741655"...
0.0
-1
Responsable for auto load the model
public function __construct() { parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function load(Model $model);", "public function loadModel() : void\n {\n $model = $this->newModel();\n\n $model->loadModel($this->modelPath);\n $model->printModel();\n\n $this->fm = FunctionMap::loadFunctionMap();\n }", "public function loadModel()\n {\n $da...
[ "0.73569614", "0.7226171", "0.71065754", "0.70976245", "0.6962086", "0.6960654", "0.68762434", "0.68691206", "0.6864177", "0.6863162", "0.6863162", "0.6860825", "0.6851759", "0.6827567", "0.6824793", "0.6824145", "0.68238336", "0.68238336", "0.68238336", "0.6813459", "0.68022...
0.0
-1
Create CRUD operations Takes in the crud.yaml file from the installation directory, and creates the necessary views, data table, and form components to handle CRUD operations for the given database table.
public function create(string $file):array { // Load YAML file try { $vars = Yaml::parseFile($file); } catch (ParseException $e) { throw new ApexException('error', tr("Unable to parse YAML file for CRUD creation. Message: {1}", $e->getMessage())); } // Set variables $this->package = $vars['package'] ?? ''; $this->dbtable = $vars['dbtable'] ?? ''; $this->alias = $vars['alias'] ?? preg_replace("/^" . $this->package . "_/", "", $this->dbtable); $views = $vars['views'] ?? []; $admin_uri = $views['admin'] ?? ''; // Get singular alias $inflector = new EnglishInflector(); $single = $inflector->singularize($this->alias); $this->alias = is_array($single) ? $single[0] : $single; // Get plural alias $plural = $inflector->pluralize($this->alias); $this->alias_plural = is_array($plural) ? $plural[0] : $plural; // Perform checks $this->perform_checks(); // Get columns $this->columns = db::show_columns($this->dbtable, true); if (isset($this->columns['id'])) { unset($this->columns['id']); } // Create form $form = $vars['form'] ?? []; $this->create_form($form); // Create table $table = $vars['table'] ?? []; $this->create_table($table, $admin_uri); // Create admin view if ($admin_uri != '') { $form_exclude = $form['exclude'] ?? []; $this->create_view_admin($admin_uri, $form_exclude); } // Return return array($this->alias, $this->package, $this->created_files); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function crud(){\n DB::table('crud_route_groups')->truncate();\n foreach($this->tables as $table){\n $params = $this->prepareParams($table);\n $this->line('CRUD for '.$table->table_name);\n (new Controller($params))->build();\n (new Router($params))...
[ "0.693118", "0.6528552", "0.64528906", "0.6360113", "0.63291967", "0.63034594", "0.62817436", "0.62744105", "0.61242926", "0.60947925", "0.60270715", "0.60240877", "0.6006936", "0.6003734", "0.59901595", "0.59843534", "0.5981116", "0.59676474", "0.59668183", "0.5964585", "0.5...
0.6060111
10
/8 Table get columns and format lines
private function table_get_columns(int $manage_button = 0, string $manage_uri = '', array $exclude = []) { // Initialize $table_columns = []; $format_lines = []; // Get table columns foreach ($this->columns as $alias => $type) { if (in_array($alias, $exclude)) { continue; } $table_columns[] = " '$alias' => '" . ucwords(str_replace('_', ' ', $alias)) . "'"; // Add format line, if needed if (preg_match("/^decimal/i", $type)) { $format_lines[] = " \$row['$alias'] = fmoney(\$row['$alias']);"; } elseif (preg_match("/^(datetime|timestamp)/i", $type)) { $format_lines[] = " \$row['$alias'] = fdate(\$row['$alias'], true);"; } elseif (preg_match("/^date/i", $type)) { $format_lines[] = " \$row['$alias'] = fdate(\$row['$alias']);"; } elseif (preg_match("/^tinyint/i", $type)) { $format_lines[] = " \$row['$alias'] = \$row['$alias'] == 1 ? 'Yes' : 'No';"; } } // Add manage button, if needed if ($manage_button == 1) { $table_columns[] = " 'manage' => 'Manage'"; $format_lines[] = " \$row['manage'] = \"<center><a:button href=\\\"/" . $manage_uri . "_manage?record_id=\$row[id]\\\" label=\\\"Manage\\\"></center>\";"; } // Return return array($table_columns, $format_lines); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function pp_tbl(array &$arr) {\n\n if (empty($arr) || !self::$pretty_print)\n return;\n\n // Count rows\n $cols = substr_count(explode(\"\\n\", $arr[0])[0], \"|\");\n // And fill an array \n $cmax = array_fill(0, $cols, 0);\n\n // Loop through eac...
[ "0.66024506", "0.65558875", "0.6365138", "0.6280936", "0.62644404", "0.61646676", "0.6162729", "0.6130739", "0.61240196", "0.6088674", "0.60841036", "0.60797447", "0.60592854", "0.6018941", "0.60140514", "0.5992788", "0.59366125", "0.59136957", "0.5899361", "0.58986026", "0.5...
0.0
-1
Create admin main view
public function create_view_admin(string $uri, array $exclude = []) { // Create main view components pkg_component::create('view', $uri, $this->package); pkg_component::create('view', $uri . '_manage', $this->package); // Get .tpl / .php code $code = [ 'tpl/' . $uri . '.tpl' => base64_decode($this->code_templates['view_admin_main_tpl']), 'php/' . $uri . '.php' => base64_decode($this->code_templates['view_admin_main_php']), 'tpl/' . $uri . '_manage.tpl' => base64_decode($this->code_templates['view_admin_manage_tpl']), 'php/' . $uri . '_manage.php' => base64_decode($this->code_templates['view_admin_manage_php']) ]; // Set create php code $php_code = []; foreach ($this->columns as $alias => $type) { if (in_array($alias, $exclude)) { continue; } if (preg_match("/^(date|timestamp)/i", $type)) { continue; } $php_code[] = " '$alias' => app::_post('$alias')"; } // Set merge variables $merge_vars = [ 'package' => $this->package, 'alias' => $this->alias, 'alias_tc' => ucwords($this->alias), 'alias_plural' => $this->alias_plural, 'alias_plural_tc' => ucwords($this->alias_plural), 'dbtable' => $this->dbtable, 'uri' => $uri, 'php_code' => implode(", \n", $php_code) ]; // Replace merge fields foreach ($code as $file => $contents) { foreach ($merge_vars as $key => $value) { $code[$file] = str_replace("~$key~", $value, $code[$file]); } // Save file file_put_contents(SITE_PATH . '/views/' . $file, $code[$file]); } // Get created files $this->created_files = array_merge($this->created_files, components::get_all_files('view', $uri, $this->package)); $this->created_files = array_merge($this->created_files, components::get_all_files('view', $uri . '_manage', $this->package)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function admin_page() {\n echo $this->generateView('main', []);\n }", "public function adminmenu()\n {\n\n $vue = new ViewAdmin(\"Administration\");\n $vue->generer(array());\n }", "public function admin_create()\n {\n return View::make('admin_create');\n }", "pub...
[ "0.79884493", "0.7588061", "0.75297457", "0.74430585", "0.7357532", "0.73213184", "0.7313495", "0.7297489", "0.7277124", "0.7266115", "0.72502863", "0.7223638", "0.7188841", "0.7164646", "0.7141506", "0.71214664", "0.7107813", "0.70967036", "0.7090291", "0.70773095", "0.70753...
0.0
-1
Converter entidade para Array
public function toArray(): array;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toEntityArray()\n {\n $return = [];\n foreach ($this as $row) {\n $return[] = $row;\n }\n return $return;\n }", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "pub...
[ "0.7709663", "0.75394917", "0.75394917", "0.753872", "0.753872", "0.753872", "0.753872", "0.7538566", "0.7538566", "0.7538566", "0.7538566", "0.7538566", "0.7538566", "0.7538566", "0.7538566", "0.7538566", "0.7538566", "0.7491162", "0.7491162", "0.7491162", "0.7491162", "0....
0.0
-1
Converter entidade para Json
public function toJson(): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toJson();", "public function toJson();", "public function toJSON() {\n\n $oServidor = ServidorRepository::getInstanciaByCodigo(\n $this->getMatricula(),\n DBPessoal::getAnoFolha(),\n DBPessoal::getMesFolha()\n );\n\n $aRetorno = array();\n $aRetorno[\"codi...
[ "0.72832257", "0.72832257", "0.69611996", "0.6845698", "0.66761434", "0.6605781", "0.6605781", "0.6605781", "0.6605781", "0.6605781", "0.6605781", "0.6605781", "0.6605781", "0.6515539", "0.6505841", "0.64859813", "0.64859813", "0.64859813", "0.64859813", "0.64859813", "0.6485...
0.67939264
5
Returns the current output of the process (STDOUT).
public function __toString(): string { try { return $this->getOutput(); } catch (Exception $e) { return ''; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function stdout() {\n return $this->stdout;\n }", "function getOutput ()\n {\n $descriptors = [\n 0 => ['pipe', 'w'],\n 1 => ['pipe', 'w'],\n 2 => ['pipe', 'w'],\n ];\n\n // Start the script\n $proc = proc_open($cmd, $descriptors, $...
[ "0.79905134", "0.74117845", "0.7393337", "0.69226605", "0.68348795", "0.6726747", "0.66161287", "0.6560961", "0.65591586", "0.6525336", "0.64619946", "0.6460539", "0.6460539", "0.6460539", "0.6460539", "0.6460539", "0.6460539", "0.6460539", "0.6423926", "0.6373497", "0.634844...
0.0
-1
Run the database Seeds.
public function run() { $children = '[ { "_from":"characters/NedStark", "_to":"characters/RobbStark" }, { "_from":"characters/NedStark", "_to":"characters/SansaStark" }, { "_from":"characters/NedStark", "_to":"characters/AryaStark" }, { "_from":"characters/NedStark", "_to":"characters/BranStark" }, { "_from":"characters/CatelynStark", "_to":"characters/RobbStark" }, { "_from":"characters/CatelynStark", "_to":"characters/SansaStark" }, { "_from":"characters/CatelynStark", "_to":"characters/AryaStark" }, { "_from":"characters/CatelynStark", "_to":"characters/BranStark" }, { "_from":"characters/NedStark", "_to":"characters/JonSnow" }, { "_from":"characters/TywinLannister", "_to":"characters/JaimeLannister" }, { "_from":"characters/TywinLannister", "_to":"characters/CerseiLannister" }, { "_from":"characters/TywinLannister", "_to":"characters/TyrionLannister" }, { "_from":"characters/CerseiLannister", "_to":"characters/JoffreyBaratheon" }, { "_from":"characters/JaimeLannister", "_to":"characters/JoffreyBaratheon" } ]'; $childOf = json_decode($children, JSON_OBJECT_AS_ARRAY); foreach ($childOf as $relation) { Child::insertOrIgnore($relation); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n $this->seedUsers();\n $this->seedAdmins();\n $this->seedMeals();\n\n $this->seedOrder();\n $this->seedOrderlist();\n\n $this->seedReload();\n }", "public function run()\n {\n //base seeds\n $this->call(RoleSeed::class);\...
[ "0.82469493", "0.8173527", "0.81639016", "0.81597686", "0.815316", "0.81495345", "0.81479573", "0.81428665", "0.81083155", "0.81038576", "0.8100934", "0.80979717", "0.80969536", "0.80800205", "0.8072971", "0.8071952", "0.80700403", "0.8065878", "0.8060468", "0.80597067", "0.8...
0.0
-1
this up() migration is autogenerated, please modify it to your needs
public function up(Schema $schema) : void { $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); $this->addSql('CREATE TABLE planet (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(50) NOT NULL, description LONGTEXT NOT NULL, type VARCHAR(50) NOT NULL, diameter INT NOT NULL, image VARCHAR(100) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); $this->addSql('ALTER TABLE activities ADD type VARCHAR(30) DEFAULT NULL, ADD description LONGTEXT DEFAULT NULL'); $this->addSql('ALTER TABLE cabin ADD description LONGTEXT NOT NULL, ADD number_of_people INT DEFAULT NULL, ADD area INT DEFAULT NULL'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function up();", "abstract public function up();", "abstract public function up();", "abstract public function up();", "public function up()\n {\n $this->execute(\"\n ALTER TABLE `tcmn_communication` \n CHANGE `tcmn_pprs_id` `tcmn_pprs_id` SMALLINT(5) UNSIGNE...
[ "0.80062366", "0.79145443", "0.79145443", "0.79145443", "0.7572342", "0.756089", "0.75283176", "0.7498379", "0.7493237", "0.7453656", "0.74463314", "0.7433381", "0.74307704", "0.7427088", "0.741794", "0.73779047", "0.7374933", "0.7370453", "0.73637444", "0.73505706", "0.73290...
0.0
-1
this down() migration is autogenerated, please modify it to your needs
public function down(Schema $schema) : void { $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); $this->addSql('DROP TABLE planet'); $this->addSql('ALTER TABLE activities DROP type, DROP description'); $this->addSql('ALTER TABLE cabin DROP description, DROP number_of_people, DROP area'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function down()\n {\n //add your migration here \n }", "public function down()\n {\n //add your migration here\n }", "public function down()\n\t{\n $this->dropColumn('producto','fecha');\n\n //add column fecha in producto\n $this->addColumn('calculo'...
[ "0.79502094", "0.7863702", "0.7606416", "0.7492738", "0.73199725", "0.7245919", "0.7187675", "0.7153845", "0.71537775", "0.71420383", "0.71353674", "0.71216005", "0.7115856", "0.7105365", "0.70985687", "0.7080349", "0.70783705", "0.7072629", "0.7068311", "0.7065529", "0.70536...
0.0
-1
Display a listing of the resource.
public function index() { $user_exams = Cache::remember('user_exams', 22 * 60, function () { $enroll_courses = User::find(Auth::user()->id)->enrollCourses; $exams = []; foreach ($enroll_courses as $enroll_course) { $exam = Course::find($enroll_course->course_id)->exams; $exams[] = $exam; } return $exams; }); return response()->json($user_exams); // $exams = Exam::all(); // return response()->json($exams); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Display the specified resource.
public function show(Exam $exam) { // }
{ "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(Exam $exam) { // }
{ "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.78557473", "0.76946205", "0.72731614", "0.7241571", "0.71700776", "0.70650244", "0.7052897", "0.698311", "0.69465625", "0.6944826", "0.69399333", "0.69286525", "0.69031185", "0.68969506", "0.68969506", "0.6878258", "0.6862812", "0.6859171", "0.68560475", "0.68436426", "0.6...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, Exam $exam) { // }
{ "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(Exam $exam) { // }
{ "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
Setup before running any test cases
public static function setUpBeforeClass() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "...
[ "0.8299111", "0.8299111", "0.8299111", "0.8299111", "0.8299111", "0.8299111", "0.8299111", "0.8299111", "0.8299111", "0.8299111", "0.8299111", "0.8299111", "0.8299111", "0.8299111", "0.8298778", "0.8298778", "0.8298778", "0.8298778", "0.8298778", "0.8298778", "0.8298778", "...
0.0
-1
Setup before running each test case
public function setUp() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "...
[ "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136321", "0.8136321", "0.8136321", "0.8136321", "0.8136321", "0.8136321", "...
0.0
-1
Clean up after running each test case
public function tearDown() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public fu...
[ "0.7987785", "0.7987785", "0.7987785", "0.7987785", "0.7987785", "0.7987785", "0.7987785", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "...
0.0
-1
Clean up after running all test cases
public static function tearDownAfterClass() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public fu...
[ "0.79781395", "0.79781395", "0.79781395", "0.79781395", "0.79781395", "0.79781395", "0.79781395", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.797683...
0.0
-1
Test case for getTrackingSources Get Webinar Tracking Sources.
public function testGetTrackingSources() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetSources()\n\t{\n\t\t$result = $this->sendRequest(\"GetSources\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "function getSources();", "function getSources ( $params=array() )\n {\n try\n {\n $result = $this->apiCall('get',\"{$this->api['syndication_url']}/reso...
[ "0.6901177", "0.65191364", "0.6426626", "0.63242656", "0.629584", "0.62681913", "0.61723316", "0.60457456", "0.6038336", "0.6020853", "0.5997837", "0.59823614", "0.59634876", "0.59297264", "0.5911417", "0.5820473", "0.5787737", "0.5678517", "0.55984485", "0.5593288", "0.55798...
0.6181071
6
Test case for listPastWebinarFiles List Past Webinar Files.
public function testListPastWebinarFiles() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_test_file_uploads()\n {\n }", "public function testListPastWebinarPollResults()\n {\n }", "public function testGetFilesList()\n {\n $remoteFolder = \"TestData/In\";\n\n $localName = \"Book1.xlsx\";\n $remoteName = \"Book1.xlsx\";\n\n CellsA...
[ "0.58834845", "0.5769307", "0.5767245", "0.57574075", "0.572067", "0.56012434", "0.5557108", "0.5524374", "0.5524374", "0.5524374", "0.54968965", "0.54968965", "0.54968965", "0.54705936", "0.5462373", "0.5406382", "0.5346848", "0.5325001", "0.531251", "0.5304454", "0.5276892"...
0.82050633
0
Test case for listPastWebinarPollResults List Past Webinar Poll Results.
public function testListPastWebinarPollResults() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testListPastWebinarQA()\n {\n }", "public function testPastEvents()\n {\n // otherwise test will fail.\n // Other approach is to use fake data or mock it.\n \n $response = $this->json('GET', '/events/expired');\n \n $response\n ...
[ "0.6463519", "0.5745448", "0.54532343", "0.5325194", "0.52149856", "0.5209032", "0.51816463", "0.51735336", "0.51557595", "0.5139043", "0.51316184", "0.5059295", "0.5046634", "0.5028113", "0.501984", "0.4969596", "0.491994", "0.491994", "0.49058336", "0.48983213", "0.4859388"...
0.79743946
0
Test case for listPastWebinarQA List Q&A of Past Webinar.
public function testListPastWebinarQA() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testListPastWebinarPollResults()\n {\n }", "public function testPastWebinars()\n {\n }", "public function testWebinarPanelists()\n {\n }", "public function testListPastWebinarFiles()\n {\n }", "public function testWebinarPolls()\n {\n }", "public function tes...
[ "0.6955456", "0.59452575", "0.58298326", "0.5821201", "0.5732911", "0.56243193", "0.54987425", "0.54416364", "0.5420459", "0.5414977", "0.54115117", "0.53685975", "0.5187622", "0.5177601", "0.5177601", "0.5174332", "0.51445574", "0.5130628", "0.5130628", "0.51046103", "0.5099...
0.7940479
0
Test case for pastWebinars List Past Webinar Instances.
public function testPastWebinars() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testListPastWebinarQA()\n {\n }", "public function testListPastWebinarPollResults()\n {\n }", "public function testWebinarPanelists()\n {\n }", "public function testWebinarPanelistCreate()\n {\n }", "public function testListPastWebinarFiles()\n {\n }", "publi...
[ "0.75248724", "0.71009386", "0.70813674", "0.66979647", "0.6605723", "0.63274664", "0.6326167", "0.620112", "0.6040194", "0.5924122", "0.5862991", "0.58378124", "0.57749337", "0.57353455", "0.5725397", "0.55372953", "0.5521609", "0.5470786", "0.541347", "0.53778094", "0.53484...
0.66735214
4
Test case for webinar Get a Webinar.
public function testWebinar() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPollGet()\n {\n }", "public function testWebinarRegistrantGet()\n {\n }", "function citrixonline_get_webinar($webinarKey) \n {\n\t\tif(!$this->organizer_key or !$this->access_token)\n\t\t\treturn 0;\n\t\t\t\n\t\t$return_array = array();\n\n\t\t$reponse = json_decode($t...
[ "0.7406451", "0.72042817", "0.6972393", "0.68113136", "0.66887724", "0.66683817", "0.65163314", "0.64829504", "0.6445188", "0.63958526", "0.63770664", "0.63015765", "0.6289565", "0.62525797", "0.62279373", "0.60562813", "0.59522325", "0.586234", "0.5843812", "0.5733904", "0.5...
0.7168888
2
Test case for webinarAbsentees Get Webinar Absentees.
public function testWebinarAbsentees() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testListPastWebinarPollResults()\n {\n }", "public function testListPastWebinarQA()\n {\n }", "public function testListEnrollmentRequests()\n {\n }", "public function testGetEventsIdSchedulesOut()\n {\n $eventId = '1';\n\n $result = $this->visit('events/' . $eventId ....
[ "0.6012117", "0.5984477", "0.5918694", "0.5873598", "0.58436704", "0.58301497", "0.58196026", "0.5788358", "0.5774703", "0.57724416", "0.5754003", "0.57515645", "0.570997", "0.5703932", "0.5624342", "0.5612756", "0.560048", "0.5572901", "0.5554806", "0.55531824", "0.5505148",...
0.7858616
0