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 |
|---|---|---|---|---|---|---|
Valida os dados do arquivo | public function validarDados(IExportacaoCenso $oExportacaoCenso) {
$lTodosDadosValidos = true;
$oDadosEscola = $oExportacaoCenso->getDadosProcessadosEscola();
$sMensagem = "";
/**
* Início da validação dos campos obrigatórios
*/
if( trim( $oDadosEscola->registro00->codigo_e... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function validarArquivo(){\n\n if (empty($this->aRegistrosRetencao)) {\n throw new Exception( _M( self::MENSAGENS . 'erro_validar_arquivo') );\n }\n\n /**\n * Verificamos os registros e caso ocorra inconsistencia populamos o array de Registros inconsistentes\n */\n foreach ($this->a... | [
"0.6762713",
"0.6621063",
"0.6404361",
"0.61944443",
"0.6169977",
"0.6148941",
"0.61008704",
"0.60850894",
"0.5992615",
"0.5992615",
"0.59621143",
"0.58643585",
"0.58063287",
"0.57949644",
"0.5784715",
"0.57690436",
"0.5756957",
"0.5751859",
"0.57293427",
"0.5688629",
"0.5682... | 0.61623245 | 5 |
Realizada a validacao dos dados da InfraEstrutura da escola | protected function validarDadosInfraEstrutura(IExportacaoCenso $oExportacaoCenso) {
$lTodosDadosValidos = true;
$oDadosEscola = $oExportacaoCenso->getDadosProcessadosEscola();
$aDadosTurma = $oExportacaoCenso->getDadosProcessadosTurma();
$aEquipamentosValidacao = array(
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function evt__validar_datos()\r\n\t{}",
"public function validateDataInvoice(): void\n {\n $this->validarDatos($this->datos, $this->getRules('fe'));\n\n $this->validarDatosArray($this->datos->arrayOtrosTributos, 'tributos');\n\n /** @phpstan-ignore-next-line */\n if (property_exis... | [
"0.70007986",
"0.6986544",
"0.6949182",
"0.69255984",
"0.6897925",
"0.68956846",
"0.68956846",
"0.68162394",
"0.6747183",
"0.67454726",
"0.66702",
"0.66171324",
"0.64890045",
"0.6477106",
"0.64625376",
"0.64479244",
"0.64308196",
"0.63936",
"0.6371499",
"0.63226116",
"0.63126... | 0.71513873 | 0 |
Atualiza os dados da Estrutura da escola | public function atualizarDadosEstrutura(DBLayoutLinha $oLinha, $oDadosEscola) {
$oDaoEscola = db_utils::getDao('escola');
$oDaoEscolaEstrutura = db_utils::getDao('escolaestrutura');
if ($oLinha->educacao_indigena != ""
&& $oLinha->educacao_indigena != trim($oDadosEscola->ed18_i_educindige... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function envios_datos()\n\t{\n\n\t\tparent::objeto();\n\n\t\t$this->tabla=\"envios\";\n\t\t$this->campoClave=\"IdEnvio\";\n\t\t$this->id=null;\n\t\t\n\t\t\n$v=new Variable(2,$this->tabla,\"IdEnvio\",1);\n\t\t\t\n$v->clave=true;\n\t\t\t\n\t\t\t\n$v->autonumerica=true;\n\t\t\t\n$this->agregarVariable2($v);\n$v=new V... | [
"0.68908185",
"0.6624296",
"0.65803236",
"0.6539708",
"0.6483837",
"0.6390325",
"0.63697505",
"0.63639045",
"0.63455856",
"0.6331048",
"0.6306228",
"0.6294902",
"0.62913674",
"0.626887",
"0.62684584",
"0.6244881",
"0.6234761",
"0.6217092",
"0.6193883",
"0.61607015",
"0.614462... | 0.61303544 | 23 |
Validamos campos que possuem input text e necessitam informar determinada quantidade, se estes sao validos | public function validarEquipamentosGeral (IExportacaoCenso $oExportacaoCenso, $iSequencial, $sEquipamento) {
$sMensagem = "";
switch ($iSequencial) {
case 3000002:
$sMensagem = "Dados de Infra Estrutura da escola -> Campo Quantidade de Computadores: ";
break;
case 3000003:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function validate()\n {\n if ($this->amount <= 0) {\n $this->errors[0] = 'Wpisz poprawną kwotę!';\n }\n \n if (!isset($this->payment)) {\n $this->errors[1] = 'Wybierz sposób płatności!';\n }\n \n if (!isset($this->category)) {\n ... | [
"0.6576863",
"0.6508983",
"0.65006053",
"0.637773",
"0.63258946",
"0.63067025",
"0.6271203",
"0.624336",
"0.62144107",
"0.61223096",
"0.6069423",
"0.60493195",
"0.60072404",
"0.6002623",
"0.59875906",
"0.5986854",
"0.59738904",
"0.5948958",
"0.5946237",
"0.5921209",
"0.590991... | 0.6053715 | 11 |
gives the price in the current currency format | public function getCurrentCurrencyPriceOfSellerProduct()
{
$sp_id = $this->sp_id;
$user_helper = new UserHelper;
$to_curr_id = $user_helper-> getCurrentUserChoiceCurrencyId();
$price = $this->getPriceOfSellerProduct($sp_id);
$from_curr_id = $this->getCurrentPriceObjectOfSelle... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getPrice()\n {\n return '£' . number_format($this->price, 2);\n }",
"public function formatedPrice()\n {\n // if I format total amount of cart, use cart->total_price\n $amount = $this->price ? $this->price : $this->total_price;\n $fmt_price = new NumberFormat... | [
"0.8028956",
"0.7970334",
"0.78834796",
"0.7825125",
"0.7715409",
"0.7715409",
"0.76525545",
"0.76525545",
"0.7649477",
"0.76446414",
"0.7634305",
"0.7575635",
"0.75107884",
"0.75107884",
"0.7482765",
"0.7474756",
"0.74707025",
"0.74187136",
"0.73752934",
"0.7330425",
"0.7310... | 0.7075038 | 40 |
SellerProduct belongs to Seller. | public function seller()
{
// belongsTo(RelatedModel, foreignKey = seller_id, keyOnRelatedModel = id)
return $this->belongsTo('App\Seller','seller_id','seller_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function productSellers(){\n return $this->hasMany(\"App\\Product_Seller\", \"id_seller\");\n }",
"public function seller()\n {\n \t// belongsTo(RelatedModel, foreignKey = from_seller_id, keyOnRelatedModel = seller_id)\n \treturn $this->belongsTo('App\\Seller','from_seller_id','seller_i... | [
"0.76885915",
"0.70231384",
"0.6939045",
"0.68660647",
"0.68286306",
"0.6785571",
"0.67297745",
"0.6599494",
"0.65921324",
"0.65291524",
"0.648267",
"0.64638203",
"0.6338788",
"0.61888975",
"0.6186552",
"0.6159727",
"0.61529756",
"0.6141431",
"0.605049",
"0.60227716",
"0.5946... | 0.698092 | 2 |
SellerProduct belongs to Product. | public function product()
{
// belongsTo(RelatedModel, foreignKey = p_id, keyOnRelatedModel = id)
return $this->belongsTo('App\Product','p_id','p_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function productSellers(){\n return $this->hasMany(\"App\\Product_Seller\", \"id_seller\");\n }",
"public function product()\n\t{\n\t\treturn $this->belongsTo(StoreProduct::class);\n\t}",
"public function getProductSeller()\n {\n $product = $this->coreRegistry->registry('product');\n... | [
"0.7453941",
"0.6631913",
"0.6611017",
"0.6529833",
"0.65122765",
"0.6504716",
"0.64855886",
"0.6444062",
"0.64420587",
"0.6398855",
"0.639708",
"0.6349959",
"0.6334471",
"0.6326802",
"0.63217384",
"0.6319928",
"0.6315557",
"0.63107675",
"0.6293553",
"0.6270387",
"0.62570566"... | 0.61258805 | 48 |
SellerProduct has many Offers. | public function offers()
{
// hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)
return $this->hasMany('App\Offer','sp_id','sp_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getProductInOffers()\n {\n return $this->hasMany(ProductInOffer::className(), ['id_offer' => 'id_offer']);\n }",
"public function productSellers(){\n return $this->hasMany(\"App\\Product_Seller\", \"id_seller\");\n }",
"public function offers()\n {\n return $thi... | [
"0.7251613",
"0.7072507",
"0.70542306",
"0.6957337",
"0.687448",
"0.67916447",
"0.6669564",
"0.6645745",
"0.6535311",
"0.6290579",
"0.625721",
"0.62374294",
"0.62346464",
"0.6223082",
"0.6183931",
"0.610311",
"0.60545284",
"0.6029322",
"0.59926206",
"0.59341013",
"0.5902343",... | 0.6941981 | 4 |
SellerProduct has many SellerProductRelations. | public function packageProductRelations()
{
// hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)
return $this->hasMany('App\SellerProductRelation','sp_id','sp_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function productSellers(){\n return $this->hasMany(\"App\\Product_Seller\", \"id_seller\");\n }",
"public function products()\n {\n return $this->hasMany('App\\Core\\Catalog\\Entities\\Product', 'company_id', 'id');\n }",
"public function products()\n {\n // hasMany(Rela... | [
"0.78812474",
"0.65362597",
"0.65347147",
"0.63908565",
"0.6358779",
"0.62923664",
"0.62530893",
"0.6236368",
"0.6223156",
"0.6222789",
"0.6207354",
"0.61728483",
"0.616842",
"0.616842",
"0.6166494",
"0.6166494",
"0.6166494",
"0.6166494",
"0.6166494",
"0.6166494",
"0.6166494"... | 0.7408215 | 1 |
SellerProduct has many TransistionHistories. | public function transistionHistories()
{
// hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)
return $this->hasMany('App\TransistionHistory','sp_id','sp_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function transistionHistories()\n {\n // hasMany(RelatedModel, foreignKeyOnRelatedModel = spsd_id, localKey = spsd_id)\n return $this->hasMany('App\\TransistionHistory','spsd_id','spsd_id');\n }",
"public function sellerStockHistories()\n {\n // hasMany(RelatedModel, foreignK... | [
"0.6671731",
"0.666287",
"0.6306795",
"0.56660235",
"0.5663323",
"0.55213034",
"0.55032563",
"0.54803926",
"0.546136",
"0.5458228",
"0.54511297",
"0.5331444",
"0.5260983",
"0.52530915",
"0.521661",
"0.51714534",
"0.51688176",
"0.5140393",
"0.5137394",
"0.51203716",
"0.5119787... | 0.67831755 | 0 |
SellerProduct has many ProductClicks. | public function productClicks()
{
// hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)
return $this->hasMany('App\ProductClick','sp_id','sp_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function productSellers(){\n return $this->hasMany(\"App\\Product_Seller\", \"id_seller\");\n }",
"public function AuctionProduct()\n {\n return $this->hasMany('App\\AuctionProduct');\n }",
"public function eventNotifySeller() {\r\n /**\r\n * Date calculation, Cu... | [
"0.68106705",
"0.60711646",
"0.6036811",
"0.59526765",
"0.5870119",
"0.58399224",
"0.58379906",
"0.58329725",
"0.582531",
"0.58238775",
"0.5787094",
"0.57846665",
"0.57792914",
"0.57792914",
"0.57792914",
"0.57792914",
"0.57792914",
"0.57792914",
"0.57792914",
"0.5774103",
"0... | 0.7396898 | 0 |
SellerProduct has many Feedbacks. | public function feedbacks()
{
// hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)
return $this->hasMany('App\Feedback','sp_id','sp_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function productSellers(){\n return $this->hasMany(\"App\\Product_Seller\", \"id_seller\");\n }",
"public function feedback()\n {\n return $this->hasMany('Feedback', 'department_id');\n }",
"public function feedback()\n {\n return $this->hasOne('App\\Models\\User\\Feedba... | [
"0.652182",
"0.64511317",
"0.6133539",
"0.60101277",
"0.58059",
"0.5803118",
"0.5752752",
"0.57003075",
"0.5639227",
"0.56248295",
"0.5585644",
"0.5577789",
"0.5566114",
"0.5561023",
"0.55426985",
"0.55254346",
"0.55254346",
"0.55254346",
"0.55254346",
"0.55254346",
"0.552543... | 0.66585064 | 0 |
SellerProduct has many ProductRatings. | public function productRatings()
{
// hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)
return $this->hasMany('App\ProductRating','sp_id','sp_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function ratings()\n {\n return $this->hasMany('App\\Models\\Rating');\n }",
"public function productSellers(){\n return $this->hasMany(\"App\\Product_Seller\", \"id_seller\");\n }",
"public function ratings()\n {\n return $this->hasMany(\\App\\Rating::class);\n }",
... | [
"0.6855963",
"0.6807352",
"0.6797642",
"0.66505176",
"0.6642394",
"0.6510678",
"0.6349875",
"0.63223785",
"0.6298391",
"0.62797666",
"0.6196126",
"0.6132254",
"0.6077034",
"0.6066809",
"0.5938337",
"0.5929765",
"0.5868831",
"0.5866199",
"0.5850947",
"0.5834548",
"0.5830094",
... | 0.77826184 | 0 |
SellerProduct has many ShoppingCarts. | public function shoppingCarts()
{
// hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)
return $this->hasMany('App\ShoppingCart','sp_id','sp_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function productSellers(){\n return $this->hasMany(\"App\\Product_Seller\", \"id_seller\");\n }",
"public function shoppingCarts()\n {\n \t// hasMany(RelatedModel, foreignKeyOnRelatedModel = spsd_id, localKey = spsd_id)\n \treturn $this->hasMany('App\\ShoppingCart','spsd_id','spsd_id');... | [
"0.7310116",
"0.71702695",
"0.7033012",
"0.67832637",
"0.66965026",
"0.66714704",
"0.66714704",
"0.66714704",
"0.6560388",
"0.6287474",
"0.6208373",
"0.6145253",
"0.6129753",
"0.611397",
"0.6104755",
"0.6100701",
"0.60864115",
"0.60408723",
"0.5997292",
"0.5988197",
"0.598154... | 0.7159343 | 2 |
SellerProduct has one SellerStock. | public function sellerStock()
{
// hasOne(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)
return $this->hasOne('App\SellerStock','sp_id','sp_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function sellerStock()\n {\n \t// belongsTo(RelatedModel, foreignKey = ss_id, keyOnRelatedModel = ss_id)\n \treturn $this->belongsTo('App\\SellerStock','ss_id','ss_id');\n }",
"public function productSellers(){\n return $this->hasMany(\"App\\Product_Seller\", \"id_seller\");\n }",
... | [
"0.6971997",
"0.64563453",
"0.6200724",
"0.61325955",
"0.60344845",
"0.59545195",
"0.5884657",
"0.5825312",
"0.5748152",
"0.5709969",
"0.5658973",
"0.5623124",
"0.5605115",
"0.5605115",
"0.55866635",
"0.557678",
"0.5571025",
"0.55648214",
"0.5552669",
"0.55447763",
"0.5543477... | 0.7259326 | 0 |
SellerProduct has many ProductOptions. | public function productOptions()
{
// hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)
return $this->hasMany('App\ProductOption','sp_id','sp_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function productSellers(){\n return $this->hasMany(\"App\\Product_Seller\", \"id_seller\");\n }",
"public function options()\n {\n return $this->belongsToMany(Option::class, 'product_options')\n ->using(ProductOption::class)\n ->as('settings')\n ->withP... | [
"0.6597222",
"0.6564094",
"0.6448716",
"0.6381053",
"0.6249673",
"0.6218079",
"0.62179035",
"0.621208",
"0.6119649",
"0.6114709",
"0.6107237",
"0.6070263",
"0.60501415",
"0.6047612",
"0.59973085",
"0.59621394",
"0.5937758",
"0.5925592",
"0.59147894",
"0.5887193",
"0.58756983"... | 0.76578766 | 0 |
SellerProduct has many SPPaymentRelations. | public function SPPaymentRelations()
{
// hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)
return $this->hasMany('App\SPPaymentRelation','sp_id','sp_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function packageProductRelations()\n {\n // hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)\n return $this->hasMany('App\\SellerProductRelation','sp_id','sp_id');\n }",
"public function productSellers(){\n return $this->hasMany(\"App\\Product_Seller\", ... | [
"0.7409085",
"0.67664045",
"0.6140433",
"0.60329753",
"0.60304254",
"0.6016417",
"0.59827995",
"0.59753376",
"0.5960799",
"0.59569466",
"0.5918691",
"0.59050024",
"0.59011835",
"0.58920586",
"0.58920586",
"0.5879966",
"0.5842273",
"0.58295786",
"0.58295786",
"0.58295786",
"0.... | 0.740858 | 1 |
SellerProduct has many SPPhotos. | public function SPPhotos()
{
// hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)
return $this->hasMany('App\SPPhoto','sp_id','sp_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function photos() {\n return $this->hasMany('App\\Models\\ProductPhoto');\n }",
"public function images()\n {\n return $this->hasMany(ProductImageProxy::modelClass(), 'seller_product_id');\n }",
"public function productImage(){\n\t\treturn $this->hasmany('App\\ProductImages','prod... | [
"0.730241",
"0.706066",
"0.6793256",
"0.67062074",
"0.66775936",
"0.6626541",
"0.6593004",
"0.6584435",
"0.65677917",
"0.652716",
"0.6386932",
"0.63826764",
"0.6351952",
"0.62405086",
"0.62019926",
"0.6166767",
"0.6162603",
"0.61545855",
"0.6108691",
"0.60884184",
"0.60884184... | 0.7471601 | 0 |
SellerProduct has many PredefinedWholesaleQuantities. | public function predefinedWholesaleQuantities()
{
// hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)
return $this->hasMany('App\PredefinedWholesaleQuantity','sp_id','sp_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function customWholesaleQuantities()\n {\n // hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)\n return $this->hasMany('App\\CustomWholesaleQuantity','sp_id','sp_id');\n }",
"public function products()\n {\n // hasMany(RelatedModel, foreignKeyOnRelate... | [
"0.74914753",
"0.60146946",
"0.59918106",
"0.5985526",
"0.5865959",
"0.58240443",
"0.58101684",
"0.56670266",
"0.56603193",
"0.563147",
"0.5549117",
"0.5542257",
"0.5506098",
"0.5484657",
"0.5475101",
"0.5472452",
"0.5469672",
"0.5467794",
"0.5436091",
"0.543268",
"0.54276484... | 0.7903302 | 0 |
SellerProduct has many CustomWholesaleQuantities. | public function customWholesaleQuantities()
{
// hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)
return $this->hasMany('App\CustomWholesaleQuantity','sp_id','sp_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function predefinedWholesaleQuantities()\n {\n // hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)\n return $this->hasMany('App\\PredefinedWholesaleQuantity','sp_id','sp_id');\n }",
"public function products()\n {\n // hasMany(RelatedModel, foreignKey... | [
"0.7311532",
"0.62186354",
"0.61778116",
"0.6143212",
"0.59896994",
"0.5965876",
"0.5964255",
"0.59542835",
"0.5941254",
"0.57773113",
"0.57771957",
"0.5777045",
"0.57541513",
"0.5752012",
"0.5707699",
"0.56765556",
"0.56744343",
"0.5649152",
"0.56448627",
"0.56391007",
"0.55... | 0.78493327 | 0 |
SellerProduct has many Items. | public function items()
{
// hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)
return $this->hasMany('App\Item','sp_id','sp_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function productSellers(){\n return $this->hasMany(\"App\\Product_Seller\", \"id_seller\");\n }",
"public function products() {\n \treturn $this->belongsToMany(Product::class, 'items_product', 'item_id', 'product_id');\n }",
"public function packageProductRelations()\n {\n // h... | [
"0.74733365",
"0.66368073",
"0.6556746",
"0.6478154",
"0.6380802",
"0.63720083",
"0.62626374",
"0.6240741",
"0.62312853",
"0.622453",
"0.62078345",
"0.6197497",
"0.6178815",
"0.6166695",
"0.61565965",
"0.6151526",
"0.60690457",
"0.6064608",
"0.6058527",
"0.6047572",
"0.604695... | 0.6059642 | 18 |
SellerProduct has many SPUniqueProperties. | public function SPUniqueProperties()
{
// hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)
return $this->hasMany('App\SPUniqueProperty','sp_id','sp_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function packageProductRelations()\n {\n // hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)\n return $this->hasMany('App\\SellerProductRelation','sp_id','sp_id');\n }",
"public function products()\n {\n // hasMany(RelatedModel, foreignKeyOnRelatedMod... | [
"0.59428227",
"0.5513796",
"0.5511107",
"0.53811073",
"0.53474885",
"0.5319242",
"0.5303642",
"0.5255887",
"0.52552146",
"0.5237946",
"0.5228003",
"0.5201633",
"0.5193404",
"0.5186786",
"0.51812434",
"0.5161191",
"0.5147681",
"0.5133808",
"0.51296973",
"0.51292044",
"0.512786... | 0.72402287 | 0 |
SellerProduct has one AutoProductDivision. | public function autoProductDivision()
{
// hasOne(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)
return $this->hasOne('App\AutoProductDivision','sp_id','sp_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function division(){\n return $this->hasOne(Division::class);\n }",
"public function order_product(){\n return $this->hasOne(Order_product::class);\n }",
"public function getProduct()\n {\n return $this->hasOne(Product::className(), ['id' => 'product_id']);\n }",
"public fun... | [
"0.5678987",
"0.5487072",
"0.54531544",
"0.54531544",
"0.54531544",
"0.54531544",
"0.5403631",
"0.536735",
"0.5341711",
"0.52218884",
"0.5216027",
"0.5195785",
"0.51852185",
"0.5168378",
"0.5159933",
"0.51240855",
"0.51034296",
"0.51024693",
"0.51024693",
"0.5070226",
"0.5067... | 0.7097879 | 0 |
SellerProduct has many SPFeatureLists. | public function SPFeatureLists()
{
// hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)
return $this->hasMany('App\SPFeatureList','sp_id','sp_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function product_features()\n {\n return $this->belongsToMany('App\\Models\\ProductFeature', 'feature_product');\n }",
"public function features()\n {\n return $this->hasMany('App\\Feature');\n }",
"public function productSellers(){\n return $this->hasMany(\"App\\Product... | [
"0.6805389",
"0.594594",
"0.57588005",
"0.5727211",
"0.5680217",
"0.56647533",
"0.5539746",
"0.5460278",
"0.5441034",
"0.5413192",
"0.54101145",
"0.5404321",
"0.53708506",
"0.53683335",
"0.53675747",
"0.5358915",
"0.5355847",
"0.534663",
"0.5318546",
"0.5306623",
"0.52630097"... | 0.7415108 | 0 |
SellerProduct has many SPShippings. | public function SPShippings()
{
// hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)
return $this->hasMany('App\SPShipping','sp_id','sp_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function packageProductRelations()\n {\n // hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)\n return $this->hasMany('App\\SellerProductRelation','sp_id','sp_id');\n }",
"public function productSellers(){\n return $this->hasMany(\"App\\Product_Seller\", ... | [
"0.6748908",
"0.66820747",
"0.61754847",
"0.61055756",
"0.61038196",
"0.6031154",
"0.5994232",
"0.598643",
"0.58941364",
"0.5851768",
"0.5793844",
"0.57406825",
"0.5710332",
"0.56711763",
"0.56683743",
"0.56298554",
"0.5629117",
"0.56046665",
"0.56046206",
"0.5561337",
"0.551... | 0.78254163 | 0 |
SellerProduct has many Wishlists. | public function wishlists()
{
// hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)
return $this->hasMany('App\Wishlists','sp_id','sp_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function wishLists()\n {\n return $this->hasMany(WishList::class);\n }",
"public function wishlist()\n {\n // hasMany(RelatedModel, foreignKeyOnRelatedModel = spsd_id, localKey = spsd_id)\n return $this->hasMany('App\\Wishlist','spsd_id','spsd_id');\n }",
"public functio... | [
"0.70857936",
"0.6677293",
"0.665782",
"0.66139364",
"0.6497405",
"0.646726",
"0.60313374",
"0.592544",
"0.58536696",
"0.5760578",
"0.57301694",
"0.57004946",
"0.56753546",
"0.5633458",
"0.56279117",
"0.5575236",
"0.5566451",
"0.55495656",
"0.55447644",
"0.5532937",
"0.552835... | 0.706539 | 1 |
SellerProduct has many SPOPtionRelations. | public function SPOPtionRelations()
{
// hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)
return $this->hasMany(SPOPtionRelation::class,'sp_id','sp_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function packageProductRelations()\n {\n // hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)\n return $this->hasMany('App\\SellerProductRelation','sp_id','sp_id');\n }",
"public function productSellers(){\n return $this->hasMany(\"App\\Product_Seller\", ... | [
"0.79731506",
"0.7286745",
"0.6581661",
"0.6417445",
"0.6340585",
"0.63296694",
"0.6300131",
"0.6229335",
"0.6221153",
"0.61976343",
"0.6172708",
"0.61533993",
"0.61496294",
"0.6132897",
"0.61279565",
"0.6123936",
"0.61087537",
"0.6078971",
"0.6060232",
"0.60508865",
"0.60496... | 0.68150604 | 2 |
SellerProduct has many SPPriceHistory. | public function SPPriceHistory()
{
// hasMany(RelatedModel, foreignKeyOnRelatedModel = sellerProduct_id, localKey = id)
return $this->hasMany('App\SPPriceHitory','sp_id','sp_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function sellerStockHistories()\n {\n // hasMany(RelatedModel, foreignKeyOnRelatedModel = spsd_id, localKey = spsd_id)\n return $this->hasMany('App\\SellerStockHistory','spsd_id','spsd_id');\n }",
"public function productSellers(){\n return $this->hasMany(\"App\\Product_Seller\"... | [
"0.67225367",
"0.6498215",
"0.63216645",
"0.6256579",
"0.6218503",
"0.62021136",
"0.60915935",
"0.60755974",
"0.6001262",
"0.5849131",
"0.5764692",
"0.5763904",
"0.571381",
"0.5664875",
"0.5641425",
"0.5637534",
"0.5579778",
"0.5577001",
"0.5573937",
"0.5570963",
"0.5565152",... | 0.7939953 | 0 |
Display a listing of the resource. | public function index()
{
$dh = DonHang::all();
return view('admin.donhang.index')->with('dh',$dh);
} | {
"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(Request $request)
{
if(empty($request->start)){
$date_start = Carbon::create(2002,1,1,0,0,0);
$donhang = DonHang::whereBetween('created_at',[$date_start, $request->end])->get();
return view('admin.donhang.index')->with('dh',$donhang);
}
... | {
"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($id)
{
$donhang = DonHang::where('madh',$id)->get();
return view('admin.donhang.ctdh')->with('donhang',$donhang);
} | {
"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.8233183",
"0.81894475",
"0.6830127",
"0.6498529",
"0.6496276",
"0.6469191",
"0.64627224",
"0.63619924",
"0.6308743",
"0.62809277",
"0.6218707",
"0.61915004",
"0.617914",
"0.6172935",
"0.6137578",
"0.6118736",
"0.6107122",
"0.6106576",
"0.60931313",
"0.60798067",
"0.6046669... | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ... | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.6833... | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
$dh = DonHang::where('madh',$id)->first();
$dh->trangthai= $request->cb_trangthai;
if($dh->update()){
return redirect('http://localhost:8888/WebBanSach/public/dh/');
}else{
return redirect('http://localhost:8888/... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ... | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890... | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n ... | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897... | 0.0 | -1 |
Default authentification name Initialising class htaccess | function htaccess(){
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function addLogin(){\n $file=fopen($this->fHtaccess,\"w+\");\n fputs($file,\"Order allow,deny\\n\");\n fputs($file,\"Allow from all\\n\");\n fputs($file,\"AuthType \".$this->authType.\"\\n\");\n fputs($file,\"AuthUserFile \".$this->fPasswd.\"\\n\\n\");\n fputs($file,\"... | [
"0.68765026",
"0.68765026",
"0.6863218",
"0.6246467",
"0.6233371",
"0.62299633",
"0.61967534",
"0.6190129",
"0.6143394",
"0.6138507",
"0.61142564",
"0.60587054",
"0.60552216",
"0.6041025",
"0.596401",
"0.5852622",
"0.584752",
"0.5847249",
"0.5817079",
"0.5817079",
"0.5794862"... | 0.58723235 | 15 |
Sets the filename and path of .htaccess to work with | function setFHtaccess($filename){
$this->fHtaccess=$filename;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setFHtaccess($filename){\r\n\t\t$this->fHtaccess=$filename;\r\n\t}",
"public function createHtaccessFile() {\n $oModule = oxNew(Module::class);\n $oConfig = $this->getConfig();\n // get modules path\n $sModulesDir = $oConfig->getModulesDir();\n // get cache path\n ... | [
"0.74515116",
"0.7008224",
"0.6627939",
"0.6318802",
"0.62891024",
"0.6196582",
"0.6088691",
"0.6046433",
"0.6027368",
"0.6021579",
"0.59651047",
"0.5956435",
"0.59158754",
"0.59066135",
"0.58405495",
"0.5818566",
"0.5784172",
"0.5719726",
"0.57171345",
"0.56993055",
"0.56386... | 0.7480921 | 1 |
Sets the filename and path of the htgroup file for the htaccess file | function setFHtgroup($filename){
$this->fHtgroup=$filename;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setFHtgroup($filename){\r\n\t\t$this->fHtgroup=$filename;\r\n\t}",
"function setFHtaccess($filename){\n $this->fHtaccess=$filename;\n }",
"function setFHtaccess($filename){\n $this->fHtaccess=$filename;\n }",
"public function createHtaccessFile() {\n $oModule = oxNew(Modul... | [
"0.7456132",
"0.6594482",
"0.6594482",
"0.65299255",
"0.65117747",
"0.60701984",
"0.60481924",
"0.6004976",
"0.6004976",
"0.5822717",
"0.5770194",
"0.56891537",
"0.5386682",
"0.5380016",
"0.53605556",
"0.53605556",
"0.53605556",
"0.5360422",
"0.5360422",
"0.5258312",
"0.52509... | 0.75066364 | 1 |
Sets the filename and path of the password file for the htaccess file | function setFPasswd($filename){
$this->fPasswd=$filename;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setFPasswd($filename){\r\n\t\t$this->fPasswd=$filename;\r\n\t}",
"public function createHtaccessFile() {\n $oModule = oxNew(Module::class);\n $oConfig = $this->getConfig();\n // get modules path\n $sModulesDir = $oConfig->getModulesDir();\n // get cache path\n $... | [
"0.697032",
"0.65987813",
"0.6551907",
"0.6551907",
"0.6540086",
"0.65090424",
"0.65090424",
"0.64871496",
"0.6419481",
"0.62931067",
"0.62571436",
"0.6144481",
"0.6043377",
"0.59839886",
"0.59172153",
"0.58838516",
"0.58242327",
"0.56233615",
"0.55423677",
"0.55304825",
"0.5... | 0.7009856 | 1 |
Adds a user to the password file | function addUser($username,$password,$group){
// checking if user already exists
$file=@fopen($this->fPasswd,"r");
$isAlready=false;
while($line=@fgets($file,200)){
$lineArr=explode(":",$line);
if($username==$lineArr[0]){
$isAlready=true;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function addUser($username,$password,$group=\"\"){\n // checking if user already exists\n $file=@fopen($this->fPasswd,\"r\");\n $isAlready=false;\n while($line=@fgets($file,200)){\n $lineArr=explode(\":\",$line);\n if($username==$lineArr[0]){\n $isAl... | [
"0.7168759",
"0.70392114",
"0.6988137",
"0.6712386",
"0.6566095",
"0.6552906",
"0.65096414",
"0.6343643",
"0.63277924",
"0.63277924",
"0.62413216",
"0.62376577",
"0.6193765",
"0.6176503",
"0.61213803",
"0.61031306",
"0.6101658",
"0.60843235",
"0.6069139",
"0.605067",
"0.60321... | 0.72093624 | 0 |
Adds a group to the htgroup file | function addGroup($groupname){
$file=fopen($this->fHtgroup,"a");
fclose($file);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function addGroup($groupname){\r\n\t\t$file=fopen($this->fHtgroup,\"a\");\r\n\t\tfclose($file);\r\n\t}",
"public function addGroup($group) {}",
"public function addGroup(string $group): void;",
"public function addGroup(Group $group);",
"public function addGroup(\\Models\\Group $group) {\n $this->gr... | [
"0.85190856",
"0.7875524",
"0.76974416",
"0.7465414",
"0.71980065",
"0.71516794",
"0.7136931",
"0.70278627",
"0.70210993",
"0.6998244",
"0.69555014",
"0.67321473",
"0.666837",
"0.65670836",
"0.65020406",
"0.64585173",
"0.639276",
"0.63774276",
"0.63324887",
"0.63289565",
"0.6... | 0.8526399 | 1 |
Deletes a user in the password file | function delUser($username){
// Reading names from file
$file=fopen($path.$this->fPasswd,"r");
$i=0;
while($line=fgets($file,200)){
$lineArr=explode(":",$line);
if($username!=$lineArr[0]){
$newUserlist[$i][0]=$lineArr[0];
$newUserli... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function delUser($username){\n // Reading names from file\n $file=fopen($this->fPasswd,\"r\");\n $i=0;\n while($line=fgets($file,200)){\n $lineArr=explode(\":\",$line);\n if($username!=$lineArr[0]){\n $newUserlist[$i][0]=$lineArr[0];\n ... | [
"0.7246269",
"0.7167319",
"0.71015334",
"0.6810712",
"0.6801589",
"0.6786561",
"0.6758552",
"0.6738045",
"0.67353517",
"0.6729234",
"0.6693252",
"0.6693252",
"0.66613674",
"0.6658756",
"0.65577465",
"0.6512139",
"0.6437685",
"0.6413",
"0.6389223",
"0.63870925",
"0.63788056",
... | 0.7259391 | 0 |
Returns an array of all users in a password file | function getUsers(){
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getUsers(){\r\n\t\t// Reading names from file\r\n\t\t$newUserlist = array();\r\n\r\n\t\t$file=fopen($this->fPasswd,\"r\");\r\n\t\t$x=0;\r\n\t\tfor ($i=0; $line=fgets($file,4096); $i++) {\r\n\t\t\t$lineArr = explode(\":\",$line);\r\n\t\t\t$newUserlist[] = $lineArr[0];\r\n\t\t\t$x++;\r\n\t\t}\r\n\r\n\t\tret... | [
"0.8046688",
"0.7530089",
"0.7448296",
"0.70341796",
"0.69475484",
"0.68537563",
"0.6819577",
"0.67809016",
"0.672016",
"0.665279",
"0.66227233",
"0.66143835",
"0.65641147",
"0.64408135",
"0.6397462",
"0.6281141",
"0.62426674",
"0.6233375",
"0.62284756",
"0.61980164",
"0.6185... | 0.0 | -1 |
Sets a password to the given username | function setPasswd($username,$new_password){
// Reading names from file
$newUserlist="";
$file=fopen($this->fPasswd,"r");
$x=0;
for($i=0;$line=fgets($file,200);$i++){
$lineArr=explode(":",$line);
if($username!=$lineArr[0] && $lineArr[0]!="" && $li... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function changePassword($username, $password);",
"public function setPassword($userid, $password);",
"public function setCredentials($username, $password) {\n assert('is_string($username) && is_string($password); // username & password need to be strings');\n $this->credentials = \"{$usern... | [
"0.7922511",
"0.76501405",
"0.75830555",
"0.7421745",
"0.74094015",
"0.7384489",
"0.7336288",
"0.7336288",
"0.7336288",
"0.7335211",
"0.7316992",
"0.72901237",
"0.72182167",
"0.71789426",
"0.7175044",
"0.7172357",
"0.7168179",
"0.71594566",
"0.71582997",
"0.7100605",
"0.70625... | 0.0 | -1 |
Sets the Authentification type for Login | function setAuthType($authtype){
$this->authType=$authtype;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setAuthenticationType( $type ) {\n\t\t$this->_mAuthenticationType = $type;\n\t}",
"function setAuthType($authtype){\r\n\t\t$this->authType=$authtype;\r\n\t}",
"public function setLoginType($value)\n {\n return $this->set(self::LOGIN_TYPE, $value);\n }",
"public function setUserTy... | [
"0.7533833",
"0.69493586",
"0.68253934",
"0.6527557",
"0.6473223",
"0.6252697",
"0.6131606",
"0.6121834",
"0.60862917",
"0.60413885",
"0.59738755",
"0.595734",
"0.5911359",
"0.59022367",
"0.59019494",
"0.5799048",
"0.57958597",
"0.5782056",
"0.57652706",
"0.5708991",
"0.56907... | 0.7032549 | 2 |
Sets the Authentification Name (Name of the login area) | function setAuthName($authname){
$this->authName=$authname;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setAuthName($authname){\r\n\t\t$this->authName=$authname;\r\n\t}",
"public function getName()\n {\n return 'login';\n }",
"public static function setCurrentName($name) {\n Session::put(Privilege::SESSION_NAME_NAME, $name);\n }",
"public function setCurrentUser($name);",... | [
"0.7619085",
"0.6364889",
"0.6355036",
"0.6346659",
"0.63167447",
"0.6271377",
"0.6245056",
"0.623459",
"0.6197847",
"0.61473745",
"0.61266786",
"0.61026496",
"0.6080751",
"0.6031913",
"0.6025729",
"0.60113096",
"0.60051334",
"0.5940008",
"0.5934326",
"0.5933759",
"0.5929047"... | 0.76242304 | 1 |
Writes the htaccess file to the given Directory and protects it | function addLogin(){
$file=fopen($this->fHtaccess,"w+");
fputs($file,"Order allow,deny\n");
fputs($file,"Allow from all\n");
fputs($file,"AuthType ".$this->authType."\n");
fputs($file,"AuthUserFile ".$this->fPasswd."\n\n");
fputs($file,"AuthName \"".$this->auth... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function htaccessGen($path = \"\") {\n if($this->option(\"htaccess\") == true) {\n\n if(!file_exists($path.DIRECTORY_SEPARATOR.\".htaccess\")) {\n // echo \"write me\";\n $html = \"order deny, allow \\r\\n\ndeny from all \\r\\n\nallow from 127.0.0.1\";\n\n ... | [
"0.7076291",
"0.70505923",
"0.68300295",
"0.67646414",
"0.6505575",
"0.6502601",
"0.63902605",
"0.6330159",
"0.6199596",
"0.61849463",
"0.60252124",
"0.60046595",
"0.5992671",
"0.5984551",
"0.5975534",
"0.5958222",
"0.57092726",
"0.5640292",
"0.5542757",
"0.5501622",
"0.54765... | 0.6063421 | 11 |
Deletes the protection of the given directory | function delLogin(){
unlink($this->fHtaccess);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function remdir()\r\n {\r\n if(is_writable($_REQUEST['file']))\r\n {\r\n $dir=$_GET['file'];\r\n $this->deleteDirectory($dir); \r\n }\r\n else{echo \"Permission Denied !\";}\r\n }",
"public function delete()\... | [
"0.69099456",
"0.6644087",
"0.65081906",
"0.6497252",
"0.64353",
"0.64254296",
"0.6305812",
"0.62407035",
"0.6230317",
"0.6196901",
"0.6187453",
"0.61615366",
"0.6160682",
"0.61425185",
"0.60523933",
"0.6038834",
"0.6035531",
"0.60271275",
"0.60036343",
"0.5985872",
"0.597782... | 0.6315722 | 7 |
File with functions used on different files function to sanitize input | function sanitize($conn, $val){
$val = stripslashes($val);
$val = mysqli_real_escape_string($conn, $val);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function sanitize();",
"public function sanitize() {\n\n\t\t// load the tool that we want to use in the xss filtering process\n\t\t$this->loadTool();\n\n\t\tif (is_array($_GET) AND count($_GET) > 0) {\n\n\t\t\t$_GET = $this->clean_input_data($_GET);\n\t\t}\n\t\tif (is_array($_POST) AND count($_PO... | [
"0.72457606",
"0.7040492",
"0.69909644",
"0.66754746",
"0.63956875",
"0.6323625",
"0.6267727",
"0.62536865",
"0.6215309",
"0.6208184",
"0.6179496",
"0.614686",
"0.596885",
"0.594685",
"0.59178436",
"0.58647674",
"0.58325595",
"0.58259183",
"0.58138895",
"0.57972515",
"0.57756... | 0.0 | -1 |
Get global minimum password characters length, default value is 12. | public function GetMustHaveMinLength () {
return $this->mustHaveMinLength;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getMinimumPasswordLength()\n {\n return $this->_scopeConfig->getValue(AccountManagement::XML_PATH_MINIMUM_PASSWORD_LENGTH);\n }",
"public function getMinimumPasswordLength()\n {\n return $this->_scopeConfig->getValue(AccountManagement::XML_PATH_MINIMUM_PASSWORD_LENGTH);\n ... | [
"0.866317",
"0.866317",
"0.7785897",
"0.73885417",
"0.6801197",
"0.67947876",
"0.6778718",
"0.676631",
"0.6731377",
"0.67020243",
"0.66800576",
"0.6550863",
"0.6461658",
"0.6450675",
"0.64489526",
"0.6371763",
"0.63223386",
"0.6303026",
"0.6271191",
"0.62562364",
"0.62519395"... | 0.59976834 | 41 |
Set global minimum password characters length, default value is 12. | public function SetMustHaveMinLength ($mustHaveMinLength = self::MIN_LENGTH) {
/** @var \MvcCore\Ext\Forms\Validator $this */
$this->mustHaveMinLength = $mustHaveMinLength;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function setPasswordMinLength($length){\n Configuration::where('id', 1)\n ->update(['password_min_length' => $length]);\n }",
"public function setPasswordMinimumLength(?int $value): void {\n $this->getBackingStore()->set('passwordMinimumLength', $value);\n }",
"publ... | [
"0.7863441",
"0.7545861",
"0.7204101",
"0.7204101",
"0.707599",
"0.6785875",
"0.64868104",
"0.6439458",
"0.6439205",
"0.64361703",
"0.64239854",
"0.64176124",
"0.6360836",
"0.6351453",
"0.6337413",
"0.6293192",
"0.6291461",
"0.62632596",
"0.62354416",
"0.6235107",
"0.6219922"... | 0.0 | -1 |
Get global maximum password characters length, default value is 255. | public function GetMustHaveMaxLength () {
return $this->mustHaveMaxLength;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getMinimumPasswordLength()\n {\n return $this->_scopeConfig->getValue(AccountManagement::XML_PATH_MINIMUM_PASSWORD_LENGTH);\n }",
"public function getMinimumPasswordLength()\n {\n return $this->_scopeConfig->getValue(AccountManagement::XML_PATH_MINIMUM_PASSWORD_LENGTH);\n ... | [
"0.76154864",
"0.76154864",
"0.75920796",
"0.7544912",
"0.7521918",
"0.75145006",
"0.75063574",
"0.7504605",
"0.75028443",
"0.7425819",
"0.74174374",
"0.7390486",
"0.7283338",
"0.71379286",
"0.705154",
"0.69496995",
"0.69496995",
"0.69496995",
"0.68923694",
"0.6869895",
"0.68... | 0.5758813 | 83 |
Set global maximum password characters length, default value is 255. | public function SetMustHaveMaxLength ($mustHaveMaxLength = self::MAX_LENGTH) {
/** @var \MvcCore\Ext\Forms\Validator $this */
$this->mustHaveMaxLength = $mustHaveMaxLength;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setMaxLength($maxLength) {}",
"public static function setGlobalMaxLength(int $maxLength):void {\r\n\t\tself::$globalMaxLength = $maxLength;\r\n\t}",
"public function setMaxUsernameLength($length);",
"public function setMaxLength($length);",
"function set_field_length($len) \n {\n ... | [
"0.71629906",
"0.71249366",
"0.6992721",
"0.6971656",
"0.69254595",
"0.67821264",
"0.67731225",
"0.67175984",
"0.66662353",
"0.65283674",
"0.6517029",
"0.6452255",
"0.64355826",
"0.6369309",
"0.63186795",
"0.63186795",
"0.63152295",
"0.62809384",
"0.62714934",
"0.6253397",
"0... | 0.0 | -1 |
Get password strength rule to have any lower case character presented in password. Default value is `TRUE` to must have lower case character in password. Lower case characters from latin alphabet: abcdefghijklmnopqrstuvwxyz. This function returns array with the rule `boolean` as first item and second item is minimum lo... | public function GetMustHaveLowerCaseChars ($getWithMinCount = TRUE) {
if ($getWithMinCount)
return [$this->mustHaveLowerCaseChars, $this->mustHaveLowerCaseCharsCount];
return $this->mustHaveLowerCaseChars ? [TRUE] : [];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testManyLowercaseCharacter ()\n {\n // Function parameters\n $length = 8;\n $minPasswordRequirements = [\n 'min' => 10,\n 'special' => 1,\n 'digit' => 1,\n 'upper' => 1,\n 'lower' => 5\n ];\n // Helper\n ... | [
"0.67045766",
"0.59745455",
"0.5836599",
"0.5835646",
"0.5813332",
"0.58103323",
"0.5789298",
"0.5734077",
"0.5704969",
"0.56844664",
"0.5608058",
"0.56071633",
"0.5599391",
"0.5581891",
"0.5555354",
"0.5521866",
"0.5488675",
"0.54772234",
"0.5431684",
"0.53933555",
"0.538010... | 0.6121028 | 1 |
Set password strength rule to have any lower case character presented in password. Default value is `TRUE` to must have lower case character in password. Lower case characters from latin alphabet: abcdefghijklmnopqrstuvwxyz. Function has second argument to set minimum lower case characters in password. Default value is... | public function SetMustHaveLowerCaseChars ($mustHaveLowerCaseChars = TRUE, $minCount = self::MIN_LOWERCASE_CHARS_COUNT) {
/** @var \MvcCore\Ext\Forms\Validator $this */
$this->mustHaveLowerCaseChars = $mustHaveLowerCaseChars;
$this->mustHaveLowerCaseCharsCount = $minCount;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testUpdatePasswordOnlyLowerCase(): void { }",
"public function testManyLowercaseCharacter ()\n {\n // Function parameters\n $length = 8;\n $minPasswordRequirements = [\n 'min' => 10,\n 'special' => 1,\n 'digit' => 1,\n 'upper' =>... | [
"0.6898676",
"0.6826555",
"0.678818",
"0.6520522",
"0.6295156",
"0.6295156",
"0.6295156",
"0.6226012",
"0.6080737",
"0.607918",
"0.6072198",
"0.6072198",
"0.6072198",
"0.6043468",
"0.6034816",
"0.60220027",
"0.6017721",
"0.6017721",
"0.6017721",
"0.59477824",
"0.5941147",
"... | 0.62140644 | 8 |
Get password strength rule to have any upper case character presented in password. Default value is `TRUE` to must have upper case character in password. Upper case characters from latin alphabet: abcdefghijklmnopqrstuvwxyz. This function returns array with the rule `boolean` as first item and second item is minimum up... | public function GetMustHaveUpperCaseChars ($getWithMinCount = TRUE) {
if ($getWithMinCount)
return [$this->mustHaveUpperCaseChars, $this->mustHaveUpperCaseCharsCount];
return $this->mustHaveUpperCaseChars ? [TRUE] : [];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function passwordRules() {\n return [\n 'password' => 'required|alpha_num|between:3,20|confirmed',\n 'password_confirmation' => 'required|alpha_num|between:3,20',\n ];\n }",
"function testPass($pass){\n$level=0;\nif(eight($pass)){$level+=1;}\nif... | [
"0.61229396",
"0.61223096",
"0.607677",
"0.59833336",
"0.5900933",
"0.5883375",
"0.58818406",
"0.5803759",
"0.57666826",
"0.5710612",
"0.5707325",
"0.57013893",
"0.5664909",
"0.5650017",
"0.56430817",
"0.56130135",
"0.5598602",
"0.55912095",
"0.55382675",
"0.5533826",
"0.5525... | 0.5482387 | 23 |
Set password strength rule to have any upper case character presented in password. Default value is `TRUE` to must have upper case character in password. Upper case characters from latin alphabet: abcdefghijklmnopqrstuvwxyz. Function has second argument to set minimum upper case characters in password. Default value is... | public function SetMustHaveUpperCaseChars ($mustHaveUpperCaseChars = TRUE, $minCount = self::MIN_UPPERCASE_CHARS_COUNT) {
/** @var \MvcCore\Ext\Forms\Validator $this */
$this->mustHaveUpperCaseChars = $mustHaveUpperCaseChars;
$this->mustHaveUpperCaseCharsCount = $minCount;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testUpdatePasswordOnlyUpperCase(): void { }",
"public static function setPasswordUpperCaseRequired($isRequired){\n Configuration::where('id', 1)\n ->update(['password_upper_case_required' => $isRequired]);\n }",
"public function testUpdatePasswordOnlyLowerCase(): void { }",... | [
"0.71533215",
"0.65764797",
"0.6433923",
"0.6260854",
"0.6260854",
"0.6260854",
"0.61959606",
"0.61857665",
"0.6180634",
"0.6180634",
"0.6180634",
"0.614457",
"0.61003035",
"0.6095298",
"0.6029788",
"0.60043246",
"0.5946834",
"0.5898906",
"0.5884733",
"0.5857629",
"0.5843983"... | 0.568481 | 30 |
Get password strength rule to have any digit presented in password. Default value is `TRUE` to must have digit characters in password. Digit (arabian) characters from arabian alphabet: 0123456789. This function returns array with the rule `boolean` as first item and second item is minimum digit characters count i n pas... | public function GetMustHaveDigits ($getWithMinCount = TRUE) {
if ($getWithMinCount)
return [$this->mustHaveDigits, $this->mustHaveDigitsCount];
return $this->mustHaveDigits ? [TRUE] : [];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getPasswordStrength(string $password): int;",
"function check_strength($user_password) {\n $characters = 0;\n $capitalletters = 0;\n $loweletters = 0;\n $number = 0;\n\n if (strlen ($user_password) > 11) {\n $characters = 1;\n } else {\n $characters = 0;\n };\n ... | [
"0.6221264",
"0.6148037",
"0.60621935",
"0.6033135",
"0.60245085",
"0.6005632",
"0.59476495",
"0.58565587",
"0.57886267",
"0.5783336",
"0.577515",
"0.57163537",
"0.5690557",
"0.5668192",
"0.5641812",
"0.56082016",
"0.5590052",
"0.5581374",
"0.5553084",
"0.5505471",
"0.550343"... | 0.0 | -1 |
Set password strength rule to have any digit presented in password. Default value is `TRUE` to must have digit characters in password. Digit (arabian) characters from arabian alphabet: 0123456789. Function has second argument to set minimum digit characters in password. Default value is at least one digit character in ... | public function SetMustHaveDigits ($mustHaveDigits = TRUE, $minCount = self::MIN_DIGIT_CHARS_COUNT) {
/** @var \MvcCore\Ext\Forms\Validator $this */
$this->mustHaveDigits = $mustHaveDigits;
$this->mustHaveDigitsCount = $minCount;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setPasswordStrength($num) {\n if((is_numeric($num)) && (($num>=0) && ($num<=4))) {\n $this->password_strength = $num;\n return $this->password_strength;\n }\n return false;\n }",
"public function authenticationWithValidNumericCharClassPassword() ... | [
"0.6863631",
"0.6692743",
"0.6692743",
"0.6692743",
"0.6679495",
"0.6615836",
"0.64371425",
"0.63698125",
"0.63653034",
"0.63569635",
"0.6305209",
"0.62923574",
"0.6275585",
"0.61276156",
"0.6093317",
"0.60760653",
"0.6044233",
"0.60335964",
"0.60149646",
"0.5992642",
"0.5989... | 0.0 | -1 |
Validate raw user password by configured rules. Password still could contain very dangerous characters for XSS, SQL or any other attacks. Be careful!!! | public function Validate ($rawSubmittedValue) {
$password = trim((string) $rawSubmittedValue);
$passwordLength = mb_strlen($password);
if ($passwordLength === 0) return NULL;
// check password global minimum and maximum length:
if ($passwordLength < $this->mustHaveMinLength)
$this->field->AddValidationErr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isPasswordValid(string $encoded, string $raw);",
"function sanitizePassword() {\n // If there is a password confirmation we put it to the checker, too\n $passCheckerInput = (strlen($this->passwordConf) > 0) ?\n array($this->password, $this->passwordConf) : $this->password... | [
"0.7502701",
"0.70942223",
"0.70880914",
"0.70876765",
"0.70876765",
"0.70876765",
"0.70813257",
"0.6959618",
"0.6908539",
"0.6908539",
"0.6908539",
"0.6863225",
"0.685306",
"0.6843077",
"0.68400013",
"0.6833657",
"0.68093306",
"0.68031126",
"0.67991906",
"0.6750744",
"0.6750... | 0.65333945 | 45 |
This method is executed before any Joomla uninstall action, such as file removal or database changes. | public function uninstall($parent) {
$removeTables = true;
// Chess League Manager Einstellung
try {
// Standard Einstellung: Tabellen nicht löschen
if (file_exists(JPATH_SITE .
'/components/com_clm/clm/includes/config.php')) {
define('clm', '1');
require_once JPATH_SITE .
'/components/c... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function afterUninstall()\n {\n }",
"public function execute_uninstall_hooks() {\r\n\t\t\r\n }",
"function on_uninstall ()\n{\n}",
"function on_uninstall ()\n{\n}",
"protected function beforeUninstall(): bool\n {\n return true;\n }",
"public function afterUninstall()\r\n ... | [
"0.773123",
"0.72015226",
"0.7111893",
"0.7111893",
"0.70843107",
"0.70218796",
"0.7016795",
"0.700696",
"0.6962802",
"0.69460464",
"0.6934723",
"0.68938774",
"0.6768396",
"0.67204976",
"0.66809106",
"0.6665453",
"0.6638427",
"0.6637539",
"0.6637539",
"0.6625484",
"0.662311",... | 0.0 | -1 |
This method is called after a component is updated. | public function update($parent) {
// remove depricated language files
$this->deleteUnexistingFiles();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function afterUpdate()\n {\n }",
"protected function afterUpdate()\n {\n }",
"protected function afterUpdate() {\n\t}",
"protected function afterUpdating()\n {\n }",
"public function after_update() {}",
"function after_update() {}",
"function update() {\n\n\t\t\t}",
"publi... | [
"0.7465352",
"0.7465352",
"0.7439307",
"0.7352899",
"0.7271154",
"0.69352275",
"0.6510514",
"0.65096956",
"0.64195955",
"0.6340905",
"0.63290673",
"0.628668",
"0.6125817",
"0.61215925",
"0.60980314",
"0.60953176",
"0.6085713",
"0.6085713",
"0.60657644",
"0.6063374",
"0.602842... | 0.0 | -1 |
Runs just before any installation action is preformed on the component. Verifications and prerequisites should run in this function. | public function preflight($type, $parent) {
// Chess League Manager installiert ?
$db = JFactory::getDbo();
$result = $db->setQuery($db->getQuery(true)->select('COUNT(' .
$db->quoteName('extension_id') . ')')->from($db->quoteName('#__extensions'))->where($db->quoteName('element') .
' = ' . $db->quote('com... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function beforeInstall()\n\t{}",
"public function preInstall()\n {\n }",
"protected function beforeInstall(): bool\n {\n return true;\n }",
"protected function afterInstall()\n {\n }",
"public function install()\n\t{\n\t\tif (Shop::isFeatureActive()) {\n\t\t\tShop::setContex... | [
"0.8143597",
"0.7941518",
"0.71152365",
"0.6925626",
"0.6903909",
"0.6789204",
"0.67859584",
"0.66364795",
"0.6625032",
"0.65948415",
"0.65809506",
"0.6566539",
"0.6466661",
"0.64643115",
"0.6463094",
"0.63410586",
"0.6338126",
"0.6338126",
"0.63345146",
"0.63132924",
"0.6297... | 0.0 | -1 |
Runs right after any installation action is preformed on the component. | public function postflight($type, $parent) {
$this->loadConfigXml($parent);
$this->loadSamples($parent);
if ($type === 'update' &&
version_compare($this->fromVersion, $parent->getManifest()->version, '<')) {
$this->enqueueMessage($this->getChangelog($parent));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function afterInstall()\n\t{}",
"protected function afterInstall()\n {\n }",
"public function postInstallCmd(){\n\n \\Disco\\manage\\Manager::install();\n\n }",
"protected function afterUninstall()\n {\n }",
"public function beforeInstall()\n\t{}",
"public function onAfterIns... | [
"0.8425329",
"0.82395136",
"0.7559028",
"0.72642064",
"0.722887",
"0.7134401",
"0.70190644",
"0.6894788",
"0.68835986",
"0.66755086",
"0.66699874",
"0.6640504",
"0.662751",
"0.66223156",
"0.6552223",
"0.6431351",
"0.6392818",
"0.6365143",
"0.63484025",
"0.6332495",
"0.6330982... | 0.0 | -1 |
Enqueue a system message. | private function enqueueMessage($msg, $type = 'message') {
// Don't add empty messages.
if (! strlen(trim($msg))) {
return;
}
// Enqueue the message
if (! preg_match('#^<pre|^<div#i', $msg)) {
$msg = '<pre style="line-height: 1.6em;">' . $msg . '</pre>';
}
JFactory::getApplication()->enqueueMessage... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function enqueue($message = array()) {\n $this->_events->enqueue($message);\n }",
"public function queue() {\n\t\t$this->prepareMessage();\n\t\t$this->queueRepository->add($this->toArray());\n\t}",
"public function enqueue()\n {\n }",
"public function enqueue()\n {\n ... | [
"0.644728",
"0.64358544",
"0.62235796",
"0.62235796",
"0.62235796",
"0.62235796",
"0.62235796",
"0.62235796",
"0.61118054",
"0.592221",
"0.5922043",
"0.5882807",
"0.5859655",
"0.58204246",
"0.5792052",
"0.5739909",
"0.5644332",
"0.5568418",
"0.5539051",
"0.5389984",
"0.538067... | 0.5401502 | 19 |
Delete files that should not exist | private function deleteUnexistingFiles() {
$files = array (
// Release 2.0
'/administrator/language/de-DE/de-DE.com_clm_turnier.sys.ini',
'/administrator/language/en-GB/en-GB.com_clm_turnier.sys.ini',
// Release 3.2.0
'/administrator/components/com_clm_turnier/layouts/form/fields/sonderranglisten-... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function deleteUnexistingFiles()\n\t{\n\t\tinclude JPATH_ADMINISTRATOR . '/components/com_hierarchy/deletelist.php';\n\n\t\tjimport('joomla.filesystem.file');\n\n\t\tforeach ($files as $file)\n\t\t{\n\t\t\tif (JFile::exists(JPATH_ROOT . $file) && !JFile::delete(JPATH_ROOT . $file))\n\t\t\t{\n\t\t\t\t$app->e... | [
"0.78326565",
"0.78215593",
"0.7587197",
"0.75118184",
"0.7441977",
"0.73711056",
"0.7308249",
"0.72983116",
"0.72544867",
"0.72209173",
"0.72156304",
"0.719691",
"0.71903753",
"0.71337104",
"0.71125674",
"0.710269",
"0.70792174",
"0.704123",
"0.7034422",
"0.7021173",
"0.7019... | 0.8077202 | 0 |
Method to load and merge the ''config.xml'' file with the extens params. | private function loadConfigXml($parent) {
$file = $parent->getParent()->getPath('extension_administrator') .
'/config.xml';
$defaults = $this->parseConfigFile($file);
if ($defaults === '{}') {
return;
}
$manifest = $parent->getParent()->getManifest();
$type = $manifest->attributes()->type;
try {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function getExtensionConfigXml() \n\t{\n\n\t\t// path to the extensions config.xml\n\t\t$extension_config_xml_path = parent::$extension_base_dir . '/etc/config.xml';\n\n\t\tif (!file_exists($extension_config_xml_path)) {\n\t\t\t$this->displayError('Cant find path to extension config xml.');\n\t\t}\n\n\t\t$... | [
"0.7327848",
"0.7100023",
"0.6876409",
"0.6820444",
"0.68199956",
"0.66956866",
"0.6644235",
"0.6616868",
"0.6595615",
"0.6501832",
"0.6466532",
"0.6459517",
"0.6440405",
"0.6405277",
"0.6371634",
"0.63312817",
"0.6324032",
"0.6303028",
"0.6265034",
"0.62613964",
"0.62613255"... | 0.6721193 | 5 |
Method to parse the ''config.xml'' of an extension, build the JSON string for its default parameters, and return the JSON string. | private function parseConfigFile($file) {
if (! file_exists($file)) {
return '{}';
}
$xml = simplexml_load_file($file);
if (! ($xml instanceof SimpleXMLElement)) {
return '{}';
}
if (! isset($xml->fieldset)) {
return '{}';
}
// Getting the fieldset tags
$fieldsets = $xml->fieldset;
// C... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function getExtensionConfigXml() \n\t{\n\n\t\t// path to the extensions config.xml\n\t\t$extension_config_xml_path = parent::$extension_base_dir . '/etc/config.xml';\n\n\t\tif (!file_exists($extension_config_xml_path)) {\n\t\t\t$this->displayError('Cant find path to extension config xml.');\n\t\t}\n\n\t\t$... | [
"0.6670564",
"0.6449308",
"0.621892",
"0.6124415",
"0.6037059",
"0.5984011",
"0.5984011",
"0.5984011",
"0.5984011",
"0.5984011",
"0.5984011",
"0.5984011",
"0.5984011",
"0.5974457",
"0.59510475",
"0.5871761",
"0.5832706",
"0.5805999",
"0.578876",
"0.5780655",
"0.56892586",
"... | 0.0 | -1 |
Method to load the sample data into the database. | private function loadSamples($parent) {
try {
$db = JFactory::getDbo();
$query = $db->getQuery(true)->select($db->quoteName('id'))->from($db->quoteName('#__clm_turniere_grand_prix'));
$db->setQuery($query);
$db->execute();
if ($db->getNumRows() == 0) {
$element = new SimpleXMLElement('<sql><file d... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function importDatabaseData() {}",
"public function loadFromDB()\n {\n }",
"abstract public function loadData();",
"public function loadSampleData()\n\t{\n\t\tJRequest::checkToken('request') or $this->sendResponse(new JException(JText::_('JINVALID_TOKEN'), 403));\n\n\t\t// Get the posted conf... | [
"0.67357564",
"0.6647245",
"0.65206015",
"0.64395577",
"0.63348806",
"0.6322491",
"0.6247782",
"0.62475324",
"0.6203178",
"0.59996563",
"0.59902376",
"0.59504414",
"0.59341663",
"0.58865255",
"0.5826445",
"0.58241576",
"0.5820393",
"0.5814762",
"0.5794247",
"0.5747002",
"0.57... | 0.5860523 | 14 |
Method to generate the changelog data. | private function getChangelog($parent) {
$file = $parent->getParent()->getPath('extension_administrator') .
'/changelog.txt';
if (! file_exists($file)) {
return '';
}
$changelog = file_get_contents($file);
$changelog = preg_replace("#\r#s", '', $changelog);
$parts = explode("\n\n", $changelog);
i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function createChangeLog() {}",
"function changelog()\n\t{\n\t\t?>\n\t\t<pre>\n\t\t\t<?php\n\t\t\treadfile( JPATH_SITE.'/CHANGELOG.php' );\n\t\t\t?>\n\t\t</pre>\n\t\t<?php\n\t}",
"public function get_change_log()\n\t{\n\t\treturn '';\n\t}",
"public function getChangeLogDescription()\r\n {\r\n ... | [
"0.76300544",
"0.63956743",
"0.59811586",
"0.5801661",
"0.5796929",
"0.5771337",
"0.57061535",
"0.5700675",
"0.55793875",
"0.55781454",
"0.5571829",
"0.5477851",
"0.5457062",
"0.5447352",
"0.5422149",
"0.5408971",
"0.53963464",
"0.5347316",
"0.5328131",
"0.5327048",
"0.529912... | 0.59542745 | 3 |
Display a listing of the resource. | public function index(Request $request)
{
//用户列表
$user = User::orderBy('id','asc')
->where(function ($query) use ($request){
$username = $request->input('username');
$email = $request->input('email');
if(!empty($username)){
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re... | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.683052... | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
//添加用户页面
return view('admin.user.add');
} | {
"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.75921303",
"0.75921303",
"0.7586987",
"0.75781953",
"0.756992",
"0.7498765",
"0.7435984",
"0.74298537",
"0.7385191",
"0.7350131",
"0.7336855",
"0.73092943",
"0.72943234",
"0.72800833",
"0.7271207",
"0.7241119",
"0.7229479",
"0.7222803",
"0.71828884",
"0.7176647",
"0.717184... | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
// $flight = new User();
//
// $flight->username = $request->username;
// $flight->password = $request->password;
// $flight->email = $request->email;
//
// $res = $flight->save();
//执行添加操作
//1.接收表单提交的数据
$input = ... | {
"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)
{
$user =User::find($id);
return view('admin.user.edit',compact('user'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ... | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.6833... | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
//1.根据id获取要修改的记录
$user = User::find($id);
$password = md5($request->input('pass'));
$user->username = $request->input('username');
$user->password = $password;
$user->email = $request->input('email');
$res = $use... | {
"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.7423347",
"0.70622426",
"0.70568657",
"0.6896551",
"0.65835553",
"0.64519453",
"0.6348333",
"0.6212436",
"0.61450946",
"0.6122591",
"0.6114199",
"0.6101911",
"0.60876113",
"0.60528636",
"0.60177964",
"0.6006609",
"0.59725446",
"0.594558",
"0.59395295",
"0.5938792",
"0.5893... | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
//删除用户
$user = User::find($id);
$res = $user->delete();
if($res){
$data=[
'status'=>0,
'message'=>'删除成功'
];
}else{
$data=[
'status'=>1,
'message'... | {
"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 |
Display a listing of the resource. | public function index()
{
//dd($estados=Estado::all());
$ejercicio = new Ejercicio();
if($ejercicio->activo()>0 && strtotime(date('Y/m/d')) <= strtotime($ejercicio->ejercicioActivo()))
{
/*\Session::flash('message_success','Te recordamos que se encuentra ya abierta la con... | {
"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.728708",
"0.7144915",
"0.7132209",
"0.66401577",
"0.66205436",
"0.65682197",
"0.6526531",
"0.65085673",
"0.6449452",
"0.63749766",
"0.63726056",
"0.6364582",
"0.6364582",
"0.6364582",
"0.6341498",
"0.63412726",
"0.63412726",
"0.63412726",
"0.63412726",
"0.63412726",
"0.634... | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id... | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245... | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ... | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.6833... | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ... | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890... | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n ... | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897... | 0.0 | -1 |
User // User // User | public function login($params) {
if($params['login'] && $params['password']) {
return $this->user->login($params['login'], $params['password']);
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function User ( ){\n }",
"public function getUser()\n{\nreturn $this->user;\n}",
"public function getUser(): User;",
"public function user($user);",
"public function testCreateUser()\n {\n }",
"abstract public function user();",
"public function user();",
"public function user();",
"publi... | [
"0.734372",
"0.66564834",
"0.66228276",
"0.6596164",
"0.65008944",
"0.63762605",
"0.63266647",
"0.63266647",
"0.63266647",
"0.63266647",
"0.63266647",
"0.63266647",
"0.63266647",
"0.63266647",
"0.6259807",
"0.62507474",
"0.6197047",
"0.61921966",
"0.6169621",
"0.6153201",
"0.... | 0.0 | -1 |
Testdata, kan gebruikt worden voor (alle) gebruikers te importeren samen met gebruikersprofielen | public function __construct()
{
//Dit is niet nodig om te kunnen authenticeren! Autenticatie loopt enkel via LDAP.
//Opmaak: geen header! naam; guid; gebruikersprofielnaam; (gebruikersprofiel)organogram functienaam;dienstnaam; (optioneel rolenaam)
$this->gebruikercsv ="database/csv/Gebruiker... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testData()\n {\n $output = $this->primer->getPatterns(array('components/test-group/data-autoload'), false);\n\n $this->assertEquals($output, '1.2');\n }",
"protected function getTestData(){\n\t\treturn \"application/testdata/Pagers.php\" ;\n\t}",
"public function testBasicTe... | [
"0.6713851",
"0.66269803",
"0.63701767",
"0.63161",
"0.6258806",
"0.622621",
"0.60909796",
"0.6058229",
"0.60348266",
"0.6005819",
"0.5971404",
"0.5928726",
"0.5921921",
"0.58959395",
"0.58752555",
"0.5871571",
"0.58447963",
"0.5804753",
"0.5794079",
"0.57823604",
"0.5758661"... | 0.0 | -1 |
Run the database seeds. | public function run()
{
if(($handle = fopen(base_path($this->gebruikercsv), 'r')) !== FALSE){
while(($row = fgetcsv($handle,255,$this->delimiter))!==FALSE){
$gebruiker = Gebruiker::firstOrCreate(['naam' => $row[0], 'objectguid' => $row[1] ]);
$gebruikersprofielTea... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n fact... | [
"0.8013876",
"0.79804534",
"0.7976992",
"0.79542726",
"0.79511505",
"0.7949612",
"0.794459",
"0.7942486",
"0.7938189",
"0.79368967",
"0.79337025",
"0.78924936",
"0.78811055",
"0.78790957",
"0.78787595",
"0.787547",
"0.7871811",
"0.78701615",
"0.7851422",
"0.7850352",
"0.78414... | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re... | [
"0.7447426",
"0.73628515",
"0.73007894",
"0.7249563",
"0.7164474",
"0.7148467",
"0.71320325",
"0.7104678",
"0.7103152",
"0.7100512",
"0.7048493",
"0.6994995",
"0.69899315",
"0.6935843",
"0.6899995",
"0.68999326",
"0.6892163",
"0.6887924",
"0.6867505",
"0.6851258",
"0.6831236"... | 0.0 | -1 |
Update the specified resource in storage. | public function update(Qstore $request, $id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ... | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890... | 0.55944353 | 47 |
Remove the specified resource from storage. | public function destroy($id)
{
// dd(request()->all());
$parent = request('sourceModel')::find(request('sourceModelId'));
$relation = request('relation');
// $model = request('relatedTo')::find(request('relatedToID'));
$parent->$relation()->detach(request('id'));
ret... | {
"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 |
RESTful GET route to fetch all currencies | public function fetchAllAction(Request $request, Application $app)
{
$results = $app['orm.em']->getRepository('Pfmgr\Entity\Currency')->findAll();
if (count($results) < 1) {
throw new Exception("Currency data is empty.");
} else {
return $app->json($results);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getCurrenciesAction()\n {\n $em = $this->getDoctrine()->getManager();\n $currencies = $em->getRepository('ApiBundle:Currency')->findAll();\n $view = $this->view($currencies);\n return $this->handleView($view);\n }",
"public function getCurrenciesAction()\n {\n... | [
"0.8216026",
"0.7993959",
"0.7825248",
"0.7693063",
"0.75853026",
"0.74716145",
"0.73822737",
"0.73727494",
"0.73607457",
"0.72174925",
"0.71788573",
"0.71675855",
"0.71355706",
"0.7128597",
"0.71126556",
"0.70763975",
"0.7049064",
"0.70437986",
"0.7040263",
"0.7029878",
"0.7... | 0.6642236 | 34 |
Get The Default Language | public function getDefaultLanguage()
{
if ($this->defaultLanguage)
return $this->defaultLanguage;
else
return 'en';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getSiteDefaultLanguage();",
"public function defaultLanguage()\r\n\t{\r\n\t\treturn $this->default_language;\r\n\t}",
"public function getDefaultLanguage(){\n\t\treturn $this->_lang_default;\n\t}",
"public static function getDefaultLanguage()\n {\n return DLanguage::getDefaultLangua... | [
"0.9142921",
"0.906222",
"0.9032783",
"0.87443477",
"0.87406117",
"0.86152667",
"0.8587521",
"0.8480608",
"0.84529954",
"0.84299105",
"0.84117603",
"0.83105266",
"0.8238253",
"0.82085806",
"0.82063454",
"0.81774217",
"0.8102275",
"0.8075092",
"0.8064894",
"0.8064894",
"0.8064... | 0.882692 | 3 |
Get the phrase of the $key index | public function phrase($key)
{
if (isset($this->phrases[$key]))
return $this->phrases[$key];
else
return $key;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function phpkd_vblvb_fetch_phrase_from_key($phrase_key)\n{\n\tglobal $vbphrase;\n\n\treturn (isset($vbphrase[\"$phrase_key\"])) ? $vbphrase[\"$phrase_key\"] : $phrase_key;\n}",
"public function get_keyword($key = 0)\n {\n }",
"final public function key(): string\n {\n $this->sort();\n\n... | [
"0.7205845",
"0.61944443",
"0.6101978",
"0.5975041",
"0.5945912",
"0.5911684",
"0.5908087",
"0.5894694",
"0.57735807",
"0.5771883",
"0.57632256",
"0.57475144",
"0.57296795",
"0.57191443",
"0.5714679",
"0.5706119",
"0.5691688",
"0.56915486",
"0.5674771",
"0.56646717",
"0.56438... | 0.7665775 | 0 |
Display a listing of the resource. | public function index()
{
$fixes = Fix::orderBy('id', 'DESC')
->paginate(20);
$fix_admin = check_power('報修系統', 'A', auth()->user()->id);
$data = [
'fixes' => $fixes,
'fix_admin' => $fix_admin,
];
return view('fixes.index', $data);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re... | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.683052... | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
return view('fixes.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)
{
$att['type'] = $request->input('type');
$att['user_id'] = auth()->user()->id;
$att['title'] = $request->input('title');
$att['content'] = $request->input('content');
$att['situation'] = "3";
Fix::create($att);
$att2[... | {
"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.728708",
"0.7144915",
"0.7132209",
"0.66401577",
"0.66205436",
"0.65682197",
"0.6526531",
"0.65085673",
"0.6449452",
"0.63749766",
"0.63726056",
"0.6364582",
"0.6364582",
"0.6364582",
"0.6341498",
"0.63412726",
"0.63412726",
"0.63412726",
"0.63412726",
"0.63412726",
"0.634... | 0.0 | -1 |
Display the specified resource. | public function show(Fix $fix)
{
$fix_admin = check_power('報修系統', 'A', auth()->user()->id);
$data = [
'fix' => $fix,
'fix_admin' => $fix_admin,
];
return view('fixes.show', $data);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id... | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245... | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ... | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.6833... | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, Fix $fix)
{
$fix->update($request->all());
$att['email'] = $request->input('email');
$user = User::find(auth()->user()->id);
$user->update($att);
//寄信
if (!empty($fix->user->email)) {
$situation = ['2' => '處理中', '... | {
"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(Fix $fix)
{
$fix->delete();
return redirect()->route('fixes.index');
} | {
"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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.